Learn R Programming

rcaiman (version 2.0.1)

ring_segmentation: Assign zenith-ring labels

Description

Segment a hemispherical view into concentric rings by slicing the zenith angle from 0 to 90 deg at equal steps.

Usage

ring_segmentation(z, angle_width, return = "id")

Value

Single-layer terra::SpatRaster: ring IDs if return = "id", or mean zenith angle (deg) if return = "angle".

Arguments

z

terra::SpatRaster generated with zenith_image().

angle_width

numeric vector of length one. Ring width in degrees. Must divide the 0-90 deg range into an integer number of segments.

return

character vector of length one. Output mode: "id" (default) or "angle".

Examples

Run this code
z <- zenith_image(600, lens())
rings <- ring_segmentation(z, 15)
plot(rings == 1)

Run the code above in your browser using DataLab