Edg Detection
Edg Detection
Day-4
Today Agenda:
• What is edge detection?
• Why edge detection?
• Sobel edge detection.
• Canny edge detection.
What is edge detection:
Edges
output
localization
• Image smoothening:
• Remove noise from the image
• Remove and suppress the noise of image with out altered Quality of the
image
Edges detection;
• Edges are detected through identifying the sudden changes in the
intensity, even noise is all about sudden changes in the intensity.
• Retain the edges of image object.
Edges localization:
• Edge localization is the processes like thinning linking etc, are to
carried out to locate the edges appropriately
Types:
• Sobel edge detector
• Canny edge detector
Sobel edge detector.
• What is sobel edge detector
• The image is processed in the X and Y direction respectively.
• This would result in the formation of new image, which actually is the sum of
the X and Y edges of the images.
• This approach work through calculation of Gradiant of the image intensity at
every pixel with in the image
calc
• Sobel filter has two kernel (3x3 matrix)
• One of them corresponds the x horizontal and other shall be used for
the y vertical
• These two kernel shall be convoluted with original image under the
process through which the edges points are calculated with ease.
• Kernal values shown below, that are fixed for Sobel filter and cannot
altered
• The Gaussian filter play a vital role in the entire process
Steps:
• Sobel Algorithm
• The Sobel algorithm can be summarized in four steps:
• Converting the image into grayscale
• Convolving the gray image with Sobel-x filter
• Convolving the gray image with Sobel-y filter
• Calculating the gradient magnitude and direction
Sobel x
Sobel y
Gradiant calculation
X derivate convolved with image
Function:
Sobelx= Cv2.Sobel(img,cv2.CV_64F,1,0,ksize=5)
Laplacian=cv2.laplacian(img,cv2_64F)
Canny Edge Detector:
• Canny edge detection is a technique to extract useful structural
information from different vision objects and dramatically reduce
the amount of data to be processed. It has been widely applied in
various computer vision systems.
Canny algorithm:
• Input image -> Gray Scale Image
• Noise reduction.
• Operate with Gaussian Blur- its help to remove the noise of the input image for the further processing to
be smooth
• Intensity Gradiant Calculation
• Operate on it sobel filter to be used in this process
• Calculate sudden intensity change with help of sobel operator
• G=
• Non-maximum Suppression
• Gradiant Magnitude operators –obtain thick edges
• This process going to getting a right edges from the available image
• Treshholding
• Edge Tracking
Function
• Cv2.Canny(blur,100,200)
MY TIME
THANK YOU