So , I was following this this code sample from opencv about surf and homography and I was interested in the train sample that was required to such experiment . I downloaded the two images at the bottom box.png and box_in_scene.png to validate the correctness of this code , I was alright . Now , I went to test this code with my own image , on the left is an image of a flash drive , and on the right is an image of a scissor with an usb drive . I failed to get any rectangular box on the test image ( the scissor and usb drive) .
.
However I know the code is working when I take different train sample for example this one with a paper box on the left and paper box in the mix with bed sheet .
.
Now my question is , what sort of training images should I rely on to give a good response , or is it something to do with the scenery that I choose as my test sample. Also had I chosen a video sample as my test case , would I be able to receive more responsive result .
Thanks .
If you think your second test is good, you are mistaken. Normal you can see in their site
See on keypoints on your two pictures, they are matched wrong. I think matching is the most hard in this work. Now I try to impove this mathematically, but still no good results :(
You can googling the most popular case of matching sample, but to get good result need something better.
About requirements: only one object may be on scene. Good if you have on sample only object without background. Although the algorithm is invariant to scale, if sample is very small and scene is very big you'll have problem at least with the number of keypoints.
There is nothing wrong with the sample ; however , the scenery to which the sample is to be matched needs to be dynamic , i.e a live stream . Drawing homography is not as simple as that . In order to draw that green rectangle , enough inliers are needed which is clearly missing in the usb and scissors examples .
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With