I have a problem with geo-referenced photos from a DJI drone. I have the coordinates of the center of the photo and the metadata related to the photo and I would like to know how to go from a pixel to its relative coordinates.

Example metadata [Exif]:

latitude: 45.6426621388889 
longitude: -94.5975223611111
AbsoluteAltitude: 332.743835
FlightPitchDegree: 0.3
FlightRollDegree: 3
FlightYawDegree: 89
GimbalPitchDegree: -90
GimbalRollDegree: 0
GimbalYawDegree: 7.8
RelativeAltitude: 40.700001
TlinearGain: 0
altitude: 332.7
altitude_ref: 0
aperture: 1.25
f_number: 1.25
focal_length: 13
image_make: "DJI"
image_model: "FLIR"

Having these and knowing that you have a box positioned at the pixels: 113 (xmin), 360 (ymin), 139 (xmax), 406 (ymax) how can I get its coordinates?

From a software I was able to extrapolate a solution that brings me back:

-94.6002156260815 (minimum longitude)
45.6413373184107 (minimum latitude)
-94.5998767997666 (maximum longitude)
45.6417408827611 (maximum latitude)

The problem is that I cannot understand whether it is right or whether it is calculated.

  • Which software did you use to get these coordinates? Did you use a series of images to produce an image mosaic? The EXIF data gives you the position and orientation of the camera, that is different from a georeferenced image in that you only know the camera exterior (and maybe interior) orientation, but not where the image should be in a global coordinate system. PS: Note that saying there is a difference between "right" and "calculated" is a tricky matter because most coordinates are calculated and have some associated uncertainty, and so do measurements.
    – danscr
    Jul 31 '19 at 8:26
  • I start from the assumption that the software is not certified (so I do not trust) and also starts from the assumption (certainly not true but accepting the error) that the drone makes the photo perpendicular to the ground and that therefore the latitude and longitude value correspond in the center of the photo. However at the moment I'm not using a series of photos linked to each other, the processing is single for the moment but would it change something if I had more images in series (of which I would always have only the same information)?
    – ricky1192
    Jul 31 '19 at 8:43

The approach you're looking for is called monoplotting in photogrammetry. If given your assumptions on camera orientation, you will need a digital elevation model (unless you also assume the ground is perfectly flat), and also the size of your camera's imaging sensor. I'll try here to describe a simplified version of this process.

Given the position (I recommend to convert the coordinates to some metric system, e.g. UTM, to help in the vector calculations), the focal length and the image sensor size, you can calculate a vector with x= sensor_x / 2, y = sensor_y / 2, z = focal_length, where sensor_xand sensor_y are the width and height of your imaging sensor. You can now extend that vector to the ground using the flight altitude. If you want to do it more accurately though, I'd recommend repeating this for each pixel and resampling the result to a consistent image.

Anyway, I suppose this is what your software did, though I can't tell whether the result is reliable because I don't know which software you used.

If you have several images that have some overlap and are not taken from the exact same position, I recommend you use some photogrammetry software to get a georeferenced orthophoto. This will be much more accurate than monoplotting, as it doesn't have to rely on all the assumptions you made (position accuracy, camera internal orientation, etc.). An example would be https://www.opendronemap.org/.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.