Segmentation error and num_cluster

17 views
Skip to first unread message

Carlos Leandro

unread,
Aug 6, 2024, 4:39:38 PM8/6/24
to RSGISLib Support
Hello everybody

I'm trying to segment an image, but it's giving this error. It only segments if the nun_clust is below 5 and the segmentation is horrible,

The error is this

rsgislib.imagecalc.kmeans_clustering(
_imagecalc.error: All data points are already assigned to cluster centres. Not enough unique cluster centres. swig/python detected a memory leak of type 'OSRSpatialReferenceShadow *', no destructor found.
swig/python detected a memory leak of type 'OSRSpatialReferenceShadow *', no destructor found.
swig/python detected a memory leak of type 'OSRSpatialReferenceShadow *', no destructor found.
swig/python detected a memory leak of type 'OSRSpatialReferenceShadow *', no destructor found.
swig/python detected a memory leak of type 'OSRSpatialReferenceShadow *', no destructor found.
swig/python detected a memory leak of type 'OSRSpatialReferenceShadow *', no destructor found.

Thanks
 

Peter Bunting

unread,
Aug 6, 2024, 6:21:10 PM8/6/24
to Carlos Leandro, RSGISLib Support
Hi.

What is the image you are trying to segment?

Is the no data value appropriately set in the input image as the normalisation (stretch) might be messing up the imagery if the no data value has not been set.

Cheers Pete 

--
You received this message because you are subscribed to the Google Groups "RSGISLib Support" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rsgislib-suppo...@googlegroups.com.
To view this discussion on the web, visit https://groups.google.com/d/msgid/rsgislib-support/4c867f4e-048a-4d4f-95bc-e427e176cfc4n%40googlegroups.com.

Carlos Leandro

unread,
Aug 7, 2024, 2:55:27 PM8/7/24
to RSGISLib Support
Hi Pete, thank you very much, that was it. Now it worked
Cheers

Reply all
Reply to author
Forward
0 new messages