Routine to quickly compute the SSIM for 2 aligned images having the same dimension, linear regression is applied before computing the SSIM