LinuxCommandLibrary

gamma4scanimage

Calibrate scanner gamma for accurate scan images

SYNOPSIS

gamma4scanimage [options]

PARAMETERS

-v
    Increase verbosity. Can be specified multiple times.

-g
    Set a fixed gamma value. Overrides automatic gamma estimation.

-d
    Set the debug level.

-o
    Write the scanimage parameters to a file instead of stdout.

--help
    Display help message and exit.

--version
    Display version information and exit.

DESCRIPTION

The gamma4scanimage command analyzes the output from scanimage to estimate the scanner's gamma curve.
It reads pixel data from standard input, typically piped from a scanimage command, and calculates an optimal gamma value to improve the color accuracy of the scanned images. The tool primarily aims to automatically measure the gamma of a scanner, without requiring a test chart. It takes raw pixel data from `scanimage`, which outputs grayscale or RGB pixel values to stdout, and calculates an estimate of the scanner's gamma. The calculated gamma value can then be used to correct the scanned images to achieve a more accurate representation of the original document or photograph. This process helps remove color casts and adjust overall brightness and contrast. The results are usually piped to `scanimage` to calibrate the scan process.

USAGE

A typical use case would involve piping the output of scanimage to gamma4scanimage, and then using the resulting gamma correction value with scanimage again.
For example: scanimage --format tiff > image.tiff , then scanimage --format pnm 2>&1 | gamma4scanimage -o gamma_params.txt
Finally, the generated gamma_params.txt file can be used as a parameter for the `scanimage` command, for example:
scanimage $(cat gamma_params.txt) -o calibrated_image.tiff.

SEE ALSO

scanimage(1), scanadf(1)

Copied to clipboard