Perspective Lines

As an artist, being able to understand how rules of perspectival space are applied to real world spaces is useful for me to train my own perspective skills. Written using skills learned in my Digital Image Processing class, this is a prototype for a Matlab script that passes in an image of an urban scene and detects the vanishing points and horizon line of the image.

Objective

The most common perspectival images artists will render are 1-point perspective and 2-point perspective images, describing the respective number of horizontal vanishing points present in the image. As such, the tool is designed to detect vertical and horizontal perspective lines in an input image using a Hough Transform. The detected horizon lines are then projected onto a Gaussian sphere as proposed by S. Barnard and a primary horizontal vanishing point is determined based on where the lines intersect. Then, a horizon line is extracted from a vertical vanishing point calculated from the vertical perspective lines detected. This horizon line is used to then detect if there is a second prominent horizontal vanishing point in the image.

Spring 2020

CODE DESIGN:

Github

© 2020 all rights reserved Mohar Kalra.