[OpenR8 solution] Image_Barcode (Read 1D barcode and QR code)
  1. Image_Barcode

 

Image_barcode is used to parse barcodes, such as bar code or QR code. Use by simply entering an image of the barcode, and then by six simple steps, you can display the results of parsing the barcode. Fig. 1 below.

 

Fig. 1. Parsing barcode Diagram..png

Fig. 1. Parsing barcode Diagram.

 

 

  1. Introduction

 

This section describes how users can load existing solutions through R8 software to achieve barcode parsing.

 

Step 1. To perform R8.exe, double-click the mouse to turn on R8. The image is shown in Fig. 2 below.

 

Fig. 2. Run R8.exe ..png

Fig. 2. 【Run R8.exe】.

 

Step 2. Click "File" => "open" above R8. The picture is shown in Fig. 3 below.

 

Fig. 3. File .png

Fig. 3. 【File】=>【Open】.

 

Step 3. Select the Image_barcode folder under solution. Fig. 4 below.

 

Fig. 4. Solution Folder..jpg

Fig. 4. Solution Folder.

 

Step 4. Select and open the process file. Fig. 5, Fig. 6 below.  

Fig. 5. Select a flow file. .png

Fig. 5. Select a flow file.

 

Fig. 6. Open the Flow..jpg

Fig. 6. Open the Flow.

 

Step 5. Select the barcode diagram you want to parse. Fig. 7 below.

 

Fig. 7. Select the image of barcode you want to parse..png

Fig. 7. Select the image of barcode you want to parse.

 

Step 6. Run and display the results. Fig. 8 below.

 

Fig. 8. Perform and display the results of barcode resolution..png

Fig. 8. Perform and display the results of barcode resolution.

 

 

  1. Introduction to process Content

 

This solution has a total of six function. Figure 9 below.

 

Fig. 9. Processes within the solution..jpg

Fig. 9. Processes within the solution.

 

The process is from up to bottom:

 

【1 Image_Open】

Turn on the image you want to parse.

Variable name

name

value

application

ImageFileName (String)

Image File Name

barcode.png

Image that you want to parse barcode.

image (Image)

Image

 

Save the image of the barcode to the image variable.

 

 

【2 Barcode_Decode】

Set the form of the barcode and parse the barcode.

Variable name

name

value

application

Barcode (String)

Barcode

 

Parsing string results for barcodes.

image (Image)

Image

 

Images that you want to parse

mode (Int)

Mode

0

0 : The default value, [for 1-dim and 2-dim identification] (that is, whether Bar code or QR code is judged), takes a long time.

1 : 2-dim identification (that is, when the target to be identified is QR code)

2 : 1-dim barcode identification (that is, when the target to be identified is Bar code)

 

 

【3 barcode_Display】

Display barcode Images.

Variable name

name

value

application

image (Image)

Image

 

Select the image variable you want to display.

displayPercentage (int)

 

 

Displays the percentage of the image. A value of 200 means 200 (the image is magnified one times), 50 means 50 (the picture is halved), and so on, zoom in and out.

windowTitle (String)

windowTitle

Image

The title of the window that displays the image. The window name is Image.

 

 

【4.Println】

A string that displays the parsed results.

Variable name

name

value

application

int (int)

 

 

 

bool (bool)

 

 

 

float (float)

 

 

 

double (double)

 

 

 

string (string)

Barcode

 

Display Barcode parsing results above the DOS window.

image (image)

 

 

 

 

 

 

After【Image_Show】you must add【WaitKey】to see the image, and how many microseconds the image stays.

Variable name

name

value

application

keyCode (int)

keyCode

0

The output is turned off by the signal.

milliSeconds (int)

milliSeconds

0

Set to 0 if you want the image display window to press any key to close; Set 1000 if you want the image to be turned off after 1 seconds. 1 seconds = 1000 microseconds.

 

 

【6 Image_DestoryWindows】

Be sure to add "image _ Close All windows" in "image _ Display" and "Wait". This function closes the window that displays all image _.


Recommended Article

1.
OpenR8 Community Edition - AI Software for Everyone (Free Download)