pub struct Normalization { /* private fields */ }Expand description
Per-channel (x - mean) / std on 0–255 pixel values, in RGB order.
It applies to the colour channels of the destination; an alpha channel
always maps as NormalizationPreset::Unsigned. A Grey destination uses
the first channel’s coefficients.
Implementations§
Source§impl Normalization
impl Normalization
Sourcepub const fn preset(p: NormalizationPreset) -> Self
pub const fn preset(p: NormalizationPreset) -> Self
The coefficients of a named preset.
Sourcepub const fn imagenet() -> Self
pub const fn imagenet() -> Self
ImageNet mean [123.675, 116.28, 103.53], std [58.395, 57.12, 57.375].
Trait Implementations§
Source§impl Clone for Normalization
impl Clone for Normalization
impl Copy for Normalization
Source§impl Debug for Normalization
impl Debug for Normalization
Source§impl Default for Normalization
impl Default for Normalization
Source§impl From<NormalizationPreset> for Normalization
impl From<NormalizationPreset> for Normalization
Source§fn from(p: NormalizationPreset) -> Self
fn from(p: NormalizationPreset) -> Self
Converts to this type from the input type.
Source§impl PartialEq for Normalization
impl PartialEq for Normalization
impl StructuralPartialEq for Normalization
Auto Trait Implementations§
impl Freeze for Normalization
impl RefUnwindSafe for Normalization
impl Send for Normalization
impl Sync for Normalization
impl Unpin for Normalization
impl UnsafeUnpin for Normalization
impl UnwindSafe for Normalization
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