Compared to Ubuntu 12.04 and the default settings for Canon LiDE 210 flatbed scanner changed in Ubuntu 16.04.
The default result of a Lineart scan was unacceptable (unreadable).
It turned out, that --resolution was 75, and --disable-dynamic-lineart was no.
Setting options '--disable-dynamic-lineart=yes --resolution 300' for '--mode Lineart' solved the problem.
This is a tutorial for HP-Compaq TC4400 Users on Ubuntu. Note, that I'm a total beginner with Linux, so this page will contain everything I did with my Notebook called Alice :-)
A következő címkéjű bejegyzések mutatása: scanner. Összes bejegyzés megjelenítése
A következő címkéjű bejegyzések mutatása: scanner. Összes bejegyzés megjelenítése
2017. június 22.
2012. december 31.
Scanning script for SCANIMAGE
As I wrote before, the program called scanimage cannot scan to numbered files repeatedly.
Well, not anymore.
I wrote a little script to automate the scanning.
I did this because I dislike gscan2pdf scanning to temp. I find it too risky not having the file in a safe place after scanning.
Well, not anymore.
I wrote a little script to automate the scanning.
I did this because I dislike gscan2pdf scanning to temp. I find it too risky not having the file in a safe place after scanning.
#!/bin/bash
#Ubuntu 10.04 Lucid Lynx
#Automatization of "scanimage" to create sequentially numbered output.
#START
echo "WELCOME TO AUTOMATED SCANIMAGE"
echo ""
echo "Please give me the size of scan area in mm"
echo -n "width: "; read x
echo -n "height: "; read y
#make it failsafe:
if [[ $x>213.8 || $x = "" ]]; then x="213.8"; fi
if [[ $y>300 || $y = "" ]]; then y="300"; fi
echo "Scan area will be: $x x $y mm"
echo ""
echo "Please choose scan mode: L for Lineart, G for Gray. Press enter for Color."; read mode
#make it failsafe:
if [[ $mode == [Ll] ]]; then mode="Lineart" && ext="pbm"
elif [[ $mode == [Gg] ]]; then mode="Gray" && ext="pnm"
else mode="Color" && ext="pnm"
fi
echo "Scan mode will be $mode"
#print "to start printing press enter to quit press escape"
#scan and save
#go back to enter or escape
date=1
while true; do
echo -n "Press 'enter' to scan; anything else to quit' "; read scan;
if [[ $scan = "" ]]; then
let "date =`date +%Y%m%d%H%M%S`"
echo "Scanning will progress with the following parameters:"
echo "size: $x x $y, mode $mode, filename: $date.$ext"
scanimage -x $x -y $y --mode $mode > $date.$ext
else break
fi
done
echo "Finished scanning. Thank you for using this script :-*"
Scanner Color Correction
The combination of Canon LiDE210 and SANE provides me a usable scanner on Ubuntu.
However when scanning in color, colors are NOT accurate.
Color calibration is however not so simple as I thought.
The scanner needs to have an ICM/ICC profile.
Here are some sites regarding color correction:
http://www.jingai.com/scanningguide/profiling%20slides.html
http://www.ddisoftware.com/qimage/icc.htm
A tool called Argyll can be downloaded through Synaptic.
http://www.argyllcms.com/doc/ArgyllDoc.html
http://www.argyllcms.com/doc/Scenarios.html#PS1
To calibrate a scanner you will need something to scan that is accurate in color, i.e.:
http://www.targets.coloraid.de/
http://www.silverfast.com/show/it8-targets/en.html
(which I do not have, so this is it for now. Until then I will simply use a post-processing color correction method.)
However when scanning in color, colors are NOT accurate.
Color calibration is however not so simple as I thought.
The scanner needs to have an ICM/ICC profile.
Here are some sites regarding color correction:
http://www.jingai.com/scanningguide/profiling%20slides.html
http://www.ddisoftware.com/qimage/icc.htm
A tool called Argyll can be downloaded through Synaptic.
http://www.argyllcms.com/doc/ArgyllDoc.html
http://www.argyllcms.com/doc/Scenarios.html#PS1
To calibrate a scanner you will need something to scan that is accurate in color, i.e.:
http://www.targets.coloraid.de/
http://www.silverfast.com/show/it8-targets/en.html
(which I do not have, so this is it for now. Until then I will simply use a post-processing color correction method.)
2012. december 29.
Small size Color PDF
After years of struggling with color PDF-s, I realized today that color PS exists, which lead to a fast solution on the given problem.
Here's how it goes:
Here's how it goes:
- GSCAN2PDF
scan image on 8-bit depth and 300 dpi resolution.
save in PNM file format.
this results in an approx. 20MB size file. - CONVERT
resize to 50%
convert bigimg.pnm -resize 50% smallimg.pnm
file size abt. 5MB - PNMTOPS
convert to ps
pnmtops -equalpixels smallimg.pnm > smallimg.ps
file size abt. 10MB - PS2PDF
convert to pdf
ps2pdf12 smallimg.ps smallimg.pdf
*/Sadly, I could not manage to have the pdf cropped to the proper size with ps2pdf, so I have to do it manually in the next step. However if You know the solution to this problem do not hold back on sharing it with me!/*
file size abt. 200KB - PDFCROP
crop pdf of unnecessary margin
pdfcrop smallimg.pdf
(resulting in smallimg-crop.pdf)
final file size abt. 200KB
This is how you do a good quality color pdf from good quality large images.
...And a couple months later (19 May 2013) I realized that my method of producing black-and-white pdfs, which I use since years, is just as good to produce color pdfs as the above or even better because with the old method I do not have to use pdfcrop, ad the pdf page size of the color cover will be compatible with the b&w pages...
...And a couple months later (19 May 2013) I realized that my method of producing black-and-white pdfs, which I use since years, is just as good to produce color pdfs as the above or even better because with the old method I do not have to use pdfcrop, ad the pdf page size of the color cover will be compatible with the b&w pages...
2012. június 28.
Scanned Image Color Correction
Seems like using
-contrast-stretch 1x10% in ImageMagick's convert is useful after scanning color image bit depth 8 density 300 with gscan2pdf and Canon LiDE 210.
2012. április 3.
Testing gscan2pdf output formats
Lineart 300dpi 260x200mm scans
123 pages
PDF
Downsample to: no downsampling
Compression: Automatic
FileSize: 29.1MB
Compression: LZV
FileSize: 29.1MB
Compression: ZIP
FileSize: 29.1MB
Compression: PackBits
FileSize: 47.4MB
G3 and G4 encoding didn't work for me.
Compression: PNG
FileSize: 30.4MB
Compression: JPEG 75% compressed
FileSize: 221.7MB
Compared to my method of converting pnm through ps to pdf:
FileSize: 22.4MB (This is the smallest pdf on 300dpi)
DJVU
FileSize: 13MB
Compared to my method of converting pnm to djvu:
FileSize: 13MB (Equal size)
gscan2pdf Session
FileSize: 591.1MB
PNM
Sum FileSize: 114.6MB
GIF
Sum Filesize: 33.5MB
PS
not working.
TIFF
Can change compression method (LZW, ZIP, JPEG, PackBits, G3, G4, none)
not tested
JPEG
Can change compression quality
not tested
123 pages
Downsample to: no downsampling
Compression: Automatic
FileSize: 29.1MB
Compression: LZV
FileSize: 29.1MB
Compression: ZIP
FileSize: 29.1MB
Compression: PackBits
FileSize: 47.4MB
G3 and G4 encoding didn't work for me.
Compression: PNG
FileSize: 30.4MB
Compression: JPEG 75% compressed
FileSize: 221.7MB
Compared to my method of converting pnm through ps to pdf:
FileSize: 22.4MB (This is the smallest pdf on 300dpi)
DJVU
FileSize: 13MB
Compared to my method of converting pnm to djvu:
FileSize: 13MB (Equal size)
gscan2pdf Session
FileSize: 591.1MB
PNM
Sum FileSize: 114.6MB
GIF
Sum Filesize: 33.5MB
PS
not working.
TIFF
Can change compression method (LZW, ZIP, JPEG, PackBits, G3, G4, none)
not tested
JPEG
Can change compression quality
not tested
2012. április 2.
Using the Canon LiDE 210 on Ubuntu
Now, that I got "Alice" (laptop) to recognize "Susy" (scanner), I will try out a variety of scanning software to pick the best for my needs.
Here's a list of "frontends" that work with SANE (Scanner Access Now Easy)
(Here's a daemon for mapping scanner buttons, for the case I find the ideal software.)
This is what I do:
a) I digitalize black-and-white documents in large amounts.
b) I digitalize color photographs
This is what I need a scanning program to be:
a) FAST
b) accurate in color
a) FAST scanning of monochrome text documents
Command Line Frontends
scanimage
installation: comes with SANE.
pro:
- easy to use
- easy to define scan area (x and y in millimeters)
con:
- can't be automated to scan repeatedly to numbered documents. -> NOT ANYMORE!
testing:
further testing: I'll have to play with threshold and other parameters to maybe get a better result.
scanadf
installation: scanadf needs the SANE source code to be patched to install it. this means I should patch, configure, make and make install, which, now, I will not do.
Graphical Frontends
Eikazo
installation: through synaptic
pro:
- can configure all what scanimage can
- can save files numbered
- can do postprocessing
con:
- no pnm, only tiff or jpeg
testing:
for some reason Eikazo likes to die on me. I set some parameters, scan, and then I cannot change anything anymore, and cannot scan anything anymore...
openDIAS
This is an archiving software. yes, it can scan using SANE, but it's main purpuse is to crate tagged, searchable a database from all the files you scan.
I don't need such a thing. I don't install.
gscan2pdf
pro:
- configuration is the same as scanimage with the same defaults
- can post-process: rotate, clear, OCR
- can save to a variety of files (pdf, gif, jpg, png, pnm, ps, tif, text, gscan2pdf-session, djvu). pdf and tif are with a variety of options on compression or downsampling.
- it's quick to scan. I just have to press the button everytime I'm finished positioning the next page.
- you can click "scan" button to queue the next scanning to save some seconds.
con:
- I found none so far.
- takes 13 seconds to reposition the head. But this is probably a hardware thing.
Testing #1:
Testing #2
Here's a list of "frontends" that work with SANE (Scanner Access Now Easy)
(Here's a daemon for mapping scanner buttons, for the case I find the ideal software.)
This is what I do:
a) I digitalize black-and-white documents in large amounts.
b) I digitalize color photographs
This is what I need a scanning program to be:
a) FAST
b) accurate in color
The winner of FAST scanning of monochrome documents is:
Reviews follow below.
a) FAST scanning of monochrome text documents
Command Line Frontends
scanimage
installation: comes with SANE.
pro:
- easy to use
- easy to define scan area (x and y in millimeters)
con:
- can't be automated to scan repeatedly to numbered documents. -> NOT ANYMORE!
testing:
scanimage --mode Lineart --resolution 1200 >img1200.pnm
approx 50 seconds. it is so detailed it is basically grayscale. 17.1MB 10096x14173px
scanimage --mode Lineart --resolution 600 >img600.pnm
approx 10 seconds. good quality. a bit noisy. 4.3MB 5048x7086px
scanimage --mode Lineart --resolution 300 >img300.pnm
approx 6 seconds. good quality. same amount of noise as on res600. maybe it's better to scan res600 and resize 50% than to scan res300. 1.1MB 2520x3543px
scanimage --mode Lineart --resolution 150 >img150.pnm
approx 6 seconds. Quality not acceptable. 271.6KB 1250x1771px
further testing: I'll have to play with threshold and other parameters to maybe get a better result.
scanadf
installation: scanadf needs the SANE source code to be patched to install it. this means I should patch, configure, make and make install, which, now, I will not do.
Graphical Frontends
Eikazo
installation: through synaptic
pro:
- can configure all what scanimage can
- can save files numbered
- can do postprocessing
con:
- no pnm, only tiff or jpeg
testing:
Lineart with various resolutions and output file type
for some reason Eikazo likes to die on me. I set some parameters, scan, and then I cannot change anything anymore, and cannot scan anything anymore...
openDIAS
This is an archiving software. yes, it can scan using SANE, but it's main purpuse is to crate tagged, searchable a database from all the files you scan.
I don't need such a thing. I don't install.
gscan2pdf
pro:
- configuration is the same as scanimage with the same defaults
- can post-process: rotate, clear, OCR
- can save to a variety of files (pdf, gif, jpg, png, pnm, ps, tif, text, gscan2pdf-session, djvu). pdf and tif are with a variety of options on compression or downsampling.
- it's quick to scan. I just have to press the button everytime I'm finished positioning the next page.
- you can click "scan" button to queue the next scanning to save some seconds.
con:
- I found none so far.
- takes 13 seconds to reposition the head. But this is probably a hardware thing.
Testing #1:
I easily made the scanner to go post it's scannig size limits. No catastrophe happened, thank god. SANE ReadMe warns, that this type of abuse can damage the scanner hardware.
Okay, I think it was the "Page Options" "All" which is probably for Automated Document Feeder. I don't dare to change # to more than 1. Anyway, it's written in scanadf's manual: "Use of this program with backends that do not support ADFs (e.g. flatbed scanners) will likely result in repeated scans of the same document. In this case, it is essential to use the start-count and end-count to control the number of images acquired."
scanning quality, size and time results are the same as in scanimage.
Testing #2
In the reality, it takes 19 seconds to scan a 200x280mm page. It takes 6 seconds to scan 300dpi, and it takes 13 seconds to reposition. This is awful. I will have to see if there is something to be done to fasten the repositioning.
Canon LiDE 210 flatbed scanner on Ubuntu
So I got this brand new flatbed scanner: Canon LiDE 210.
2.) Install the newest SANE version (1.0.22)
I have read here, that it works with Ubuntu. Actually that was a good reason for picking this scanner. Remember, I still have the Ubuntu 10.04 LTS running on Alice.
This is how I got it work:
Sources: Bottomlesspit and Ubuntu Forums.
1.)
sudo add-apt-repository ppa:plaxx/random-fixes2.) Open System> Administration> Software Sources
...go to "Other Software" tab
Edit "http://ppa.launchpad.net/plaxx/random-fixes/ubuntu lucid main"
Change "lucid" to "maverick"
(leave the source checked!)
3.)
sudo apt-get update4.)
5.) reboot
sudo apt-get install libsane sane-utils5.) reboot
In the process of trying I installed the latest SANE and libusb, I don't know what kind of effect this had on the outcome.
This is what happened before I got "Susy" (this is how I named the LiDE 210) to work:
1.) I unboxed the scanner. Made a video of it, 'cause this little thing is amazing.
2.) Plugged it in the USB...
3.) ...nothing happened.
Oh, no problem, this wasn't Ubuntu if everything worked out of the box.
So let's see, what we can do to get the scanner running:
1.) Check the SANE site for details on how the scanner is supported:
| genesys | 1.0-62 | CanoScan LiDE 210 | USB | 0x04a9/0x190a | complete | GL124 based, resolution from 75 to 2400 dpi | sane-genesys |
3.) Install libusb-dev files through Synaptic
4.) Install the newest libusb version
5.) Plugging in the scanner again...
...still nothing happens.
6.) Restarting the computer...
...still nothing
7.) Trying out on Windows7...
...it works! Yeah! At least the product is functioning for sure.
Okay... let's go another round... how should an usb scanner work on Ubuntu?
1.) Checking Ubuntu Documentation.
2.) Checking Support Forums... Found something worth a try. (Changing the bottomlesspit thing's repository from lucid to maverick, as it is originally for maverick.)
3.) Doing the update end install thing again
4.) Restarting...
...and it works! :-) Finally.
Feliratkozás:
Megjegyzések (Atom)
