Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Mobile and Embedded
  4. OCR with QT

OCR with QT

Scheduled Pinned Locked Moved Unsolved Mobile and Embedded
8 Posts 4 Posters 3.9k Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • S Offline
    S Offline
    saurabh162
    wrote on last edited by
    #1

    Whether there any module in QT which I can use for Optical character recognition in order to extract text from image of document ?

    In following disccusion I have noticed that I need to use "Tesseract with Qt and OpenCV".

    https://forum.qt.io/topic/14502/ocr-in-c/11

    I have used it and it gives good result with documents with clear text with black color fonts on white background.

    But when I use it with image of following types of documents then I do not get satisfactory results and get many errors in output text

    1. Document with white texts on black background
    2. Handwritten documents
    3. Document with two columns of texts for example in newspapers
    4. Colored certificates
    5. Document with mathematical formulas
    6. Document with Tables

    So whether there is any ready to use module/ library which I can use with each type of document without doing image processing of image before converting it to text.

    many thanks for help !!

    1 Reply Last reply
    0
    • SGaistS Offline
      SGaistS Offline
      SGaist
      Lifetime Qt Champion
      wrote on last edited by
      #2

      Hi,

      AFAIK, there's no official Qt module for that task.

      Did you also consider using external tools and invoking them through QProcess ?

      Interested in AI ? www.idiap.ch
      Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

      1 Reply Last reply
      1
      • S Offline
        S Offline
        saurabh162
        wrote on last edited by
        #3

        Hello SGaist,

        Thank you very much for your fast reply.

        Yes, actually I have developed a python script using OpenCV and pytesseract and call it using QProcess which can extract text from simple images as I mentioned before. But when try to extract text from complicated document image (such has document with handwritten data) then I get lot of errors in output text.

        So I also wanted to know whether anyone knows any good OCR software on ubuntu machine which I can use with QT without much problem. Or do I have only one choice, first learn image processing using opencv and then make a good OCR software myself?

        Many thanks ..:)

        1 Reply Last reply
        0
        • SGaistS Offline
          SGaistS Offline
          SGaist
          Lifetime Qt Champion
          wrote on last edited by
          #4

          You might want to also consider the current trends of Machine/Deep Learning tools that are emerging for also this use case.

          Interested in AI ? www.idiap.ch
          Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

          S 1 Reply Last reply
          0
          • SGaistS SGaist

            You might want to also consider the current trends of Machine/Deep Learning tools that are emerging for also this use case.

            S Offline
            S Offline
            saurabh162
            wrote on last edited by saurabh162
            #5

            Hello @SGaist,

            Thank you and yes, I am in contact with some experts in field of machine learning.

            They do not know any solution in open source world which have solution for problem, I am facing in my application, and
            I cannot afford commercial solution right now.

            Before starting development of solution which can solve my problem. I just want to make sure that whether there is anything already in market
            which can help me to extract text from every type of document, so that I do not end up redesigning the things which i can directly use.

            kind regards
            Saurabh

            1 Reply Last reply
            0
            • M Offline
              M Offline
              mvuori
              wrote on last edited by
              #6

              There are things you can and should do. Usually one prepares images for Tesseract in some code that inverses negative images, turns them into black while maximizing contrast. Detecting columns is also an easy task - just scan pixels for the space between and pass the rectangles to OCR separately. Tables need just more code... Only recognizing handwritten text is hard, very hard.

              S 1 Reply Last reply
              0
              • M mvuori

                There are things you can and should do. Usually one prepares images for Tesseract in some code that inverses negative images, turns them into black while maximizing contrast. Detecting columns is also an easy task - just scan pixels for the space between and pass the rectangles to OCR separately. Tables need just more code... Only recognizing handwritten text is hard, very hard.

                S Offline
                S Offline
                saurabh162
                wrote on last edited by
                #7

                @mvuori said in OCR with QT:

                There are things you can and should do. Usually one prepares images for Tesseract in some code that inverses negative images, turns them into black while maximizing contrast. Detecting columns is also an easy task - just scan pixels for the space between and pass the rectangles to OCR separately. Tables need just more code... Only recognizing handwritten text is hard, very hard.

                Hello @mvuori ,

                Thank you very much for the reply. I think I have got my answer. That I need to do some processing before feeding my image Tesseract.

                1 Reply Last reply
                0
                • B Offline
                  B Offline
                  bryant_reeves82
                  wrote on last edited by
                  #8

                  You may give this one a try. I have used it a lot with QT last year and had some success https://www.bisok.com/grooper-data-capture-method-features/multi-pass-ocr/. Hope this helps, good luck.

                  1 Reply Last reply
                  0

                  • Login

                  • Login or register to search.
                  • First post
                    Last post
                  0
                  • Categories
                  • Recent
                  • Tags
                  • Popular
                  • Users
                  • Groups
                  • Search
                  • Get Qt Extensions
                  • Unsolved