Patent ID: 8229214

Claim:
An image processing apparatus comprising: an input unit configured to input image data; an attribute information generation unit configured to generate attribute information about each pixel of the image data input by the input unit; a division unit configured to divide the image data input by the input unit into a plurality of blocks of a predetermined size; a generation unit configured to generate a histogram of colors and the number of pixels of each color existing in a focused block divided by the division unit; a color replacement unit configured to execute color replacement processing on each area defined by the histogram generated by the generation unit; a calculation unit configured to calculate, according to a result of the color replacement processing by the color replacement unit, a chrominance difference between a focused pixel contacting a boundary between the focused block and an adjacent block, which exists at a location adjacent to the focused block within a focused area of the focused block, and an adjacent pixel contacting the boundary within an adjacent area of the adjacent block located adjacent to the focused area, the adjacent pixel being located adjacent to the focused pixel; a first determination unit configured to determine whether the chrominance difference calculated by the calculation unit falls within a predetermined range; a second determination unit configured to determine whether a ratio Y/X is equal to or less than a predetermined threshold value, where “X” denotes a number of combinations of the focused pixel and the adjacent pixel whose chrominance difference is determined by the first determination unit to fall within the predetermined range and “Y” denotes a number of combinations of the focused pixel and the adjacent pixel, to at least either one of which the attribute information is added; and an integration unit configured, if it is determined by the second determination unit that the ratio Y/X is equal to or less than the threshold value, to integrate the focused area and the adjacent area to generate continuous gradation in the focused area and the adjacent area based on a determination that gradation across the boundary exists.