3D surface reconstruction from 2D image recorded through a prism
Show older comments
Hi all,
I am currently working on a project that involves the reconstruction of a 3D surface from a 2D image. The 2D image is recorded through a prism, generating 2 views from different perspectives. So what I want to know are the 3D-positions of the black markers in the image below:
For calibration an object of known dimensions was recorded with the same camera setup (see below). So I think technically there should be a way to use the known 2D positions from the calibration image together with its also known 3d positions and the 2D positions of the markers in the first image to get the 3D positions of the markers in the first image.

I have already tried using the triangluate function together with the estimateCameraParameters function, but that doesn't work because the calibration image is expected to be taken from several different angles (and it also seems to be a slightly different use case). Since I am new to 3D reconstruction I would appriciate any help with this.
What I need are the 3D positions of the black markers on their surface in the upper picture. I.e. I need some way to get the transformation function T out of the bottom and upper points of the bottom picture like this:
T(calib2D_bottom, calib2D_top) = calib3D | T=?
To then apply it to the upper image to get the 3D positions of the actual points on the actual surface
T(points2D_bottom, points2D_top) = points3D | points3D=?
I also added this in the post
Thank you,
Patrick
Accepted Answer
More Answers (1)
Try something like this:
% [xw3,yw3,zw3] - 3D positions of white markers
% [xw2, yw2] - 2D positions of white markers
% [xb2, yb2] - 2D posittions of black markers
xb3 = griddata(xw2,yw2,xw3,xb2,yb2);
yb3 = griddata(xw2,yw2,yw3,xb2,yb2);
zb3 = griddata(xw2,yw2,zw3,xb2,yb2);
Let me know if it works
1 Comment
Patrick Schlegel
on 5 Aug 2021
Categories
Find more on Smoothing in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!



