Struct dssim::Dssim [] [src]

pub struct Dssim { /* fields omitted */ }

Configuration for the comparison

Methods

impl Dssim
[src]

[src]

Create new context for comparisons

[src]

Set how many scales will be used, and weights of each scale

[src]

Set how many scales will be kept for saving

[src]

The input image is defined using the imgref crate, and the pixel type can be:

  • ImgVec<RGBAPLU> — RGBA premultiplied alpha, float scaled to 0..1
  • ImgVec<RGBLU> — RGBA float scaled to 0..1
  • ImgVec<f32> — linear light grayscale, float scaled to 0..1

And there's ToRGBAPLU (.to_rgbaplu()) helper to convert the input pixels from [RGBA<u8>], [RGBA<u16>], [RGB<u8>], or RGB<u16>. See main.rs for example how it's done.

You can implement ToLABBitmap and Downsample traits on your own image type.

[src]

Compare original with another image. See create_image

The SsimMaps are returned only if you've enabled them first.

Val is a fancy wrapper for f64