How to calculate camera projection matrix?
8 次查看(过去 30 天)
显示 更早的评论
Hi,
I have a problem where I'm attempting to calculate the projection matrix for two c-arm images and then triangulate the position of 3 fiducial markers located within the images.
My SID = 1650 mm, pixel size = 0.388 mm, centre pixel x = 512, centre pixel y = 384, source-origin distance = 1000 mm, angle between the two projections is 90 degreees, there is no translation.
I have calculated my intrinsic matrix to be
Intrinsic = [640.2, 0, 0; 0, 640.2, 0; 512, 384, 1]
Rotation matrix to be:
Rotation = [0, -1, 0; 1, 0, 0; 0, 0, 1]
Translation matrix to be:
Translation = [0; 1000; 0]
I was hoping someone could please confirm for me that this is correct and assist me with combining these into the projection matrix to be used for triangulation.
Thanks in advance, Joel
0 个评论
采纳的回答
Matt J
2018-4-6
编辑:Matt J
2018-4-6
See this wiki link for some reading on composing the projection matrix from intrinsics and extrinsics.
Regarding what you've shown, I think the 640.2 in your intrinsic matrix is incorrect. If the SID is 1650 mm, then in pixels it would be 1650/.388 = 4252.6. Also, more information about the extrinsics is needed, in particular how your 2D image axes are initially oriented in the first view relative to the 3D world x,y,z axes. The 90 degree rotation matrix alone does not provide this information. That just tells us how the axes change between views.
I give a solution to your triangulation example in my response to your earlier post, under some assumptions on the missing extrinsics. Note that my matrix conventions, and the conventions of the above wiki link, are different than the Computer Vision Toolbox's. I always work with upper triangular intrinsic matrices, whereas the toolbox seems to transpose everything and make it lower triangular.
0 个评论
更多回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 MATLAB Support Package for USB Webcams 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!