Topic: Edge detection is an immensely useful sub-topic of image analysis. Its result is the outline of the pixels in an image that consist a distinct object/mass, or mathematically speaking, the points where the values of pixels change drastically. Some applications where edge detection is crucial for their implementation, are object recognition or tracking, medical image analysis, biometric security systems (fingerprint/face/iris recognition), and others.

Exercise: Create a Python script file and perform the following tasks:

  • Import OpenCV and numpy libraries.
  • Open a video file.
  • Implement a 2D Convolution method that keeps the dimensions of the input image.
  • Apply an edge detection kernel to the video and show the results alongside the original video.
  • Optional: Generate the edges of the video using the OpenCV method cv2.Canny which uses the Canny method, and compare its performance to the convolution method.

Instructions and Material for solution: Click Files to download the exercise material.

Expected results edge_canny & edge_conv.

Lecture for better understanding:http://icarus.csd.auth.gr/edge-detection-lecture/

This exercise was developed by A. Christidis.

————————————————————————————————————–

For the solutions to the exercises, please contact koroniioanna@csd.auth.gr