Created Date : 2011.10
Language : C/C++
Tool : Microsoft Visual C++ 2008 Library & Utilized : OpenCV 2.3
Reference : SIFT reference
etc. : template Image, WebCam
I made SIFT matching program using OpenCV 2.3.
I was wondering how to know the object pose.
In the internet, there are many source about sift, surf. But most of code introduced about only descripter and matching. There is no code to find object pose.
So I made this code and I should disclose this code.
This code uses openCV functions very useful.
cvExtractSURF, cvFindHomography...
I made matching code to the class. Class file name is MareMatchingClass.h/cpp.
You can use my class in the source very easily.
1. Create Matching class
CMareMatchingClass MMathing;
2.Input PatchImg
MMathing.ExtractPatchSurf(PatchImg);
3.Find PatchImg in the background img
MMathing.GetObjectRectAndBestH(BackGroundImg, &rect4pt);
4.Drawing the rect(rect4pt).
5.Repeat, go to the 3.
The class is consist of like below process;
1. Extract Feature -> use cvExtractSURF function
2. Find Matching point
3. Select some feature in the mached feature points, randomly.
4. calculate Homography matrix. This is geometry relationship between patch and background image.
5. transform features in the patch image by Homography matrix.
6. compare the transformed features to the background features.
7. evaluate how much is the homography exact.
7. repeat 4~6 and select best H.
<source code>
I think the source code is not best.
There are still shortage the source code.
It would need futher improvemnet.
so I want to discuss with you. Please leave your valueable opinion.
Thank you.
Have a nice day~. ^^
Oh~ english is very difficult.....
Code doesn't works as it works in your video,
ReplyDeleteWhy is that>?
I cann't know your problem.
ReplyDeleteWhat error did you meet?
Hi Mare,your above code is very useful.But its not working Properly.I am working in Image mode. I have given 2 images(patch image and background image).The code fails in FindBestH().And if(inCount <= 5) returning 0.It can't draw line on background image.
ReplyDeleteCan you please guide me.I can successfully compile the code.
Could you send me your source code and image file?
ReplyDeleteI will check what the problem is.
My e-mail is feelmare@daum.net or feelmare@gmail.com.
I guess the problem is lack of input feature or not approporiate input value.
Thank you.
This comment has been removed by the author.
ReplyDeleteThanks for the great tutorial and it is very helpful in my studies but there is a problem the problem is too slow almost running in 1 frame or 2 frames a per second. Is there anyway how to speed up the program?
ReplyDeleteThanks in advance!
I think the source code is not complete.
DeleteI made this code to study principle of SIFT.
I want to help to others study.
It is possible to use Mat image in the program?
ReplyDeleteI made iplImage class base.
DeleteIf you want to Mat, a lot of parts will have to be modified.
Thank you.
i could not find the code hear, has it been removed?
ReplyDeleteem.. I just checked down is possible or not.
ReplyDeleteClick the linked words '< source code >' then page will move to docs.google.com.
And you can download.
Thank you.
oh man what is this!!
ReplyDeleteThank you.
ReplyDeleteto test the code which file should i open?
ReplyDeletethank you
im beginner
?
ReplyDeletemain.cpp is main source code.
ReplyDeletebut if you use Visual Studio, you can open by project.
xxx.sin file is project opner file.
Thank you.
i could not find the code hear, has it been removed?
ReplyDeleteBefore you go out purchasing computer connections from the Internet, you ought to think about some significant variables. razer viper
ReplyDeleteAn investigation by Centers for Disease Control and Prevention (2010) found that solitary 20% of the registration blocks are inside a large portion of a mile of a square limit. VMake Video Editor Mod APK
ReplyDelete