Luam theej duab cov duab thaij duab nrog tsab ntawv los ntawm kab kab hais kom ua

Tiag tiag mas muaj ob peb graphical interfaces rau scanning cov duab, uas muab cov kev xaiv ntau heev. Tab sis thaum tus naj npawb ntawm cov duab los thaij yog loj thiab peb tsis muaj lub tshuab luam ntawv uas muaj cov tshuab ntxig tsis siv neeg, txhua yam tau nyuaj. Feem ntau koj yuav tsum ua ib nias mus luam theej duab, lwm nias kab tias nyob rau lwm qhov kawg ntawm lub qhov rais kom txuag tau ... nws yuav siv sijhawm. Xijpeem, kev zam zoo rau siv lub Kab hais kom ua.

Qhov no yog qhov nyiaj los ntawm Rubén, yog li dhau los ua ib qho kev yeej ntawm peb qhov kev sib tw txhua lub lim tiam: «Qhia yam koj paub txog Linux«. Zoo siab nrog Rubén!

Kuv nyeem cov lus ntawm Batch Duab Ua Haujlwm nrog GIMP y Yuav ua li cas tswj cov duab los ntawm lub davhlau ya nyob twg, tsuas yog hnub uas kuv tus phooj ywg Huguito tau nug kuv txog cov duab (uas nws tau ploj lawm) ntawm kev taug kev uas peb tau ua xyoo 1989… (4 yob ntawm 36 cov duab! thiab nyob rau ntawm daim ntawv, tau kawg 🙂. Nws tau ua rau kuv nco txog lub tswv yim no txhawm rau luam duab uas kuv tau hnov ​​qab.

Lub tswv yim yog siv tsab ntawv los ua kom sai li sai tau:

1.- Tso tus yees duab rau lub scanner
2.- Nias tus yuam sij rau luam theej duab
3.- Rov ua qhov txheej txheem, tshwj tsis yog tus yuam sij nias yog piv txwv 'n' tawm
4.- Cov duab yuav raug cawm dim thiab sau rau hauv ib daim qauv tsim ua ntej.

Qhov lus sam hwm twg?

Qhov kev hais kom 'khawv koob' yog scanimage uas yog ib feem ntawm SANE. SANE yog qib API uas muab cov txheej txheem nkag rau txhua cov cuab yeej ua luam tawm. Sane API tau nyob hauv tsoomfwv thiab nws cov cai tau los ntawm GNU General Public License.

Txhim kho yog yooj yim. Txhua qhov chaw ntim khoom nqa nws pob khoom. Rau Ubuntu (lossis nws cov lus qhia), nws txaus los siv synaptic thiab teeb tsa cov roj ntsha thiab cov roj ntsha.

Yuav siv li cas?

Yuav ua li cas ib txwm zoo tshaj plaws yog los sau hauv lub davhlau ya nyob twg 'tus txiv neej scanimage'. Txawm li cas los xij, peb yuav xaus cov lus xaiv uas peb yuav siv.

Peb qhib lub davhlau ya nyob twg thiab khiav scanimage -L kom pom cov khoom muaj:

scanimage -L ua

Hauv kuv tsev neeg nws rov:

ntaus ntawv `xerox_mfp: libusb: 001: 005 'yog SAMSUNG ORION muaj ntau yam ua haujlwm hauv nruab nrab

Qhov no yog qhov tshwm sim nws tau muab rau kuv nrog kuv Samsung SCX-4200 multifunction. Yog tias koj muaj tagnrho-hauv-ib qho thiab koj tsis tuaj yeem nrhiav lub cuab yeej, nco ntsoov tias lub tshuab luam ntawv tsis ua haujlwm, piv txwv li nrog cov ntawv luam tawm tsis ntev.

Tus nqi 'xerox_mfp: libusb: 001: 003' yog siv los qhia txog scanimage hais kom ua qhov cuab yeej twg los siv dhau ntawm -d xaiv. Yog hais tias tsuas muaj ib lub scanner txuas nrog, qhov kev xaiv no tsis tsim nyog.

Thaum lub scanimage hais kom ua scans, nws xa cov duab xa tawm los ua rau cov zis hauv pnm lossis tiff format. Yog li txhawm rau luam theej duab peb hloov cov zis rau ib daim ntawv. Thiab yog tias peb xav pom dab tsi cov lus txib xa tuaj, peb ntxiv cov -v kev xaiv. Yog tias peb tseem xav pom feem pua ​​ntawm kev nce qib ntawm kev ua haujlwm peb ntxiv -p xaiv.

scanimage -v -p> image.tiff

scanimage: scanning duab ntawm qhov loj me 1284x1734 pixels ntawm 24 bits / pixel
scanimage: kis tau RGB thav duab
scanimage: min / max graylevel tus nqi = 69/255
scanimage: nyeem 6679368 bytes nyob rau hauv tag nrho
Kev nce qib: 13.8%

Dab tsi yuav nws muab rau peb yog tias peb thaij lub –help? Nws zoo nkaus li pom tseeb, nws muab kev pab ntawm cov lus txib. Tab sis cov lus txib no muaj lub siab tsis tseeb. Qhov kawg ntawm cov kev pabcuam tsis tu ncua rau qhov hais kom ua ntxiv cov tshwj xeeb uas koj lub scanner txais.

scanimage - pab

Pab: scanimage [XAIV] ...

BLA bla ....

Cov kev xaiv ua tshwj xeeb rau ntaus `xerox_mfp: libusb: 001: 005 ':

txuj:
--kev daws teeb meem 75 | 100 | 150 | 200 | 300 | 600dpi [150] Teeb daws teeb meem ntawm cov duab scanned.
--mode Lineart | Halftone | Grey | Xim [Xim] Xaiv hom luam theej duab (piv txwv, kab ntawv, monochrome, lossis xim).
- siab 30% (hauv cov kauj ruam 70) [tsis nquag] Xaiv qhov tsawg kawg-ci kom tau txais cov taw tes dawb
--source Flatbed | ADF | Auto [Flatbed] Xaiv qhov luam theej duab (xws li ntawv-muab mov).
Ntsuas:
-l 0..215.9mm (hauv qib 1) [0] Sab saum toj x sab laug ntawm txoj haujlwm ntawm thaj chaw luam theej duab.
-t 0..297.18mm (hauv qib 1) [0] Sab saum toj thiab txoj haujlwm ntawm thaj chaw luam theej duab.
-x 0..215.9mm (hauv qib 1) [215.9] Dav ntawm luam theej-thaj chaw.
-y 0..297.18mm (hauv qib 1) [297.18] Kom siab txog thaj chaw luam theej duab.

Ntaus `` scanimage - pab- -d NTAUS '' kom tau txais cov npe ntawm txhua qhov kev xaiv rau DEVICE.

Sau cov muaj pab kiag li lawm:

xerox_mfp: libusb: 001: 005

Txij ntawm no peb tuaj yeem xaiv cov kev xaiv nrog cov nqi uas peb tuaj yeem siv.

Piv Txwv:

Daws teeb meem

–Resolution 150

Modo

Mode Xim

Tam sim no ntawm geometry. Qhov no yog qhov muaj txiaj ntsig heev vim tias peb tuaj yeem hais qhia lub scanner kom tsuas yog rho tawm cov duab ntawm qhov chaw (qhov uas peb yuav muab cov duab), thiab peb txuag lub sijhawm ntawm kev thaij duab tas ntawm cov nplaim uas peb yuav tsum tau txiav tom qab nrog tus kws kho duab piav qhia raws li Gimp.

-l 0 pib ua haujlwm ntsuas kab rov tav txij li 0 hli los ntawm sab laug sab laug ntawm lub scanner

-t 0 pib ua ntsuas qov ntsug ntawm 0 hli ntawm sab laug ntawm ces kaum ntawm lub scanner

Nco ntsoov tias kuv tau xaiv los tso duab rau hauv kaum ntawm lub cav thaij duab sib piv [0,0)], vim tias nws yooj yim rau qhov chaw. Ntawm kuv lub scanner (A4 loj) l tuaj yeem mus los ntawm 0 txog 215.9 thiab t ntawm 0 txog 297.18.

Dav thiab Qhov siab ntawm daim duab. Hauv kuv tsev neeg cov duab yog 13x18cm:

-x 180 dav

-thiab 130 siab

Yog li ntawd nws yuav tsuas yog luam theej duab feem uas peb tso peb daim duab. Yog lawm, yog tias peb pom zoo rau dab tsi sab laug, txoj cai, qhov dav, qhov siab, sab saum toj thiab hauv qab. Nws yuav yog nyob ntawm seb koj saib koj lub scanner li cas. Kuv tawm tswv yim kuaj cov kev koom tes thiab kho kom haum rau koj cov kev xav tau.

Ib qho piv txwv ntawm cov lus txib tuaj yeem yog:

scanimage -d xerox_mfp: libusb: 001: 003 -p --mode Xim - daws teeb meem 150 -l 0 -t 0-x 180 -y 130> image.pnm

Nrog rau cov kev xaiv no, peb tuaj yeem tsim peb cov ntawv sau.

Tab sis ua ntej…

Tiff lossis pnm yog cov hom ntawv tsis yooj yim, yog li peb cov duab yuav siv sijhawm hauv qhov chaw disk loj. Ntawm no yog qhov twg ImageMagick hloov lo lus txib tuaj nyob rau hauv uas tau piav qhia nyob rau hauv Yuav ua li cas tswj cov duab los ntawm lub davhlau ya nyob twg.

Yog tias peb tau txais ib daim duab.pnm los ntawm lub scanner, peb tuaj yeem hloov nws mus rau jpg:

hloov ua duab.pnm image.jpg

Tab sis ua ntej ua li ntawd, lwm txoj kev ua kom yuam kev:

Image.pnm yuav siv ntau qhov chaw thiab peb yuav tsum rho tawm nws tom qab tau txais peb cov duab.jpg. Muaj kev xaiv rau lub hloov hais kom ua kom tsis txhob noj ib daim ntawv los ntawm disk nws yuav ncaj qha mus hloov cov qauv txheem. Qhov no tau ua tiav nrog kev khiav ceev - hloov ntawm cov ntawv:

hloov ua lwm yam - image.jpg

Txij li thaum scanimage xa ​​cov duab scanned mus rau cov zis ua qauv, peb ua "raj xa dej" thiab txuag lub sijhawm ua haujlwm nws yuav siv los sau thiab tom qab ntawv muab tshem cov duab.pnm ntawv ntawm disk.

scanimage -d xerox_mfp: libusb: 001: 003 -p --mode Xim - daws teeb meem 150 -l 0 -t 0-x 180 -y 130 | hloov ua lwm yam - image.jpg

Tam sim no yog, tsab ntawv ...

Peb sau cov cai hauv qab no hauv ib daim ntawv uas peb yuav hu rau scan-album.sh thiab peb tau tso cai rau kev ua tiav. Thaum peb khiav nws, nws yuav tsim ib lub subdirectory qhov twg peb cov duab scanned yuav. Nco ntsoov hloov kho parameter qhov tseem ceeb rau koj cov kev xav tau.

Nco ntsoov nyeem qee cov lus qhia tom qab ntawv.

#! / rau hauv / bash
# Cov ntaub ntawv rau kev xaiv

VERBOSE = "" # pom cov xwm txheej msg: "" tsis yog; "-v" yog lawm
PROGRESS = "- p" # qhia kev nce qib "" yog tsis yog; "-p" yog lawm

# Cov kev txwv hauv qab no yog muab los ntawm scanimage - pab rau koj lub scanner
#Dab Neeg: Yog tias tsuas muaj ib lub scanner xwb, nws tsis tsim nyog, muab DEV = ""
# DEV = "xerox_mfp: libusb: 001: 003"

DEV = ""
MODE = "- hom Xim"
RESOLUTION = "- daws teeb meem 600dpi"

#geometry, xws li 130x180 hli duab
# tshem tawm nyob rau sab saud vertex scanner

x0 = 0
y0 = 0
dav = 180
siab = 130

#dab neeg:

L = "- l $ x0"
T = "- t $ y0"
WIDTH = "- x $ dav"
SIAB = "- thiab $ siab"

# tag nrho cov kev txwv ua ke:

PARAMETERS = "$ DEV $ VERBOSE $ TAU TXOG $ HOM $ KEV SAWV DAWS $ L $ T $ THAUM $ $ SIAB"

#Tub npe hu ua nkauj. Tsim ib subdirectory nrog koj lub npe:

ALBUM = "Hnub so_1989"

# Rau kev nyab xeeb, Kuv tsis ua ib yam dab tsi yog tias qhov chaw ntawd muaj

mkdir $ ALBUM

yog ["$?" = "1"]; ntawd
tawm ntawm 100
fi

# Puag npe rau cov duab (hauv sub dir)

FILE = "./" $ ALBUM "/" $ ALBUM "_foto_"

ua haujlwm nug () {
pov pob "------------------------------------------------------- - ------------------------- "
Ncha
txawb tawm "******************************"
ncha "Tsis muaj. Cov duab scanned:" "$ Kuv"
txawb tawm "******************************"
ncha -e "Nias: n * n tawm * Tus yuam sij rau luam theej duab."
Ncha
nyeem -s -n1 -p "Luam tawm duab tshiab?" tsuj
Ncha
}

#Hmong movie tub yuav tau txiv tus hlub los ua txiv nyab

#Qhov Pib

#Hmong movie tub yuav tau txiv tus hlub los ua txiv nyab

I = 0

lo lus nug

thaum ["$ keypress"! = "n"]; ua
# yees duab tshiab rau scan
cia "Kuv + = 1"
NAME = $ FILE $ I
scanimage $ PARAMETERS | hloov pauv - $ NAME.jpg
lo lus nug
ua li cas

Tswv yim

Siv cov kev daws teeb meem siab zoo li qhov ntawm hauv qhov ua piv txwv ua rau scan muaj qeeb qeeb.

Nco ntsoov tias yog tias koj xav luam daim duab rau ntawm daim ntawv koj xav tau txog 250 dots ntawm ib nti. Yog tias lub tswv yim ntawm kev tshuaj xyuas cov duab tau luam tawm lawv loj npaum li cov ntawv qub, ib qho kev daws teeb meem ntawm 250 yog txaus. Kom pom lawv ntawm lub ntsuas nrog 100 yog qhov txaus. Ib qho kev daws teeb meem siab dua tuaj yeem pab rau qhov pom tseeb.

Cov ntaiv ntawm cov duab yuav tsum tau npaj kom txhij ua ntej kom txhua daim duab nyob sab xis. Ua li no koj yuav tsis nkim lub sijhawm tso nws hauv lub scanner kom lawv tsis tig 180º.

Thaum kho ntsuas qhov ntsuas ntawm ntsuas ntsuas, nws raug nquahu los soj ntsuam nyob rau hauv txoj haujlwm twg qhov qub yuav tsum muab tso, yog li ntawd cov duab digital tsis yog "upside down". Hauv kuv qhov teeb meem qis dua ntawm daim duab mus raws txoj kab 'l'.

Yog tias koj muaj tib lub scanner txuas nrog xav tsis xav siv -d xaiv. Nyob rau hauv tsab ntawv nws yog DEV = »»

Qee zaum cov lej hauv "xerox_mfp: libusb: 001: 003" hloov pauv thiab koj yuav tau hloov kho nws txhua zaus koj siv ntawv sau.

Saib cov lus zoo rau hyphen thiab cov lus qhia thaum luam tsab ntawv. Tus hyphen (rho tawm kev kos npe) tuaj yeem yog ib lossis ob qho ua ke nyob ntawm txoj kev xaiv; cov cim hais tau yog ob npaug ntawm cov keyboard, lawv tsis yog cov uas qee cov lus siv xws li LibreOffice muab.

Rau kev nyab xeeb, tsab ntawv tsis tsim cov ntawv qhia kev yog tias nws twb muaj lawm, thiaj li tsis mus rho tawm cov ntaub ntawv yog tias muaj ib qho. Ua li ntawd nws nres.

Yog hais tias lub yees duab album qub, tsis txhob khuv xim yog tias cov duab ntxiv hauv cov plaub hau, wrinkles lossis kilos ploj: -


Cov ntsiab lus ntawm tsab xov xwm ua raws li peb cov ntsiab cai ntawm kev tswj hwm kev ncaj nceesCov. Tshaj tawm ib qho yuam kev nyem no.

3 lus, tawm koj li

Tso koj saib

Koj email chaw nyob yuav tsis tsum luam tawm. Yuav tsum tau teb cov cim nrog *

*

*

  1. Lub luag haujlwm rau cov ntaub ntawv: Miguel Ángel Gatón
  2. Lub hom phiaj ntawm cov ntaub ntawv: Tswj SPAM, kev tswj xyuas tawm tswv yim.
  3. Sau raws cai: Koj kev tso cai
  4. Kev sib txuas lus ntawm cov ntaub ntawv: Cov ntaub ntawv yuav tsis raug xa mus rau lwm tus neeg thib peb tsuas yog los ntawm kev txiav txim siab raug cai.
  5. Cov ntaub ntawv khaws cia: Cov Ntaub Ntawv khaws tseg los ntawm Occentus Networks (EU)
  6. Txoj Cai: Txhua lub sijhawm koj tuaj yeem txwv, rov qab thiab tshem tawm koj cov ntaub ntawv.

  1.   Nruab hnub Calderon said

    Vuag! Cas ib tus zoo tuto!
    Kuv tsis xav tias muaj ntau yam tuaj yeem ua nrog bash xD
    Txhua txhua hnub koj kawm ntxiv!
    Ua tsaug rau cov tswv yim!
    Kuv tsis muaj lub Scaner tab sis yog tias kuv tau txais ib qho, Kuv yuav sim tam sim ntawd

  2.   Lub voos xwmfab said

    Qhov kev koom tes zoo li no yuav pab tau kuv ntau hauv kev txiav txim siab ntawm kuv qhov kev sau ntawv, Kuv vam tias nws txhim kho, Kuv xav txog txoj haujlwm ua kom luam theej ua tiav cov ntaub ntawv thiab tshawb pom qhov loj me ntawm cov khoom scanned, raws li peb vam khom duab magick, nws tuaj yeem hloov mus rau djvu lossis pdf thiab yog li tsim ib tus ntawv. Zoo kuv cia li rambled rau. Ua tsaug ntau rau suav daws.

  3.   Aw Ello said

    Zoo li cas thov ua tsaug, ua tsaug ntau rau share.