Re: 16 bit per sample support

Nick Lamb (njl98r@ecs.soton.ac.uk)
Mon, 5 Apr 1999 22:00:47 +0100 (BST)

I said:
> There is no data loss (watch this...
> 0xabc (12bit) --> 0xabca (16bit) --> 0xabc (12bit)
> 0x123 (12bit) --> 0x1231 (16bit) --> 0x123 (12bit)

Jonathan replies:
> Because you have mugged the values. X-rays where only an example, but the
> same could be said of other sources such as aerial photography etc.
> With these sorts of things you often want to do calculations on the
> scanned images.

> For example I might have three Xrays of an object, that after some sort
> of registration I wish to stack on top of one another. The Xrays have
> been scanned say at 12 bits, now if you have stretched them though to
> the full dynamic range of 16 bits adding the pixel values together
> will result in loss of information. If they had stayed as 12 bits inside
> a 16 bit value there is no problem.

If you really must have back the 12-bit data you can do the second transform
I showed, and get back the 12-bit data. There is no data loss involved. For
most applications it is appropriate to use the full dynamic range, but you
are right that some software will lose data working on 16-bit images. IMHO
this software is broken (but I would say that because the tools I'm using
don't have this problem)

The feature you describe (an additional toggle setting for stretch vs
truncate) seems excessive even for Advanced options, where it will probably
confuse users in a less technical environment. I don't think we want the
advanced setting to mean "Deep magic for image processing people".

If this level of accuracy (probably beyond human vision) is required for your
application, you should suspect a lot of other components (optical problems
at capture stage, development process, scanner hardware, ADC) before SANE.

Nick.

Check out http://godzilla.ecs.soton.ac.uk:8888/images.html
for Accurate Color, High Resolution images delivered to a perfectly
ordinary web browser (with Javascript and Java)

--
Source code, list archive, and docs: http://www.mostang.com/sane/
To unsubscribe: echo unsubscribe sane-devel | mail majordomo@mostang.com