Jetson TK1 – OpenCV Canny Edge Detector Demo

Back in 1986, John F. Canny developed the Canny Edge detector. I talked about the creation of BitBlt 10 years previous to that, and the Canny Edge was another one of the image processing milestones which is still used today. Here’s the demo of the Canny Edge Detector in OpenCV:

You can read some more about the Canny Edge Detector here:

and here:

As you can tell, there’s quite a bit going on here. First a color source image is converted to grayscale. Then there’s an attempt to filter out noise using a Gaussian filter. Next, the intensity gradient of the image is calculated by applying a pair of convolutions masks, similar to the way a Sobel filter works.

Then the gradient strength and direction are calculated and a non-maximum suppression applied. The final step is to use two thresholds, an upper and lower, for hysteresis.

The reason I spelled this out is that there are a whole bunch of things going on here, and the Jetson GPU does it pretty close to real time! Back in the day let’s just say that the coffee was really good and one had plenty of time to read while waiting for an image to be processed.

The demo itself is a modified version of an example from Kyle McDonald’s openFrameworks add-on ofxCV package. ofxCV acts as a wrapper to interface with the NVIDIA accelerated OpenCV implementation on the Jetson TK1. OpenFrameworks has built in Gstreamer support which I used to grab the video from a Logitech c920 webcam.


  1. Really cool. I wanna do some template matching. Do you have any tutorials? Generally for OpenCV on Jetson platform will be good too!

Leave a Reply

Your email address will not be published.