pub struct FloatImageView<'a> { /* private fields */ }Expand description
A borrowed, validated, row-major f32 image, e.g. a thermal frame in °C.
The f32 detector and tracker work in the image’s own unit: no range
normalization and no 8-bit conversion takes place. Validation guarantees
that every value is finite and at most MAX_ABS_VALUE
in magnitude, so no intermediate can overflow and no NaN can reach the
score comparisons. Replace invalid pixels (e.g. dead sensor pixels) before
creating the view.
Implementations§
Source§impl<'a> FloatImageView<'a>
impl<'a> FloatImageView<'a>
Sourcepub const MAX_ABS_VALUE: f32 = 16_777_216.0
pub const MAX_ABS_VALUE: f32 = 16_777_216.0
Largest accepted pixel magnitude, 2^24. Within it, Scharr gradients, structure-tensor sums and their determinant stay finite.
Sourcepub fn new(
pixels: &'a [f32],
width: u32,
height: u32,
) -> Result<Self, FloatImageError>
pub fn new( pixels: &'a [f32], width: u32, height: u32, ) -> Result<Self, FloatImageError>
Validates pixels as a width x height row-major image.
Costs one pass over the pixels.
Sourcepub fn dimensions(&self) -> (u32, u32)
pub fn dimensions(&self) -> (u32, u32)
(width, height) in pixels.
Trait Implementations§
Source§impl<'a> Clone for FloatImageView<'a>
impl<'a> Clone for FloatImageView<'a>
impl<'a> Copy for FloatImageView<'a>
Auto Trait Implementations§
impl<'a> Freeze for FloatImageView<'a>
impl<'a> RefUnwindSafe for FloatImageView<'a>
impl<'a> Send for FloatImageView<'a>
impl<'a> Sync for FloatImageView<'a>
impl<'a> Unpin for FloatImageView<'a>
impl<'a> UnsafeUnpin for FloatImageView<'a>
impl<'a> UnwindSafe for FloatImageView<'a>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more