Image Edge Detection

Download as pptx, pdf, or txt
Download as pptx, pdf, or txt
You are on page 1of 20

IMAGE EDGE DETECTION

DEPARTMENT OF ELECTRONICS AND COMMUNICATION ENGINEERING


CMR COLLEGE OF ENGINEERING AND TECHNOLOGY
Guided by
Dr.Vandana Khare
Submitted by
Batch number:A17
Vuriti Komalisri 16H51A04B4
Mahadev Sravani 16H51A0495
Musku Vidya 16H51A0438
N.Poorna Sai Pavan 16H51A04G4
CONTENT
• INTRODUCTION
• EDGE DETECTION TECHNIQUES
• GRADIENT OPERATORS
• SOBEL EDGE DETECTION
• STEPS IN EDGE DETECTION
• WORKING
• BLOCK DIAGRAM
• SIMULATION
• SOURCE CODE
• REFERENCES
• FUTURE SCOPE
INTRODUCTION
Edge detection is the processes to detect the sharp Changes in intensity value
(pixel value) of the image.
EDGE
• Abrupt change in the intensity of pixels.usually they occur on the boundary of pixels
• Generally edges are of three types:
• Horizontal Edges
• Vertical Edges
• Diagonal Edges
EDGE TYPES

• Step edges

• Ramp Edges

• Ridge Edges

• Roof edge
DIRECTIONS OF EDGE DETECTIONS
GRADIENT OPERATORS
• The gradient of the image I(x,y) at location (x,y), is the vector:

• The magnitude of the gradient:

• The direction of the gradient vector:


TYPES OF EDGE DETECTION TECHNIQUES
• Sobel Edge Detection
• Prewitt Edge Detection
• Canny Edge Detection
Sobel Edge Detection: The Sobel method of edge detection for image segmentation finds edges
using the Sobel approximation to the derivative. It precedes the edges at those points where the
gradient is highest. The Sobel technique performs a 2-D spatial gradient quantity on an image
and so highlights regions of high spatial frequency that correspond to edges.

Prewitt Edge Detection: Edges are calculated by using difference between corresponding pixel
intensities of an image. All the masks that are used for edge detection are also known as
derivative masks. Because as we have stated many times before in this series of tutorials that
image is also a signal so changes in a signal can only be calculated using differentiation.

Canny Edge Detection:Canny Edge Detection is used to detect the edges in an image. It
accepts a gray scale image as input and it uses a multistage algorithm. 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.
In this project we used sobel operator for finding the edges of an image.
It also works on the principle of above mask and calculates difference among
the pixel intensities of a particular edge. As the center row of mask is consist of
zeros so it does not include the original values of edge in the image but rather it
calculate the difference of above and below pixel intensities of the particular
edge. Thus increasing the sudden change of intensities and making the edge more
visible.

We used it as it suppresses more nice in an image. And it is used to find the


approximate absolute gradient magnitude at each point an input grayscale
image.
SOBEL OPERATOR GRADIENT MATRIX
CALCULATING THE GRADIENT
STEPS IN EDGE DETECTION
• Smoothing: Noise reduction
• Enhancement: edge sharpening
• Detection: discarding and identification
• Localization: determine the exact location of an edge .The edge thi nning and
linking are done in this step
WORKING
It simply works like as first order derivate and calculates the difference of pixel
intensities in a edge region.
• As the center column is of zero so it does not include the original values of an
image but rather it calculates the difference of right and left pixel values around
that edge. Also the center values of both the first and third column is 2 and -2
respectively.
• This give more weight age to the pixel values around the edge region. This
increase the edge intensity and it become enhanced comparatively to the original
image.
SAMPLE IMAGES

Sample image Vertical image Horizontal image


SIMULATION
EDGE DETECTION ON IMAGES
Source code
close all;
clc;
img=imread('a.jpg');
B=rgb2gray(img);
subplot(2,2,1)
imshow(B);
pause(2)
I=double(B);
for i=1:size(I,1)-2
for j=1:size(I,2)-2
%Sobel mask for x-direction:
mx=((2*I(i+2,j+1)+I(i+2,j)+I(i+2,j+2))(2*I(i,j+1)+I(i,j)+I(i,j+2)));
%Sobel mask for y-direction:
my=((2*I(i+1,j+2)+I(i,j+2)+I(i+2,j+2))-(2*I(i+1,j)+I(i,j)+I(i+2,j)));
B(i,j)=sqrt(mx.^2+my.^2);
end
end
subplot(2,2,2)
imshow(B); title('Sobel gradient');
pause(2)
%Define a threshold value
Thresh=100;B=max(B,Thresh);
B(B==round(Thresh))=0;
B=uint8(B);
subplot(2,2,3)
imshow(~B);
title('Edge detected Image');
REFERENCES
• A. Hast., "Simple filter design for first and second order derivatives by a double filtering
approach", Pattern Recognition Letters, Vol. 42, no.1 June, pp. 65–71. 2014.
• Dim, Jules R.; Takamura, Tamio (2013-12-11). "Alternative Approach for Satellite Cloud
Classification: Edge Gradient
• Rumbaugh, Scott E (2010). Digital image processing and analysis : human and computer
vision applications with CVIPtools (2nd ed.). Boca Raton, FL: CRC Press.
• D. Kroon, 2009, Short Paper University Twente, Numerical Optimization of Kernel Based
Image Derivatives .
• ^H.G. Barrow and J.M. Tenenbaum (1981) "Interpreting line drawings as three-
dimensional surfaces", Artificial Intelligence, vol 17, issues 1–3, pages 75–116.
FUTURE SCOPE

• Edge detection using morphological technique


• Segmentation using watershed transform and active contour
• Segmentation using active contour and modified watershed algorithm
• Modified PSO based graph cut algorithm for the selection of optimal
regularizing parameter in image segmentation

You might also like