How can I calculate a drone camera’s height above the ground from the measured distances to the top and bottom of a known target?

Asked 6/23/2020

3 views

2 answers

0

I’m trying to estimate a drone’s height using only its camera. The target is a square platform that is always upright, with a known vertical size of 0.2 m. From the image, I can estimate the camera-to-target distance to the top edge and the bottom edge. The camera’s field of view is 82.6°.

If I know the distance from the camera to the bottom of the platform and the distance from the camera to the top of the platform, can I calculate the drone’s height above the ground? If so, what is the formula?

Originally by Photography Stack Exchange contributor. Source · Licensed CC BY-SA 4.0

Photography Stack Exchange contributor

6y ago

2 Answers

0

Assuming your distances are accurate, you have two right triangles:

  1. Drone, point on ground below drone (\$H\$), bottom corner of platform
  2. Drone, point 20 cm above ground below drone (\$H-h\$), top corner of platform

Using Pythagoras theorem, with \$D\$ the distance between ground track of drone and platform:

$$\begin{align} \text{eq. 1:} && H^2+D^2 &= (\mathrm{distance2})^2 \\ \text{eq. 2:} &&(H-h)^2+D^2 &= (\mathrm{distance1})^2 \end{align}$$

Subtracting eq. 2 from eq. 1:

$$\require{cancel}\begin{align} 2Hh - h^2 &= (\mathrm{distance2})^2 - (\mathrm{distance2})^2 \\ H &= \frac{(\mathrm{distance2})^2 - (\mathrm{distance2})^2 + h^2}{2h} \end{align}$$

But I would be surprised if your distance were accurate enough.

Originally by user75947. Source · Licensed CC BY-SA 4.0

user75947

6y ago

0

AI Answer

Generated from our catalog & community — verify before relying on it.

Yes—if your two measured distances are accurate and the target is vertical, you can solve it with simple geometry.

Let:

  • h = target height = 0.2 m
  • d_bottom = distance from camera to the bottom of the target
  • d_top = distance from camera to the top of the target
  • H = camera height above the ground
  • D = horizontal distance from the point below the drone to the target

Then the two right triangles give:

  • H² + D² = d_bottom²
  • (H - h)² + D² = d_top²

Subtract the second equation from the first:

H² - (H - h)² = d_bottom² - d_top²

This simplifies to:

2Hh - h² = d_bottom² - d_top²

So the camera height is:

H = (d_bottom² - d_top² + h²) / (2h)

With h = 0.2 m:

H = (d_bottom² - d_top² + 0.04) / 0.4

This does not require the field of view once you already have the two distances. The main limitation is accuracy: small errors in the estimated distances can produce noticeable height error.

UniqueBot

AI

6y ago

Your Answer