Main Content

piqe

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

Description

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

example

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

example

Examples

collapse all

Read an image into the workspace. Generate distorted images by adding noise and blur. Use the imnoise function to generate the noisy image and the 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.

montage({A,Anoise,Ablur},Size=[1 3])
title("Original PIQE score = "+score+ ...
    "    |    Noisy PIQE score = "+score_noise+  ...
    "    |    Blurred PIQE score = "+score_blur,FontSize=8)

Figure contains an axes object. The hidden axes object with title Original PIQE score = 24.8481 | Noisy PIQE score = 72.3643 | Blurred PIQE score = 85.7362 contains an object of type 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,maskActivity,maskArtifacts,maskNoise] = piqe(Adistorted);

Overlay the spatial quality masks on the input image.

mask_1 = labeloverlay(Adistorted,maskActivity,Colormap="winter",Transparency=0.25);
mask_2 = labeloverlay(Adistorted,maskArtifacts,Colormap="autumn",Transparency=0.25);
mask_3 = labeloverlay(Adistorted,maskNoise,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   |    Activity    |    Noticeable Artifacts    |    Noise", ...
    FontSize=12)

Figure contains an axes object. The hidden axes object with title Distorted Image | Activity | Noticeable Artifacts | Noise contains an object of type image.

Display PIQE score for the distorted image.

disp("PIQE score for the distorted image is "+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 a 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 artifactsMask 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/.

Version History

Introduced in R2018b

See Also

Functions