Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. Distinguish numbers in an image
Forum Update on Monday, May 27th 2025

Distinguish numbers in an image

Scheduled Pinned Locked Moved Unsolved General and Desktop
3 Posts 3 Posters 565 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.
  • mandruk1331M Offline
    mandruk1331M Offline
    mandruk1331
    wrote on last edited by
    #1

    I am trying to distinguish numbers on images, does Qt has the tools to accomplish this task? I tried to callculate the MSE, but it did not help.
    P.S. No OpenCV

    Mandruk1331

    1 Reply Last reply
    0
    • JohanSoloJ Offline
      JohanSoloJ Offline
      JohanSolo
      wrote on last edited by
      #2

      Give a look at this old post

      `They did not know it was impossible, so they did it.'
      -- Mark Twain

      1 Reply Last reply
      1
      • thamT Offline
        thamT Offline
        tham
        wrote on last edited by tham
        #3

        Could you show us some pictures of the digits you want to classify?These digits are handwritten, computer digits or both?
        The task you are trying to do are called "OCR", basically there are two paths to go

        First one is pick the existing OCR(optical character recognition) engine like Tesseract. I never give Tessearct a try, I only know the existence of this library.

        The second path is build the OCR engine by yourself, this way you could avoid tons of dependency issues brought up by Tessearct. If you are not in a hurry and find computer vision interesting, this solution is worth to give it a try. In case you do not familiar with machine learning, Andrew Ng course is a fantastic one to take.

        The steps are(neglect tons of details)

        1 : Collect the data for training, validate and test
        2 : Preprocess your data before training, these include normalize the value to [0,1], mean subtraction, characters alignment,
        binarize the image and so on.
        3 : Feed your characters into different machine learning tools, they could be feed forward neural network, cnn, random forest, svm and so on. If you are not using cnn, you better find a way to extract the features of the characters
        4 : Test your accuracy on validate set and test set, adjust the accuracy until it reach your requirements

        If the digits you want to recognize is hand written, you can use dlib to train a digits classifier, this library could work as a stand alone library, very easy to build and able to cross platform. dlib got a decent example which teach you how to recognize hand written digits(number). dlib provide svm and hog detector too.

        Famous data sets of OCR

        The Chars74K dataset
        MNIST

        If you do not want to deal with dependency issue of Tessearct and have no time to study how to build your own OCR engine, please email me, I may lend you a hand.

        ps : The data set I list may not work for your task, you need to do experiment to find out

        1 Reply Last reply
        1

        • Login

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