MATLAB program for detection of edges in image is written. The algorithm is to enhance the edge when the difference in gray level of consecutive pixels goes beyond predefined limit.