Forum

Author Topic: Auto exporting of multiple single photos to ortho  (Read 20478 times)

Alexey Pasumansky

  • Agisoft Technical Support
  • Hero Member
  • *****
  • Posts: 14890
    • View Profile
Re: Auto exporting of multiple single photos to ortho
« Reply #15 on: April 28, 2015, 06:18:10 PM »
Hello bisenberger,

By default the orthophotos are saved to the folder with the project file.

But you can change the assignment of the path variable in  def exp_ortho(self) function to:
Code: [Select]
path = PhotoScan.app.getExistingDirectory("Browse for the export folder:")
Best regards,
Alexey Pasumansky,
Agisoft LLC

bisenberger

  • Sr. Member
  • ****
  • Posts: 329
    • View Profile
    • Digital Mapping & Graphics
Re: Auto exporting of multiple single photos to ortho
« Reply #16 on: April 28, 2015, 06:42:07 PM »
Hi Alexey,
I went ahead and downloaded the rest of the scripts posted on the wiki.

http://wiki.agisoft.com/wiki/Python

All are very useful.
Thanks,
Bill
Digital Mapping & Graphics LLC
https://digital-mapping.net/

bigben

  • Sr. Member
  • ****
  • Posts: 406
    • View Profile
Re: Auto exporting of multiple single photos to ortho
« Reply #17 on: June 09, 2015, 05:55:56 PM »
Works nicely. I can export large areas with low RAM (8Gb) and then recombine in GlobalMapper

tommek01

  • Newbie
  • *
  • Posts: 6
    • View Profile
Re: Auto exporting of multiple single photos to ortho
« Reply #18 on: August 11, 2015, 10:31:33 AM »
Dear Alexey,

I have an problem while running your script.

My Dataset aint got no camera position files, but an generic alignment and just markers for generating orthophotos.

If i run the script after proceeding every single step i`ve got the following error:

Traceback (most recent call last):
  File "G:/2012-01_STC_Venezuela_Lake-Valencia/Thomas/prio5/ost/prj/try.py", line 83, in <lambda>
    proc_exp = lambda : self.exp_ortho()
  File "G:/2012-01_STC_Venezuela_Lake-Valencia/Thomas/prio5/ost/prj/try.py", line 272, in exp_ortho
    v1 = PhotoScan.Vector((crd[0], crd[1], 0) )
TypeError: 'NoneType' object is not subscriptable

I would be delighted to read from you.

Best regards Tommek

Alexey Pasumansky

  • Agisoft Technical Support
  • Hero Member
  • *****
  • Posts: 14890
    • View Profile
Re: Auto exporting of multiple single photos to ortho
« Reply #19 on: August 11, 2015, 10:38:29 AM »
Hello Tommek,

Could you please specify, what coordinate system is defined in the Reference pane settings dialog?
Best regards,
Alexey Pasumansky,
Agisoft LLC

tommek01

  • Newbie
  • *
  • Posts: 6
    • View Profile
Re: Auto exporting of multiple single photos to ortho
« Reply #20 on: August 11, 2015, 10:41:41 AM »
Hey Akexey,

thanks for the reply. It's WGS84/UTM zone 19N.

Regards

Alexey Pasumansky

  • Agisoft Technical Support
  • Hero Member
  • *****
  • Posts: 14890
    • View Profile
Re: Auto exporting of multiple single photos to ortho
« Reply #21 on: August 11, 2015, 10:52:24 AM »
Hello Tommek,

Thanks, it seems that wrong criterion has been used when checking if the coordinate system is projected or geographic. I've modified the script (changed only one line):

Code: [Select]
...
#recalculating WGS84 resolution from degrees into meters if required
if chunk.crs:
if not ('PROJCS' in proj.wkt):
...

So please check if it works fine now.
Best regards,
Alexey Pasumansky,
Agisoft LLC

tommek01

  • Newbie
  • *
  • Posts: 6
    • View Profile
Re: Auto exporting of multiple single photos to ortho
« Reply #22 on: August 11, 2015, 11:00:04 AM »
It works. That ist amazing.

thanks a bunch!!!!! ;D

Alexey Pasumansky

  • Agisoft Technical Support
  • Hero Member
  • *****
  • Posts: 14890
    • View Profile
Re: Auto exporting of multiple single photos to ortho
« Reply #23 on: August 11, 2015, 11:23:43 AM »
OK, nice to hear that.

Note that in the next version (that is currently available as pre-release), we've implemented similar feature to GUI interface for user convenience.
Best regards,
Alexey Pasumansky,
Agisoft LLC

tommek01

  • Newbie
  • *
  • Posts: 6
    • View Profile
Re: Auto exporting of multiple single photos to ortho
« Reply #24 on: August 11, 2015, 10:40:26 PM »
Hey Alexey,
I have one question in addition. Is it possible to include an all over color correction befor exporting the single orthos?

Blessings Tommek

Alexey Pasumansky

  • Agisoft Technical Support
  • Hero Member
  • *****
  • Posts: 14890
    • View Profile
Re: Auto exporting of multiple single photos to ortho
« Reply #25 on: August 12, 2015, 06:59:07 PM »
Hello Tommek,

At the moment it is not possible, since color correction is only applicable to the images used for the orthophoto export, and if there's only one image per individual orthophoto, color correction couldn't be applied.
Best regards,
Alexey Pasumansky,
Agisoft LLC

Robert Dzur

  • Newbie
  • *
  • Posts: 47
    • View Profile
Re: Auto exporting of multiple single photos to ortho
« Reply #26 on: November 22, 2015, 09:07:04 AM »
Hi Alexey,

In running Export Individual Orthophotos.py I am not getting a result from the script when I run with the option for a single selected image.  In the console, although the process appears to be working it exits with code 0 and fails to produce an ortho.  Just wondering if I might be executing something improperly.   Thanks for any advice you might be able to offer.

Rob

Alexey Pasumansky

  • Agisoft Technical Support
  • Hero Member
  • *****
  • Posts: 14890
    • View Profile
Re: Auto exporting of multiple single photos to ortho
« Reply #27 on: November 22, 2015, 12:36:13 PM »
Hello Rob,

Maybe you can send the screenshot of the script dialog and the full Console pane ouput related to the export operation?

But probably, you can update to the version 1.2 and use built-in functionality in Tools Menu -> Export -> Export Orthophotos to save individual images. This functionality can be used after the orthomosaic is built using the corresponding option in Workflow menu.
Best regards,
Alexey Pasumansky,
Agisoft LLC

Robert Dzur

  • Newbie
  • *
  • Posts: 47
    • View Profile
Re: Auto exporting of multiple single photos to ortho
« Reply #28 on: November 23, 2015, 03:33:04 AM »
Thanks for the reply Alexey,

I'm attaching a screen shot of the console in addition to the startup and finish dialog from running the script.  I'll update this evening and give it a shot. 

Rob
--

Alexey Pasumansky

  • Agisoft Technical Support
  • Hero Member
  • *****
  • Posts: 14890
    • View Profile
Re: Auto exporting of multiple single photos to ortho
« Reply #29 on: November 23, 2015, 10:49:50 AM »
Hello Rob,

I have two ideas of possible reasons causing failed export:
1) Export resolution is two high so the size of individual orthophotos is higher than 4 GB for GeoTIFFs.
2) The document has not been saved prior to the script start. Script exports the orthophotos to the folder containing the project file.
Best regards,
Alexey Pasumansky,
Agisoft LLC