Forum

Author Topic: Export orthorectified image cube  (Read 3845 times)

luroth

  • Newbie
  • *
  • Posts: 4
    • View Profile
Export orthorectified image cube
« on: September 01, 2016, 03:50:33 PM »
Hi

I like to export the orthorectified images one by one in a folder. In the GUI this can be done using "Tools" - "Export" - "Export Orthophotos" and selecting a folder and providing a pattern for the filenames ("{filename}.tif")

How is the corresponding function in the Python API called? exportOrthophotos? And if yes, what is the correct syntax for "PATH"?

I tried:

chunk.exportOrthophotos("E:\Temp")
> Error: Unsupported extension:

chunk.exportOrthophotos("E:\Temp\*.tif")
> Error: bad allocation

chunk.exportOrthophotos("E:\Temp\{filename}.tif")
> Error: bad allocation

E:\Temp exists, the chunk is processed and has a Dense Cloud, 3D Model and DEM. Any suggestions?


Alexey Pasumansky

  • Agisoft Technical Support
  • Hero Member
  • *****
  • Posts: 15138
    • View Profile
Re: Export orthorectified image cube
« Reply #1 on: September 01, 2016, 06:08:05 PM »
Hello luroth,

Can you please confirm that orthophotos export from the GUI works correctly for the same project?
Best regards,
Alexey Pasumansky,
Agisoft LLC

luroth

  • Newbie
  • *
  • Posts: 4
    • View Profile
Re: Export orthorectified image cube
« Reply #2 on: September 01, 2016, 09:09:42 PM »
Hi Alexey

Yes, the export inside the GUI works. Importing the resulting single photos in a GIS application creates a mosaic as desired, only the Python method is not working for me...

Alexey Pasumansky

  • Agisoft Technical Support
  • Hero Member
  • *****
  • Posts: 15138
    • View Profile
Re: Export orthorectified image cube
« Reply #3 on: September 01, 2016, 09:15:36 PM »
Hello luroth,

For me it worked in the following way:
Code: [Select]
chunk.exportOrthophotos("D:/ortho_{filenum}.tif", projection = chunk.crs)Probably, when the projection argument is missing the coordinate system from the chunk is not applied automatically.
Best regards,
Alexey Pasumansky,
Agisoft LLC

luroth

  • Newbie
  • *
  • Posts: 4
    • View Profile
Re: Export orthorectified image cube
« Reply #4 on: September 02, 2016, 12:36:09 PM »
Hi Alexey

That's it, with projection argument it works, without I get a "bad allocation" error. Thanks a lot!