getFeatureImage: Get an image that stores object features.

Description Usage Arguments Value See Also Examples

Description

Given a single layer data, a segmentation and a function, this algorithm returns RasterLayer like segmentation but with its segment-IDs replaced with the segment-features, which are the return of processing all the pixels that belong to a segment with the aforementioned function.

Usage

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

## S4 method for signature 'RasterLayer'
getFeatureImage(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

RasterLayer.

See Also

extractFeatures.

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.