pub struct RgbImage { /* private fields */ }Expand description
An interleaved 8-bit RGB image, row-major, width * height * 3 bytes.
Implementations§
Source§impl RgbImage
impl RgbImage
Sourcepub fn new(
width: usize,
height: usize,
data: Vec<u8>,
) -> Result<Self, ImageSizeError>
pub fn new( width: usize, height: usize, data: Vec<u8>, ) -> Result<Self, ImageSizeError>
An image from interleaved RGB bytes.
Sourcepub fn from_gray(
width: usize,
height: usize,
gray: &[u8],
) -> Result<Self, ImageSizeError>
pub fn from_gray( width: usize, height: usize, gray: &[u8], ) -> Result<Self, ImageSizeError>
An image from one 8-bit grey channel, copied into R, G and B (for the grayscale cameras of EuRoC and TUM-VI).
pub fn width(&self) -> usize
pub fn height(&self) -> usize
Trait Implementations§
impl Eq for RgbImage
impl StructuralPartialEq for RgbImage
Auto Trait Implementations§
impl Forget for RgbImage
impl Freeze for RgbImage
impl Move for RgbImage
impl RefUnwindSafe for RgbImage
impl Send for RgbImage
impl Sync for RgbImage
impl Unpin for RgbImage
impl UnsafeUnpin for RgbImage
impl UnwindSafe for RgbImage
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> Scalar for T
Source§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
Source§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
The inverse inclusion map: attempts to construct
self from the equivalent element of its
superset. Read moreSource§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
Checks if
self is actually part of its subset T (and can be converted to it).Source§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
Use with care! Same as
self.to_subset but without any property checks. Always succeeds.Source§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
The inclusion map: converts
self to the equivalent element of its superset.