canny

Canny Edge Detection in Python CuPy with Cuda C kernels

I first take the original image:

original

I then make it grayscale

gray

I then blur the image to reduce noise and make the edge detection clearer:

blur

I then get the x y and square root combined gradients:

gradient x gradient y combined gradient

I then do NMS on the image to thin down the edges:

nms

If I had had more time I would have then done double threshold and hysteresis to further reduce noise within the lines and to make them more complete paths and less disjointed.

This leaves me with this output currently:

final

CU messing about

As you can see in the repo there is also a cu file that does nearly the exact same thing with nearly the same CUDA kernels as well, however due to issues I was having memory allocation and it causing my laptop to crash.