Getting focal length and focal point from a projection matrix

走远了吗. 提交于 2019-12-25 11:57:48

问题


I have a 4x4 projection matrix

(SCNMatrix4) 
   s = (m11 = 1.83226573, 
   m12 = 0, 
   m13 = 0, 
   m14 = 0,
   m21 = 0,
   m22 = 2.44078445,
   m23 = 0,
   m24 = 0,
   m31 = -0.00576340035, 
   m32 = -0.0016724075, 
   m33 = -1.00019991, 
   m34 = -1, 
   m41 = 0, 
   m42 = 0, 
   m43 = -0.20002, 
   m44 = 0)

I would like to get the focal point and the focal length out of this matrix.


回答1:


From slides 4 and 5 on this GDC presentation:

The focal length is merely the first element in the matrix (m11).

The focal point, however, cannot be extracted from this matrix alone - you need the camera direction D and position P. Once you have them, simply do P + D * m11 to obtain the focal point.



来源:https://stackoverflow.com/questions/46075606/getting-focal-length-and-focal-point-from-a-projection-matrix

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!