View source: R/membership_to_color.R
membership_to_color | R Documentation |
This function was first presented in \insertCiteDiaz2015;textualrcaiman. It computes the degree of membership to a color using two Gaussian membership functions and the axes A and B from the CIE LAB color space. The lightness dimension is not considered in the calculations.
membership_to_color(caim, target_color, sigma = NULL)
caim |
SpatRaster. The return of a call to |
target_color |
color. |
sigma |
Numeric vector of length one. Use |
If you use this function in your research, please cite
\insertCiteDiaz2015;textualrcaiman in addition to this package
(citation("rcaiman"
).
It returns an object from the class SpatRaster. First layer
is the membership to the target color. Second layer is the membership to
grey. Both memberships are calculated with same sigma
.
Other Pre-processing Functions:
enhance_caim()
,
gbc()
,
local_fuzzy_thresholding()
,
normalize()
## Not run:
caim <- read_caim() %>% normalize
z <- zenith_image(ncol(caim), lens())
a <- azimuth_image(z)
m <- !is.na(z)
sky_blue <- HSV(239, 0.85, 0.5)
mem <- membership_to_color(caim, sky_blue)
plot(mem)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.