Table of Contents

Class QualityBRISQUE

Namespace
OpenCvSharp.Quality
Assembly
OpenCvSharp.dll

BRISQUE (Blind/Referenceless Image Spatial Quality Evaluator) is a No Reference Image Quality Assessment (NR-IQA) algorithm. BRISQUE computes a score based on extracting Natural Scene Statistics(https://en.wikipedia.org/wiki/Scene_statistics) and calculating feature vectors. See Mittal et al. @cite Mittal2 for original paper and original implementation @cite Mittal2_software. A trained model is provided in the /samples/ directory and is trained on the LIVE-R2 database @cite Sheikh as in the original implementation. When evaluated against the TID2008 database @cite Ponomarenko, the SROCC is -0.8424 versus the SROCC of -0.8354 in the original implementation. C++ code for the BRISQUE LIVE-R2 trainer and TID2008 evaluator are also provided in the /samples/ directory.

public class QualityBRISQUE : QualityBase, IDisposable, ICvPtrHolder
Inheritance
QualityBRISQUE
Implements
Inherited Members

Constructors

QualityBRISQUE(nint)

Creates instance by raw pointer

protected QualityBRISQUE(nint p)

Parameters

p nint

Methods

Compute(InputArray, string, string)

static method for computing quality

public static Scalar Compute(InputArray img, string modelFilePath, string rangeFilePath)

Parameters

img InputArray

image for which to compute quality

modelFilePath string

String which contains a path to the BRISQUE model data, eg. /path/to/brisque_model_live.yml

rangeFilePath string

cv::String which contains a path to the BRISQUE range data, eg. /path/to/brisque_range_live.yml

Returns

Scalar

cv::Scalar with the score in the first element. The score ranges from 0 (best quality) to 100 (worst quality)

ComputeFeatures(InputArray, OutputArray)

static method for computing image features used by the BRISQUE algorithm

public static void ComputeFeatures(InputArray img, OutputArray features)

Parameters

img InputArray

image (BGR(A) or grayscale) for which to compute features

features OutputArray

output row vector of features to cv::Mat or cv::UMat

Create(SVM, Mat)

Create an object which calculates quality

public static QualityBRISQUE Create(SVM model, Mat range)

Parameters

model SVM

cv::ml::SVM* which contains a loaded BRISQUE model

range Mat

cv::Mat which contains BRISQUE range data

Returns

QualityBRISQUE

Create(string, string)

Create an object which calculates quality

public static QualityBRISQUE Create(string modelFilePath, string rangeFilePath)

Parameters

modelFilePath string

String which contains a path to the BRISQUE model data, eg. /path/to/brisque_model_live.yml

rangeFilePath string

String which contains a path to the BRISQUE range data, eg. /path/to/brisque_range_live.yml

Returns

QualityBRISQUE

DisposeManaged()

Releases managed resources

protected override void DisposeManaged()