Features
Support
Community
Downloads
Buy
About
Forum
Home
Search
Login
Register
Agisoft Metashape
»
Agisoft Metashape
»
Python and Java API
»
Exported Ortho is wrong using API python code compared exporting it manually
« previous
next »
Print
Pages: [
1
]
Author
Topic: Exported Ortho is wrong using API python code compared exporting it manually (Read 2237 times)
michaelguest
Newbie
Posts: 9
Exported Ortho is wrong using API python code compared exporting it manually
«
on:
March 11, 2020, 09:05:26 PM »
Hello there! I used some code to export my orthomosaic however the export looks totally wrong compared to if I use Metashape 1.5 and manually do it from the workflow >> batch process >> export orthormosaic. I have attached my wrong tiff/right tiff and code. Also I will show you my code that I used using the Metashape 1.5 API. Also my KML file crashes Google Earth. The KML was generated manually. I was wondering do you guys know whats wrong? I am probably not adding something in my code that I am supposed to.
Logged
Alexey Pasumansky
Agisoft Technical Support
Hero Member
Posts: 14847
Re: Exported Ortho is wrong using API python code compared exporting it manually
«
Reply #1 on:
March 11, 2020, 09:14:19 PM »
Hello michaelguest,
Is the problem with the orthomosaic generation or export? If you open the project with the orthomosaic generated with the script is the orthomosaic complete or the same part is shown?
Logged
Best regards,
Alexey Pasumansky,
Agisoft LLC
michaelguest
Newbie
Posts: 9
Re: Exported Ortho is wrong using API python code compared exporting it manually
«
Reply #2 on:
March 11, 2020, 09:18:46 PM »
There is no problem with the Orthomosaic generation. The problem is when I export the orthomosaic with the script if you refer to the photo I have attached below named wrongOrthoExport you can see that it doesn't show the whole area as opposed to the other photo which was done manually using Metashape GUI. When I open the project the orthomosaic is complete. I have attached the complete orthomosaic below.
Logged
Alexey Pasumansky
Agisoft Technical Support
Hero Member
Posts: 14847
Re: Exported Ortho is wrong using API python code compared exporting it manually
«
Reply #3 on:
March 11, 2020, 09:25:06 PM »
Hello michaelguest,
I have not noticed that at first, but you are exporting individually orthorectified images instead of orthomosaic. In 1.5.5 version you should use exportOrthomosaic() function.
Logged
Best regards,
Alexey Pasumansky,
Agisoft LLC
michaelguest
Newbie
Posts: 9
Re: Exported Ortho is wrong using API python code compared exporting it manually
«
Reply #4 on:
March 11, 2020, 09:27:24 PM »
Oh ok I understand now I didn't catch that thank you I will change that.
Logged
michaelguest
Newbie
Posts: 9
Re: Exported Ortho is wrong using API python code compared exporting it manually
«
Reply #5 on:
March 11, 2020, 09:30:01 PM »
Thank you very much for your help!
Logged
Alexey Pasumansky
Agisoft Technical Support
Hero Member
Posts: 14847
Re: Exported Ortho is wrong using API python code compared exporting it manually
«
Reply #6 on:
March 11, 2020, 09:33:50 PM »
Instead of exportOrthophotos you should use exportOrthomosaic.
Logged
Best regards,
Alexey Pasumansky,
Agisoft LLC
michaelguest
Newbie
Posts: 9
Re: Exported Ortho is wrong using API python code compared exporting it manually
«
Reply #7 on:
March 11, 2020, 09:34:44 PM »
Awesome thank you so much! Just one little mistake in code can mess everything up.
Logged
michaelguest
Newbie
Posts: 9
Re: Exported Ortho is wrong using API python code compared exporting it manually
«
Reply #8 on:
March 11, 2020, 09:41:53 PM »
The tiff export is correct now however my exported kml file crashes google earth and is only 1kb. I even tried to load it on google earth online and used another computer.
Logged
Alexey Pasumansky
Agisoft Technical Support
Hero Member
Posts: 14847
Re: Exported Ortho is wrong using API python code compared exporting it manually
«
Reply #9 on:
March 11, 2020, 09:55:46 PM »
Hello michaelguest,
This KML contains the link to TIFF.
Probably you should export KMZ file which contain orthomosaic tiles? Then modify the export file name and use format = Metashape.RasterFormatKMZ
Logged
Best regards,
Alexey Pasumansky,
Agisoft LLC
michaelguest
Newbie
Posts: 9
Re: Exported Ortho is wrong using API python code compared exporting it manually
«
Reply #10 on:
March 11, 2020, 09:56:45 PM »
Sweet I will try that thank you so much!
Logged
Print
Pages: [
1
]
« previous
next »
Agisoft Metashape
»
Agisoft Metashape
»
Python and Java API
»
Exported Ortho is wrong using API python code compared exporting it manually
Features
Support
Community
Downloads
Buy
About
Features
Support
Community
Downloads
Buy
About
Metashape presentation
(PDF, 5 Mb)