[sane-devel] uploading color transformation matrix on HP 4c/3c

Michal Maruška mmc@maruska.dyndns.org
10 Feb 2002 11:29:27 +0100


Peter Kirchgessner <peter@kirchgessner.net> writes:

> not true.  If you want to use the --matrix-rgb, you need to rebuild SANE (or
> at least the hp-backend) from source. You need to modify hp.h:
> 
> Change line
> #define ENABLE_10BIT_MATRIXES
> to
> #undef ENABLE_10BIT_MATRIXES
> 
> Change line
> #undef ENABLE_CUSTOM_MATRIX
> to
> #define ENABLE_CUSTOM_MATRIX
> 
> 
> After these changes rebuild SANE (be sure to remove all hp*o from the backend's directory). Now the option --matrix-type has a new
> choice "Custom". You need to use it along with --matrix-rgb:
> 
> scanimage -d hp:/dev/sg0 --mode Grayscale --matrix-type Custom --matrix-rgb
> 1.98,1.98,1.98,0,0,0,0,0,0 > scan.ppm
> 
> This creates a grayscale scan where the data represents the data from the red channel.

[sorry for the *huge* delay; i had to adapt my programs & do some experiments]

i still don't understand the limits of the values, but it _definitely_ is worth
using. I scan all my blue-ink written docs using (1.2 1.2 -1.4)/greyscale which
is (0,1.200000,0,0,1.200000,0,0,-1.400000,0)/color.

i scan using my emacs based frontend (http://maruska.dyndns.org/comp/emacs/scan/).
I have defined several color combinations.... and limit myself to these now.

thanks a lot!