How to calculate camera projection matrix?
8 views (last 30 days)
Show older comments
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 Comments
Accepted Answer
Matt J
on 6 Apr 2018
Edited: Matt J
on 6 Apr 2018
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 Comments
More Answers (0)
See Also
Categories
Find more on MATLAB Support Package for USB Webcams in Help Center and File Exchange
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!