Patent ID: 7561744

Claim:
An image encoding apparatus for encoding image data, which is obtained by quantizing the number of gray levels per pixel of multi-valued image data into a smaller number of gray levels using a dither matrix, comprising: a first prediction unit, arranged to calculate a predicted value of a pixel of interest with reference to an already-encoded neighboring pixel at a distance less than a predetermined distance which is determined according to the size of the dither matrix; a second prediction unit, arranged to calculate, as a predicted value of the pixel of interest, a value of an already-encoded pixel which is separated an integer multiple of the predetermined distance from the pixel of interest; a correlation calculation unit, arranged to calculate a correlation value representing degree of correlation between a first pixel group consisting of a predetermined number of already-encoded pixels and a second pixel group consisting of a predetermined number of already-encoded pixels by comparing pixel values belonging to the first pixel group with pixel values belonging to the second pixel group, where the pixels belonging to the first pixel group are at distances less than the predetermined distance from the pixel of interest and the pixels belonging to the second pixel group are separated from the first pixel group by the predetermined distance along to a direction away from the pixel of interest, and in phase with the pixels belonging to the first pixel group; a selection unit, arranged to select the predicted value by said second prediction unit when the correlation value calculated by said correlation calculation unit is not less than a predetermined threshold value, and to select the predicted value by said first prediction unit when the correlation value is less than the predetermined threshold value; and an encoding unit, arranged to encode a value of the pixel of interest on the basis of the selected predicted value and the value of the pixel of interest.