[sane-devel] --gamma-table: totally baffled
Mon, 10 Sep 2001 13:04:37 +0200
On Sun, Sep 09, 2001 at 11:23:17PM +0200, Ferenc wrote:
> This brings me to my problem: dark scans. It would seem a gamma-
> correction of about 2 would solve this. I wish to do this in the
> scanimage commandline options, i.e. the option --gamma-table. This
> seems to be the only option to solve this problem, as brightness only
> pertains to lineart scans. I do color scans.
The mustek backend only provides options that are available in
hardware. So gamma is available for color and gray,
brightness/contrast for lineart.
> You see, this option utterly and completely baffles me. I have no
> idea whatsoever about the numbers I should put there.
That's the gamma table. In this case a table of 256 values of 0-255.
Think of it as an array. The scanner scans a pixel with a brightness
of e.g. 55. Now it looks in the gamma table: gamma. If it's a
linear gamma table (gamma=1), this would result in the value 55, also.
You can calculate a gamma table from the gamma value but you can do
more with gamma tables. Also, there is not only the table for gray but
also for red, green and blue.
> >From the sane-sharp manpage I gather one should enter 255
> values. Do these numbers describe a curve or something? Do
> people seriously enter 255 values after --gamma-table?!
Usually they use frontends that allow to enter gamma in a more
conveniant way. Try e.g. xscanimage and enable "use custom gamma
table". You will see the "curve" and can enter a gamma value. XSane
uses it's gamma slider and the histogram for this.
So you have two options: Use scanimage and calculate the gamma curve
in your CGI or write your own web-frontend without using scanimage.
However, there is another problem: At least with sane 1.0.5 gamma
correction doesn't work for your scanner (at least not for my
12000SP). I will try to find out the source of this bug and release a
new backend at http://www.meier-geinitz.de/sane/ .