Commit 57073047 authored by Vadim Pisarevsky's avatar Vadim Pisarevsky

Merge pull request #9633 from saskatchewancatch:psnr-doc

parents cb0d6959 a90a93b4
......@@ -697,10 +697,21 @@ CV_EXPORTS_W double norm(InputArray src1, InputArray src2,
*/
CV_EXPORTS double norm( const SparseMat& src, int normType );
/** @brief computes PSNR image/video quality metric
/** @brief Computes the Peak Signal-to-Noise Ratio (PSNR) image quality metric.
This function calculates the Peak Signal-to-Noise Ratio (PSNR) image quality metric in decibels (dB), between two input arrays src1 and src2. Arrays must have depth CV_8U.
The PSNR is calculated as follows:
\f[
\texttt{PSNR} = 10 \cdot \log_{10}{\left( \frac{R^2}{MSE} \right) }
\f]
where R is the maximum integer value of depth CV_8U (255) and MSE is the mean squared error between the two arrays.
@param src1 first input array.
@param src2 second input array of the same size as src1.
see http://en.wikipedia.org/wiki/Peak_signal-to-noise_ratio for details
@todo document
*/
CV_EXPORTS_W double PSNR(InputArray src1, InputArray src2);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment