pub struct RawImage {
pub data: Vec<u16>,
/* private fields */
}Expand description
Raw image data container.
Holds the decoded raw sensor data along with associated metadata.
Use RawImageBuilder to construct new instances.
Fields§
§data: Vec<u16>Raw pixel data (16-bit values, one per sensor pixel). Stored in row-major order: data[y * width + x]
Implementations§
Source§impl RawImage
impl RawImage
Sourcepub fn new(
size: Size,
active_area: Rect,
bit_depth: u8,
cfa_pattern: CfaPattern,
) -> Self
pub fn new( size: Size, active_area: Rect, bit_depth: u8, cfa_pattern: CfaPattern, ) -> Self
Create a new empty RawImage with the given parameters.
Sourcepub fn builder(
size: Size,
active_area: Rect,
bit_depth: u8,
cfa_pattern: CfaPattern,
) -> RawImageBuilder
pub fn builder( size: Size, active_area: Rect, bit_depth: u8, cfa_pattern: CfaPattern, ) -> RawImageBuilder
Create a builder for constructing a RawImage.
Sourcepub fn active_area(&self) -> Rect
pub fn active_area(&self) -> Rect
Active/crop area (usable image region).
Sourcepub fn cfa_pattern(&self) -> CfaPattern
pub fn cfa_pattern(&self) -> CfaPattern
CFA (Bayer) pattern.
Sourcepub fn xtrans_pattern(&self) -> Option<&XTransPattern>
pub fn xtrans_pattern(&self) -> Option<&XTransPattern>
X-Trans CFA pattern, if applicable.
Sourcepub fn black_levels(&self) -> &[u16; 4]
pub fn black_levels(&self) -> &[u16; 4]
Black level values (per CFA color channel).
Sourcepub fn white_level(&self) -> u16
pub fn white_level(&self) -> u16
White/saturation level.
Sourcepub fn baseline_exposure(&self) -> Option<f32>
pub fn baseline_exposure(&self) -> Option<f32>
Baseline exposure offset in EV.
Sourcepub fn default_crop(&self) -> Option<Rect>
pub fn default_crop(&self) -> Option<Rect>
Default crop rectangle.
Sourcepub fn set_black_levels(&mut self, levels: [u16; 4])
pub fn set_black_levels(&mut self, levels: [u16; 4])
Set black level values.
Sourcepub fn set_white_level(&mut self, level: u16)
pub fn set_white_level(&mut self, level: u16)
Set white/saturation level.
Sourcepub fn set_baseline_exposure(&mut self, ev: Option<f32>)
pub fn set_baseline_exposure(&mut self, ev: Option<f32>)
Set baseline exposure offset.
Sourcepub fn set_default_crop(&mut self, crop: Option<Rect>)
pub fn set_default_crop(&mut self, crop: Option<Rect>)
Set default crop rectangle.
Sourcepub fn set_xtrans_pattern(&mut self, pattern: Option<XTransPattern>)
pub fn set_xtrans_pattern(&mut self, pattern: Option<XTransPattern>)
Set X-Trans pattern.
Sourcepub fn set_bit_depth(&mut self, bit_depth: u8)
pub fn set_bit_depth(&mut self, bit_depth: u8)
Set bit depth.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for RawImage
impl RefUnwindSafe for RawImage
impl Send for RawImage
impl Sync for RawImage
impl Unpin for RawImage
impl UnsafeUnpin for RawImage
impl UnwindSafe for RawImage
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