pub struct InfraredFrameData {
pub width: u32,
pub height: u32,
pub fps: u32,
pub timestamp: u64,
pub data: Arc<[u16]>,
}Fields§
§width: u32§height: u32§fps: u32§timestamp: u64§data: Arc<[u16]>Implementations§
Source§impl InfraredFrameData
impl InfraredFrameData
pub fn new(infrared_frame: &InfraredFrame) -> Result<Self, Error>
Sourcepub fn get_intensity_at(&self, x: u32, y: u32) -> Option<u16>
pub fn get_intensity_at(&self, x: u32, y: u32) -> Option<u16>
Gets the infrared intensity at a specific pixel coordinate.
Returns None if the coordinates are out of bounds.
Sourcepub fn normalize_intensity(&self, intensity: u16) -> f32
pub fn normalize_intensity(&self, intensity: u16) -> f32
Normalizes infrared values to 0.0-1.0 range for visualization.
This is useful for converting raw infrared values to a normalized range suitable for image processing or visualization.
Sourcepub fn to_grayscale_u8(&self) -> Vec<u8> ⓘ
pub fn to_grayscale_u8(&self) -> Vec<u8> ⓘ
Converts infrared frame data to 8-bit grayscale for visualization.
This method scales the 16-bit infrared values down to 8-bit values suitable for standard image formats.
Sourcepub fn get_intensity_range(&self) -> (u16, u16)
pub fn get_intensity_range(&self) -> (u16, u16)
Gets the minimum and maximum infrared intensity values in the frame.
This is useful for adaptive scaling and analysis of the infrared data.
Trait Implementations§
Source§impl Clone for InfraredFrameData
impl Clone for InfraredFrameData
Source§fn clone(&self) -> InfraredFrameData
fn clone(&self) -> InfraredFrameData
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for InfraredFrameData
impl Debug for InfraredFrameData
Auto Trait Implementations§
impl Freeze for InfraredFrameData
impl RefUnwindSafe for InfraredFrameData
impl Send for InfraredFrameData
impl Sync for InfraredFrameData
impl Unpin for InfraredFrameData
impl UnwindSafe for InfraredFrameData
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