Forum

Author Topic: Gradual selection by model confidence  (Read 2889 times)

DR

  • Newbie
  • *
  • Posts: 3
    • View Profile
Gradual selection by model confidence
« on: May 12, 2023, 01:45:37 AM »
Hi,

I am using Version 2.0.1

I am generating a topographic surface from mainly nadir UAV photographs.

I am creating a mesh from depth maps and decimating the mesh to a set density with use of python script

and then exporting for further use.


I would like to incorporate into this process the gradual selection of the model by model confidence. And deletion of the selected faces, then run the close holes function and then export.

Results yeilded from:

Model > gradual selection > confidence (20) > delete

Tools > mesh > close holes (~10%)

Are good, I see that the close holes function can be incorporated into a batch process, however the gradual selection cannot

Is this possible through a python function?

Thanks


DocPopi

  • Newbie
  • *
  • Posts: 28
    • View Profile
Re: Gradual selection by model confidence
« Reply #1 on: May 15, 2023, 10:46:43 AM »
Hello ! If I understand your need correctly, maybe you could go through the Filter by Confidence function? I used it myself through Python in order to clean Points Clouds before merging them.

I did something like this:

Code: [Select]
point_cloud = doc.chunk.point_cloud
point_cloud.setConfidenceFilter(min ,max)
point_cloud.cropSelectedPoints()
point_cloud.setConfidenceFilter(0,255)


In your case you might be able to set the min and max to 20.

Hope it will work :)

Dr. Popi

DR

  • Newbie
  • *
  • Posts: 3
    • View Profile
Re: Gradual selection by model confidence
« Reply #2 on: June 24, 2023, 11:43:49 AM »
Thanks Doc,

Working code:

Code: [Select]
# Select faces via Gradual selection by confidence
for faces in chunk.model.faces:
for i in faces.vertices:
if chunk.model.vertices[i].confidence <= 5:
faces.selected = True
continue
# Delete faces selected in previous step
chunk.model.removeSelection()
# Remove small components and close holes
chunk.model.removeComponents(4)
model.closeHoles(level=10, apply_to_selection=False)

ankit108

  • Newbie
  • *
  • Posts: 17
    • View Profile
Re: Gradual selection by model confidence
« Reply #3 on: July 09, 2023, 08:38:41 AM »
hello DR, what is the threshold that you have kept for this to keep repeating?? or is it just for the one time that your are selecting -> deleting then closing the holes?

DR

  • Newbie
  • *
  • Posts: 3
    • View Profile
Re: Gradual selection by model confidence
« Reply #4 on: July 11, 2023, 03:51:51 AM »
hello DR, what is the threshold that you have kept for this to keep repeating?? or is it just for the one time that your are selecting -> deleting then closing the holes?

Just the single time