3D construction of an object from a single 3-point perspective image. The homography and the projection matrices are calculated and are used to apply affine transformations to the image to obtain texture maps.
The algorithm is based on the paper Single View Metrology.
This project was done for the course CSE-544: Computer Vision offered by IIIT-D under the guidance of Dr. Saket Anand.
- Python 3
- OpenCV
- Numpy
- Pandas
- Scipy
- Clone the repository
- Make sure that you have downloaded the view3dscene software and have included it in your systems path.
- Run the following command in the parent directory:
./run.sh
- give the image path as input to the command. Example:
input_imgs/image1.jpg
- Select 7 corners from the input image while running the find_corners.py file.
- Then, select top left and bottom right corner of the object in order to crop the image while running the svm.py file.
- The output will be displayed in the view3dscene software.