imgKMeans {biOps}R Documentation

Image clustering

Description

This function performs an unsupervised classification through the k-means algorithm. It is an straightforward implementation.

Usage

imgKMeans (imgdata, k, maxit=10)

Arguments

imgdata The image
k Number of clusters
maxit Max number of iterations

Value

return an imagedata object, the result of the classification

See Also

imgEKMeans imgKDKMeans imgIsoData

Examples

        ## Not run: 
                x <- readJpeg(system.file("samples", "violet.jpg", package="biOps"))
                y <- imgKMeans(x, 4)
        
## End(Not run)

[Package biOps version 0.2.1 Index]