The goal of segmentation is to simplify and change the representation of an image into something that is more meaningful and easier to analyze. Image segmentation is typically used to locate objects and boundaries in images. More precisely, image segmentation is the process of assigning a label to every pixel in an image such that pixels with the same label share certain visual characteristics. The result of image segmentation is a set of segments that collectively covers the entire image, or a set of contours extracted from the image. Each of the pixels in a region are similar with respect to some characteristics or computed properly, such as color, intensity or texture. Adjacent regions are significantly different with respect to same characteristics. The technique usually adopted for improving the quality of the images by segmenting the images into various regions. Many segmentation algorithms have been developed over the years. The proposed algorithm has been implemented on a set of different JPEG images. In the proposed algorithm, firstly an image is selected and then it is segmented and then the segmented image is compared with the original image.