Recent

Author Topic: Tesseract for ocr  (Read 2166 times)

MarkMLl

  • Hero Member
  • *****
  • Posts: 8334
Re: Tesseract for ocr
« Reply #15 on: February 07, 2025, 08:33:54 pm »
Do you mean MICR or OCR?
He does mean the MICR. It seems to a special font used in the canadian banking system which is used for banking cheques.

Standardised internationally, but it's Magnetic Ink Character Recognition and if that's what he's really asking then he wants an MICR reader not OCR... back in the day they were effing big expensive machines which could inhale of the order of ten cheques a second.

Now I obviously know that he might, potentially, mean that he wants to use OCR to read the standard MICR character face. But it's down to him to tell us, unambiguously

* What he's trying to do.

* What peripherals he's trying to use.

* What he's tried so far.

* Precisely what problems he's experienced.

...and so on.

OP (Packs): you are really not doing yourself any favours by the way you're going about things. As an example, when you first appeared on the forum you were asking about writing ERP software, but much later in a completely different thread it appeared that what you really wanted to know was how to interface to a product called "Oracle ERP".

Now we all appreciate that English might not be your first language, but that's really no excuse for not thinking about what you're trying to do and spamming us with one-line pronouncements that could be read either as a question or a statement. And, for that matter, never ever saying "please" or "thank you".

MarkMLl
MT+86 & Turbo Pascal v1 on CCP/M-86, multitasking with LAN & graphics in 128Kb.
Logitech, TopSpeed & FTL Modula-2 on bare metal (Z80, '286 protected mode).
Pet hate: people who boast about the size and sophistication of their computer.
GitHub repositories: https://github.com/MarkMLl?tab=repositories

TRon

  • Hero Member
  • *****
  • Posts: 4157
Re: Tesseract for ocr
« Reply #16 on: February 07, 2025, 10:05:54 pm »
Thank you very much for the history lesson there MarkMLI, as I did not know. Very much appreciated and reminds me never too old to learn  :)

Other than that, yes I agree fully. Those one-liners without any context bothers me as well. For me it indicates no incentive whatsoever (which does not necessarily have to be the case).

I do not know the context of the topic but do but a single search, find the repository, read the readme, check the example project and from that understand it is as rvk mentioned just a training set for tesseract. Using those have plenty of examples. There are enough Delphi/laz tesseract related repositories that show how to do so.

Everything that follows from struggling with that, I can understand (and more than happy to help when able) but not those one-liners that scream: show me the code, you write it for me so that I can profit from it. Again which does not necessarily have to be the case but in all of OP's communication it comes across as such.

I have much more respect for those struggling with the language but at least bother to ask the question in their native tongue with a half arsed translation. Besides that, code usually speaks for itself  :)
Today is tomorrow's yesterday.

Boleeman

  • Hero Member
  • *****
  • Posts: 840
Re: Tesseract for ocr
« Reply #17 on: February 08, 2025, 01:05:28 am »
Came across an interesting OCR called copyfish that works in the browser:


Firefox:
https://ocr.space/copyfish/docs#xmodule-ocr 

Chrome:
https://chromewebstore.google.com/detail/copyfish-%F0%9F%90%9F-free-ocr-soft/eenjdnjldapjajjofmldgmkjaienebbj
https://ocr.space/copyfish/welcome?b=chrome

Can even be used to OCR and Translate videos and receipts


Some info:
Grab data from tables and receipts:
If you need to copy text from receipt scans, invoice PDFs or table screenshots, turn on the receipt scanning switch.
This feature makes sure the data is returned correctly line by line, exactly as on the receipt.
Input language shortcuts

Switch between OCR languages
Use Input OCR Language Shortcuts.
Copyfish allows you to add up to three OCR languages as shortcut to the user interface.

Add Desktop OCR support
To add the free desktop OCR support, install the UI.Vision XModule (the link goes to our Ui.Vision website). The XModule is a small app that helps Copyfish to take the screenshot and adds local OCR. It is available for Windows, Mac and Linux. We highly recommend using it. But if you only want to online OCR content inside the web browser, installing this addon is not required.

Packs

  • Sr. Member
  • ****
  • Posts: 480
Re: Tesseract for ocr
« Reply #18 on: February 08, 2025, 06:05:30 am »
Thank you for your support .

I have done in python and called from lazarus.( reading check micr line )

it is working now .

if it is done through Lazarus was great .

MarkMLl

  • Hero Member
  • *****
  • Posts: 8334
Re: Tesseract for ocr
« Reply #19 on: February 08, 2025, 12:01:38 pm »
Other than that, yes I agree fully. Those one-liners without any context bothers me as well. For me it indicates no incentive whatsoever (which does not necessarily have to be the case).

I do not know the context of the topic but do but a single search, find the repository, read the readme, check the example project and from that understand it is as rvk mentioned just a training set for tesseract. Using those have plenty of examples. There are enough Delphi/laz tesseract related repositories that show how to do so.

Plus of course it's courteous to give the community at least some information regarding the ultimate solution, to help anybody who gets here via Google etc. in the future.

A minimal amount of digging around pointed me at people making relatively-cheap desktop cheque/card readers, and a minimal search on Github turned up plenty of example code in Python etc. Application of a minimal amount of brainpower revealed that the example code was using the HID API, which is of course usable from Pascal even if there are no convenient pre-packaged Lazarus components.

OP has, of course, given us so little information about what he's working with that the above might or might not apply, but in any event what he's doing is almost certainly not OCR from a flatbed scanner etc. which is where the term would normally be used.

But I can say fairly confidently that he's almost certainly not got one of these https://optimizedimaging.com/Burroughs-NDP-Quantum-check-scanner.html ...unless of course he really is rewriting Birmingham's ERP for them :-)

MarkMLl
MT+86 & Turbo Pascal v1 on CCP/M-86, multitasking with LAN & graphics in 128Kb.
Logitech, TopSpeed & FTL Modula-2 on bare metal (Z80, '286 protected mode).
Pet hate: people who boast about the size and sophistication of their computer.
GitHub repositories: https://github.com/MarkMLl?tab=repositories

Packs

  • Sr. Member
  • ****
  • Posts: 480
Re: Tesseract for ocr
« Reply #20 on: February 12, 2025, 09:47:05 am »
Anyone is having 64 but library for tessreact for Lazarus 🙏

rvk

  • Hero Member
  • *****
  • Posts: 6693
Re: Tesseract for ocr
« Reply #21 on: February 12, 2025, 09:51:20 am »
Anyone is having 64 but library for tessreact for Lazarus 🙏
You can't find it on the official binary download page?
https://tesseract-ocr.github.io/tessdoc/Installation.html

It has a link to the provider of the binaries for Windows and they do provide the 64 bit version

Packs

  • Sr. Member
  • ****
  • Posts: 480
Re: Tesseract for ocr
« Reply #22 on: February 12, 2025, 12:51:27 pm »
Dear Sir,

I have installed lazarus 64 bit .

how to compile 32 bit library into 64 bit lazarus.

Should I download 32 bit version lazarus.

rvk

  • Hero Member
  • *****
  • Posts: 6693
Re: Tesseract for ocr
« Reply #23 on: February 12, 2025, 01:13:35 pm »
I have installed lazarus 64 bit .
how to compile 32 bit library into 64 bit lazarus.
You can't use a 32bit library with a 64bit program (and visa versa).

Why not just use the 64bit version of the tesseract library? (I linked to it above)

(but installing 32bit Lazarus is also a way to go)

Packs

  • Sr. Member
  • ****
  • Posts: 480
Re: Tesseract for ocr
« Reply #24 on: February 12, 2025, 01:30:20 pm »
Dear Sir,

I am good into using library .

I don't have knowledge of C++ header file convert into pascal.

if I can use dll directly with help of documents.




dseligo

  • Hero Member
  • *****
  • Posts: 1480
Re: Tesseract for ocr
« Reply #25 on: February 12, 2025, 01:36:37 pm »
Dear Sir,

I have installed lazarus 64 bit .

how to compile 32 bit library into 64 bit lazarus.

Should I download 32 bit version lazarus.

Install 32 bit crosscompiler for fpc. Then you can compile your program in 32 bits and it will work with 32 bit library.

Packs

  • Sr. Member
  • ****
  • Posts: 480
Re: Tesseract for ocr
« Reply #26 on: February 12, 2025, 02:00:55 pm »
Thank you

I have downloaded lazarus-3.0-fpc-3.2.2-cross-i386-win32-win64.

while compiling getting following error message 

tesseractocr.pas(452,21) Error: Identifier not found "TArithmeticExceptionMask"


rvk

  • Hero Member
  • *****
  • Posts: 6693
Re: Tesseract for ocr
« Reply #27 on: February 12, 2025, 02:30:29 pm »
while compiling getting following error message 

tesseractocr.pas(452,21) Error: Identifier not found "TArithmeticExceptionMask"

Change TArithmeticExceptionMask to TFPUExceptionMask

Change exAllArithmeticExceptions to [exInvalidOp, exDenormalized, exZeroDivide, exOverflow, exUnderflow,exPrecision]

Packs

  • Sr. Member
  • ****
  • Posts: 480
Re: Tesseract for ocr
« Reply #28 on: February 12, 2025, 05:36:22 pm »
Thank you 🙏.

It is working.

Can I embedded tessreact folder inside the application.

I am really thankful to you 🙏

 

TinyPortal © 2005-2018