Search code examples
pythonmachine-learningsignal-processingssim

Is there a built-in Python function for calculating SSIM for 1d signals?


is there a function that calculates SSIM (structural similarity index measure) for 1d signals, that is 1d arrays?

I tried to look into documentations but I can only find SSIM implementation for images, like in skimage metrics.


Solution

  • The scikit implementation works on vectors, if you provide a 1d vector it should also work, I don't think there is any difference. An image is after all a multi dimensional signal

    Edit: based on skiamges documentation of structural_similarity it can take in any dimensionality as input