Method for selecting colors
AssigneeInternational Business Machines Corporation
InventorGordon W. Braudaway
Life of this patent
Estimating the term…
Abstract
A method for selecting a limited number of presentation colors from a larger palette for a selected image. A three dimensional color histogram of said image is generated and a first color is selected based upon the color occurring most frequently in the image. Subsequent presentation colors are selected by choosing one at a time those colors having the highest weighted frequency of occurrence wherein the weighting is such that colors closest to the previously selected color are weighted very little while colors furthest away from the previously selected color are weighted the most.
Claims12
A method for displaying a color image having a plurality of color-image colors, each of the color-image colors in the image being representable as a combination of component colors, the displayed color image being represented by a plurality of presentation colors selected from a plurality of palette colors, n designating the number of presentation colors and m designating the number of palette colors, n being less than m, the method comprising the steps of:
- (a) separating the color image into component colors on a pel-by-pel basis, the color-image color of each pel being separated into component-color-intensity data representing the intensities of the component colors, the combination of such component-color-intensity data representing a palette color;
- (b) generating a color histogram of the separated color image, the color histogram being associated with a color cube, each axis of the color cube representing a component color, each point in the color cube defining a color as a combination of component colors corresponding to the projection of the point on the axes of the cube, the color cube including points defining palette-color points representing the m palette-colors, the color histogram comprising a plurality of occurrence numbers, each occurrence number being associated with a palette-color point in the color cube and initially representing a number of occurrences among the pels of the separated color image of the palette color defined by the point in the color cube;
- (c) selecting a presentation color from a combination of component colors having a greatest occurrence number in the color histogram to define a current-iteration selected presentation color;
- (d) weighting the occurrence numbers in said histogram corresponding to palette-color points within the color cube relative to a current-iteration-selected presentation-color point corresponding to the current-iteration selected presentation color of step (c) according to the respective distances of the palette-color points from the current-iteration-selected presentation-color point, occurrence numbers corresponding to palette-color points further away from the current-iteration-selected presentation-color point being weighted more than occurrence numbers corresponding to palette-color points closer to the current-iteration-selected presentation-color point;
- and
- (e) iteratively repeating the selecting step (c) and the weighting step (d) until all of the occurrence numbers are substantially equal to zero or n presentation colors have been selected.
Dependencies are inferred from the claim text.