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 :
Jav_rock
source share