ArticleslgStudy

biology

Color Cell Compression

Color Cell Compression is a biology topic covered in the lgStudy science library. This page brings together a partial reference excerpt, illustrations, worked examples, real-world applications and a short study plan, so you can understand Color Cell Compression rather than just read about it. In short: Color Cell Compression is a lossy image compression algorithm developed by Campbell et al., in 1986, which can be considered an early forerunner of modern texture compression algorithms, such as S3 Texture Compression and Adaptive Scalable Texture Compression. It is closely related to Block Truncation Coding, another lossy image compression algorithm, which predates Color Cell Compression, in that it uses the domina…

Color Cell Compression — main illustration
Color Cell Compression — illustration

Key takeaways

  • Color Cell Compression belongs to biology; place it in that map before memorising details.
  • Learn the definition first, then one example that makes the definition concrete.
  • Connect Color Cell Compression to a quantity you can measure, compute or draw — that is where exam questions come from.
  • Reproduce the core statement of Color Cell Compression from memory before moving on to harder problems.

Reference excerpt

Color Cell Compression is a lossy image compression algorithm developed by Campbell et al., in 1986, which can be considered an early forerunner of modern texture compression algorithms, such as S3 Texture Compression and Adaptive Scalable Texture Compression. It is closely related to Block Truncation Coding, another lossy image compression algorithm, which predates Color Cell Compression, in that it uses the dominant luminance of a block of pixels to partition said pixels into two representative colors. The primary difference between Block Truncation Coding and Color Cell Compression is that the former was designed to compress grayscale images and the latter was designed to compress color images. Also, Block Truncation Coding requires that the standard deviation of the colors of pixels in a block be computed in order to compress an image, whereas Color Cell Compression does not use the standard deviation. Both algorithms, though, can compress an image down to effectively 2 bits per pixel.

Algorithm

Compression The Color Cell Compression algorithm processes an image in eight steps, although one of the steps (step #6) is optional. It is assumed here that the input is a 24 bits/pixel image, as assumed in the original journal article, although other bit depths could be used.

For each 8-bit RGB octet triple contained in each 24-bit color value in the input image, the NTSC luminance y is computed using the following formula: y=0.30×red+0.59×green+0.11×blue The image is now subdivided into 4-pixel by 4-pixel blocks, and, the arithmetic mean of the luminance of each pixel in the block is used to select a representative luminance value. Each block of pixels is then divided into two groups. One group consists of pixels in the current block where each pixel's luminance is greater than or equal to the representative luminance for the current block. The second group of pixels consists of pixels in the current block where each pixel's luminance is less than the representative luminance for the current block. Whether a pixel in the current block belongs to a certain group is determined by a binary "0" or a "1" value in another, separate, 16-entry bitmap. Two representative 24-bit colors are now selected for each block of pixels by computing two arithmetic means. The first arithmetic mean is the arithmetic mean of all of the pixels belonging to the first group of pixels where the luminance of each pixel is a "1" in the luminance bitmap. The second 24-bit representative color is selected similarly, by taking the arithmetic mean of all the 24-bit color pixels in the second group where each pixel corresponds to a "0" in the luminance bitmap. The luminance bitmap is stored in a temporary location and then the two 24-bit representative colors for the current block are appended to the bitmap. At this stage, the image has been compressed into a 16-entry bitmap with two 24-bit binary values appended. The total size of the compressed block is now 16 bits for the luminance bitmap, and two 24-bit binary quantities for each representative color, yielding a total size of 64 bits, which, when divided by 16 (the number of pixels in the block), yields 4 i.e. 4 bits per pixel. Each compressed block of pixels is modified by truncating each of the two 24-bit representative colors to 15 bits. This step is optional, and the algorithm can terminate at this point, if desired, as the compressed blocks at this stage have a total size of 16+2×15=46 bits, which, when divided by 16, yields 2.875 bits per pixel. If this step is performed, then the 15-bit truncated color values can be used in the next step to create a smaller histogram. Also, since each 15-bit binary color vector is presumably stored in a 16-bit word, then the 16th bit can be used to improve the image quality by specifying which one of two lookup tables should be used. A histogram of all the 24-bit colors in the original 24-bit color image, or the truncated 15-bit color vectors, is created. In a naïve implementation, the histogram is consulted to choose 256 of the most frequently used colors which are then put into a 256-entry array, where each entry consists of three octets of a 24-bit per pixel color value. The histogram method of selecting the most appropriate colors for the original 24-bit per pixel color image can instead be replaced by a vector quantization class algorithm such as the median cut algorithm or K-means clustering which usually yields better results. The final step consists of taking the current block of pixels and determining which 24-bit per pixel color in the 256-entry lookup table most closely match the two representative colors for each block. The two 8-bit indices pointing to colors in the lookup table are now appended to the 16-bit luminance bitmap. This yields a total compressed size of 16+8+8=32 bits, which, when divided by 16, yields 2 bits per pixel.

Decompression Decompression is very easy and straightforward. To reconstruct each compressed 4-pixel by 4-pixel block, the 16-bit luminance bitmap is consulted for each block. Depending on whether an element of the bitmap is 1 or 0, one of the two 8-bit indices into the lookup table is selected and then dereferenced and the corresponding 24-bit per pixel color value is retrieved.

Performance and image quality In spite of its very simple mechanism, the algorithm yields surprisingly good results on photographic images, and it has the advantage of being very fast to decode with limited hardware. Although far surpassed in compression ratio by later block-transform coding methods such as JPEG, it has the advantage of very simple decompression and fast random access into the compressed image.

… excerpt ends here. Continue reading the full article.

Illustrations

Color Cell Compression: Original uncompressed 24-bits per pixel color image
Original uncompressed 24-bits per pixel color image
Color Cell Compression: CCC compressed image, but using only 24-bits to 15-bits color quantization combined with a luminance bitmap for 2.875 bits per pixel (with no palette / lookup-table)
CCC compressed image, but using only 24-bits to 15-bits color quantization combined with a luminance bitmap for 2.875 bits per pixel (with no palette / lookup-table)
Color Cell Compression: 256 entry palette / lookup-table implementation of the CCC algorithm at 2-bits per pixel with the palette built using K-means clustering
256 entry palette / lookup-table implementation of the CCC algorithm at 2-bits per pixel with the palette built using K-means clustering
Color Cell Compression: Result of the output of Mandrill standard test image compressed with the CCC algorithm at 2-bits per pixel with a 256 entry palette / lookup-table generated using a naïve 15-bit color histogram algorithm
Result of the output of Mandrill standard test image compressed with the CCC algorithm at 2-bits per pixel with a 256 entry palette / lookup-table generated using a naïve 15-bit color histogram algorithm

Worked examples

Example 1 — a first encounter with Color Cell Compression

Start with the simplest possible case. Write down what Color Cell Compression claims or describes in one sentence, then invent the smallest concrete situation in which that sentence is true. In biology, the smallest case is usually a single object, a single equation or a single measurement. Check that every symbol or term in your sentence has a meaning in that case.

Example 2 — changing one variable

Take the situation from Example 1 and change exactly one quantity: double it, halve it, or set it to zero. Predict what should happen to Color Cell Compression before you calculate. Comparing your prediction with the result is the fastest way to find out whether you understand the idea or only the words.

Example 3 — an exam-style question

Typical questions about Color Cell Compression ask you to (a) state it precisely, (b) apply it to given data, and (c) explain a limitation. Practise writing all three answers in under five minutes; the third part is what separates a full-mark answer from an average one.

Applications of Color Cell Compression

In research
Color Cell Compression appears in biology research whenever the underlying quantities have to be modelled precisely. Papers usually cite it as a starting assumption and then explore where it breaks down.
In technology and industry
Engineering practice reuses Color Cell Compression in design rules, simulations and safety margins. Knowing the idea lets you read a specification sheet and understand why the numbers look the way they do.
In the classroom
Color Cell Compression is common in secondary-school and first-year university syllabi. It links to neighbouring topics Lossy compression algorithms, so understanding it makes those chapters shorter.
In everyday life
Look for Color Cell Compression outside the textbook — in sport, cooking, traffic, electronics or the sky above you. An example you found yourself is remembered far longer than one you were given.
Ask Teacher Smith questions about this articleOpens your AI tutor with a question about “Color Cell Compression” →

How to study Color Cell Compression in 20 minutes

  1. Read the reference excerpt below once, without taking notes.
  2. Close the page and write down what Color Cell Compression means in your own words.
  3. Compare your version with the excerpt and mark what you missed.
  4. Work through the three examples above with pen and paper.
  5. Explain Color Cell Compression out loud to somebody else — or to Teacher Smith in the lgStudy chat.

Frequently asked questions

What is Color Cell Compression in simple terms?

Color Cell Compression is a lossy image compression algorithm developed by Campbell et al., in 1986, which can be considered an early forerunner of modern texture compression algorithms, such as S3 Texture Compression and Adaptive Scalable Texture Compression. It is closely related to Block Truncat…

Why does Color Cell Compression matter?

Because it connects several biology ideas at once: it gives you a definition you can apply, a quantity you can calculate, and a way to check whether a result is plausible.

How should I study Color Cell Compression?

Read the excerpt, restate it from memory, then work through the examples and applications listed on this page. The five-step study plan above takes about twenty minutes.

What does this page cover?

It gives you a compact reference excerpt plus original lgStudy explanations, examples, applications and study material on Color Cell Compression.

Tags

  • Lossy compression algorithms

Keep exploring