Dip - 06 Edge
Dip - 06 Edge
August 2023
Edge Detection
Extracting The Edges From An Image
Objective
What is edge detection and how it can be helpful in image classification.
Learn how kernels are used to identify the edges in a given image.
https://www.analyticsvidhya.com/blog/2021/03/edge-detection-extracting-the-edges-from-an-image/
Non-geometric events
specularity (direct reflection of light, such as a mirror)
shadows (from other objects or from the same object)
inter-reflections
there is a
significant
difference
between the pixel
values around the
edge
Based on this fact we can identify which pixels represent the edge or which
pixel lie on the edge.
https://theailearner.com/tag/prewitt-
operator/
https://docs.opencv.org/3.4/d2/d2c/tutorial_sobel_derivatives.html
1 0 1
1 0 1
1 0 1
Original
1024x710 1 1 1
0 0 0
1 1 1
Digital Image Processing: Bernd Girod, © 2013 Stanford
University -- Edge Detection 27
Digital Image Processing: Bernd Girod, © 2013 Stanford University -- Edge Detection 28
Digital Image Processing: Bernd Girod, © 2013 Stanford University -- Edge Detection 29
Noise Reduction
Edge detection is susceptible to noise in the image, first step is to remove the noise in
the image with a Gaussian filter
https://docs.opencv.org/4.x/da/d22/tutorial_py_canny.html
https://docs.opencv.org/4.x/da/d22/tutorial_py_canny.html
https://docs.opencv.org/3.4/de/da9/tutorial_template_matching.html
https://docs.opencv.org/3.4/d4/dc6/tutorial_py_template_matching.html
https://docs.opencv.org/4.x/dd/ded/group__ml.html
https://docs.opencv.org/4.x/d8/d4b/tutorial_py_knn_opencv.html