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
pnint
Methods
Compute(InputArray, string, string)
static method for computing quality
public static Scalar Compute(InputArray img, string modelFilePath, string rangeFilePath)
Parameters
imgInputArrayimage for which to compute quality
modelFilePathstringString which contains a path to the BRISQUE model data, eg. /path/to/brisque_model_live.yml
rangeFilePathstringcv::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
imgInputArrayimage (BGR(A) or grayscale) for which to compute features
featuresOutputArrayoutput 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
modelSVMcv::ml::SVM* which contains a loaded BRISQUE model
rangeMatcv::Mat which contains BRISQUE range data
Returns
Create(string, string)
Create an object which calculates quality
public static QualityBRISQUE Create(string modelFilePath, string rangeFilePath)
Parameters
modelFilePathstringString which contains a path to the BRISQUE model data, eg. /path/to/brisque_model_live.yml
rangeFilePathstringString which contains a path to the BRISQUE range data, eg. /path/to/brisque_range_live.yml
Returns
DisposeManaged()
Releases managed resources
protected override void DisposeManaged()