[pixkit image] qualityassessment: Image quality assessment - yunfuliu/pixkit GitHub Wiki

LOE

Since the relative order of lightness represents the light source directions and the lightness variation, the naturalness of an enhanced image is related to the relative order of lightness in different local areas. The LOE is therefore based on the lightness order error between the original image I and its enhanced version Ie to assess the naturalness. Basically, the lower, the better.

[nickname] LOE(lightness-order-error)

[Reference]

S. Wang, J. Zheng, H. Hu, and B. Li, “Naturalness preserved enhancement algorithm for non-uniform illumination image,” IEEE Trans. Images Process., vol. 22, no. 9. Sep. 2013.

C++: float LOE(const cv::Mat &src1,const cv::Mat &src2)

Parameters:

  • src1 - The original input CV_8UC1 image
  • src2 - The enhanced version of src1

Example:

float LOE= LOE(src1,src2);

DE

DE(discrete entropy)measures the amount of information in an image: a high DE indicates that the image contains more variations and conveys more information. Basically, the higher, the better.

[nickname] DE(discrete entropy)

[Reference]

1.C. E. Shannon, “A mathematical theory of communication,” Bell Syst. Tech. J., vol. 27, pp. 623–656, Oct. 1948.

2.Chulwoo Lee, Chul Lee and Chang-Su Kim, "Contrast Enhancement Based on Layered Difference Representation of 2D Histograms," IEEE Trans. Image Process., vol.22, no. 12, pp.5372-5384, Dec 2013.

C++: float DE(const cv::Mat &src1)

Parameters:

  • src1 - The input CV_8UC1 image

Example:

float entropy = DE(src1);

EME

Usually used to estimate contrast of an image, and it can evaluate naturalness and uniform lighting.

[nickname] measure of enhancement (EME) or measure of improvement

[Reference] original: S. S. Agaian, K. Panetta, and A. M. Grigoryan, "A new measure of image enhancement," in Proc. Intl. Conf. Signal Processing Communication, 2000. another representation (this is the one used in this implementation): S. S. Agaian, B. Silver, and K. A. Panetta, "Transform coefficient histogram-based image enhancement algorithms using contrast entropy," TIP, 2007.

C++: float EME(const cv::Mat &src,const cv::Size nBlocks,const short mode=1)

Parameters:

  • src - The source image.
  • nBlocks - Number of blocks at either x or y axis; this size should be odd since this is just like a filter as defined in the paper.
  • mode - 1: standard mode: use the local max and min to evaluate the eme; 2: ab mode: use BTC's a and b to represent a block's contrast

Example:

float eme = EME(src,cv::Size(3,3),1);

TEN

It is able to describe whether some artificial texture appear or not.

[nickname] TEN

[Reference] L. Jiao, Z. Sun, and A. Sha, "Improvement of image contrast with local adaptation," in Proc. Intl. Conf. Multimedia and Informatin Technology, 2010. (this paper used this TEN in their paper, and the original one is published in 1970 as in their reference list)

C++: float TEN(const cv::Mat &src)

Parameters:

  • src - The source image.

Example:

float ten = TEN(src);

AMBE

Used to estimate the difference between two images (!!!the lower the better).

[nickname] absolute mean brightness error (AMBE)

[Reference] N. Phanthuna, F. Cheevasuvit, and S. Chitwong, "Contrast enhancement for minimum mean brightness error from histogram partitioning," ASPRS Conf. 2009.

C++: float AMBE(const cv::Mat &src1,const cv::Mat &src2)

Parameters:

  • src1 - The source 1 image.
  • src2 - The source 2 image.

Example:

float ambe = AMBE(src1,src2);

CII

An index of evaluating contrast improvement

[Abbr] contrast improvement index (CII).

[Reference] G. Raju and M. S. Nair, "A fast and efficient color image enhancement method based on fuzzy-logic and histogram," International Journal of Electronics and Communications, vol. 68, pp. 237-243, 2014.

[Developer] Yun-Fu Liu ([email protected])

C++: float qualityassessment::CII(const cv::Mat &src1,const cv::Mat &src2)

Parameters:

  • src1 - The source image 1.
  • dst2 - The source image 2.

Example:

qualityassessment::CII(src1,src2);

SNS

Evaluate speckle noise strength. Range is from 0% to 100%.

[Abbr] speckle noise strength (SNS).

[Reference] H. Ibrahim and S. C. Hoo, "Local contrast enhancement utilizing bidirectional switching equalization of separated and clipped subhistograms," Mathematical Problems in Engineering, 2014.

[Developer] Yun-Fu Liu ([email protected])

C++: bool qualityassessment::SNS(const cv::Mat &src1b,int ksize=25)

Parameters:

  • src1b - The source image of CV_8UC1.
  • ksize - The used size of median filter. The default value is 25 as suggested in reference.

Example:

qualityassessment::SNS(src1b);

PSNR

Estimate the similarity between two matrices by PSNR.

C++: float qualityassessment::PSNR(const cv::Mat &src1,const cv::Mat &src2)

Parameters:

  • src1 - The source 1 image. It can be CV_8UC1 or CV_32FC1.
  • src2 - The source 2 image. It can be CV_8UC1 or CV_32FC1.

HPSNR

Calculate the image similarity by human vision PSNR. In this implementation, the Gaussian kernel of size ksize is used.

[Abbr] Human visual PSNR (HPSNR)

C++: float qualityassessment::HPSNR(const cv::Mat &src1,const cv::Mat &src2,const int ksize=7)

Parameters:

Example:

Mat src1,src2;
float hpsnr = qualityassessment::HPSNR(src1,src2,ksize);

GaussianDiff

Display the difference of two Gaussian blurred images.

[nickname] GaussianDiff

[Reference] C. Schmaltz, P. Gwosdek, A. Bruhn, and J. Weickert, “Electrostatic halftoning,” Computer Graphics Forum, vol. 29, no. 8, pp. 2313-2327, 2010.

C++: bool GaussianDiff(cv::InputArray &_src1,cv::InputArray &_src2,double sd=1.)

Parameters:

  • _src1 - The source 1 inputArray.
  • _src2 - The source 2 inputArray.
  • sd - The value of standard deviation for Gaussian filter.(default value = 1.0)

Example:

GaussianDiff(src1,src2,sd);

spectralAnalysis_Bartlett

Get average power spectrum density by DFT.

[Reference] M. S. Bartlett, "The spectral analysis of two-dimensional point processes," Biometrika, Dec. 1964.

C++: bool qualityassessment::spectralAnalysis_Bartlett(cv::InputArray &_src,cv::OutputArray &_dst1f,const cv::Size specSize,const int rounds=10,const bool rand_sample=false,bool flag_display=true)

Parameters:

  • _src - The source inputArray, and its height should be roundsx of its width.
  • _dst1f - The destination inputArray, and its size should be _src's width*width, a square image.
  • specSize - Size of the _dst.
  • rounds - Number of samples onto _src. It's default at 10.
  • rand_sample - If false, it uses the conventional way of Bartlett's method for the power spectrum density (psd), and the _src's height/width should equal to rounds. If true, randomly sample in _src rounds times for the average. If user want to calculate anisotropy, this parameter must set false.
  • flag_display - If true, the output will be processed by log to emphasize the details of spectrum. If false, raw data will be generated.

Example:

qualityassessment::spectralAnalysis_Bartlett(_src,_dst,Size(128,128));

SSIM

Structural Similarity Image Quality Assessment for grayscale images.

[nickname] SSIM

[Reference] Zhou Wang, Eero P. Simoncelli1 and Alan C. Bovik, "Multi-scale Structural Similarity for Image Quality Assessment," in Proc. IEEE Asilomar Conf. Singals, Syst., Comput., Pacific Grove, CA, vol. 2, pp.1398-1402, Nov 2003.

C++: float SSIM(const cv::Mat &src1, const cv::Mat &src2)

Parameters:

  • src1 - The source 1 image.
  • src2 - The source 2 image.

Example:

float ssim = SSIM(src1,src2);

###MSSIM Structural Similarity Image Quality Assessment with HVS filter for grayscale images.

[nickname] Mean SSIM

[Reference] Zhou Wang, Eero P. Simoncelli1 and Alan C. Bovik, "Multi-scale Structural Similarity for Image Quality Assessment," in Proc. IEEE Asilomar Conf. Singals, Syst., Comput., Pacific Grove, CA, vol. 2, pp.1398-1402, Nov 2003.

C++: float MSSIM(const cv::Mat &src1, const cv::Mat &src2, int HVSsize=11, double* lu_co_st=NULL)

Parameters:

  • src1 - The source 1 image.
  • src2 - The source 2 image.
  • HVSsize - The value of HVS filter size.(default value = 11)
  • lu_co_st - The parameter only uesd in MS_SSIM. Record the vaiue of MSSIM parameters: luminance, contrast and structure.(default value = NULL)

Example:

float mssim = MSSIM(src1,src2);

###MS_SSIM Structural Similarity Image Quality Assessment with HVS filter for grayscale images.

[nickname] Multi-scale SSIM

[Reference] Zhou Wang, Eero P. Simoncelli1 and Alan C. Bovik, "Multi-scale Structural Similarity for Image Quality Assessment," in Proc. IEEE Asilomar Conf. Singals, Syst., Comput., Pacific Grove, CA, vol. 2, pp.1398-1402, Nov 2003.

C++: float MS_SSIM(const cv::Mat &src1, const cv::Mat &src2, int HVSsize=11)

Parameters:

  • src1 - The source 1 image.
  • src2 - The source 2 image.
  • HVSsize - The value of HVS filter size.(default value = 11)

Example:

float ms_ssim = MS_SSIM(src1,src2);

###GMSD A high efficient perceptual image quality metric.

[Abbr] Gradient magnitude similarity deviation (GMSD)

[Reference] Wufeng Xue, Lei Zhang, Xuanqin Mou and Bovik, A.C., "Gradient Magnitude Similarity Deviation: A Highly Efficient Perceptual Image Quality Index," Image Processing IEEE Transactions on Volume:23 Issue: 2 ,pp.684-695,Feb 2014.

[Developer] Shih-Jie Lin ([email protected])

C++: float GMSD(const cv::Mat &src1,const cv::Mat &src2, cv::Mat &dst)

Parameters:

  • src1 - The reference image.
  • src2 - The distorted image.
  • dst - Local quality map of the distorted image.

Example:

float gmsd = GMSD(src1, src2, dst);