Canny edge detector

Just posting if anyone is interested this is a canny edge detector. Please note it is not fast will take a few seconds for large images. I will try and implement it using different data structure and then using shaders to see what speed improvements I can make, however this was a proof of concept as I could not understand the traditional canny algorithm or how to implement it even after lengthy reading.

Here are some example pictures

without preprocessing

image ;

image

image

image

with preprocessing

still a few improvements such as trimming short lines and adding vertex calculations

6 Likes

Great work. Could you place a link to the original colored photo? (S10.jpg)

scroll down just a touch

1 Like

improved high contrast detection, but now its broken with low contrast
new result

will update github once fixed

Ok finished, code has been significantly trimmed. and now comes with 4 different modes.

mode 4

mode 3

mode 2

mode 1

mode 0

with regular images.

reference
b3
sobel

![b3|640x480]

mode 0

image

mode 1

image

mode 2

image

mode 3

image

mode 4

image

github will be updated later.

1 Like