1.3.64
 
Loading...
Searching...
No Matches
RadiationCamera Struct Reference

Data object for a radiation camera. More...

#include <RadiationModel.h>

Public Member Functions

 RadiationCamera (std::string initlabel, const std::vector< std::string > &band_label, const helios::vec3 &initposition, const helios::vec3 &initlookat, const CameraProperties &camera_properties, uint initantialiasing_samples)
 
void normalizePixels ()
 Normalize all pixel data in the camera such that the maximum pixel value is 1.0 and the minimum is 0.0 (no clamping applied)
 
void whiteBalance (const std::string &red_band_label, const std::string &green_band_label, const std::string &blue_band_label, float p=5.0)
 Apply auto-exposure scaling to image data to scale the average luminance to a target value.
 
void whiteBalanceGrayEdge (const std::string &red_band_label, const std::string &green_band_label, const std::string &blue_band_label, int derivative_order=1, float p=5.0)
 Apply Gray Edge white balancing algorithm.
 
void whiteBalanceWhitePatch (const std::string &red_band_label, const std::string &green_band_label, const std::string &blue_band_label, float percentile=0.99f)
 Apply White Patch white balancing algorithm.
 
void whiteBalanceSpectral (const std::string &red_band_label, const std::string &green_band_label, const std::string &blue_band_label, helios::Context *context)
 Apply spectral-based white balance using integrated camera response curves.
 
void reinhardToneMapping (const std::string &red_band_label, const std::string &green_band_label, const std::string &blue_band_label)
 Apply Reinhard tone mapping curve to image data.
 
void applyGain (const std::string &red_band_label, const std::string &green_band_label, const std::string &blue_band_label, float percentile=0.95f)
 Apply image gain.
 
void adjustSBC (const std::string &red_band_label, const std::string &green_band_label, const std::string &blue_band_label, float saturation, float brightness, float contrast)
 Applies HDR toning to the specified color bands based on the local adaptation method.
 
void gammaCompress (const std::string &red_band_label, const std::string &green_band_label, const std::string &blue_band_label)
 Apply the color correction matrix to image data.
 
void globalHistogramEqualization (const std::string &red_band_label, const std::string &green_band_label, const std::string &blue_band_label)
 Performs global histogram equalization on the specified color bands.
 
void autoExposure (const std::string &red_band_label, const std::string &green_band_label, const std::string &blue_band_label, float gain_multiplier)
 Apply percentile-based auto-exposure to optimize scene brightness.
 
void applyCameraExposure (helios::Context *context)
 Apply camera exposure based on the camera's exposure setting.
 
void applyCameraWhiteBalance (helios::Context *context)
 Apply automatic white balance correction to camera image data.
 
void adjustBrightnessContrast (const std::string &red_band_label, const std::string &green_band_label, const std::string &blue_band_label, float brightness, float contrast)
 Adjust brightness and contrast of image data.
 
void adjustSaturation (const std::string &red_band_label, const std::string &green_band_label, const std::string &blue_band_label, float saturation)
 Adjust color saturation of image data.
 

Static Public Member Functions

static float lin_to_srgb (float x) noexcept
 Converts a linear color value to sRGB color space.
 
static float srgb_to_lin (float v) noexcept
 Converts an sRGB color component to its linear representation.
 

Data Fields

std::string label
 
helios::vec3 position
 
helios::vec3 lookat
 
float lens_diameter
 
helios::int2 resolution
 
float focal_length
 
float lens_focal_length
 
float HFOV_degrees
 
float FOV_aspect_ratio
 
float sensor_width_mm
 
std::string model
 
std::string lens_make
 
std::string lens_model
 
std::string lens_specification
 
std::string exposure
 
float shutter_speed
 
std::string white_balance
 
float camera_zoom
 
std::string camera_type
 
uint antialiasing_samples
 
std::vector< std::string > band_labels
 
std::map< std::string, std::string > band_spectral_response
 
std::map< std::string, std::vector< float > > pixel_data
 
std::vector< uintpixel_label_UUID
 
std::vector< float > pixel_depth
 
bool lens_flare_enabled = false
 Flag indicating whether lens flare rendering is enabled for this camera.
 
LensFlareProperties lens_flare_properties
 Lens flare rendering properties.
 

Detailed Description

Data object for a radiation camera.

Definition at line 144 of file RadiationModel.h.

Constructor & Destructor Documentation

◆ RadiationCamera()

RadiationCamera::RadiationCamera ( std::string  initlabel,
const std::vector< std::string > &  band_label,
const helios::vec3 initposition,
const helios::vec3 initlookat,
const CameraProperties camera_properties,
uint  initantialiasing_samples 
)
inline

Definition at line 147 of file RadiationModel.h.

Member Function Documentation

◆ adjustBrightnessContrast()

void RadiationCamera::adjustBrightnessContrast ( const std::string &  red_band_label,
const std::string &  green_band_label,
const std::string &  blue_band_label,
float  brightness,
float  contrast 
)

Adjust brightness and contrast of image data.

Parameters
[in]red_band_labelLabel for red channel band
[in]green_band_labelLabel for green channel band
[in]blue_band_labelLabel for blue channel band
[in]brightnessBrightness adjustment factor (1.0 = no change)
[in]contrastContrast adjustment factor (1.0 = no change)

Definition at line 3752 of file RadiationCamera.cpp.

◆ adjustSaturation()

void RadiationCamera::adjustSaturation ( const std::string &  red_band_label,
const std::string &  green_band_label,
const std::string &  blue_band_label,
float  saturation 
)

Adjust color saturation of image data.

Parameters
[in]red_band_labelLabel for red channel band
[in]green_band_labelLabel for green channel band
[in]blue_band_labelLabel for blue channel band
[in]saturationSaturation adjustment factor (1.0 = no change, 0.0 = grayscale, >1.0 = more saturated)

Definition at line 3783 of file RadiationCamera.cpp.

◆ adjustSBC()

void RadiationCamera::adjustSBC ( const std::string &  red_band_label,
const std::string &  green_band_label,
const std::string &  blue_band_label,
float  saturation,
float  brightness,
float  contrast 
)

Applies HDR toning to the specified color bands based on the local adaptation method.

Parameters
[in]red_band_labelLabel for the red color band to be processed.
[in]green_band_labelLabel for the green color band to be processed.
[in]blue_band_labelLabel for the blue color band to be processed.

Definition at line 3397 of file RadiationCamera.cpp.

◆ applyCameraExposure()

void RadiationCamera::applyCameraExposure ( helios::Context context)

Apply camera exposure based on the camera's exposure setting.

Applies exposure scaling to pixel_data based on the camera's exposure mode:

  • "auto": Automatic exposure using percentile-based normalization (18% gray target for RGB, per-band for spectral)
  • "ISOXXX" (e.g., "ISO100"): Fixed exposure based on ISO, shutter speed, and aperture settings. Calibrated to match auto-exposure at reference settings (ISO 100, 1/125s, f/2.8) for typical Helios scenes. Higher ISO/longer shutter/wider aperture → proportionally brighter.
  • "manual": No automatic exposure scaling applied

This method should be called after rendering is complete and pixel_data is populated.

Parameters
[in]contextPointer to Helios context for accessing spectral data

Definition at line 3522 of file RadiationCamera.cpp.

◆ applyCameraWhiteBalance()

void RadiationCamera::applyCameraWhiteBalance ( helios::Context context)

Apply automatic white balance correction to camera image data.

Applies white balance correction based on the camera's white_balance setting:

  • "auto": Applies spectral white balance using camera spectral response curves
  • "off": No white balance correction applied

White balance is automatically skipped for single-channel (grayscale) images. For multi-channel images, white balance is applied simultaneously to all channels.

This method should be called after rendering and exposure adjustment are complete.

Parameters
[in]contextPointer to Helios context for accessing spectral data

Definition at line 3704 of file RadiationCamera.cpp.

◆ applyGain()

void RadiationCamera::applyGain ( const std::string &  red_band_label,
const std::string &  green_band_label,
const std::string &  blue_band_label,
float  percentile = 0.95f 
)

Apply image gain.

Computes the specified percentile of the per-pixel maximum channel values and multiplies all channels by the reciprocal of that percentile so that it is mapped to full white (1.0).

Parameters
[in]red_band_labelLabel for red channel band
[in]green_band_labelLabel for green channel band
[in]blue_band_labelLabel for blue channel band
[in]percentile[optional] Percentile to use for gain computation (e.g., 0.9 for 90th percentile).

Definition at line 3281 of file RadiationCamera.cpp.

◆ autoExposure()

void RadiationCamera::autoExposure ( const std::string &  red_band_label,
const std::string &  green_band_label,
const std::string &  blue_band_label,
float  gain_multiplier 
)

Apply percentile-based auto-exposure to optimize scene brightness.

Parameters
[in]red_band_labelLabel for red channel band
[in]green_band_labelLabel for green channel band
[in]blue_band_labelLabel for blue channel band
[in]gain_multiplierAdditional gain factor to apply after auto-exposure

Definition at line 3472 of file RadiationCamera.cpp.

◆ gammaCompress()

void RadiationCamera::gammaCompress ( const std::string &  red_band_label,
const std::string &  green_band_label,
const std::string &  blue_band_label 
)

Apply the color correction matrix to image data.

Parameters
[in]red_band_labelLabel for red channel band
[in]green_band_labelLabel for green channel band
[in]blue_band_labelLabel for blue channel band Apply gamma compression to image data Applies the standard sRGB electro-optical transfer function to each channel of a linear-light image—clamping negatives to zero and limiting outputs to [0,1]—thereby encoding the data into display-ready sRGB space. This final step ensures that pixel values map correctly to human‐perceived brightness on typical monitors.
[in]red_band_labelLabel for red channel band
[in]green_band_labelLabel for green channel band
[in]blue_band_labelLabel for blue channel band

Definition at line 3451 of file RadiationCamera.cpp.

◆ globalHistogramEqualization()

void RadiationCamera::globalHistogramEqualization ( const std::string &  red_band_label,
const std::string &  green_band_label,
const std::string &  blue_band_label 
)

Performs global histogram equalization on the specified color bands.

Parameters
[in]red_band_labelLabel for the red band to be processed.
[in]green_band_labelLabel for the green band to be processed.
[in]blue_band_labelLabel for the blue band to be processed.

Definition at line 3313 of file RadiationCamera.cpp.

◆ lin_to_srgb()

static float RadiationCamera::lin_to_srgb ( float  x)
inlinestaticnoexcept

Converts a linear color value to sRGB color space.

Parameters
[in]xInput value to be converted. Values > 1.0 are clipped to white (1.0).
Returns
Corresponding value in the sRGB color space, clamped to [0.0, 1.0].

Definition at line 397 of file RadiationModel.h.

◆ normalizePixels()

void RadiationCamera::normalizePixels ( )

Normalize all pixel data in the camera such that the maximum pixel value is 1.0 and the minimum is 0.0 (no clamping applied)

Definition at line 2914 of file RadiationCamera.cpp.

◆ reinhardToneMapping()

void RadiationCamera::reinhardToneMapping ( const std::string &  red_band_label,
const std::string &  green_band_label,
const std::string &  blue_band_label 
)

Apply Reinhard tone mapping curve to image data.

The Reinhard curve applies a simple global tone mapping to compress high dynamic range into displayable range while preserving chroma.

Parameters
[in]red_band_labelLabel for red channel band
[in]green_band_labelLabel for green channel band
[in]blue_band_labelLabel for blue channel band

Definition at line 3256 of file RadiationCamera.cpp.

◆ srgb_to_lin()

static float RadiationCamera::srgb_to_lin ( float  v)
inlinestaticnoexcept

Converts an sRGB color component to its linear representation.

Parameters
[in]vsRGB color component in the range [0, 1]
Returns
Corresponding linear color component in the range [0, 1]

Definition at line 411 of file RadiationModel.h.

◆ whiteBalance()

void RadiationCamera::whiteBalance ( const std::string &  red_band_label,
const std::string &  green_band_label,
const std::string &  blue_band_label,
float  p = 5.0 
)

Apply auto-exposure scaling to image data to scale the average luminance to a target value.

Computes the image’s mean luminance and applies a single uniform gain so that the scene-average luminance becomes the specified grey_target value.

Parameters
[in]target[optional] Target average luminance value. Default is 18%. Apply auto-white balancing to image data based on Gray World assumption using Minkowski mean
[in]red_band_labelLabel for red channel band
[in]green_band_labelLabel for green channel band
[in]blue_band_labelLabel for blue channel band
[in]p[optional] Minkowski mean parameter. Default is 5.0.

Definition at line 2936 of file RadiationCamera.cpp.

◆ whiteBalanceGrayEdge()

void RadiationCamera::whiteBalanceGrayEdge ( const std::string &  red_band_label,
const std::string &  green_band_label,
const std::string &  blue_band_label,
int  derivative_order = 1,
float  p = 5.0 
)

Apply Gray Edge white balancing algorithm.

Uses edge information to estimate illuminant, assuming edge differences are achromatic on average. Works better than Gray World for vegetation and textured scenes.

Parameters
[in]red_band_labelLabel for red channel band
[in]green_band_labelLabel for green channel band
[in]blue_band_labelLabel for blue channel band
[in]derivative_order[optional] Order of derivative (1 or 2). Default is 1.
[in]p[optional] Minkowski norm parameter. Default is 5.0.

Definition at line 3000 of file RadiationCamera.cpp.

◆ whiteBalanceSpectral()

void RadiationCamera::whiteBalanceSpectral ( const std::string &  red_band_label,
const std::string &  green_band_label,
const std::string &  blue_band_label,
helios::Context context 
)

Apply spectral-based white balance using integrated camera response curves.

Normalizes image channels based on the integrated spectral response of each camera band. This method assumes a flat light source spectrum and normalizes each channel such that an object with flat spectral reflectance appears correctly white balanced. Each channel is multiplied by the reciprocal of its integrated spectral response.

Parameters
[in]red_band_labelLabel for red channel band
[in]green_band_labelLabel for green channel band
[in]blue_band_labelLabel for blue channel band
[in]contextPointer to Helios context for accessing spectral data

Definition at line 3169 of file RadiationCamera.cpp.

◆ whiteBalanceWhitePatch()

void RadiationCamera::whiteBalanceWhitePatch ( const std::string &  red_band_label,
const std::string &  green_band_label,
const std::string &  blue_band_label,
float  percentile = 0.99f 
)

Apply White Patch white balancing algorithm.

Assumes brightest pixels in the scene represent white objects under the illuminant.

Parameters
[in]red_band_labelLabel for red channel band
[in]green_band_labelLabel for green channel band
[in]blue_band_labelLabel for blue channel band
[in]percentile[optional] Percentile of brightest pixels to use. Default is 0.99 (top 1%).

Definition at line 3121 of file RadiationCamera.cpp.

Field Documentation

◆ antialiasing_samples

uint RadiationCamera::antialiasing_samples

Definition at line 208 of file RadiationModel.h.

◆ band_labels

std::vector<std::string> RadiationCamera::band_labels

Definition at line 210 of file RadiationModel.h.

◆ band_spectral_response

std::map<std::string, std::string> RadiationCamera::band_spectral_response

Definition at line 212 of file RadiationModel.h.

◆ camera_type

std::string RadiationCamera::camera_type

Definition at line 206 of file RadiationModel.h.

◆ camera_zoom

float RadiationCamera::camera_zoom

Definition at line 204 of file RadiationModel.h.

◆ exposure

std::string RadiationCamera::exposure

Definition at line 198 of file RadiationModel.h.

◆ focal_length

float RadiationCamera::focal_length

Definition at line 180 of file RadiationModel.h.

◆ FOV_aspect_ratio

float RadiationCamera::FOV_aspect_ratio

Definition at line 186 of file RadiationModel.h.

◆ HFOV_degrees

float RadiationCamera::HFOV_degrees

Definition at line 184 of file RadiationModel.h.

◆ label

std::string RadiationCamera::label

Definition at line 170 of file RadiationModel.h.

◆ lens_diameter

float RadiationCamera::lens_diameter

Definition at line 176 of file RadiationModel.h.

◆ lens_flare_enabled

bool RadiationCamera::lens_flare_enabled = false

Flag indicating whether lens flare rendering is enabled for this camera.

Definition at line 220 of file RadiationModel.h.

◆ lens_flare_properties

LensFlareProperties RadiationCamera::lens_flare_properties

Lens flare rendering properties.

Definition at line 223 of file RadiationModel.h.

◆ lens_focal_length

float RadiationCamera::lens_focal_length

Definition at line 182 of file RadiationModel.h.

◆ lens_make

std::string RadiationCamera::lens_make

Definition at line 192 of file RadiationModel.h.

◆ lens_model

std::string RadiationCamera::lens_model

Definition at line 194 of file RadiationModel.h.

◆ lens_specification

std::string RadiationCamera::lens_specification

Definition at line 196 of file RadiationModel.h.

◆ lookat

helios::vec3 RadiationCamera::lookat

Definition at line 174 of file RadiationModel.h.

◆ model

std::string RadiationCamera::model

Definition at line 190 of file RadiationModel.h.

◆ pixel_data

std::map<std::string, std::vector<float> > RadiationCamera::pixel_data

Definition at line 214 of file RadiationModel.h.

◆ pixel_depth

std::vector<float> RadiationCamera::pixel_depth

Definition at line 217 of file RadiationModel.h.

◆ pixel_label_UUID

std::vector<uint> RadiationCamera::pixel_label_UUID

Definition at line 216 of file RadiationModel.h.

◆ position

helios::vec3 RadiationCamera::position

Definition at line 172 of file RadiationModel.h.

◆ resolution

helios::int2 RadiationCamera::resolution

Definition at line 178 of file RadiationModel.h.

◆ sensor_width_mm

float RadiationCamera::sensor_width_mm

Definition at line 188 of file RadiationModel.h.

◆ shutter_speed

float RadiationCamera::shutter_speed

Definition at line 200 of file RadiationModel.h.

◆ white_balance

std::string RadiationCamera::white_balance

Definition at line 202 of file RadiationModel.h.


The documentation for this struct was generated from the following files: