Barcode parsing system and parsing method
By designing a barcode analysis system including external cameras and hosts, using asynchronous loop processing and synchronous wait mechanisms, the problem of low barcode analysis efficiency on low-cost and low-performance equipment in the existing technology is solved, and efficient and stable barcode analysis is achieved and improve user experience.
Patent Information
- Application Number
- PCT/CN2024/105684
- Authority / Receiving Office
- WO · WO
- Patent Type
- Applications
- Current Assignee / Owner
- Priority Date
- 2023-07-31
- Filing Date
- 2024-07-16
- Publication Date
- 2025-02-06
AI Technical Summary
Existing barcode resolution systems are greatly affected by industrial camera performance and host performance, making it difficult to balance device performance and user experience on low-cost and low-performance devices, especially when handling multi-barcode resolution of large pixels.
A barcode resolution system is designed, including an external camera and a host, which is equipped with a graph acquisition module, a similarity brightness resolution module, a decoding module, a service processing layer and a GUI layer. Through asynchronous loop processing, the graph acquisition module is synchronously waiting for the decoding module and the similarity brightness analysis module to complete the analysis before returning the data to ensure data integrity and efficiency.
It improves the efficiency of the barcode parsing system, can effectively parse more image data on low-cost and low-performance devices, solves the problem of lag in preview of GUI layer, and balances device performance and user experience.
Smart Images

Figure CN2024105684_06022025_PF_FP_ABST
Abstract
Description
Barcode parsing system and parsing method
[0001] This application claims priority to the Chinese patent application filed with the China Patent Office on July 31, 2023, with application number CN202310958663.3 and invention name “A Barcode Parsing System and Parsing Method”, the entire contents of which are incorporated by reference into this application. Technical Field
[0002] The present application relates to the technical field of image acquisition and processing, and in particular to a barcode parsing system and parsing method. Background Art
[0003] In recent years, my country's Internet of Things (IoT) has experienced rapid development, and image acquisition and processing technologies have become increasingly widespread in industry. For example, barcode scanning, OCR recognition, and AI-based image data acquisition technologies are widely used across various industries, leading to a rapid growth in the use of industrial cameras and various image acquisition devices. When industrial cameras and various image acquisition devices are deployed on a large scale, cost becomes a key consideration.
[0004] For example, existing barcode parsing systems are significantly impacted by factors such as the performance of industrial cameras and the host computer itself. This is particularly evident when parsing large, multi-pixel barcodes. Therefore, balancing performance and user experience when deploying low-cost, low-performance equipment is an urgent challenge.
[0005] Summary of the Invention
[0006] The purpose of this application is to solve at least one of the above-mentioned technical defects, especially the technical defect that the barcode parsing system in the existing technology is greatly affected by factors such as the performance of the industrial camera and the performance of the host itself, and is unable to balance the equipment performance and user experience in the process of using low-cost and low-performance equipment.
[0007] The present application provides a barcode parsing system, the system comprising an external camera and a host connected to the external camera, the host being equipped with a host business logic operation carrier, the host business logic operation carrier comprising an image acquisition module, a similarity brightness analysis module, a decoding module, a business processing layer, and a GUI layer;
[0008] The external camera is used to collect the latest image of the barcode area in real time; wherein the latest image is a multi-barcode image;
[0009] The image acquisition module is configured to acquire the latest image currently captured by the external camera after detecting that the GUI layer displays relevant information of the latest image acquired last time, and send the latest image to the similarity brightness analysis module and the decoding module respectively;
[0010] The similarity and brightness analysis module is used to analyze the similarity and brightness of the latest image, and send the similarity value and brightness value obtained by the analysis to the business processing layer;
[0011] The decoding module is used to decode the latest image and synchronously send the barcode content, barcode coordinates and image metadata in the latest image obtained after decoding, together with the similarity value and brightness value obtained by the similarity brightness analysis module, to the business processing layer;
[0012] The business processing layer is used to encapsulate the barcode content, barcode coordinates, image metadata, similarity value and brightness value in the received latest image into a data structure, and send the data structure to the GUI layer;
[0013] The GUI layer is used to select the successfully decoded barcode content and barcode coordinates in the data structure according to the image metadata frame in the data structure, and then display the successfully decoded barcode content, barcode coordinates and the similarity value and brightness value in the data structure.
[0014] Optionally, the external camera is configured not to cache each frame of the captured image.
[0015] Optionally, the similarity brightness analysis module is configured to:
[0016] When there is no barcode in the latest image, the similarity value and brightness value of the latest image sent to the business processing layer are empty, and the business processing layer directly sends the latest image to the GUI layer for preview by the GUI layer.
[0017] Optionally, the decoding module is configured to:
[0018] When there is no barcode in the latest image, the barcode content, barcode coordinates and image metadata of the latest image sent to the business processing layer are empty. The business processing layer directly sends the latest image to the GUI layer for preview by the GUI layer.
[0019] Optionally, the business processing layer is configured as follows:
[0020] The similarity value and brightness value of the received latest image are compared with the similarity value and brightness value of the previous image, and when it is determined that the latest image and the previous image are the same image, the data structure of the previous image is directly sent to the GUI layer.
[0021] Optionally, the process of the business processing layer encapsulating the barcode content, barcode coordinates, image metadata, similarity value, and brightness value in the received latest image into a data structure includes:
[0022] The business processing layer converts the barcode content, barcode coordinates, similarity value and brightness value in the latest image received into an array form, and encapsulates the array form of barcode content, barcode coordinates, similarity value and brightness value with the image metadata into a data structure.
[0023] Optionally, the process of the GUI layer selecting the successfully decoded barcode content and barcode coordinates in the data structure according to the image metadata in the data structure includes:
[0024] The GUI layer determines the barcode content and barcode coordinates that are successfully decoded and the barcode content and barcode coordinates that are failed to be decoded in the data structure according to the image metadata in the data structure, and selects the barcode content and barcode coordinates that are successfully decoded.
[0025] Optionally, the process of the GUI layer displaying the successfully decoded barcode content, barcode coordinates, and the similarity value and brightness value in the data structure includes:
[0026] The GUI layer restores the successfully decoded barcode content in the structural data according to the image metadata and the coordinates of the successfully decoded barcode, and displays the restored barcode content and the similarity value and brightness value in the data structure.
[0027] Optionally, the barcode content in the latest image includes barcode content corresponding to the barcode and / or QR code.
[0028] The present application also provides a barcode parsing method, which is applied to the barcode parsing system described in any one of the above embodiments, and the method includes:
[0029] The image preview status of the GUI layer is detected by the image acquisition module. After detecting that the GUI layer displays the relevant information of the latest image acquired last time, the latest image currently captured by the external camera is acquired, and the latest image is sent to the similarity brightness analysis module and the decoding module respectively;
[0030] Analyzing the similarity and brightness of the latest image using the similarity and brightness analysis module, and sending the similarity value and brightness value obtained by the analysis to the business processing layer;
[0031] Decoding the latest image using the decoding module, and synchronously sending the barcode content, barcode coordinates, and image metadata in the latest image obtained after decoding, along with the similarity value and brightness value obtained by the similarity brightness analysis module, to the business processing layer;
[0032] Encapsulating the barcode content, barcode coordinates, image metadata, similarity value, and brightness value in the received latest image into a data structure through the business processing layer, and sending the data structure to the GUI layer;
[0033] After the successfully decoded barcode content and barcode coordinates in the data structure are selected by the GUI layer according to the image metadata frame in the data structure, the successfully decoded barcode content, barcode coordinates and the similarity value and brightness value in the data structure are displayed.
[0034] It can be seen from the above technical solutions that the embodiments of the present application have the following advantages:
[0035] The present application provides a barcode parsing system and parsing method, which includes an external camera and a host connected to the external camera, wherein the host is equipped with a host business logic running carrier, and the host business logic running carrier includes an image acquisition module, a similarity brightness analysis module, a decoding module, a business processing layer and a GUI layer; wherein, the external camera of the present application can acquire the latest image of the barcode area in real time, and the latest image is a multi-barcode image. After detecting that the GUI layer displays the relevant information of the latest image acquired last time, the image acquisition module acquires the latest image currently acquired by the external camera, and sends the latest image to the similarity brightness analysis module and the decoding module respectively; the present application sets the image acquisition module to asynchronous loop processing, so that the time consumption of image acquisition does not affect the main business logic; then, the similarity brightness analysis module of the present application can parse the similarity and brightness of the latest image, and send the similarity value and brightness value obtained by parsing to the business processing layer; the decoding module can decode the latest image, and send the barcode content, barcode The coordinates and image metadata are sent synchronously with the similarity value and brightness value obtained by the similarity brightness analysis module to the business processing layer; the present application sends the latest image to the decoding module and the similarity brightness analysis module for processing respectively through the image acquisition module. The decoding module and the similarity brightness analysis module are executed asynchronously, and synchronously wait for each other to complete the analysis before returning the data to the business processing layer. This not only solves the time-consuming accumulation problem of the traditional similarity brightness analysis module and the decoding module, but also solves the business processing layer's requirements for data integrity, ensuring the accuracy of information and the efficiency of barcode analysis; the business processing layer can encapsulate the barcode content, barcode coordinates, image metadata, similarity value and brightness value in the latest image received into a data structure, and send the data structure to the GUI layer; the GUI layer can select the successfully decoded barcode content and barcode coordinates in the data structure according to the image metadata in the data structure, and then display the successfully decoded barcode content, barcode coordinates and the similarity value and brightness value in the data structure. This process improves the processing logic of the image acquisition module, similarity brightness analysis module, and decoding module, so that the improved barcode parsing system can parse more image data per second. This can also solve the original GUI layer preview lag problem, thereby allowing low-cost, low-performance devices to effectively balance device performance and user experience in actual applications. BRIEF DESCRIPTION OF THE DRAWINGS
[0036] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative labor.
[0037] FIG1 is a schematic diagram of the structure of a barcode parsing system provided in an embodiment of the present application;
[0038] FIG2 is an application scenario diagram of the barcode parsing system provided in an embodiment of the present application;
[0039] FIG3 is a flow chart of a barcode parsing process in the prior art provided by an embodiment of the present application;
[0040] FIG4 is a schematic diagram of the process flow of the improved barcode parsing process provided in an embodiment of the present application;
[0041] FIG5 is a diagram showing the barcode content in the latest image displayed on the GUI layer according to an embodiment of the present application;
[0042] FIG6 is a flow chart of a barcode parsing method provided in an embodiment of the present application. DETAILED DESCRIPTION
[0043] The following will be combined with the drawings in the embodiments of this application to clearly and completely describe the technical solutions in the embodiments of this application. Obviously, the embodiments described are only part of the embodiments of this application, not all of the embodiments. Based on the embodiments in this application, all other embodiments obtained by ordinary technicians in this field without making creative efforts are within the scope of protection of this application.
[0044] Existing barcode parsing systems are significantly impacted by factors such as the performance of industrial cameras and the host computer itself. This is particularly evident when parsing large, multi-pixel barcodes. Therefore, balancing performance and user experience when deploying low-cost, low-performance equipment is an urgent challenge.
[0045] In one embodiment, as shown in Figure 1, Figure 1 is a structural diagram of a barcode parsing system provided in an embodiment of the present application; the present application provides a barcode parsing system, which includes an external camera and a host connected to the external camera, and the host is equipped with a host business logic running carrier, and the host business logic running carrier includes an image acquisition module, a similarity brightness parsing module, a decoding module, a business processing layer and a GUI layer.
[0046] The external camera is used to collect the latest image of the barcode area in real time; wherein, the latest image is a multi-barcode image.
[0047] The image acquisition module is used to obtain the latest image currently captured by the external camera after detecting that the GUI layer displays relevant information of the latest image acquired last time, and send the latest image to the similarity brightness analysis module and the decoding module respectively.
[0048] The similarity and brightness analysis module is used to analyze the similarity and brightness of the latest image, and send the similarity value and brightness value obtained by the analysis to the business processing layer.
[0049] The decoding module is used to decode the latest image, and synchronously send the barcode content, barcode coordinates and image metadata in the latest image obtained after decoding to the business processing layer together with the similarity value and brightness value obtained by the similarity brightness analysis module.
[0050] The business processing layer is used to encapsulate the barcode content, barcode coordinates, image metadata, similarity value and brightness value in the received latest image into a data structure, and send the data structure to the GUI layer.
[0051] The GUI layer is used to select the successfully decoded barcode content and barcode coordinates in the data structure according to the image metadata frame in the data structure, and then display the successfully decoded barcode content, barcode coordinates and the similarity value and brightness value in the data structure.
[0052] In this embodiment, as shown in Figure 2, Figure 2 is an application scenario diagram of the barcode parsing system provided in the embodiment of the present application; in Figure 2, the barcode parsing system of the present application may include an external camera and a host. The host collects the latest image of the barcode area through the external camera, and parses the barcode information and image information contained in the latest image through relevant modules, and then displays the parsing results. In this way, the staff can obtain the barcode information and image information through the parsing results displayed by the host.
[0053] The external camera of the present application can be an industrial camera or other camera that can realize the functions related to industrial cameras. The external camera can capture large-pixel images, such as images with more than 5 million pixels. In this way, the captured image can contain multiple barcodes in the barcode area, thereby effectively improving the efficiency of barcode parsing. In addition, when the host in the present application is connected to the external camera and the host power is turned on, the service program in the host can be run to preview the barcode area image captured by the external camera in real time, and perform related operations based on the barcode area image, such as correcting the position of the external camera or checking whether the barcode area image is clear.
[0054] Furthermore, when the traditional business program is running, it mainly obtains the large pixel image of the external camera through the image acquisition module, and then sends it to the similarity brightness analysis module for analysis, and then decodes it through the decoding module, and then sends the decoding result to the business processing layer for processing. Finally, the business processing layer sends the processing result to the GUI layer, and the GUI layer selects the barcode content that is successfully decoded for display. The overall time consumption of this process can be illustrated by Figure 3, which is a flow chart of the barcode parsing process in the prior art provided by the embodiment of the present application; in Figure 3, the image acquisition module obtains the large pixel image captured by the external camera, and each frame of the image takes about 150ms, and the similarity brightness analysis module takes about 60ms to analyze the large pixel image obtained by the image acquisition module. Moreover, since the number of barcodes contained in the large pixel image is about 50, the decoding time is about 150ms, which results in the decoding module being able to decode only about 3 frames of images per second, which makes the image preview of the GUI layer more stuck.
[0055] Based on this, when the present application uses the improved barcode parsing system to parse the barcode area image, a host business logic operation carrier can be installed in the host, and the host business logic operation carrier includes but is not limited to an image acquisition module, a similarity brightness analysis module, a decoding module, a business processing layer and a GUI layer. In this way, the host can obtain the latest image captured by the external camera through the image acquisition module, and send the latest image to the similarity brightness analysis module and the decoding module at the same time. The similarity brightness analysis module can analyze the similarity and brightness of the latest image, and the decoding module can decode the latest image and obtain the decoded barcode content, barcode coordinates and image metadata. Then, the similarity The brightness parsing module can send the similarity value and brightness value obtained by parsing to the business processing layer, and the decoding module can send the barcode content, barcode coordinates and image metadata in the latest image, and the similarity value and brightness value obtained by parsing in the similarity brightness parsing module to the business processing layer synchronously. In this way, the business processing layer can simultaneously receive the barcode content, barcode coordinates, image metadata, similarity value and brightness value of the latest image, and encapsulate the barcode content, barcode coordinates, image metadata, similarity value and brightness value into a data structure, and send it to the GUI layer, so that the GUI layer can display the successfully decoded barcode content, barcode coordinates, similarity value and brightness value according to the data structure.
[0056] During this process, the image acquisition module of the present application can be configured to obtain the latest image currently captured by the external camera after detecting that the GUI layer displays the relevant information of the latest image acquired last time, so that the time consumed by the image acquisition module will not affect the main business logic; and the image acquisition module can also send the latest image to the decoding module and the similarity brightness analysis module at the same time, so that the decoding module and the similarity brightness analysis module can asynchronously execute the corresponding processing logic. When the decoding module or the similarity brightness analysis module completes the analysis, it can synchronously wait for the similarity brightness analysis module or the decoding module to complete. At this time, the data of the two modules are returned to the business processing layer together, thereby effectively solving the problem of accumulated time consumption of the similarity brightness analysis module and the decoding module, thereby effectively improving the barcode parsing efficiency.
[0057] In addition, after the business processing layer of the present application receives the barcode content, barcode coordinates, image metadata, similarity value and brightness value in the latest image, it can send the barcode content, barcode coordinates, image metadata, similarity value and brightness value to the GUI layer in a unified format, such as encapsulating the barcode content, barcode coordinates, image metadata, similarity value and brightness value into a data structure, and sending the data structure directly to the GUI layer. This can not only improve data transmission efficiency, but also reduce GUI layer preview jams; and, after the GUI layer of the present application receives the data structure sent by the business processing layer, it does not directly display it, but instead selects the successfully decoded barcode content and barcode coordinates according to the image metadata in the data structure, and then displays the successfully decoded barcode content, barcode coordinates and the similarity value and brightness value in the data structure. This not only makes it convenient for staff to browse the barcode parsing results, but also reduces preview jams.
[0058] It is understood that image metadata, also known as intermediary data or relay data, refers to data about data, primarily information describing data attributes, used to support functions such as indicating storage location, historical data, and file records. Therefore, in this application, the GUI layer can select the successfully decoded barcode content and barcode coordinates in the data structure based on the image metadata, so that the successfully decoded barcode content, barcode coordinates, and similarity and brightness values in the data structure can be directly displayed.
[0059] In a specific example, as shown in Figure 4, Figure 4 is a flow chart of the improved barcode parsing process provided by an embodiment of the present application; it can be seen from Figure 4 that after using the barcode parsing system of the present application, the image acquisition module does not affect the operation of the main business logic when performing asynchronous loop processing, and the decoding module and the similarity brightness parsing module perform asynchronous processing and synchronous waiting for sending data, and finally can achieve one frame of image processing every 150ms, so that the barcode parsing system of the present application can decode 6.8 frames of images per second, thereby effectively improving user experience and decoding efficiency.
[0060] In the above embodiment, the system includes an external camera and a host connected to the external camera, and the host is equipped with a host business logic running carrier, and the host business logic running carrier includes a picture acquisition module, a similarity brightness analysis module, a decoding module, a business processing layer and a GUI layer; wherein, the external camera of the present application can acquire the latest image of the barcode area in real time, and the latest image is a multi-barcode image. After detecting that the GUI layer displays the relevant information of the latest image acquired last time, the picture acquisition module acquires the latest image currently acquired by the external camera, and sends the latest image to the similarity brightness analysis module and the decoding module respectively; the present application sets the picture acquisition module to asynchronous loop processing, so that the time consumption of picture acquisition does not affect the main business logic; then, the similarity brightness analysis module of the present application can analyze the similarity and brightness of the latest image, and send the similarity value and brightness value obtained by the analysis to the business processing layer; the decoding module can decode the latest image, and send the barcode content, barcode coordinates and image elements in the latest image obtained after decoding. The data is sent synchronously with the similarity value and brightness value obtained by the similarity brightness analysis module to the business processing layer; the present application sends the latest image to the decoding module and the similarity brightness analysis module for processing respectively through the image acquisition module, and the decoding module and the similarity brightness analysis module are executed asynchronously, and synchronously wait for each other to complete the analysis before returning the data to the business processing layer. This not only solves the time-consuming accumulation problem of the traditional similarity brightness analysis module and the decoding module, but also solves the business processing layer's requirements for data integrity, ensuring the accuracy of information and the efficiency of barcode analysis; the business processing layer can encapsulate the barcode content, barcode coordinates, image metadata, similarity value and brightness value in the latest image received into a data structure, and send the data structure to the GUI layer; the GUI layer can select the successfully decoded barcode content and barcode coordinates in the data structure according to the image metadata in the data structure, and then display the successfully decoded barcode content, barcode coordinates and the similarity value and brightness value in the data structure. This process improves the processing logic of the image acquisition module, similarity brightness analysis module, and decoding module, so that the improved barcode parsing system can parse more image data per second. This can also solve the original GUI layer preview lag problem, thereby allowing low-cost, low-performance devices to effectively balance device performance and user experience in actual applications.
[0061] In one embodiment, the external camera is configured not to buffer each frame of the captured image.
[0062] In this embodiment, in order to ensure that the delay between the external camera and the host preview is small, this application can configure the external camera to not cache each frame of the captured image, so that the external camera can obtain the latest image each time. The image acquisition module can obtain the latest image captured by the external camera in real time according to the completion of the main business logic, thereby balancing the device performance and user experience in the use of low-cost and low-performance devices.
[0063] In one embodiment, the similarity brightness analysis module is configured to:
[0064] When there is no barcode in the latest image, the similarity value and brightness value of the latest image sent to the business processing layer are empty, and the business processing layer directly sends the latest image to the GUI layer for preview by the GUI layer.
[0065] In this embodiment, when there is a barcode in the latest image, the similarity brightness analysis module can analyze the similarity and brightness of the latest image, so that the business processing layer can determine whether it is the same image as the previous image based on the analysis result. The analysis process can use the existing analysis algorithm and will not be described here. When there is no barcode in the latest image, the similarity value and brightness value of the latest image sent to the business processing layer by the similarity brightness analysis module are empty. After receiving the empty similarity value and brightness value, the business processing layer can determine that the latest image currently collected is an image without a barcode. At this time, the latest image can be directly sent to the GUI layer for preview by the GUI layer. In this way, the staff can understand the situation of the current barcode area through the preview image displayed by the GUI layer, and can reduce the analysis work of the similarity brightness analysis module.
[0066] In one embodiment, the decoding module is configured to:
[0067] When there is no barcode in the latest image, the barcode content, barcode coordinates and image metadata of the latest image sent to the business processing layer are empty. The business processing layer directly sends the latest image to the GUI layer for preview by the GUI layer.
[0068] In this embodiment, when there is a barcode in the latest image, the decoding module can decode the latest image and obtain the decoded barcode content, barcode coordinates, image metadata, etc. The decoding process can use the existing decoding algorithm and will not be described here; when there is no barcode in the latest image, the barcode content, barcode coordinates and image metadata of the latest image sent by the decoding module to the business processing layer are empty. After receiving the empty barcode content, barcode coordinates and image metadata, the business processing layer can determine that the latest image currently collected is a barcode-free image. At this time, the latest image can be directly sent to the GUI layer for preview by the GUI layer. In this way, the staff can understand the situation of the current barcode area through the preview image displayed by the GUI layer, and can reduce the decoding work of the decoding module.
[0069] In one embodiment, the service processing layer is configured to:
[0070] The similarity value and brightness value of the received latest image are compared with the similarity value and brightness value of the previous image, and when it is determined that the latest image and the previous image are the same image, the data structure of the previous image is directly sent to the GUI layer.
[0071] In this embodiment, after receiving the barcode content, barcode coordinates and image metadata of the latest image sent by the decoding module, and the similarity value and brightness value of the latest image sent by the similarity brightness analysis module, the business processing layer can first compare the similarity value and brightness value of the latest image with the similarity value and brightness value of the previous image, so that when it is determined that the latest image and the previous image are the same image, the data structure of the previous image can be directly sent to the GUI layer. This can reduce the processing flow of the business processing layer and thereby improve the barcode display efficiency.
[0072] It can be understood that the business processing layer of the present application can save the data structure corresponding to at least one processed image data, so that before processing the data structure corresponding to the next processed image data, it can be judged based on the image data whether the content is consistent with the previous image data, thereby reducing the data structure packaging process and effectively improving the processing efficiency of the barcode parsing system of the present application.
[0073] In one embodiment, the process of the service processing layer encapsulating the barcode content, barcode coordinates, image metadata, similarity value, and brightness value in the received latest image into a data structure includes:
[0074] The business processing layer converts the barcode content, barcode coordinates, similarity value and brightness value in the latest image received into an array form, and encapsulates the array form of barcode content, barcode coordinates, similarity value and brightness value with the image metadata into a data structure.
[0075] In this embodiment, when the business processing layer encapsulates the barcode content, barcode coordinates, image metadata, similarity value and brightness value in the latest image into a data structure, it can first convert the barcode content, barcode coordinates, similarity value and brightness value in the latest image into an array form, and then encapsulate the array and the image metadata into a data structure. In this way, after the GUI layer obtains the data structure, it can obtain relevant data for display based on the data encapsulated in the data structure.
[0076] Among them, when converting the barcode content, barcode coordinates, similarity value and brightness value in the latest image into array form, this application can use the Array.from() method, Array.of() method (es6), or the extension operator method, etc. The specific settings can be made according to the actual situation and are not restricted here.
[0077] In one embodiment, the process of the GUI layer selecting the successfully decoded barcode content and barcode coordinates in the data structure according to the image metadata in the data structure includes:
[0078] The GUI layer determines the barcode content and barcode coordinates that are successfully decoded and the barcode content and barcode coordinates that are failed to be decoded in the data structure according to the image metadata in the data structure, and selects the barcode content and barcode coordinates that are successfully decoded.
[0079] In this embodiment, after the GUI layer receives the data structure of the latest image sent by the business processing layer, it can decapsulate it in accordance with the method agreed with the business processing layer, and thereby obtain the image metadata in the data structure. Then, the GUI layer can determine the barcode content and barcode coordinates that have been successfully decoded, as well as the barcode content and barcode coordinates that have failed to be decoded, in the data structure based on the data recorded in the image metadata corresponding to the barcode content and barcode coordinates in the data structure, and select the barcode content and barcode coordinates that have been successfully decoded to obtain the barcode content and barcode coordinates that have been successfully decoded.
[0080] In one embodiment, the process of the GUI layer displaying the successfully decoded barcode content, barcode coordinates, and the similarity value and brightness value in the data structure includes:
[0081] The GUI layer restores the successfully decoded barcode content in the structural data according to the image metadata and the coordinates of the successfully decoded barcode, and displays the restored barcode content and the similarity value and brightness value in the data structure.
[0082] In this embodiment, after the GUI layer obtains the successfully decoded barcode content and barcode coordinates, since the barcode content and barcode coordinates are both in the form of arrays, the GUI layer can restore the successfully decoded barcode content based on the data corresponding to the successfully decoded barcode content and barcode coordinates recorded in the image metadata, and display the restored barcode content together with the similarity value and brightness value in the data structure.
[0083] Schematically, as shown in Figure 5, Figure 5 is a display diagram of the barcode content in the latest image displayed by the GUI layer provided in an embodiment of the present application; in Figure 5, the GUI layer can clearly display the successfully decoded barcode content, so that the staff can intuitively view the successfully decoded barcodes in the current barcode area.
[0084] In one embodiment, the barcode content in the latest image includes barcode content corresponding to the barcode and / or the QR code.
[0085] In this embodiment, as shown in FIG5 , the barcode content in the latest image may be the barcode content corresponding to the barcode, the barcode content corresponding to the QR code, or the barcode content corresponding to the barcode and the QR code, without limitation.
[0086] In one embodiment, as shown in FIG6 , FIG6 is a flow chart of a barcode parsing method provided in an embodiment of the present application; the present application also provides a barcode parsing method, which is applied to the barcode parsing system of any one of the above embodiments, and the method may include:
[0087] S110: The image preview status of the GUI layer is detected by the image acquisition module. After detecting that the GUI layer displays the relevant information of the latest image acquired last time, the latest image currently captured by the external camera is obtained, and the latest image is sent to the similarity brightness analysis module and the decoding module respectively.
[0088] S120: Analyze the similarity and brightness of the latest image using the similarity brightness analysis module, and send the similarity value and brightness value obtained by the analysis to the business processing layer.
[0089] S130: Decode the latest image using the decoding module, and send the barcode content, barcode coordinates, and image metadata in the latest image obtained after decoding to the business processing layer synchronously with the similarity value and brightness value obtained by the similarity brightness analysis module.
[0090] S140: Encapsulate the barcode content, barcode coordinates, image metadata, similarity value and brightness value in the latest received image into a data structure through the business processing layer, and send the data structure to the GUI layer.
[0091] S150: After selecting the successfully decoded barcode content and barcode coordinates in the data structure according to the image metadata frame in the data structure using the GUI layer, the successfully decoded barcode content, barcode coordinates and the similarity value and brightness value in the data structure are displayed.
[0092] In the above embodiment, the system includes an external camera and a host connected to the external camera, and the host is equipped with a host business logic running carrier, and the host business logic running carrier includes a picture acquisition module, a similarity brightness analysis module, a decoding module, a business processing layer and a GUI layer; wherein, the external camera of the present application can acquire the latest image of the barcode area in real time, and the latest image is a multi-barcode image. After detecting that the GUI layer displays the relevant information of the latest image acquired last time, the picture acquisition module acquires the latest image currently acquired by the external camera, and sends the latest image to the similarity brightness analysis module and the decoding module respectively; the present application sets the picture acquisition module to asynchronous loop processing, so that the time consumption of picture acquisition does not affect the main business logic; then, the similarity brightness analysis module of the present application can analyze the similarity and brightness of the latest image, and send the similarity value and brightness value obtained by the analysis to the business processing layer; the decoding module can decode the latest image, and send the barcode content, barcode coordinates and image elements in the latest image obtained after decoding. The data is sent synchronously with the similarity value and brightness value obtained by the similarity brightness analysis module to the business processing layer; the present application sends the latest image to the decoding module and the similarity brightness analysis module for processing respectively through the image acquisition module, and the decoding module and the similarity brightness analysis module are executed asynchronously, and synchronously wait for each other to complete the analysis before returning the data to the business processing layer. This not only solves the time-consuming accumulation problem of the traditional similarity brightness analysis module and the decoding module, but also solves the business processing layer's requirements for data integrity, ensuring the accuracy of information and the efficiency of barcode analysis; the business processing layer can encapsulate the barcode content, barcode coordinates, image metadata, similarity value and brightness value in the latest image received into a data structure, and send the data structure to the GUI layer; the GUI layer can select the successfully decoded barcode content and barcode coordinates in the data structure according to the image metadata in the data structure, and then display the successfully decoded barcode content, barcode coordinates and the similarity value and brightness value in the data structure. This process improves the processing logic of the image acquisition module, similarity brightness analysis module, and decoding module, so that the improved barcode parsing system can parse more image data per second. This can also solve the original GUI layer preview lag problem, thereby allowing low-cost, low-performance devices to effectively balance device performance and user experience in actual applications.
[0093] Finally, it should be noted that, in this document, relational terms such as first and second, etc., are used only to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any actual relationship or order between these entities or operations. Moreover, the terms "comprises," "comprising," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or device comprising a series of elements includes not only those elements, but also other elements not explicitly listed, or elements inherent to such process, method, article, or device. In the absence of further limitations, an element defined by the phrase "comprising a ..." does not exclude the presence of additional identical elements in the process, method, article, or device comprising the element.
[0094] The various embodiments in this specification are described in a progressive manner, and each embodiment focuses on the differences from other embodiments. The various embodiments can be combined as needed, and the same or similar parts can be referenced to each other.
[0095] The above description of the disclosed embodiments is intended to enable one skilled in the art to implement or use the present application. Various modifications to these embodiments will be readily apparent to one skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the present application. Therefore, the present application is not limited to the embodiments shown herein, but is intended to conform to the widest scope consistent with the principles and novel features disclosed herein.
Claims
1. A barcode analysis system, characterized in that: The system includes an external camera and a host connected to the external camera, wherein the host is equipped with a host business logic operation carrier, and the host business logic operation carrier includes an image acquisition module, a similarity brightness analysis module, a decoding module, a business processing layer and a GUI layer; The external camera is used to collect the latest image of the barcode area in real time; wherein the latest image is a plurality of barcode images; The image acquisition module is used to acquire the latest image currently captured by the external camera after detecting that the GUI layer displays the relevant information of the latest image acquired last time, and send the latest image to the similarity brightness analysis module and the decoding module respectively; The similarity brightness analysis module is used to analyze the similarity and brightness of the latest image, and send the similarity value and brightness value obtained by the analysis to the business processing layer; The decoding module is used to decode the latest image, and synchronously send the barcode content, barcode coordinates and image metadata in the latest image obtained after decoding, and the similarity value and brightness value obtained by the similarity brightness analysis module to the business processing layer; The business processing layer is used to encapsulate the barcode content, barcode coordinates, image metadata, similarity value and brightness value in the received latest image into a data structure, and send the data structure to the GUI layer; The GUI layer is used to select the successfully decoded barcode content and barcode coordinates in the data structure according to the image metadata frame in the data structure, and then display the successfully decoded barcode content, barcode coordinates and the similarity value and brightness value in the data structure.
2. The barcode analysis system according to claim 1, characterized in that: The external camera is configured not to cache each frame of the captured image.
3. The barcode analysis system according to claim 1, characterized in that: The similarity brightness analysis module is configured as follows: When there is no barcode in the latest image, the similarity value and brightness value of the latest image sent to the business processing layer are empty, and the business processing layer directly sends the latest image to the GUI layer for preview by the GUI layer.
4. The barcode analysis system according to claim 1 or 3, characterized in that: The decoding module is configured as follows: When there is no barcode in the latest image, the barcode content, barcode coordinates and image metadata of the latest image sent to the business processing layer are empty. The business processing layer directly sends the latest image to the GUI layer for preview by the GUI layer.
5. The barcode analysis system according to claim 1, characterized in that: The business processing layer is configured as follows: The similarity value and brightness value of the received latest image are compared with the similarity value and brightness value of the previous image, and when it is determined that the latest image and the previous image are the same image, the data structure of the previous image is directly sent to the GUI layer.
6. The barcode analysis system according to claim 1, characterized in that: The process of the business processing layer encapsulating the barcode content, barcode coordinates, image metadata, similarity value and brightness value in the received latest image into a data structure includes: The business processing layer converts the barcode content, barcode coordinates, similarity value and brightness value in the latest image received into an array form, and encapsulates the array form of barcode content, barcode coordinates, similarity value and brightness value with the image metadata into a data structure.
7. The barcode analysis system according to claim 1, characterized in that: The process of the GUI layer selecting the successfully decoded barcode content and barcode coordinates in the data structure according to the image metadata frame in the data structure includes: The GUI layer determines the successfully decoded barcode content and barcode coordinates, as well as the undecoded barcode content and barcode coordinates in the data structure according to the image metadata in the data structure, and selects the successfully decoded barcode content and barcode coordinates.
8. The barcode analysis system according to claim 1, characterized in that: The process of the GUI layer displaying the successfully decoded barcode content, barcode coordinates, and the similarity value and brightness value in the data structure includes: The GUI layer restores the successfully decoded barcode content in the structural data according to the image metadata and the successfully decoded barcode coordinates, and displays the restored barcode content and the similarity value and brightness value in the data structure.
9. The barcode analysis system according to any one of claims 1 to 8, characterized in that: The barcode content in the latest image includes the barcode and / or the barcode content corresponding to the two-dimensional code.
10. A barcode analysis method, applied to the barcode analysis system according to any one of claims 1 to 9, characterized in that: The method comprises: The image preview of the GUI layer is detected by the image acquisition module, and after detecting that the GUI layer displays the relevant information of the latest image acquired last time, the latest image currently acquired by the external camera is acquired, and the latest image is sent to the similarity brightness analysis module and the decoding module respectively; Utilizing the similarity brightness analysis module to analyze the similarity and brightness of the latest image, and sending the similarity value and brightness value obtained by the analysis to the business processing layer; Decoding the latest image using the decoding module, and synchronously sending the barcode content, barcode coordinates and image metadata in the latest image obtained after decoding, and the similarity value and brightness value obtained by parsing in the similarity brightness parsing module to the business processing layer; Encapsulating the barcode content, barcode coordinates, image metadata, similarity value and brightness value in the received latest image into a data structure through the business processing layer, and sending the data structure to the GUI layer; After the successfully decoded barcode content and barcode coordinates in the data structure are selected by the GUI layer according to the image metadata frame in the data structure, the successfully decoded barcode content, barcode coordinates and the similarity value and brightness value in the data structure are displayed.
Citation Information
Patent Citations
Chinese-sensible code barcode decoding chip and decoding method thereof
CN101882211A
A method for enhancing the display of item information based on barcodes
CN102299898A
Batch bar code positioning method and identification system
CN112183148A
Bar code reading method and device based on image feature region trigger reading
CN114373067A
Barcode detection method and device, barcode detection equipment and readable storage medium
CN115860026A
Cited By
Barcode recognition method and device
CN119692376A