Skip to content

imagesSimilarity

ts
imagesSimilarity(pictures: readonly DiffPixels[], options?: DiffImagesOptions): DiffImagesSimilarity
dart
DiffImagesSimilarity imagesSimilarity(List<DiffPixels> pictures, [DiffImagesOptions? options]);
FieldWhat it says
similarityHow alike they all are, from 0 to 1. Times a hundred is the percentage.
identicalWhether not one pixel of any of them came out different.
pixelsHow many pixels at least one of them covers.
matchedHow many of those every one of them agrees about.
changedThe rest.
baselineWhich picture the rest were counted against.
eachHow alike each picture is to the baseline, in order. The baseline's own is 1.
sizesHow large each picture was, in order.

The shorter question imageSimilarity asks about a pair, asked about a list. One picture disagreeing in a corner costs the set exactly as much as all of them disagreeing there, because what similarity asks is whether they agree — each is what says which of them did not, where the one number only says that one of them exists.

diffImages runs underneath, so every option means what it means there.

Released under the MIT License