Boost logo

Boost :

Subject: Hysteresis step in Canny edge detection
From: Olzhas Zhumabek (anonymous.from.applecity_at_[hidden])
Date: 2019-03-12 20:04:26


Hi,

I'm trying to implement Canny edge detection for the coding competency test
of Boost GSOC. So far I managed to apply Gaussian Blur, apply Sobel filters
in both directions, and performing non-maximum suppression (it didn't
eliminate thick edges though). I'm unsure how to perform hysteresis.

My initial idea is as following:

1. Perform first pass and label definitely edge pixels and definitely not
edge pixels.
2. Imagine the picture is a graph, and only certainly edge and uncertainly
edge can be walked over through adjacent pixels.
3. Gather each pixels into corresponding connected components by performing
BFS over all non-visited pixels
4. For each connected component, try to find at least one definitely edge.
5. If outcome of 4 is true, set max intensity for all pixels in the
connected component, set zero otherwise.

Is there a better algorithm? I couldn't find any while searching the web,
and my knowledge of graph theory allowed me to come up only with the
algorithm above.

Sincerely,
Olzhas Zhumabek


Boost list run by Boost-Gil-Owners