Forum

Author Topic: Gradual Selection  (Read 1601 times)

diogo.goncalves

  • Newbie
  • *
  • Posts: 5
    • View Profile
Gradual Selection
« on: March 21, 2020, 01:55:37 AM »
Dear all,
I am using version 1.6.1 and I am trying compute gradual selection. But its looks like the sparse cloud not update the points that are selected.

Code: [Select]
def sparse_cloud_filtering(chunk,threshold,c = 'RE'):
   
    import Metashape
    criterion = {
        'RE': Metashape.PointCloud.Filter.ReprojectionError,
        'RU': Metashape.PointCloud.Filter.ReconstructionUncertainty,
        'IC': Metashape.PointCloud.Filter.ImageCount,
        'PA': Metashape.PointCloud.Filter.ProjectionAccuracy
    }
   
    sparse = chunk.point_cloud
    print(len(sparse.points))
    fltr_cld = Metashape.PointCloud.Filter()
    fltr_cld.init(chunk,criterion[c])
    fltr_cld.selectPoints(threshold)
    sparse.removeSelectedPoints()
    print(len(sparse.points))

Any idea?

Thanks,
Diogo