Forum

Author Topic: classifyPoints through Python not yeilding same results as GUI classifying.  (Read 3571 times)

kit182

  • Newbie
  • *
  • Posts: 5
    • View Profile
Hi,

I've been having trouble with the dense_cloud.classifyPoints() function where the results for a given confidence value are considerably worse than if I were to create the dense cloud through python and then classify points though the GUI.

So if I created a dense cloud for a chunk using python and this is then loaded into the GUI:
When I classify this though the interface [Tools -> dense cloud -> classify points -> from: Created To: High Vegetation, Building  Confidence: 0.1]  I get classification that looks reasonable ( see 'working.png')

However, if I follow the exact same procedure to create the chunk and dense cloud and then run the line:

Code: [Select]
chunk.dense_cloud.classifyPoints( source = Metashape.PointClass.Created, target = [Metashape.PointClass.HighVegetation, Metashape.PointClass.Building], confidence = 0.1)
I get an unreasonable classification (see 'Not working.png).

Is there maybe something related to the point classification that I've missed in the code?
I can provide sample data and code of this if required?

Many thanks in advance,
Kit
« Last Edit: November 29, 2019, 07:32:22 PM by kit182 »

Alexey Pasumansky

  • Agisoft Technical Support
  • Hero Member
  • *****
  • Posts: 14854
    • View Profile
Hello Kit,

Can you please share the logs from the Console related to both runs?
Best regards,
Alexey Pasumansky,
Agisoft LLC

kit182

  • Newbie
  • *
  • Posts: 5
    • View Profile
Hi Alexey,

Many thanks for your reply, please see the log file attached.

kit182

  • Newbie
  • *
  • Posts: 5
    • View Profile
Hello Alexey,

I've attached another copy of a log file, for two confidence levels, that are clearer.

Alexey Pasumansky

  • Agisoft Technical Support
  • Hero Member
  • *****
  • Posts: 14854
    • View Profile
Hello Kit,

Thank you for providing the additional information.

For me it looks like the Building class is not properly interpreted in the scripting line and only the first class of the list is used. However, in the version 1.6.0 pre-release that I have been using for tests everything works as expected. So it seems to be a bug in 1.5.5 which is resolved in the version 1.6.
Best regards,
Alexey Pasumansky,
Agisoft LLC

kit182

  • Newbie
  • *
  • Posts: 5
    • View Profile
Thanks very much, as you noted the classifyPoints() function now works as expected in version 1.6. However I've found the classifyGroundPoints() function is now acting in a similar way to classifyPoints() was in 1.5 i.e. the python and gui classifications are acting differently (it wasn't doing this in version 1.5 I believe). Is this to be expected?   

Alexey Pasumansky

  • Agisoft Technical Support
  • Hero Member
  • *****
  • Posts: 14854
    • View Profile
Hello Kit,

Are you observing the difference in behavior in the version 1.6.0 pre-release when using Classify Ground Points feature?
Best regards,
Alexey Pasumansky,
Agisoft LLC

kit182

  • Newbie
  • *
  • Posts: 5
    • View Profile
Hello Alexey,

It's quite hard to reproduce as the error does not always appear. An example of what's happening is attached (see the image at the end of the document) where I've created and merged 4 chunks. As you can see the first chunk has hardly classified any ground points whereas the other 3 have been classified okay. All the chunks were processed the same way. Any ideas about what could be going on?

Many thanks,
Kit

Alexey Pasumansky

  • Agisoft Technical Support
  • Hero Member
  • *****
  • Posts: 14854
    • View Profile
Hello Kit,

If you have problems with the classification of certain dense clouds, please send an example to support@agisoft.com.

I am not sure that it is a good idea to perform a classification from Unclassified class after initial classification with high confidence value. Unclassified points are scattered across the area, therefore the classification of the tiny isolated dense cloud components may produce unacceptable results.
Best regards,
Alexey Pasumansky,
Agisoft LLC