Code covered by the BSD License  

Highlights from
Object Matching

3.66667
3.7 | 5 ratings Rate this file 121 Downloads (last 30 days) File Size: 2.88 MB File ID: #34626
image thumbnail

Object Matching

by

Li yang Ku (view profile)

 

An object matching method based on Lowe, D.G. Object recognition from local scale-invariant features

| Watch this File

File Information
Description

Object matching method based on Lowe, D.G. Object recognition from local scale-invariant features. Marks the contour of the target in a test image based on 1 target image. Uses SURF points instead of SIFT points.
 
Need to download SURFmex library first.
See http://computervisionblog.wordpress.com/2012/01/15/object-matching-method-made-in-the-20th-century/ for detail.

Acknowledgements

Match Plot inspired this file.

Required Products MATLAB
MATLAB release MATLAB 7.6 (R2008a)
Tags for This File   Please login to tag files.
Please login to add a comment or rating.
Comments and Ratings (31)
12 Feb 2015 Aisha

Aisha (view profile)

Getting same error..
Attempt to execute SCRIPT surfpoints as a function:
D:\matlab_tests\surfmex-master\mexw64\surfpoints.m

Error in short_example (line 20)
[points descr sign info] = surfpoints(I, options);

Comment only
12 Feb 2015 pravinmu

Li yang Ku,
i'm getting the same error as sanya. i'm using a 64-bit workstation and 64-bit MATLAB version. even the short_example.m file gives the same error. please help.

Comment only
16 Dec 2014 Meghana

Yeah, it's a 64-bit workstation and 64-bit MATLAB version.

Comment only
16 Dec 2014 Li yang Ku

Li yang Ku (view profile)

The surfmex library you have only has mexw64 folder. Are you running on a 64 bit machine and 64 bit matlab? If not you need to create mex files for 32 bit.

Comment only
16 Dec 2014 Meghana

I added ObjectMatching and surfmex-master folders to path. Opened surfmex-master\surfmex-master\examples\short_example.m and run it (F5). Still the same error.

https://www.dropbox.com/s/xk4rwyk1gpsouvc/Li%20Yang%20Ku-%20short_example.png?dl=0

Comment only
12 Dec 2014 Li yang Ku

Li yang Ku (view profile)

Try running surfmex/examples/short_example.m and see if it works. This library may be different from the one I used to work with.

Comment only
05 Dec 2014 Meghana

Yes, Ihave included my entire folder named "Dec 2, 2014" (wrt screen shot) in path.

Comment only
04 Dec 2014 Li yang Ku

Li yang Ku (view profile)

Did you include the SURFmex library by right clicking the folder in Matlab and add subfolders to path?

Comment only
04 Dec 2014 Meghana

I have posted a screen shot of the error here:

https://www.dropbox.com/s/bv08joo6h4lcxfs/Li%20yang%20Ku%27s%20code%20error%20%28Mathworks%20file%20exchange%29.png?dl=0

Comment only
04 Dec 2014 Meghana

I am still getting the error:

>> Demo
Attempt to execute SCRIPT surfpoints as a function:
E:\Stereo Vision Workspace\Dec 2, 2014\ObjectMatching-
LiYangKu(MathWorks)\surfmex-master\surfmex-master\mexw64\surfpoints.m

Error in createTargetModel (line 18)
[cr, descr, sign, info] = surfpoints(im_mat_g,options);

Error in Demo (line 22)
targetModel = createTargetModel(targetImage, targetModelImage);

I am maybe missing out on something which I dont know.

It says
"Attempt to execute SCRIPT surfpoints as a function:
E:\Stereo Vision Workspace\Dec 2, 2014\ObjectMatching-
LiYangKu(MathWorks)\surfmex-master\surfmex-master\mexw64\surfpoints.m
while, in that path there is no surfpoints.m present. There is surfpoints.cpp (under the folder "surfmex-master", downloaded from https://github.com/PetterS/surfmex)

Comment only
02 Dec 2014 Li yang Ku

Li yang Ku (view profile)

See if this will help

http://www.mathworks.com/matlabcentral/answers/93148-why-do-i-receive-the-error-attempt-to-execute-script-filename-as-a-function

Run Demo instead of Demo()

Comment only
02 Dec 2014 Meghana

Hi, I am looking forward to use your code in my project. Unfortunately, this is the error I am getting, even though I have included surfmex-master in my path (inside the folder ObjectMatching) (https://github.com/PetterS/surfmex)

Demo()
14 targetImage = imread('TrainImage/drill.bmp');
Attempt to execute SCRIPT surfpoints as a function:
E:\Stereo Vision Workspace\Dec 2, 2014\ObjectMatching- LiYangKu(MathWorks)\surfmex-master\surfmex-master\mexw64\surfpoints.m

Error in createTargetModel (line 18)
[cr, descr, sign, info] = surfpoints(im_mat_g,options);

Error in Demo (line 22)
targetModel = createTargetModel(targetImage, targetModelImage);

If you wish to know any more details regarding this, let know =)

Comment only
10 Jun 2014 Li yang Ku

Li yang Ku (view profile)

The SURFmex library is now on github https://github.com/PetterS/surfmex
To run the code, open Demo.m in the editor and click run. Make sure you link the SURFmex library, see comments in Demo.m

Comment only
10 Jun 2014 Roshan Kumar ar

hi sir... how to execute this code..

Comment only
25 Feb 2014 Wu Feng

Hi Li yang Ku,
I can't open the website of SURFmex library for detail. So could you send me the same one? My email is hawf1988@163.com.

Best Regards

06 Mar 2013 Li yang Ku

Li yang Ku (view profile)

Yes, it should be able to do this job. Just train it with different QR codes or a QR code with out the middle part.

Comment only
06 Mar 2013 Saleh

Saleh (view profile)

Hi Li yang Ku,
Thank you very much, it is work now.
Do you think this program is applicable to modify to be able to recognize QR-Code? What I need is just detect QR-Code Not read it, which means is this image contains QR-Code or not? I don't need to read it, because I have another program does that job(decoding QR-Code).
Best Regards

05 Mar 2013 Li yang Ku

Li yang Ku (view profile)

Hi Saleh, you should double check you have surfpoints.mexw32 in the same folder which surfpoints.m locates in, and also make sure you added the surfmex directory to path. I believe you didn't install surfmex correctly.

Comment only
05 Mar 2013 Saleh

Saleh (view profile)

Hi Li yang Ku,

At last year I was able to run your program, but now I'm facing this problem:
>> Demo
Attempt to execute SCRIPT surfpoints as a function:
H:\mayPaper\ObjectMatching\surfmex\SURFmex-v2\mexw32\surfpoints.m

Error in createTargetModel (line 18)
[cr, descr, sign, info] = surfpoints(im_mat_g,options);

Error in Demo (line 22)
targetModel = createTargetModel(targetImage, targetModelImage);

Could you help me to fix it? Please...

03 May 2012 Shikhar

Hi Mr. Li,

To what extend, will this code work in my requirement.
http://www.mathworks.com/matlabcentral/newsreader/view_thread/319690#875552

Best Regards.

Comment only
01 Mar 2012 Li yang Ku

Li yang Ku (view profile)

Unfortunately this is not a probabilistic method, therefore unlike http://computervisionblog.wordpress.com/2011/12/11/object-recognition/ it doesn't determine an object exist or not base on a probabilistic threshold. However, you should be able to get a degree of confidence based on "length(filter_match)" which is the number of votes remained after filtering. To lower the threshold of finding an object or not, you can modify the parameters I manually set under %check location, %check orientation, %check scale, etc.

Comment only
01 Mar 2012 Saleh

Saleh (view profile)

Mr. Li Yang Ku, could you tell me how can I indicate matching degree. for example: when the algorithm fail to detect the object; I would like to know what was the percentage of matching which based on that percent judged and displayed('object not found')?

Best Regards

Saleh

Comment only
17 Feb 2012 Li yang Ku

Li yang Ku (view profile)

A pen probably won't work, unless there are words on the pen and you always show the same side of the pen in the test image. Remind that this method uses SIFT like features. SIFT works well on unique patterns with certain size. Some object with a large surface and some special patterns like words will probably work well.

Comment only
16 Feb 2012 Saleh

Saleh (view profile)

Thanks Li yang Ku for quick responce.
I had applied your algorithm to detect a pen rather than a drill,
unfortunatly it has failed.
what are the conditions to design the Model?
Best Regards
Saleh

Comment only
15 Feb 2012 Li yang Ku

Li yang Ku (view profile)

The object in both the training image and the testing image has to be big enough, otherwise there wont be enough SURF points to recognize. I recommend to start with the model I provided and then move on to something easy like books with text on the cover. Note that this method would not work well on texture less objects. Let me know if you still have problems.

Comment only
15 Feb 2012 Saleh

Saleh (view profile)

Hi,
when I apply your algorithm on my images, it is unable to find object. May be I have designed the model incorrectly, is there any advise...please

Saleh

14 Feb 2012 Panimalar

Thank you.
Sir, can I get the full published paper on above object matching, because I cannot find it on the blog you mentioned. Can u please mail the same to me.My ID abdulkhadir2727@gmail.com

Comment only
30 Jan 2012 Li yang Ku

Li yang Ku (view profile)

I am not sure if this algorithm is fast enough for real time, but you can always sub-sample your video and use the same code in a for loop.

Comment only
30 Jan 2012 Panimalar

Sir,
I want matlab code to implement these SIFT algorithm in video sequence.
My mail ID abdulkhadir2727@gmail.com

18 Jan 2012 Li yang Ku

Li yang Ku (view profile)

Thanks, I added some brief description of the algorithm inside my blog post
http://computervisionblog.wordpress.com/2012/01/15/object-matching-method-made-in-the-20th-century/
The algorithm is published in the paper I mentioned inside the blog post.

Comment only
18 Jan 2012 Tolga Birdal

Good work. Could you share the matching algorithm you used in this example? Is it published?

Thanks,

Comment only

Contact us