Description Usage Arguments Value References See Also Examples
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.
1 2 3 4 | fuzzyLightness(x, m, thr, fuzziness)
## S4 method for signature 'numeric'
fuzzyLightness(x, m, thr, fuzziness)
|
x |
numeric. The lightness value. |
m |
numeric lying between |
thr |
numeric of length |
fuzziness |
numeric of length |
numeric.
Diaz, G.M., Lencinas, J.D., 2015. Enhanced Gap Fraction Extraction From Hemispherical Photography. IEEE Geosci. Remote Sens. Lett. 12, 1784-1789.
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)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.