Learn R Programming

ANTsR (version 1.0)

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
# NOT RUN {
fi<-antsImageRead( getANTsRData("r16") ,2)
fi<-n3BiasFieldCorrection(fi,4)
seg<-kmeansSegmentation( fi, 3 )
# }

Run the code above in your browser using DataLab