quality_QualityPSNR
import { quality_QualityPSNR } 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.
Full reference peak signal to noise ratio (PSNR) algorithm https://en.wikipedia.org/wiki/Peak_signal-to-noise_ratio
Constructors and members
static create
Create an object which calculates quality
create(ref: Mat, maxPixelValue: number): quality_QualityPSNR | null;2 available overloads
create(ref: Mat): quality_QualityPSNR | null;create(ref: Mat, maxPixelValue: number): quality_QualityPSNR | null;refinput image to use as the source for comparison
maxPixelValuemaximum per-channel value for any individual pixel; eg 255 for uint8 image
The quality_QualityPSNR | null result.
static compute1
static method for computing quality
compute1(ref: Mat, cmp: Mat, qualityMap: Mat, maxPixelValue: number): Scalar;2 available overloads
compute1(ref: Mat, cmp: Mat, qualityMap: Mat): Scalar;compute1(ref: Mat, cmp: Mat, qualityMap: Mat, maxPixelValue: number): Scalar;refreference image
cmpcomparison image
qualityMapOutput destination, filled by the native operation. output quality map, or cv::noArray()
maxPixelValuemaximum per-channel value for any individual pixel; eg 255 for uint8 image
PSNR value, or std::numeric_limits<double>::infinity() if the MSE between the two images == 0
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
Compute the PSNR
compute(cmp: Mat): Scalar;cmpComparison image
Per-channel PSNR value, or std::numeric_limits<double>::infinity() if the MSE between the two images == 0
empty
Implements Algorithm::empty()
empty(): boolean;The boolean result.
clear
Implements Algorithm::clear()
clear(): void;getMaxPixelValue
return the maximum pixel value used for PSNR computation
getMaxPixelValue(): number;The number result.
setMaxPixelValue
sets the maximum pixel value used for PSNR computation
setMaxPixelValue(val: number): void;valMaximum pixel value
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.