Forum

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

nanders

  • Newbie
  • *
  • Posts: 25
    • View Profile
Hi all,

I noticed one can import GPS and orientation data from the EXIF metadata in the images.

I have Roll, Pitch and Yaw data of my (UAV-based) images in a separate csv file, but I can't find where to store it in the EXIF data so that PhotoScan is able to import it.

anyone can help me with this?
thanks!

Niels

Alexey Pasumansky

  • Agisoft Technical Support
  • Hero Member
  • *****
  • Posts: 15168
    • View Profile
Re: Where to store Roll Pitch Yaw data in EXIF for import into PS
« Reply #1 on: July 03, 2014, 04:20:20 PM »
Hello Niels,

You can check EXIF 2.3 standard specification:
http://www.cipa.jp/std/documents/e/DC-008-2012_E.pdf
Best regards,
Alexey Pasumansky,
Agisoft LLC

nanders

  • Newbie
  • *
  • Posts: 25
    • View Profile
Re: Where to store Roll Pitch Yaw data in EXIF for import into PS
« Reply #2 on: July 03, 2014, 05:33:37 PM »
thank you for your reply.

from that document I learn that there is a tag called GPSImgDirection which contains information about the direction (yaw), also mentioned in the exiftool documentation and here on the forum.

From the latter forum post I also learned there should be support for GPSRoll and GPSPitch tags in the EXIF structure. I guess my images (from Panasonic GX1) don't support these GPSRoll and GPSPitch tags (exiftool mentions there are no such tags), and data in GPSImgDirection doesn't get imported into PhotoScan.

I guess the easiest workaround for me right now is to hack the xml of the psz files and include the attitude info there.

ozbigben

  • Jr. Member
  • **
  • Posts: 64
    • View Profile
Re: Where to store Roll Pitch Yaw data in EXIF for import into PS
« Reply #3 on: July 04, 2014, 01:00:13 AM »
You could try using EXIFTool to format the EXIF data from the images e.g. http://www.sno.phy.queensu.ca/~phil/exiftool/geotag.html#Inverse

nanders

  • Newbie
  • *
  • Posts: 25
    • View Profile
Re: Where to store Roll Pitch Yaw data in EXIF for import into PS
« Reply #4 on: July 04, 2014, 10:05:28 AM »
Thanks, I will look into that!

ozbigben

  • Jr. Member
  • **
  • Posts: 64
    • View Profile
Re: Where to store Roll Pitch Yaw data in EXIF for import into PS
« Reply #5 on: July 04, 2014, 12:04:48 PM »
Forgot to mention that one of the good things about Exiftool id that even though it may not be able to write a specific tag, it will extract any metadata it can find in an image. I use:
Code: [Select]
exiftool -s %1 > metadata.txtfor a drag and drop batch file to list the available metadata in an image into a text file. When you're setting up your format file just take the field names from this and prefix them with "$" wherever you want a field value written.
« Last Edit: July 04, 2014, 12:48:21 PM by ozbigben »

MK

  • Newbie
  • *
  • Posts: 13
    • View Profile
Re: Where to store Roll Pitch Yaw data in EXIF for import into PS
« Reply #6 on: July 04, 2014, 06:00:13 PM »
Correct me if i'm wrong, but does Photoscan uses roll/pitch/yaw? Then whats the point of such data import?

nanders

  • Newbie
  • *
  • Posts: 25
    • View Profile
Re: Where to store Roll Pitch Yaw data in EXIF for import into PS
« Reply #7 on: July 08, 2014, 03:53:27 PM »
I wasn't able to import attitude data from exif tags, so I generated the xml code myself and zipped it to create a psz project file. Now attitude data is included.

@mk_horus: PS shows measured and predicted yaw/pitch/roll so I assume it also uses these parameters for camera alignment. See screenshot:


Alexey Pasumansky

  • Agisoft Technical Support
  • Hero Member
  • *****
  • Posts: 15168
    • View Profile
Re: Where to store Roll Pitch Yaw data in EXIF for import into PS
« Reply #8 on: July 08, 2014, 04:04:40 PM »
Hello Niels,

Error values are the difference between source (that you've input) and estimated by PhotoScan. Source values are still not used during Align Photos stage.

And wasn't that easier to generate a plain text file with camera labels, positions and orientation angles and import it using the corresponding button on the Ground Control pane?
Best regards,
Alexey Pasumansky,
Agisoft LLC

nanders

  • Newbie
  • *
  • Posts: 25
    • View Profile
Re: Where to store Roll Pitch Yaw data in EXIF for import into PS
« Reply #9 on: July 08, 2014, 04:17:14 PM »
oh okey, so yaw/pitch/roll values does not influence accuracy of the alignment, I wasn't sure.
How about altitude? is that also not taking into account in the camera alignment phase?

I assumed the files with ground control should contain new cameras, instead of already imported cameras. Now I think of it a bit longer the ground control files are indeed used to describe the existing photos. I guess you're right that is easier (not that the xml was really hard) and more straightforward.

Alexey Pasumansky

  • Agisoft Technical Support
  • Hero Member
  • *****
  • Posts: 15168
    • View Profile
Re: Where to store Roll Pitch Yaw data in EXIF for import into PS
« Reply #10 on: July 08, 2014, 04:19:26 PM »
PhotoScan uses camera position information during Align Photos stage to reduce the processing time by matching only those cameras, that are overlapping according to the Ground Control pane information (searching in some radius).
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 #11 on: May 16, 2016, 11:46:46 PM »
please post a properly geotagged photo (with pitch/roll/yaw )   - as I had no success finding the exif tags Photoscan pro is  reading to get those values.

Alexey Pasumansky

  • Agisoft Technical Support
  • Hero Member
  • *****
  • Posts: 15168
    • View Profile
Re: Where to store Roll Pitch Yaw data in EXIF for import into PS
« Reply #12 on: May 17, 2016, 01:38:27 PM »
Hello andrekje,

PhotoScan reads the following EXIF tags:
GPSLatitudeRef
GPSLatitude
GPSLongitudeRef
GPSLongitude
GPSAltitudeRef
GPSAltitude

If you need to load the orientation angle information as well, you can use Python scripting for custom data import from the image header.
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 #13 on: May 17, 2016, 02:04:13 PM »
So, pitch, roll, yaw is not imported automatically from exif when adding photos, an script is needed ?

Alexey Pasumansky

  • Agisoft Technical Support
  • Hero Member
  • *****
  • Posts: 15168
    • View Profile
Re: Where to store Roll Pitch Yaw data in EXIF for import into PS
« Reply #14 on: May 17, 2016, 02:13:05 PM »
According to the EXIF 2.3 standard there are no fields dedicated to the yaw/pitch/roll angles:
http://www.cipa.jp/std/documents/e/DC-008-2012_E.pdf

It means that in case the data is saved in some other fields or header extensions, a custom script is required to read it.
Best regards,
Alexey Pasumansky,
Agisoft LLC