Thanks for more than two lakh views. All about openCV, Image Processing converging towards Biometric face recognition. Use the Easy Navigation button on the top bar to view all the posts at a glance related to openCV. I kept this blog small so that anyone can complete going through all posts and acquaint himself with openCV.

Pages

Thursday, July 5, 2012

SURF Source Code (Part-2)

Many of you might have already figured out, how to strip the code. The below is the stripped version. Here, we can just supply the gallery image and probe image, the same way as the previous post as arg1 and arg2. But here, no GUI utilities are being used. Just the output needed is printed to standard output. This drastically reduces the time for the program execution. Also, I have removed the flann method of matching, since any one (findpairs and flannfindpairs - functions) can be used and both the methods given have the same recognition performance.

9 comments:

Hi Dillep!!!Thanks for giving code.It runs successfully on my computer. My question is how to get location(x and y coordinates) of detected object in above code?Suppose i i have an image of pen as arg1 and another image which contains pen with some background as arg2.Then how can i get x and y coordinates of pen in arg2?

Ohk, that's not possible, since you have to dig into the SURF built-in functions of opencv. Even though it is possible to dig, it's tedious. Better to use SURF for comparison purposes only.

If you want to detect a bottle and track it's coordinates, I suggest you to construct a haar classifier for bottle detection and use a code, similar to the face detector code (both available in this blog) for the same. In the face detector code, inside the detectfaces function, there is a cvrectangle() used to construct rectangle around the detected face. You can get the coordinates, which are the same as arguements to the cvrectangle().

Hi, I found this post very helpful. I have to use SURF Algorithm for feature extraction using OpenCV 2.4.9 in a certain project. I am aware of the inbuilt SURF function that can help in the same. I am new to OpenCv and not completely comfortable with its advanced concepts.However I have been asked to perform the task without using the inbuilt function which means I have to write the code for every step in the algorithm. Is this possible at all. How do I go about it?