membership2color: Compute the membership value to a color.

Description Usage Arguments Value See Also Examples

Description

This algorithm models the degree of membership to a color with two Gaussian membership functions and the layer A and B of the CIE L*a*b* color space. The lightness information is omitted.

Usage

1
2
3
4
5
6
7
membership2color(x, ...)

## S4 method for signature 'color'
membership2color(x, targetColor, sigma = NULL, ...)

## S4 method for signature 'RasterStackBrick'
membership2color(x, targetColor, sigma = NULL, ...)

Arguments

x

color or RasterStack or RasterBrick.

...

Additional arguments as for writeRaster.

targetColor

color.

sigma

numeric. Default NULL means the algorithms will estimate it.

Value

Numeric or RasterLayer.

See Also

normalize, enhanceHP.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
# for circular hemispherical photos
x <- loadPhoto()
x <- normalize(x, 0, 255)
xe <- enhanceHP(x)
plot(xe)

z <- makeZimage(ncol(x), lensPolyCoef(c(0.6427, 0.0346, -0.024491)))

m <- doMask(z, zlim = asAngle(c(30,60)), alim = asAngle(c(0, 45)))
# mask affects the result but does not crop it (see Details).
plot(enhanceHP(x, mask = m))

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