I am using a DJI Mavic 3M drone to capture images from the ground view. DJI provides a guide on how to correct the images for the lens distortion. Each captured image contains XMP metadata about the GPS location of the drone, the yaw, pitch and roll angles of the gimbal, matrix parameters for undistorting the image using OpenCV.
From this, I want to compute the WGS84 coordinates for any pixel on the image.
I marked some points on the ground. The camera was pointing directly down, having a pitch orientation of nearly -90°
. The results weren't good enough for my use case. Down below the average error:
µ: 0.3784 m | σ: 0.1822 m
I found these issues:
The ground sample distance is way too small. Our images have a dimension of
5280x3956
pixels. The focal length of the camera is12.29mm
, the sensor width is17.3mm
and the sensor height is13mm
. The drone flew around12m
. This results in a ground sample distance of around3.2mm/pixel
. I sprayed a2mx2m
rectangle on the ground and the calculation resulted in a1.8mx1.8x
rectangle. I had to increase the GSD to around3.75mm/pixel
The yaw angle is also slightly wrong. In the metadata, the yaw angle of the gimbal is stored. However, I needed to subtract some degrees (~5°) to improve the results
There was also a slight offset in the coordinates
Is anyone familiar with georeferencing on a single image and can point out what steps I am missing? I already have undistorted the image using the parameters stored in the metadata. I am also aware that this question has been asked in some form or another (#1, #2), but the answers unfortunately didn't help me.
Below is a plot showing the problem. The red crosses are the markers I sprayed on the ground, the blue dots are the points that I have computed. The green cross is the position of the drone in the moment it captured the image.