WO1999050820A1 - Procede d'optimisation du choix des couleurs lors de la presentation d'une image - Google Patents

Procede d'optimisation du choix des couleurs lors de la presentation d'une image Download PDF

Info

Publication number
WO1999050820A1
WO1999050820A1 PCT/SE1999/000366 SE9900366W WO9950820A1 WO 1999050820 A1 WO1999050820 A1 WO 1999050820A1 SE 9900366 W SE9900366 W SE 9900366W WO 9950820 A1 WO9950820 A1 WO 9950820A1
Authority
WO
WIPO (PCT)
Prior art keywords
colour
block
blocks
size
colours
Prior art date
Application number
PCT/SE1999/000366
Other languages
English (en)
Inventor
Björn ROSÉN
Original Assignee
Försvarets Forskningsanstalt
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Försvarets Forskningsanstalt filed Critical Försvarets Forskningsanstalt
Publication of WO1999050820A1 publication Critical patent/WO1999050820A1/fr

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N1/00Scanning, transmission or reproduction of documents or the like, e.g. facsimile transmission; Details thereof
    • H04N1/46Colour picture communication systems
    • H04N1/64Systems for the transmission or the storage of the colour picture signal; Details therefor, e.g. coding or decoding means therefor
    • H04N1/644Systems for the transmission or the storage of the colour picture signal; Details therefor, e.g. coding or decoding means therefor using a reduced set of representative colours, e.g. each representing a particular range in a colour space
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T11/002D [Two Dimensional] image generation
    • G06T11/001Texturing; Colouring; Generation of texture or colour
    • GPHYSICS
    • G09EDUCATION; CRYPTOGRAPHY; DISPLAY; ADVERTISING; SEALS
    • G09GARRANGEMENTS OR CIRCUITS FOR CONTROL OF INDICATING DEVICES USING STATIC MEANS TO PRESENT VARIABLE INFORMATION
    • G09G5/00Control arrangements or circuits for visual indicators common to cathode-ray tube indicators and other visual indicators
    • G09G5/02Control arrangements or circuits for visual indicators common to cathode-ray tube indicators and other visual indicators characterised by the way in which colour is displayed
    • G09G5/06Control arrangements or circuits for visual indicators common to cathode-ray tube indicators and other visual indicators characterised by the way in which colour is displayed using colour palettes, e.g. look-up tables

Definitions

  • the present invention relates to a method for optimising the choice of colours when presenting a picture with fewer colours than those available in an original form of the picture. All colours are implemented as a combination of primary colours, e.g. red, green and blue (RGB).
  • RGB red, green and blue
  • a True Colour picture in non-compressed state takes up a large space in the file system, which can be a reason for reducing the number of colours.
  • methods are now available for compressing True Colour pictures without reducing the number of colours, for instance JPEG.
  • JPEG is a 24 bit True Colour format
  • GIF is a format with 2 to 256 colours. If a picture with thousands of colours is to be published on the Internet, it is in most cases convenient to select JPEG, and the present invention concerning a colour palette optimisation may seem superfluous.
  • the GIF format however, has certain advantages compared with JPEG, viz. the capability of transparence, interlace and animation. Moreover, GIF is very convenient for graphics with a small number of homogeneous colours.
  • a small file size is advantageous on the Internet. Particularly in such cases, it is important to have a good algorithm.
  • the present invention can convert a 24 bit colour to 8 bits or fewer with a minimum degradation of the picture quality.
  • the invention need not, however, be used with a GIF picture, but it may also reduce the number of colours in other applications and then yields an excellent result.
  • Fig. 1 shows an example of a histogram of red colours
  • Fig. 2 shows a colour cube, a three-dimensional histogram
  • Fig. 3 shows a colour cube with two colour blocks
  • Fig. 4 shows the trimming of a colour block
  • Fig. 5 shows the division of a colour block
  • Fig. 6 shows how unsuitable division may cause small neighbouring blocks
  • Fig. 7 shows the combination of small neighbouring blocks
  • Fig. 8 shows how a combination may result in overlap.
  • the input is a True Colour picture, i.e. a rectangle with pixels, each pixel consisting of 24 bits.
  • Other picture formats that are read can first be converted to such a picture.
  • the invention may act directly on other picture formats in a corresponding fashion.
  • the palette optimisation according to the invention can be used as soon as the number of colours in the input exceeds the number of colours that are to be presented in the output picture.
  • each pixel is RGB-coded.
  • Other formats can be converted internally to RGB. This means that the 24 bits are distributed among an 8 bit red level, an 8 bit green level and an 8 bit blue level. The level of an individual colour may then vary between 0 and 255. 0 indicates blanked and 255 corresponds to full intensity. In other applications of the invention it is possible to use other divisions into three colours.
  • the output is a picture with an indexed colour palette.
  • the output picture has the same width and height as the input picture, and if everything functions as it should, it looks approximately the same while at the same time the number of colours has decreased significantly.
  • the entire colour code for a pixel is stored in the pixel itself. Therefore there is no need for a palette.
  • a table with 2 to 256 colour codes in the Example, with 24 bit RGB.
  • An address, an index, to a code in this table consists of 1 to 8 bits.
  • the colour code table is called a palette, and a pixel in the output picture consists of an index for the palette.
  • the present invention is essentially a program for optimising the palette, i.e. filling the palette with 24 bit RGB codes which are selected as well as possible. For example, for a picture of a forest, many different green hues are available in the palette. Moreover, an output picture is to be produced, where the pixels are an index for the palette, but this is a simpler task.
  • the invention operates with a three-dimensional histogram of colours.
  • the true histogram is a three-dimensional colour cube with, in the Example, a red, green and blue level along an axis of its own. You may often see a histogram of one colour level at a time, for instance the red level, see Fig. 1. Showing histograms for the red, green and blue levels separately, however, is a simplification.
  • Fig. 2 illustrates a colour cube - a true 3D histogram.
  • the invention may further comprise a number of less important functions.
  • the following are Examples of such functions.
  • the function may be selectable. If the input picture contains just a few stray pixels with odd colours, it is possible to prevent them from taking up valuable place in the completed palette, provided that the stray pixels are of no interest.
  • an automatic saturation level of 65,535 pixels per cell is introduced.
  • the user can be allowed to set a saturation level of his own, of say 1,000 to 65,535 pixels. It may then be possible to avoid that large surfaces of uniform colour become too dominating when assigning palette colours.
  • Colour Cube Statistics The colour cube can also answer some statistic questions, for instance how many pixels it contains in all, how many cells have any content etc. Comprehensive statistics, however, are not necessary in this case. Such things as minimum, maximum, average value and standard deviation for red, green and blue are handled by the colour blocks that will be described below.
  • a colour block is a rectangular subvolume of the colour cube. For each colour cube
  • the volume of a colour block can be described as, for instance, six variables which are indices for the colour cube: red_min, red_max, green_min, green_max, blue_min and blue_max.
  • the palette optimisation according to the invention can be started on the basis of a single colour block of the same size as the entire colour cube. Subsequently a number of steps concerning trimming, cutting and combining to optimise a palette are carried out.
  • Trimming starts from the fact that a colour block should not be allowed to contain any empty edges. A side containing merely zeroed cells is therefore peeled away, see Fig. 4 regarding such trimming. Each block has six sides which can be peeled away if they are empty, when necessary in several steps. If a block is quite empty, it will shrink to zero in connection with trimming and be removed. (Quite empty blocks should in fact not be available.)
  • Ignored pixels may get outside all blocks in connection with trimming.
  • a colour in the palette is to be assigned to these pixels later on, one will have to take the colour that happens to be closest.
  • red_min, red_max, green_min, green_max, blue_min and blue_max are already known: red_min, red_max, green_min, green_max, blue_min and blue_max. These are the same variables as describe the size of the block.
  • pixels The total number of pixels in the block. This is one of the two measures of the size of the block.
  • the length of the body diagonal of the block is the other measure of the size of the block and a measure of how disparate colours the block contains. (The volume of the block is not used as a measure since an elongate block can be very large along one axis and still have a small volume.)
  • red_centre red_centre (red_min + red_max) / 2 green_centre blue centre
  • red_size red_size (red_max + 1) - red_min green_size blue size
  • colour_average The average red_average colour_average is the average of each colour level in the block.
  • pixels_average The average of the number of pixels in the blocks. (The total number of pixels in the cube divided by the number of blocks.)
  • pixels_relative pixels / pixels_average
  • diagonal_relative diagonal / diagonal_average The diagonal of the block, or "colour size", in relation to the other blocks.
  • the diagonal and pixel size of the block are two measures which cannot simply be compared with each other and besides they vary in different ways as the volume of the block changes.
  • the purpose of preparing relative sizes is that it should be easier to compare the two measures with each other. Such a comparison is necessary since the invention comprises the operation of dividing colour blocks, i.e. that the largest colour block in a selected sense is chosen and divided into two smaller blocks.
  • a block has two measures of its size in relation to the other blocks: pixels_relative and diagonal_relative.
  • colour measure If it is important to have a uniform distribution of the colours in the palette, one chooses a high priority for the diagonal size (colour measure). If it is more important to have a good colour resolution for areas which are large in the picture, one chooses a higher priority for the pixel measure.
  • the block having the largest weighed size is selected to be divided.
  • a block consisting of one cell only is non-divisible and must not be selected to be divided. If there are only one-cell blocks, the palette optimisation must be interrupted prematurely.
  • the total number of blocks increases by one.
  • the block which is divided is cut into two equal parts with a plane which is perpendicular either to the red, green or blue axis.
  • the largest axis is selected to be divided.
  • the size can again be measured in two manners, the length of the side (in cells) or the standard deviation of the corresponding colour level.
  • a weighed average can be calculated in the same way as for weighed_size above.
  • red_weighed_size priority * (red_size / average size) + (1 -priority) * (red_deviation /average deviation), where average size and average deviation apply locally to the block.
  • red_weighed_size priority * red_size + (1 -priority) * red_deviation.
  • red_weighed_size red_size + (1 -priority) * red_deviation.
  • Red_divide priority * red_centre + (1 -priority) * red_average
  • the dividing coordinate 9 is, of course, rounded off to a full number of cells before dividing is carried out.
  • the two new blocks are trimmed and statistically processed. Subsequently a new largest block is selected to be divided.
  • the algorithm takes only the cell size of the blocks into consideration. The program can then be speeded up, since it is not necessary to collect detailed pixel statistics.
  • the first step of the palette optimisation is terminated. After that, it is possible to proceed to create the palette, cf. further down in the description.
  • the dividing process may continue one more step, and the available space in the palette can be better used.
  • This procedure can be repeated as long as there are two blocks that can be combined without the combined block being the largest, see Fig. 7.
  • the function is somewhat difficult in terms of combination-, but it is not impossible to perform the function.
  • the ambitious user chooses on each occasion the pair of blocks which after the combination yields the absolutely smallest size.
  • Fig. 8. Such an overlap can either be permitted or forbidden.
  • the pixel density for the colour cube is defined as the total number of pixels divided by the volume of the entire colour cube. This density measure can be calculated once and for all and is then constant as the palette optimisation proceeds. In a similar way it is possible to define the pixel density for a colour block but that measure may change somewhat as the block is trimmed, divided or combined.
  • the pixel density of a block can be standardised by being divided by the pixel density of the entire colour cube.
  • the standardised or relative pixel density, pixel density_relative is greater than one (>1) if the block is denser than the colour 10 cube on average, and smaller than one ( ⁇ 1) if the block is thinner than that.
  • the measure does not change when other blocks change their shape.
  • the colour for a certain block may be, for instance, red_divide, green_divide and blue_divide as described above.
  • red_divide green_divide
  • blue_divide as described above.
  • an output picture is constructed, where the pixels consist of indices for the palette. For each pixel, its original RGB value is collected in the input picture. The RGB value is converted to an index for a cell in the colour cube. A colour block is selected, either a block containing the cell, or otherwise the closest block. The index for the palette which corresponds to the selected block is the correct output for the pixel in question.
  • the user can use a dither function when constructing the output picture.
  • the purpose is to produce apparently more colours by screening. How this is done is known to a person skilled in the art and will not be described here.
  • the output can do so as well.
  • the principles are the same as for a single picture, except that the pixels are read from and written to a plurality of picture rectangles instead of one.
  • GIF animations one often wants to optimise a joint palette for a series of pictures.

Landscapes

  • Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Multimedia (AREA)
  • Signal Processing (AREA)
  • Computer Hardware Design (AREA)
  • Image Processing (AREA)
  • Color Television Systems (AREA)
  • Facsimile Image Signal Circuits (AREA)
  • Color Image Communication Systems (AREA)

Abstract

L'invention concerne un procédé d'optimisation du choix de couleurs présentes dans une palette de couleurs, lors de la présentation d'une image ayant moins de couleurs que celles disponibles sous sa forme originale. Toutes les couleurs sont présentes sous la forme d'une combinaison de couleurs primaires, par exemple le rouge, le vert et le bleu (RVB), et on génère un histogramme multidimensionnel avec lesdites couleurs primaires le long des axes, dans lesquels les couleurs de tous les pixels sont insérées. On considère ensuite l'histogramme intégral comme un bloc de couleur et les opération impliquant l'ajustage des blocs de couleur et leur division sont exécutées jusqu'à ce qu'un certain nombre de blocs soit disponible, chaque bloc pouvant être alors représenté par une couleur représentative du bloc. L'image est finalement présentée avec les couleurs ainsi sélectionnées.
PCT/SE1999/000366 1998-03-16 1999-03-10 Procede d'optimisation du choix des couleurs lors de la presentation d'une image WO1999050820A1 (fr)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
SE9800854A SE511669C2 (sv) 1998-03-16 1998-03-16 Sätt att optimera valet av färger när en bild skall presenteras
SE9800854-3 1998-03-16

Publications (1)

Publication Number Publication Date
WO1999050820A1 true WO1999050820A1 (fr) 1999-10-07

Family

ID=20410555

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/SE1999/000366 WO1999050820A1 (fr) 1998-03-16 1999-03-10 Procede d'optimisation du choix des couleurs lors de la presentation d'une image

Country Status (2)

Country Link
SE (1) SE511669C2 (fr)
WO (1) WO1999050820A1 (fr)

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP0301207A2 (fr) * 1987-07-28 1989-02-01 International Business Machines Corporation Procédé de sélection de couleurs pour une image en couleurs
EP0522702A2 (fr) * 1991-06-12 1993-01-13 Hewlett-Packard Company Extraction de la couleur de points images
WO1997031337A1 (fr) * 1996-02-23 1997-08-28 Denninghoff Karl L Procede de conception de palettes et de table de couleurs

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP0301207A2 (fr) * 1987-07-28 1989-02-01 International Business Machines Corporation Procédé de sélection de couleurs pour une image en couleurs
EP0522702A2 (fr) * 1991-06-12 1993-01-13 Hewlett-Packard Company Extraction de la couleur de points images
WO1997031337A1 (fr) * 1996-02-23 1997-08-28 Denninghoff Karl L Procede de conception de palettes et de table de couleurs

Also Published As

Publication number Publication date
SE9800854L (sv) 1999-09-17
SE511669C2 (sv) 1999-11-08
SE9800854D0 (sv) 1998-03-16

Similar Documents

Publication Publication Date Title
US6518981B2 (en) Generating and using a color palette
US5377018A (en) Video compression and decompression using block selection and subdivision
US6385336B1 (en) Image processing method and system for generating a palette
EP0843464B1 (fr) Système et procédé de traitement d'images
US5093872A (en) Electronic image compression method and apparatus using interlocking digitate geometric sub-areas to improve the quality of reconstructed images
US6310696B1 (en) Color gamut displaying method, an image processing method, and apparatus utilizing these methods
US6356588B1 (en) Method for digital compression of color images
US20020104891A1 (en) Smart card for storage and retrieval of digitally compressed color images
US5574798A (en) Visual presentation system which determines length of time to present each slide or transparency
US6697529B2 (en) Data compression method and recording medium with data compression program recorded therein
US6862102B1 (en) Automatically preparing an image for download
US20060092474A1 (en) System and method for image processing
US6427025B1 (en) Image processing with selection between reversible and irreversible compression
US7075681B1 (en) System and method for reducing the data volume of images
US20030026476A1 (en) Scaled image generating apparatus and method, image feature calculating apparatus and method, computer programs therefor, and image data structure
US20020039440A1 (en) System, method and computer accessible storage medium for image processing
WO1999050820A1 (fr) Procede d'optimisation du choix des couleurs lors de la presentation d'une image
US7171045B1 (en) System and method for determining a natural color depth of a digital image
US20030194145A1 (en) Method and apparatus for encoding image data, and computer-readable recording medium in which program for encoding image data is recorded
US7123378B2 (en) Image processing apparatus, method and program enabling high-precision color conversion
US7019754B2 (en) Apparatus and method for generating texture maps for use in 3D computer graphics
US20040091173A1 (en) Method, apparatus and system for the spatial interpolation of color images and video sequences in real time
JP2003085546A5 (fr)
Li Advanced image processing homework 1 color quantization: a median cut approach
JP2003050999A5 (fr)

Legal Events

Date Code Title Description
AK Designated states

Kind code of ref document: A1

Designated state(s): JP US

AL Designated countries for regional patents

Kind code of ref document: A1

Designated state(s): AT BE CH CY DE DK ES FI FR GB GR IE IT LU MC NL PT SE

121 Ep: the epo has been informed by wipo that ep was designated in this application
DFPE Request for preliminary examination filed prior to expiration of 19th month from priority date (pct application filed before 20040101)
122 Ep: pct application non-entry in european phase