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

Function cvNorm

deps/opencv/modules/core/src/stat.cpp:2698–2723  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2696
2697
2698CV_IMPL double
2699cvNorm( const void* imgA, const void* imgB, int normType, const void* maskarr )
2700{
2701 cv::Mat a, mask;
2702 if( !imgA )
2703 {
2704 imgA = imgB;
2705 imgB = 0;
2706 }
2707
2708 a = cv::cvarrToMat(imgA, false, true, 1);
2709 if( maskarr )
2710 mask = cv::cvarrToMat(maskarr);
2711
2712 if( a.channels() > 1 && CV_IS_IMAGE(imgA) && cvGetImageCOI((const IplImage*)imgA) > 0 )
2713 cv::extractImageCOI(imgA, a);
2714
2715 if( !imgB )
2716 return !maskarr ? cv::norm(a, normType) : cv::norm(a, normType, mask);
2717
2718 cv::Mat b = cv::cvarrToMat(imgB, false, true, 1);
2719 if( b.channels() > 1 && CV_IS_IMAGE(imgB) && cvGetImageCOI((const IplImage*)imgB) > 0 )
2720 cv::extractImageCOI(imgB, b);
2721
2722 return !maskarr ? cv::norm(a, b, normType) : cv::norm(a, b, normType, mask);
2723}

Callers

nothing calls this directly

Calls 4

cvarrToMatFunction · 0.85
cvGetImageCOIFunction · 0.85
normFunction · 0.70
channelsMethod · 0.45

Tested by

no test coverage detected