>V< is a Matlab implementation of the algorithm described in:

Gilles Simon, Antoine Fond and Marie-Odile Berger. A Contrario Horizon-First Vanishing Point Detection Using Second-Order Grouping Laws. ECCV’2018, September 2018, Munich, Germany.

>V< allows detecting the zenith (vertical vanishing point) and all horizontal vanishing points (VPs) in uncalibrated images of man made environments (urban, indoor, industrial, …). For instance, in the image below, the zenith and three horizontal VPs (represented by line segments contributing to the VPs) were detected:


In addition, >V< allows you to automatically associate a Manhattan frame to the scene, that is three particular VPs whose directions are pairwise orthogonal and aligned with some « box » structures of the scene, e.g. the buildings (red, green, blue axes below).

This allows getting e.g. the camera focal length and/or the orientation of the camera with regard to these structures. It can also help reconstructing the scene from image analysis.

Finally, we added some code to warp (rectify) an image so that all the vertical planes present in this image appear as in a frontal view. For instance, with the image at top of this page, we get three rectified images corresponding to the three horizontal VPs:

In case the Manhattan frame is found, the proportions between the height and the width of the rectified structures (building, windows, …) should be the same as in the physical world. In case these VPs are not found, the proportions will probably be incorrect, but the images can still be rectified as in the following examples:

 →  +


Method’s main ideas

In most urban, indoor or industrial scenes, man-made structures are often placed at eye level, facilitating the detection of the horizon line by statistical analysis. More specifically, >V< is based on the a-contrario framework, a mathematical translation of the Gestalt psychology. This framework does not require annotating thousands of images as when using a deep learning method. It follows that our method is not scene-specific and can treat any kind of man-made environment, such as industrial ones:


Moreover, by fractioning the 2-D search of meaningful VPs into three 1-D searches of meaningful events (zenith line, horizon line and VPs), we avoid computationally expensive processes encountered using some previous a-contrario approaches.

In 2018, our algorithm reaches top performance in accuracy of the horizon line, on both York Urban and Eurasian Cities datasets. >V< also obtains less missed detections and spurious VPs than with the previous state-of-the-art methods, as we show in our paper.