The ImageDiff test object uses skimage python package to compute the "Structural Similarity" (SSIM). This is a large dependency for a rather simple calculation.
I would like to add a ssim function to mooseutils, so that we can do the following.
import mooseutils
index = mooseutils.ssim('file0.png', 'file1.png')
The files provided should be read with matplotlib.imread and the function should also
support a version that accepts the loaded data rather than the filename.
The ImageDiffer.py:127 can then be replaced with the new function.
The implementation should include some unittesting.
Impact
This should be drop-in replacement for our current function so no API will change, but it will allow us to remove a large python dependency.
Here is the implementation in skimage, which includes a bunch of stuff we don't need, at least at this point. The only option we used is "multichannel=True"
The ImageDiff test object uses skimage python package to compute the "Structural Similarity" (SSIM). This is a large dependency for a rather simple calculation.
https://en.wikipedia.org/wiki/Structural_similarity
Design
I would like to add a ssim function to mooseutils, so that we can do the following.
matplotlib.imread
and the function should also support a version that accepts the loaded data rather than the filename.Impact
This should be drop-in replacement for our current function so no API will change, but it will allow us to remove a large python dependency.
@LSWells