Forum

Author Topic: Python headless process : align chunks with masks applied to key points  (Read 3273 times)

DocPopi

  • Newbie
  • *
  • Posts: 28
    • View Profile
Hello ! I'm developing a headless process to reconstruct and merge two parts of a shoe. In the align chunk parameters, I would like to use the "Apply Masks = Key points", but I am a bit confused by the API. The two parameters that seem to deal with that are:

• filter_mask (bool) – Filter points by mask.
• mask_tiepoints (bool) – Apply mask filter to tie points.


Must I use the filter mask? Or am I missing something?

Thank you!
« Last Edit: May 05, 2023, 11:49:29 AM by DocPopi »

Paulo

  • Hero Member
  • *****
  • Posts: 1354
    • View Profile
Hello DocPopi,

I think just put
Code: [Select]
filter_mask = True, mask_tiepoints = False
to have Masks applied to key points...
Best Regards,
Paul Pelletier,
Surveyor

DocPopi

  • Newbie
  • *
  • Posts: 28
    • View Profile
Hi Paulo!

Thank you for your answer. :) I tried that but it doesn't seem enough. More precisely, I tried this :

Code: [Select]
doc.alignChunks(method=0, downscale=1, fit_scale=False,filter_mask=True, mask_tiepoints=False, keypoint_limit=150000,generic_preselection=True)
The manual step works well, but this code written in the console doesn't... Any other ideas? :(

DocPopi

  • Newbie
  • *
  • Posts: 28
    • View Profile
Hey again!

So after a bit of fumbling around, I think I have managed to find a compromise. I'm sharing the new instruction here for those interested, although I'm still not sure it will work extensively for all cases. I still need to test it further, I will update any new findings here if needed  :) However in the meantime, if any one of you has another solution pertaining the primary question, please feel free to share!

Code: [Select]
doc.alignChunks(chunks=[0, 1],method=0, downscale=1, fit_scale=True,filter_mask=True, mask_tiepoints=False, keypoint_limit=150000,generic_preselection=True)