I am transforming an image to a frequency spectrum, convolving it with a kernel, then inverse-transforming it back.
I wanted to ask how I can handle the rounding erro开发者_如何学JAVArs which occur during the transformation. Like when I transform an image, then immediately transform it back I have an average PSNR of 127. (I transform the pixels in float format between 0.0 and 1.0.)
Is it possible to calculate the errors and correct them?
Short answer: If you want less rounding error, then you need a more accurate number format. Also, you cannot calculate the error.
More accurate floating-point formats include:
- x87 80-bit extended precision (long double)
- Fixed point with BigInteger
- BigDecimal
Also, isn't a PSNR of 127 dB very good already?
精彩评论