Image Normalization and Smoothing
Prepare pixel values and noisy signals without erasing the information a model needs.
Image Normalization and Smoothing explained visually
Move from RGB pixels to traffic signals and learn how preprocessing reveals useful patterns.
What you will learn
Diagnose underfitting, understand bias and variance, and prepare features with normalization.
Normalize image pixels
Common eight-bit pixel intensities can be divided by 255 to map them from zero through 255 into zero through one.
Center color channels
Red, green, and blue channels may also be centered using statistics calculated from the training set.
Smooth noisy measurements
A moving average replaces each point with an average from a nearby window. Exponential smoothing blends current information with the previous estimate.
Preserve the signal
A wider smoothing window removes more noise but can hide rapid and meaningful changes. Preprocessing should clarify the signal rather than erase it.
Quick check: test your understanding
Why divide common pixel values by 255?
To map them into the range from zero to one.
What does a wider moving-average window do?
It increases smoothing but may hide rapid changes.
What is the preprocessing goal?
Reveal useful structure without erasing meaningful information.
Accessible referenceLesson 28 transcript334 words · Matches the published narration and captionsOpen transcript
A digital image may look like a street, a person, or an animal. To a neural network, it is a grid of numbers. In a common eight-bit image, each color channel contains values between zero and two hundred fifty-five. A dark pixel may contain a small value. A bright pixel may contain a much larger value.
We can scale these pixels between zero and one by dividing every value by two hundred fifty-five. We can also center the data by subtracting a mean value from each pixel. Centering moves the average closer to zero. This can help gradients behave more predictably and make training more stable.
For color images, preprocessing may calculate separate statistics for the red, green, and blue channels. The important rule remains the same: values calculated from the training data must also be used consistently for validation images and future production images. Data preparation also includes reducing unwanted noise.
Imagine a roadside sensor measuring traffic every minute. Most readings follow a clear pattern, but random fluctuations make the graph look jagged. Smoothing helps the underlying trend become easier to see. A moving average selects a window of nearby measurements and calculates their average. The window then moves forward through the signal.
Short-term fluctuations become softer while the longer pattern remains visible. A larger window creates stronger smoothing, but it may hide meaningful rapid changes. Exponential smoothing also combines current and previous information. A parameter called alpha controls how strongly the latest measurement affects the smoothed result.
A larger alpha responds quickly to new changes. A smaller alpha produces a smoother, slower-moving result. Smoothing must be applied carefully. Noise should be reduced without erasing the signal the neural network needs to learn. Normalization and smoothing share one purpose: presenting information in a form that exposes useful patterns rather than distracting numerical variation.
We have now examined underfitting, bias and variance, normalization, image preparation, and smoothing. The next lesson will begin the material from the following class and continue building our neural-network workflow.