Author Topic: Correcting difference between ground plane and origin  (Read 2223 times)


  • Newbie
  • *
  • Posts: 13
    • View Profile
Correcting difference between ground plane and origin
« on: August 16, 2018, 09:54:57 PM »
I'm trying to automate the generation of orthomosaics and models. There is only one problem currently, that being that when I export the model, the origin point does not align with the "ground" plane that I'd expect it to.

The photos are taken with a DJI drone, so there should be sufficient altitude data to rectify this issue.

My first plan was to simply get the transform location of the camera in PhotoScan and then offset the chunk by whatever the difference was with the reported altitude in the EXIF data. However, I believe there's some sort of coordinate system translation that needs to occur beforehand, as the translation matrices of the cameras are, for example:

Code: [Select]
Out[138]: 2018-08-16 11:45:05 Vector([-0.41432089205811645, 4.574950116471244, 0.02561866387081857])

Meanwhile, the chunk translation is:

Code: [Select]
Out[145]: 2018-08-16 11:47:10 Vector([-2238541.869777814, -3528167.781020327, 4742206.90104938])

I'm not sure in what units these are supposed to be or how to proceed. Any help is appreciated!

The camera reports it's altitude as:

Code: [Select]
2018-08-16 11:49:33    drone-dji:AbsoluteAltitude="+64.49"
2018-08-16 11:49:33    drone-dji:RelativeAltitude="+51.20"

Thanks :)

P.S. Is it possible that it's using the AbsoluteAltitude to determine the ground plane? How could I attempt to translate the chunk "down" by a set distance in meters?
« Last Edit: August 16, 2018, 11:39:52 PM by colin.spexigeo »

Alexey Pasumansky

  • Agisoft Technical Support
  • Hero Member
  • *****
  • Posts: 14927
    • View Profile
Re: Correcting difference between ground plane and origin
« Reply #1 on: August 17, 2018, 10:26:03 PM »
Hello colin.spexigeo,

I would rather suggest to add the fixed altitude offset to all the reference coordinates of the camera positions that are enabled in the Reference pane, rather than modifying chunk.transform matrix.

Maybe you would be interested in the following scripts:
the first one reads AbsoluteAltitude from the XMP and substitutes the altitude data for the cameras in the Reference pane:
the second one allows to add the same offset to all the camera Z-coordinates in the Reference pane:
Best regards,
Alexey Pasumansky,
Agisoft LLC