摘要 |
PROBLEM TO BE SOLVED: To reduce calculation cost in quantization.SOLUTION: An image processing apparatus which generates a quantization table for quantizing image data includes: histogram generation means which generates histogram data indicating a relation between a grayscale value of a pixel in image data and frequency of the pixel with the grayscale value; threshold table input means which acquires or generates a threshold table where the number of pixels to be allocated is set for each quantization value as a threshold when a quantization value is allocated to the pixel in the image data; and quantization table generation means which allocates quantization values of the number corresponding to the number of pixels counted for each grayscale value, sequentially from the lower or higher grayscale value indicated by the histogram data obtained from the histogram generation means, and allocates the next quantization value, instead of the above quantization value, to all the grayscale values when the allocated quantization value reaches the above threshold, to generate a quantization table for quantizing the image data.SELECTED DRAWING: Figure 2 |