Edges and Sharpening Are Not the Same
The border of a cup is easy for us to notice, but an edge detector sees a change in image values.
Edges and Sharpening Are Not the Same explained visually
The border of a cup is easy for us to notice, but an edge detector sees a change in image values. English captions are optional and start off. The complete transcript follows the written lesson.
What you will learn
The border of a cup is easy for us to notice, but an edge detector sees a change in image values.
Find intensity changes
The scratch has an edge, but so does a shadow cast across our metal part. An edge detector measures change in the image; it doesn't know which change belongs to damaged metal. That is why an edge map is a clue to inspect, not a finished object label.
Build an edge map
Gradients measure how intensity changes horizontally and vertically. Combining them shows where a change is strong and which direction it faces. A Canny detector builds on this idea with smoothing, thinning, and linked thresholds. A setting that works under bright inspection lighting can admit grain in a dark capture.
Sharpen with restraint
Sharpening answers another question. It boosts visible detail, often by adding back some difference between the image and a blurred copy. That can make our scratch easier to see, but it can also create bright and dark halos beside a strong boundary. Put the original, edge map, and sharpened image next to each other and inspect the shadow too.
A worked example
If the row of pixels changes abruptly from twenty to two hundred, that's an edge candidate. We still need context to tell shadow from defect. Next, we'll turn intensity differences into a candidate region using thresholding.
Worked example
Suppose a short row of intensities is 20, 20, 20, 200, 200. The large change between the third and fourth values is an edge candidate. The values alone do not tell us whether it is a physical object boundary or simply the edge of a shadow.
Quick check: test your understanding
Try it yourself: Find one object boundary and one shadow boundary in a photograph. Would an intensity-based edge detector necessarily distinguish them?
Check the reasoning
No. Both can produce strong gradients. Distinguishing their meanings requires additional context or a more complete model.
Does sharpening create reliable missing detail?
No. It emphasizes existing variations and may introduce artifacts.
How would you solve the practice case?
No. Both can produce strong gradients. Distinguishing their meanings requires additional context or a more complete model.
What does the worked example show?
Suppose a short row of intensities is 20, 20, 20, 200, 200. The large change between the third and fourth values is an edge candidate. The values alone do not tell us whether it is a physical object boundary or simply the edge of a shadow.
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 9 transcript192 words · Video transcript · Matches the published narration and captionsOpen transcript
The scratch has an edge, but so does a shadow cast across our metal part. An edge detector measures change in the image; it doesn't know which change belongs to damaged metal. That is why an edge map is a clue to inspect, not a finished object label.
Gradients measure how intensity changes horizontally and vertically. Combining them shows where a change is strong and which direction it faces. A Canny detector builds on this idea with smoothing, thinning, and linked thresholds. A setting that works under bright inspection lighting can admit grain in a dark capture.
Sharpening answers another question. It boosts visible detail, often by adding back some difference between the image and a blurred copy. That can make our scratch easier to see, but it can also create bright and dark halos beside a strong boundary. Put the original, edge map, and sharpened image next to each other and inspect the shadow too.
If the row of pixels changes abruptly from twenty to two hundred, that's an edge candidate. We still need context to tell shadow from defect. Next, we'll turn intensity differences into a candidate region using thresholding.