The algorithm applies the Expectation-Maximisation algorithm to estimate the location of vanishing points in an image, and assign each pixel to one of the vanishing points at the same time. The input images are assumed to satisfy the Manhattan world assumption.
- opencv
- numpy
- matplotlib
- scipy
- argparse
- RGB building images where the scenes fulfill the Manhattan assumption
- The camera intrinsic properties which include focal length, principle point and size of the sensor pixels
- Find the vanishing point (VP) locations in these input images
- Find the assignment of each pixel to the vanishing points
Below are some examples showing how to run the main.py
on sample images located in this repository.
$ python main.py --input-image ../images/building1.jpg --output-image ../output/building1.jpg --VP-image ../output/building1_VP.jpg