KMeans clustering crashes after a while
Mantis Issue 408, reported by jmichel, assigned to ghost, created: 2011-09-09
KMeans clustering module randomly crashes on linux boxes with few RAM. This seems related to a dynamic memory allocation problem, since reducing the percentage of the image used to train KMeans seems to solve the problem.
I suspect that the problem comes from the internal ListSample whose size increases until crash.
1327167650 - julienmChanged the default RAM dedicated to list sample from 256 to 32, along with other memory consumption improvements.
See : http://hg.orfeo-toolbox.org/Monteverdi/rev/a166cf8949fd http://hg.orfeo-toolbox.org/Monteverdi/rev/010a6b6224dd http://hg.orfeo-toolbox.org/Monteverdi/rev/fdced43a6bc2
Still with 32 MB given for the sample list, generating the clustering on a QB XS image makes the reserved memory reach ~55pt MB. The kd-tree takes a lot of additionnal memory.