← Computer Vision for EveryoneToolsInVisionLearning Center
Calibration and Measurement · Lesson 24

Measure a Planar Region with a Homography

Parking spaces on a flat pavement have different image shapes.

Watch the lesson

Measure a Planar Region with a Homography explained visually

1:04

Parking spaces on a flat pavement have different image shapes. English captions are optional and start off. The complete transcript follows the written lesson.

Lesson overview

What you will learn

Parking spaces on a flat pavement have different image shapes.

  1. A practical question
  2. The useful idea
  3. Work through the example
  4. Limits and next step
01

A practical question

The parking camera sees a painted space as a slanted quadrilateral. On the ground, the marked rectangle has a known size. If its corners lie on the same plane, a homography can map between positions on that plane and positions in the image.

02

The useful idea

Match at least four suitable non-collinear point pairs, then estimate the projective mapping. Transform the space corners and inspect the overlay. The mapping can make a top-down view of the ground plane, but it cannot correctly flatten a tall car as though its roof were on the asphalt.

03

Work through the example

Measure a held-out painted segment in the rectified ground view and compare with its known length. Be careful near a poorly covered edge, where small corner mistakes can produce large measurement errors.

04

Limits and next step

Keep the source image, point pairs, and plane definition. Next, we'll search for distinctive image locations that we can match across changing views.

Worked example

Use four or more well-spread point correspondences on the ground plane.

Knowledge check

Quick check: test your understanding

Try it yourself: In the situation described above, explain the method and one reason its output might be misleading.

Check the reasoning

A homography maps points on one plane between views, enabling a rectified pavement view. A tall moving car is off that plane and will not obey the ground homography.

What is the main idea behind measure a planar region with a homography?

A homography maps points on one plane between views, enabling a rectified pavement view.

How is it used in the example?

Use four or more well-spread point correspondences on the ground plane.

What limitation should be checked?

A tall moving car is off that plane and will not obey the ground homography.

Further reading

Programming Computer Vision with Python — Jan Erik Solem.

Original ToolsInVision teaching examples. Editorial approach · Suggest a correction

Accessible referenceLesson 24 transcript146 words · Video transcript · Matches the published narration and captionsOpen transcript

The parking camera sees a painted space as a slanted quadrilateral. On the ground, the marked rectangle has a known size. If its corners lie on the same plane, a homography can map between positions on that plane and positions in the image.

Match at least four suitable non-collinear point pairs, then estimate the projective mapping. Transform the space corners and inspect the overlay. The mapping can make a top-down view of the ground plane, but it cannot correctly flatten a tall car as though its roof were on the asphalt.

Measure a held-out painted segment in the rectified ground view and compare with its known length. Be careful near a poorly covered edge, where small corner mistakes can produce large measurement errors.

Keep the source image, point pairs, and plane definition. Next, we'll search for distinctive image locations that we can match across changing views.