Documentation

This is machine translation

Translated by Microsoft
Mouseover text to see original. Click the button below to return to the English verison of the page.

Note: This page has been translated by MathWorks. Please click here
To view all translated materals including this page, select Japan from the country navigator on the bottom of this page.

brisque

Blind/Referenceless Image Spatial Quality Evaluator (BRISQUE) no-reference image quality score

Syntax

score = brisque(A)
score = brisque(A,model)

Description

example

score = brisque(A) calculates the no-reference image quality score for image A using the Blind/Referenceless Image Spatial Quality Evaluator (BRISQUE). brisque compare A to a default model computed from images of natural scenes witih similar distortions. A smaller score indicates better perceptual quality.

example

score = brisque(A,model) calculates the image quality score using a custom feature model.

Examples

collapse all

Compute the BRISQUE score for a natural image and its distorted versions using the default model.

Read an image into the workspace. Create copies of the image with noise and blurring distortions.

I = imread('lighthouse.png');
Inoise = imnoise(I,'salt & pepper',0.02);
Iblur = imgaussfilt(I,2);

Display the images.

montage(cat(2,I,Inoise,Iblur))
title('Original Image | Noisy Image | Blurry Image')

Calculate the BRISQUE score for each image using the default model, and display the score.

brisqueI = brisque(I);
fprintf('BRISQUE score for original image is %0.4f.\n',brisqueI)
BRISQUE score for original image is 20.6586.
brisqueInoise = brisque(Inoise);
fprintf('BRISQUE score for noisy image is %0.4f.\n',brisqueInoise)
BRISQUE score for noisy image is 52.6074.
brisqueIblur = brisque(Iblur);
fprintf('BRISQUE score for blurry image is %0.4f.\n',brisqueIblur)
BRISQUE score for blurry image is 47.7553.

The original undistorted image has the best perceptual quality and therefore the lowest BRISQUE score.

Train a custom BRISQUE model from a set of quality-aware features and corresponding human opinion scores. Use the custom model to calculate a BRISQUE score for an image of a natural scene.

Save images from an image datastore. These images all have compression artifacts resulting from JPEG compression.

setDir = fullfile(toolboxdir('images'),'imdata');
imds = imageDatastore(setDir,'FileExtensions',{'.jpg'});

Specify the opinion score for each image. The following differential mean opinion score (DMOS) values are for illustrative purposes only. They are not real DMOS values obtained through experimentation.

opinionScores = 100*rand(1,size(imds.Files,1));

Create the custom model of quality-aware features using the image datastore and the opinion scores. Because the scores are random, the property values will vary.

model = fitbrisque(imds,opinionScores')
Extracting features from 22 images.
...
Completed 5 of 22 images.  Time: Calculating...
....
Completed 12 of 22 images.  Time: 00:23 of 00:41
..Training support vector regressor...

Done.
model = 
  brisqueModel with properties:

             Alpha: [20x1 double]
              Bias: 69.0203
    SupportVectors: [20x36 double]
            Kernel: 'gaussian'
             Scale: 0.2432

Read an image of a natural scene that has the same type of distortion as the training images. Display the image.

I = imread('car1.jpg');
imshow(I)

Calculate the BRISQUE score for the image using the custom model. Display the score.

brisqueI = brisque(I,model);
fprintf('BRISQUE score for the image is %0.4f.\n',brisqueI)
BRISQUE score for the image is 85.7778.

Input Arguments

collapse all

Input image, specified as a 2-D grayscale or RGB image.

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

Custom model trained on a set of quality-aware features, specified as a brisqueModel object. model is derived from natural scene statistics.

Output Arguments

collapse all

No-reference image quality score, returned as a nonnegative scalar. The BRISQUE score is usually in the range [0, 100]. Lower values of score reflect better perceptual quality of image A with respect to the input model.

Data Types: double

Algorithms

brisque predicts the BRISQUE score by using a support vector regression (SVR) model trained on an image database with corresponding differential mean opinion score (DMOS) values. The database contains images with known distortion such as compression artifacts, blurring, and noise, and it contains pristine versions of the distorted images. The image to be scored must have at least one of the distortions for which the model was trained.

References

[1] Mittal, A., A. K. Moorthy, and A. C. Bovik. "No-Reference Image Quality Assessment in the Spatial Domain." IEEE Transactions on Image Processing. Vol. 21, Number 12, December 2012, pp. 4695–4708.

[2] Mittal, A., A. K. Moorthy, and A. C. Bovik. "Referenceless Image Spatial Quality Evaluation Engine." Presentation at the 45th Asilomar Conference on Signals, Systems and Computers, Pacific Grove, CA, November 2011.

See Also

Functions

Using Objects

Introduced in R2017b

Was this topic helpful?