Finally I could spend some time to renew the methods I developed for vanishing point detection during my PhD. Now I have written it in C++ and using OpenCV 2.3 capabilities.
The result is a class called MSAC (M-estimator SAmpling and Consensus), which is able to detect multiple finite and infinite vanishing points given an input set of line segments, that can be computed using the PPHT of OpenCV 2.3.
I have created a full sample which is called vanishingPoint that can read images or video sequences, call the MSAC class, and visualise the result.
Follow the link to the source code host, examples of use and some instructions.
Hope you find it useful! In case so, you might think of referencing my paper about the topic, or my PhD.
- M. Nieto and L. Salgado, “Real-time robust estimation of vanishing points through nonlinear optimization,” in IS&T/SPIE Int. Conf. on Real-Time Image and Video Processing, SPIE vol. 7724, 772402, 2010. (DOI 10.1117/12.854592)
- M. Nieto, “Detection and tracking of vanishing points in dynamic environments,” PhD Thesis, Universidad Politécnica de Madrid, 2010.