Upload an image of your choice into Matlab and apply several different edge detectors to locate object(s) of interest. Think carefully about the type of image which may respond well. Investigate the effect of varying edge filter parameters. Write a short report (~300 words) which includes the original image, the filtered images and describes the parameters used. Explain the choice of input image and how the edge detectors perform differently. Which is the best choice for your image and why
close all,
clear all,
clc,
ProjectPath = pwd;
ImagePath = strcat(ProjectPath,'\Leena.jpg');
Orig = imread(ImagePath);
Gray = rgb2gray(Orig);
subplot(2,4,1); imshow(Gray); title('Original Image');
BW = edge(Gray,'sobel');subplot(2,4,2); imshow(BW); title('Edge Detection using SOBEL');
BW = edge(Gray,'prewitt');subplot(2,4,3); imshow(BW); title('Edge Detection using PREITT');
BW = edge(Gray,'roberts');subplot(2,4,4); imshow(BW); title('Edge Detection using ROBERTS');
BW = edge(Gray,'log');subplot(2,4,5); imshow(BW); title('Edge Detection using LOG');
BW = edge(Gray,'zerocross');subplot(2,4,6); imshow(BW); title('Edge Detection using ZERO CROSS');
BW = edge(Gray,'canny');subplot(2,4,7); imshow(BW); title('Edge Detection using CANNY');
The Sobel method extracts edges using the Sobel kernel. Edges points are those points where the gradient of image intensity is maximum.In Prewitt method, edges are extracted using the Prewitt approximation of derivative. Edges are returned at those points where the gradient of image is maximum. In Roberts method edges are extracted using Roberts kernel and edges are those points where the gradient of image is maximum.The Laplacian of Gaussian method extracts edges by inspecting zero crossings once the image is filtered using Laplacian of Gaussian filter.
The Canny kernel extracts edges by extracting local maxima of the gradient of Image. The gradient is equal to the derivative of a Gaussian filter. tWo thresholds are used to detect strong and weak edges.
Upload an image of your choice into Matlab and apply several different edge detectors to locate object(s) of interest. Think carefully about the type of image which may respond well. Investigate the e...