Beta

Computer Color is Broken

Below is a short summary and detailed review of this video written by FutureFactual:

Why Blur Looks Ugly and How to Fix It Using Square Root Brightness Encoding

Summary

In this video, MinutePhysics explores why blurring colorful boundaries in digital images often yields a dark, muddy edge. The key idea is that human perception of brightness is logarithmic, while cameras store brightness values as linear photons or their square roots. By storing square roots to better match vision, the camera effectively compresses dark tones and expands dark color gradations. When software blurs an image, it typically averages brightness values directly, which is incorrect because the original data were square rooted. The result is darker midtones and a sludge at boundaries. The correct approach is to undo the camera's square rooting before blending by squaring each brightness value, performing the average, and then square rooting the result. This yields a much nicer transition, even showing yellow where red and green meet.

  • Key reason: perception vs digital encoding and incorrect blending order
  • Solution: apply square then average then square root
  • Practical impact: affects Photoshop, Instagram, iOS, etc
  • Encourages use of physically correct blending in professional software

Overview

MinutePhysics puts a spotlight on a common but often overlooked problem in digital image processing. When you blur a boundary between colors, you expect a smooth mix, yet many blur implementations produce a dark, sludge like boundary between adjacent bright regions. The video explains that this ugliness is not a flaw of art but of how brightness information is stored and manipulated in digital systems. The root cause lies in the mismatch between human perception and the way brightness is encoded on cameras and in image files.

Brightness, Perception, and Encoding

Human vision is roughly logarithmic. A small increase in darkness is far more noticeable than the same increase at high brightness. In contrast, digital sensors detect photons linearly, and image files store brightness values in a linear 0 to 1 scale for each color channel. To better align with perception, cameras historically store the square root of brightness rather than brightness itself. This square-root encoding concentrates more data points in darker colors, where perception is more sensitive, and fewer points in very bright regions. When displayed on a monitor, the square root is undone by squaring. The intent is to preserve perceptual detail while saving storage space in the early days of digital imaging.

The Blurring Dilemma

Blurring is achieved by replacing each pixel with an average of nearby pixels. If you perform this averaging on the square-rooted data, or more precisely on the brightness values as stored, you are effectively computing the average on perceptual scales that have already been nonlinearly transformed. However, the true physical blending should consider the underlying physical brightness values, not their square-root representations. Mathematically, averaging square roots of brightness does not equal the square root of the average brightness. In fact, the average of square roots tends to produce darker midtones. That is why a red to green boundary often looks brownish rather than producing a clean yellow in the middle when blurred with many standard tools.

The Correct Blend

The correct approach to blending at boundaries is to first revert the camera's encoding before blending. For each pixel in the neighborhood, square the square-root brightness to recover the original brightness, perform the average, and then take the square root of the result. This restores proper perceptual weighting and yields a smooth, natural transition from red to yellow to green, with less sludge at the boundary. The video demonstrates how this method produces significantly nicer results, with yellow appearing where expected and color boundaries remaining vibrant rather than darkened.

Software and Implications

According to the video, many consumer and professional tools, from iOS and Instagram to Photoshop defaults, use the lazier, incorrect approach by averaging the brightness values directly. Some advanced settings in professional software allow physically correct blending, but these are not the default. The takeaway is that beauty in blending should be the default, and software could adopt the mathematically and perceptually correct method for everyday use. The discussion invites developers and artists to consider perceptual accuracy in image processing pipelines for a more faithful representation of color and light.

Conclusion

The core message is simple but powerful: align image processing with the physics of brightness and the psychology of perception. Undo the camera's square-root encoding before blending to achieve accurate, aesthetically pleasing results, especially at color boundaries.

To find out more about the video and minutephysics go to: Computer Color is Broken.