quality_QualityBRISQUE
import { quality_QualityBRISQUE } from '@banou/opencv-wasm'Use after await initOpenCV(). See the initialization and named imports guide.
Native object: release it with using or delete(). Factories can return null; check before calling methods. Inherits quality_QualityBase.
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. [Mittal2] for original paper and original implementation [Mittal2_software] .
A trained model is provided in the /samples/ directory and is trained on the LIVE-R2 database [Sheikh] as in the original implementation. When evaluated against the TID2008 database [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.
Constructors and members
static compute1
static method for computing quality
compute1(img: Mat, model_file_path: EmbindString, range_file_path: EmbindString): Scalar;imgimage for which to compute quality
model_file_pathcv::String which contains a path to the BRISQUE model data, eg. /path/to/brisque_model_live.yml
range_file_pathcv::String which contains a path to the BRISQUE range data, eg. /path/to/brisque_range_live.yml
cv::Scalar with the score in the first element. The score ranges from 0 (best quality) to 100 (worst quality)
static create
Create an object which calculates quality
create(model_file_path: EmbindString, range_file_path: EmbindString): quality_QualityBRISQUE | null;model_file_pathcv::String which contains a path to the BRISQUE model data, eg. /path/to/brisque_model_live.yml
range_file_pathcv::String which contains a path to the BRISQUE range data, eg. /path/to/brisque_range_live.yml
The quality_QualityBRISQUE | null result.
static create1
Create an object which calculates quality
create1(model: ml_SVM | null, range: Mat): quality_QualityBRISQUE | null;modelcv::Ptrcv::ml::SVM which contains a loaded BRISQUE model
rangecv::Mat which contains BRISQUE range data
The quality_QualityBRISQUE | null result.
static computeFeatures
static method for computing image features used by the BRISQUE algorithm
computeFeatures(img: Mat, features: Mat): void;imgimage (BGR(A) or grayscale) for which to compute features
featuresOutput destination, filled by the native operation. output row vector of features to cv::Mat or cv::UMat
clone
Create another handle to the same native object. This retains the object without copying its pixels or algorithm state; dispose both handles separately.
clone(): this;The this result.
compute
Computes BRISQUE quality score for input image
compute(img: Mat): Scalar;imgImage for which to compute quality
cv::Scalar with the score in the first element. The score ranges from 0 (best quality) to 100 (worst quality)
These signatures describe this package. Upstream documentation can mention optional backends that are absent from this build. Check runtime compatibility before choosing a backend or file format.