Festina Lente

For quite some time we were suggesting that floating point implementation of demosaicking algorithms allows for higher quality results. Incidentally, some programmers who vigorously argued for years insisting integer processing is quite sufficient are now starting to code their demosaicking in floating point too. Here is a comparison of the results of original AHD demosaicking algorithm implemented using floating point and integer arithmetics.

Sharp target
Blurred target

As you can see demosaicking artifacts are reduced using floating point approach; while resolution is improved.

Integer-processing results are from Bayer Moire article.

It looks like the time spent in postprocessing to get more details and counter-act artifacts might be better spent if demosaicking prepares a cleaner and more detailed image to start with. The processing time difference between integer and floating point implementations of demosaicking most of the times is less than 5 seconds, which is substantially less compared to the time spent on image editing to get close to the same result. Try it, and you will see.

Illiah Borg

Comments

Festina Lente says "Try it, and you will see." How to try?

Iliah, You say "It looks like the time spent in postprocessing to get more details and counter-act artifacts might be better spent if demosaicking prepares a cleaner and more detailed image to start with. The processing time difference between integer and floating point implementations of demosaicking most of the times is less than 5 seconds, which is substantially less compared to the time spent on image editing to get close to the same result. Try it, and you will see. "

How does one go about "trying it" to see? What about this comment:
"For float data output we need to change entire processing pipeline to floating point." from http://www.libraw.org/about?

Elle Stone

A pointless argument

The argument of which produces the better quality is pointless. You can produce the same quality with integers as you can with floating points as long as you use a sufficient amount of bits for your maths. One can use integers to implement floating points and it is a common practise on hardware that has no float point operations.

If you do not know how to use integers efficiently then you will need to use float points, of course. It is what floating points were designed for as these take care of precision issues through a non-fixed, floating representation so that you do not have to.

The argument between integer versus floating points, however, is still about speed. Integer operations are often faster, because they can use less bits and they allow you to trade quality for speed in addition.

I suggest that you use floating points. The speed difference between integers and floating points is often not huge, especially when instruction sets like SSE can be used and most compilers will try to use these automatically. Writing, debugging and maintaining precise integer code on the other hand is more difficult and as a result are integers mostly used when quality is not an issue.

Add new comment