Difference between revisions of "sane scanner"

From Noah.org
Jump to navigationJump to search
Line 29: Line 29:
  
 
== scan specified geometry ==
 
== scan specified geometry ==
 +
 +
=== Scan Polaroid/Fuji instant photos ===
 +
 +
==== Scan from the back ====
 +
 +
This is the natural home cover of the scanner. The scanner scans faster from this corner since it does not have to move the scanning head as far. The down-side is that it's annoying to have to place the photo in this corner because you have to lift the cover more and reach farther back. This might seem trivial, but it gets to be a pain in the ass when you are trying to scan a few dozen photos as fast as you can.
 +
 +
<pre>
 +
Epson Perfection 1640SU
 +
  back
 +
---------
 +
|++HINGE++|
 +
|      ###|
 +
|      ###| <-- instant film picture
 +
|      ###|        85mm x 108mm
 +
|        |
 +
|        |
 +
|        |
 +
|        |
 +
---------
 +
  front
 +
</pre>
 +
 +
This will scan all of the photo including the white border. This may be desired if notes are written on the borders.
 +
<pre>
 +
scanimage --mode=color --resolution=100 --depth=8 -l 0 -x 85 -t 0 -y 108 | display -
 +
</pre>
 +
 +
This will actually scan only 80mm x 100mm, thus cropping off a bit of the white border.
 +
<pre>
 +
scanimage --mode=color --resolution=100 --depth=8 -l 1 -x 80 -t 3 -y 100 | display -
 +
</pre>
 +
 +
==== Scan from the front ====
  
 
This is a bad position because the scanner usually cannot scan as far to the front as the edge of the glass would make you believe. The problem is that this is often the most convenient spot to put a Polaroid or Fuji instant photo. Fortunately, most of the edge that will be cut-off lies in the white border of the photo. If you nudge the picture just a bit (2 mm) toward the back of the scanner you can be sure none of the photo area inside the border will be cut-off.
 
This is a bad position because the scanner usually cannot scan as far to the front as the edge of the glass would make you believe. The problem is that this is often the most convenient spot to put a Polaroid or Fuji instant photo. Fortunately, most of the edge that will be cut-off lies in the white border of the photo. If you nudge the picture just a bit (2 mm) toward the back of the scanner you can be sure none of the photo area inside the border will be cut-off.

Revision as of 20:53, 30 October 2011


The `scanimage` command-line tool is a bit broken. It does not recognize all of the options that it claims in its help page. For example scanimage --help gives an error about an unrecognized option, and then it prints help where --help is clearly listed as an option. Each scanner has options that are specific to it (or the SANE driver that talks to it). You can liste the device specific options simply by having scanimage display help. The scanner must be turned on and connected.

scanimage -h

a simple scan

This will scan the entire scanning surface. The default output format is Net PBM (pnm extension).

scanimage --mode=color --resolution=300 > foo.pnm

TIFF format:

scanimage --format=tiff --mode=color --resolution=300 --depth=14 > foo.tif

autocrop a scan

Often it is simpler to just scan the entire scanning surface and then crop the resulting image, rather than try to figure out the geometry of the scanning surface and tell the scanner which part to scan.

convert foo.pnm -crop `convert foo.pnm -virtual-pixel edge -blur 0x15 -fuzz 15% -trim -format '%[fx:w]x%[fx:h]+%[fx:page.x]+%[fx:page.y]' info:` +repage foo_crop.pnm

scan specified geometry

Scan Polaroid/Fuji instant photos

Scan from the back

This is the natural home cover of the scanner. The scanner scans faster from this corner since it does not have to move the scanning head as far. The down-side is that it's annoying to have to place the photo in this corner because you have to lift the cover more and reach farther back. This might seem trivial, but it gets to be a pain in the ass when you are trying to scan a few dozen photos as fast as you can.

Epson Perfection 1640SU
   back
 ---------
|++HINGE++|
|      ###|
|      ###| <-- instant film picture
|      ###|         85mm x 108mm
|         |
|         |
|         |
|         |
 ---------
   front

This will scan all of the photo including the white border. This may be desired if notes are written on the borders.

scanimage --mode=color --resolution=100 --depth=8 -l 0 -x 85 -t 0 -y 108 | display -

This will actually scan only 80mm x 100mm, thus cropping off a bit of the white border.

scanimage --mode=color --resolution=100 --depth=8 -l 1 -x 80 -t 3 -y 100 | display -

Scan from the front

This is a bad position because the scanner usually cannot scan as far to the front as the edge of the glass would make you believe. The problem is that this is often the most convenient spot to put a Polaroid or Fuji instant photo. Fortunately, most of the edge that will be cut-off lies in the white border of the photo. If you nudge the picture just a bit (2 mm) toward the back of the scanner you can be sure none of the photo area inside the border will be cut-off.

It is helpful to glue a ruler at the front edge of the scanner.

Epson Perfection 1640SU
   back
 ---------
|++HINGE++|
|         |
|         |
|         |
|         |
|      ###|
|      ###| <-- instant film picture
|      ###|         85mm x 108mm
 ---------
   front
scanimage --mode=gray --resolution=100 --depth=8 -l 0 -x 85 -t 200 -y 97.18 | display -