Agisoft Metashape

Agisoft Metashape => Python and Java API => Topic started by: photo_man on May 31, 2019, 11:26:03 AM

Title: Multiple Single Orthophotos
Post by: photo_man on May 31, 2019, 11:26:03 AM
I want to export multiple single orthophotos based on the activated cameras in a chunk. I found this post here: https://www.agisoft.com/forum/index.php?topic=2595.0 (https://www.agisoft.com/forum/index.php?topic=2595.0) but I am having a hard time updating it and getting it to work on 1.4 / Metashape.

Also, how do I set the projection plane to be based on manual markers that I have setup? I know how to do it in the GUI but am not sure how to achieve that through the API.

Thanks!
Title: Re: Multiple Single Orthophotos
Post by: Alexey Pasumansky on May 31, 2019, 12:09:28 PM
Hello photo_man,

I think that the easiest way would be building the orthomosaic in the desired resolution and then exporting the individually orthorectified images using File Menu -> Export Orthophotos command.
The API function is called chunk.exportOrthophotos and in the path you can use {filename} macros.
Title: Re: Multiple Single Orthophotos
Post by: photo_man on May 31, 2019, 01:53:26 PM
Hi Alexy,

Thanks for the reply! I tried the export orthophotos command but it is not exporting any images. I built an orthophoto on my DEM with 2 photos as a simple test.

This is what the console said. Do you have an idea of what is happening?
Code: [Select]
2019-05-31 12:44:47 ExportOrthophotos: jpeg_quality = 99, path = D:/$$$$/{filename}.tif, resolution_x = 4.59399e-005, resolution_y = 4.59399e-005, tiff_compression = 1, write_alpha = off, write_world = on
2019-05-31 12:44:47 Exporting orthophotos...
2019-05-31 12:44:47 exporting 0 images
2019-05-31 12:44:47 Finished processing in 0.001 sec (exit code 1)

Thanks!
Title: Re: Multiple Single Orthophotos
Post by: Alexey Pasumansky on May 31, 2019, 02:35:17 PM
Hello photo_man,

Does the Export Orthophotos command from the GUI work and give you proper result?

Can you provide the Python command that you are using for export?
Title: Re: Multiple Single Orthophotos
Post by: photo_man on June 01, 2019, 09:21:39 PM
Hello Alexey,

That is what I got from the GUI, I haven't tried it through python yet.