OpenGL Interopt SolvePnp

asked 2014-04-02 07:27:51 -0600

MRDaniel gravatar image

Hello,

I have just found OpenCV's OpenGL interop. :D

Rendering points to a window seems straight forward enough. How would i add control to rotate a model given the result of solvePnp.

bool solvePnP(InputArray objectPoints, InputArray imagePoints, InputArray cameraMatrix, InputArray distCoeffs, OutputArray rvec, OutputArray tvec, bool useExtrinsicGuess=false, int flags=ITERATIVE )

My steps so far.....

Create an OpenGL array from a std::vector<cv::point3d> Create a window, with OpenGL flag set. Bind an oncall function to the window that calls render for the openGL array of points.

How do i apply rotations and translations.

1) To control the rotation of the model, and perhaps zoom. 2) Use the rvec and tvec from the solvePnp to so rotations.

edit retag flag offensive close merge delete