Features
Support
Community
Downloads
Buy
About
Forum
Home
Search
Login
Register
Agisoft Metashape
»
Agisoft Metashape
»
Python and Java API
»
exportMasks?
« previous
next »
Print
Pages: [
1
]
Author
Topic: exportMasks? (Read 4785 times)
stephan
Full Member
Posts: 129
exportMasks?
«
on:
February 03, 2016, 09:06:12 PM »
Hi guys,
I can import masks using a python script but by the looks fo it there is no way to export them other than from the GUI... Am I overlooking something here or is the function just not implemented yet?
Cheers,
Stephan
Logged
Alexey Pasumansky
Agisoft Technical Support
Hero Member
Posts: 15246
Re: exportMasks?
«
Reply #1 on:
February 03, 2016, 09:32:02 PM »
Hello Stephan,
Assuming that "camera" variable is some camera from the chunk, you can use
Code:
[Select]
camera.mask.image().save(path)
to save the mask as image file.
Does it fit your needs?
Logged
Best regards,
Alexey Pasumansky,
Agisoft LLC
stephan
Full Member
Posts: 129
Re: exportMasks?
«
Reply #2 on:
February 04, 2016, 12:24:14 AM »
Hi Alexey,
Thanks for the quick response!
Could I dump all of the masks using this?
Code:
[Select]
for camera in chunk.cameras:
camera.mask.image().save(mask_path)
Which format are the masks exported in by default?
Thanks!
Stephan
Logged
Alexey Pasumansky
Agisoft Technical Support
Hero Member
Posts: 15246
Re: exportMasks?
«
Reply #3 on:
February 09, 2016, 11:35:19 AM »
Hello Stephan,
You can make a loop on all the cameras in chunk.cameras and save the masks.
Image.save() requires the full export path, including filename with extension. I can suggest to use png format.
Logged
Best regards,
Alexey Pasumansky,
Agisoft LLC
Print
Pages: [
1
]
« previous
next »
Agisoft Metashape
»
Agisoft Metashape
»
Python and Java API
»
exportMasks?
Features
Support
Community
Downloads
Buy
About
Features
Support
Community
Downloads
Buy
About
Metashape presentation
(PDF, 5 Mb)