MATLAB Answers

0

how to produce edge detected image

Asked by nita ahmeti on 22 Apr 2013
Latest activity Answered by Mohamed Osman on 21 Jan 2017
using the Laplacian of the Gaussian or Sobel filters, of user-specified size and parameters where applicable. how to apply filters of varying size

  0 Comments

Sign in to comment.

2 Answers

Answer by Chandra Shekhar on 22 Apr 2013
Edited by Chandra Shekhar on 22 Apr 2013
 Accepted Answer

I = imread('circuit.tif');
BW1 = edge(I,'prewitt');
BW2 = edge(I,'canny');
BW3 = edge(I,'sobel');
figure, imshow(BW1)
figure, imshow(BW2)
figure, imshow(BW3)
Or you can choose manual threshold like,
BW1 = edge(I,'prewitt',0.4);
BW2 = edge(I,'canny',0.4);
BW3 = edge(I,'sobel',0.4);
figure, imshow(BW1)
figure, imshow(BW2)
figure, imshow(BW3)

  0 Comments

Sign in to comment.


Answer by Mohamed Osman on 21 Jan 2017

I = imread('circuit.tif'); imshow(I) BW1 = edge(I,'Canny'); BW2 = edge(I,'Prewitt'); imshowpair(BW1,BW2,'montage') I = gpuArray(imread('circuit.tif')); BW = edge(I,'prewitt'); figure, imshow(BW)

  0 Comments

Sign in to comment.