提交 0e44ad55 编写于 作者: R RAJ NATARAJAN 提交者: GitHub

Removed unnecessary assertion

上级 6da62f56
......@@ -4150,9 +4150,8 @@ double cv::PSNR(InputArray _src1, InputArray _src2)
{
CV_INSTRUMENT_REGION()
//Input arrays must have depth CV_8U and be of identical size
//Input arrays must have depth CV_8U
CV_Assert( _src1.depth() == CV_8U && _src2.depth() == CV_8U );
CV_Assert( _src1.rows() == _src2.rows() && _src1.cols() == _src2.cols() && _src1.dims() == _src2.dims() );
double diff = std::sqrt(norm(_src1, _src2, NORM_L2SQR)/(_src1.total()*_src1.channels()));
return 20*log10(255./(diff+DBL_EPSILON));
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册