Machine vision systems have many applications in different industries. One of their important uses is identifying letters and numbers. By identifying the letters and numbers on the products, we can check the expiration date on the food on the production line to make sure that our product is healthy. We can also read the code or model number from the product. In this article , we will recognize the numbers on the timer using Halcon image processing software .
Download the number and code recognition program with Halcon image processing software
Using the form below, download the letter and number recognition program with Halcon software. To run the program, you must download and install Halcon version 18 software (the library used in this program is only available in Halcon version 18). The coding description of the program is in the video. So to fully understand the content, watch the video.
Identification of numbers and letters with Halcon machine vision software
Various types of OCR programs can be implemented using Halcon software. To read letters and numbers in Halcon software, we can use two methods, which we will explain below.
Identification of letters and numbers with ready-made libraries in Halkon
Halcon software allows you to use ready-made libraries to find letters and numbers. In this case, you will easily be able to identify letters and numbers. The figure below shows finding letters using ready-made libraries in Halcon software.
To find the numbers in this article, ready libraries in Halcon software are used.
Teaching the software to identify letters and numbers
Suppose you want to read Persian numbers. In this case, you cannot use ready-made libraries. Halcon software gives you the ability to teach Persian numbers to the software and implement them. For this purpose, it is enough in the training phase, the image of several examples of each letter is introduced to the software. In this case, after training, the software can identify them.
As an example, pay attention to the image shown in the figure below, considering that the letters in the image below have a special format, we can no longer use ready-made libraries and they must be taught to the software.
Identification of numbers and codes with the camera
You can connect a regular webcam to Halcon software to read letters and numbers. You can also connect your mobile camera to Halcon software; Although we generally use industrial cameras and lenses to carry out projects in the industry. With industrial cameras, we can adjust the light of the image and get a high-quality image from the camera. Here we used a Bassler Dart camera to read letters and numbers. In the figure below, the image of this camera is shown along with the industrial lens that is placed on it.
We use Pylon software to adjust image light, image brightness and limit the field of view in Basler industrial cameras . Here too, using this software, we have limited our viewing space to the numbers on the mobile screen.
Recognition of timer numbers by image processing
We have used a mobile phone to simulate a digital timer. The digital timer on the mobile phone displays the numbers as shown in the image below.
Basler’s Dart camera receives the image of the numbers from the mobile screen and transfers it to the laptop. Halcon software will receive these images and identify them using the written program.
Implementation of number recognition program with machine vision
After running the program in the Halcon software, we have activated the timer through the mobile phone. As you can see in the figure below, Halcon software can identify and display the number on the timer.
See how to implement and run the program in the video file.