ArticleslgStudy

computer science

Compression artifact

Compression artifact is a computer science 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 Compression artifact rather than just read about it. In short: In computing, a compression artifact (or artefact) is a noticeable distortion of digital media (including images, audio and video) caused by the application of lossy compression. Lossy data compression involves discarding some of the media's data so that it becomes small enough to be stored within the desired disk space or transmitted (streamed) within the available bandwidth (known as the data rate or bit rate).

Compression artifact — main illustration
Compression artifact — illustration

Key takeaways

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

Reference excerpt

In computing, a compression artifact (or artefact) is a noticeable distortion of digital media (including images, audio and video) caused by the application of lossy compression. Lossy data compression involves discarding some of the media's data so that it becomes small enough to be stored within the desired disk space or transmitted (streamed) within the available bandwidth (known as the data rate or bit rate). If the compressor cannot store enough data in the compressed version, the result is a loss of quality, or introduction of artifacts. The compression algorithm may not be intelligent enough to discriminate between distortions of little subjective importance and those objectionable to the user. The most common digital compression artifacts are DCT blocks, caused by the discrete cosine transform (DCT) compression algorithm used in many digital media standards, such as JPEG, MP3 and MPEG video file formats. These compression artifacts appear when heavy compression is applied, and occur often in common digital media, such as DVDs, common computer file formats such as JPEG, MP3 and MPEG files, and some alternatives to the compact disc, such as Sony's MiniDisc format. Uncompressed media (such as on Laserdiscs, Audio CDs and WAV files) or losslessly compressed media (such as FLAC or PNG) do not suffer from compression artifacts. The minimization of perceivable artifacts is a key goal in implementing a lossy compression algorithm. However, artifacts are occasionally intentionally produced for artistic purposes, a style known as glitch art or datamoshing. Technically speaking, a compression artifact is a particular class of data error that is usually the consequence of quantization in lossy data compression. Where transform coding is used, it typically assumes the form of one of the basis functions of the coder's transform space.

Images

When performing block-based discrete cosine transform (DCT) coding for quantization, as in JPEG-compressed images, several types of artifacts can appear.

Ringing Contouring Posterizing Staircase noise (aliasing) along curving edges Blockiness in "busy" regions (block boundary artifacts, sometimes called (macro)blocking, quilting, or checkerboarding) Other lossy algorithms, which use pattern matching to deduplicate similar symbols, are prone to introducing hard to detect errors in printed text. For example, the numbers "6" and "8" may get replaced. This has been observed to happen with JBIG2 in certain photocopier machines.

Block boundary artifacts

At low bit rates, any lossy block-based coding scheme introduces visible artifacts in pixel blocks and at block boundaries. These boundaries can be transform block boundaries, prediction block boundaries, or both, and may coincide with macroblock boundaries. The term macroblocking is commonly used regardless of the artifact's cause. Other names include blocking, tiling, mosaicing, pixelating, quilting and checkerboarding. Block-artifacts are a result of the very principle of block transform coding. The transform (for example the discrete cosine transform) is applied to a block of pixels, and to achieve lossy compression, the transform coefficients of each block are quantized. The lower the bit rate, the more coarsely the coefficients are represented and the more coefficients are quantized to zero. Statistically, images have more low-frequency than high-frequency content, so it is the low-frequency content that remains after quantization, which results in blurry, low-resolution blocks. In the most extreme case only the DC-coefficient, that is the coefficient which represents the average color of a block, is retained, and the transform block is only a single color after reconstruction. Because this quantization process is applied individually in each block, neighboring blocks quantize coefficients differently. This leads to discontinuities at the block boundaries. These are most visible in flat areas, where there is little detail to mask the effect.

Image artifact reduction

Various approaches have been proposed to reduce image compression effects, but to use standardized compression/decompression techniques and retain the benefits of compression (for instance, lower transmission and storage costs), many of these methods focus on "post-processing"—that is, processing images when received or viewed. No post-processing technique has been shown to improve image quality in all cases; consequently, none has garnered widespread acceptance, though some have been implemented and are in use in proprietary systems. Many photo editing programs, for instance, have proprietary JPEG artifact reduction algorithms built-in. Consumer equipment often calls this post-processing MPEG noise reduction. Boundary artifact in JPEG can be turned into more pleasing "grains" not unlike those in high ISO photographic films. Instead of just multiplying the quantized coefficients with the quantisation step Q pertaining to the 2D-frequency, intelligent noise in the form of a random number in the interval [-Q/2; Q/2] can be added to the dequantized coefficient. This method can be added as an integral part to JPEG decompressors working on the trillions of existing and future JPEG images. As such it is not a "post-processing" technique. The ringing issue can be reduced at encode time by overshooting the DCT values, clamping the rings away. Posterization generally only happens at low quality, when the DC values are given too little importance. Tuning the quantization table helps.

Video

When motion prediction is used, as in MPEG-1, MPEG-2 or MPEG-4, compression artifacts tend to remain on several generations of decompressed frames, and move with the optic flow of the image, leading to a peculiar effect, part way between a painting effect and "grime" that moves with objects in the scene. Data errors in the compressed bit-stream, possibly due to transmission errors, can lead to errors similar to large quantization errors, or can disrupt the parsing of the data stream entirely for a short time, leading to "break-up" of the picture. Where gross errors have occurred in the bit-stream, decoders continue to apply updates to the damaged picture for a short interval, creating a "ghost image" effect, until receiving the next independently compressed frame. In MPEG picture coding, these are known as "I-frames", with the 'I' standing for "intra". Until the next I-frame arrives, the decoder can perform error concealment.

… excerpt ends here. Continue reading the full article.

Illustrations

Compression artifact illustration
Compression artifact illustration
Compression artifact: Illustration of the effect of JPEG compression on a slightly noisy image with a mixture of text and whitespace. Text is a screen capture from a Wikipedia conversation with noise added (intensity 10 in Paint.NET). One frame of the animation was saved as a JPEG (quality 90) and reloaded. Both frames were then zoomed by a factor of 4 (nearest neighbor interpolation).
Illustration of the effect of JPEG compression on a slightly noisy image with a mixture of text and whitespace. Text is a screen capture from a Wikipedia conversation with noise added (intensity 10 in Paint.NET). One frame of the animation was saved as a JPEG (quality 90) and reloaded. Both frames were then zoomed by a factor of 4 (nearest neighbor interpolation).
Compression artifact: Block coding artifacts in a JPEG image. Flat blocks are caused by coarse quantization. Discontinuities at transform block boundaries are visible.
Block coding artifacts in a JPEG image. Flat blocks are caused by coarse quantization. Discontinuities at transform block boundaries are visible.
Compression artifact: Example of image with artifacts due to a transmission error
Example of image with artifacts due to a transmission error

Worked examples

Example 1 — a first encounter with Compression artifact

Start with the simplest possible case. Write down what Compression artifact claims or describes in one sentence, then invent the smallest concrete situation in which that sentence is true. In computer science, 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 Compression artifact 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 Compression artifact 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 Compression artifact

In research
Compression artifact appears in computer science 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 Compression artifact 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
Compression artifact is common in secondary-school and first-year university syllabi. It links to neighbouring topics Audio engineering, Computer graphic artifacts, Data compression, so understanding it makes those chapters shorter.
In everyday life
Look for Compression artifact 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 “Compression artifact” →

How to study Compression artifact in 20 minutes

  1. Read the reference excerpt below once, without taking notes.
  2. Close the page and write down what Compression artifact 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 Compression artifact out loud to somebody else — or to Teacher Smith in the lgStudy chat.

Frequently asked questions

What is Compression artifact in simple terms?

In computing, a compression artifact (or artefact) is a noticeable distortion of digital media (including images, audio and video) caused by the application of lossy compression. Lossy data compression involves discarding some of the media's data so that it becomes small enough to be stored within…

Why does Compression artifact matter?

Because it connects several computer science 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 Compression artifact?

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 Compression artifact.

Tags

  • Audio engineering
  • Computer graphic artifacts
  • Data compression

Keep exploring