Bar code identifying method and device
A barcode recognition and barcode technology, applied in the field of barcode recognition, can solve the problem of low recognition performance and achieve the effect of improving recognition performance
- Summary
- Abstract
- Description
- Claims
- Application Information
AI Technical Summary
Problems solved by technology
Method used
Image
Examples
Embodiment 1
[0037] figure 1 The implementation flow of the barcode recognition method provided by the first embodiment of the present invention is shown, and the details are as follows:
[0038] In step S101, the barcode image to be recognized after binarization processing and the coordinates of multiple scanning starting points of the image are acquired.
[0039] In the specific implementation process, the color barcode image to be recognized is first obtained from the camera, and the color barcode image is grayscaled, and then the grayscaled image is obtained, and the histogram of the image is calculated. is composed of black brightness and white brightness, then there will be a peak near the black brightness area and a peak near the white brightness area in the histogram, so an optimal brightness value between the two peaks can be determined, and the image Segmentation, if the distance between the two peaks is relatively close and less than the preset distance value, it is considered ...
Embodiment 2
[0072] Figure 6 It shows the process of obtaining the optimal brightness value in the barcode recognition method provided by the second embodiment of the present invention, specifically performing grayscale processing on the color image to be recognized, and after obtaining the histogram of the grayscale image, the image is processed Binarization processing (binarization is 0, 1), obtains the process as the optimal brightness value or threshold value of binarization, but is not limited to the acquisition process of this embodiment, detailed description is as follows:
[0073] In step S601, a first peak value in the histogram and a first gray value corresponding to the first peak value are obtained.
[0074] Specifically, the first peak value is the number of a certain gray value that appears most in the gray image, that is, the maximum value in the histogram, represented by maxBucketCount, and the first gray value corresponding to the maximum value is obtained value, that is...
Embodiment 3
[0089] Figure 7 The process of judging the type of two-dimensional barcode in the barcode recognition method provided by the third embodiment of the present invention is shown, and the details are as follows:
[0090] In step S701, when it is judged that the dimension of the barcode is two-dimensional, it is judged whether there is a feature matching one type of barcode feature in the preset multi-barcode type table in the circumscribed rectangle.
[0091] Among them, the preset multiple barcode type table is pre-configured before the barcode is recognized. It is configured with various types of barcodes and corresponding barcode features, so as to facilitate the use of barcode recognition, and the user can add or add at any time as needed. Other types of barcodes can be added to this type list, which has good scalability. The placement of each barcode type in the table is sorted according to the frequency of the barcode type used, that is, to configure the detection and rec...
PUM
Login to View More Abstract
Description
Claims
Application Information
Login to View More 