![]() |
IRSOL
C++ code implementing socket server for interacting with Baumer camera.
|
Helper to convert pixel values from one bit depth to another with scaling. More...
#include <pixel_format.hpp>
Static Public Member Functions | |
static Pixel< TargetBitDepth >::representation | scale (typename Pixel< SourceBitDepth >::representation value) |
Scales a pixel value from source bit depth to target bit depth. | |
Static Public Attributes | |
static constexpr double | factor |
Compile-time scaling factor: max(Target) / max(Source) | |
Helper to convert pixel values from one bit depth to another with scaling.
This template computes a scaling factor at compile time to convert pixel values from SourceBitDepth to TargetBitDepth by linearly mapping the value ranges.
Example usage:
SourceBitDepth | Bit depth of the input pixel value. |
TargetBitDepth | Bit depth of the output pixel value. |
Definition at line 122 of file pixel_format.hpp.
|
inlinestatic |
Scales a pixel value from source bit depth to target bit depth.
Performs linear scaling of the input value and clamps the result to the maximum value allowed by the target bit depth.
value | Pixel value at SourceBitDepth. |
Definition at line 137 of file pixel_format.hpp.
|
staticconstexpr |
Compile-time scaling factor: max(Target) / max(Source)
Definition at line 125 of file pixel_format.hpp.