mask_hs | R Documentation |
Given a zenith or azimuth image and angle restrictions, this function produces a mask.
mask_hs(r, from, to)
r |
SpatRaster built with |
from, to |
angle in degrees, inclusive limits. |
An object of class SpatRaster with values 0
and
1
.
masking()
Other Segmentation Functions:
chessboard()
,
mask_sunlit_canopy()
,
polar_qtree()
,
qtree()
,
rings_segmentation()
,
sectors_segmentation()
,
sky_grid_segmentation()
## Not run:
z <- zenith_image(1000, lens())
a <- azimuth_image(z)
m1 <- mask_hs(z, 20, 70)
plot(m1)
m2 <- mask_hs(a, 330,360)
plot(m2)
plot(m1 & m2)
plot(m1 | m2)
# 15 degrees at each side of 0
m1 <- mask_hs(a, 0, 15)
m2 <- mask_hs(a, 345, 360)
plot(m1 | m2)
# better use this
plot(!is.na(z))
# instead of this
plot(mask_hs(z, 0, 90))
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.