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 |
§ clear()
void cv::quality::QualityPSNR::clear |
( |
| ) |
|
|
inlinevirtual |
Python: |
---|
| None | = | cv.quality_QualityPSNR.clear( | | ) |
§ compute() [1/2]
Python: |
---|
| retval | = | cv.quality_QualityPSNR.compute( | cmpImgs | ) |
| retval, qualityMaps | = | cv.quality_QualityPSNR.compute( | refImgs, cmpImgs[, qualityMaps[, maxPixelValue]] | ) |
| retval, qualityMaps | = | cv.quality.QualityPSNR_compute( | refImgs, cmpImgs[, qualityMaps[, maxPixelValue]] | ) |
compute the PSNR
- Parameters
-
- Returns
- Per-channel PSNR value, or std::numeric_limits<double>::infinity() if the MSE between the two images == 0 The PSNR for multi-frame images is computed by calculating the average MSE of all frames and then generating the PSNR from that value
Implements cv::quality::QualityBase.
§ compute() [2/2]
Python: |
---|
| retval | = | cv.quality_QualityPSNR.compute( | cmpImgs | ) |
| retval, qualityMaps | = | cv.quality_QualityPSNR.compute( | refImgs, cmpImgs[, qualityMaps[, maxPixelValue]] | ) |
| retval, qualityMaps | = | cv.quality.QualityPSNR_compute( | refImgs, cmpImgs[, qualityMaps[, maxPixelValue]] | ) |
static method for computing quality
- Parameters
-
refImgs | reference image(s) |
cmpImgs | comparison image(s) |
qualityMaps | output quality map(s), 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 The PSNR for multi-frame images is computed by calculating the average MSE of all frames and then generating the PSNR from that value
§ create()
Python: |
---|
| retval | = | cv.quality.QualityPSNR_create( | refImgs[, maxPixelValue] | ) |
Create an object which calculates quality via mean square error.
- Parameters
-
refImgs | input image(s) 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: |
---|
| retval | = | cv.quality_QualityPSNR.empty( | | ) |
§ getMaxPixelValue()
double cv::quality::QualityPSNR::getMaxPixelValue |
( |
| ) |
const |
|
inline |
Python: |
---|
| retval | = | cv.quality_QualityPSNR.getMaxPixelValue( | | ) |
return the maximum pixel value used for PSNR computation
§ setMaxPixelValue()
void cv::quality::QualityPSNR::setMaxPixelValue |
( |
double |
val | ) |
|
|
inline |
Python: |
---|
| None | = | cv.quality_QualityPSNR.setMaxPixelValue( | val | ) |
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: