[sane-devel] HP Scanjet 5590: Scanning in Grayscale - Mode

Ilia Sotnikov hostcc at gmail.com
Thu Apr 2 07:53:39 UTC 2009


On Thu, Apr 2, 2009 at 2:03 AM, Stefan Kempf <steke at gmx.net> wrote:
> the feeling of a grayscale-Image scanned by sane is like lineart. When I do
> the same scan with HP-Scan-Util in XP, then it is a good Grayscale-image with
> many details.
>
> I've two examples of the same scan plus the differences in the histogram.
> In the histogram, the differences are evident.
>
> At the moment, the grayscale-images made by sane are not in good condition.

That could be because the scanner receives two tables (maps), I've
called them calibration ones. And in the SANE backend I've used just a
simple calculations.

Both tables have 64K in length (65536 bytes), and calculated as:
- 1st (which I've called forward calibration map) - each word (2
bytes) incremented by 1
- 2nd (which I've called reverse calibration map) - consists of 4
portions of equal size (16K in length)
  * for the 1st, 2nd and 3rd portions each word (2bytes) is decremented by 1
  * for the 4th each word has 0xffff value.

These calculations gave near the same tables as original Windows drivers sent.
Looks like the maps are for each color channel and depend on scanning
parameters (brightness, thresholds etc)

> Perhaps, there are some hidden settings to avoid a manipulation of the
> raw-data of the scanned image?

Make calibration maps more intelligent is in my long TODO list.
Another way is to receive the maps directly from a frontend thus
offloading the calculations.

-- 
 Ilia Sotnikov



More information about the sane-devel mailing list