This repo contains a from-scratch implementation of hough transform. (Implemented as part of the Computer Vision course 16720B at CMU)
If two edge points lay on the same line, their corresponding cosine curves will intersect each other on a specific
-
Run
detect_edges.py
for Edge detection with Non-Maximal Suppression(NMS) (NMS is done to get sharper edges) -
Run
detect_houghlines.py
for applying Hough transform with Non-Maximal Supression(to supress neighbouring hough lines) on the edge magnitude image to identify the hough lines -
Run
visualize_ls.py
to visualize intersection of hough lines and edges
Original image:
- Edge detection with NMS
- Detected Hough lines using Hough Transform
- Interesection of Hough lines with edges