Help with: Active Canny: Edge Detection and Recovery with Open Active Contour Models. Confused and stuck
This looks to be a promising article for the implementation of joining the broken edges of an image.
Active Canny: Edge Detection and Recovery with Open Active Contour Models
Major steps.
- Find Gradient Magnitude from Color or Grayscale image.
- Non Maxima Suppression of the gradient Magnitude.
- Similar to Canny Higher Threshold and Lower Threshold, Select pixels with higher threshold as seed pixels.
- From seed pixels, initiate snakelets in decreasing order of gradient magnitude.
- Two unidirectional snakelets are initiated from a seed and they grow in opposite directions.
- The initial snakelets grow to a specific initial length, e.g., 10 − 15. The GVF is computer over the nonmaximum suppressed gradient magnitude image with 3 − 5 initial iterations
- If a seed pixel is already covered by a previous snakelet, it is discarded. This way, we obtain a set of short snakelets over the strong gradients.
- The snakelets grow and split recursively until they reach an existing snakelet or they cannot grow anymore (gradient lower than TL)
- When a snakelet reaches maximum growing length, e.g., 40, it stops growing; a new short snakelet is initiated at the end of it to continue growing.
This is what the article says at the end. The growing force is proportional to the gradient magnitude at the end of the snakelet. This recursive growing of snakelets is analogous to the hysteresis thresholding and edge linking of Canny edge detection. However, a snakelet grows in one direction, while edge pixels are linked in all directions in Canny.
Steps 1,2,3 are done.
Step 4 is something that is very confusing how do I initiate snakelets in decreasing order of gradient magnitude?
Wonder why such a useful feature Active Contours was removed from OpenCV?
I had such hopes for OpenCV. When I check online for help, MatLab has active contours inbuilt in it. Hope one day this is powerful enough to replace MatLab.
An open source project like this depends on contributions. If you come up with a solution, so commit it through a PR!