How to run:
pip3 install -r requirements.txt
python3 main.py IMAGE_PATH
It is a directional change in the intensity or color in an image. In the edge detection context, borders show a sudden change in these attributes between close pixels. Intuition: imagine the image as a heightmap, gradients then map directly to the idea of derivatives as the inclination of a 2d function
- Grayscale
- Canny - in the output every edge has a 1 pixel thickness
- Gaussian blur
- Reduces noise
- Compute gradients magnitude and direction using sobel
- Two Sobel filters compute change in the x and y directions
- Combined we can get the actual direction of change (gradient direction and magnitude)
- Non-maximum suppresion
- Double thresholding and edge tracking
- Gaussian blur
- Hough
- Get hough line intersection points
- Cluster intersection points to get the dominant vanishing points
- Find 3 orthogonal vanishing points
- Calculate omega (absolute conic)
- Calculate K