Generating and using a color palette
First Claim
1. A method for generating a color palette having m colors from a color image described in a color space, comprising:
- obtaining pixel image data corresponding to the color image;
determining a frequency of occurrence for each color in the pixel image data;
assigning each color in the pixel image data to one of a predetermined number of cells into which the color space has been partitioned, the predetermined number being not greater than m;
a first selecting step of selecting the most commonly occurring color in each cell in which a color exists, so as to obtain n palette colors;
calculating a vote value for each unselected color, the vote value being based at least in part on a product of the frequency of occurrence of the color in the pixel image times a weighting factor, the weighting factor based on a rank of the color in its corresponding cell, the unselected colors being the colors not selected in the first selecting step; and
a second selecting step of selecting m-n colors as the unselected colors with the highest vote values.
1 Assignment
0 Petitions
Accused Products
Abstract
To generate a color palette having m colors (such as 28=256 colors) from a color image described in a color space, pixel image data corresponding to the color image is first obtained. A frequency of occurrence for each color in the pixel image data is then determined. Each color in the pixel image data is assigned to one of a predetermined number of cells into which the color space has been partitioned, the predetermined number being not greater than m. The most commonly occurring color is selected in each cell in which a color exists, so as to obtain n palette colors. A vote value is calculated for each unselected color, the vote value being based at least in part on the frequency of occurrence of the color in the pixel image and a weighting factor based on a rank of the color in its corresponding cell, the unselected colors being the colors not selected in the first selecting step. Thereafter, m-n colors are selected as the unselected colors with the highest vote values. Also, input colors in a color image described in a color space are mapped to a reduced palette of m colors derived by partitioning the color space into a predetermined number of cells, there being at least one palette color in each cell that includes an input color. The mapping is performed by determining in which cell each input color lies, and mapping each input color to the closest palette color from among all palette colors in the cell identified for that input color.
63 Citations
52 Claims
-
1. A method for generating a color palette having m colors from a color image described in a color space, comprising:
-
obtaining pixel image data corresponding to the color image;
determining a frequency of occurrence for each color in the pixel image data;
assigning each color in the pixel image data to one of a predetermined number of cells into which the color space has been partitioned, the predetermined number being not greater than m;
a first selecting step of selecting the most commonly occurring color in each cell in which a color exists, so as to obtain n palette colors;
calculating a vote value for each unselected color, the vote value being based at least in part on a product of the frequency of occurrence of the color in the pixel image times a weighting factor, the weighting factor based on a rank of the color in its corresponding cell, the unselected colors being the colors not selected in the first selecting step; and
a second selecting step of selecting m-n colors as the unselected colors with the highest vote values. - View Dependent Claims (2, 3, 4, 5, 6, 7, 8)
-
-
9. A method for generating a color palette having m colors from a color image comprising plural pixels, each pixel described in a color space, comprising:
-
quantizing the color of each pixel in the color image by zeroing least significant bits of each color component for the pixel;
counting the frequency of occurrence of each quantized color;
assigning each quantized color in the color image to one of a predetermined number of cells into which the color space has been partitioned, the predetermined number being not greater than m;
a first selecting step of selecting the most commonly occurring quantized color in each cell in which a quantized color exists, based on the count, so as to obtain n palette colors;
ranking the unselected colors in each cell based on their relative frequencies of occurrence, with higher ranking colors occurring more frequently than lower ranking colors in the same cell, the unselected colors being the quantized colors not selected in the first selecting step;
calculating a weighting factor for each unselected color, the weighting factor being based on the rank of the unselected color, with higher ranking colors receiving a greater weighting factor than lower ranking colors;
assigning a vote value to each unselected color, the vote value being based at least in part on a product of the frequency of occurrence of the quantized color times the assigned weighting factor for the quantized color; and
a second selecting step of selecting m-n palette colors as the unselected colors with the highest vote values. - View Dependent Claims (10, 11, 12, 13, 14)
-
-
15. Computer-executable process steps stored on a computer readable medium to generate a color palette having m colors from a color image described in a color space, comprising:
-
an obtaining step to obtain pixel image data corresponding to the color image;
a determining step to determine a frequency of occurrence for each color in the pixel image data;
an assigning step to assign each color in the pixel image data to one of a predetermined number of cells into which the color space has been partitioned, the predetermined number being not greater than m;
a first selecting step to select the most commonly occurring color in each cell in which a color exists, so as to obtain n palette colors;
a calculating step to calculate a vote value for each unselected color, the vote value being based at least in part on a product of the frequency of occurrence of the color in the pixel image times a weighting factor, the weighting factor based on a rank of the color in its corresponding cell, the unselected colors being the colors not selected in the first selecting step; and
a second selecting step to select m-n colors as the unselected colors with the highest vote values. - View Dependent Claims (16, 17, 18, 19, 20, 21, 22)
-
-
23. Computer-executable process steps stored on a computer readable medium to generate a color palette having m colors from a color image comprising plural pixels, each pixel described in a color space, comprising:
-
a quantizing step to quantize the color of each pixel in the color image by zeroing least significant bits of each color component for the pixel;
a counting step to count the frequency of occurrence of each quantized color;
a cell assigning step to assign each quantized color in the color image to one of a predetermined number of cells into which the color space has been partitioned, the predetermined number being not greater than m;
a first selecting step to select the most commonly occurring quantized color in each cell in which a quantized color exists, based on the count, so as to obtain n palette colors;
a ranking step to rank the unselected colors in each cell based on their relative frequencies of occurrence, with higher ranking colors occurring more frequently than lower ranking colors in the same cell, the unselected colors being the quantized colors not selected in the first selecting step;
a calculating step to calculate a weighting factor for each unselected color, the weighting factor being based on the rank of the unselected color, with higher ranking colors receiving a greater weighting factor than lower ranking colors;
a vote value assigning step to assign a vote value to each unselected color, the vote value being based at least in part on a product of the frequency of occurrence of the quantized color times the assigned weighting factor for the quantized color; and
a second selecting step to select m-n palette colors as the unselected colors with the highest vote values. - View Dependent Claims (24, 25, 26, 27, 28)
-
-
29. An apparatus for generating a color palette having m colors from a color image described in a color space, comprising:
-
input means for inputting pixel image data corresponding to the color image;
a memory for storing the pixel image data and executable process steps; and
a processor for executing the process steps stored in said memory so as to (1) determine a frequency of occurrence for each color in the pixel image data, (2) assign each color in the pixel image data to one of a predetermined number of cells into which the color space has been partitioned, the predetermined number being not greater than m, (3) select the most commonly occurring color in each cell in which a color exists, so as to obtain n palette colors, (4) calculate a vote value for each unselected color, the vote value being based at least in part on a product of the frequency of occurrence of the color in the pixel image times a weighting factor based on a rank of the color in its corresponding cell, the unselected colors being the colors not selected in the first selecting step, and (5) select m-n colors as the unselected colors with the highest vote values. - View Dependent Claims (30, 31, 32, 33, 34, 35, 36)
-
-
37. An apparatus for generating a color palette having m colors from a color image comprising plural pixels, each pixel described in a color space, comprising:
-
input means for inputting pixel image data corresponding to the color image;
a memory for storing the pixel image data and executable process steps; and
a processor for executing the process steps stored in said memory so as to (1) quantize the color of each pixel in the color image by zeroing least significant bits of each color component for the pixel, (2) count the frequency of occurrence of each quantized color, (3) assign each quantized color in the color image to one of a predetermined number of cells into which the color space has been partitioned, the predetermined number being not greater than m, (4) select the most commonly occurring quantized color in each cell in which a quantized color exists, based on the count, so as to obtain n palette colors, (5) rank the unselected colors in each cell based on their relative frequencies of occurrence, with higher ranking colors occurring more frequently than lower ranking colors in the same cell, the unselected colors being the quantized colors not selected in the first selecting step, (6) calculate a weighting factor for each unselected color, the weighting factor being based on the rank of the unselected color, with higher ranking colors receiving a greater weighting factor than lower ranking colors, (7) assign a vote value to each unselected color, the vote value being based at least in part on a product of the frequency of occurrence of the quantized color times the assigned weighting factor for the quantized color, and (8) select m-n palette colors as the unselected colors with the highest vote values. - View Dependent Claims (38, 39, 40, 41, 42)
-
-
43. A method for generating a color palette having m palette colors from a color image described in a color space, comprising:
-
selecting n palette colors as representative colors from a number of cells into which the color space has been partitioned and colors of the input image have been assigned, wherein a color selection associated with a cell is made independent of another cell'"'"'s color selection, each color selection based on a frequency of occurrence of colors within the cell; and
selecting m-n palette colors from remaining colors based at least in part on the frequency of occurrence of the remaining colors across the entire input image. - View Dependent Claims (49, 50)
-
-
44. Computer-executable process steps stored on a computer readable medium to generate a color palette having m colors from a color image described in a color space, comprising:
-
a first selecting step to select n palette colors as representative colors from a number of cells into which the color space has been partitioned and colors of the input image have been assigned, wherein a color selection associated with one cell is made independent of another cell'"'"'s color selection, each color selection based on a frequency of occurrence of colors within the cell ; and
a second selecting step to select m-n palette colors from remaining colors based at least in part on the frequency of occurrence of the remaining colors in the input image. - View Dependent Claims (51, 52)
-
-
45. A method for generating a color palette having m palette colors from a color image described in a color space, comprising:
-
selecting n palette colors as representative colors from a number of cells into which the color space has been partitioned and colors of the input image have been assigned, based on a first criteria that selects a representative color from a cell, one cell'"'"'s color selection being independent of another cell'"'"'s color selection, the first criteria includes a frequency of occurrence of colors within the cell; and
selecting m-n palette colors from remaining colors based on a second criteria that is different from said first criteria. - View Dependent Claims (46, 48)
-
-
47. Computer-executable process steps stored on a computer readable medium to generate a color palette having m colors from a color image described in a color space, comprising:
-
a first selecting step to select n palette colors as representative colors from a number of cells into which the color space has been partitioned and colors of the input image have been assigned, based on a first criteria that selects a representative color from a cell, one cell'"'"'s color selection being independent of another cell'"'"'s color selection, the first criteria includes a frequency of occurrence of colors within the cell; and
a second selecting step to select m-n palette colors from remaining colors based on a second criteria that is different from said first criteria.
-
Specification