提交 73298ea8 编写于 作者: V Vadim Pisarevsky

Merge pull request #9642 from saskatchewancatch:psnr-checks

......@@ -4150,7 +4150,9 @@ double cv::PSNR(InputArray _src1, InputArray _src2)
{
CV_INSTRUMENT_REGION()
CV_Assert( _src1.depth() == CV_8U );
//Input arrays must have depth CV_8U
CV_Assert( _src1.depth() == CV_8U && _src2.depth() == CV_8U );
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.
先完成此消息的编辑!
想要评论请 注册