- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

Hi,

I try to program with opencv and ipp to calculate the Euclidean distance between image patches(grayscale) to search for similar patches.

I firstly store the pixel information in a row matrix, like : Mat m1=(Mat_<double>(1, 4) << a,b,c,d); Mat m2=.......

and then use norm(m1,m2,CV_L2) to calculate the Euclidean distance. That is how i calculate it with **only opencv**.

Now the problem is i dont know **how to program it in ipp**, should I use ippiNorm_L2 or SqrDistanceNorm?

Very appreciate for helping. An example would be better.

Besides: i don't have printf_2D_32f function from the given example in the following link, is there something wrong with it?

https://software.intel.com/en-us/node/504335

Thanks.

regards

Tao

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

The 'SqrDistanceNorm' function is used to calculate distance between source image & template image, more relevant to feature detection. It is similar with template matching (CV_TM_SQDIFF_NORMED) in Opencv.

The 'ippiNorm_L2' is used to calculate one image pixels l2 norm value.

Seems you would like to calculate L2 norm between two image. If so, I recommend to use 'ippiNormDiff_L2', or you could use 'ippiNormRel_L2' is you would like to calculate relative error of L2 norm.

The 'printf_2D_32f ' is not IPP function, just a self-designed function. You could re-write it.

Link Copied

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

The 'SqrDistanceNorm' function is used to calculate distance between source image & template image, more relevant to feature detection. It is similar with template matching (CV_TM_SQDIFF_NORMED) in Opencv.

The 'ippiNorm_L2' is used to calculate one image pixels l2 norm value.

Seems you would like to calculate L2 norm between two image. If so, I recommend to use 'ippiNormDiff_L2', or you could use 'ippiNormRel_L2' is you would like to calculate relative error of L2 norm.

The 'printf_2D_32f ' is not IPP function, just a self-designed function. You could re-write it.

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page