Choose a Filter for the Noise You Have
White specks on a dark image and a fine grain across the whole picture call for different responses.
Choose a Filter for the Noise You Have explained visually
White specks on a dark image and a fine grain across the whole picture call for different responses. English captions are optional and start off. The complete transcript follows the written lesson.
What you will learn
White specks on a dark image and a fine grain across the whole picture call for different responses.
Noise has different forms
The camera produces a few isolated white specks on one part and fine grain across another. Treating both with the same blur is tempting, but the noise patterns differ. Before choosing a filter, zoom into the untouched images and ask whether the errors are isolated outliers, widespread variation, or a repeated pattern.
Averages and medians behave differently
A Gaussian filter forms a weighted average and tends to calm fine grain. It also softens thin real details. A median filter sorts neighborhood values and chooses the middle one, which can resist isolated extremes. For ten, eleven, twelve, thirteen, and two hundred and fifty, the median is twelve. The mean is fifty-nine point two, pulled upward by the bright speck.
Measure the detail cost
Try a mild Gaussian blur and a median filter on copies of the same scratched part. Look at a quiet area and at the narrowest real defect. A larger neighborhood may remove more noise while erasing the defect. Neither filter knows which pixels came from metal and which from the camera.
A worked example
Keep the original and the settings, and choose by the inspection result rather than a smooth-looking background. Next, we'll distinguish finding an edge from merely making one appear sharper.
Worked example
Take a neighborhood with values 10, 11, 12, 13, and 250. The mean is 59.2 because the bright outlier contributes heavily. The median is 12. This example explains why a median can reject an isolated impulse without pulling the output toward 250.
Quick check: test your understanding
Try it yourself: Use the same two filters on a noisy image containing a thin line. Which result best preserves the line?
Check the reasoning
The answer depends on the noise and line width. Compare line continuity and thickness, not only the smoothness of the background.
Is a larger filter always better at producing a useful image?
No. It may reduce noise while destroying task-relevant structure.
How would you solve the practice case?
The answer depends on the noise and line width. Compare line continuity and thickness, not only the smoothness of the background.
What does the worked example show?
Take a neighborhood with values 10, 11, 12, 13, and 250. The mean is 59.2 because the bright outlier contributes heavily. The median is 12. This example explains why a median can reject an isolated impulse without pulling the output toward 250.
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 8 transcript193 words · Video transcript · Matches the published narration and captionsOpen transcript
The camera produces a few isolated white specks on one part and fine grain across another. Treating both with the same blur is tempting, but the noise patterns differ. Before choosing a filter, zoom into the untouched images and ask whether the errors are isolated outliers, widespread variation, or a repeated pattern.
A Gaussian filter forms a weighted average and tends to calm fine grain. It also softens thin real details. A median filter sorts neighborhood values and chooses the middle one, which can resist isolated extremes. For ten, eleven, twelve, thirteen, and two hundred and fifty, the median is twelve. The mean is fifty-nine point two, pulled upward by the bright speck.
Try a mild Gaussian blur and a median filter on copies of the same scratched part. Look at a quiet area and at the narrowest real defect. A larger neighborhood may remove more noise while erasing the defect. Neither filter knows which pixels came from metal and which from the camera.
Keep the original and the settings, and choose by the inspection result rather than a smooth-looking background. Next, we'll distinguish finding an edge from merely making one appear sharper.