TITLE: 3D RECONSTRUCTION USING SINGLE VIEW METROLOGY
This repository contains code and the steps to follow for 3D Reconstruction using Single View Metrology
Steps followed to complete the project:
- In the 1st step of the project, we took an image of a 3D box by following the 3 point perspective imaging methodology.
-
After that we used a simple annotation online tool (LABEL ME) to annotate the image. You can use any annotation portal to annotate the image. I used the tool LABELME
-
The input to the below code(SVM_Code.py) is taken from the input file (input.txt) which is show below and also attached in the zipped folder.
-
We then wrote the code to calculate the vanishing points, the scaling factors to generate the homography matrices and to apply the homography matrices to transform the planes. The complete code(SVM_Code.py) is given below and also attached in the zipped folder.
-
After getting the homography matrices from the above code,we apply the homography matrices to each of the planes of the image to generate the texture maps for each of the planes(XY,YZ,ZX).
PLANE XY:
PLANE XY:
PLANE XY: -
After extracting and cropping the feature maps,we generate the 3D model of the image using VRML. The VRML code(3DModelling_Code.wrl) is as given below and also attached in the zipped folder.
-
The .wrl file generated from the above image is opened in view3Dscene to get the 3D image as shown below.
REFERENCES PAPER WHICH MOTIVATED THE PROJECT