Agisoft Metashape

Agisoft Metashape => Python and Java API => Topic started by: stephhstuff on June 10, 2022, 11:09:56 PM

Title: Rectangle Selection
Post by: stephhstuff on June 10, 2022, 11:09:56 PM
Hello,

I am wondering if there is a way to do a rectangle selection as in the GUI. I want to select a region and delete it using a script. I attached an image of what I am trying to do, and I have a marker that is in line with where I want the selection to begin.

This, or any other method that can delete every part of the model that has a z-coordinate less than a specified value, would be helpful.

Thanks!
Title: Re: Rectangle Selection
Post by: stephhstuff on June 13, 2022, 10:19:40 PM
Nevermind this post.

I ended up using masks on each image to get rid of the sections I didn't want.
Title: Re: Rectangle Selection
Post by: Alexey Pasumansky on June 14, 2022, 07:33:06 PM
Hello stephhstuff,

You could also shrink the bounding box (working region) before building the mesh model, so that no polygons outside the box would be reconstructed.