MCPcopy Create free account
hub / github.com/creatale/node-dv / PSNR

Method PSNR

deps/opencv/modules/imgproc/src/utils.cpp:259–265  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

257
258
259double cv::PSNR(InputArray _src1, InputArray _src2)
260{
261 Mat src1 = _src1.getMat(), src2 = _src2.getMat();
262 CV_Assert( src1.depth() == CV_8U );
263 double diff = std::sqrt(norm(src1, src2, NORM_L2SQR)/(src1.total()*src1.channels()));
264 return 20*log10(255./(diff+DBL_EPSILON));
265}
266
267
268CV_IMPL void

Callers

nothing calls this directly

Calls 6

sqrtFunction · 0.85
normFunction · 0.50
getMatMethod · 0.45
depthMethod · 0.45
totalMethod · 0.45
channelsMethod · 0.45

Tested by

no test coverage detected