defuzzify | R Documentation |
This function translates degree of membership into Boolean logic using a
regional approach. The output ensures that the fuzzy and Boolean versions
remain consistent at the specified level of aggregation (controlled by the
argument segmentation
). This method makes perfect sense to translate a
subpixel classification of gap fraction (or a linear ratio) into a binary
product.
defuzzify(mem, segmentation)
mem |
A SpatRaster object representing the degree of membership in a fuzzy classification. |
segmentation |
An object of the class SpatRaster such as an
object returned by |
An object of the class SpatRaster containing binary information.
This method is also available in the HSP software package \insertCiteLang2013rcaiman.
Other Tool Functions:
calc_oor_index()
,
calc_spherical_distance()
,
colorfulness()
,
correct_vignetting()
,
display_caim()
,
extract_dn()
,
extract_feature()
,
extract_rel_radiance()
,
extract_sky_points()
,
extract_sun_coord()
,
find_sky_pixels()
,
masking()
,
optim_dist_to_black()
,
optim_normalize()
,
percentage_of_clipped_highlights()
,
read_bin()
,
read_caim()
,
read_caim_raw()
,
read_ootb_sky_model()
,
sor_filter()
,
vicinity_filter()
,
write_bin()
,
write_caim()
,
write_ootb_sky_model()
## Not run:
path <- system.file("external/DSCN4500.JPG", package = "rcaiman")
caim <- read_caim(path, c(1250, 1020) - 745, 745 * 2, 745 * 2)
z <- zenith_image(ncol(caim), lens("Nikon_FCE9"))
a <- azimuth_image(z)
r <- gbc(caim$Blue)
r <- correct_vignetting(r, z, c(0.0638, -0.101)) %>% normalize_minmax()
bin <- find_sky_pixels(r, z, a)
bin <- ootb_mblt(r, z, a, bin)
plot(bin$bin)
ratio <- r / bin$sky_s
ratio <- normalize_minmax(ratio, 0, 1, TRUE)
plot(ratio)
g <- sky_grid_segmentation(z, a, 10)
bin2 <- defuzzify(ratio, g)
plot(bin2)
plot(abs(bin$bin - bin2))
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.