I = imread('circuit.tif');
BW1 = edge(I,'sobel');
BW2 = edge(I,'canny');
imshow(BW1)
title('Edge detection with Sobel')
figure, imshow(BW2)
title('Edge detection with Canny')

disp('press a key to start edge detection demo')
pause
edgedemo