@param exc the exception raisen.
@deprecated drop this version
*/
-CV_EXPORTS void error( const Exception& exc );
+CV_EXPORTS CV_NORETURN void error(const Exception& exc);
enum SortFlags { SORT_EVERY_ROW = 0, //!< each matrix row is sorted independently
SORT_EVERY_COLUMN = 1, //!< each matrix column is sorted
// access pixel coordinates
Point pnt = locations[i];
@endcode
-@param src single-channel array (type CV_8UC1)
+@param src single-channel array
@param idx the output array, type of cv::Mat or std::vector<Point>, corresponding to non-zero indices in the input
*/
CV_EXPORTS_W void findNonZero( InputArray src, OutputArray idx );
/** @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.
+This function calculates the Peak Signal-to-Noise Ratio (PSNR) image quality metric in decibels (dB),
+between two input arrays src1 and src2. The arrays must have the same type.
The PSNR is calculated as follows:
\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.
+where R is the maximum integer value of depth (e.g. 255 in the case of CV_8U data)
+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.
+@param R the maximum pixel value (255 by default)
*/
-CV_EXPORTS_W double PSNR(InputArray src1, InputArray src2);
+CV_EXPORTS_W double PSNR(InputArray src1, InputArray src2, double R=255.);
/** @brief naive nearest neighbor finder
static Mat subspaceReconstruct(InputArray W, InputArray mean, InputArray src);
protected:
- bool _dataAsRow; // unused, but needed for 3.0 ABI compatibility.
int _num_components;
Mat _eigenvectors;
Mat _eigenvalues;