
Appendices 341
plotedit on, title (ÔMagnitude of eye edges by Prewitt operatorÕ),
plotedit off
subplot(1,2,2), imagesc(roberts_edges);
plotedit on, title (ÔEye edges by Roberts cross operatorÕ), plotedit
off
disp (ÔWe can see that the effect of smoothing is to reduce noise inÕ)
disp (Ôthe edge detection processÕ)
pause;
disp (ÔThe direction is how the edge is changing, but this is much
lessÕ)
disp (Ôeasy to see in the displayed image.Õ)
direction=prewitt_edges(:,:,2);
imagesc(direction);
plotedit on, title (ÔDirection of eye edges by Prewitt operatorÕ),
plotedit off
pause;
Function edges=prewitt(image)
%derive edges by 3*3 Prewitt operator
%
%Usage: [new image]=prewitt(image) ...