From the course: OpenCV for Python Developers

Unlock the full course today

Join today to access over 24,400 courses taught by industry experts.

Canny edge detection

Canny edge detection

- [Instructor] Often we need to pre-process images in order to improve our final result, and in the case of extracting contours from individual objects in an image, it is often handy to first detect and accentuate the edges within an image. Canny edges is one type of edge detection algorithm that works quite well to help create better separation of objects within the image. Generally speaking, edge detection algorithms look at the rate or speed at which color changes across an image. Canny edges is a specific form of that algorithm which creates a single pixel wide line at key high grading areas in the image. This can help us break up an object if there was an overlap in our segmentation process. Let's take a look at how we can use Canny edges. Imagine the goal here is to try and segment out each individual tomato. If we're running a threshold, we may run into an issue where the different tomatoes get blobbed together…

Contents