← Image Processing for EveryoneToolsInVisionLearning Center
Compression and Storage · Lesson 70

Why Block Compression Can Show Artifacts

A saved photograph shows square blocks around a smooth region.

Read the full lesson and open its transcript below. A narrated video will be added after production.

Lesson overview

What you will learn

A saved photograph shows square blocks around a smooth region.

  1. A practical question
  2. The useful idea
  3. Work through the example
  4. Limits and next step
01

A practical question

A smooth wall in a saved inspection photo now shows little squares. Those blocks weren't on the wall. Some compression systems process image regions in blocks, transform their content, and save an approximation. Stronger quantization discards more of the transformed detail; block boundaries and ripples near sharp edges can then become visible.

02

The useful idea

Save one source image at two quality settings and view both crops at the same scale. Look at a smooth area for blocks and at the edge of a fine scratch for ringing or missing detail. A thumbnail may hide the difference, while a model trained on the master could notice it.

03

Work through the example

The exact artifacts depend on the encoder and settings, so don't diagnose every square as a particular file format. Compare the decoded pixels with the original before drawing that conclusion. Compression is a practical trade-off between file size and information used by the task. Block compression can leave squared edges or ripples around a sharp scratch. Compare a high-quality and low-quality saved crop at the same magnification and lighting. If a defect appears only after aggressive compression, it is not evidence about the part. If a real fine crack disappears, a detector may miss it. Keep the source image and compression settings so reviewers can separate capture detail from storage artifacts. Use this case to test your understanding: Compare a high-quality and low-quality J peg crop at the same display scale. Here is the limitation to watch for: A small file may be suitable for viewing but poor for precise measurement. This supports a careful conclusion: Block-based compression can quantize transformed regions separately and reveal boundaries at stronger compression.

04

Limits and next step

Keep a source copy while testing settings. Next, we'll choose a quality level by its effect on the downstream inspection rather than on appearance alone.

Worked example

Compare a high-quality and low-quality JPEG crop at the same display scale.

Knowledge check

Quick check: test your understanding

Try it yourself: Consider this case: Compare a high-quality and low-quality JPEG crop at the same display scale. Explain how you would check the result. In your answer, address this limitation: A small file may be suitable for viewing but poor for precise measurement.

Check the reasoning

Block-based compression can quantize transformed regions separately and reveal boundaries at stronger compression. A small file may be suitable for viewing but poor for precise measurement.

What is the main idea behind why block compression can show artifacts?

Block-based compression can quantize transformed regions separately and reveal boundaries at stronger compression.

How is it used in the example?

Compare a high-quality and low-quality JPEG crop at the same display scale.

What limitation should be checked?

A small file may be suitable for viewing but poor for precise measurement.

Further reading

Digital Image Processing, 4th edition — Rafael C. Gonzalez and Richard E. Woods.

Original ToolsInVision teaching examples. Editorial approach · Suggest a correction

Accessible referenceLesson 70 transcript298 words · Narration ready for the upcoming videoOpen transcript

A smooth wall in a saved inspection photo now shows little squares. Those blocks weren't on the wall. Some compression systems process image regions in blocks, transform their content, and save an approximation. Stronger quantization discards more of the transformed detail; block boundaries and ripples near sharp edges can then become visible.

Save one source image at two quality settings and view both crops at the same scale. Look at a smooth area for blocks and at the edge of a fine scratch for ringing or missing detail. A thumbnail may hide the difference, while a model trained on the master could notice it.

The exact artifacts depend on the encoder and settings, so don't diagnose every square as a particular file format. Compare the decoded pixels with the original before drawing that conclusion. Compression is a practical trade-off between file size and information used by the task. Block compression can leave squared edges or ripples around a sharp scratch. Compare a high-quality and low-quality saved crop at the same magnification and lighting. If a defect appears only after aggressive compression, it is not evidence about the part. If a real fine crack disappears, a detector may miss it. Keep the source image and compression settings so reviewers can separate capture detail from storage artifacts. Use this case to test your understanding: Compare a high-quality and low-quality J peg crop at the same display scale. Here is the limitation to watch for: A small file may be suitable for viewing but poor for precise measurement. This supports a careful conclusion: Block-based compression can quantize transformed regions separately and reveal boundaries at stronger compression.

Keep a source copy while testing settings. Next, we'll choose a quality level by its effect on the downstream inspection rather than on appearance alone.