Agisoft Metashape

Agisoft Metashape => Python and Java API => Topic started by: Paulo on November 28, 2017, 09:01:15 PM

Title: Reset Mask in Python API vers. 1.4
Post by: Paulo on November 28, 2017, 09:01:15 PM
Hello ,

here is my problem... in version 1.4, there is a new mesh generation using strict volumetric masking.

I want to use this in my current workflow using script python.

In my current workflow, I mask all my 100 images from background images so as to expedite the alignment phase.

Now I want to use experimental mesh creation method with strict volumetric masking using

chunk.buildModel(surface=PhotoScan.Arbitrary, interpolation=PhotoScan.EnabledInterpolation,  source=PhotoScan.DepthMapsData, quality=PhotoScan.HighQuality, volumetric_masks=True, vertex_colors = False)

However from blog i see that for this I do not need all images masked, so I need to reset masks for most images and just keep maybe 3 images masked  before doing the new mesh method....

How can I do this with Python API?
Title: Re: Reset Mask in Python API
Post by: Paulo on November 29, 2017, 10:48:31 AM
On this topic,

I have found that in the python API for latest vers1.4, the parameter volumetric_masks when set to True in the BuildModel method does not apply the strict volumetric masking while Building model in GUI with advanced option Use strict Volumetric masks ticked does work....

Also, I would suggest that since now we can do experimental mesh creation directly from depth maps without Dense cloud building, then in API, we should be able to use parameters Reuse_depth and Keep_depth parameters inside the new BuildModel method....

Any input on this issue would be appreciated...
Title: Re: Reset Mask in Python API vers. 1.4
Post by: Alexey Pasumansky on November 29, 2017, 07:17:44 PM
Hello Paul,

You can reset the mask by the following command:
Code: [Select]
camera.mask = None
We'll also check your input regarding the API parameters.
Title: Re: Reset Mask in Python API vers. 1.4
Post by: Paulo on November 29, 2017, 07:26:53 PM
Thanks a lot, Alexey
Title: Re: Reset Mask in Python API vers. 1.4
Post by: Paulo on December 01, 2017, 01:09:32 AM
Just checked build 5432 and parameter volumetric_masks = True still does not work in API command buildModel
Title: Re: Reset Mask in Python API vers. 1.4
Post by: Alexey Pasumansky on December 01, 2017, 11:53:02 AM
Hello Paul,

Build 5432 has been published on Wednesday, the reported changes were not yet fixed there.