Skip to content

shrikiran1999/hough-transform

Repository files navigation

Hough Transform for Edge Detection

GIF source: 16720B course materials, Prof. Kris Kitani (CMU)


This repo contains a from-scratch implementation of hough transform. (Implemented as part of the Computer Vision course 16720B at CMU)

Concept:

If two edge points lay on the same line, their corresponding cosine curves will intersect each other on a specific $(ρ, θ)$ pair. Thus, the Hough Transform algorithm detects lines by finding the $(ρ, θ)$ pairs that have a number of intersections larger than a certain threshold.

Repo structure:

  1. Run detect_edges.py for Edge detection with Non-Maximal Suppression(NMS) (NMS is done to get sharper edges)

  2. 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

  3. Run visualize_ls.py to visualize intersection of hough lines and edges

Sample output:

          Original image:

          img01

  1. Edge detection with NMS

img01

  1. Detected Hough lines using Hough Transform

img01

  1. Interesection of Hough lines with edges

img01

Few more final results:

img01

img01

img01

img01

img01

img01

img01

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published