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< uint > | pixel_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. | |
Data object for a radiation camera.
Definition at line 144 of file RadiationModel.h.
|
inline |
Definition at line 147 of file RadiationModel.h.
| 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.
| [in] | red_band_label | Label for red channel band |
| [in] | green_band_label | Label for green channel band |
| [in] | blue_band_label | Label for blue channel band |
| [in] | brightness | Brightness adjustment factor (1.0 = no change) |
| [in] | contrast | Contrast adjustment factor (1.0 = no change) |
Definition at line 3752 of file RadiationCamera.cpp.
| 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.
| [in] | red_band_label | Label for red channel band |
| [in] | green_band_label | Label for green channel band |
| [in] | blue_band_label | Label for blue channel band |
| [in] | saturation | Saturation adjustment factor (1.0 = no change, 0.0 = grayscale, >1.0 = more saturated) |
Definition at line 3783 of file RadiationCamera.cpp.
| 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.
| [in] | red_band_label | Label for the red color band to be processed. |
| [in] | green_band_label | Label for the green color band to be processed. |
| [in] | blue_band_label | Label for the blue color band to be processed. |
Definition at line 3397 of file RadiationCamera.cpp.
| 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:
This method should be called after rendering is complete and pixel_data is populated.
| [in] | context | Pointer to Helios context for accessing spectral data |
Definition at line 3522 of file RadiationCamera.cpp.
| 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:
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.
| [in] | context | Pointer to Helios context for accessing spectral data |
Definition at line 3704 of file RadiationCamera.cpp.
| 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).
| [in] | red_band_label | Label for red channel band |
| [in] | green_band_label | Label for green channel band |
| [in] | blue_band_label | Label 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.
| 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.
| [in] | red_band_label | Label for red channel band |
| [in] | green_band_label | Label for green channel band |
| [in] | blue_band_label | Label for blue channel band |
| [in] | gain_multiplier | Additional gain factor to apply after auto-exposure |
Definition at line 3472 of file RadiationCamera.cpp.
| 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.
| [in] | red_band_label | Label for red channel band |
| [in] | green_band_label | Label for green channel band |
| [in] | blue_band_label | Label 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_label | Label for red channel band |
| [in] | green_band_label | Label for green channel band |
| [in] | blue_band_label | Label for blue channel band |
Definition at line 3451 of file RadiationCamera.cpp.
| 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.
| [in] | red_band_label | Label for the red band to be processed. |
| [in] | green_band_label | Label for the green band to be processed. |
| [in] | blue_band_label | Label for the blue band to be processed. |
Definition at line 3313 of file RadiationCamera.cpp.
|
inlinestaticnoexcept |
Converts a linear color value to sRGB color space.
| [in] | x | Input value to be converted. Values > 1.0 are clipped to white (1.0). |
Definition at line 397 of file RadiationModel.h.
| 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.
| 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.
| [in] | red_band_label | Label for red channel band |
| [in] | green_band_label | Label for green channel band |
| [in] | blue_band_label | Label for blue channel band |
Definition at line 3256 of file RadiationCamera.cpp.
|
inlinestaticnoexcept |
Converts an sRGB color component to its linear representation.
| [in] | v | sRGB color component in the range [0, 1] |
Definition at line 411 of file RadiationModel.h.
| 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.
| [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_label | Label for red channel band |
| [in] | green_band_label | Label for green channel band |
| [in] | blue_band_label | Label for blue channel band |
| [in] | p | [optional] Minkowski mean parameter. Default is 5.0. |
Definition at line 2936 of file RadiationCamera.cpp.
| 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.
| [in] | red_band_label | Label for red channel band |
| [in] | green_band_label | Label for green channel band |
| [in] | blue_band_label | Label 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.
| 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.
| [in] | red_band_label | Label for red channel band |
| [in] | green_band_label | Label for green channel band |
| [in] | blue_band_label | Label for blue channel band |
| [in] | context | Pointer to Helios context for accessing spectral data |
Definition at line 3169 of file RadiationCamera.cpp.
| 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.
| [in] | red_band_label | Label for red channel band |
| [in] | green_band_label | Label for green channel band |
| [in] | blue_band_label | Label 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.
| uint RadiationCamera::antialiasing_samples |
Definition at line 208 of file RadiationModel.h.
| std::vector<std::string> RadiationCamera::band_labels |
Definition at line 210 of file RadiationModel.h.
| std::map<std::string, std::string> RadiationCamera::band_spectral_response |
Definition at line 212 of file RadiationModel.h.
| std::string RadiationCamera::camera_type |
Definition at line 206 of file RadiationModel.h.
| float RadiationCamera::camera_zoom |
Definition at line 204 of file RadiationModel.h.
| std::string RadiationCamera::exposure |
Definition at line 198 of file RadiationModel.h.
| float RadiationCamera::focal_length |
Definition at line 180 of file RadiationModel.h.
| float RadiationCamera::FOV_aspect_ratio |
Definition at line 186 of file RadiationModel.h.
| float RadiationCamera::HFOV_degrees |
Definition at line 184 of file RadiationModel.h.
| std::string RadiationCamera::label |
Definition at line 170 of file RadiationModel.h.
| float RadiationCamera::lens_diameter |
Definition at line 176 of file RadiationModel.h.
| 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.
| LensFlareProperties RadiationCamera::lens_flare_properties |
Lens flare rendering properties.
Definition at line 223 of file RadiationModel.h.
| float RadiationCamera::lens_focal_length |
Definition at line 182 of file RadiationModel.h.
| std::string RadiationCamera::lens_make |
Definition at line 192 of file RadiationModel.h.
| std::string RadiationCamera::lens_model |
Definition at line 194 of file RadiationModel.h.
| std::string RadiationCamera::lens_specification |
Definition at line 196 of file RadiationModel.h.
| helios::vec3 RadiationCamera::lookat |
Definition at line 174 of file RadiationModel.h.
| std::string RadiationCamera::model |
Definition at line 190 of file RadiationModel.h.
| std::map<std::string, std::vector<float> > RadiationCamera::pixel_data |
Definition at line 214 of file RadiationModel.h.
| std::vector<float> RadiationCamera::pixel_depth |
Definition at line 217 of file RadiationModel.h.
| std::vector<uint> RadiationCamera::pixel_label_UUID |
Definition at line 216 of file RadiationModel.h.
| helios::vec3 RadiationCamera::position |
Definition at line 172 of file RadiationModel.h.
| helios::int2 RadiationCamera::resolution |
Definition at line 178 of file RadiationModel.h.
| float RadiationCamera::sensor_width_mm |
Definition at line 188 of file RadiationModel.h.
| float RadiationCamera::shutter_speed |
Definition at line 200 of file RadiationModel.h.
| std::string RadiationCamera::white_balance |
Definition at line 202 of file RadiationModel.h.