pub struct ZensimResult { /* private fields */ }Expand description
Result from a zensim comparison.
Contains the final score, the raw distance used to derive it, and the full per-scale feature vector (useful for diagnostics or weight training).
Implementations§
Source§impl ZensimResult
impl ZensimResult
Sourcepub fn score(&self) -> f64
pub fn score(&self) -> f64
Quality score on a 0–100 scale. 100 = identical, 0 = maximally different.
Derived from raw_distance via a power-law mapping.
Sourcepub fn raw_distance(&self) -> f64
pub fn raw_distance(&self) -> f64
Raw weighted feature distance before nonlinear mapping. Lower = more similar. Not bounded to a fixed range; depends on image content and weights.
Sourcepub fn features(&self) -> &[f64]
pub fn features(&self) -> &[f64]
Per-scale raw features as a slice.
Layout: 4 scales × 3 channels (X, Y, B) × 19 features per channel = 228.
See FeatureView for named access.
Sourcepub fn into_features(self) -> Vec<f64>
pub fn into_features(self) -> Vec<f64>
Consume the result and return the owned feature vector.
Sourcepub fn profile(&self) -> ZensimProfile
pub fn profile(&self) -> ZensimProfile
Which profile produced this score.
Sourcepub fn mean_offset(&self) -> [f64; 3]
pub fn mean_offset(&self) -> [f64; 3]
Per-channel XYB mean offset: mean(src_xyb[c]) - mean(dst_xyb[c]).
Captures global color/luminance shifts (CMS errors, white balance changes).
Channels: [X, Y, B], signed. Positive = distorted is darker/less saturated.
Sourcepub fn dissimilarity(&self) -> f64
pub fn dissimilarity(&self) -> f64
Convert the score to a dissimilarity value.
Dissimilarity is (100 - score) / 100: 0 = identical, higher = worse.
This is the inverse of the 0–100 score scale, normalized to 0–1.
See also score_to_dissimilarity for the standalone conversion.
Sourcepub fn approx_ssim2(&self) -> f64
pub fn approx_ssim2(&self) -> f64
Approximate SSIMULACRA2 score from the raw distance.
Direct power-law fit: 100 - 19.04 × d^0.598, calibrated on 344k
synthetic pairs. MAE: 4.4 SSIM2 points, Pearson r = 0.974.
More accurate than mapping::zensim_to_ssim2(score) (MAE 4.9, r = 0.932)
because it skips the intermediate score mapping.
Sourcepub fn approx_dssim(&self) -> f64
pub fn approx_dssim(&self) -> f64
Approximate DSSIM value from the raw distance.
Direct power-law fit: 0.000922 × d^1.224, calibrated on 344k
synthetic pairs. MAE: 0.00129, Pearson r = 0.952.
Significantly more accurate than mapping::zensim_to_dssim(score)
(MAE 0.00213, r = 0.719) because DSSIM’s natural exponent (1.22)
differs from the score mapping exponent (0.70).
Sourcepub fn approx_butteraugli(&self) -> f64
pub fn approx_butteraugli(&self) -> f64
Approximate butteraugli distance from the raw distance.
Direct power-law fit: 2.365 × d^0.613, calibrated on 344k
synthetic pairs. MAE: 1.65 distance units, Pearson r = 0.713.
Butteraugli’s weak correlation with our features (r = 0.71) limits approximation accuracy regardless of mapping choice.
Trait Implementations§
Source§impl Clone for ZensimResult
impl Clone for ZensimResult
Source§fn clone(&self) -> ZensimResult
fn clone(&self) -> ZensimResult
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreAuto Trait Implementations§
impl Freeze for ZensimResult
impl RefUnwindSafe for ZensimResult
impl Send for ZensimResult
impl Sync for ZensimResult
impl Unpin for ZensimResult
impl UnsafeUnpin for ZensimResult
impl UnwindSafe for ZensimResult
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,
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