Images play an important role in the visual perception and vision is the most powerful sense among all the senses of human. Digital image processing is an important and crucial concept in computer vision for the purpose of effective image display and extraction of desired features as well as for editing and manipulating images. Edge detection is an authoritative concept in the digital image processing and is the initial step for image segmentation. Edges are detected for the purpose of creating a boundary or contour between an object and the background surface or different parts of a particular image. Detection of the edges include a number of different mathematical techniques that are used with the motive of identifying sharp discontinuities in a digital image. Edge detection is the fundamental concept used in image processing, machine and computer vision, image segmentation, and face recognition. In this paper, we are going to present an edge detection algorithm based on the average filtering of an image followed by thresholding and at last masking.