简体   繁体   中英

how to compute the projection/modelview matrix given 3D points and their 2D screen positions in opengl

I've got a tough problem regarding the modelview/projection matrix in opengl.

Say, I have a set of 3D points, and also their corresponding 2D screen positions, is it possible to solve for the optimal modelview (or the scale/rotation/translation) matrix which transforms all these 3D points to the 2D screen positions in the least square sense, when the projection matrix is fixed? or, is it possible to solve for such a projection matrix, when the modelview matrix is fixed? Is it possible to get the parameter settings in functions such as gluperspective, gluLookAt and so on?

Yes it's possible if you have enough points.

There are libraries that can do this already check out http://docs.opencv.org/modules/calib3d/doc/camera_calibration_and_3d_reconstruction.html

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM