% ShowEdges
% Illustrates the edge-finding function Edges

close all
imshow('Tower.jpg')
pause(2)
B = Edges('Tower.jpg');
for threshold = 10:10:100
    % B>threshold is a 0-1 matrix whose (i,j) entry is 1 if and only if
    % B(i,j) > threshold. 
    C = uint8( 255*(B>threshold) );
    % Display as white those pixels that are over the threshold...
    imshow(C)
    title(sprintf('Threshold = %2d',threshold),'Fontsize',14)
    pause(1)
end

imshow('Devin.jpg')
pause(1)
B = Edges('Devin.jpg');
for threshold = 10:10:100
    % B>threshold is a 0-1 matrix whose (i,j) entry is 1 if and only if
    % B(i,j) > threshold. 
    C = uint8( 255*(B>threshold) );
    % Display as white those pixels that are over the threshold...
    imshow(C)
    title(sprintf('Threshold = %2d',threshold),'Fontsize',14)
    pause(1)
end

imshow('LawSchool.jpg')
pause(1)
B = Edges('LawSchool.jpg');
for threshold = 10:10:100
    % B>threshold is a 0-1 matrix whose (i,j) entry is 1 if and only if
    % B(i,j) > threshold. 
    C = uint8( 255*(B>threshold) );
    % Display as white those pixels that are over the threshold...
    imshow(C)
    title(sprintf('Threshold = %2d',threshold),'Fontsize',14)
    pause(1)
end





