Quality Measurement of Blurred Images Using NMSE and SSIM Metrics in HSV and RGB Color Spaces
Ahmed Majeed Hameed*, Moaz H. Ali, Ramla Abdulnabi Abdulzahra
Al-Safwa University College, Department of Computer Technics, Karbala, Iraq
Quality measurement is the process of measuring distortion in images, by using some metrics that makes a comparison between the original pure image and the distorted image. Image quality measurement is important and helpful for many applications such as in medicine and space images because images can be affected with many factors of distortions. It is used the Normalize Mean Square Error (NMSE) and the Structural Similarity Index Measurement (SSIM) as a metric to measure the quality of distorted images. Gaussian blurring is the type of distortion which is used, so this distortion is applied manually on four color images using Gaussian blurring function. The distortion is applied on images in the red, green, blue (RGB) and Hue, Saturation, Value (HSV) color spaces. The result is shown that in the (HSV) the achromatic components have been affected strongly by blurring than chromatic components, but in the (RGB) colors and lightness are affected similarly because of the high interdependence between lightness and colors in RGB color space. Experimental results show that in HSV color space there is a high separation between chromatic and achromatic components, where achromatic component has been affected strongly with blur distortion than chromatic components. Also, results of RGB shows a high correlation between chromatic and achromatic components, where these components were identically affected with blur distortion.
Blurring, NMSE, SSIM, HSV, RGB, Gaussian Blurring, Image Quality
Received: July 2, 2015
Accepted: August 5, 2015
Published online: August 27, 2015
@ 2015 The Authors. Published by American Institute of Science. This Open Access article is under the CC BY-NC license. http://creativecommons.org/licenses/by-nc/4.0/
Nowadays one could consider blur as the most frequent factor affecting image quality, indeed blur is a common problem in most applications, such as visual art, remote sensing, medical and astronomical imaging as well as in machine vision . When blur affect an image, all color components of the image will be affected but with varying degrees. Measurement of image quality plays a major role in many image processing tasks such as compression, transmission, restoration, and enhancement. Any processing applied to an image may cause an important loss of information or quality. Image quality evaluation methods can be subdivided into objective and subjective methods [2,3]. Subjective method is described based on human judgment and operate without reference to explicit criteria . Objective method is known based on comparisons using explicit numerical criteria [5,6] and several references are possible, such as the ground truth or prior knowledge expressed in terms of statistical parameters and tests [7-9].
In fact, H. Abbas  has proposed depending on the findings that the best way to improve the color image and remove the noise of them are either through the use of remittances color and make treatment only on the lighting component or processed using two methods of standardization and crawl chromatography. Sendashonga and Labeau  were proposed a low complexity image quality assessment method based on frequency domain transforms. Also, Ouni  was proposed metrics that mathematically defined and overcame the limitations of existing metrics to assess the quality of the color in the image. On the other hand, Ciancio  was proposed a paradigm for blur evaluation in which an effective method is pursued by combining several metrics and low-level image features. Measuring the quality of distorted image is a complicated process, and to have adequate results it may use a good metric in measuring the quality. The NMSE can be used as a metric to measure quality, where this metric depends on the average of squared intensity. Besides that, the SSIM is obtained based on three factors between the original and distorted image, and these factors are luminance, contrast, and structure.
2. HSV Color Space
Three components in HSV color model are hue (H), saturation (S) and value (V). Hue is an attribute associated with the dominant wavelength in a mixture of light waves . Therefore, Fig. 1 clarifies the HSV color space:
The transformation from RGB color space to HSV color space is given by using Eq. 1, 2, 3 :
whereand. All three components V, S, and H are in the range (0, 1). The transformation from HSV back to RGB is given by using Eq. 4, 5, 6, 7, 8, 9 :
If the saturation is not zero, then the RGB components are given:
Where M, N, and K are defined as:
3. Blurring Distortion
Blurring is un-sharp image which is generated from a variety of sources, like atmospheric scatter, lens defocus, optical aberration, and spatial and temporal sensor integration . In digital image there are three common types of Blur effects: average blurs, Gaussian blur and motion Blur . The Gaussian blur is a type of image - blurring filter that uses a Gaussian function (which also expresses the normal distribution in statistics) for calculating the transformation to apply to each pixel in the image [21-22]. The equation of a Gaussian function in one dimension is equation (4) in the two dimensions form as a function of the position x,y is given by Eq. 10:
Where x is the distance from the origin in the horizontal axis, y is the distance from the origin in the vertical axis, and s is the standard deviation of the Gaussian distribution. When applied in two dimensions, this formula produces a surface whose contours is concentric circles with a Gaussian distribution from the center point. Values from this distribution are used to build a convolution matrix, which is applied to the original image. Each pixel's new value is set to a weighted average of that pixel's neighborhood. The original pixel's value receives the heaviest weight (having the highest Gaussian value) and neighboring pixels receive smaller weights as their distance to the original pixel increases. This results in a blur that preserves boundaries and edges better than other, more uniform blurring filters. The blurring image is given by Eq. 11 .
Where is the original image, is the Gaussian function, is the resulted blur image.
Fig. 2 shows the effect on Gaussian blurring of (hat) image with different values of Gaussian blurring factor Sigma.
4. Quality Metrics
4.1. Mean and Normalize Mean Square Error (MSE) & (NMSE)
MSE is computed by averaging the squared intensity of the original (input) image and the resulting (output) image pixels as in Eq. 12 .
Where e (m, n) is the error difference between the original and the distorted images.
For lightness component is given by Eq. 13:
The Normalization Mean Squared Error is defined by used Eq. 14:
The Normalization Mean Squared Error for RGB is given by Eq. 15:
The normalization mean squared error for hue is given by used Eq. 16, 17, 18:
The SSIM metric is described based on the evaluation of three different measures, the luminance, contrast, and structure comparison measures are computed as shown Eq. 19, 20, 21 :
Where and correspond to two different images, i.e. two different blocks in two separate images, , , and the mean of, the variance of , and the covariance of and respectively where is given by used Eq. 22, 23, 24, 25 :
Where is a Gaussian weighing function:
Where , and are constants given by , , , L is the dynamic range for the sample data, i.e. for 8 bit content and and are two scalar constants . Given the above measures the structural similarity can be computed as given in Eq. 26 :
The quality of images in Fig. 3 was measured using the NMSE and the SSIM. These metrics are applied on distorted images with different blurring scales, depending on the Gaussian blurring factor sigma, this factor is applied on images with varying from 1 to 25, where images with sigma equal to 1 is highly blurred, and images with sigma equal to 25 are slightly blurred. Fig. 4 shows the quality measured by the NMSE for the four images which is used in the HSV color space, where each graph represents a component of the HSV color space. Fig. 5 shows the NMSE as a function of sigma for the four images, but this time in the RGB color space. Therefore, in this figure the graphs have only two curves, one of lightness and one for color, where color represent (red + green + blue). Finally, Fig. 6 shows the results of the SSIM metrics as a function of sigma for the four images. Also, in this figure, it is found that there are only two curves, one of lightness and one for value. This is because the SSIM cannot be applied to chromatic components that is applied this metric on only achromatic components of the HSV and the RGB color spaces.
The above figures give as a full-imagination about quality and quality measurement. As shown in Fig. 4 the three components of HSV have different behavior with distortion. The value component has been affected strongly with blur, but other components approximately still without change. This is because the high separation between chromatic and achromatic components in this color space. On the other hand, about the Fig. 5 that NMSE of distorted images in RGB color space gives as another behavior, in this figure color and lightness have the same behavior because of the high correlation between components in this color space. Finally, Fig. 6 shows the results of the SSIM between the achromatic components of HSV and RGB that is shown the same behavior of value and lightness. In conclude that it is found that an abnormal result with sigma equal to 1 and 2 because of the extremely high distortion of images in this range of sigma. Also, sigma with values greater than 15 gives a stable and steady results because of sigma with this value will gives as approximately no blurring.
In conclusion, from the obtained results, it can be drawn as follows:
• Quality of images is increasing directly with increasing of sigma.
• In the HSV color space there is a highly separation between chromatic and achromatic components.
• In the RGB color space there is a high correlation between chromatic and achromatic components.
• In the HSV color space, Value component has been affected strongly with blur than other components, this mean that future researchers can focus only on achromatic component of this color space.
• Sigma with values less than 3 gives as abnormal results because the high distortion with these values.
• Sigma with values greater than 15 gives as a steady result because images with these values have distortion free.
The authors would like to acknowledge the support given by cooperation between the College AlSafwa University and University of Kerbala in carrying out this research.