pub struct EventFrame { /* private fields */ }Implementations§
Source§impl EventFrame
impl EventFrame
Sourcepub fn connected_components(
&self,
connectivity: u8,
) -> Result<EventFrame, ClusterError>
pub fn connected_components( &self, connectivity: u8, ) -> Result<EventFrame, ClusterError>
Labels 4- or 8-connected foreground components. connectivity must be 4 or 8. The
result is a single-channel u64 frame the same size as self: 0 is background, and each
component gets a distinct label in scan order starting at 1.
Source§impl EventFrame
impl EventFrame
Sourcepub fn resize(
&self,
width: usize,
height: usize,
pooling: PoolingMethod,
) -> Result<Self, ResizeError>
pub fn resize( &self, width: usize, height: usize, pooling: PoolingMethod, ) -> Result<Self, ResizeError>
Returns a resized frame, pooling shrinking axes and interpolating growing axes.
Source§impl EventFrame
impl EventFrame
Sourcepub fn intensity(
data: EventFrameData,
width: usize,
height: usize,
) -> Result<Self, RepresentationError>
pub fn intensity( data: EventFrameData, width: usize, height: usize, ) -> Result<Self, RepresentationError>
Builds a single-channel greyscale frame from raw samples, row-major.
The public counterpart to EventFrame::from_parts, which is crate-private and validates
nothing — so this is the only way anything outside the core (the bindings, the video decoder)
can construct a frame, and it checks the length rather than trusting the caller. Everything
downstream indexes c * width * height + y * width + x and would read out of bounds on a
mismatch.
pub fn data(&self) -> &EventFrameData
Sourcepub fn into_data(self) -> EventFrameData
pub fn into_data(self) -> EventFrameData
Takes the frame’s samples, for a caller that owns the frame and wants the buffer rather than a copy of it — handing a just-generated frame straight to numpy, say.
pub fn shape(&self) -> (usize, usize, usize)
pub fn channel_names(&self) -> &[String]
pub fn kind(&self) -> RepresentationKind
Trait Implementations§
Source§impl Clone for EventFrame
impl Clone for EventFrame
Source§fn clone(&self) -> EventFrame
fn clone(&self) -> EventFrame
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreAuto Trait Implementations§
impl Freeze for EventFrame
impl RefUnwindSafe for EventFrame
impl Send for EventFrame
impl Sync for EventFrame
impl Unpin for EventFrame
impl UnsafeUnpin for EventFrame
impl UnwindSafe for EventFrame
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> 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