Bar code identification method and system based on visual system, and storage medium

By using multiple light source devices and image acquisition devices in the visual system to acquire and fuse multiple images, the problem of barcode recognition in the prior art has a great impact on light sources, and the accuracy and efficiency of barcode recognition in complex environments are achieved.

CN119600392APending Publication Date: 2025-03-11GUANGZHOU SHIYUAN ELECTRONICS CO LTD +1
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202311168422.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-09-11
Publication Date
2025-03-11

AI Technical Summary

Technical Problem

The existing visual code scanning technology has a great impact on the material of the barcode and the external light source, resulting in inaccurate identification of barcodes for reflective products.

Method used

Using a barcode recognition method based on a vision system, multiple images of the target product are collected through an image acquisition device and a plurality of light source devices, and the light source device emits a light source using the target mode, irradiate the target product in different ways, fuse multiple images to improve image clarity, and identify the barcode area in the fused image.

Benefits of technology

It realizes the accuracy of barcode recognition in complex environments such as reflective products, and improves the recognition efficiency and accuracy.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119600392A_ABST
    Figure CN119600392A_ABST
Patent Text Reader

Abstract

The invention provides a bar code recognition method and system based on a visual system and a storage medium. The identification of the target product is determined by means of a visual system. The visual system comprises an image acquisition device and N light source devices, and the target product has a corresponding bar code area. And in the process of controlling part of the light source devices in the N light source devices to emit light sources in various modes, acquiring a plurality of images of the target product through an image acquisition device in the visual system. That is to say, part of the N light source devices are controlled to emit light sources in multiple modes, so that multiple images of the target product can be obtained under multiple different illuminations. Therefore, the clearness of the same image area in the plurality of obtained images is different through the above mode. The plurality of images are fused to obtain a fused image with each image area being clear, so that the identification of the target product can be accurately obtained after the barcode area in the fused image is identified.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of barcode detection, and more specifically, to a barcode recognition method, system and storage medium based on a visual system in the field of barcode detection. Background Art

[0002] With the rapid development of modern production, barcodes (QR codes / barcodes) are particularly important. In the production process of products, the barcodes of products are usually scanned to record the products.

[0003] In the related art, the traditional visual code scanning method is usually used to scan batches of products. However, the visual code scanning method is sensitive to the material of the barcode and the influence of external light sources. Therefore, to a certain extent, the visual code scanning method cannot accurately obtain the product identification, especially for products with reflective surfaces, such as products with laser engraved codes. Summary of the invention

[0004] The present application provides a barcode recognition method, system and storage medium based on a visual system, which can accurately determine the identification of a target product.

[0005] In a first aspect, a barcode recognition method based on a visual system is provided, wherein the visual system comprises an image acquisition device and N light source devices, wherein the light sources emitted by the N light source devices can illuminate the target product, and the target product has a corresponding barcode area, wherein N is a positive integer and is greater than 1, and wherein the method comprises: in a process of controlling the N light source devices in a target mode, acquiring multiple images of the target product by the image acquisition device, wherein the target mode refers to controlling some of the N light source devices to emit light in multiple ways, with one image corresponding to one way; fusing the multiple images to obtain a fused image; and identifying the barcode area in the fused image to obtain an identification of the target product.

[0006] In the above technical solution, the identification of the target product is determined with the help of a visual system. The visual system includes an image acquisition device and N light source devices, and the target product has a corresponding barcode area. In the process of controlling some of the N light source devices to emit light in a variety of ways, multiple images of the target product are acquired by the image acquisition device in the visual system. That is to say, controlling some of the N light source devices to emit light in a variety of ways can enable multiple images of the target product to be acquired under a variety of different lighting conditions. Therefore, through the above method, the clarity of the same image area in the multiple images obtained is different. By fusing the multiple images, a fused image in which each image area is clear can be obtained, so that after identifying the barcode area in the fused image, the identification of the target product can be accurately obtained.

[0007] In combination with the first aspect, in some possible implementations, a method for controlling N light source devices in a target mode includes: sequentially controlling M of the N light source devices to emit light sources, and when M of the N light source devices emit light sources, controlling other light source devices not to emit light sources, where M is less than N and is a positive integer.

[0008] In the above technical solution, when M of the N light source devices are sequentially controlled to emit light, and when M of the N light source devices are emitting light, the other light source devices are controlled not to emit light, and the directions of illumination of the target product are different (different light sources illuminate the target product at different distances). When the barcode area is close to the light source, the reflectivity of the target product to the light source is very high, resulting in the collected image not being clear; when the barcode area is far from the light source, the reflectivity of the target product to the light source is very low, resulting in the collected image being relatively clear. Therefore, through the above method, the clarity of the same image area in the multiple images collected by the image acquisition device is different. Therefore, after the multiple images are fused, a fused image with clear image areas can be obtained, and then the barcode area in the fused image can be identified, so that the identification of the target product can be obtained more accurately.

[0009] In combination with the first aspect and the above-mentioned implementation methods, in some possible implementation methods, M light source devices among the N light source devices are controlled in sequence to emit light sources, and when M light source devices among the N light source devices emit light sources, other light source devices are controlled not to emit light sources, including any of the following items: when M is equal to 1, one light source device among the N light source devices is controlled in sequence to emit light sources, and when one light source device among the N light source devices emits light sources, other light source devices are controlled not to emit light sources; when M is greater than 1 and the M light source devices are adjacent light source devices, the M adjacent light source devices are controlled in sequence to emit light sources, and when the M adjacent light source devices emit light sources, other light source devices are controlled not to emit light sources; when M is greater than 1 and the M light source devices are non-adjacent light source devices, the M non-adjacent light source devices are controlled in sequence to emit light sources, and when the M non-adjacent light source devices emit light sources, other light source devices are controlled not to emit light sources.

[0010] In the above technical solution, some of the N light source devices are controlled to emit light sources in three modes. Specifically, in mode 1, one of the N light source devices is controlled to emit light sources in sequence, and when one of the N light source devices emits light sources, other light source devices are controlled not to emit light sources; in mode 2, the M adjacent light source devices are controlled to emit light sources in sequence, and when the M adjacent light source devices emit light sources, other light source devices are controlled not to emit light sources; in mode 3, the M non-adjacent light source devices are controlled to emit light sources in sequence, and when the M non-adjacent light source devices emit light sources, other light source devices are controlled not to emit light sources.

[0011] In combination with the first aspect and the above-mentioned implementation methods, in some possible implementation methods, the multiple images are fused to obtain a fused image, including: performing grayscale processing on the multiple images to obtain multiple grayscale images; determining the maximum grayscale value corresponding to multiple pixels at the same position in the multiple grayscale images; and determining the grayscale image composed of the multiple maximum grayscale values ​​as the fused image.

[0012] In the above technical solution, a grayscale image composed of the maximum grayscale values ​​corresponding to multiple pixels at the same position in multiple grayscale images is determined as the fused image. Since the grayscale value is also called the brightness value, the brightness value is used to represent the brightness of the pixel. For this, the fused image composed of multiple maximum grayscale values ​​can effectively highlight the brightness change of the target product, so that the brightness range of the barcode area in the fused image is larger. Therefore, the identification of the target product can be accurately determined based on the fused image.

[0013] In combination with the first aspect and the above-mentioned implementation manner, in some possible implementation manners, the multiple grayscale images include a first grayscale image, a second grayscale image, and a third grayscale image, and determining the maximum grayscale value corresponding to multiple pixels at the same position in the multiple grayscale images includes: for a first grayscale value of a pixel at any position in the first grayscale image, comparing the first grayscale value with a second grayscale value, the second grayscale value being a grayscale value corresponding to the same position as the pixel in the second grayscale image; if the second grayscale value is greater than the first grayscale value, comparing the first grayscale value with a second grayscale value; The first grayscale value of the pixel in the first grayscale image is replaced by the second grayscale value; the second grayscale value of the pixel in the first grayscale image is compared with a third grayscale value, the third grayscale value being the grayscale value corresponding to the same position as the pixel in the third grayscale image; when the third grayscale value is greater than the second grayscale value, the third grayscale value is determined as the maximum grayscale value corresponding to the pixel at that position; when the third grayscale value is less than or equal to the second grayscale value, the second grayscale value is determined as the maximum grayscale value corresponding to the pixel at that position.

[0014] In the above technical solution, taking a plurality of grayscale images including a first grayscale image, a second grayscale image and a third grayscale image as an example, a process of determining the maximum grayscale value corresponding to a plurality of pixels at the same position in the plurality of grayscale images is described. This is equivalent to comparing the first grayscale value of a pixel at any position in the first grayscale image with the second grayscale value corresponding to the same position as the pixel in the second grayscale image; when the second grayscale value is greater than the first grayscale value, the first grayscale value of the pixel in the first grayscale image is replaced by the second grayscale value (at this time, the second grayscale value is the largest); further, comparing the second grayscale value with the third grayscale value corresponding to the same position as the pixel in the third grayscale image; when the third grayscale value is greater than the second grayscale value, determining the third grayscale value as the maximum grayscale value corresponding to the pixel at the position; otherwise, determining the second grayscale value as the maximum grayscale value corresponding to the pixel at the position.

[0015] In combination with the first aspect and the above-mentioned implementation methods, in some possible implementation methods, the method also includes: when the second grayscale value is less than or equal to the first grayscale value, controlling the first grayscale value of the pixel in the first grayscale image to remain unchanged; comparing the first grayscale value of the pixel in the first grayscale image with the third grayscale value; when the third grayscale value is greater than the first grayscale value, determining the third grayscale value as the maximum grayscale value corresponding to the pixel at the position; when the third grayscale value is less than or equal to the first grayscale value, determining the first grayscale value as the maximum grayscale value corresponding to the pixel at the position.

[0016] In the above technical solution, a process of determining the maximum grayscale value corresponding to the pixel point at the position is described when the second grayscale value is less than or equal to the first grayscale value. Specifically, when the second grayscale value is less than or equal to the first grayscale value, the first grayscale value of the pixel point in the first grayscale image is controlled to remain unchanged (at this time, the first grayscale value is the maximum); further, the first grayscale value is compared with the third grayscale value corresponding to the same position as the pixel point in the third grayscale image; when the third grayscale value is greater than the first grayscale value, the third grayscale value is determined as the maximum grayscale value corresponding to the pixel point at the position; otherwise, the first grayscale value is determined as the maximum grayscale value corresponding to the pixel point at the position.

[0017] In combination with the first aspect and the above-mentioned implementation methods, in some possible implementation methods, the barcode area in the fused image is identified to obtain the identification of the target product, including: based on the position of the barcode of the target product in the visual system and the size of the barcode, segmenting the barcode image corresponding to the barcode area of ​​the target product from the fused image; based on a preset threshold, converting the grayscale values ​​corresponding to the pixel points at each position in the barcode image into a first value or a second value to obtain multiple binary codes; based on the multiple binary codes and preset decoding rules, determining the identification of the target product.

[0018] In the above technical solution, based on the position of the barcode of the target product in the visual system and the size of the barcode, the barcode image corresponding to the barcode area of ​​the target product is segmented from the fused image. This can accurately segment the barcode image of the target product from the fused image. Then, based on the preset threshold, the grayscale value corresponding to the pixel point at each position in the barcode image is converted into the first value or the second value to obtain multiple binary codes; based on the multiple binary codes and the preset decoding rules, the identification of the target product can be determined more accurately.

[0019] In a second aspect, a visual system is provided, which includes an image acquisition device, N light source devices and a controller, wherein the light sources emitted by the N light source devices can illuminate a target product, and a corresponding barcode area exists in the target product, where N is a positive integer and is greater than 1; the controller is connected to the image acquisition device, and is used to: acquire multiple images of the target product through the image acquisition device during the process of controlling the N light source devices in a target mode, wherein the target mode refers to controlling some of the N light source devices to emit light in multiple ways, one way corresponding to one image; fuse the multiple images to obtain a fused image; and identify the barcode area in the fused image to obtain an identification of the target product.

[0020] In combination with the second aspect, in some possible implementations, the N light source devices are arranged around the target product, and the visual system also includes a material tray for placing the target product, and the image acquisition device is installed above the material tray.

[0021] In a third aspect, a computer-readable storage medium is provided, in which instructions are stored. When the instructions are executed on a computer or a processor, the computer or the processor executes the method in the first aspect or any possible implementation of the first aspect. BRIEF DESCRIPTION OF THE DRAWINGS

[0022] Figure 1 is a structural schematic diagram of a visual system provided in an embodiment of the present application;

[0023] Figure 2is a schematic flow chart of a barcode recognition method based on a visual system provided in an embodiment of the present application;

[0024] Figure 3 is a schematic diagram describing a target mode provided in an embodiment of the present application;

[0025] Figure 4 It is a schematic diagram of determining the maximum grayscale value corresponding to multiple pixels at the same position in three grayscale images provided by an embodiment of the present application;

[0026] Figure 5 This is a flow chart of determining the identification of a target product provided by an embodiment of the present application;

[0027] Figure 6 It is a structural schematic diagram of a barcode recognition device based on a visual system provided in an embodiment of the present application;

[0028] Figure 7 is a schematic diagram of the structure of another visual system provided in an embodiment of the present application;

[0029] Figure 8 It is a schematic diagram of the structure of another visual system provided in an embodiment of the present application. DETAILED DESCRIPTION

[0030] The technical solutions in the present application will be described clearly and in detail below in conjunction with the accompanying drawings. In the description of the embodiments of the present application, "multiple" means two or more than two. The terms "first" and "second" are used for descriptive purposes only and should not be understood as implying or suggesting relative importance or implicitly indicating the number of technical features indicated. Thus, the features defined as "first" and "second" may explicitly or implicitly include one or more of the features.

[0031] Figure 1 It is a structural schematic diagram of a visual system provided in an embodiment of the present application.

[0032] The visual system includes an image acquisition device and N light source devices. The light sources emitted by the N light source devices can illuminate a target product. A corresponding barcode area exists on the target product. N is a positive integer and is greater than 1.

[0033] It should be understood that the barcode on the barcode area is a barcode or a QR code.

[0034] In some embodiments, the number of the target product is one or more, and when the number of the target product is multiple, the types of the multiple target products may be different. In some embodiments, the type of the target product is a mobile phone.

[0035] In some embodiments, the image acquisition device is disposed above the target product.

[0036] In some embodiments, the vision system further comprises a tray for placing the target product.

[0037] In some embodiments, the N light source devices are disposed directly above the target product, or around the target product, or a portion of the N light source devices are disposed directly above the target product and another portion of the N light source devices are disposed around the target product.

[0038] For example, Figure 1 The visual system shown in the figure has six target products of the same type placed in the middle of the visual system, specifically product 1, product 2, product 3, product 4, product 5 and product 6. The visual system includes four light source devices, which are evenly arranged around the six target products of the same type. The image acquisition device is arranged just above the target products. The visual system also includes a controller, which is connected to the image acquisition device. In the visual system, the controller can control the four light source devices to emit light to the six target products of the same type in a variety of ways. In each way, the controller acquires images of the six target products of the same type through the image acquisition device, so that multiple images of the six target products of the same type can be obtained (one image corresponds to one way). The controller identifies the multiple images to determine the identification of the six target products of the same type.

[0039] In some embodiments, after the identification of the target product is determined, the authenticity of the target product can be determined, and the target product can be quickly classified or inventory managed.

[0040] Through the visual system in this application, barcode recognition of multiple target products can also be automatically performed, thereby improving the work efficiency of barcode recognition.

[0041] It should be understood that “uniformly” in the above examples is used to indicate that the distance between any two light source devices is the same.

[0042] Figure 2 It is a schematic flow chart of a barcode recognition method based on a visual system provided in an embodiment of the present application.

[0043] It should be understood that the barcode recognition method based on the visual system provided in the embodiment of the present application can be applied to Figure 1 Controller shown.

[0044] For example, Figure 2 As shown, the method 200 includes:

[0045] Step 201, in the process of controlling N light source devices in a target mode, the controller collects multiple images of the target product through an image acquisition device. The target mode refers to controlling some of the N light source devices to emit light in multiple ways, and one image corresponds to one way.

[0046] It should be understood that the implementation process of method 200 in this application is based on Figure 1 Based on the visual system shown in FIG. 1 , the “one image corresponds to one mode” in the above step 201 can be understood as that in the process of controlling some of the N light source devices to emit light in each mode, the image acquisition device acquires the image of the target product. Therefore, there are as many images of the target product as there are modes.

[0047] It should also be understood that there is a certain degree of light reflection on the surface of the target product in step 201. The target product is placed in the visual system in such a way that the barcode area is exposed to the outside so that the image acquisition device can capture the barcode area.

[0048] In some embodiments, the type of light source emitted by the light source device is visible light. Optionally, the light source device emitting visible light is a light emitting diode (LED) lamp or an incandescent lamp.

[0049] In some embodiments, the image acquisition device is a visual device capable of acquiring an image of a target product. Optionally, the visual device is a camera.

[0050] In one possible implementation, the method for controlling the N light source devices in a target mode includes: a controller sequentially controls M of the N light source devices to emit light sources, and when M of the N light source devices emit light sources, controls other light source devices not to emit light sources, where M is less than N and is a positive integer.

[0051] It should be understood that in the above scheme, the process of controlling the N light source devices can be understood as: in the first way, the first part of the light source devices (the number is M) among the N light source devices are controlled to emit light sources, and the other light source devices except the first part of the light source devices are controlled not to emit light sources. In the second way, the second part of the light source devices (the number is M) among the N light source devices are controlled to emit light sources, and the other light source devices except the second part of the light source devices are controlled not to emit light sources, ..., and so on, the Pth way, the Pth part of the light source devices (the number is M) among the N light source devices are controlled to emit light sources, and the other light source devices except the Pth part of the light source devices are controlled not to emit light sources. It should be understood that the first part of the light source device and the second part of the light source device, ..., and the Pth part of the light source device can have the same light source device but not completely the same, and the number of partial light source devices is one or more. Wherein, P is a positive integer and greater than 1.

[0052] In the above technical solution, when M of the N light source devices are sequentially controlled to emit light, and when M of the N light source devices are emitting light, the other light source devices are controlled not to emit light, and the directions of illumination of the target product are different (different light sources illuminate the target product at different distances). When the barcode area is close to the light source, the reflectivity of the target product to the light source is very high, resulting in the collected image not being clear; when the barcode area is far from the light source, the reflectivity of the target product to the light source is very low, resulting in the collected image being relatively clear. Therefore, through the above method, the clarity of the same image area in the multiple images collected by the image acquisition device is different. Therefore, after the multiple images are fused, a fused image with clear image areas can be obtained, and then the barcode area in the fused image can be identified, so that the identification of the target product can be obtained more accurately.

[0053] The following is a further detailed description of the process of "the controller sequentially controls M of the N light source devices to emit light sources, and when M of the N light source devices emit light sources, controls other light source devices not to emit light sources."

[0054] In a possible implementation, M of the N light source devices are controlled in sequence to emit light sources, and when M of the N light source devices emit light sources, other light source devices are controlled not to emit light sources, including any of the following items: when M is equal to 1, the controller controls one of the N light source devices in sequence to emit light sources, and when one of the N light source devices emits light sources, other light source devices are controlled not to emit light sources; when M is greater than 1 and the M light source devices are adjacent light source devices, the controller controls the M adjacent light source devices in sequence to emit light sources, and when the M adjacent light source devices emit light sources, other light source devices are controlled not to emit light sources; when M is greater than 1 and the M light source devices are non-adjacent light source devices, the controller controls the M non-adjacent light source devices in sequence to emit light sources, and when the M non-adjacent light source devices emit light sources, other light source devices are controlled not to emit light sources.

[0055] In the above technical solution, some of the N light source devices are controlled to emit light sources in three modes. Specifically, in mode 1, one of the N light source devices is controlled to emit light sources in sequence, and when one of the N light source devices emits light sources, other light source devices are controlled not to emit light sources; in mode 2, the M adjacent light source devices are controlled to emit light sources in sequence, and when the M adjacent light source devices emit light sources, other light source devices are controlled not to emit light sources; in mode 3, the M non-adjacent light source devices are controlled to emit light sources in sequence, and when the M non-adjacent light source devices emit light sources, other light source devices are controlled not to emit light sources.

[0056] Figure 3 It is a schematic diagram describing a target mode provided in an embodiment of the present application.

[0057] Exemplarily, taking N as 8 and the target products as 6 target products of the same type (including product 1, product 2, product 3, product 4, product 5 and product 6) as an example, the process of controlling M of the N light source devices to emit light sources is described using specific embodiments corresponding to the above three modes.

[0058] Mode 1:

[0059] The first way, such as Figure 3As shown, light source device 1 among the eight light source devices is controlled to emit light, and the other seven light source devices except light source device 1 are controlled not to emit light. In the second way, light source device 2 among the eight light source devices is controlled to emit light, and the other seven light source devices except light source device 2 are controlled not to emit light, ..., and so on, in the eighth way, light source device 8 among the eight light source devices is controlled to emit light, and the other seven light source devices except light source device 8 are controlled not to emit light. It should be understood that in this process, eight images of the six target products of the same type can be acquired by the image acquisition device.

[0060] Mode 2: 1) M is 2, and some light source devices do not have the same light source device

[0061] The first way, such as Figure 3 As shown, light source device 1 and light source device 2 among the eight light source devices are controlled to emit light, and the other six light source devices except light source device 1 and light source device 2 are controlled not to emit light. The second way is to control light source device 3 and light source device 4 among the eight light source devices to emit light, and control the other six light source devices except light source device 3 and light source device 4 not to emit light, ..., and so on, the fourth way is to control light source device 7 and light source device 8 among the eight light source devices to emit light, and control the other light source devices except light source device 7 and light source device 8 not to emit light. It should be understood that in this process, the image acquisition device can acquire four images of the six target products of the same type.

[0062] Mode 2: 2) M is 2, and some light source devices have the same light source device

[0063] The first way, such as Figure 3 As shown, light source device 1 and light source device 2 among the 8 light source devices are controlled to emit light, and the other 6 light source devices except light source device 1 and light source device 2 are controlled not to emit light. The second way is to control light source device 2 and light source device 3 among the 8 light source devices to emit light, and control the other 6 light source devices except light source device 2 and light source device 3 not to emit light. The third way is to control light source device 3 and light source device 4 among the 8 light source devices to emit light, and control the other 6 light source devices except light source device 3 and light source device 4 not to emit light, ..., and so on, the eighth way is to control light source device 8 and light source device 1 among the 8 light source devices to emit light, and control the other light source devices except light source device 8 and light source device 1 not to emit light. It should be understood that in this process, 8 images of the 6 target products of the same type can be collected by the image acquisition device.

[0064] Mode 3: 1) M is 2, and some light source devices do not have the same light source device.

[0065] The first way, such as Figure 3 As shown, light source device 1 and light source device 3 among the eight light source devices are controlled to emit light sources, and the other six light source devices except light source device 1 and light source device 3 are controlled not to emit light sources. The second way is to control light source device 2 and light source device 4 among the eight light source devices to emit light sources, and the other six light source devices except light source device 2 and light source device 4 are controlled not to emit light sources. The third way is to control light source device 5 and light source device 7 among the eight light source devices to emit light sources, and the other six light source devices except light source device 5 and light source device 7 are controlled not to emit light sources. The fourth way is to control light source device 6 and light source device 8 among the eight light source devices to emit light sources, and the other six light source devices except light source device 6 and light source device 8 are controlled not to emit light sources. It should be understood that in this process, four images of the six target products of the same type can be acquired by the image acquisition device.

[0066] Mode 3: 2) M is 2, and some light source devices have the same light source device

[0067] The first way, such as Figure 3 As shown, the light source device 1 and the light source device 3 among the 8 light source devices are controlled to emit light sources, and the other 6 light source devices except the light source device 1 and the light source device 3 are controlled not to emit light sources. The second way is to control the light source device 2 and the light source device 4 among the 8 light source devices to emit light sources, and control the other 6 light source devices except the light source device 2 and the light source device 4 not to emit light sources. The third way is to control the light source device 3 and the light source device 5 among the 8 light source devices to emit light sources, and control the other 6 light source devices except the light source device 3 and the light source device 5 not to emit light sources. The fourth way is to control the light source device 4 and the light source device 6 among the 8 light source devices to emit light sources, and control the other 6 light source devices except the light source device 4 and the light source device 6 not to emit light sources, ..., and so on, the eighth way is to control the light source device 8 and the light source device 2 among the 8 light source devices to emit light sources, and control the other light source devices except the light source device 8 and the light source device 2 not to emit light sources. It should be understood that in this process, the image acquisition device can acquire 8 images of the 6 target products of the same type.

[0068] Different from Figure 1 The positions of the N light source devices shown do not change, and the light source devices at different positions are only controlled in multiple ways to emit light to capture multiple images of the target product through the image acquisition device. The method 200 of the present application also proposes another process for controlling N light source devices.

[0069] In some embodiments, the method of controlling the N light source devices in a target mode includes: sequentially controlling the N light source devices to move around a target product, and controlling the N light source devices to emit light when moving to different positions.

[0070] It should be understood that the N light source devices are controlled in sequence to move around the target product, and when moving to different positions, the N light source devices are controlled to emit light and capture images of the target product through the image capture device.

[0071] It should also be understood that one image corresponds to one location.

[0072] Preferably, N is a small positive integer, and N is 1 or 2.

[0073] In the above technical solution, more images of the target product can be obtained by a smaller number of light source devices, so that the identification of the target product can be determined based on the multiple images of the target product. While saving hardware costs, an accurate barcode recognition rate can also be obtained.

[0074] It should be understood that after obtaining multiple images of the target product, steps 202 and 203 may be used to determine the identity of the target product.

[0075] Step 202: The controller fuses the multiple images to obtain a fused image.

[0076] In a possible implementation, step 202 includes: the controller performs grayscale processing on the multiple images to obtain multiple grayscale images; the controller determines the maximum grayscale value corresponding to multiple pixel points at the same position in the multiple grayscale images; the controller determines the grayscale image composed of multiple maximum grayscale values ​​as the fused image.

[0077] It should be understood that the sizes of the multiple images in the above solution are the same. Therefore, when the multiple images are gray-scaled, the sizes of the multiple gray-scale images obtained are also the same. Therefore, there may be multiple pixels at the same position in the multiple gray-scale images. It should also be understood that the number of pixels is related to the size of the gray-scale image.

[0078] In the above technical solution, a grayscale image composed of the maximum grayscale values ​​corresponding to multiple pixels at the same position in multiple grayscale images is determined as the fused image. Since the grayscale value is also called the brightness value, the brightness value is used to represent the brightness of the pixel. For this, the fused image composed of multiple maximum grayscale values ​​can effectively highlight the brightness change of the target product, so that the brightness range of the barcode area in the fused image is larger. Therefore, the identification of the target product can be accurately determined based on the fused image.

[0079] In some embodiments, the controller determines a grayscale image composed of multiple maximum grayscale values ​​as the fused image, including: the controller composes the multiple maximum grayscale values ​​based on the positions of each maximum grayscale value in the original grayscale image to obtain the fused image.

[0080] In order to more clearly describe the process of "the controller determines the maximum grayscale value corresponding to multiple pixels at the same position in the multiple grayscale images", the following description is given by taking the multiple grayscale images specifically including the first grayscale image, the second grayscale image and the third grayscale image as an example.

[0081] In a possible implementation, the controller determines the maximum grayscale value corresponding to multiple pixels at the same position in the multiple grayscale images, including: for a first grayscale value of a pixel at any position in the first grayscale image, the controller compares the first grayscale value with a second grayscale value, the second grayscale value being the grayscale value corresponding to the pixel at the same position in the second grayscale image; when the second grayscale value is greater than the first grayscale value, the controller replaces the first grayscale value of the pixel in the first grayscale image with the second grayscale value; the controller compares the second grayscale value of the pixel in the first grayscale image with a third grayscale value, the third grayscale value being the grayscale value corresponding to the pixel at the same position in the third grayscale image; when the third grayscale value is greater than the second grayscale value, the controller determines the third grayscale value as the maximum grayscale value corresponding to the pixel at the position; when the third grayscale value is less than or equal to the second grayscale value, the controller determines the second grayscale value as the maximum grayscale value corresponding to the pixel at the position.

[0082] In one possible implementation, the method 200 also includes: when the second grayscale value is less than or equal to the first grayscale value, the controller controls the first grayscale value of the pixel in the first grayscale image to remain unchanged; the controller compares the first grayscale value of the pixel in the first grayscale image with the third grayscale value; when the third grayscale value is greater than the first grayscale value, the controller determines the third grayscale value as the maximum grayscale value corresponding to the pixel at the position; when the third grayscale value is less than or equal to the first grayscale value, the controller determines the first grayscale value as the maximum grayscale value corresponding to the pixel at the position.

[0083] In the above technical solution, taking a plurality of grayscale images including a first grayscale image, a second grayscale image and a third grayscale image as an example, a process of determining the maximum grayscale value corresponding to a plurality of pixels at the same position in the plurality of grayscale images is described. This is equivalent to comparing the first grayscale value of a pixel at any position in the first grayscale image with the second grayscale value corresponding to the same position as the pixel in the second grayscale image; when the second grayscale value is greater than the first grayscale value, the first grayscale value of the pixel in the first grayscale image is replaced by the second grayscale value (at this time, the second grayscale value is the largest); further, comparing the second grayscale value with the third grayscale value corresponding to the same position as the pixel in the third grayscale image; when the third grayscale value is greater than the second grayscale value, determining the third grayscale value as the maximum grayscale value corresponding to the pixel at the position; otherwise, determining the second grayscale value as the maximum grayscale value corresponding to the pixel at the position. When the second grayscale value is less than or equal to the first grayscale value, the first grayscale value of the pixel in the first grayscale image is controlled to remain unchanged (at this time, the first grayscale value is the maximum); furthermore, the first grayscale value is compared with the third grayscale value corresponding to the same position as the pixel in the third grayscale image; when the third grayscale value is greater than the first grayscale value, the third grayscale value is determined as the maximum grayscale value corresponding to the pixel at this position; otherwise, the first grayscale value is determined as the maximum grayscale value corresponding to the pixel at this position.

[0084] Figure 4 It is a schematic diagram of determining the maximum grayscale value corresponding to multiple pixels at the same position in three grayscale images provided by an embodiment of the present application.

[0085] Exemplarily, taking the three grayscale images as the first grayscale image, the second grayscale image and the third grayscale image, and the multiple identical positions including the first position as an example, the process of determining the maximum grayscale value corresponding to the pixel points at multiple identical positions in the three grayscale images is described.

[0086] like Figure 4 As shown in (a), the size of the first grayscale image, the second grayscale image, and the third grayscale image are all 6 pixels * 6 pixels. In the figure, one grid is used to indicate one pixel. The first position is the position of the 1st row and the 3rd column in each of the three grayscale images (abbreviated as n 13 ), the controller takes the position n in the first grayscale image 13 The gray value 75 corresponding to the pixel point is related to the position n in the second gray image. 13 The gray value 12 corresponding to the pixel point is compared to determine the position n in the first gray image. 13 The gray value 75 corresponding to the pixel point is greater than the position n in the second gray image 13The gray value corresponding to the pixel point is 12. The controller controls the position n in the first gray image 13 The gray value 75 corresponding to the pixel remains unchanged, as shown in Figure 4 As shown in (b) in FIG. 1 , the controller converts the position n in the first grayscale image into 13 The gray value 75 corresponding to the pixel point is related to the position n in the third gray image. 13 The gray value 111 corresponding to the pixel point is compared to determine the position n in the third gray image. 13 The gray value 111 corresponding to the pixel point is greater than the position n in the first gray image. 13 The gray value corresponding to the pixel point is 75. The controller determines the gray value 111 as the position n included in the multiple identical positions in the three gray images. 13 The maximum gray value corresponding to the pixel point is obtained as follows Figure 4 The fused image shown in (c).

[0087] It should be understood that the multiple same positions also include Figure 4 The position of the first row and first column in each of the three grayscale images (abbreviated as n 11 ), the position of the first row and second column (abbreviated as n 12 ), the position of the 1st row and 4th column (abbreviated as n 14 ) and so on. It should also be understood that the above is only an example of position n 13 The process of determining the maximum grayscale value corresponding to the pixel point at the other positions is the same as that at the position n. 13 The process of determining the maximum grayscale value corresponding to the pixel point is similar and will not be repeated here.

[0088] In some embodiments, the controller determines the maximum grayscale value corresponding to multiple pixel points at the same position in the multiple grayscale images, including: for any position among the multiple same positions, the controller compares multiple grayscale values ​​corresponding to the pixel points at the position in the multiple grayscale images, and determines the maximum grayscale value from the multiple grayscale values.

[0089] In the above technical solution, it is equivalent to determining multiple grayscale values ​​of pixels at any same position in the multiple grayscale images, and then comparing the multiple grayscale values ​​to determine the maximum grayscale value. In this way, the maximum grayscale value corresponding to multiple pixels at the same position in the multiple grayscale images can be obtained simply and quickly.

[0090] Step 203: The controller identifies the barcode area in the fused image to obtain the identification of the target product.

[0091] It should be understood that, in some embodiments, the "identification of the target product" in step 203 is at least one of the origin of the target product, the name and address of the manufacturer of the target product, the main ingredients of the target product, the specification model of the target product, the production date and expiration date of the target product.

[0092] In a possible implementation, step 203 includes: the controller segments a barcode image corresponding to the barcode area of ​​the target product from the fused image based on the position of the barcode of the target product in the visual system and the size of the barcode; the controller converts the grayscale values ​​corresponding to the pixel points at each position in the barcode image into a first value or a second value based on a preset threshold to obtain multiple binary codes; the controller determines the identification of the target product based on the multiple binary codes and preset decoding rules.

[0093] It should be understood that before segmenting the barcode image corresponding to the barcode area of ​​the target product from the fused image, the position of the barcode of the target product in the visual system can be obtained. Generally, when the type of the target product is determined, the size of the barcode of the target product and the position of the barcode in the target product are determined.

[0094] In the above technical solution, based on the position of the barcode of the target product in the visual system and the size of the barcode, the barcode image corresponding to the barcode area of ​​the target product is segmented from the fused image. This can accurately segment the barcode image of the target product from the fused image. Then, based on the preset threshold, the grayscale value corresponding to the pixel point at each position in the barcode image is converted into the first value or the second value to obtain multiple binary codes; based on the multiple binary codes and the preset decoding rules, the identification of the target product can be determined more accurately.

[0095] In some embodiments, the controller segments a barcode image corresponding to the barcode area of ​​the target product from the fused image based on the position of the barcode of the target product in the visual system and the size of the barcode, including: the controller segments the image of the target product from the fused image based on the position of the target product in the visual system and the size of the target product; the controller segments the barcode image of the target product from the image of the target product based on the position of the barcode of the target product in the target product and the size of the barcode.

[0096] In the above technical solution, the image of the target product is first segmented from the fused image based on the position of the target product in the visual system and the size of the target product; and then the barcode image of the target product is segmented from the image of the target product based on the position of the barcode in the target product and the size of the barcode. Compared with directly obtaining the barcode image of the target product from the fused image, this method can obtain a more accurate barcode image.

[0097] In some embodiments, the vision system also includes a material tray for placing the target product, and the controller segments a barcode image corresponding to the barcode area of ​​the target product from the fused image based on the position of the barcode of the target product in the vision system and the size of the barcode, including: the controller segments a barcode image corresponding to the barcode area of ​​the target product from the fused image based on the position of the barcode of the target product in the material tray and the size of the barcode.

[0098] In the above technical solution, when the target product is placed on the tray, the placement position of the target product on the tray is determined, and the position of the barcode on the target product is also determined, so the position of the barcode in the tray can be obtained. Therefore, based on the position of the barcode of the target product in the tray and the size of the barcode, the barcode image corresponding to the barcode area of ​​the target product can be accurately segmented from the fused image.

[0099] In some embodiments, the controller converts the grayscale value corresponding to the pixel point at each position in the barcode image into a first value or a second value based on a preset threshold value to obtain multiple binary codes, including: the controller compares the grayscale value corresponding to the pixel point at each position with the preset threshold value; when the grayscale value corresponding to the pixel point at the position is less than the preset threshold value, the controller replaces the grayscale value corresponding to the pixel point at the position with the first value; when the grayscale value corresponding to the pixel point at the position is greater than the preset threshold value, the controller replaces the grayscale value corresponding to the pixel point at the position with the second value, so as to obtain the binary codes corresponding to the pixel points at multiple positions in the barcode image, and the first value is less than the second value.

[0100] In some embodiments, the first value is 0 and the second value is 1.

[0101] In the above technical solution, since the internal identification code of the electronic device is "0" and "1" binary, the grayscale values ​​corresponding to the pixels at multiple positions in the barcode image are converted to 0 or 1. Then, based on the multiple binary codes ("0" and "1") and the preset decoding rules, the barcode image can be identified to accurately determine the identity of the target product.

[0102] Figure 5 This is a flow chart for determining the identification of a target product provided in an embodiment of the present application.

[0103] Exemplarily, taking N as 4, the target mode as method one, 4 light source devices are evenly arranged around the target product, and the image acquisition device is arranged above the target product as an example, the process of determining the identification of the target product is described.

[0104] like Figure 5As shown, the controller determines whether each device in the visual system has not failed. In the case of any device in the visual system failing, the method flow ends. In the case of each device in the visual system having not failed, in the process of controlling the light source device 1 to emit light and other light source devices not to emit light, the controller acquires the first image of the target product through the image acquisition device; in the process of controlling the light source device 2 to emit light and other light source devices not to emit light, the controller acquires the second image of the target product through the image acquisition device; in the process of controlling the light source device 3 to emit light and other light source devices not to emit light, the controller acquires the third image of the target product through the image acquisition device; in the process of controlling the light source device 4 to emit light and other light source devices not to emit light, the controller acquires the fourth image of the target product through the image acquisition device. The multiple images include the first image, the second image, the third image and the fourth image. The controller fuses the multiple images to obtain a fused image. The controller locates the barcode area of ​​the target product in the fused image to obtain the barcode image of the target product. The controller identifies the barcode image to obtain the identification of the target product.

[0105] Figure 6 It is a structural schematic diagram of a barcode recognition device based on a visual system provided in an embodiment of the present application.

[0106] Exemplarily, the visual system includes an image acquisition device and N light source devices, the light sources emitted by the N light source devices can illuminate the target product, and the target product has a corresponding barcode area, N is a positive integer and greater than 1, such as Figure 6 As shown, the device 600 includes:

[0107] The acquisition module 601 is used to acquire multiple images of the target product through the image acquisition device during the process of controlling the N light source devices in the target mode. The target mode refers to controlling some of the N light source devices to emit light in multiple ways, and one image corresponds to one way.

[0108] A fusion module 602 is used to fuse multiple images to obtain a fused image;

[0109] The recognition module 603 is used to recognize the barcode area in the fused image to obtain the identification of the target product.

[0110] Optionally, the device 600 also includes: a control module, used to sequentially control M light source devices among the N light source devices to emit light sources, and when sequentially controlling M light source devices among the N light source devices to emit light sources, controlling other light source devices not to emit light sources, M is less than N, and M is a positive integer.

[0111] Optionally, the control module is specifically used for any one of the following items: when M is equal to 1, controlling one of the N light source devices to emit light source in sequence, and when controlling one of the N light source devices to emit light source in sequence, controlling other light source devices not to emit light source; when M is greater than 1 and the M light source devices are adjacent light source devices, controlling the M adjacent light source devices to emit light source in sequence, and when controlling the M adjacent light source devices to emit light source in sequence, controlling other light source devices not to emit light source; when M is greater than 1 and the M light source devices are non-adjacent light source devices, controlling the M non-adjacent light source devices to emit light source in sequence, and when controlling the M non-adjacent light source devices to emit light source in sequence, controlling other light source devices not to emit light source.

[0112] Optionally, the fusion module 602 is specifically used to: perform grayscale processing on the multiple images to obtain multiple grayscale images; determine the maximum grayscale value corresponding to multiple pixels at the same position in the multiple grayscale images; and determine the grayscale image composed of multiple maximum grayscale values ​​as the fused image.

[0113] Optionally, the multiple grayscale images include a first grayscale image, a second grayscale image and a third grayscale image, and the device 600 also includes: a determination module, which is used to: for a first grayscale value of a pixel point at any position in the first grayscale image, compare the first grayscale value with a second grayscale value, the second grayscale value being the grayscale value corresponding to the pixel point in the second grayscale image when the position is the same as that of the pixel point; when the second grayscale value is greater than the first grayscale value, replace the first grayscale value of the pixel point in the first grayscale image with the second grayscale value; compare the second grayscale value of the pixel point in the first grayscale image with a third grayscale value, the third grayscale value being the grayscale value corresponding to the pixel point in the third grayscale image when the position is the same as that of the pixel point; when the third grayscale value is greater than the second grayscale value, determine the third grayscale value as the maximum grayscale value corresponding to the pixel point at that position; when the third grayscale value is less than or equal to the second grayscale value, determine the second grayscale value as the maximum grayscale value corresponding to the pixel point at that position.

[0114] Optionally, the determination module is also used to: when the second grayscale value is less than or equal to the first grayscale value, control the first grayscale value of the pixel in the first grayscale image to remain unchanged; compare the first grayscale value of the pixel in the first grayscale image with the third grayscale value; when the third grayscale value is greater than the first grayscale value, determine the third grayscale value as the maximum grayscale value corresponding to the pixel at this position; when the third grayscale value is less than or equal to the first grayscale value, determine the first grayscale value as the maximum grayscale value corresponding to the pixel at this position.

[0115] Optionally, the recognition module 603 is specifically used to: segment a barcode image corresponding to the barcode area of ​​the target product from the fused image based on the position of the barcode of the target product in the visual system and the size of the barcode; based on a preset threshold, convert the grayscale values ​​corresponding to the pixel points at each position in the barcode image into a first value or a second value to obtain multiple binary codes; and determine the identification of the target product based on the multiple binary codes and preset decoding rules.

[0116] Figure 7 It is a schematic diagram of the structure of another visual system provided in an embodiment of the present application.

[0117] For example, Figure 7 As shown, the visual system 700 includes an image acquisition device 701, N light source devices 702 (light source device 1, ..., light source device N) and a controller 703, the light sources emitted by the N light source devices 702 can illuminate a target product, the target product has a corresponding barcode area, and N is a positive integer and greater than 1;

[0118] The controller 703 is connected to the image acquisition device 701, and the controller 703 is used for:

[0119] In the process of controlling the N light source devices 702 in a target mode, a plurality of images of the target product are collected by the image collection device 701. The target mode refers to controlling some of the N light source devices to emit light in a plurality of ways, and one image corresponds to one way.

[0120] fusing the multiple images to obtain a fused image;

[0121] The barcode area in the fused image is identified to obtain the identification of the target product.

[0122] Optionally, the N light source devices 702 are arranged around the target product, and the visual system 700 further includes a tray 804 for placing the target product, and the image acquisition device 701 is installed above the tray 804. Figure 8 shown.

[0123] This embodiment provides a computer-readable storage medium, which stores instructions. When the instructions are executed on a computer or a processor, the computer or the processor executes any one of the barcode recognition methods based on the visual system described above.

[0124] This embodiment also provides a computer program product including instructions. When the computer program product is executed on a computer or a processor, the computer or the processor executes the above-mentioned related steps to implement any of the barcode recognition methods based on the visual system introduced above.

[0125] Among them, the visual system, computer-readable storage medium, computer program product or chip containing instructions provided in this embodiment are all used to execute the corresponding methods provided above. Therefore, the beneficial effects that can be achieved can refer to the beneficial effects in the corresponding methods provided above, and will not be repeated here.

[0126] Through the description of the above implementation methods, technical personnel in the relevant field can understand that for the convenience and simplicity of description, only the division of the above-mentioned functional modules is used as an example. In actual applications, the above-mentioned functions can be assigned to different functional modules as needed, that is, the internal structure of the device can be divided into different functional modules to complete all or part of the functions described above.

[0127] In the embodiments provided in the present application, it should be understood that the disclosed devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic, for example, the division of modules or units is only a logical function division, and there may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another device, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.

[0128] The above contents are only specific implementation methods of the present application, but the protection scope of the present application is not limited thereto. Any technician familiar with the technical field can easily think of changes or substitutions within the technical scope disclosed in the present application, which should be included in the protection scope of the present application. Therefore, the protection scope of the present application should be based on the protection scope of the claims.

Claims

1. A barcode recognition method based on a visual system, characterized in that: The visual system includes an image acquisition device and N light source devices, the light sources emitted by the N light source devices can illuminate a target product, the target product has a corresponding barcode area, N is a positive integer and greater than 1, and the method includes: In the process of controlling the N light source devices in a target mode, a plurality of images of the target product are collected by the image collection device, wherein the target mode refers to controlling some of the N light source devices to emit light in a plurality of ways, and one image corresponds to one of the ways; fusing the multiple images to obtain a fused image; The barcode area in the fused image is identified to obtain the identification of the target product.

2. The method according to claim 1, characterized in that The method of controlling the N light source devices in a target mode includes: Controlling M of the N light source devices to emit light sources in sequence, and when M of the N light source devices emit light sources, controlling other light source devices not to emit light sources, M is less than N, and M is a positive integer.

3. The method according to claim 2, characterized in that The sequentially controlling M of the N light source devices to emit light sources, and when M of the N light source devices emit light sources, controlling other light source devices not to emit light sources, includes any of the following: When M is equal to 1, one of the N light source devices is controlled to emit light in sequence, and when one of the N light source devices emits light, the other light source devices are controlled not to emit light; When M is greater than 1 and the M light source devices are adjacent light source devices, the M adjacent light source devices are sequentially controlled to emit light sources, and when the M adjacent light source devices emit light sources, other light source devices are controlled not to emit light sources; When M is greater than 1 and the M light source devices are non-adjacent light source devices, the M non-adjacent light source devices are controlled in sequence to emit light sources, and when the M non-adjacent light source devices emit light sources, other light source devices are controlled not to emit light sources.

4. The method according to claim 1, characterized in that: The fusing the multiple images to obtain a fused image includes: Performing grayscale processing on the multiple images to obtain multiple grayscale images; Determine the maximum grayscale value corresponding to multiple pixels at the same position in the multiple grayscale images; A grayscale image composed of multiple maximum grayscale values ​​is determined as the fused image.

5. The method according to claim 4, characterized in that The multiple grayscale images include a first grayscale image, a second grayscale image, and a third grayscale image, and determining the maximum grayscale value corresponding to multiple pixels at the same position in the multiple grayscale images includes: For a first grayscale value of a pixel point at any position in the first grayscale image, compare the first grayscale value with a second grayscale value, where the second grayscale value is a grayscale value corresponding to the same position as the pixel point in the second grayscale image; When the second grayscale value is greater than the first grayscale value, replacing the first grayscale value of the pixel in the first grayscale image with the second grayscale value; Compare the second grayscale value of the pixel point in the first grayscale image with a third grayscale value, where the third grayscale value is the grayscale value corresponding to the same position as the pixel point in the third grayscale image; When the third grayscale value is greater than the second grayscale value, determining the third grayscale value as the maximum grayscale value corresponding to the pixel point at the position; When the third grayscale value is less than or equal to the second grayscale value, the second grayscale value is determined as the maximum grayscale value corresponding to the pixel point at the position.

6. The method according to claim 5, characterized in that The method further comprises: When the second grayscale value is less than or equal to the first grayscale value, controlling the first grayscale value of the pixel point in the first grayscale image to remain unchanged; Compare the first grayscale value of the pixel in the first grayscale image with the third grayscale value; When the third grayscale value is greater than the first grayscale value, determining the third grayscale value as the maximum grayscale value corresponding to the pixel point at the position; When the third grayscale value is less than or equal to the first grayscale value, the first grayscale value is determined as the maximum grayscale value corresponding to the pixel points at the position.

7. The method according to claim 1, characterized in that The identifying the barcode area in the fused image to obtain the identification of the target product includes: Segmenting a barcode image corresponding to a barcode region of the target product from the fused image based on a position of the barcode of the target product in the visual system and a size of the barcode; Based on a preset threshold, the grayscale value corresponding to the pixel point at each position in the barcode image is converted into a first value or a second value to obtain a plurality of binary codes; Based on the multiple binary codes and preset decoding rules, an identification of the target product is determined.

8. A visual system, characterized in that: The visual system includes an image acquisition device, N light source devices and a controller, the light sources emitted by the N light source devices can illuminate the target product, the target product has a corresponding barcode area, and N is a positive integer and greater than 1; The controller is connected to the image acquisition device, and the controller is used for: In the process of controlling the N light source devices in a target mode, a plurality of images of the target product are collected by the image collection device, wherein the target mode refers to controlling some of the N light source devices to emit light in a plurality of ways, one way corresponding to one image; fusing the multiple images to obtain a fused image; The barcode area in the fused image is identified to obtain the identification of the target product.

9. The system according to claim 8, characterized in that The N light source devices are arranged around the target product, and the visual system also includes a material tray for placing the target product, and the image acquisition device is installed above the material tray.

10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores instructions, and when the instructions are executed on a computer or a processor, the computer or the processor executes the barcode recognition method based on a visual system as described in any one of claims 1 to 7.