pub struct MaskRegion {
pub atlas_y_offset: usize,
pub padded_x: usize,
pub padded_y: usize,
pub padded_w: usize,
pub padded_h: usize,
pub bbox_x: usize,
pub bbox_y: usize,
pub bbox_w: usize,
pub bbox_h: usize,
}Expand description
Region metadata for a single detection within a compact mask atlas.
The atlas packs padded bounding-box strips vertically. This struct records where each detection’s strip lives in the atlas and how it maps back to the original output coordinate space.
Fields§
§atlas_y_offset: usizeRow offset of this detection’s strip in the atlas.
padded_x: usizeLeft edge of the padded bbox in output image coordinates.
padded_y: usizeTop edge of the padded bbox in output image coordinates.
padded_w: usizeWidth of the padded bbox.
padded_h: usizeHeight of the padded bbox (= number of atlas rows for this strip).
bbox_x: usizeOriginal (unpadded) bbox left edge in output image coordinates.
bbox_y: usizeOriginal (unpadded) bbox top edge in output image coordinates.
bbox_w: usizeOriginal (unpadded) bbox width.
bbox_h: usizeOriginal (unpadded) bbox height.
Trait Implementations§
Source§impl Clone for MaskRegion
impl Clone for MaskRegion
Source§fn clone(&self) -> MaskRegion
fn clone(&self) -> MaskRegion
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 MaskRegion
impl Debug for MaskRegion
impl Copy for MaskRegion
Auto Trait Implementations§
impl Freeze for MaskRegion
impl RefUnwindSafe for MaskRegion
impl Send for MaskRegion
impl Sync for MaskRegion
impl Unpin for MaskRegion
impl UnsafeUnpin for MaskRegion
impl UnwindSafe for MaskRegion
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,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§impl<T> Pointable for T
impl<T> Pointable 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.