【正文】
Compute average YES color around the pixel with a blocksize of 7x7Compute average colorYES between the pixel andthe block with the minimum contrastCompute average color contrast between the north block and the other three blocks plus the contrast with the pixelCompute average color contrast between the south block and the other three blocks plus the contrast with the pixelCompute average color contrast between the east block and the other three blocks plus the contrast with the pixelCompute average color contrast between the west block and the other three blocks plus the contrast with the pixelFind the color of the side with the lowest contrast measureReplace the pixel’s colorFig. 4. The flowchart of smoothing algorithm for pixel i, j and a block size of 3 3.In the first steps of the algorithm, the values of the h, s and i are puted for all eight 3 3 blocks around a pixel (Fig. 3). An object has the same hue throughout, regardless of variances in shades, highlights and shadows. On the other hand, hue is unstable at low saturations and intensities, therefore the hue should be normalized. The three values (hue, intensity and saturation) lead to the calculationG. Chrysos et al. / Microprocessors and Microsystems 36 (2012) 215–231219of the pixels that are object edges according to the algorithm presented in [23]. The flow diagram of the edge detection algorithm is shown in Fig. 5.. Color segmentation algorithmThe segmentation algorithm uses edge information and the information of the smoothed image to find segments. The steps involved in this segmentation procedure follow:1. Find big and crisp segments.2. Expand segments based on homogeneity criteria.3. Expand segments based on the dichromatic reflection model.4. Expand segments based on the degree of farness measure.5. Apply an iterative filter.The first step of the color segmentation algorithm is the process of finding big and crisp segments. Once edge detection has beenperformed on an image, crisp segments are surrounded by edge pixels or the image boundary. Crisp segments can be defined as a set of pixels pletely surrounded by edge pixels belonging to only one object.The next step of the segmentation algorithm is the expansion of the segments based on specific criteria of homogeny. The initial image is scanned and using the information that resulted from the edge detection the existing segments are expanded by adding pixels with high similarity to those of the existing segments.The third step of the color segmentation process is the segment expansion based on the dichromatic reflection model. Using the dichromatic reflection model, some adjacent pixels may be merged with the previously growing matte segments according to a fuzzy measure such as the customized distance between the merging pixel and a cluster plane in the color domain.To further expand segments, the ‘‘degree of farness’’ measure is used. An unassigned pixel can be close (not far) to a neighboring segment in two senses: close in the spatial domain (physicallyInitialImageFinalEdgeImageFind thresholded local maximums in the edge direction stored for each pixelMerge the four edge strength imagesFind almost local maximumsEvaluate four edge strength imagesCalculate the saturation, intensity and hue contrast for the 8 neighboring blocksFor each one of the4 edge directions calculate the average saturations, intensities and hue contastsFor each one of the4 edge directions calculateμs and μi using the low membership functionSeparateCalculate theblocksnormalizedby one pixelhue contrastCalculate the average of the normalized hue contrast and the four hue contrast for each edge directionCalculate the four edge candidacy measures and find the maximum onetl Max edgeYEScandidacy thNOYESNONextFinishedImage?PixelFig. 5. The flowchart of the edge detection algorithm.