Tesseract not available after installing

Questions about applications and software
Forum rules
Before you post read how to get help. Topics in this forum are automatically closed 6 months after creation.
Locked
aldi
Level 1
Level 1
Posts: 22
Joined: Tue Jan 26, 2021 10:51 am

Tesseract not available after installing

Post by aldi »

Hi everyone! Newbie here

I installed Tesseract via snapd using this tutorial: https://snapcraft.io/install/tesseract/mint
However, I can't see the application even though it is apparently installed or, at least, its files are downloaded (I can't find snapd either, should it be visible somewhere?).

Since I couldn't work with Tesseract, I tried uninstalling it to reinstall, but I get this error when I write the removal command (this is probably a problem related to me not knowing how to talk terminal :lol: ):

Code: Select all

sudo snap remove tesseract --edge
error: unknown flag `edge'
Any insights on this? Is there something I'm missing to "activate" the app? Should I try to uninstall + install to see if it does the trick or might this be a snapd issue? So many questions, I still don't know what I'm doing.

Thanks a lot for any help!!!

Here is what I'm working with:

Code: Select all

inxi -Fxxxrz
System:
  Kernel: 5.8.0-40-generic x86_64 bits: 64 compiler: N/A 
  Desktop: Cinnamon 4.8.6 wm: muffin 4.8.1 dm: LightDM 1.30.0 
  Distro: Linux Mint 20.1 Ulyssa base: Ubuntu 20.04 focal 
Machine:
  Type: Laptop System: Acer product: Aspire A515-56 v: V1.04 
  serial: <filter> 
  Mobo: TGL model: Iris_TL v: V1.04 serial: <filter> UEFI: Insyde v: 1.04 
  date: 11/02/2020 
Battery:
  ID-1: BAT1 charge: 45.6 Wh condition: 47.5/47.9 Wh (99%) volts: 12.6/11.4 
  model: Murata AP18C4K type: Li-ion serial: <filter> status: Discharging 
  cycles: 31 
CPU:
  Topology: Quad Core model: 11th Gen Intel Core i5-1135G7 bits: 64 
  type: MT MCP arch: Tiger Lake rev: 1 L2 cache: 8192 KiB 
  flags: avx avx2 lm nx pae sse sse2 sse3 sse4_1 sse4_2 ssse3 vmx 
  bogomips: 38707 
  Speed: 1262 MHz min/max: 400/4200 MHz Core speeds (MHz): 1: 1200 2: 1201 
  3: 1200 4: 1200 5: 1200 6: 1195 7: 1200 8: 1198 
Graphics:
  Device-1: Intel vendor: Acer Incorporated ALI driver: i915 v: kernel 
  bus ID: 0000:00:02.0 chip ID: 8086:9a49 
  Display: x11 server: X.Org 1.20.9 driver: modesetting unloaded: fbdev,vesa 
  resolution: 1920x1080~60Hz 
  OpenGL: renderer: Mesa Intel Xe Graphics (TGL GT2) v: 4.6 Mesa 20.2.6 
  direct render: Yes 
Audio:
  Device-1: Intel vendor: Acer Incorporated ALI driver: sof-audio-pci 
  bus ID: 0000:00:1f.3 chip ID: 8086:a0c8 
  Sound Server: ALSA v: k5.8.0-40-generic 
Network:
  Device-1: Intel driver: iwlwifi v: kernel port: 4000 bus ID: 0000:00:14.3 
  chip ID: 8086:a0f0 
  IF: wlp0s20f3 state: up mac: <filter> 
  Device-2: Realtek RTL8111/8168/8411 PCI Express Gigabit Ethernet 
  vendor: Acer Incorporated ALI driver: r8169 v: kernel port: 3000 
  bus ID: 0000:01:00.0 chip ID: 10ec:8168 
  IF: enp1s0 state: down mac: <filter> 
Drives:
  Local Storage: total: 476.94 GiB used: 11.97 GiB (2.5%) 
  ID-1: /dev/nvme0n1 vendor: Kingston model: OM8PCP3512F-AA size: 476.94 GiB 
  speed: 31.6 Gb/s lanes: 4 serial: <filter> rev: ECFK52.3 scheme: GPT 
RAID:
  Hardware-1: Intel Volume Management Device NVMe RAID Controller 
  driver: vmd v: 0.6 port: 4000 bus ID: 0000:00:0e.0 chip ID: 8086.9a0b 
  rev: N/A 
Partition:
  ID-1: / size: 467.96 GiB used: 11.96 GiB (2.6%) fs: ext4 
  dev: /dev/nvme0n1p2 
Sensors:
  System Temperatures: cpu: 29.0 C mobo: N/A 
  Fan Speeds (RPM): N/A 
Repos:
  No active apt repos in: /etc/apt/sources.list 
  Active apt repos in: /etc/apt/sources.list.d/official-package-repositories.list 
  1: deb http://packages.linuxmint.com ulyssa main upstream import backport
  2: deb http://archive.ubuntu.com/ubuntu focal main restricted universe multiverse
  3: deb http://archive.ubuntu.com/ubuntu focal-updates main restricted universe multiverse
  4: deb http://archive.ubuntu.com/ubuntu focal-backports main restricted universe multiverse
  5: deb http://security.ubuntu.com/ubuntu/ focal-security main restricted universe multiverse
  6: deb http://archive.canonical.com/ubuntu/ focal partner
  No active apt repos in: /etc/apt/sources.list.d/spotify.list 
Info:
  Processes: 255 Uptime: 17m Memory: 15.44 GiB used: 2.39 GiB (15.5%) 
  Init: systemd v: 245 runlevel: 5 Compilers: gcc: 9.3.0 alt: 9 Shell: bash 
  v: 5.0.17 running in: gnome-terminal inxi: 3.0.38 
Last edited by LockBot on Wed Dec 28, 2022 7:16 am, edited 1 time in total.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
mikeflan
Level 16
Level 16
Posts: 6975
Joined: Sun Apr 26, 2020 9:28 am
Location: Houston, TX

Re: Tesseract not available after installing

Post by mikeflan »

I use version 4.00 from Software Manager. Is that an option for you?
It works surprisingly well.
aldi
Level 1
Level 1
Posts: 22
Joined: Tue Jan 26, 2021 10:51 am

Re: Tesseract not available after installing

Post by aldi »

mikeflan wrote: Sun Apr 04, 2021 10:15 pm I use version 4.00 from Software Manager. Is that an option for you?
It works surprisingly well.
Thanks for the reply! It is an option, I figured it would be outdated but if it works well I will give it a try.

One question, should I delete the tesseract folders that have been created from the previous "installation"? I have snap folders containing tesseract files all over in different locations (I am a super newbie and don't even know if deleting them is safe).

Thanks a lot!
mikeflan
Level 16
Level 16
Posts: 6975
Joined: Sun Apr 26, 2020 9:28 am
Location: Houston, TX

Re: Tesseract not available after installing

Post by mikeflan »

No need to delete anything AFAIK. Tesseract is completely terminal based.

Some info you might want:

OCR a document:
tesseract fj.jpg output --oem 1 -l eng
tesseract file1.jpg output1 --oem 1 -l eng
tesseract file2.jpg output2 --oem 1 -l eng
tesseract ocr.jpg rocks --oem 1 -l eng

This creates a pdf with the image and a separate searchable text layer with the recognized text.
tesseract test_ara.jpg -l ara -psm 3 output pdf

psm integer 0-13 [-psm 3]

0 orientation and script detection only
1 automatic page segmentation with OSD
2 automatic page segmentation, but no OSD, or OCR
3 default, fully automatic page segmentation, but no OSD
4 assume a single column of text of variable sizes.
5 assume a single uniform block of vertically aligned text.
6 assume a single uniform block of text.
7 treat the image as a single text line.
8 treat the image as a single word.
9 treat the image as a single word in a circle.
10 treat the image as a single character.
11 sparse text. Find as much text as possible in no particular order.
12 sparse text with OSD.
13 raw line. Treat the image as a single text line, bypassing hacks that are Tesseract-specific.
TI58C
Level 4
Level 4
Posts: 389
Joined: Tue Jul 18, 2017 5:57 am

Re: Tesseract not available after installing

Post by TI58C »

Tesseract will work with the GUI-based program "OCRfeeder" (in the repo).

You may want to give it a try if you do not want to use the terminal.
Linux is like my late labrador lady-dog: loyal and loving if you treat her lady-like, disbehaving princess if you don't.
mikeflan
Level 16
Level 16
Posts: 6975
Joined: Sun Apr 26, 2020 9:28 am
Location: Houston, TX

Re: Tesseract not available after installing

Post by mikeflan »

Tesseract will work with the GUI-based program "OCRfeeder"
Thanks for that advice. I would like to use a GUI for tesseract. I am surprised that recent reviews for OCRfeeder are poor. tesseract is super fast. I would expect OCRfeeder to be fast too. I use LM19.3. I suspect maybe you use LM20 or better?
User avatar
absque fenestris
Level 12
Level 12
Posts: 4124
Joined: Sat Nov 12, 2016 8:42 pm
Location: Confoederatio Helvetica

Re: Tesseract not available after installing

Post by absque fenestris »

Thanks for pointing out OCRFeeder. I just loaded it with Synaptic and tried it out in Mint 20.0 Cinnamon.
Works great.
A little hint: adjust the desired language in the default settings - this way, e.g. in German, all umlauts are recognized.
TI58C
Level 4
Level 4
Posts: 389
Joined: Tue Jul 18, 2017 5:57 am

Re: Tesseract not available after installing

Post by TI58C »

mikeflan wrote: Fri Apr 16, 2021 1:13 pm
Tesseract will work with the GUI-based program "OCRfeeder"
Thanks for that advice. I would like to use a GUI for tesseract. I am surprised that recent reviews for OCRfeeder are poor. tesseract is super fast. I would expect OCRfeeder to be fast too. I use LM19.3. I suspect maybe you use LM20 or better?
Nope, old, 2-core laptop, Mint 19.1 Mate here.. EDIT_1 : Only thing I changed that may improve speed is swap internal hdd for ssd.
Not superfast, but fast enough...

Although I cheat a lot...Scan a doc from iphone to "picture-only" pdf file, get it in Mint from icloud or lighting-usb external ssd, then use (old) free Windows-based PDFXEdit with playonlinux to OCR and produce a "searchable" pdf with text and picture combined.

Still, use terminal a lot. But had problems with understanding Tesseract. OCRfeeder solved these.
Linux is like my late labrador lady-dog: loyal and loving if you treat her lady-like, disbehaving princess if you don't.
Locked

Return to “Software & Applications”