Forum

Author Topic: Where to store Roll Pitch Yaw data in EXIF for import into PS  (Read 33103 times)

andrekje

  • Jr. Member
  • **
  • Posts: 63
    • View Profile
Re: Where to store Roll Pitch Yaw data in EXIF for import into PS
« Reply #15 on: May 17, 2016, 02:16:40 PM »
Yes, I just hoped you invented some names, that were read if existing.
That would save a step.
Is there an example script that does it ?

Alexey Pasumansky

  • Agisoft Technical Support
  • Hero Member
  • *****
  • Posts: 15146
    • View Profile
Re: Where to store Roll Pitch Yaw data in EXIF for import into PS
« Reply #16 on: May 17, 2016, 02:25:15 PM »
An example of reading orientation angles from the DJI xmp-extension is given here:
http://www.agisoft.com/forum/index.php?topic=5008

But since the data can be saved anywhere, there's no script that will work in any cases, as it should be based on the format of the input data.
Best regards,
Alexey Pasumansky,
Agisoft LLC

andrekje

  • Jr. Member
  • **
  • Posts: 63
    • View Profile
Re: Where to store Roll Pitch Yaw data in EXIF for import into PS
« Reply #17 on: May 17, 2016, 03:43:36 PM »
Thank you.
The reason I am asking, is not to save processing power, it's because I had some flights in very strong winds where plane had to crosstrack at 70degree yaw to keep the planned pattern.
Of course, that reduced overlap significantly,  and resulted in a bunch of holes.

(the photos were aligned by reference)

Do you know wherever adding yaw data would help at all, or an modified/different method of alignment would better find matching points ?


Alexey Pasumansky

  • Agisoft Technical Support
  • Hero Member
  • *****
  • Posts: 15146
    • View Profile
Re: Where to store Roll Pitch Yaw data in EXIF for import into PS
« Reply #18 on: June 13, 2016, 09:29:20 PM »
Hello andrekje,

Version 1.2.5 should allow to load the camera orientation angles defined using XMP image header extension. You need to check on the corresponding option in the Preferences window first, before using Import EXIF option.
If you have any issues with that, please provide image sample to us.

Angle orientation information may help, if the data is accurate. Also it may help for Reference preselection option when oblique aeiral images are processed.
Best regards,
Alexey Pasumansky,
Agisoft LLC

Paulo

  • Hero Member
  • *****
  • Posts: 1357
    • View Profile
Re: Where to store Roll Pitch Yaw data in EXIF for import into PS
« Reply #19 on: June 13, 2016, 11:31:07 PM »
Dear Alexey,

with latest version, I am trying to read yaw, pitch and roll activating the Load camera orientation angles from XMP meta data option in Advanced Preferences and it fails for the following image (see attachment for exif data read with Exif Tool).

With Exif Tool, i can see that it has following XMP entries:

---- XMP-Camera ----
GPSXY Accuracy                  : 6.571000099182129
GPSZ Accuracy                   : 5.468999862670898
Pitch                           : 3.630061864852905
Roll                            : 2.026665210723877
Yaw                             : 265.078704833984375

What would be the cause?

Regards,
Best Regards,
Paul Pelletier,
Surveyor

Dmitry Semyonov

  • Agisoft Technical Support
  • Full Member
  • *****
  • Posts: 201
    • View Profile
Re: Where to store Roll Pitch Yaw data in EXIF for import into PS
« Reply #20 on: June 14, 2016, 11:25:33 AM »
Hello pap1956,

Unfortunately Camera orientation from XMP currently doesn't support Sensefly produced images. Can you please send a sample image to support@agisoft.com so that we can make sure it is included in the next update? Exif Tool output provided is not sufficient for implementation.
With best regards,
Dmitry Semyonov
Agisoft

Paulo

  • Hero Member
  • *****
  • Posts: 1357
    • View Profile
Re: Where to store Roll Pitch Yaw data in EXIF for import into PS
« Reply #21 on: June 14, 2016, 08:17:04 PM »
Thanks Dmitry,

have sent to support sample images from both Sensefly eBee and Phantom2 Vision FC200 that have same problem .
Best Regards,
Paul Pelletier,
Surveyor

Dmitry Semyonov

  • Agisoft Technical Support
  • Full Member
  • *****
  • Posts: 201
    • View Profile
Re: Where to store Roll Pitch Yaw data in EXIF for import into PS
« Reply #22 on: June 14, 2016, 09:14:34 PM »
Hello pap1956,

Thanks for providing sample images, support for both XMP variants will be added in the next update.
With best regards,
Dmitry Semyonov
Agisoft

jmos

  • Newbie
  • *
  • Posts: 16
    • View Profile
Re: Where to store Roll Pitch Yaw data in EXIF for import into PS
« Reply #23 on: June 24, 2017, 10:40:27 AM »
Hi, would also like to use orientation data to improve referencing.
Currently using Hasselblad camera and OXTS RT-3042 IMU.

Would be good to hear about different results.

John
« Last Edit: June 26, 2017, 03:41:23 AM by jmos »

harrytwomey

  • Newbie
  • *
  • Posts: 41
    • View Profile
Re: Where to store Roll Pitch Yaw data in EXIF for import into PS
« Reply #24 on: April 17, 2019, 11:47:02 AM »
hi could you possible have an example script, thatwe could change the vairable to match the values in our exif, we would like to import yaw pitch roll, also xy accuracy and z accuracy

harrytwomey

  • Newbie
  • *
  • Posts: 41
    • View Profile
Re: Where to store Roll Pitch Yaw data in EXIF for import into PS
« Reply #25 on: April 17, 2019, 01:07:35 PM »
i think i did it

Code: [Select]
# Script to add exif for SODA Meta data for all cameras in the active chunk.

import PhotoScan

# Checking compatibility
compatible_major_version = "1.4"
found_major_version = ".".join(PhotoScan.app.version.split('.')[:2])
if found_major_version != compatible_major_version:
    raise Exception("Incompatible PhotoScan version: {} != {}".format(found_major_version, compatible_major_version))

def sodaADD():
"""
Reads Soda/accuracy/YPR
"""
doc = PhotoScan.app.document
if not len(doc.chunks):
raise Exception("No chunks!")
print("Script started...")
chunk = doc.chunk

for camera in chunk.cameras:
vect = PhotoScan.Vector((10, 10, 10))
locationAccuracy = PhotoScan.Vector((10, 10, 10))
if 'Sensefly/Yaw' in camera.photo.meta.keys():
vect[0] = float(camera.photo.meta["Sensefly/Yaw"])
if 'Sensefly/Pitch' in camera.photo.meta.keys():
vect[1] = float(camera.photo.meta["Sensefly/Pitch"])
if 'Sensefly/Roll' in camera.photo.meta.keys():
vect[2] = float(camera.photo.meta["Sensefly/Roll"])

print(vect)

if 'Sensefly/GPSXYAccuracy' in camera.photo.meta.keys():
locationAccuracy[0] = float(camera.photo.meta["Sensefly/GPSXYAccuracy"])
if 'Sensefly/GPSXYAccuracy' in camera.photo.meta.keys():
locationAccuracy[1] = float(camera.photo.meta["Sensefly/GPSXYAccuracy"])
if 'Sensefly/GPSZAccuracy' in camera.photo.meta.keys():
locationAccuracy[2] = float(camera.photo.meta["Sensefly/GPSZAccuracy"])

print(locationAccuracy)

camera.reference.rotation = vect
camera.reference.location_accuracy = locationAccuracy

chunk.updateTransform()
PhotoScan.app.update()
print("Script finished")

label = "Custom menu/Add S.O.D.A Exif Data"
PhotoScan.app.addMenuItem(label, sodaADD)
print("To execute this script press {}".format(label))

Alexey Pasumansky

  • Agisoft Technical Support
  • Hero Member
  • *****
  • Posts: 15146
    • View Profile
Re: Where to store Roll Pitch Yaw data in EXIF for import into PS
« Reply #26 on: April 17, 2019, 01:36:22 PM »
Hello harrytwomey,

Aren't these values loaded automatically to the Reference pane, if you enable "Load Camera Orientation Angles from XMP meta" and "Load Camera Location Accuracy from XMP meta" in the Advanced Preferences tab?
I think they were supported already in PhotoScan Pro 1.4.5.
Best regards,
Alexey Pasumansky,
Agisoft LLC