Threshold is only for binary (lineart) images.

allan

On Sat, Apr 14, 2012 at 5:48 AM, Gauthier <gvdmoort at skynet.be> wrote:
> Hello,
>
> I'm using sane-utils 1.0.22-7 on a debian testing, and my scanner is
> an HP scanjet 2300c, that seems correctly detected:
>
> ?$ scanimage -L
> ?device `genesys:libusb:002:002' is a Hewlett Packard ScanJet 2300c flatbed 
> scanner
> ?$ scanimage -h
> ? ?[...]
> ? ?Enhancement:
> ? ? ?--custom-gamma[=(yes|no)] [no]
> ? ? ? ? ?Determines whether a builtin or a custom gamma-table should be used.
> ? ? ?--gamma-table 0..16383,... [inactive]
> ? ? ? ? ?Gamma-correction table. ?In color mode this option equally affects 
> the
> ? ? ? ? ?red, green, and blue channels simultaneously (i.e., it is an 
> intensity
> ? ? ? ? ?gamma table).
> ? ? ?--red-gamma-table 0..16383,... [inactive]
> ? ? ? ? ?Gamma-correction table for the red band.
> ? ? ?--green-gamma-table 0..16383,... [inactive]
> ? ? ? ? ?Gamma-correction table for the green band.
> ? ? ?--blue-gamma-table 0..16383,... [inactive]
> ? ? ? ? ?Gamma-correction table for the blue band.
> ? ?Extras:
> ? ? ?--lamp-off-time 0..60 [15]
> ? ? ? ? ?The lamp will be turned off after the given time (in minutes). A 
> value
> ? ? ? ? ?of 0 means, that the lamp won't be turned off.
> ? ? ?--threshold 0..100% (in steps of 1) [50]
> ? ? ? ? ?Select minimum-brightness to get a white point
> ? ? ?--threshold-curve 0..127 (in steps of 1) [50]
> ? ? ? ? ?Dynamic threshold curve, from light to dark, normally 50-65
> ? ? ?--disable-dynamic-lineart[=(yes|no)] [inactive]
> ? ? ? ? ?Disabel use of a software adaptative algorithm to generate lineart
> ? ? ? ? ?instead of relying on hardware lineart
> ? ? ?--disable-interpolation[=(yes|no)] [no]
> ? ? ? ? ?When using high resolutions where the horizontal resolution is 
> smaller
> ? ? ? ? ?than the vertical resolution this disables horizontal interpolation.
> ? ? ?--color-filter Red|Green|Blue [Green]
> ? ? ? ? ?When using gray or lineart this option selects the used color.
>
> The problem is that the options --threshold and --threshold-curve
> doesn't seem to change anything; I've tried with extreme values, I
> don't see any change in the resulting images, and when the command
> is running, the min/max graylevels doesn't change much:
>
> ?gv at fantasio:~$ scanimage -v ?-x 95 -y 70 ?--format=tiff >image.tiff
> ?scanimage: scanning image of size 1122x826 pixels at 8 bits/pixel
> ?scanimage: acquiring gray frame
> ?scanimage: min/max graylevel value = 24/245
> ?scanimage: read 926772 bytes in total
> ?gv at fantasio:~$ scanimage -v ?-x 95 -y 70 --threshold 10 --format=tiff
> ?>image2.tiff
> ?scanimage: scanning image of size 1122x826 pixels at 8 bits/pixel
> ?scanimage: acquiring gray frame
> ?scanimage: min/max graylevel value = 33/244
> ?scanimage: read 926772 bytes in total
> ?gv at fantasio:~$ scanimage -v ?-x 95 -y 70 --threshold 90 --format=tiff
> ?>image2.tiff
> ?scanimage: scanning image of size 1122x826 pixels at 8 bits/pixel
> ?scanimage: acquiring gray frame
> ?scanimage: min/max graylevel value = 33/245
> ?scanimage: read 926772 bytes in total
> ?gv at fantasio:~$ scanimage -v ?-x 95 -y 70 --threshold-curve 0
> ?--format=tiff >image3.tiff
> ?scanimage: scanning image of size 1122x826 pixels at 8 bits/pixel
> ?scanimage: acquiring gray frame
> ?scanimage: min/max graylevel value = 33/245
> ?scanimage: read 926772 bytes in total
> ?gv at fantasio:~$ scanimage -v ?-x 95 -y 70 --threshold-curve 127
> ?--format=tiff >image3.tiff
> ?scanimage: scanning image of size 1122x826 pixels at 8 bits/pixel
> ?scanimage: acquiring gray frame
> ?scanimage: min/max graylevel value = 33/247
> ?scanimage: read 926772 bytes in total
>
> More annoying, I can't get other than a full black image when I try to
> use custom gamma:
>
> ?gv at fantasio:~$ scanimage -v -v -x 95 -y 70 --custom-gamma=yes
> ?--gamma-table `gamma4scanimage 0.7` --format=tiff >image4.tiff
> ?scanimage: scanning image of size 1122x826 pixels at 8 bits/pixel
> ?scanimage: acquiring gray frame
> ?scanimage: min/max graylevel value = 0/3
> ?scanimage: read 926772 bytes in total
> ?Closing device
> ?Calling sane_exit
> ?scanimage: finished
>
> As you can see, the min/max graylevel values are then minimal :-(
> All other combinations of -gamma-table give the same result.
>
> Any Ideas ?
>
> Thanks in advance,
> --
> Gauthier
>
> --
> sane-devel mailing list: sane-devel at lists.alioth.debian.org
> http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/sane-devel
> Unsubscribe: Send mail with subject "unsubscribe your_password"
> ? ? ? ? ? ? to sane-devel-request at lists.alioth.debian.org



-- 
"The truth is an offense, but not a sin"

Reply via email to