pub struct TilePlacement {
pub index: usize,
pub count: usize,
pub origin: (f32, f32),
pub crop_size: (f32, f32),
pub content_region: Option<[f32; 4]>,
pub frame_dims: (f32, f32),
}Expand description
One tile’s placement within a frame grid.
Produced by edgefirst_image::ImageProcessor::plan_tiles and consumed by
edgefirst_decoder::tiling to lift per-tile detections back to full-frame
coordinates. It lives here because it is the contract between those two
crates: it was previously defined in decoder and re-exported by image,
so the producer imported its own output type from its consumer.
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.
content_region: Option<[f32; 4]>The image content on the model input as normalized
[xmin, ymin, xmax, ymax] (a letterbox’s content region), 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
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreimpl Copy for TilePlacement
Source§impl Debug for TilePlacement
impl Debug for TilePlacement
Source§impl From<&EfTilePlacement> for TilePlacement
impl From<&EfTilePlacement> for TilePlacement
Source§fn from(p: &EfTilePlacement) -> TilePlacement
fn from(p: &EfTilePlacement) -> 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
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> ⓘ
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> ⓘ
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