  This paper presents a method to differentiate the foreground objects from the
background of a color image. Firstly a color image of any size is input for
processing. The algorithm converts it to a grayscale image. Next we apply canny
edge detector to find the boundary of the foreground object. We concentrate to
find the maximum distance between each boundary pixel column wise and row wise
and we fill the region that is bound by the edges. Thus we are able to extract
the grayscale values of pixels that are in the bounded region and convert the
grayscale image back to original color image containing only the foreground
object.
