fuzzyLightness: Compute a weighted membership value to lightness.

Description Usage Arguments Value References See Also Examples

Description

This algorithm uses a threshold value as the location parameter of a logistic membership function whose scale parameter depends on a variable. This dependence can be explained as follows: if the variable is equal to 1, then the membership function is as a threshold function because the scale parameter is 0; lowering the variable increases the scale parameter, thus blurring the threshold because it decreases the steepness of the curve.

Usage

1
2
3
4
fuzzyLightness(x, m, thr, fuzziness)

## S4 method for signature 'numeric'
fuzzyLightness(x, m, thr, fuzziness)

Arguments

x

numeric. The lightness value.

m

numeric lying between 0 and 1, same length as x. It is the scale parameter of the logistic membership function.

thr

numeric of length 1. Location parameter of the logistic membership function.

fuzziness

numeric of length 1.

Value

numeric.

References

Diaz, G.M., Lencinas, J.D., 2015. Enhanced Gap Fraction Extraction From Hemispherical Photography. IEEE Geosci. Remote Sens. Lett. 12, 1784-1789.

See Also

plogis.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
x <- raster(ncol = 100, nrow = 100)
extent(x) <- c(0, 100, 0, 100)
values(x) <- rep(1:ncol(x), nrow(x))
m <- t(x / getMax(x))
plot(x)
plot(m)

r <- x

values(r) <- fuzzyLightness(values(x), values(m), 45, 10)
plot(r, col = grey(1:100 / 100), ylab = "m * 100", xlab = "Lightness")

values(r) <- fuzzyLightness(values(x), values(m), 45, 50)
plot(r, col = grey(1:100 / 100), add = TRUE)

values(r) <- fuzzyLightness(values(x), values(m), 80, 20)
plot(r, col = grey(1:100 / 100), add = TRUE)

values(r) <- fuzzyLightness(values(x), values(m), 80, 1)
plot(r, col = grey(1:100 / 100), add = TRUE)

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