Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Beginner
8 Views

Problem using OpenCV cvGoodFeaturesToTrack() with mask image

Jump to solution
I've used cvGoodFeaturesToTrack with and without IPP. I get the same results if I don't use a mask. If I use a mask, there are many more points when I use IPP, and the quality of the points are much worse (even though the quality threshold is the same).

0 Kudos

Accepted Solutions
Highlighted
8 Views
Thanks for provided details.

I've tested your small and big images with OpenCV 2.0 compiled to use IPP 6.1 static libraries with your test program. For small image your test found 84 feature points and for bigger image it found 94 feature points. Is that the problem you are worrying about? Note, as your smaller image isscaled downversion of bigger image the algorithm may find less points in it because not all points found in big image are robust enough for size transformation.

I'm going to recompile OpenCV without IPP support and compare results. Will update you once ready.


Results for small image



Results for big image


Regards,
Vladimir

View solution in original post

0 Kudos
7 Replies
Highlighted
8 Views

Hello,

what version of OpenCV and IPP do you use? What is yourOS and processor you are running on? Is it possible to provide a simple test case which may help us to reproduce the issue?

Regards,
Vladimir
0 Kudos
Highlighted
Beginner
8 Views

Hello,

what version of OpenCV and IPP do you use? What is yourOS and processor you are running on? Is it possible to provide a simple test case which may help us to reproduce the issue?

Regards,
Vladimir

I'm using OpenCV 1.0, and I downloaded IPP within the last month. I believe it is 6.1. I've included my source code and two example images.

I traced the problem to be in cvMinMaxLoc(). If I remove the mask image from this function call, the results are the same. However, I think the results are best if I use the mask image (when not using IPP).

Also, the problem appears to be size related. The included bigger image is a simple resizing of the other image. To test the code, copy one of the two images to input.jpg. Only the larger image shows the problem.
0 Kudos
Highlighted
Beginner
8 Views

Hello,

what version of OpenCV and IPP do you use? What is yourOS and processor you are running on? Is it possible to provide a simple test case which may help us to reproduce the issue?

Regards,
Vladimir

I'm using Windows XP. The CPU is an Intel Core 2 Duo (T7800).
0 Kudos
Highlighted
9 Views
Thanks for provided details.

I've tested your small and big images with OpenCV 2.0 compiled to use IPP 6.1 static libraries with your test program. For small image your test found 84 feature points and for bigger image it found 94 feature points. Is that the problem you are worrying about? Note, as your smaller image isscaled downversion of bigger image the algorithm may find less points in it because not all points found in big image are robust enough for size transformation.

I'm going to recompile OpenCV without IPP support and compare results. Will update you once ready.


Results for small image



Results for big image


Regards,
Vladimir

View solution in original post

0 Kudos
Highlighted
Beginner
8 Views
Thanks for looking at this. It seems the problem didn't show up for you. Maybe it's not a problem with OpenCV 2.0. Does IPP generally work ok with OpenCV 2.0?

Here's what I observed with OpenCV 1.0.
Smaller image, Without IPP: 84 pts, With IPP: 84 pts
Bigger image, Without IPP: 94 pts, With IPP: 196 pts

Here's the 196-pt output:



0 Kudos
Highlighted
Beginner
8 Views
I installed OpenCV2.0. I configured it for IPP, and I ran it with IPP in the path.

This time, I get better results (the right 94 points detected), but I'm not sure if it even used IPP. cvGetModuleInfo doesn't report anything about IPP.
0 Kudos
Highlighted
8 Views

Hello,

one of the major changes in OpenCV 2.0 is that it support now IPP static libraries (instead of IPP DLLs in previous versions). That's why it does not report about IPP in the list of loaded modules.

Regards,
Vladimir
0 Kudos