Forum

Author Topic: Reset Mask in Python API vers. 1.4  (Read 2837 times)

Paulo

  • Hero Member
  • *****
  • Posts: 1301
    • View Profile
Reset Mask in Python API vers. 1.4
« 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?
« Last Edit: November 29, 2017, 07:07:30 PM by pap1956@gmail.com »
Best Regards,
Paul Pelletier,
Surveyor

Paulo

  • Hero Member
  • *****
  • Posts: 1301
    • View Profile
Re: Reset Mask in Python API
« Reply #1 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...
Best Regards,
Paul Pelletier,
Surveyor

Alexey Pasumansky

  • Agisoft Technical Support
  • Hero Member
  • *****
  • Posts: 14813
    • View Profile
Re: Reset Mask in Python API vers. 1.4
« Reply #2 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.
Best regards,
Alexey Pasumansky,
Agisoft LLC

Paulo

  • Hero Member
  • *****
  • Posts: 1301
    • View Profile
Re: Reset Mask in Python API vers. 1.4
« Reply #3 on: November 29, 2017, 07:26:53 PM »
Thanks a lot, Alexey
Best Regards,
Paul Pelletier,
Surveyor

Paulo

  • Hero Member
  • *****
  • Posts: 1301
    • View Profile
Re: Reset Mask in Python API vers. 1.4
« Reply #4 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
Best Regards,
Paul Pelletier,
Surveyor

Alexey Pasumansky

  • Agisoft Technical Support
  • Hero Member
  • *****
  • Posts: 14813
    • View Profile
Re: Reset Mask in Python API vers. 1.4
« Reply #5 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.
Best regards,
Alexey Pasumansky,
Agisoft LLC