piqe

Perception based Image Quality Evaluator (PIQE) no-reference image quality score

Description

example

score = piqe(A) calculates the no-reference image quality score for image A using a perception based image quality evaluator.

example

[score,activityMask,noticeableArtifactsMask,noiseMask] = piqe(A) also returns the spatial quality masks computed from the input image.

Examples

collapse all

Calculate PIQE score for an image and the corresponding distorted images. Display the results with their corresponding image.

Read an image into the workspace. Generate distorted images by adding noise and blur. Use imnoise function to generate the noisy image and imgaussfilt function to generate the blurred image.

A = imread('lighthouse.png');
Anoise = imnoise(A,'Gaussian',0,0.05);
Ablur = imgaussfilt(A,2);

Calculate PIQE score for the original image and the distorted images.

score = piqe(A);
score_noise = piqe(Anoise);
score_blur = piqe(Ablur);

Display the images as a montage with their corresponding scores as a part of the figure title.

figure
montage({A,Anoise,Ablur},'Size',[1 3])
title({['Original Image: PIQE score = ', num2str(score),'    |    Noisy Image: PIQE score = ', num2str(score_noise),'    ' ...
    '|    Blurred Image: PIQE score = ', num2str(score_blur)]}, 'FontSize',12)

Calculate PIQE score of an image distorted due to blocking artifacts and Gaussian noise. Generate spatial quality masks that indicate the high spatially active blocks, noticeable artifacts blocks, and noise blocks in the image. Visualize the spatial quality masks by overlaying them on the distorted image. Display the image with and without the masks and the PIQE score for the image.

Read a distorted image (distortion due to JPEG2K) into the workspace.

Adistorted = imread('DistortedImage.png');

Calculate PIQE score and the spatial quality masks.

[score,activityMask,noticeableArtifactsMask,noiseMask] = piqe(Adistorted);

Overlay the spatial quality masks on the input image.

mask_1 = labeloverlay(Adistorted,activityMask,'Colormap','winter','Transparency',0.25);
mask_2 = labeloverlay(Adistorted,noticeableArtifactsMask,'Colormap','autumn','Transparency',0.25);
mask_3 = labeloverlay(Adistorted,noiseMask,'Colormap','hot','Transparency',0.25);

Display the original distorted image and the distorted images with overlaid spatial quality masks as a montage.

figure
montage({Adistorted,mask_1,mask_2,mask_3},'Size',[1 4])
title('Distorted Image   |    Overlay activityMask    |    Overlay noticeableArtifactsMask    |    Overlay noiseMask','FontSize',12)

Display PIQE score for the distorted image.

fprintf('PIQE score for the distorted image is %0.4f.\n',score)
PIQE score for the distorted image is 65.1855.

Input Arguments

collapse all

Input image, specified as a 2-D grayscale image of size m-by-n or 2-D RGB image of size m-by-n-by-3.

Data Types: single | double | int16 | uint8 | uint16

Output Arguments

collapse all

PIQE score for the input image A, returned as a nonnegative scalar in the range [0, 100]. The PIQE score is the no-reference image quality score and it is inversely correlated to the perceptual quality of an image. A low score value indicates high perceptual quality and high score value indicates low perceptual quality.

Data Types: double

Spatial quality mask of active blocks, returned as a 2-D binary image of size m-by-n, where m and n are the dimensions of the input image A. The activityMask is composed of high spatially active blocks in the input image. The high spatially active blocks in the input image are the regions with more spatial variability due to factors that include compression artifacts and noise. The high spatially active blocks are assigned a value '1' in the activityMask.

Data Types: logical

Spatial quality mask of noticeable artifacts, returned as a 2-D binary image of size m-by-n, where m and n are the dimensions of the input image A. The noticeableArtifactsMask is composed of blocks in activityMask that contain blocking artifacts (due to compression) or sudden distortions.

Data Types: logical

Spatial quality mask of Gaussian noise, returned as a 2-D binary image of size m-by-n, where m and n are the dimensions of the input image A. The noiseMask is composed of blocks in activityMask that contain Gaussian noise.

Data Types: logical

Algorithms

PIQE calculates the no-reference quality score for an image through block-wise distortion estimation, using these steps:

  1. Compute the Mean Subtracted Contrast Normalized (MSCN) coefficient for each pixel in the image using the algorithm proposed by N. Venkatanath and others [1].

  2. Divide the input image into nonoverlapping blocks of size 16-by-16.

  3. Identify high spatially active blocks based on the variance of the MSCN coefficients.

  4. Generate activityMask using the identified high spatially active blocks.

  5. In each block, evaluate distortion due to blocking artifacts and noise using the MSCN coefficients.

  6. Use threshold criteria to classify the blocks as distorted blocks with blocking artifacts, distorted blocks with Gaussian noise, and undistorted blocks.

  7. Generate noticeableArtifactsMask from the distorted blocks with blocking artifacts and noiseMask from the distorted blocks with Gaussian noise.

  8. Compute the PIQE score for the input image as the mean of scores in the distorted blocks.

  9. The quality scale of the image based on its PIQE score is given in this table. The quality scale and respective score range are assigned through experimental analysis on the dataset in LIVE Image Quality Assessment Database Release 2 [2].

Quality ScaleScore Range
Excellent[0, 20]
Good[21, 35]
Fair[36, 50]
Poor[51, 80]
Bad[81, 100]

References

[1] N. Venkatanath, D. Praneeth, Bh. M. Chandrasekhar, S. S. Channappayya, and S. S. Medasani. "Blind Image Quality Evaluation Using Perception Based Features", In Proceedings of the 21st National Conference on Communications (NCC). Piscataway, NJ: IEEE, 2015.

[2] Sheikh, H. R., Z. Wang, L. Cormack and A.C. Bovik, "LIVE Image Quality Assessment Database Release 2 ", https://live.ece.utexas.edu/research/quality.

See Also

Functions

Introduced in R2018b