Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to find 3d Projection Matrix in Surf Detection

I am new to OpenCV. I have got the Surf Detection sample working. Now I want to place a 3d model on the detected image.

How can I find the 3d Projection matrix?

like image 685
Sumeet Jindal Avatar asked May 28 '12 06:05

Sumeet Jindal


1 Answers

I guess you are talking about Augment Reality as you say you want to place a 3D model on the detected image (in the camera frame? ). They key of the problem is always to detect at least 4 points that match other 4 "keypoints" in our marker. Then, solving some equations we will get our homography, which will allow us to project any point.

In OpenCV there is a function that performs this task: cvFindHomography

You just need the pairs of matches, select a method (RANSAC, i.e.) and you will get the Homography.

Then you can project the points like explained here:

like image 143
Jav_Rock Avatar answered Oct 19 '22 23:10

Jav_Rock