LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - General (https://www.linuxquestions.org/questions/linux-general-1/)
-   -   Gamma adjustment: during scanning or as postprocessing? (https://www.linuxquestions.org/questions/linux-general-1/gamma-adjustment-during-scanning-or-as-postprocessing-4175504755/)

jlinkels 05-12-2014 03:59 PM

Gamma adjustment: during scanning or as postprocessing?
 
When a document is scanned without any adjustments (brightness and contrast at default level, no gamma adjustments) white paper usually turns into light grey.

For electronic document management this is often undesired. Paper should be true white, text true black. Although the black level is not that critical. 85% black looks like black anyway.

Now the questions is where to perform the adjustments so paper becomes white. Note the I don't want to convert the image to monochrome or grayscale. Logos and signatures should remain colored and recognizable.

One option is to set the brightness, contrast and gamma in the scanner. The advantage is that no information is lost while the image is being adjusted. Inside the scanner, the values have the full resolution of the scanner's image system. What is it, 12 bit or so?

The second option is to scan all linear, and to perform these adjustments in post-processing. Disadvantage is that information might have been lost in the scanner while reducing the image to 8-bit RGB colors. Advantage is that photographs and logos can be masked and excluded from the gamma and contrast adjustments.

What should be the preferred method?

jlinkels

metaschima 05-12-2014 04:21 PM

I recommend doing gamma adjustment during scanning AND post-processing images as needed.

For just text, adjustment during scanning should be all that is needed. For images, post-processing may be needed.

Using xsane, I usually do a preview scan that automatically adjusts many of the values, plus I can correct them if needed before scanning in high resolution.

jlinkels 05-13-2014 03:21 PM

XSane's gamma correction is amazing.

However I use command line scanning 95% of the time. Slap a sheet under the scanner cover, start a shell script and end up with the PDF. Speed is important.

The script currently includes a gamma table which is sent to the scanner. For B/W copies it is near to perfect.

For some originals like faded thermal paper and photgraphs I can set the --nogamma option.

Another disadvantage of sending the gamma table is that many scanners need completely different gamma tables. Not just a different curve, but also different values (like 0..255 or 0..4095) or 3 RGB tables instead of one.

But I am wondering whether I am throwing away a lot of information when I don't set a gamma correction in the scanner, and the scanner converts the internal bit depth to 8 bit output.

jlinkels

metaschima 05-13-2014 03:43 PM

Yes, the scanner does throw away some data if you don't set the gamma properly. I guess in your situation you should have custom gamma tables saved and passed in for different scan types.

Quality is more important for me, so I always use the GUI frontend and tweak the settings to get a good scan. Then I can enhance it further myself if needed.


All times are GMT -5. The time now is 11:19 PM.