I'm currently working on comparing a filtered image to its original (unfiltered) image using the SSIM (Structural similarity) index using Java.
My research brought me to a mathematical formula where the average, variance, covariance and the dynamic range of the two BufferedImage
s are needed.
Getting to calculate the average and the variance was not a big problem for me, however I can't figure out a way to get the number of bits per pixel needed to calculate the dynamic range, and the covariance value, is this something I can obtain from the BufferedImage
.
BufferedImage
has a getColorModel()
method, and in the returned ColorModel
object there is a getPixelSize()
method which returns the number of bits per pixel described by that ColorModel
.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With