Learn R Programming

ANTsR (version 0.3.3)

kmeansSegmentation: k means image segmentation.

Description

k means image segmentation that is a wrapper around atropos

Usage

kmeansSegmentation(img, k, kmask = NA, mrf = 0.1)

Arguments

img
input image
k
integer number of classes
kmask
segment inside this mask
mrf
smoothness, higher is smoother

Value

segmentation and probability images

Examples

Run this code

fi<-antsImageRead( getANTsRData("r16") ,2)
fi<-n3BiasFieldCorrection(fi,4)
seg<-kmeansSegmentation( fi, 3 )

Run the code above in your browser using DataLab