Agisoft Metashape

Agisoft Metashape => Python and Java API => Topic started by: ppkong on June 18, 2015, 05:16:57 AM

Title: Question about PhotoScan.DenseCloud.classifyGroundPoints
Post by: ppkong on June 18, 2015, 05:16:57 AM
I want to classify ground point use python script
Code: [Select]
PhotoScan.DenseCloud.classifyGroundPoints(max_angle=10.0,max_distance=1.0,cell_size=50.0)
It prompt me 'TypeError:descriptor 'classifyGroundPoints' of  'PhotoScan.DenseCloud' object need an argument',
I want to know what's wrong with my script?
pls help!thanks a lot!
Title: Re: Question about PhotoScan.DenseCloud.classifyGroundPoints
Post by: Alexey Pasumansky on June 18, 2015, 11:25:51 AM
Hello ppkong,

You are trying to classify the Dense Cloud class and not the existing dense cloud.
If there's a chunk (for example active chunk: chunk = PhotoScan.app.document.chunk) you should use chunk.classifyGroundPoints() function.
Title: Re: Question about PhotoScan.DenseCloud.classifyGroundPoints
Post by: BarryReid on August 27, 2015, 09:39:50 AM
Hey

I was having the same problem so I tried what you suggested but had no luck.
I'm getting the following error:

Code: [Select]
AttributeError: 'PhotoScan.Chunk' object has no attribute 'classifyGroundPoints'
Any suggestions?
Thanks
Title: Re: Question about PhotoScan.DenseCloud.classifyGroundPoints
Post by: BarryReid on August 27, 2015, 09:50:58 AM
Found the answer

Code: [Select]
chunk.dense_cloud.classifyGroundPoints(max_angle=max_angle, max_distance=max_distance, cell_size=cell_size)