I’m trying to create a script where I change the confidence value of all points in the dense cloud to 100%.
I have been looking in Agisoft’s Metashape Python Reference Python API v1.6.0 and on Agisoft’s forums but I cannot find anything that would make me believe that this is even possible.
Is it possible to edit this value? And if so, how?
Thanks for your answers.
Advertisement
Answer
If you export the dense cloud in LAS/LAZ format, you can use PYLAS module to edit the file.
You can edit the confidence dimension (or even add it if the file doesn’t have it).
This is the code I used:
las = pylas.read("pathToFile") las.confidence[las.confidence < setValue] = setValue
The second line changes the confidence of all points that are lower than variable setValue to setValue (which needs to be between 0 and 255).