How to find a 3d projection matrix when detecting surfing

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

How to find a 3D projection matrix?

+7
source share
1 answer

I think you are talking about Augment Reality, because you are saying that you want to place a 3D model on the detected image (in the camera frame?). The key to the problem is always finding at least 4 points that correspond to the other 4 "key points" in our marker. Then, solving some equations, we get our homography, which allows us to project any point.

OpenCV has a function that performs this task: cvFindHomography

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

Then you can project the points as described here :

+5
source

All Articles