Align Two Views and Check Residual Error
Two views nearly line up, but corners still drift apart.
Read the full lesson and open its transcript below. A narrated video will be added after production.
What you will learn
Two views nearly line up, but corners still drift apart.
A practical question
Two conveyor cameras have been aligned, and the images look close. Yet a corner on the far side is still several pixels apart. A pleasing overlay doesn't tell us the size or pattern of the remaining error. We need to measure it.
The useful idea
Find corresponding points in the two views. Fit a suitable transform from some of them, then hold out other points for checking. Transform each held-out location and draw a short arrow to where the same feature actually appears. Those arrows are residual errors. Their length shows how far off the mapping is; their directions can reveal a systematic mistake.
Work through the example
If errors grow toward one side, perhaps the chosen transform cannot describe the perspective change. If only one match is far away, inspect whether that correspondence was wrong. Report the error in pixels and, if needed, use a calibrated scale to discuss physical distance. Don't tune the mapping on the held-out checks and then call them independent evidence. Fit an alignment on some matched landmarks and reserve a few others for checking. A low error on points used to fit the mapping can hide a poor result elsewhere. Overlay both views and inspect the held-out landmarks as well as image edges. If errors grow toward one side, investigate lens distortion or an unsuitable mapping rather than repeatedly adjusting the same points. Report the residual error with its pixel scale so a reader knows whether it matters for the measurement. Use this case to test your understanding: Hold out a few matched points to measure the error after alignment. Here is the limitation to watch for: Small average error can hide one region with a severe mismatch. This supports a careful conclusion: Registration estimates a transform from corresponding structures, then checks residual displacement.
Limits and next step
Save the correspondence list and overlay. Next, we'll leave geometry and examine how to adjust brightness without confusing it with color.
Worked example
Hold out a few matched points to measure the error after alignment.
Quick check: test your understanding
Try it yourself: Consider this case: Hold out a few matched points to measure the error after alignment. Explain how you would check the result. In your answer, address this limitation: Small average error can hide one region with a severe mismatch.
Check the reasoning
Registration estimates a transform from corresponding structures, then checks residual displacement. Small average error can hide one region with a severe mismatch.
What is the main idea behind align two views and check residual error?
Registration estimates a transform from corresponding structures, then checks residual displacement.
How is it used in the example?
Hold out a few matched points to measure the error after alignment.
What limitation should be checked?
Small average error can hide one region with a severe mismatch.
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 52 transcript314 words · Narration ready for the upcoming videoOpen transcript
Two conveyor cameras have been aligned, and the images look close. Yet a corner on the far side is still several pixels apart. A pleasing overlay doesn't tell us the size or pattern of the remaining error. We need to measure it.
Find corresponding points in the two views. Fit a suitable transform from some of them, then hold out other points for checking. Transform each held-out location and draw a short arrow to where the same feature actually appears. Those arrows are residual errors. Their length shows how far off the mapping is; their directions can reveal a systematic mistake.
If errors grow toward one side, perhaps the chosen transform cannot describe the perspective change. If only one match is far away, inspect whether that correspondence was wrong. Report the error in pixels and, if needed, use a calibrated scale to discuss physical distance. Don't tune the mapping on the held-out checks and then call them independent evidence. Fit an alignment on some matched landmarks and reserve a few others for checking. A low error on points used to fit the mapping can hide a poor result elsewhere. Overlay both views and inspect the held-out landmarks as well as image edges. If errors grow toward one side, investigate lens distortion or an unsuitable mapping rather than repeatedly adjusting the same points. Report the residual error with its pixel scale so a reader knows whether it matters for the measurement. Use this case to test your understanding: Hold out a few matched points to measure the error after alignment. Here is the limitation to watch for: Small average error can hide one region with a severe mismatch. This supports a careful conclusion: Registration estimates a transform from corresponding structures, then checks residual displacement.
Save the correspondence list and overlay. Next, we'll leave geometry and examine how to adjust brightness without confusing it with color.