Aurora Visio Studio TOP » Tutorial Exercises » Read the Barcode (read_barcode)
Read the Barcode (read_barcode)
Aim
Create an application that reads data from a graphical barcode.
Input
A single image which contains a single 1D barcode of EAN13 type.
Barcode image is stored in the
read_barcode
directory.
Output
Draw the read barcode value on the input image.
Hints
This exercise presents the way to extract data from a graphical 1D code (barcode).
To find and read the barcode ReadSingleBarcode filter may be used.
Labeling connections is explained in this article.
Solution (AVS)
- Add LoadImage filter to ACQUIRE section to read an image from the file.
- Add ReadSingleBarcode filter to PROCESS section as the second filter in the program.
- To draw the recognized value in the image use DrawStrings_SingleColor filter. Set the text position at inLocations and connect outBarcode.Text with inStrings.
- Parameters of the drawn text can be set at inSize and at inColor inputs or at the Properties window.
- Add outImage output of the DrawStrings_SingleColor filter to a preview window.
- Add the value of outBarcode.Position to the preview window to show the location of the found barcode.