Norm function in OpenCV

MerveMeriç picture MerveMeriç · Jul 8, 2014 · Viewed 8.3k times · Source

How can I take easily norm of an array?

I tried this and I have an error:

too many initializers error C2440: 'initializing' : cannot convert from 'cv::OutputArray (__cdecl *)(void)' to 'double'

double DaisyFeature [200];
double DaisyFeature1 [200];

double norm( DaisyFeature , DaisyFeature1 , NORM_L2,noArray);

I think the problem is something about initializing but I don't know what should I use instead of double DaisyFeature [200];

Answer

Nallath picture Nallath · Jul 8, 2014

The documentation is pretty clear on how Input/OutputArrays work. The documentation can be found here.

It basicly states that you can assume that any algorithm implemented by openCV accepts the following types as input (and output);

cv::Mat, std::vector<>, cv::Matx<>, cv::Vec<> or cv::Scalar