pub struct ChromaStats {
pub mean_abs_dy: f32,
pub mean_dy: f32,
pub mean_abs_di: f32,
pub mean_abs_dq: f32,
pub mean_abs_dc: f32,
pub chroma_cos: f32,
pub sat1: f32,
pub sat2: f32,
pub chroma_rough: f32,
}Expand description
Chroma-plane statistics of the changed pixels, all normalized to 255. Separates recolors (coherent, smooth chroma movement) from content replacements (scattered chroma) on photographic edits where luminance correlation alone saturates.
Fields§
§mean_abs_dy: f32Mean |ΔY| (luminance delta magnitude).
mean_dy: f32Signed mean ΔY — a recolor often pushes luminance consistently in one direction, while a replacement balances out.
mean_abs_di: f32Mean |ΔI|.
mean_abs_dq: f32Mean |ΔQ|.
mean_abs_dc: f32Mean chroma-delta magnitude √(ΔI²+ΔQ²).
chroma_cos: f32Cosine between the chroma vectors of img1 and img2, weighted by their magnitudes. Near 1 = same hues, negative = coherent hue rotation.
sat1: f32Mean chroma magnitude (saturation) in img1.
sat2: f32Mean chroma magnitude in img2.
chroma_rough: f32Roughness of the chroma-delta field: mean |∇|Δc|| between adjacent changed pixels over the std of |Δc|. Low = smooth recolor, high = patchy replacement.
Trait Implementations§
Source§impl Clone for ChromaStats
impl Clone for ChromaStats
Source§fn clone(&self) -> ChromaStats
fn clone(&self) -> ChromaStats
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 ChromaStats
Source§impl Debug for ChromaStats
impl Debug for ChromaStats
Source§impl<'de> Deserialize<'de> for ChromaStats
impl<'de> Deserialize<'de> for ChromaStats
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Source§impl PartialEq for ChromaStats
impl PartialEq for ChromaStats
Source§impl Serialize for ChromaStats
impl Serialize for ChromaStats
impl StructuralPartialEq for ChromaStats
Auto Trait Implementations§
impl Freeze for ChromaStats
impl RefUnwindSafe for ChromaStats
impl Send for ChromaStats
impl Sync for ChromaStats
impl Unpin for ChromaStats
impl UnsafeUnpin for ChromaStats
impl UnwindSafe for ChromaStats
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
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