extract: extracting clusters

Description Usage Arguments Examples

View source: R/extract.R

Description

Documentation for the extract method of single cluster/class from segmented images

Usage

1
2
3
4
5
6
7
8
extract(segimg, ..., cluster = NULL, org_image = NULL, b = NULL)

## S3 method for class 'Table'
extract(segimg, cluster = 1, org_image = NULL,
  b = NULL, ...)

## S3 method for class 'THsegments'
extract(segimg, ..., cluster = 1)

Arguments

segimg

an object of class Table or THsegments or grayimage

...

graphical parameters to imageplot

cluster

cluster number to be extracted

org_image

original image to be segmented

b

number of bands in the original image

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
## Not run: 
library(stars)
tif <- read_stars(system.file("extdata/image.tif", package="ImageSegmentation"))
p <- seg_kmeans(tif,3,5)
extract(p,2,tif,3)

e <- RGBtoGRAY(tif)
s <- segmentation_threshold(e)
extract(s, cluster=3)


## End(Not run)

Chamodi88/ImageSegmentation documentation built on July 9, 2020, 9:21 p.m.