Full reference peak signal to noise ratio (PSNR) algorithm https://en.wikipedia.org/wiki/Peak_signal-to-noise_ratio.
More...
#include <opencv2/quality/qualitypsnr.hpp>
Full reference peak signal to noise ratio (PSNR) algorithm https://en.wikipedia.org/wiki/Peak_signal-to-noise_ratio.
◆ QualityPSNR()
cv::quality::QualityPSNR::QualityPSNR |
( |
Ptr< QualityMSE > | qualityMSE, |
|
|
double | maxPixelValue ) |
|
inlineprotected |
◆ _mse_to_psnr() [1/2]
◆ _mse_to_psnr() [2/2]
static double cv::quality::QualityPSNR::_mse_to_psnr |
( |
double | mse, |
|
|
double | max_pixel_value ) |
|
inlinestaticprotected |
◆ clear()
void cv::quality::QualityPSNR::clear |
( |
| ) |
|
|
inlinevirtual |
Python: |
---|
| cv.quality.QualityPSNR.clear( | | ) -> | None |
◆ compute() [1/2]
Python: |
---|
| cv.quality.QualityPSNR.compute( | cmp | ) -> | retval |
| cv.quality.QualityPSNR.compute( | ref, cmp[, qualityMap[, maxPixelValue]] | ) -> | retval, qualityMap |
| cv.quality.QualityPSNR_compute( | ref, cmp[, qualityMap[, maxPixelValue]] | ) -> | retval, qualityMap |
Compute the PSNR.
- Parameters
-
- Returns
- Per-channel PSNR value, or std::numeric_limits<double>::infinity() if the MSE between the two images == 0
Implements cv::quality::QualityBase.
◆ compute() [2/2]
Python: |
---|
| cv.quality.QualityPSNR.compute( | cmp | ) -> | retval |
| cv.quality.QualityPSNR.compute( | ref, cmp[, qualityMap[, maxPixelValue]] | ) -> | retval, qualityMap |
| cv.quality.QualityPSNR_compute( | ref, cmp[, qualityMap[, maxPixelValue]] | ) -> | retval, qualityMap |
static method for computing quality
- Parameters
-
ref | reference image |
cmp | comparison image |
qualityMap | 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
◆ create()
Python: |
---|
| cv.quality.QualityPSNR.create( | ref[, maxPixelValue] | ) -> | retval |
| cv.quality.QualityPSNR_create( | ref[, maxPixelValue] | ) -> | retval |
Create an object which calculates quality.
- Parameters
-
ref | input image to use as the source for comparison |
maxPixelValue | maximum per-channel value for any individual pixel; eg 255 for uint8 image |
◆ empty()
bool cv::quality::QualityPSNR::empty |
( |
| ) |
const |
|
inlinevirtual |
Python: |
---|
| cv.quality.QualityPSNR.empty( | | ) -> | retval |
◆ getMaxPixelValue()
double cv::quality::QualityPSNR::getMaxPixelValue |
( |
| ) |
const |
|
inline |
Python: |
---|
| cv.quality.QualityPSNR.getMaxPixelValue( | | ) -> | retval |
return the maximum pixel value used for PSNR computation
◆ setMaxPixelValue()
void cv::quality::QualityPSNR::setMaxPixelValue |
( |
double | val | ) |
|
|
inline |
Python: |
---|
| cv.quality.QualityPSNR.setMaxPixelValue( | val | ) -> | None |
sets the maximum pixel value used for PSNR computation
- Parameters
-
◆ _maxPixelValue
◆ _qualityMSE
◆ MAX_PIXEL_VALUE_DEFAULT
const int cv::quality::QualityPSNR::MAX_PIXEL_VALUE_DEFAULT = 255 |
|
static |
Default maximum pixel value.
The documentation for this class was generated from the following file: