extractFeatures: Extract object features.

Description Usage Arguments Value See Also Examples

Description

Given a single layer data, a segmentation and a function, this algorithm returns a numeric vector of length equal to the number of segments in the segmentation. Each value of the vector is the return obtained if all pixels that belong to a segment are processed with the aforementioned function.

Usage

1
2
3
4
extractFeatures(x, ...)

## S4 method for signature 'RasterLayer'
extractFeatures(x, segmentation, fun)

Arguments

x

RasterLayer. The image that you want to extract feature from.

...

Additional arguments (none implemented).

segmentation

PolarSegmentation. The segmentation of x.

fun

function that take a vector as input and return a one-length numeric or logical (e.g. mean).

Value

numeric.

See Also

getFeatureImage.

Examples

1
2
3
4
5
x <- loadPhoto()
z <- makeZimage(ncol(x), lensPolyCoef(c(0.9192, -0.1792, -0.000443)))
r <- makeRings(z, angleWidth = asAngle(30))
fi <- getFeatureImage(raster::subset(x, 3), r, sd)
plot(fi)

GastonMauroDiaz/caiman documentation built on Jan. 22, 2022, 4:43 a.m.