[sane-devel] Digital ICE support

Major A andras@users.sourceforge.net
Mon, 1 Dec 2003 13:08:38 +0000

> > This IR data is the raw data which contains quite a lot of red
> > information as well, for most films. You need to extract the pure IR
> > information, and that's probably best done by adding the cubic roots
> > of the four channels with appropriate weighting factors and then raise
> > the result to the power of 3.
> Like in (sorry, I can cope better with formulae than text ;-):
> i' = (A*r^1/3 + B*g^1/3 + C*b^1/3 + D*i^1/3) ^ 3


> where A + B + C + D = 1? Is the order of the roots/power arbitrary or
> just another secret I don't know about color theory?

The sum can be anything. The order is important of course, the number
3 is probably empirical, i.e. determined by experiment. It's the power
used in the IBM patent, and I've found it to be a good choice.

> > I don't think that would be very practical if IR processing is done
> > during scanning. This could be useful while writing and debugging the
> > code, though.
> I disagree. I think that in most cases a fully automatic defect removal
> algorithm is fine for the user, but there will always be borderline
> cases/images where the algorithm will crash against the nearest wall and
> where algorithm-aided manual removal will still be better than unaided
> removal. 

You can either do IR cleaning during scanning, in which case the user
can maybe set a few parameters and then gets a cleaned RGB image. This
approach would be possible with SANE1, provided the backend cleans the
image. Or you can scan the RGBI image, and then the frontend (or an
external application) does the cleaning. In this case, you can of
course give a lot of feedback to the user, but since cleaning is done
after the information has gone through the SANE API, there's no need
to extend the API at all.

I think if a user has the image cleaned during scanning, they accept
that the result can be sub-optimal, and the last thing they want to do
is to scan the same frame over and over again with the same
exposure/focus settings when the only thing that changes is the
post-processing of the data. If the user wants more control, they have
to scan first, then post-process separately.

> From my (small) experience, it's only harder with Kodachrome, the other
> slides I had (mostly Agfa consumer material) had almost perfect IR
> channels with no resemblance to the original picture, only speckles and
> scratches.

That's right. It's possible with Kodachrome, but a lot harder because
the IR channel isn't as well-separated from the rest of the channels.


Major Andras
    e-mail: andras@users.sourceforge.net
    www:    http://andras.webhop.org/