manisandro / gImageReader

A Gtk/Qt front-end to tesseract-ocr.
GNU General Public License v3.0
1.6k stars 188 forks source link

Add barcode and QR-code recognition #202

Closed zamazan4ik closed 4 years ago

zamazan4ik commented 6 years ago

Hello, Abbyy FineReader can recognize barcodes and QR-codes. Is it possible for gImageReader?

manisandro commented 6 years ago

A quick google search for tesseract + qrcode / barcode does not reveal much, don't know to what extent tesseract is capable to process these. Or one would need to add support for another OCR engine or library which can process these, so potentially lots of work.

zamazan4ik commented 6 years ago

No, tesseract cannot recognize barcodes. But we can use for this e.g. Z-Bar library. https://github.com/ZBar/ZBar

manisandro commented 6 years ago

I suppose that would mean adding an additional processing mode (in addition to "Plain text" and "hOCR + PDF") for barcodes.

zamazan4ik commented 6 years ago

I think, yes. We will have to add additional mode.

But i ask to only about the feature: is it good addition to gImageReader? About implementation we can chat later after deeper research.

manisandro commented 6 years ago

Well as far as my own usage is concerned (actually I developed the application for my dad who is a teacher and does lots of OCR) the goals have already been reached long time ago, I've since just implemented what people were requesting. So far I've never received a request for qrcodes or barcodes, so don't know how much demand there is for this.

zamazan4ik commented 6 years ago

I can ask to some people, who use often OCR engines. BTW, on my work we develop our own document managemnt syste. And we have barcodes recognition in our OCR solution.

amitdo commented 6 years ago

Leptonica has some code for barcode recognition. I don't know how good is it.

zamazan4ik commented 6 years ago

@amitdo Leptonica has very poor barcode recognizer.

zamazan4ik commented 6 years ago

I suggest use this library: https://github.com/zxing/zxing/tree/00f634024ceeee591f54e6984ea7dd666fab22ae/cpp

FMPOV it's the most powerful open-source in this area.

zamazan4ik commented 6 years ago

@manisandro can we try as experiment use this library? https://github.com/ftylitak/qzxing

But i am not sure about port to gIR GTK...

zamazan4ik commented 6 years ago

Some results: there is no good library for working with barcodes/QR-codes.

ZBar library is dead; Zxing library (port to C++) is dead. QZxing is based on zxing 2.4, but qzxing isn't high-quality library.

Zbar works faster Zxing, but Zxing hasn't porblems with large QR-codes.

For QR-codes only there are two libraries: quirc ( https://github.com/dlbeer/quirc )

zamazan4ik commented 6 years ago

After discussions with other developers i suggest use ZBar for barcode recognition. It has quite good C++ interface, so you can try to use it

manisandro commented 4 years ago

I don't plan to add support for any other engines than tesseract.