/EM-vanishing-point

Re-implementation of the Expectation-Maximisation algorithm in locating vanishing points by Schindler & Dellaert (2004) in https://www.researchgate.net/publication/4082226_Atlanta_world_an_expectation_maximization_framework_for_simultaneous_low-level_edge_grouping_and_camera_calibration_in_complex_man-made_environments

Primary LanguagePython

Vanishing Point(VP) Locations via Expectation-Maximisation Algorithm

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.

Requirements

  • opencv
  • numpy
  • matplotlib
  • scipy
  • argparse

Data detail

  • 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

Objective

  • Find the vanishing point (VP) locations in these input images
  • Find the assignment of each pixel to the vanishing points

Implementation detail

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 Input screenshot VP screenshot Assignment screenshot