Add function to calculate PSNR
soywiz opened this issue · comments
Carlos Ballesteros Velasco commented
This will be useful for testing or comparing images.
https://en.wikipedia.org/wiki/PSNR
Just copy this: https://github.com/soywiz/kaifu2x/blob/d5b945db26bd003476d284517b1db7f418414648/src/test/kotlin/com/soywiz/kaifu2x/Kaifu2xTest.kt#L61
Carlos Ballesteros Velasco commented
We may also want to add this: https://github.com/soywiz/kaifu2x/blob/d5b945db26bd003476d284517b1db7f418414648/src/main/kotlin/com/soywiz/kaifu2x/util/Bitmap32Ext.kt#L26
- Maybe adding a BitmapF? That acts as a FloatArray2 and implements Bitmap interface? Think about this.