otbcli_KMeansClassification : values in centroids output file
Two years ago, I wrote a shell script which ran otbcli_KMeansClassification. I read the centroids file generated at the end of the k-means process to reassign the centroids values to the clusters of the output clustered image. It seems that the centroids file now produced by otbcli_KMeansClassication (now compiled with Shark) does not give values in the range of the input image.
I am now using OTB-6.6.1-Linux64.
The input image is a 1 band image (Byte, 0 - 255). https://filesender.renater.fr/?s=download&token=e509caab-704e-0120-85c0-8361fbd1b9ae
Command line : otbcli_KMeansClassification -in texture_b1.tif -out kmeans_b1.tif -ts 1000 -nc 6 -maxit 1000 -outmeans centroids_b1.txt
The output centroids file is (6 classes): -5.39274847933224222e-01 -2.44949470684183518e-01 1.38246362767321007e+00 2.56020922793282413e+00 3.45865970960369806e-01 4.57593037865378616e+00 (which obviously are not the input image values)
I can not precise which OTB version was used when I wrote the shell script ; could be 6.1 as the otbcli_KmeansClassification still had the convergence threshold argument (-ct). Using that version, the centroids values were ok though.