Forum

Author Topic: classifyPoints target class change in 1.80 ?  (Read 1273 times)

stephan

  • Full Member
  • ***
  • Posts: 129
    • View Profile
classifyPoints target class change in 1.80 ?
« on: January 12, 2022, 05:34:35 PM »
Hey there,

I was using this script in 1.7.5:

chunk.dense_cloud.classifyPoints(source=4, target=(5,10,11,16,6,20,15,14,19), confidence=0.01)


It seems that this fails in 1.8.0 with this error:

2022-01-12 15:31:40 RuntimeError: Unsupported target class
2022-01-12 15:31:40 Error: Unsupported target class
>>>

I don't see any changes in the API documentation... does anyone know what has changed here?

Thanks!

stephan

  • Full Member
  • ***
  • Posts: 129
    • View Profile
Re: classifyPoints target class change in 1.80 ?
« Reply #1 on: January 12, 2022, 05:46:10 PM »
update: OK it seems to work with certain classes but not others.

This is the list I had made for myself of the mapping of classes:

# Class LIST
#
# 0 Created,
# 1 Unclassified,
# 2 Ground, *
# 3 LowVegetation, *
# 4 MediumVegetation, *
# 5 HighVegetation, *
# 6 Building, *
# 7 LowPoint,
# 8 ModelKeyPoint,
# 9 Water,
# 10 Rail, *
# 11 RoadSurface, *
# 12 OverlapPoints,
# 13 WireGuard,
# 14 WireConductor, *
# 15 TransmissionTower, *
# 16 WireConnector, *
# 17 BridgeDeck,
# 18 HighNoise,
# 19 Car, *
# 20 Manmade *

Has this been changed in 1.8.0?

Alexey Pasumansky

  • Agisoft Technical Support
  • Hero Member
  • *****
  • Posts: 14853
    • View Profile
Re: classifyPoints target class change in 1.80 ?
« Reply #2 on: January 29, 2022, 07:44:09 PM »
Hello stephan,

Please note that classifyPoints procedure supports only following target classes:
Ground, Building, HighVegetation, Road, Car, Manmade

When calling the classification function you should use Metashape.PointClass classes:
Code: [Select]
chunk.dense_cloud.classifyPoints(source = Metashape.PointClass.Created, target = [Metashape.PointClass.Building, Metashape.PointClass.Ground, Metashape.PointClass.HighVegetation, Metashape.PointClass.RoadSurface, Metashape.PointClass.Car, Metashape.PointClass.Manmade], confidence=0.01)
Best regards,
Alexey Pasumansky,
Agisoft LLC

stephan

  • Full Member
  • ***
  • Posts: 129
    • View Profile
Re: classifyPoints target class change in 1.80 ?
« Reply #3 on: February 01, 2022, 01:34:34 PM »
Hi Alexey,

Thanks for clarifying this. It seems like in V1.7.5 it was possible to select classification targets based on the numbers above, but I will use a different system from now on.

Cheers,