Click here to Skip to main content
15,896,726 members
Please Sign up or sign in to vote.
2.00/5 (1 vote)
See more:
I have written two sets of code in C. One is using OpenCV (for marker detection) and another OpenGL (for creating a simple 3D box).

But I have no clue how to integrate those two. For example: Displaying the box on detected maker.

With the functions of OpenCV such as cvFindExtrinsicCameraParams2,cvRodrigues2 I have obtained the rotation vector and rotation matrix. But I cannot understand how I can pass these points to OpenGL so that it can draw a 3d shape on the detected marker?
Posted

1 solution

Sounds to me like a job for gluUnProject.

Here's the docs: gluUnProject[^]
Here's a quick demo: Nehe's advice for using gluUnProject[^]
Another 'using gluUnProject' page[^]

Presumably, you can substitute the talk of mouse cursor position for that of openCV returned co-ordinates. (I Haven't used openCV or gluUnProject before)
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900