Forum

Author Topic: Write Camera Locations to EXIF  (Read 15088 times)

mwillis

  • Full Member
  • ***
  • Posts: 140
    • View Profile
Write Camera Locations to EXIF
« on: May 27, 2012, 05:41:09 PM »
It would be very useful on some projects to be able to write the camera orientation (exterior orientation) data to each images EXIF header.  This would be great in the following workflow:
  • Place ground control (actual markers on the ground)
  • Conduct aerial photography withOUT an onboard IMU (like with a kite)
  • Process the data in PhotoScan to determine camera locations
  • Write camera locations to EXIF
  • Start a new PhotoScan project and import photos but use new EXIF data for camera locations

Why would one do this?  I’ve found in some projects with multiple chunks when using Differentially-corrected GPS data collected at ground marker that some errors still exist.  These errors can cause slight might alignments of the chunks.  If EXIF data is used to generally align things, these misalignments seem to be go away or are reduced.

I’ve tested writing to the EXIF data with external programs and this process works.

Thanks,

Mark

Alexey Pasumansky

  • Agisoft Technical Support
  • Hero Member
  • *****
  • Posts: 15168
    • View Profile
Re: Write Camera Locations to EXIF
« Reply #1 on: May 27, 2012, 07:07:23 PM »
Hello Mark,

Have you tried already Export/Import buttons on Ground Control pane? Or there are any reasons why this method is unsuitable while EXIF data does?
Best regards,
Alexey Pasumansky,
Agisoft LLC

mwillis

  • Full Member
  • ***
  • Posts: 140
    • View Profile
Re: Write Camera Locations to EXIF
« Reply #2 on: May 28, 2012, 01:44:05 AM »
Hi Alexey, I have tried using the import/export buttons.  That works fine for importing the markers but doesn't seem to change the camera location parameters.  Perhaps I’m missing a step?  Here is what I’m doing in the latest build of PhotoScan Pro:


  • Start a new project
  • Adding 5 photos
  • Aligning the 5 photos
  • Building the geometry for the photos
  • Add several markers at locations on the ground with known lat/long WGS 84 locations (precision ~20cm). I do this on the 3D model.
  • In Ground Control, I enter the lat/long/altitude for the markers
  • In Ground Control Settings, I choose the WGS84 (EPSG::4326) coordinate system
  • Optimize and rebuild geometry
  • In Ground Control, I choose Export,  leave everything at default, and save the results to a text file.
  • Inspection of the exported text file shows that reasonable orientation information for the cameras are present
  • Save project and close PhotoScan
  • Open PhotoScan  and start a new project
  • Add the same 5 photos from before
  • Then I go to Ground Control and choose import.  Import appears to do nothing unless I’ve manually added blank markers.  The external orientation for the photos is not changed.

Am I doing something wrong?  I am testing this approach on Kite Aerial Photography data but I also have UAVs.  I don’t have any problems importing exterior orientation data from the UAVs that write the coordinates to the EXIF.

I regularly get amazing results from PhotoScan.  I'm just not getting this approach to work.

Thanks,

Mark
« Last Edit: May 28, 2012, 01:50:24 AM by mwillis »

Alexey Pasumansky

  • Agisoft Technical Support
  • Hero Member
  • *****
  • Posts: 15168
    • View Profile
Re: Write Camera Locations to EXIF
« Reply #3 on: May 28, 2012, 06:00:28 PM »
Hello Mark,

Since there are no source data for camera positions in Ground Control pane they can't be saved. So you have to use estimated values - just check on "Save estimated values" in the export dialog. But make sure that you select correct colums when import this file back.
Best regards,
Alexey Pasumansky,
Agisoft LLC

mwillis

  • Full Member
  • ***
  • Posts: 140
    • View Profile
Re: Write Camera Locations to EXIF
« Reply #4 on: May 28, 2012, 06:16:24 PM »
Thanks for prompt replies, Alexey!  I am doing as you recommend (at least I think I am) and I can not import the camera orientations.  The exported file contains orientation information but it does not import.

Have you tried this recently in 0.8.5 build 1432?  Maybe there is a bug?

Many thanks, Mark

Alexey Pasumansky

  • Agisoft Technical Support
  • Hero Member
  • *****
  • Posts: 15168
    • View Profile
Re: Write Camera Locations to EXIF
« Reply #5 on: May 28, 2012, 06:52:53 PM »
Hello Mark,

Just checked in the latest release (build 1423) and everything worked correctly.

At the export step you need to check Export Estimated and Export Orientation flags.
And at the import step it is necessary to check on Load orientation flag.

Best regards,
Alexey Pasumansky,
Agisoft LLC

mwillis

  • Full Member
  • ***
  • Posts: 140
    • View Profile
Re: Write Camera Locations to EXIF
« Reply #6 on: May 29, 2012, 12:52:46 AM »
Alexey, I see my problem and now understand what you meant by selecting the correct columns.  It works great!

Thanks again,

Mark