One-dimensional code recognition method and device, electronic equipment and storage medium

By combining multi-scale and character region recognition with a fusion algorithm, the problems of low recognition rate and high error rate when one-dimensional barcodes are damaged or incomplete are solved, achieving more efficient recognition and verification.

CN115983303BActive Publication Date: 2026-04-07FUZHOU ROCKCHIP SEMICON
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-01-04
Publication Date
2026-04-07

AI Technical Summary

Technical Problem

One-dimensional barcodes have a low recognition rate when they are damaged or incomplete, and the lack of an effective verification mechanism leads to a high error rate in the scanning results.

Method used

By performing multi-scale recognition on one-dimensional barcode images, character regions are identified and multi-layer convolutional neural networks are used, combined with fusion algorithms such as bit-by-bit voting or bit-by-bit weighted averaging, to fuse the multi-scale and character region recognition results.

Benefits of technology

It improves the accuracy of barcode recognition results, reduces the error rate, and saves computing resources by pre-judging and discarding low-quality images, thereby improving scanning efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115983303B_ABST
    Figure CN115983303B_ABST
Patent Text Reader

Abstract

The application provides a one-dimensional code recognition method and device, an electronic device and a storage medium. The method comprises the following steps: performing multi-scale recognition on a one-dimensional code image obtained to obtain a first recognition result; recognizing a character region in the one-dimensional code image to obtain a second recognition result; and performing result fusion on the first recognition result and the second recognition result through a fusion algorithm to obtain a recognition result of the one-dimensional code image; the recognition rate of the one-dimensional code when the one-dimensional code is polluted or incomplete can be effectively improved; meanwhile, the one-dimensional code recognition is effectively verified, and the error rate of a scanning result is reduced.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of barcode recognition technology, and particularly to barcode recognition methods and apparatus, electronic devices and storage media. Background Technology

[0002] Since the emergence of QR codes, their usage in personal consumption, consumer finance, and mobile payments has been increasing, leading to a narrowing of the application scope of barcodes. However, with the increasing prevalence of highly automated and intelligent application scenarios such as smart cities, smart communities, smart power plants, smart supermarkets, smart factories, and smart warehousing, barcodes continue to shine in these fields.

[0003] In related technologies, the scanning and recognition rate is low when the barcode is damaged or incomplete. Furthermore, the lack of an effective verification mechanism leads to a high error rate in the scanning results. Summary of the Invention

[0004] This application provides a one-dimensional barcode recognition method and apparatus, electronic device and storage medium, which can effectively improve the accuracy of one-dimensional barcode recognition results.

[0005] In a first aspect, a one-dimensional barcode recognition method is provided. The method includes: performing multi-scale recognition on an acquired one-dimensional barcode image to obtain a first recognition result; recognizing character regions in the one-dimensional barcode image to obtain a second recognition result; and fusing the first recognition result and the second recognition result using a fusion method to obtain a recognition result for the one-dimensional barcode image.

[0006] In some embodiments, performing multi-scale recognition on the acquired barcode image to obtain a first recognition result includes: generating multiple barcode images of different scales based on the barcode image; dividing each barcode image of different scales into multiple sub-regions; recognizing each barcode image of different scales and its corresponding sub-region to obtain a multi-scale recognition result; and determining the first recognition result based on all multi-scale recognition results.

[0007] In some embodiments, recognizing character regions in the one-dimensional barcode image to obtain a second recognition result includes: recognizing character regions in the one-dimensional barcode image through a multi-layer convolutional neural network to obtain a second recognition result associated with the recognized characters.

[0008] In some embodiments, fusing the first recognition result and the second recognition result to obtain the recognition result of the barcode image by a fusion method includes: calculating the fused first recognition result and the second recognition result by a bitwise voting method or a bitwise weighted average method to obtain the recognition result of the barcode image.

[0009] In some embodiments, the method further includes: acquiring the barcode image, wherein acquiring the barcode image includes: determining whether the acquired barcode image is a qualified image; and if the determination result is negative, discarding the barcode image.

[0010] In some embodiments, determining whether the acquired barcode image is a qualified image includes: obtaining the start code and peak signal-to-noise ratio of the barcode image; and determining whether the barcode image is a qualified image based on the start code and the peak signal-to-noise ratio.

[0011] In some embodiments, obtaining the barcode image further includes: if the determination result is yes, performing image preprocessing on the qualified image, wherein performing image preprocessing on the qualified image includes: recognizing the qualified image to determine the region where the barcode is located in the qualified image; performing gradient correction on the qualified image according to the region where the barcode is located, and cropping the gradient-corrected qualified image; and using an image filter to filter noise from the cropped image to obtain the barcode image after image preprocessing.

[0012] Secondly, embodiments of the present invention provide a one-dimensional barcode recognition device. The device includes: an acquisition module configured to acquire a one-dimensional barcode image; a multi-scale recognition module configured to perform multi-scale recognition on the one-dimensional barcode image to obtain a first recognition result; a verification recognition module configured to recognize character regions in the one-dimensional barcode image to obtain a second recognition result; and a fusion module configured to fuse the first recognition result and the second recognition result using a fusion method to obtain a recognition result for the one-dimensional barcode image.

[0013] Thirdly, embodiments of the present invention provide an electronic device. The electronic device includes: a memory configured to store a computer program; and a processor configured to invoke the computer program to execute the one-dimensional code recognition method as described above.

[0014] Fourthly, embodiments of the present invention provide a computer-readable storage medium having a computer program stored thereon, wherein the computer program, when executed, implements the one-dimensional code recognition method as described above.

[0015] According to embodiments of this disclosure, by performing multi-scale recognition on a barcode image, the recognition rate can be effectively improved when the barcode image is damaged or incomplete. By performing secondary recognition on the character regions in the barcode image and by using a fusion algorithm to fuse the multi-scale recognition results and the secondary character region recognition results into optimized barcode recognition information, the accuracy of the barcode recognition results can be effectively improved.

[0016] The above description of the invention is merely an overview of the technical solution of this application. In order to enable those skilled in the art to better understand the technical solution of this application and to implement it based on the description and drawings, and to make the above-mentioned objectives and other objectives, features and advantages of this application easier to understand, the following description is provided in conjunction with the specific embodiments and drawings of this application. Attached Figure Description

[0017] The accompanying drawings are only used to illustrate the principles, implementation methods, applications, features, and effects of specific embodiments of this application and other related content, and should not be considered as limitations on this application. In the accompanying drawings:

[0018] Figure 1 This is a flowchart illustrating a barcode recognition method according to an embodiment of the present disclosure;

[0019] Figure 2 This is a flowchart illustrating a barcode recognition method according to another embodiment of the present disclosure;

[0020] Figure 3 This is a block diagram illustrating a barcode recognition device according to an embodiment of the present disclosure. Detailed Implementation

[0021] To illustrate the possible application scenarios, technical principles, implementable specific solutions, and achievable objectives and effects of this application in detail, the following description, in conjunction with the listed specific embodiments and accompanying drawings, provides a detailed explanation. The embodiments described herein are merely illustrative of the technical solutions of this application and are therefore intended to limit the scope of protection of this application.

[0022] In this document, the term "embodiment" means that a specific feature, structure, or characteristic described in connection with an embodiment may be included in at least one embodiment of this application. The term "embodiment" appearing in various places throughout the specification does not necessarily refer to the same embodiment, nor does it specifically limit its independence or connection with other embodiments. In principle, in this application, as long as there are no technical contradictions or conflicts, the technical features mentioned in each embodiment can be combined in any way to form corresponding implementable technical solutions.

[0023] Unless otherwise defined, the technical terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this application pertains; the use of related terms herein is merely for the purpose of describing particular embodiments and is not intended to limit this application.

[0024] In the description of this application, the term "and / or" is used to describe the logical relationship between objects, indicating that three relationships can exist. For example, A and / or B means: A exists, B exists, and A and B exist simultaneously. Additionally, the character " / " in this document generally indicates that the preceding and following objects have an "or" logical relationship.

[0025] In this application, terms such as “first” and “second” are used only to distinguish one entity or operation from another, and do not necessarily require or imply any actual quantity, hierarchy or order relationship between these entities or operations.

[0026] Unless otherwise specified, the use of terms such as “comprising,” “including,” “having,” or other similar expressions in this application is intended to cover non-exclusive inclusion, which does not exclude the presence of additional elements in a process, method, or product that includes the stated elements, such that a process, method, or product that includes a list of elements may include not only those defined elements but also other elements not expressly listed, or elements inherent to such a process, method, or product.

[0027] In this application, expressions such as "greater than", "less than", and "exceeding" are understood to exclude the stated number; expressions such as "above", "below", and "within" are understood to include the stated number. Furthermore, in the description of the embodiments of this application, "multiple" means two or more (including two), and similar expressions related to "multiple" are also understood in this way, such as "multiple groups" and "multiple times", unless otherwise explicitly specified.

[0028] As mentioned in the background section, the barcode scanning method simply uses a preset barcode algorithm to perform traditional recognition of the acquired barcode. In this way, if the barcode is damaged or incomplete, the barcode scanning device cannot obtain the recognition result using the preset algorithm, resulting in repeated scanning of the current barcode, leading to low recognition efficiency and wasted computing resources. Furthermore, the lack of an effective verification mechanism for barcodes and the absence of further verification of the recognition results result in a high error rate. In addition, the existing conventional practice is to directly use a check digit to verify the correctness of the recognized barcode information.

[0029] In this application, multi-scale recognition of the acquired one-dimensional barcode image is performed to obtain the multi-scale recognition result of the one-dimensional barcode. Character regions within the one-dimensional barcode image are then recognized to obtain the check digit recognition result. Finally, a fusion method is used to fuse the multi-scale recognition result and the check digit recognition result to obtain an optimized one-dimensional barcode recognition result. This application does not directly use the check digit recognition result to verify the one-dimensional barcode; instead, an optimized fusion method is used to fuse the multi-scale recognition result and the check digit recognition result into an optimized one-dimensional barcode information. This approach effectively improves the accuracy of the one-dimensional barcode recognition result and reduces the error rate.

[0030] Furthermore, in some embodiments, the barcode recognition method proposed in this application also performs a rapid pre-judgment after acquiring the barcode image to determine whether the acquired barcode image is a qualified barcode image; if it is unqualified, it is directly discarded. In this way, low-quality images are discarded, which can effectively save computing resources and improve scanning efficiency.

[0031] The following detailed description of embodiments according to the present disclosure will be made with reference to exemplary models and in conjunction with the accompanying drawings.

[0032] Figure 1 This is a flowchart illustrating a one-dimensional barcode recognition method 100 according to an embodiment of the present invention. Figure 1 As shown, the barcode recognition method 100 includes the following steps S101 to S103.

[0033] In step S101, multi-scale recognition is performed on the acquired one-dimensional barcode image to obtain a first recognition result. In some embodiments, the one-dimensional barcode image is recognized based on a multi-scale algorithm to output a multi-scale recognition result for the one-dimensional barcode. In some embodiments, multiple one-dimensional barcode images at different scales are generated based on the one-dimensional barcode image, and each one-dimensional barcode image at a different scale is divided into multiple sub-regions. Then, each one-dimensional barcode image at a different scale and its corresponding sub-region are recognized to obtain a multi-scale recognition result. Finally, the first recognition result is determined based on all the multi-scale recognition results.

[0034] As an example, after obtaining the one-dimensional barcode image, a 0.8-scale one-dimensional barcode image can be generated from the original one-dimensional barcode image. The original one-dimensional barcode image and the 0.8-scale one-dimensional barcode image are one-dimensional barcode images of different scales. Next, the original one-dimensional barcode image is divided into N sub-regions, and the 0.8-scale one-dimensional barcode image is also divided into N sub-regions. Then, the original one-dimensional barcode image and its corresponding N sub-regions are identified separately, and the 0.8-scale one-dimensional barcode image and its corresponding N sub-regions are identified separately to obtain the corresponding multi-scale recognition results. Finally, the first recognition result is determined based on the multi-scale recognition results obtained from both.

[0035] It should be understood that there are multiple ways to determine the first identification result based on all multi-scale identification results. As one example, one could obtain the byte length corresponding to each multi-scale identification result and use the multi-scale identification result with the largest byte length as the first identification result. Another example could be to count the occurrence frequency of each multi-scale identification result among all multi-scale identification results and use the multi-scale identification result with the highest occurrence frequency as the first identification result.

[0036] In step S102, character regions in the one-dimensional barcode image are identified to obtain a second recognition result. In some embodiments, character regions in the one-dimensional barcode image are identified using a multi-layer convolutional neural network to output the check digit recognition result of the one-dimensional barcode. In some embodiments, character regions in the one-dimensional barcode image are identified using a multi-layer convolutional neural network to obtain a second recognition result associated with the identified characters. In some embodiments, number and / or letter regions in the one-dimensional barcode image are identified using a multi-layer convolutional neural network to obtain a second recognition result associated with the identified numbers and / or letters.

[0037] As an example, after obtaining a qualified barcode image, the barcode image can be recognized to determine the character regions within it. Next, the character regions are cropped, and the cropped character regions are recognized using an NPU-based algorithm to obtain a second recognition result associated with the corresponding character. In some embodiments, the NPU-based algorithm is preferably a multi-layer convolutional neural network. In some embodiments, the character regions may include numbers and / or letters. The multi-layer convolutional neural network is capable of recognizing numbers and letters using low-level / mid-level and high-level features for number / letter recognition.

[0038] In step S103, the first recognition result and the second recognition result are fused using a fusion method to obtain the recognition result of the one-dimensional barcode image. In some embodiments, the fused first recognition result and the second recognition result are calculated using a fusion method to obtain the recognition result of the one-dimensional barcode image. In some embodiments, the fusion algorithm is a bit-by-bit voting method or a bit-by-bit weighted average method.

[0039] In some embodiments, the multi-scale recognition results of the one-dimensional code and the check code recognition results of the one-dimensional code are fused together using a fusion method to calculate an optimized one-dimensional code recognition result.

[0040] In other words, in the embodiments of this application, instead of using the second recognition result to directly verify the first recognition result as in the traditional way, a fusion algorithm is used to fuse the results of multiple one-dimensional code information to obtain the optimal solution, thereby improving the accuracy of the final recognition result.

[0041] In some embodiments, the one-dimensional barcode recognition method 100 may further include acquiring a one-dimensional barcode image. In some embodiments, acquiring the one-dimensional barcode image includes determining whether the one-dimensional barcode image is a qualified image; if not, the one-dimensional barcode image is discarded. In some embodiments, the starting code and peak signal-to-noise ratio (PSNR) of the one-dimensional barcode image are acquired, and the one-dimensional barcode image is determined as a qualified image based on the starting code and PSNR. In this way, the acquired one-dimensional barcode images can be effectively filtered to remove low-quality one-dimensional barcode images, thereby saving computing resources and improving one-dimensional barcode scanning efficiency.

[0042] In some embodiments, acquiring a barcode image further includes performing image preprocessing on the qualified image if it is determined to be a valid image. In some embodiments, image preprocessing may include: recognizing the qualified image to determine the region where the barcode is located; performing gradient correction on the qualified image based on the region where the barcode is located, and cropping the gradient-corrected qualified image; and using an image filter to filter noise from the cropped image to complete the image preprocessing. This further preprocessing of the qualified image can effectively improve image quality, thereby further improving the success rate of barcode recognition.

[0043] In some embodiments, image preprocessing of a qualified image includes: identifying the qualified image to determine the region where the barcode is located in the qualified image; performing gradient correction on the qualified image based on the region where the barcode is located, and cropping the gradient-corrected qualified image; and using an image filter to filter noise in the cropped image to obtain a barcode image after image preprocessing.

[0044] According to embodiments of the present invention, a multi-scale recognition result of a one-dimensional barcode image is obtained by using a multi-scale algorithm; a check digit recognition result of the one-dimensional barcode is obtained by using a multi-layer convolutional neural network for the character regions in the one-dimensional barcode image; and an optimized one-dimensional barcode recognition result is calculated by fusing the multi-scale recognition result and the check digit recognition result of the one-dimensional barcode using a fusion method. In this application, the check digit recognition result is not directly used to verify the one-dimensional barcode; instead, an optimized fusion method is used to fuse the multi-scale recognition result and the check digit recognition result of the one-dimensional barcode into an optimized one-dimensional barcode recognition information. In this way, the accuracy of the one-dimensional barcode recognition result can be effectively improved, and the error rate of the one-dimensional barcode recognition result can be reduced.

[0045] Figure 2 This is a flowchart illustrating a one-dimensional barcode recognition method 200 according to an embodiment of the present invention. In a specific embodiment of the present invention, such as... Figure 2 As shown, the one-dimensional barcode recognition method 200 includes the following steps S201 to S213.

[0046] In step S201, a one-dimensional barcode image is obtained.

[0047] In step S202, the start code and peak signal-to-noise ratio of the one-dimensional code image are obtained.

[0048] In step S203, the one-dimensional code image is determined to be a qualified image based on the start code and peak signal-to-noise ratio; if not, step S204 is executed; if yes, step S205 is executed.

[0049] In step S204, the barcode image is discarded.

[0050] In step S205, the barcode image is identified to determine the region where the barcode is located in the barcode image.

[0051] In step S206, gradient correction is performed on the one-dimensional barcode image based on the region where the barcode is located, and the gradient-corrected one-dimensional barcode image is then cropped.

[0052] In step S207, an image filter is used to filter noise from the cropped one-dimensional barcode image.

[0053] In step S208, multiple one-dimensional barcode images of different scales are generated based on the one-dimensional barcode image.

[0054] In step S209, each one-dimensional barcode image at different scales is divided into multiple sub-regions.

[0055] In step S210, the one-dimensional barcode image at each different scale and the corresponding sub-region are identified to obtain multi-scale recognition results.

[0056] In step S211, the first recognition result is determined based on all multi-scale recognition results.

[0057] In step S212, the character regions in the one-dimensional barcode image are identified to obtain a second identification result.

[0058] In step S213, the first recognition result and the second recognition result are fused according to the fusion algorithm to obtain the final recognition result of the one-dimensional code image.

[0059] In summary, the barcode recognition method according to embodiments of the present invention first acquires a barcode image and performs multi-scale recognition on the barcode image to obtain a first recognition result. Next, character regions in the barcode image are recognized to obtain a second recognition result. Then, the first and second recognition results are fused using a fusion algorithm to obtain the final recognition result of the barcode image. This method effectively improves the recognition rate when barcodes are damaged or incomplete, while also providing effective verification of barcode recognition and reducing the error rate of scanning results.

[0060] In another aspect of the present invention, a one-dimensional barcode recognition device is proposed. Figure 3 This is a block diagram illustrating a barcode recognition device 300 according to an embodiment of the present disclosure. Figure 3 As shown, the barcode recognition device 300 includes an acquisition module 301, a multi-scale recognition module 302, a verification and recognition module 303, and a fusion module 304.

[0061] The acquisition module 301 is configured to acquire a one-dimensional barcode image.

[0062] The multi-scale recognition module 302 is configured to perform multi-scale recognition on the one-dimensional barcode image to obtain a first recognition result.

[0063] The verification and recognition module 303 is configured to recognize the character regions in the one-dimensional barcode image to obtain a second recognition result.

[0064] The fusion module 304 is configured to fuse the first recognition result and the second recognition result according to the fusion algorithm to obtain the final recognition result of the one-dimensional code image.

[0065] In some embodiments, the acquisition module 301 includes a pre-judgment module. The pre-judgment module is configured to determine whether the one-dimensional barcode image is a qualified image, and discard the one-dimensional barcode image if it is not a qualified image. In some embodiments, the pre-judgment module is further configured to acquire the start code and peak signal-to-noise ratio of the one-dimensional barcode image, so as to determine whether the one-dimensional barcode image is a qualified image based on the start code and peak signal-to-noise ratio.

[0066] In some embodiments, the multi-scale recognition module 302 is configured to: generate multiple one-dimensional barcode images of different scales based on the one-dimensional barcode image; divide each one-dimensional barcode image of different scales into multiple sub-regions; recognize each one-dimensional barcode image of different scales and the corresponding sub-regions to obtain a multi-scale recognition result; and determine a first recognition result based on all multi-scale recognition results.

[0067] In some embodiments, the verification and recognition module 303 is configured to recognize the character regions in a one-dimensional barcode image through a multi-layer convolutional neural network, so as to use the recognized characters as a second recognition result.

[0068] In some embodiments, the fusion algorithm is a bitwise voting method or a bitwise weighted average method.

[0069] In some embodiments, the acquisition module 301 further includes a preprocessing module. The preprocessing module is configured to perform image preprocessing on the qualified image when the one-dimensional barcode is a qualified image.

[0070] In some embodiments, the preprocessing module is configured to: identify qualified images to determine the region where the barcode is located in the qualified images; perform gradient correction on the qualified images based on the region where the barcode is located, and crop the qualified images after gradient correction; and use an image filter to filter noise in the cropped images to complete image preprocessing.

[0071] It should be noted that the above regarding Figure 1 The description of the barcode recognition method also applies to the barcode recognition device 300. Each module of the barcode recognition device 300 can be configured to execute the corresponding steps or actions in the barcode recognition method, which will not be elaborated here.

[0072] In summary, the barcode recognition device according to the embodiments of the present invention fuses the first recognition result and the second recognition result to obtain the final recognition result of the barcode image, thereby effectively improving the recognition rate when the barcode is damaged or incomplete, and effectively verifying the barcode recognition to reduce the error rate of the scanning result.

[0073] In another aspect of the invention, an electronic device is also provided. The electronic device includes a memory and a processor. The memory is configured to store a computer program. The processor is communicatively connected to the memory and is configured to invoke the computer program to perform various steps or actions in the method described above.

[0074] In another aspect of the invention, a computer-readable storage medium is also provided, on which a computer program is stored. The computer program is executed by a processor to perform the various steps or actions in the method described above.

[0075] The electronic device and computer-readable storage medium according to embodiments of the present invention can effectively improve the recognition rate of barcodes when they are damaged or incomplete, and at the same time perform effective verification of barcode recognition, reducing the error rate of scanning results.

[0076] Finally, it should be noted that although the above embodiments have been described in the text and drawings of this application, this should not limit the scope of patent protection of this application. Any technical solutions that are based on the essential concept of this application and utilize the content described in the text and drawings of this application, resulting in equivalent structural or procedural substitutions or modifications, as well as the direct or indirect application of the technical solutions of the above embodiments to other related technical fields, are all included within the scope of patent protection of this application.

Claims

1. A one-dimensional barcode recognition method, characterized in that, include: The acquired one-dimensional barcode image is subjected to multi-scale recognition to obtain the first recognition result; The character regions in the one-dimensional barcode image are identified to obtain a second identification result; as well as The recognition result of the one-dimensional code image is obtained by fusing the first recognition result and the second recognition result using a fusion method. The first recognition result is obtained by performing multi-scale recognition on the acquired one-dimensional barcode image, including: Generate multiple one-dimensional barcode images of different scales based on the one-dimensional barcode image; Each one-dimensional barcode image at a different scale is divided into multiple sub-regions; The one-dimensional barcode image at each different scale and its corresponding sub-region are identified to obtain multi-scale recognition results; and The first recognition result is determined based on all multi-scale recognition results.

2. The one-dimensional barcode recognition method as described in claim 1, characterized in that, The process of identifying character regions in the one-dimensional barcode image to obtain a second identification result includes: The character regions in the one-dimensional code image are identified by a multi-layer convolutional neural network to obtain a second recognition result associated with the identified characters.

3. The one-dimensional barcode recognition method as described in claim 1, characterized in that, The recognition result of the one-dimensional code image is obtained by fusing the first recognition result and the second recognition result using a fusion method, including: The first and second recognition results are calculated by using a bitwise voting method or a bitwise weighted average method to obtain the recognition result of the one-dimensional code image.

4. The one-dimensional barcode recognition method as described in claim 1, characterized in that, Also includes: Obtaining the one-dimensional barcode image, wherein obtaining the one-dimensional barcode image includes: Determine whether the acquired barcode image is a qualified image; as well as If the result is negative, the barcode image is discarded.

5. The one-dimensional barcode recognition method as described in claim 4, characterized in that, Determining whether the acquired barcode image is a valid image includes: Obtain the start code and peak signal-to-noise ratio of the one-dimensional code image; and The validity of the one-dimensional barcode image is determined based on the start code and the peak signal-to-noise ratio.

6. The one-dimensional barcode recognition method as described in claim 4, characterized in that, Obtaining the one-dimensional barcode image further includes: If the judgment result is yes, perform image preprocessing on the qualified image. Image preprocessing for qualified images includes: The qualified image is identified to determine the region where the barcode is located in the qualified image; Gradient correction is performed on the qualified image based on the region where the barcode is located, and the qualified image after gradient correction is cropped; and Image filters are used to filter noise from the cropped image to obtain a pre-processed one-dimensional barcode image.

7. A one-dimensional barcode recognition device, characterized in that, include: The acquisition module is configured to acquire one-dimensional barcode images; A multi-scale recognition module is configured to perform multi-scale recognition on the one-dimensional barcode image to obtain a first recognition result; The verification and recognition module is configured to recognize the character regions in the one-dimensional barcode image to obtain a second recognition result; as well as The fusion module is configured to fuse the first recognition result and the second recognition result using a fusion method to obtain the recognition result of the one-dimensional code image; The first recognition result is obtained by performing multi-scale recognition on the acquired one-dimensional barcode image, including: Generate multiple one-dimensional barcode images of different scales based on the one-dimensional barcode image; Each one-dimensional barcode image at a different scale is divided into multiple sub-regions; The one-dimensional barcode image at each different scale and its corresponding sub-region are identified to obtain multi-scale recognition results; and The first recognition result is determined based on all multi-scale recognition results.

8. An electronic device, characterized in that, include: Memory, configured to store computer programs; as well as The processor is configured to invoke the computer program to execute the one-dimensional code recognition method according to any one of claims 1 to 6.

9. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed, it implements the one-dimensional code recognition method as described in any one of claims 1 to 6.

Citation Information

Patent Citations

  • Method and device for identifying bar code in picture

    CN110490022A

  • Two-dimensional code recognition method and device, computer equipment and readable storage medium

    CN111611821A