The answersDownload the PDF
Worksheet

U11.3 Range from apparent size

Vision · University · about 35 min

BugBotLab
NameClassDate

What this lesson is about

A known object gives a range, and the range gets worse as the square of itself.

Questions 6 marks in all

  1. [1 mark]An 8 cm ball appears 20 pixels wide on a camera with f = 92.4 px. How far away is it, in cm to 1 decimal place?

  2. [1 mark]How many centimetres of range is one pixel of width worth for the 8 cm ball at 50 cm and at 100 cm?

    F, S = 92.4, 8.0
    for d in (50, 100):
        print(d, round(d * d / (F * S), 1))
  3. [1 mark]Why does range from apparent size get so much worse with distance?

    1. AThe apparent width falls as 1 / d, so one pixel is a larger fraction of it, and the range error grows as d squared
    2. BThe detector adds more noise to far objects
    3. CThe lens distorts distant objects
    4. DFar objects are nearer the edge of the frame
  4. [1 mark]Beyond what range is one pixel of width worth more than 10 percent of the range itself, for the 8 cm ball and f = 92.4? Give the range in cm to 1 decimal place.

  5. [1 mark]A flat tag 40 cm away is seen at 60 degrees rather than square on, and its range is worked out from the width of its bounding box. What range is reported, in cm?

  6. [1 mark]The box width and the area of the far ball give ranges about 3 cm apart (123.2 and 126.1 cm), and repeated frames give the same numbers. Which statements are right?

    Tick every answer that is true.

    1. AThis is quantisation of the box edges, not noise
    2. BAveraging repeated frames will not remove it
    3. CThe area is a sum over many pixels, so it is quantised far more finely than an edge
    4. DAveraging a few dozen frames will remove the disagreement
    5. EThe pinhole model does not apply to a far ball

The task: range from apparent size

Two red balls are on the mat, both 8 cm across. Standing still, print near: and far:, the range to each in centimetres worked out from how wide it looks, and per pixel:, how many centimetres of range one pixel of width is worth at the further ball.

from bugbot import *
connect()

F = 92.4
R = 4.0
set_cv("blob", "red")
wait(0.3)

Plan your program here, then type it in and press Run.

QR code
Do it on the robot
www.bugbotlab.com/learn/u11-3-range-from-size/
The simulator checks it and tells you when it passes. Nothing to install, no account.

Challenges

  1. Do it again using the area rather than the box width. How much do the two answers differ at each ball?
  2. At what range does one pixel become worth more than 10 percent of the range itself, for this ball and this camera?
  3. The depth sensor is also on board. Read it and compare. At which range does each instrument win?