Learn R Programming

rcaiman (version 2.0.1)

sector_segmentation: Assign azimuth-sector labels

Description

Segment a hemispherical view into equal azimuth sectors by slicing the azimuth angle from 0 to 360 deg at fixed steps.

Usage

sector_segmentation(a, angle_width)

Value

Single-layer terra::SpatRaster with integer values. Segments will resemble pizza slices.

Arguments

a

terra::SpatRaster generated with azimuth_image().

angle_width

numeric vector of lenght one. Sector width in degrees. Must divide the 0–360 deg range into an integer number of sectors.

Examples

Run this code
z <- zenith_image(600, lens())
a <- azimuth_image(z)
sectors <- sector_segmentation(a, 15)
plot(sectors == 1)

Run the code above in your browser using DataLab