This Project aims to have a RASPI as Saned-Scan-Engine and send the scanned documents to a second more powerfull computer for OCR and potential send to cloud.
sudo apt-get install imagemagick bc exactimage pdftk \
tesseract-ocr tesseract-ocr-deu tesseract-ocr-eng
For use of Buttons is used insaned
The Process is to be as followed: insaned on the RASPi is calling the script scan.sh from the raspi folder. Please adapt path in file insaned/events/scan and make it executable. To enable more scans this script creates a new process for the ocr-task calling ocrit.sh with &.
ocrit.sh manages to transfer the data to the target scanning device - and starts the final OCR-Process there with a ssh execution call.
With this version - supported is the use of tesseract and abby-cloud. Abby has really good ocr-capabilities (but payed and with price-politics only good for big count of pages recognition) - still better (at least in German) than tesseract; but tesseract4 with LTSM and (important) use of the -l language parameter is really good as well.
The last changes reflect the switch to use docker with tesseract 4. Base of this docker image is tesseract-ocr-re some changes are in the docker directory.
Added some lines to use rclone to push the files to a cloud-Provider and create a link. Afterwards the link is added to an Email including the scaned File.
Prepare your raspberry;
Install your scanner so that scanimage -L
is working on your raspi; for example with this tutorial
In my case Scansnap S1300 - or check raspi folder
sudo adduser pi scanner
sudo apt install sane libsane libsane-dev
git clone https://github.com/abusenius/insaned.git
cd insaned
make
sudo cp ./insaned /usr/bin
sudo mkdir /etc/insaned
sudo mkdir /etc/insaned/events
sudo cp events/* /etc/insaned/events/
sudo cp systemd/insaned.service /etc/systemd/system/
sudo systemctl enable insaned
sudo touch /etc/default/insaned
sudo touch /etc/insaned/events/off
sudo chmod a+x /etc/insaned/events/*
sudo systemctl start insaned
tbd - script the make - udev-rule for scansnap - as insaned runs 'insane' on powerdown... better use PR of insaned / This fixes the problem