1. A method of segmenting an image, comprising: determining a gradient of the image to form a gradient image; forming a first layer by obtaining a user-selected region of interest in the gradient image; forming a plurality of second layers immediately neighboring the first layer; forming a plurality of third layers immediately neighboring the plurality of second layers; merging the first layer with one of the plurality of second layers using a merging criteria to form a merged first layer; and performing a filling process starting from neighbors of the plurality of third layers.