LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 05-12-2014, 03:59 PM   #1
jlinkels
LQ Guru
 
Registered: Oct 2003
Location: Bonaire, Leeuwarden
Distribution: Debian /Jessie/Stretch/Sid, Linux Mint DE
Posts: 5,195

Rep: Reputation: 1043Reputation: 1043Reputation: 1043Reputation: 1043Reputation: 1043Reputation: 1043Reputation: 1043Reputation: 1043
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
 
Old 05-12-2014, 04:21 PM   #2
metaschima
Senior Member
 
Registered: Dec 2013
Distribution: Slackware
Posts: 1,982

Rep: Reputation: 492Reputation: 492Reputation: 492Reputation: 492Reputation: 492
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.
 
Old 05-13-2014, 03:21 PM   #3
jlinkels
LQ Guru
 
Registered: Oct 2003
Location: Bonaire, Leeuwarden
Distribution: Debian /Jessie/Stretch/Sid, Linux Mint DE
Posts: 5,195

Original Poster
Rep: Reputation: 1043Reputation: 1043Reputation: 1043Reputation: 1043Reputation: 1043Reputation: 1043Reputation: 1043Reputation: 1043
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
 
Old 05-13-2014, 03:43 PM   #4
metaschima
Senior Member
 
Registered: Dec 2013
Distribution: Slackware
Posts: 1,982

Rep: Reputation: 492Reputation: 492Reputation: 492Reputation: 492Reputation: 492
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.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
gui gamma adjustment mipia Debian 1 01-01-2014 06:26 PM
Sound applications for postprocessing recordings MasterOfTheWind Linux - Software 2 03-06-2008 10:10 AM
Active Scanning or Passive Scanning Paris Heng Linux - Networking 2 02-15-2008 09:37 AM
Xine - Gamma / Brightness - Adjustment keithdw Linux - Software 1 03-25-2007 05:05 AM
Postprocessing in xine cld Linux - Software 0 09-19-2004 05:08 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 03:46 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration