pub struct ARImageProcInfo {
pub image_x: i32,
pub image_y: i32,
pub image2: Option<Vec<u8>>,
pub image_temp_u16: Option<Vec<u16>>,
pub hist_bins: [u32; 256],
pub cdf_bins: [u32; 256],
pub min: u8,
pub max: u8,
}Expand description
Structure holding settings for an instance of the image-processing pipeline
Fields§
§image_x: i32Width of image buffer
image_y: i32Height of image buffer
image2: Option<Vec<u8>>Extra buffer, allocated as required for filtering
image_temp_u16: Option<Vec<u16>>Intermediate buffer for separable filters
hist_bins: [u32; 256]Luminance histogram
cdf_bins: [u32; 256]Luminance cumulative density function
min: u8Minimum luminance
max: u8Maximum luminance
Implementations§
Source§impl ARImageProcInfo
impl ARImageProcInfo
Sourcepub fn luma_hist(&mut self, data: &[u8]) -> Result<(), &'static str>
pub fn luma_hist(&mut self, data: &[u8]) -> Result<(), &'static str>
Calculate luminance histogram
Sourcepub fn luma_hist_and_cdf(&mut self, data: &[u8]) -> Result<(), &'static str>
pub fn luma_hist_and_cdf(&mut self, data: &[u8]) -> Result<(), &'static str>
Calculate image histogram and cumulative density function
Sourcepub fn luma_hist_and_cdf_and_percentile(
&mut self,
data: &[u8],
percentile: f32,
) -> Result<u8, &'static str>
pub fn luma_hist_and_cdf_and_percentile( &mut self, data: &[u8], percentile: f32, ) -> Result<u8, &'static str>
Calculate image histogram, cumulative density function, and luminance value at a given histogram percentile
Sourcepub fn luma_hist_and_cdf_and_median(
&mut self,
data: &[u8],
) -> Result<u8, &'static str>
pub fn luma_hist_and_cdf_and_median( &mut self, data: &[u8], ) -> Result<u8, &'static str>
Calculate image histogram, cumulative density function, and median luminance value
Sourcepub fn luma_hist_and_otsu(&mut self, data: &[u8]) -> Result<u8, &'static str>
pub fn luma_hist_and_otsu(&mut self, data: &[u8]) -> Result<u8, &'static str>
Calculate image histogram, and binarize image using Otsu’s method
Trait Implementations§
Source§impl Clone for ARImageProcInfo
impl Clone for ARImageProcInfo
Source§fn clone(&self) -> ARImageProcInfo
fn clone(&self) -> ARImageProcInfo
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 moreAuto Trait Implementations§
impl Freeze for ARImageProcInfo
impl RefUnwindSafe for ARImageProcInfo
impl Send for ARImageProcInfo
impl Sync for ARImageProcInfo
impl Unpin for ARImageProcInfo
impl UnsafeUnpin for ARImageProcInfo
impl UnwindSafe for ARImageProcInfo
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