How can I convert perspective view to orthographic view in matlab?

211 Views Asked by At

I am trying to obtain the orthographic projection from a 2D image with a perspective view. I think it is possible but am unsure exactly how I should go about it. My apologies for the somewhat vague problem. I am curious to what the theoretical approach is as well what constraints/variables/assumptions are required to make this possible. What are the appropriate steps for processing the image?

I've tried the following by selecting the four corners of the face of the cube that is parallel to the plane that I would like to capture. But, it doesn't look quite right.


figure; imshow(original_img)
tform = fitgeotrans([115 1561; 115 1378; 574 1414; 568 1600], ...
    [0 0; 0 -200; 300 -200; 300 0],'projective');
corrected_img = imwarp(original_img,tform); 

figure; imshow(corrected_img)

https://i.stack.imgur.com/saErR.jpg - image

https://i.stack.imgur.com/qH0CO.jpg - desired end-goal

0

There are 0 best solutions below