摘要 |
PROBLEM TO BE SOLVED: To solve the problem of needing a memory which has a very large amount of capacity to calculate a histogram in order to calculate the histogram with all colors as an object.SOLUTION: An image encoding device includes an acquisition part for acquiring a pixel block of a predetermined size from image data of an encoding object, a comparison part for calculating a distance between each of predetermined representative colors and the color of an object pixel in the pixel block to acquire a representative color in which the distance is the minimum distance, a determination part for allocating an index corresponding to the representative color of the minimum distance to the object pixel in the case that the minimum distance is smaller than a first threshold, and adding a pixel value of the object pixel as a new representative color and allocating the index corresponding to the new representative color to the object pixel in the case that the minimum distance is larger than the first threshold, and an encoding part for encoding the representative color and the index allocated to the object pixel. |