Forum

Author Topic: select points by color  (Read 9507 times)

stephan

  • Full Member
  • ***
  • Posts: 129
    • View Profile
select points by color
« on: September 22, 2016, 01:50:13 PM »
Hi guys,

I'm trying to test this function but no luck...


Code: [Select]

def main():
chunk = PhotoScan.app.document.chunk
#densepointcloud = PhotoScan.DenseCloud
PhotoScan.DenseCloud(0).selectPointsByColor(color=[255,255,255], tolerance=99, channels='RGB')
PhotoScan.DenseCloud(0).removeSelectedPoints()

main()

Any idea what I'm doing wrong?


Alexey Pasumansky

  • Agisoft Technical Support
  • Hero Member
  • *****
  • Posts: 15420
    • View Profile
Re: select points by color
« Reply #1 on: September 22, 2016, 01:54:54 PM »
Hello stephan,

You need to use the following:
Code: [Select]
chunk = PhotoScan.app.document.chunk
dense_cloud = chunk.dense_cloud
dense_cloud.selectPointsByColor(color=[255,255,255], tolerance=99, channels='RGB')
dense_cloud.removeSelectedPoints()
   

PhotoScan.DenseCloud() - is a class, it's not related to the project contents.
Best regards,
Alexey Pasumansky,
Agisoft LLC

stephan

  • Full Member
  • ***
  • Posts: 129
    • View Profile
Re: select points by color
« Reply #2 on: September 30, 2016, 07:10:07 PM »
Hello stephan,

You need to use the following:
Code: [Select]
chunk = PhotoScan.app.document.chunk
dense_cloud = chunk.dense_cloud
dense_cloud.selectPointsByColor(color=[255,255,255], tolerance=99, channels='RGB')
dense_cloud.removeSelectedPoints()
   

PhotoScan.DenseCloud() - is a class, it's not related to the project contents.

Thanks, that is perfect!

Btw: do you guys have any plans to add a function to remove points by color to the sparse point cloud? Or maybe a function to import a sparse point cloud that has been generated by photoscan?

thanks!

Deleri

  • Newbie
  • *
  • Posts: 1
    • View Profile
Re: select points by color
« Reply #3 on: February 28, 2024, 05:12:09 PM »
Alguna idea de como utulizar selectPointsByColor pero  haciendo que abra el selector de color de la pantalla?

Es decir, que se ejecute el script , haga el alinead, el mapa de profundida la nube de puntos  y que llegue a la instancia de seleccion de puntos por color pero en lugar de cargar  color=[255,255,255],  yo pueda seleccionarlo desde la pantalla y luego el script siga.

Se comprende? seria que se abra la interfaz de seleccion de color.

GRACIAS