Aerial Camera Ground Footprint Calculation

2.1k Views Asked by At

I have a very simple math problem, but I cannot seem to figure it out. I need to calculate what portion of the ground will be visible when viewed from a UAV mounted camera. I believe I have it solved for looking straight down, but the camera is on a gimbal and will have a full range of motion in all axes.

The inputs to the problem will be the Altitude (m), camera focal length (mm), camera sensor x length (mm), camera sensor y length (mm), and the angle of tilt in each plane.

Here is what I have for when the camera is pointed straight down (Note: this gives me the length of each side of ground coverage. Ideally, I would like to have each point, in this case, the four corners of the rectangle.)

float cameraX; // camera sensor x size (mm)
float cameraY; // camera sensor y size (mm)
float cameraF; // camera focal length (mm); common lengths: 150mm (wide angle), 300mm (normal)
float altitude; // high above ground (m)
float ax;
float ay;

void calculateGroundCoverage() {
    ax = (altitude / cameraF) * cameraX;
    ay = (altitude / cameraF) * cameraY;
}

void printGroundCoverage() {
    System.out.print("x: " + cameraX + ", y: " + cameraY + ", f: " + cameraF + ", alt: " + altitude + "\t");
    System.out.println("footprint: " + ax + "m x " + ay + "m");
}
1

There are 1 best solutions below

0
On BEST ANSWER

What altitudes is this for?

For small ones (up to 0.5km) you can simplify ground by plane but only if camera view is close to perpendicular direction to surface (horizont is not in the view !!!) +/- some safety boundary to take the surface distortions into account. For higher altitudes you need to take into account that surface is ellipsoid.

I do it a bit differently then your approach (because I use DTM mapped on Earth's ellipsoid)

  1. create transform matrix representing your camera sensor


    chip plane mid point is the origin
    Z axis is the viewing direction (at least for me)
    X axis is camera right (*plane right) direction
    Y axis is camera up (*plane forward) direction
    * directions are for bottom view (camera is not rotated)

    look here: transform matrix anatomy for how to do it

  2. cast set of rays from camera covering whole screen

    for example make grid 8x8 rays evenly space on the screen with direction from focal point of camera into viewing direction. If you have ray in the middle it will have the same direction as Z axis of camera. All the rest will be rotated to cover the whole FOV

  3. compute intersection with surface

    for planar surface it is just intersection between plane and semiaxis. For ellipsoid it is a bit more complicated see:

    this will give you set of surface points that are visible by camera. If you need it in camera/plane space then convert it to it. Conversion of GCS to LCS is done by: camera_LCS_point=Inverse(camera_matrix)*surface_GCS_point;

    for plane local point you can create separate transform matrix representing plane...

  4. now form camera/plane LCS points you can simply extract min and max x,y coordinates

    these are the edges of area covered by camera view to increase precision you can find rays edge. So if your 2 neighbouring rays hits surface only once then cast the mid ray between them. This can be done recursively few times to increase precision without much complexity burden. Also you can add/sub some safety area to computed area based on the altitude and viewing direction

Take a look at this very similar QA: