[sane-devel] Re: gamma correction procedure

Frank Peters frank.peters@comcast.net
Thu, 26 Feb 2004 13:00:48 -0500


On Thu, 26 Feb 2004 17:39:33 +0100
Stefan Schl=F6rholz <stefan@schloerholz.de> wrote:

>=20
> sorry I forgot to mention that I collected some information about ICM on=
=20
> the net allready. I am aware of the fact that the difference in Linux=20
> scans and Windows scan is due to the fact that the Scanner manufacturer=20
> provided a frontend to scan a reference slide, which also was packaged=20
> with the scanner, and that the so obtained profile is automatically is=20
> applied to the scan.
> =20
> Do you think the slide provided by the scanner manufacturer will do=20
> also?
>=20

Every calibration target or slide must have with it a reference file
that contains accurate color data obtained when the target or slide was
created.  This reference information is compared to the data obtained
from a scanned image to produce the scanner profile.

If you also have the reference file, a text file in IT8 format, than you
can certainly use the target slide that is supplied by the manufacturer.


>
> Scanner Space ------------------------> Printing Space
> >                   scanner profile
> >                   printer profile
>=20
> But if I understand correctly this printer profile is different to the=20
> printer profile needed to convert from monitor to printer, right?
>=20

No.  A printer profile is specific to a certain printer (and the paper
type on this printer) and can be used in all conversions to the printer
space from any other color space.  In other words, only a single printer
profile is needed to convert from scanner to printer or from monitor
to printer.

In more technical terms, all color space transformations involve an
intermediate universal color space:


Scanner space ----------------------------> Universal Color Space
                  scanner profile


Universal Color Space ----------------------------> Printer Space
                            printer profile


The key point is that because there are _different_ universal color spaces
(e.g. CIE XYZ, CIE LAB, etc.), it is only necessary that the two profiles
involved in any color transformation be related to the _same_ universal
color space.  As long as this is true, then the same printer profile
can be used for any kind of conversion.


>=20
> This is a GUI to generate an ICM profile only? The conversion needs to=20
> be done manually, e.g. using ImageMagick (IIRC) by passing the scan and=20
> the profile to e.g. convert?
>

The Little CMS Profiler will generate an ICM profile.  It also includes
a command-line program called tifficc to apply (or embed) the profile
to (into) any image.

I don't use ImageMagick so I can't comment, but the man page indicates
that a profile can be embeded into an image using convert -profile.

>=20
> Is there a chance to automatically have the ICM profile applied when=20
> scanning automatically using xsane?
>=20

I don't use xsane, so I can't comment on this.  But with bash scripting it
would certainly be possible to automate the process using scanimage.

scanimage is able to write to SDTOUT and can therefore be piped to other
programs from, for example, the NETPBM suite.

But I've never checked into the automation issue so I can't comment much.
Others on this list could probably address this more.

This page refers to some kind of automation: http://www.xach.com/photos/

Anyway, just to give some idea what the results can be, have a look at
http://www.kirchgessner.net/scarse.html.  The page is old but the examples
are still relevant.

Frank Peters