This MATLAB project, developed by Curtis Helsel in November 2022, allows for the computation of 3D affine measurements from a single perspective image. The key feature is the utilization of vanishing lines in a scene's reference plane to facilitate measurements, enabling users to determine distances between parallel planes and identify camera positions.
To run the project, follow these steps:
- Open MATLAB.
- In the command window, type
svm
to execute the code. - Draw lines on the image as instructed to find vanishing points.
In projective space, parallel lines intersect at infinity, represented by vanishing points. The project code guides users to draw lines for calculating these vanishing points.
Measurements within the same plane are achieved using cross-ratios and reference lengths, providing a practical tool for obtaining accurate measurements.
The project extends measurements to different planes, utilizing projection matrices and homography equations.
The projection camera matrix is used to determine the camera center position, considering Cramer’s rule and matrix null space.
Sample measurements and visual representations are provided, demonstrating the accuracy of the computations.
Future iterations may explore advanced techniques such as texture mapping and neural networks for scene reconstruction.
- Antonio Criminisi, Ian Reid, and Andrew Zisserman. “Single view metrology”. In: International Journal of Computer Vision 40.2 (2000), pp. 123–148.
- Richard Hartley and Andrew Zisserman. “Projective Geometry and Transformations of 2D”. In: Multiple view geometry in Computer Vision. 2nd. Cambridge University Press, 2019, pp. 87–131.