[sane-devel] Negative scanning with xsane: letīs create good medium definitions - your help is needed

Oliver Rauch oliver.rauch@rauch-domain.de
Sun, 09 Dec 2001 13:15:12 +0100


Hello.

XSane supports a source medium gamma correction since version 0.79.
There are medium definitions for Agfa, Fuji, Kodak and
Konica negatives included. The definitions are created very simple
and I think we can get much better results when we improve these
definitions.

For this I need some help from people who have the chance to
scans some negatives.

At first let me explain how the medium correction is done:

For each medium there are 13 values that describe how
xsane has to do the correction:
9 values for color mode:
 - 3 values = shadow red, shadow green, shadow blue:        , range = 0...100
 - 3 values = highlight red, highlight green, highlight blue, range = 0...100
 - 3 values = gamma red, gamma green, gamma blue      typical range = 0.1 .. 2.0

3 values for grayscale mode: (this definition is experimental)
 sahdow, highlight, gamma

1 value that defines if the medium is a negative (1) or positive (0)

These values are stored in ~/.sane/xsane/xsane.rc
The shadow, highlight and gamma values are stored as fixpoint
value, you have to multiply the real value with 65536,
so e.g. a highlight value of 30 results in 1966080

The predefined definitions all use a gamma value of 1 (65536) which
means that there is done no non linear correaction.


How can you create a good/improved definition?:

- at first you should set up correct values for contrast and brightness
  of the monitor and the preview gamma value (display options) of xsane.
  Here is a description how you can get at least usable settings
  when you do not have a measurement system to calibrate your display:

  There is a testimage in the preview window when you open the setup dialog
  of xsane: The top left black and the top right white areas contain the
  numbers 1 2 3. The 1 has the lowest contrast to its background. The
  contrast increases for 2 and 3. At frist correct the contrast and
  brightness of your monitor so that you can see at least both "3"s, better
  is when you can see both "2"s or both "1"s. When this is done do not touch
  the contrast and brightness setting of the monitor any more.

  In the left middle area in the preview window there is a gray box, this
  box consists of a mix of back and white points. This way a medium gray is
  produced (this only does work when you do not use higher display resolutions than
  your monitor can display, you need at least one monitor pixel for each
  pixel you want to display). Now open the Display Notebook of the Setup Dialog
  of xsane and change the preview gamma so that the gray box (left) has the same
  intensity like the gray box in the right.
  Set red, green and blue value of preview gamma to 1.0.

  This setting only keeps valid when the environment light in the room does not change!

- set all backend/scanner settings like gamma, contrast, brightness etc
  to default values.
- You should have some slides of the same film type.
- Start with a slide with a high contrast
- start with "Standard Negative" and do a color preview scan:
  - selection area should be the image part of the slide, make
    sure that you do not select any parts that do not contain
    negative material
  - with scanner internal custom gamma table enabled and
  - with maximum bit depth if you can change the bit depth
- set xsane brightness, contrast and gamma values to default
  (may be it is good to disable automatic gamma correction in
   setup/preferences)
- take a look at the histogram window, disable all colors but one
  so you are able to verifiy each value on its own:
  our target is to find a medium definition that produces images
  that use the full color range (minimum and maximum values in
  the histogram are used) but we do not cut any intensity values.
- change the shadow and highlight values for "Standard negative"
  in xsane.rc. When the histogram curve does not reach to the left
  end of the diagram you have to increase the relevant shadow value.
  When the histogram does not reach the right end of the diagramm
  then you have to decrease the relevant hightlight value.
- repeat this with different slides. Only reduce shadow values and
  increase highlight values in this loop (otherwise you cut intensities
  of the slides you already have tested).

This way you find out the shadow and highlight values that create
images with full color range. But this does not mean that the produced
images look correct.

In the next step you should change the gamma values to get an image
with correct colors.
It also is allowed to do *little* changes on the shadow and highlight values
to get correct colors.

This also should be done with different slides (all of the same filmtype!!).

When you think you found good values then please send:
- the values you found out
- the exact name of the film
- the exact name of your scanner (Vendor, Model, Firmware)
  (please send output of "cat /proc/scsi/scsi")
- the exact settings of backend options that may change
  color, brightness, contrast, gamma etc.

I hope we can create a large list of negative types this way.

Thanks for your help.

Bye
Oliver

-- 
Homepage:	http://www.rauch-domain.de
sane-umax:	http://www.rauch-domain.de/sane-umax
xsane:		http://www.xsane.org
E-Mail:		mailto:Oliver.Rauch@rauch-domain.de