Learn R Programming

rayimage (version 0.27.1)

estimate_environment_white: Estimate Lat-Long Environment White

Description

Estimate the scene white produced by a lat-long environment map. The default weighting matches the irradiance seen by an upward-facing diffuse surface: cos(theta) * d_omega over the upper hemisphere.

Usage

estimate_environment_white(
  environment_map,
  weighting = c("cosine", "solid_angle"),
  hemisphere = c("upper", "full"),
  environment_colorspace = NULL,
  environment_white = NULL
)

Value

Length-3 XYZ white point normalized to Y = 1. The returned vector includes rgb, rgb_ratio, xy, approximate cct, sum_weights, weighting, and hemisphere attributes for diagnostics.

Arguments

environment_map

Lat-long environment map image, rayimg, array, or filename.

weighting

Default "cosine". Weighting method. "cosine" computes upward diffuse irradiance; "solid_angle" computes an unprojected spherical average.

hemisphere

Default "upper". Hemisphere to use. "upper" uses only rows above the horizon; "full" uses the full lat-long map.

environment_colorspace

Default NULL. Optional colorspace descriptor used to tag environment_map on read.

environment_white

Default NULL. Optional white point used to tag environment_map on read.