Technology for Wildlife Foundation

View Original

Calculating a drone camera's image footprint OR How I learned to love tan again.

When we use drones for mapping purposes, we usually program them to fly autonomously along a pre-programmed flight path, collecting images with a specified front- and side- overlap. Once we have enough images covering the area to be mapped, we stitch them all together to create the final map. This really doesn’t require us to think a lot about the length and width of each image; the only two limiting factors we usually need to consider are the final map’s (or technically, orthorectified mosaic’s) spatial resolution and the drone’s maximum legal height.

However, one of the projects we’re currently working on is not so much a mapping project as it is ecological research, and to cut a long story short, ensuring that we can correctly apply a set of ecological statistical tools that account for double-counting and observer error requires us to be able to ascertain the length and width of each image at different drone altitudes. Also, as we work with a number of different drones (and thus drone cameras), I wanted to have a set of equations in place that we could use for a variety of situations. All of this required some high-school level trigonometry to work out; I was never a fan of trigonometry as a teenager, but using it to understand both the Triangular Greenness Index (as detailed in a previous post on vegetation indices) and the current problem was actually a lot of fun.

To break the problem down, the two fixed variables are a camera’s field of view (FoV), which is described as the angle which it can ‘see’ at any given instant, and its aspect ratio, which is the ratio between the length and width of its images. For example, from the technical descriptions, a Phantom 3 Advanced camera has a FoV of 94° and user-selectable aspect ratios of 4:3 and 16:9, while the Phantom 4 Pro 2.0 has an FoV of 84° and user-selectable aspect ratios of 3:2, 4:3 and 16:9. In combination with the height of the drone, these two camera-parameters determine the final image footprint. For more on aspect ratios, see this post which recommends using the native aspect ratio for any given camera.

Caveats:

! These equations assume the camera to be perpendicular to the ground and don’t account for lens distortion. For a far more complex solution (which I have to admit I barely understand) look up this post (StackExchange) where mountainunicycler (Github user) describes nesting a Python script within Latex (what) which then calculates the FoV of a drone-mounted camera and outputs a PDF with graphics ( I can’t even.) !


See this content in the original post

So, if we know the field of view (θ°), the aspect ratio (r) and the height of the drone (x), equations (5) and (6) allow us to determine the image footprint. To calculate the area of the image, the math is simply (A) * (B), which is the formula for the area of a triangle.

To flip this around, the other equation we needed for this project was to determine the height we needed to fly the drone, given a specific image footprint i.e. given (A), calculate (x). This is straightforward, since it means we just need to make (x) the subject, as opposed to (A), in equation (5).


See this content in the original post

In summary, equations (5) and (6) allow us to use the FoV, aspect ratio and height of any given camera to determine the image footprint, while equation (7) allows us to determine what height we should fly a drone at, given a desired horizontal image dimension.

I’ve used these equations to create a calculator in Excel; note that Excel uses radians as the default unit for angles. Using this calculator, I can determine that with a FoV of 94°, an aspect ratio of 4:3 and a drone height of 60m, the image footprint would be 102.9m * 77.2m, while with an FoV of 77°, an aspect ratio of 16:9 and the same drone height, the image footprint would be 83.1m * 46.8m. Similarly, if I wanted an image length of 50m with the first camera (FoV = 94° and aspect ration = 4:3), I would need to fly the drone at a height of 41.25m.

Let us know if you have any comments or find any errors in the math! We’re on Twitter at @techforwildlife, and you can mail us at contact@techforwildlife.com. As usual, comments on this post will be open for a few days.