Skip to content

quality_QualityPSNR_compute

qualityfunctionOpenCV 5.0.0
import { quality_QualityPSNR_compute } from '@banou/opencv-wasm'

Use after await initOpenCV(). See the initialization and named imports guide.

ARGUMENTSref, cmp, qualityMap, maxPixelValue
FUNCTIONquality_QualityPSNR_compute
RETURN TYPEScalar
Call structure. A void return can still write to destination arguments. The parameter descriptions define inputs, outputs and ownership.

static method for computing quality

quality_QualityPSNR_compute(ref: Mat, cmp: Mat, qualityMap: Mat, maxPixelValue: number): Scalar;
2 available overloads
quality_QualityPSNR_compute(ref: Mat, cmp: Mat, qualityMap: Mat): Scalar;
quality_QualityPSNR_compute(ref: Mat, cmp: Mat, qualityMap: Mat, maxPixelValue: number): Scalar;
ref

reference image

cmp

comparison image

qualityMap

Output destination, filled by the native operation. output quality map, or cv::noArray()

maxPixelValue

maximum per-channel value for any individual pixel; eg 255 for uint8 image

Returns

PSNR value, or std::numeric_limits<double>::infinity() if the MSE between the two images == 0

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.