Skip to content

ImageDiff and Structrual Similarity #13902

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
aeslaughter opened this issue Aug 13, 2019 · 1 comment
Open

ImageDiff and Structrual Similarity #13902

aeslaughter opened this issue Aug 13, 2019 · 1 comment
Labels
C: MOOSE Scripts Good first issue P: normal A defect affecting operation with a low possibility of significant effects. T: task An enhancement to the software.

Comments

@aeslaughter
Copy link
Contributor

aeslaughter commented Aug 13, 2019

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.

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.

@LSWells

@aeslaughter aeslaughter added T: task An enhancement to the software. P: normal A defect affecting operation with a low possibility of significant effects. Good first issue labels Aug 13, 2019
@aeslaughter
Copy link
Contributor Author

aeslaughter commented Aug 13, 2019

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"

https://github.com/scikit-image/scikit-image/blob/7875d332f63e1e69b45d8efc2ade97f7a9d14767/skimage/metrics/_structural_similarity.py

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C: MOOSE Scripts Good first issue P: normal A defect affecting operation with a low possibility of significant effects. T: task An enhancement to the software.
Projects
None yet
Development

No branches or pull requests

2 participants