Public Member Functions |
Static Public Member Functions |
Static Public Attributes |
Protected Member Functions |
Static Protected Member Functions |
Protected Attributes |
List of all members
cv::quality::QualityPSNR Class Reference
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>
Inheritance diagram for cv::quality::QualityPSNR:

Public Member Functions | |
void | clear () CV_OVERRIDE |
Implements Algorithm::clear() | |
cv::Scalar | compute (InputArray cmp) CV_OVERRIDE |
Compute the PSNR. | |
bool | empty () const CV_OVERRIDE |
Implements Algorithm::empty() | |
double | getMaxPixelValue () const |
return the maximum pixel value used for PSNR computation | |
void | setMaxPixelValue (double val) |
sets the maximum pixel value used for PSNR computation | |
![]() | |
virtual | ~QualityBase ()=default |
Destructor. | |
void | clear () CV_OVERRIDE |
Implements Algorithm::clear() | |
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. | |
bool | empty () const CV_OVERRIDE |
Implements Algorithm::empty() | |
virtual void | getQualityMap (OutputArray dst) const |
Returns output quality map that was generated during computation, if supported by the algorithm | |
![]() | |
Algorithm () | |
virtual | ~Algorithm () |
virtual void | clear () |
Clears the algorithm state. | |
virtual bool | empty () const |
Returns true if the Algorithm is empty (e.g. in the very beginning or after unsuccessful read. | |
virtual String | getDefaultName () const |
virtual void | read (const FileNode &fn) |
Reads algorithm parameters from a file storage. | |
virtual void | save (const String &filename) const |
void | write (const Ptr< FileStorage > &fs, const String &name=String()) const |
virtual void | write (FileStorage &fs) const |
Stores algorithm parameters in a file storage. | |
void | write (FileStorage &fs, const String &name) const |
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 | |
static Ptr< QualityPSNR > | create (InputArray ref, double maxPixelValue=QualityPSNR::MAX_PIXEL_VALUE_DEFAULT) |
Create an object which calculates quality. | |
![]() | |
template<typename _Tp > | |
static Ptr< _Tp > | load (const String &filename, const String &objname=String()) |
Loads algorithm from the file. | |
template<typename _Tp > | |
static Ptr< _Tp > | loadFromString (const String &strModel, const String &objname=String()) |
Loads algorithm from a String. | |
template<typename _Tp > | |
static Ptr< _Tp > | read (const FileNode &fn) |
Reads algorithm from the file node. | |
Static Public Attributes | |
static const int | MAX_PIXEL_VALUE_DEFAULT = 255 |
Default maximum pixel value. | |
Protected Member Functions | |
QualityPSNR (Ptr< QualityMSE > qualityMSE, double maxPixelValue) | |
Constructor. | |
![]() | |
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. | |
Additional Inherited Members | |
![]() | |
using | _mat_type = cv::UMat |
internal mat type default | |
Detailed Description
Full reference peak signal to noise ratio (PSNR) algorithm https://en.wikipedia.org/wiki/Peak_signal-to-noise_ratio.
Constructor & Destructor Documentation
◆ QualityPSNR()
|
inlineprotected |
Constructor.
Member Function Documentation
◆ _mse_to_psnr() [1/2]
|
inlinestaticprotected |
◆ _mse_to_psnr() [2/2]
|
inlinestaticprotected |
◆ clear()
|
inlinevirtual |
Implements Algorithm::clear()
Reimplemented from cv::quality::QualityBase.
◆ compute() [1/2]
|
inlinevirtual |
Compute the PSNR.
- Parameters
-
cmp Comparison image
- 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]
|
inlinestatic |
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()
|
inlinestatic |
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()
|
inlinevirtual |
Implements Algorithm::empty()
Reimplemented from cv::quality::QualityBase.
◆ getMaxPixelValue()
|
inline |
return the maximum pixel value used for PSNR computation
◆ setMaxPixelValue()
|
inline |
sets the maximum pixel value used for PSNR computation
- Parameters
-
val Maximum pixel value
Member Data Documentation
◆ _maxPixelValue
|
protected |
◆ _qualityMSE
|
protected |
◆ MAX_PIXEL_VALUE_DEFAULT
|
static |
Default maximum pixel value.
The documentation for this class was generated from the following file:
- opencv2/quality/qualitypsnr.hpp