![]() |
OpenCV
4.6.0
Open Source Computer Vision
|
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>
Public Member Functions | |
void | clear () CV_OVERRIDE |
Implements Algorithm::clear() More... | |
cv::Scalar | compute (InputArray cmp) CV_OVERRIDE |
Compute the PSNR. More... | |
bool | empty () const CV_OVERRIDE |
Implements Algorithm::empty() More... | |
double | getMaxPixelValue () const |
return the maximum pixel value used for PSNR computation More... | |
void | setMaxPixelValue (double val) |
sets the maximum pixel value used for PSNR computation More... | |
![]() | |
virtual | ~QualityBase ()=default |
Destructor. More... | |
void | clear () CV_OVERRIDE |
Implements Algorithm::clear() More... | |
virtual cv::Scalar | compute (InputArray img)=0 |
Compute quality score per channel with the per-channel score in each element of the resulting cv::Scalar. See specific algorithm for interpreting result scores. More... | |
bool | empty () const CV_OVERRIDE |
Implements Algorithm::empty() More... | |
virtual void | getQualityMap (OutputArray dst) const |
Returns output quality map that was generated during computation, if supported by the algorithm More... | |
![]() | |
Algorithm () | |
virtual | ~Algorithm () |
virtual void | clear () |
Clears the algorithm state. More... | |
virtual bool | empty () const |
Returns true if the Algorithm is empty (e.g. in the very beginning or after unsuccessful read. More... | |
virtual String | getDefaultName () const |
virtual void | read (const FileNode &fn) |
Reads algorithm parameters from a file storage. More... | |
virtual void | save (const String &filename) const |
void | write (const Ptr< FileStorage > &fs, const String &name=String()) const |
simplified API for language bindings This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. More... | |
virtual void | write (FileStorage &fs) const |
Stores algorithm parameters in a file storage. More... | |
Static Public Member Functions | |
static cv::Scalar | compute (InputArray ref, InputArray cmp, OutputArray qualityMap, double maxPixelValue=QualityPSNR::MAX_PIXEL_VALUE_DEFAULT) |
static method for computing quality More... | |
static Ptr< QualityPSNR > | create (InputArray ref, double maxPixelValue=QualityPSNR::MAX_PIXEL_VALUE_DEFAULT) |
Create an object which calculates quality. More... | |
![]() | |
template<typename _Tp > | |
static Ptr< _Tp > | load (const String &filename, const String &objname=String()) |
Loads algorithm from the file. More... | |
template<typename _Tp > | |
static Ptr< _Tp > | loadFromString (const String &strModel, const String &objname=String()) |
Loads algorithm from a String. More... | |
template<typename _Tp > | |
static Ptr< _Tp > | read (const FileNode &fn) |
Reads algorithm from the file node. More... | |
Static Public Attributes | |
static const int | MAX_PIXEL_VALUE_DEFAULT = 255 |
Default maximum pixel value. More... | |
Protected Member Functions | |
QualityPSNR (Ptr< QualityMSE > qualityMSE, double maxPixelValue) | |
Constructor. More... | |
![]() | |
void | writeFormat (FileStorage &fs) const |
Static Protected Member Functions | |
static cv::Scalar | _mse_to_psnr (cv::Scalar mse, double max_pixel_value) |
static double | _mse_to_psnr (double mse, double max_pixel_value) |
Protected Attributes | |
double | _maxPixelValue = QualityPSNR::MAX_PIXEL_VALUE_DEFAULT |
Ptr< QualityMSE > | _qualityMSE |
![]() | |
_mat_type | _qualityMap |
Output quality maps if generated by algorithm. More... | |
Additional Inherited Members | |
![]() | |
using | _mat_type = cv::UMat |
internal mat type default More... | |
Full reference peak signal to noise ratio (PSNR) algorithm https://en.wikipedia.org/wiki/Peak_signal-to-noise_ratio.
|
inlineprotected |
Constructor.
|
inlinestaticprotected |
|
inlinestaticprotected |
|
inlinevirtual |
Implements Algorithm::clear()
Reimplemented from cv::quality::QualityBase.
|
inlinevirtual |
Compute the PSNR.
cmp | Comparison image |
Implements cv::quality::QualityBase.
|
inlinestatic |
static method for computing quality
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 |
|
inlinestatic |
Create an object which calculates quality.
ref | input image to use as the source for comparison |
maxPixelValue | maximum per-channel value for any individual pixel; eg 255 for uint8 image |
|
inlinevirtual |
Implements Algorithm::empty()
Reimplemented from cv::quality::QualityBase.
|
inline |
return the maximum pixel value used for PSNR computation
|
inline |
sets the maximum pixel value used for PSNR computation
val | Maximum pixel value |
|
protected |
|
protected |
|
static |
Default maximum pixel value.