imgKDKMeans {biOps} | R Documentation |
This function performs an unsupervised classification through the k-means algorithm. This implementation uses kd-trees for nearest neighbor queries. It is useful for big values of k.
imgKDKMeans (imgdata, k, maxit=10)
imgdata |
The image |
k |
Number of clusters |
maxit |
Max number of iterations |
return an imagedata object, the result of the classification
imgKMeans
imgEKMeans
imgIsoData
## Not run: x <- readJpeg(system.file("samples", "violet.jpg", package="biOps")) y <- imgKDKMeans(x, 4) ## End(Not run)