Forum

Author Topic: Select Faces by Confidence  (Read 1780 times)

KBL

  • Newbie
  • *
  • Posts: 31
    • View Profile
Select Faces by Confidence
« on: November 25, 2020, 08:22:53 AM »
Hello, is there a method to select faces by confidence? I feel like it should be possible, as you can color faces by confidence, but I haven't found a property on faces in Metashape to allow it.

Alexey Pasumansky

  • Agisoft Technical Support
  • Hero Member
  • *****
  • Posts: 14971
    • View Profile
Re: Select Faces by Confidence
« Reply #1 on: November 25, 2020, 06:26:03 PM »
Hello KBL,

You can access the confidence value of the certain vertex in a following way:
Code: [Select]
model = chunk.model
v = model.vertices[0]
confidence = v.confidence

If you need to select all the faces which have at least one vertex with the confidence higher (or below) some threshold:
Code: [Select]
THRESHOLD = 2
for face in model.faces:
    for i in face.vertices:
        if model.vertices[i].confidence >= THRESHOLD:
            face.selected = True
            continue
Best regards,
Alexey Pasumansky,
Agisoft LLC

KBL

  • Newbie
  • *
  • Posts: 31
    • View Profile
Re: Select Faces by Confidence
« Reply #2 on: December 07, 2020, 05:45:28 AM »
Thanks very much for your help, on point as usual!