Ask Your Question

surf_matcher.cpp perspectivetransform exception

asked 2015-05-06 11:14:59 -0500

fredreload gravatar image

updated 2015-05-06 19:52:15 -0500

I am trying to test out surf_matcher.cpp (, the problem is I kept getting an exception in this line perspectiveTransform( obj_corners, scene_corners, H);. The images I provided is from the hand picture at the bottom of this page ( since I can't find the box.png image for this program. I would like to know how to fix this exception and if there is another simpler version of SURF or SIFT for OpenCV 3.0.0. I am not sure what is causing the exception, maybe the image width and height, or missing libraries. If someone can give me a lead would be cool. image description image description image description image description image description

edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted

answered 2015-05-06 11:27:37 -0500

LorenaGdL gravatar image

updated 2015-05-06 11:28:04 -0500

Here are the box and box_in_scene images, in case you want to try them:

image description image description

edit flag offensive delete link more


I changed the two images but perspectivetransform is still giving me an exception. All I did with the code is to load it in manually since I am running it in Visual Studio imread("Test1.png", IMREAD_GRAYSCALE).copyTo(img1); imread("Test2.png", IMREAD_GRAYSCALE).copyTo(img2);. I'll update the values for the perspectivetransform.

fredreload gravatar imagefredreload ( 2015-05-06 11:48:44 -0500 )edit

You should post the exact exception you're getting. Otherwise is nearly impossible to know what's happening

LorenaGdL gravatar imageLorenaGdL ( 2015-05-06 12:01:15 -0500 )edit

Hi, exception images added.

fredreload gravatar imagefredreload ( 2015-05-06 19:52:40 -0500 )edit

Alright, it is working now that I switch to matcher_simple.cpp. Thanks for all the help!

fredreload gravatar imagefredreload ( 2015-05-06 22:32:58 -0500 )edit
Login/Signup to Answer

Question Tools

1 follower


Asked: 2015-05-06 11:14:59 -0500

Seen: 208 times

Last updated: May 06 '15