pub struct TilePlacement {
pub index: usize,
pub count: usize,
pub origin: (f32, f32),
pub crop_size: (f32, f32),
pub letterbox: Option<[f32; 4]>,
pub frame_dims: (f32, f32),
}Expand description
How one tile was cut from the full frame and fed to the model. Produced by
the input side (the edgefirst-image tiling API), consumed by
lift_tile_boxes. All fields are native full-frame pixels except
letterbox.
Fields§
§index: usizeTile index within the frame grid, 0..count.
count: usizeTotal tiles for this frame (the streaming fan-in fence).
origin: (f32, f32)Native crop origin (ox, oy) in full-frame pixels.
crop_size: (f32, f32)Native crop size (cw, ch) in full-frame pixels. Equals the tile size
for the full-size tiles the EvenDist grid produces.
letterbox: Option<[f32; 4]>Normalized letterbox content bounds [lx0, ly0, lx1, ly1] on the model
input, or None when the crop was stretched to fill it (the hot path).
frame_dims: (f32, f32)Full-frame dimensions (frame_w, frame_h) in pixels.
Trait Implementations§
Source§impl Clone for TilePlacement
impl Clone for TilePlacement
Source§fn clone(&self) -> TilePlacement
fn clone(&self) -> TilePlacement
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for TilePlacement
Source§impl Debug for TilePlacement
impl Debug for TilePlacement
Source§impl PartialEq for TilePlacement
impl PartialEq for TilePlacement
impl StructuralPartialEq for TilePlacement
Auto Trait Implementations§
impl Freeze for TilePlacement
impl RefUnwindSafe for TilePlacement
impl Send for TilePlacement
impl Sync for TilePlacement
impl Unpin for TilePlacement
impl UnsafeUnpin for TilePlacement
impl UnwindSafe for TilePlacement
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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 more