Code reading method, device, equipment, system and storage medium
By detecting the featured graphics in the image and judging that they meet the preset conditions, code recognition is performed, and the problem of low code recognition accuracy in the prior art is solved, and the accuracy and efficiency of recognition are improved.
Patent Information
- Application Number
- CN202411712474.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-26
- Publication Date
- 2025-03-14
- Estimated Expiration
- 2044-11-26
AI Technical Summary
The prior art has low accuracy when identifying barcodes or QR codes, and is prone to misidentification, especially when the light dependence or the product is small.
By acquiring the image to be identified collected by the image acquisition device, detecting whether there is a feature pattern in the image, and determining whether the feature pattern meets the preset recognition conditions before the code is recognized.
Improve the accuracy of code recognition and avoid the power loss caused by invalid recognition.
Smart Images

Figure CN119623498A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of machine vision technology, and in particular to a code reading method, device, equipment, system and storage medium. Background Art
[0002] At present, in order to record and trace products in many application scenarios, barcodes or QR codes containing product data information are printed or pasted on the products. Subsequently, the product data information is obtained by scanning the barcode or QR code for recording and tracing.
[0003] For example, barcodes or QR codes are usually printed on drug packaging. Later, when the drugs are distributed, each drug is scanned to identify the specific data information of the drug, so as to record and trace the drugs. Another example: in the field of logistics, barcodes or QR codes are also pasted on the outer packaging of goods to be mailed. Later, when the goods are dispatched, each goods is scanned to identify the specific data information of the goods, so as to record and trace the goods.
[0004] In the related art, the recognition of barcodes or QR codes mainly adopts the following two methods:
[0005] The first method is to use distance measurement to trigger the recognition of the barcode or QR code when a distance change is detected between the camera and the measured table.
[0006] This method only measures the distance and cannot determine whether the distance change is caused by the target object. Therefore, when non-target objects (human hands, object boxes, etc.) mistakenly enter the measured table and cause the distance change, it will also trigger the recognition of the barcode or QR code, resulting in recognition errors and the recognition accuracy is not high enough.
[0007] The second method is to determine whether to trigger the recognition of the barcode or QR code by measuring the brightness change of the captured image.
[0008] This method is highly dependent on light. In addition, when the product is small, the brightness change is not obvious, and recognition errors may occur, and the recognition accuracy is not high enough. Summary of the invention
[0009] The purpose of the embodiments of the present application is to provide a code reading method, device, equipment, system and storage medium to improve the accuracy of code recognition. The specific technical solution is as follows:
[0010] In a first aspect, an embodiment of the present application provides a code reading method, the method comprising:
[0011] Acquire an image to be recognized acquired by a first image acquisition device;
[0012] For the acquired current image to be identified, detecting whether there is a characteristic pattern in the current image to be identified, wherein the characteristic pattern is used to indicate the presence of a code in the image;
[0013] In the case where the characteristic pattern exists in the current image to be identified, determining whether the characteristic pattern meets a preset identification condition;
[0014] When the characteristic pattern meets the preset recognition condition, the code in the image to be recognized acquired by the first image acquisition device is recognized to obtain a recognition result.
[0015] Optionally, the determining whether the characteristic pattern satisfies a preset recognition condition includes:
[0016] Based on the confidence and / or motion state of the characteristic pattern in the current image to be identified, it is determined whether the characteristic pattern meets a preset condition.
[0017] Optionally, judging whether the characteristic pattern meets a preset condition based on the confidence and / or motion state of the characteristic pattern in the current image to be identified includes:
[0018] Determining whether the confidence of the characteristic pattern in the current image to be identified is greater than a preset confidence threshold;
[0019] When the confidence of the characteristic pattern is greater than the preset confidence threshold, continuously acquiring the positions of the characteristic patterns in the image to be identified in a plurality of subsequent images to be identified;
[0020] Based on the position of the characteristic pattern in the image to be identified, determining the position change of the characteristic pattern in a plurality of consecutive images to be identified;
[0021] According to the position change situation, when the position change amount in a plurality of consecutive images to be identified is less than a preset change amount threshold, it is determined that the characteristic pattern meets the preset identification condition.
[0022] Optionally, when there are multiple characteristic patterns in the current image to be identified,
[0023] For each characteristic pattern, the step of determining whether the confidence of the characteristic pattern in the current image to be identified is greater than a preset confidence threshold is executed; when the confidence of the characteristic pattern is greater than the preset confidence threshold, continuously obtaining the position of the characteristic pattern in the image to be identified in the subsequent multiple images to be identified; based on the position of the characteristic pattern in the image to be identified, determining the position change of the characteristic pattern in the consecutive multiple images to be identified; and according to the position change, when the position change amount in the consecutive multiple images to be identified is less than the preset change amount threshold, determining that the characteristic pattern meets the preset identification condition;
[0024] When the characteristic pattern satisfies the preset recognition condition, recognizing the code in the image to be recognized acquired by the first image acquisition device to obtain a recognition result includes:
[0025] For each characteristic pattern, when the characteristic pattern meets the preset recognition condition, the code corresponding to the characteristic pattern in the image to be recognized acquired by the first image acquisition device is recognized to obtain a recognition result of the code.
[0026] Optionally, the continuously acquiring the positions of the characteristic patterns in the subsequent multiple images to be identified; determining the position change of the characteristic pattern in the multiple consecutive images to be identified based on the position of the characteristic pattern in the multiple images to be identified; and determining, according to the position change, that the characteristic pattern meets the preset recognition condition when the position change amount in the multiple consecutive images to be identified is less than a preset change amount threshold, includes:
[0027] Continuously obtain the position of the positioning frame of the characteristic pattern in the subsequent multiple images to be identified; based on the position of the positioning frame of the characteristic pattern in the image to be identified, determine the position change of the positioning frame of the characteristic pattern in the multiple consecutive images to be identified; according to the position change, when the position change amount of the positioning frame in the multiple consecutive images to be identified is less than a preset change amount threshold, determine that the characteristic pattern meets the preset recognition condition.
[0028] Optionally, when the position change in the plurality of consecutive images to be identified is less than the preset change threshold, the method further includes:
[0029] Controlling the light source to turn on to provide supplementary light to the capture field of view of the first image capture device;
[0030] The step of recognizing the code in the image to be recognized acquired by the first image acquisition device to obtain a recognition result includes:
[0031] The code in the image to be identified which is acquired by the first image acquisition device under the condition of supplementary light is identified to obtain an identification result, and the light source is controlled to be turned off after the identification result is obtained.
[0032] Optionally, recognizing the code in the image to be recognized acquired by the first image acquisition device to obtain a recognition result includes:
[0033] Determine the target position of the code in the image to be recognized acquired by the first image acquisition device based on the position of the characteristic pattern in the plurality of consecutive images to be recognized;
[0034] The target position in the image to be identified acquired by the first image acquisition device is identified to obtain an identification result.
[0035] Optionally, when the characteristic pattern is a code itself, determining a target position of the code in the image to be identified acquired by the first image acquisition device based on the position of the characteristic pattern in the plurality of consecutive images to be identified includes:
[0036] Determine the position of the characteristic pattern in the plurality of consecutive images to be identified as the target position of the code in the image to be identified acquired by the first image acquisition device;
[0037] In the case where the characteristic pattern is an identification pattern that is located on the same target object as the code and has a fixed relative position relationship with the code; determining the target position of the code in the image to be identified acquired by the first image acquisition device based on the position of the characteristic pattern in the plurality of consecutive images to be identified includes:
[0038] Based on the position of the characteristic pattern in the plurality of consecutive images to be identified and the fixed relative position relationship between the code and the identification pattern, the target position of the code in the image to be identified acquired by the first image acquisition device is determined.
[0039] Optionally, the detecting whether there is a characteristic pattern in the current image to be identified includes:
[0040] Detect whether there is a characteristic pattern in a preset region of interest in the current image to be recognized.
[0041] Optionally, the method further includes:
[0042] Receive the configuration information of the characteristic graphic sent by the host computer to determine whether the characteristic graphic is a code or an identification pattern, wherein the configuration information of the characteristic graphic is configured by the user in the interface of the host computer, and the configuration information of the characteristic graphic includes: a code or an identification pattern.
[0043] Optionally, before acquiring the image to be recognized acquired by the first image acquisition device, the method further includes:
[0044] Acquire a movement path of the characteristic pattern, and based on the movement path, predict at least one first image acquisition device that can subsequently acquire the characteristic pattern;
[0045] Controlling only the at least one first image acquisition device to continue acquiring images;
[0046] The step of acquiring the image to be recognized acquired by the first image acquisition device comprises:
[0047] Acquire an image to be recognized captured by the at least one first image capturing device.
[0048] Optionally, obtaining the movement route of the characteristic graphic includes:
[0049] Acquire an image to be detected acquired by a second image acquisition device;
[0050] In the case where the characteristic pattern exists in the acquired image to be detected, the movement route of the characteristic pattern is determined according to the acquired multiple images to be detected.
[0051] Optionally, the controlling to continue acquiring images only by the at least one first image acquisition device includes:
[0052] Determining a time when the characteristic pattern arrives at the at least one first image acquisition device;
[0053] According to the determined time, control is performed to continue capturing images only by the at least one first image capturing device.
[0054] Optionally, when the characteristic pattern satisfies the preset recognition condition, recognizing the code in the image to be recognized acquired by the first image acquisition device to obtain the recognition result includes:
[0055] In the case where the characteristic pattern meets the preset recognition condition, the code in the current image to be recognized is recognized to obtain a recognition result;
[0056] or,
[0057] When the characteristic pattern satisfies the preset recognition condition, it is detected whether there is a code in the current image to be recognized. When there is a code in the current image to be recognized, the code in the image to be recognized acquired after the current image to be recognized is recognized to obtain a recognition result.
[0058] In a second aspect, an embodiment of the present application provides a code reading device, the device comprising:
[0059] An image acquisition module, used to acquire an image to be recognized acquired by a first image acquisition device;
[0060] A characteristic pattern detection module is used to detect whether a characteristic pattern exists in the acquired current image to be identified, wherein the characteristic pattern is used to indicate the existence of a code in the image;
[0061] A judging module, used for judging whether the characteristic pattern satisfies a preset recognition condition when the characteristic pattern exists in the current image to be recognized;
[0062] The code recognition module is used to recognize the code in the image to be recognized acquired by the first image acquisition device to obtain a recognition result when the characteristic pattern meets the preset recognition condition.
[0063] Optionally, the judgment module is specifically used to:
[0064] Based on the confidence and / or motion state of the characteristic pattern in the current image to be identified, it is determined whether the characteristic pattern meets the preset conditions.
[0065] Optionally, the judging module includes:
[0066] A confidence judgment unit, used to judge whether the confidence of the characteristic pattern in the current image to be recognized is greater than a preset confidence threshold;
[0067] a position change determination unit, configured to, when the confidence of the characteristic pattern is greater than a preset confidence threshold, continuously obtain the position of the characteristic pattern in the image to be identified in a plurality of subsequent images to be identified, and determine the position change of the characteristic pattern in the plurality of consecutive images to be identified based on the position of the characteristic pattern in the image to be identified;
[0068] The position change judgment unit is used to determine whether the characteristic pattern meets the preset recognition condition according to the position change situation when the position change amount in a plurality of consecutive images to be recognized is less than a preset change amount threshold.
[0069] Optionally, when there are multiple characteristic patterns in the current image to be identified, the judgment module is specifically used to:
[0070] For each characteristic pattern, the above-mentioned step of determining whether the confidence of the characteristic pattern in the current image to be identified is greater than a preset confidence threshold is executed; when the confidence of the characteristic pattern is greater than the preset confidence threshold, the position of the characteristic pattern in the image to be identified in the subsequent multiple images to be identified is continuously obtained; based on the position of the characteristic pattern in the image to be identified, the position change of the characteristic pattern in the consecutive multiple images to be identified is determined; according to the position change, when the position change amount in the consecutive multiple images to be identified is less than the preset change amount threshold, the step of determining that the characteristic pattern meets the preset identification condition;
[0071] The code recognition module is specifically used for:
[0072] For each characteristic pattern, when the characteristic pattern meets the preset recognition condition, the code corresponding to the characteristic pattern in the image to be recognized acquired by the first image acquisition device is recognized to obtain a recognition result of the code.
[0073] Optionally, the judgment module is specifically used to:
[0074] Continuously obtain the position of the positioning frame of the characteristic pattern in the subsequent multiple images to be identified, determine the position change of the positioning frame of the characteristic pattern in the multiple consecutive images to be identified based on the position of the positioning frame of the characteristic pattern in the multiple consecutive images to be identified, and according to the position change, when the position change of the positioning frame in the multiple consecutive images to be identified is less than a preset change threshold, determine that the characteristic pattern meets the preset recognition condition.
[0075] Optionally, the device further comprises:
[0076] a light source control module, configured to control the light source to be turned on, so as to fill in the capture field of view of the first image capture device, when the position change in the plurality of consecutive images to be recognized is less than the preset change threshold;
[0077] The code recognition module is specifically used for:
[0078] Recognize the code in the image to be recognized acquired by the first image acquisition device under the condition of fill light, and obtain a recognition result;
[0079] The light source control module is further used to control the light source to be turned off after the code recognition module obtains the recognition result.
[0080] Optionally, the code recognition module includes:
[0081] a target position determination unit, which determines the target position of the code in the image to be identified acquired by the first image acquisition device based on the position of the characteristic pattern in the plurality of consecutive images to be identified;
[0082] The recognition unit is used to recognize the target position in the image to be recognized acquired by the first image acquisition device to obtain a recognition result.
[0083] Optionally, the target position determination unit is specifically used to:
[0084] In the case where the characteristic pattern is the code itself, determining the position of the characteristic pattern in the plurality of consecutive images to be identified as the target position of the code in the images to be identified acquired by the first image acquisition device;
[0085] In the case where the characteristic pattern is an identification pattern that is located on the same target object as the code and has a fixed relative position relationship with the code; based on the position of the characteristic pattern in the multiple consecutive images to be identified and the fixed relative position relationship between the code and the identification pattern, the target position of the code in the image to be identified captured by the first image acquisition device is determined.
[0086] Optionally, the characteristic pattern detection module is specifically used to:
[0087] Detect whether there is a characteristic pattern in the preset region of interest in the current image to be recognized.
[0088] Optionally, the device further comprises:
[0089] The configuration information receiving module is used to receive the configuration information of the characteristic graphic sent by the host computer to determine whether the characteristic graphic is a code or an identification pattern, wherein the configuration information of the characteristic graphic is configured by the user in the interface of the host computer, and the configuration information of the characteristic graphic includes: a code or an identification pattern.
[0090] Optionally, the device further comprises:
[0091] A device prediction module, used to obtain a movement path of the characteristic pattern, and based on the movement path, predict at least one first image acquisition device that can subsequently acquire the characteristic pattern;
[0092] A control module, used for controlling only the at least one first image acquisition device to continue to acquire images;
[0093] The image acquisition module is specifically used for:
[0094] Acquire at least one image to be recognized captured by a first image capturing device.
[0095] Optionally, the device prediction module is specifically used to:
[0096] An image to be detected acquired by a second image acquisition device is acquired, and when a characteristic pattern exists in the acquired image to be detected, a movement route of the characteristic pattern is determined according to a plurality of acquired images to be detected.
[0097] Optionally, the control module is specifically used to:
[0098] The time when the characteristic pattern reaches at least one first image acquisition device is determined, and according to the determined time, only the at least one first image acquisition device is controlled to continue to acquire images.
[0099] Optionally, the code recognition module is specifically used to
[0100] In the case where the characteristic pattern meets the preset recognition condition, the code in the current image to be recognized is recognized to obtain a recognition result;
[0101] or,
[0102] When the characteristic pattern satisfies the preset recognition condition, it is detected whether there is a code in the current image to be recognized. When there is a code in the current image to be recognized, the code in the image to be recognized acquired after the current image to be recognized is recognized to obtain a recognition result.
[0103] In a third aspect, an embodiment of the present application provides a code reading device, including: a base, a controller, an image acquisition device and a support frame;
[0104] The base has a scanning table for placing the scanned object, and the support frame is arranged on a side of the base;
[0105] The image acquisition device is mounted on the top of the support frame so that the image acquisition device faces the scanning table;
[0106] The controller is disposed inside the base and communicates with the image acquisition device, and is used to execute any code reading method described in the first aspect above.
[0107] In a fourth aspect, an embodiment of the present application provides a code reading system, comprising: a conveyor belt for placing scanned objects, a controller, and a plurality of image acquisition devices;
[0108] The plurality of image acquisition devices are located above the conveyor belt and are arranged toward the conveyor belt;
[0109] The controller communicates with the multiple image acquisition devices and is used to execute any code reading method described in the first aspect above.
[0110] In a fifth aspect, an embodiment of the present application provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the code reading method described in any one of the first aspects is implemented.
[0111] Beneficial effects of the embodiments of the present application:
[0112] In the solution provided by the embodiment of the present application, an image to be identified acquired by a first image acquisition device is obtained; for the acquired current image to be identified, whether there is a characteristic pattern in the current image to be identified, wherein the characteristic pattern is used to represent the existence of a code in the image; if there is a characteristic pattern in the current image to be identified, whether the characteristic pattern meets a preset identification condition is determined; if the characteristic pattern meets the preset identification condition, the code in the image to be identified acquired by the first image acquisition device is identified to obtain an identification result. Since the code in the image is identified only after the characteristic pattern used to represent the existence of the code is detected in the image and it is confirmed that the characteristic pattern meets the preset identification condition, the accuracy of code identification is improved and the power consumption loss caused by invalid identification is avoided.
[0113] Of course, implementing any product or method of the present application does not necessarily require achieving all of the advantages described above at the same time. BRIEF DESCRIPTION OF THE DRAWINGS
[0114] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application, and for ordinary technicians in this field, other embodiments can also be obtained based on these drawings.
[0115] Figure 1 A flowchart of a code reading method provided in an embodiment of the present application;
[0116] Figure 2 Based on Figure 1 A schematic diagram of a first specific flow chart of the code reading method of the illustrated embodiment;
[0117] Figure 3 Based on Figure 2 A schematic diagram of a specific flow chart of the code reading method of the illustrated embodiment;
[0118] Figure 4 Based on Figure 1 A second specific flow chart of the code reading method of the illustrated embodiment;
[0119] Figure 5 Based on Figure 3 A schematic diagram of a specific flow chart of the code reading method of the illustrated embodiment;
[0120] Figure 6 Based on Figure 5 A schematic diagram of the position of the positioning frame of the characteristic pattern of the illustrated embodiment in each image;
[0121] Figure 7 Based on Figure 1 A third specific flow chart of the code reading method of the illustrated embodiment;
[0122] Figure 8 Based on Figure 3 Another specific flow chart of the code reading method of the illustrated embodiment;
[0123] Fig. 9 Based on Figure 1 A fourth specific flow chart of the code reading method of the illustrated embodiment;
[0124] Fig.10 A schematic diagram of the structure of a code reading device provided in an embodiment of the present application;
[0125] Fig.11 A schematic diagram of the structure of a code reading device provided in an embodiment of the present application;
[0126] Fig.12 A schematic diagram of the structure of a code reading system provided in an embodiment of the present application. DETAILED DESCRIPTION
[0127] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field based on the present application belong to the scope of protection of the present application.
[0128] In order to improve the accuracy of code recognition, the embodiments of the present application provide a code reading method, apparatus, code reading device, code reading system, computer-readable storage medium and computer program product. The code reading method provided in the embodiments of the present application is first introduced below.
[0129] The code reading method provided in the embodiment of the present application can be applied to a controller that communicates with an image acquisition device, wherein the controller can be a processor, or a computer, a server, etc., which is not specifically limited here. For the sake of clarity, it is hereinafter referred to as a controller. It should be noted that the code to be recognized in the embodiment of the present application can be a one-dimensional code, a two-dimensional code, or other identifiable code including content, etc., which is not specifically limited here.
[0130] like Figure 1 As shown, the code reading method may include:
[0131] S101: Acquire an image to be recognized acquired by a first image acquisition device.
[0132] S102, for the acquired current image to be identified, detect whether there is a characteristic pattern in the current image to be identified. If the detection result is yes, that is, there is a characteristic pattern in the current image to be identified, then execute step S103.
[0133] The characteristic pattern is used to indicate the existence of a code in the image.
[0134] S103, judging whether the characteristic pattern meets the preset recognition condition. If the judgment result is yes, that is, the characteristic pattern meets the preset recognition condition, then executing step S104.
[0135] S104, identifying the code in the image to be identified acquired by the first image acquisition device to obtain an identification result.
[0136] In the solution provided by the embodiment of the present application, an image to be identified acquired by a first image acquisition device is obtained; for the acquired current image to be identified, whether there is a characteristic pattern in the current image to be identified, wherein the characteristic pattern is used to represent the existence of a code in the image; if there is a characteristic pattern in the current image to be identified, whether the characteristic pattern meets a preset identification condition is determined; if the characteristic pattern meets the preset identification condition, the code in the image to be identified acquired by the first image acquisition device is identified to obtain an identification result. Since the code in the image is identified only after the characteristic pattern used to represent the existence of the code is detected in the image and it is confirmed that the characteristic pattern meets the preset identification condition, the accuracy of code identification is improved and the power consumption loss caused by invalid identification is avoided.
[0137] The first image acquisition device can acquire images of a scene to be identified (e.g., a scanning table, a conveyor belt, etc.). During this process, the controller can acquire the image acquired by the first image acquisition device as the image to be identified through communication with the first image acquisition device. The first image acquisition device can acquire images continuously or at a certain time interval, which is not specifically limited here.
[0138] After obtaining the image to be identified, the controller can detect whether there is a characteristic pattern in the acquired current image to be identified, so as to determine whether there is a code in the current image to be identified. Specifically:
[0139] On the one hand, the code itself appears in the image, which can directly indicate the presence of the code in the image; on the other hand, because the code on the object is usually accompanied by some specific identification patterns, such as the logo (logotype, trademark) on the object, the edges and corners of the object, etc., the identification pattern appears in the image, which can also indicate the possible presence of the code in the image; on the other hand, because the code is located on the object, the object appears in the image, which can also indicate the possible presence of the code in the image. On this basis, the code itself, the identification pattern that accompanies the code, or the object where the code is located can be used as a feature pattern, so that by detecting whether there is a feature pattern in the image, it can be determined whether there is a code in the image.
[0140] Therefore, the controller can extract features of the current image to be identified, and then match the extracted image features with the features of the feature pattern to determine whether there is a part similar to the feature pattern in the current image to be identified, thereby detecting whether there is a feature pattern in the current image to be identified. The above process of "detecting whether there is a feature pattern in the current image to be identified" can be implemented by a pre-trained deep learning model, a pre-trained neural network or an existing image recognition algorithm, which is not specifically limited here.
[0141] If there is no characteristic pattern in the current image to be identified, then there is a high probability that there is no code to be identified in the current image to be identified. In this case, the controller may not perform subsequent code reading steps for the current image to be identified, thereby improving processing efficiency.
[0142] If there is a characteristic pattern in the current image to be recognized, then there is a high probability that there is a code to be recognized in the current image to be recognized. In this case, in order to further improve the accuracy of code recognition, the controller can further filter out those images that truly meet the code recognition conditions. Specifically:
[0143] Simply detecting the presence of a characteristic pattern does not mean that the code can be accurately recognized, because there may be some interference factors in the image that make the image unable to meet the requirements for accurate code recognition. For example, although the characteristic pattern is detected, the confidence of the detected characteristic pattern is low. For another example, the characteristic pattern is in continuous motion and there may be a smear in the image. For another example, the characteristic pattern is located at the edge of the image and may be deformed in the image.
[0144] Therefore, after detecting the characteristic pattern from the current image to be identified, the controller can determine whether the characteristic pattern in the current image to be identified meets the preset identification conditions, thereby determining whether the code identification conditions are currently met.
[0145] Among them, when the controller determines whether the characteristic pattern meets the preset conditions, it can make a judgment based on the confidence and / or motion state of the characteristic pattern. The specific judgment method will be described in detail in the subsequent embodiments and will not be repeated here. In addition, based on the specific application scenario and the characteristics of the characteristic pattern, it is also possible to choose to judge whether the characteristic pattern meets the preset conditions based on other types of information, which is not specifically limited here. For example, it is possible to judge whether the characteristic pattern meets the preset conditions based on information such as the clarity and / or completeness of the characteristic pattern, and when the characteristic pattern is relatively clear and / or relatively complete, it is determined that the preset conditions are met.
[0146] When it is determined through the above steps that the characteristic pattern meets the preset recognition conditions, it means that the conditions for accurately recognizing the code are currently met. In this case, the controller can recognize the code in the image to be recognized captured by the first image acquisition device to obtain the recognition result. Specifically:
[0147] In a first embodiment, when the controller determines that the characteristic pattern in the current image to be recognized meets the preset recognition condition, the controller can recognize the code in the current image to be recognized to obtain a recognition result.
[0148] In the second embodiment, the controller can detect whether there is a code in the current image to be identified when determining that the characteristic pattern in the current image to be identified meets the preset identification conditions. If there is a code in the current image to be identified, the controller can identify the code in the image to be identified acquired after the current image to be identified to obtain the identification result. Among them, the method of detecting whether there is a code in the current image to be identified can be to match the characteristics of the preset code with the image characteristics of the current image to be identified to determine whether there is a code in the current image to be identified, or to decode the current image to be identified and determine whether there is a code in the current image to be identified based on whether the decoding is successful. The method of detecting whether there is a code in the current image to be identified is not specifically limited here.
[0149] In order to further improve the accuracy of code recognition, after detecting the presence of a code in the current image to be recognized, the controller can control the light source to turn on and fill in the light for the scene to be recognized. On this basis, for the image to be recognized acquired after the current image to be recognized, because it is acquired under the condition of fill in the light, sufficient fill in the light can enhance the contrast of the image, making the difference between the code and the surrounding background more obvious, and making the outline and lines of the code more clearly presented, so that the recognition algorithm can accurately extract the feature information of the code to recognize the code in the image, thereby further improving the accuracy of code recognition. In order to save power consumption and reduce light pollution, the controller can further control the light source to turn off after obtaining the recognition result.
[0150] In addition, when the detection result obtained by the controller after executing the above step S102 is no or the judgment result obtained after executing the above step S103 is no, that is, when there is no characteristic pattern in the current image to be identified or when the characteristic pattern does not meet the preset identification conditions, the controller can update the current image to be identified to the next image to be identified obtained, and return to step S102.
[0151] For example, the first image acquisition device sequentially acquires image 1 to be recognized and image 2 to be recognized. When the controller acquires image 1 to be recognized, it may determine image 1 to be recognized as the current image to be recognized, and execute steps S102-S104. During this process, if the detection result obtained by executing step S102 is no or the judgment result obtained by executing step S103 is no, the controller may update the current image to be recognized to image 2 to be recognized, and then execute steps S102-S104 based on image 2 to be recognized.
[0152] In the solution provided by the embodiment of the present application, the controller recognizes the code in the image only after detecting the presence of a characteristic pattern used to characterize the presence of a code in the image and confirming that the characteristic pattern meets the preset recognition condition, thereby improving the accuracy of code recognition. In addition, in the case where fill light is required for code reading, the controller in the embodiment of the present application will control the light source to turn on for code reading only when the characteristic pattern meets the preset recognition condition, or when the characteristic pattern meets the preset recognition condition and the code exists in the image. Compared with the existing method of controlling the light source to turn on for code reading when detecting distance changes or brightness changes, it can reduce power consumption and light pollution.
[0153] As an implementation method of the present application, Figure 2 As shown, when the controller executes the above step S103, it can be specifically implemented through step S201:
[0154] S201, based on the confidence and / or motion state of the feature pattern in the current image to be identified, determine whether the feature pattern meets the preset conditions. If the determination result is yes, that is, the feature pattern meets the preset conditions, execute step S104.
[0155] On the one hand, when the controller detects the presence of a characteristic pattern in the current image to be identified, it can further output the confidence of the characteristic pattern, wherein the confidence of the characteristic pattern represents the degree of credibility that the currently detected characteristic pattern is a pre-set standard characteristic pattern, which can be in the form of a score, rating, score, percentage, etc., and the quantification method of the confidence is not limited here.
[0156] On the other hand, in actual application scenarios, objects often enter the capture field of view of the first image acquisition device by being carried manually or transported by conveyor belts. Therefore, when the controller detects the presence of a feature pattern in the current image to be identified, it can further determine the motion state of the feature pattern based on each image to be identified acquired by the first image acquisition device, where the motion state of the feature pattern may include: the position of the feature pattern in each image to be identified.
[0157] Accordingly, during the image acquisition process, due to the influence of factors such as light and shooting angle, the characteristic pattern detected by the controller may have certain blur or deviation problems, which makes the confidence of the characteristic pattern relatively low. At the same time, during the image acquisition process, the movement of the characteristic pattern may be relatively fast, resulting in a smear or blur in the image to be identified, and the characteristic pattern may be located at the edge of the field of view of the first image acquisition device, resulting in deformation in the image to be identified.
[0158] In this case, if the subsequent code recognition is performed directly based on these feature patterns with low confidence, fast moving feature patterns or feature patterns at the edge of the field of view, it is likely to obtain an erroneous recognition result. Therefore, in order to further improve the accuracy of code recognition, the controller can determine whether the feature pattern meets the preset conditions based on the confidence and / or motion state of the feature pattern in the current image to be recognized. Specifically:
[0159] As for the confidence of the feature pattern, the controller can determine whether the confidence of the detected feature pattern is greater than the preset confidence threshold based on the confidence of the feature pattern. If the confidence of the detected feature pattern is greater than the preset confidence threshold, it means that the currently detected feature pattern is a pre-set standard feature pattern with a high degree of credibility, which can more reliably characterize the existence of a code in the image and has the conditions for accurately identifying the code.
[0160] The confidence threshold can be set by the user in advance according to the characteristics of the feature graph and the number of feature graphs that need to be identified simultaneously. For example, when the characteristics of the feature graph are relatively clear and concise, the user can set a higher confidence threshold; when the number of feature graphs that need to be identified simultaneously is relatively small, the user can set a higher confidence threshold.
[0161] For the motion state of the characteristic pattern, the controller can determine whether the detected characteristic pattern tends to be stationary ("tends to be stationary" here does not necessarily mean completely stationary, but can also mean that the speed of the characteristic pattern is less than a certain threshold) and / or determine whether the detected characteristic pattern is located in the central area of the image according to the motion state of the characteristic pattern. If the detected characteristic pattern tends to be stationary, and / or the detected characteristic pattern is located in the central area of the image, it means that the recognition condition of the currently detected characteristic pattern is good, which can more reliably represent the existence of a code in the image and has the conditions for accurately identifying the code.
[0162] Therefore, when the controller determines that the characteristic pattern meets the preset conditions based on the confidence and / or motion state of the characteristic pattern in the current image to be identified, it can execute step S104 to identify the code in the current image to be identified and obtain the identification result.
[0163] It should be noted that, when the judgment result of step S201 is no, the controller may determine that the characteristic pattern in the current image to be recognized does not meet the preset recognition condition.
[0164] In the solution provided in the embodiment of the present application, merely detecting the existence of a characteristic pattern is not sufficient to ensure accurate code recognition, and further judgment is made based on the confidence and / or motion state of the characteristic pattern. Subsequent code recognition operations are performed only when the characteristic pattern exists and the confidence and / or motion state of the characteristic pattern meet the requirements, thereby reducing misrecognition situations, avoiding invalid capture, and better ensuring the accuracy of code recognition.
[0165] As an implementation method of the present application, Figure 3 As shown, when the controller executes the above step S201, it can be specifically implemented through steps S301-S303:
[0166] S301, judging whether the confidence of the characteristic pattern in the current image to be recognized is greater than a preset confidence threshold. If the judgment result is yes, that is, the confidence of the characteristic pattern is greater than the preset confidence threshold, then executing step S302.
[0167] After detecting the presence of a characteristic pattern in the current image to be identified, the controller can determine whether the confidence of the detected characteristic pattern is greater than a preset confidence threshold. If the confidence of the detected characteristic pattern is greater than the preset confidence threshold, it means that the characteristic pattern currently detected is a preset standard characteristic pattern with a high degree of credibility, which can more reliably represent the presence of a code in the image and has the conditions for accurately identifying the code, and then the controller can execute step S202.
[0168] S302, continuously acquiring positions of characteristic patterns in subsequent multiple images to be recognized, and determining position changes of the characteristic patterns in the multiple consecutive images to be recognized based on the positions of the characteristic patterns in the images to be recognized.
[0169] In actual application scenarios, objects often enter the capture field of view of the first image acquisition device by being carried by hand or transmitted by conveyor belts. If the code on the object is recognized when it is in a moving state, it is likely that misrecognition will occur. Therefore, when the controller determines that the confidence of the characteristic pattern is greater than the preset confidence threshold, it can further determine whether the characteristic pattern is stable, and then recognize the code on it if the characteristic pattern is stable. Specifically:
[0170] Because the controller is continuously acquiring images to be identified acquired by the first image acquisition device, when the controller determines that there is a characteristic pattern in the current image to be identified and the confidence of the characteristic pattern is greater than a preset confidence threshold, the controller can detect the characteristic pattern in the multiple subsequent images to be identified that are continuously acquired according to the characteristic information of the characteristic pattern in the current image to be identified, thereby determining the position of the characteristic pattern in the multiple images to be identified, and then further determine the position change of the characteristic pattern in the multiple images to be identified based on the difference between the position parameters of the characteristic pattern in the multiple images to be identified.
[0171] For example, the controller determines that there is a feature pattern a in the image to be identified 1 (i.e., the current image to be identified), and the confidence of the feature pattern a is greater than the preset confidence threshold. After the image to be identified 1, the controller also continuously obtains the image to be identified 2, the image to be identified 3... the image to be identified N. Then, the controller can detect the feature pattern a in the image to be identified 2, the image to be identified 3... the image to be identified N according to the feature information of the feature pattern a in the image to be identified 1, and determine the position of the feature pattern a in the multiple images to be identified. Finally, the controller can determine the position change of the feature pattern a in the image to be identified 1, the image to be identified 2... the image to be identified N according to the determined position.
[0172] It should be noted here that the multiple continuous images to be recognized are not necessarily multiple real continuous images to be recognized, and the multiple images to be recognized may be separated by at least one frame of image.
[0173] For example, after the current image to be recognized, the controller obtains the 2nd to 10th frames of images, then the controller can extract frames of the obtained images and use the 2nd, 4th, 6th, 8th and 10th frames of images as multiple consecutive images to be recognized.
[0174] For another example, after the current image to be recognized, the controller obtains the 2nd to 10th frames of images, then the controller can first evaluate the image quality of these 10 frames of images respectively. Assuming that the image quality of the 2nd, 4th and 9th frames of images is higher than the preset image quality threshold, then the controller can use the 2nd, 4th and 9th frames of images as multiple consecutive images to be recognized.
[0175] S303, judging whether the position change of the characteristic pattern in the continuous plurality of images to be identified is less than the preset change threshold value according to the position change situation. If the judgment result is yes, that is, the position change of the characteristic pattern in the continuous plurality of images to be identified is less than the preset change threshold value, then executing step S104.
[0176] In order to determine whether the characteristic pattern is stable, a measurement standard (i.e., a preset change threshold) can be preset. After obtaining the position change of the characteristic pattern in a plurality of consecutive images to be identified, the controller can determine whether the position change of the characteristic pattern in a plurality of consecutive images to be identified is less than the preset change threshold according to the position change.
[0177] If the position change of the characteristic pattern in multiple consecutive images to be identified is less than the preset change threshold, it indicates that the position change of the characteristic pattern in the consecutive images is not obvious. At this time, it can be considered that the position of the characteristic pattern is relatively stable and has the conditions for accurately identifying the code. Then the controller can execute step S104 to identify the code in the current image to be identified and obtain the identification result.
[0178] The number of the continuous multiple images to be identified can be set by the user in advance according to the field of view of the image acquisition device and the moving speed of the characteristic pattern. For example, when the field of view of the image acquisition device is larger, the user can set the number of the continuous multiple images to be identified to a larger value, and when the moving speed of the characteristic pattern is faster, the user can set the number of the continuous multiple images to be identified to a larger value.
[0179] It should be noted that, when the judgment result of step S303 is no, the controller may determine that the feature pattern in the current image to be recognized does not meet the preset recognition condition.
[0180] In addition, in one embodiment, when the judgment result of step S303 is yes, that is, when the control device determines that the characteristic pattern is stable, it can control the light source to turn on to fill in the light of the collection field of the first image acquisition device, so that the image to be recognized subsequently acquired by the control device is the image to be recognized collected by the first image acquisition device under the condition of fill in the light, and the control device recognizes the code in the image to be recognized collected after the fill in the light, which can further improve the accuracy of code recognition. And in order to save power consumption and reduce light pollution, the controller can further control the light source to turn off after obtaining the recognition result.
[0181] In the solution provided by the embodiment of the present application, by analyzing the confidence and position change of the characteristic pattern, it is ensured that the code is recognized only when the characteristic pattern has both a high confidence and a relatively stable position in the continuous image. In this way, it is possible to effectively avoid code recognition errors caused by inaccurate or unstable characteristic patterns, and further improve the accuracy and reliability of code recognition.
[0182] As an implementation method of the present application, there may be multiple feature patterns in the current image to be recognized. In this case, Figure 4 As shown, when the controller executes steps S103-S104, it can be specifically implemented through steps S401-S402:
[0183] S401, for each characteristic pattern, determine whether the characteristic pattern meets the preset recognition condition. If the determination result is yes, that is, the characteristic pattern meets the preset recognition condition, then execute step S402.
[0184] In actual application scenarios, multiple objects may enter the capture field of view of the first image capture device together, and each of the multiple objects has a characteristic pattern. In this case, the controller can determine whether each characteristic pattern meets the preset conditions separately, and when it is determined that the characteristic pattern meets the preset recognition conditions, execute step S402 for the characteristic pattern.
[0185] Among them, when the controller determines whether each characteristic pattern meets the preset conditions separately for each characteristic pattern, it can execute the above steps S301-S303 for each characteristic pattern, determine whether the confidence of the characteristic pattern is greater than the preset confidence threshold, and determine whether the characteristic pattern tends to be stationary, so as to determine whether the characteristic pattern meets the preset recognition conditions.
[0186] S402, identifying a code corresponding to the characteristic pattern in the image to be identified acquired by the first image acquisition device to obtain a recognition result of the code.
[0187] In actual image recognition application scenarios, there are often situations where the current image to be recognized contains multiple feature graphics, and there is a one-to-one correspondence between these feature graphics and codes. When the controller determines that a feature graphic meets the preset conditions, it means that the code corresponding to the feature graphic is now in a state suitable for recognition, that is, the code corresponding to the feature graphic has all the elements that can be accurately recognized.
[0188] For example, if the characteristic graphic is a logo, and the preset conditions are "confidence threshold and stillness", then when the confidence of the logo on the object is greater than the preset confidence threshold, it indicates that the logo on the object is in a better state in the current image to be identified, and accordingly, the code on the object can also be in a better state. When the logo on the object is in a still state, it indicates that the object is in a still state, and accordingly, the code on the object is also in a still state. Therefore, when the logo on the object meets the preset conditions, it means that the code on the object has all the elements that can be accurately identified.
[0189] Therefore, for a characteristic pattern, when the controller determines that the characteristic pattern meets the preset conditions, it can determine the code corresponding to the characteristic pattern in the current image to be identified, thereby identifying the code and obtaining the identification result of the code.
[0190] In the solution provided by the embodiment of the present application, when there are multiple feature graphics in the image, the controller can determine whether the feature graphic meets the preset conditions for each feature graphic, and identify the code corresponding to the feature graphic when the preset conditions are met, thereby realizing refined recognition processing, and will not cause confusion or omission due to the coexistence of multiple feature graphics, effectively ensuring that each code can be accurately extracted when all factors that can be accurately identified are met, providing a reliable data foundation for subsequent code-based applications such as item tracing and data management.
[0191] As an implementation method of the present application, Figure 5 As shown, when the controller executes the above steps S302-S303, it can be specifically implemented through steps S501-S502:
[0192] S501, continuously obtaining the positions of the positioning frames of the feature graphics in the subsequent multiple images to be recognized, and determining the position change of the positioning frames of the feature graphics in the multiple consecutive images to be recognized based on the positions of the positioning frames of the feature graphics in the images to be recognized.
[0193] When the controller detects the presence of a characteristic pattern in the current image to be identified, the controller can further determine the positioning frame of the detected characteristic pattern. Specifically: when the controller detects the presence of a characteristic pattern in the current image to be identified, the controller can further determine the position information of the characteristic pattern (such as the center coordinates, boundary coordinates, etc. of the characteristic pattern), and then determine the positioning frame of the characteristic pattern based on the obtained position information of the characteristic pattern.
[0194] Accordingly, the controller may determine the position change based on the positioning frame of the characteristic pattern. Wherein, when determining the position change based on the positioning frame of the characteristic pattern, the position change may be determined based on the position of the center point or vertex of the positioning frame of the characteristic pattern in each image to be identified.
[0195] For example, the controller determines that there is a feature graphic a in the image to be identified 1 (i.e., the current image to be identified), and the confidence of the feature graphic a is greater than the preset confidence threshold. After the image to be identified 1, the controller also continuously obtains the image to be identified 2, the image to be identified 3... the image to be identified 6. Then, the controller can detect the feature graphic a in the image to be identified 2, the image to be identified 3... the image to be identified 6 according to the feature information of the feature graphic a in the image to be identified 1, and determine the position of the positioning frame of the feature graphic a in the multiple images to be identified. Finally, the controller can determine the position change of the positioning frame of the feature graphic a in the image to be identified 1, the image to be identified 2... the image to be identified 6 according to the position of the center point or vertex of the positioning frame in the image to be identified.
[0196] S502, judging whether the position change of the positioning frame of the characteristic pattern in the continuous multiple images to be identified is less than the preset change threshold according to the position change. If the judgment result is yes, that is, the position change of the positioning frame of the characteristic pattern in the continuous multiple images to be identified is less than the preset change threshold, then executing step S104.
[0197] Accordingly, the controller may determine whether the characteristic pattern is stable based on the position change of the positioning frame (the position change of the center point or the vertex of the positioning frame, etc.).
[0198] The preset change threshold can be set by the user in advance according to the positioning frame accuracy and the processing frame rate. For example, when the positioning frame accuracy is smaller, the user can set a higher preset change threshold, and when the processing frame rate (i.e., the number of images processed per unit time) is smaller, the user can set a higher preset change threshold.
[0199] Continuing with the above example, assume that the number of “consecutive multiple images to be identified” is 2, the preset change threshold is 2 pixels, and the feature pattern a (i.e. Figure 6The positions of the positioning frame of the two-dimensional code in the image to be identified 1, the image to be identified 2, ..., the image to be identified 6 are as follows: Figure 6 As shown, the position change amount of the positioning frame of characteristic pattern a between the image to be identified 1 and the image to be identified 2 is 5 pixels, the position change amount between the image to be identified 2 and the image to be identified 3 is 4 pixels, the position change amount between the image to be identified 3 and the image to be identified 4 is 3 pixels, the position change amount between the image to be identified 4 and the image to be identified 5 is 0 pixels, and the position change amount between the image to be identified 5 and the image to be identified 6 is 0 pixels. Then, because the position change amount of the positioning frame of characteristic pattern a in the three consecutive images to be identified is less than 2 pixels, it can be determined that characteristic pattern a meets the preset conditions.
[0200] In the solution provided by the embodiment of the present application, the controller determines whether the characteristic pattern meets the preset conditions by determining the positioning frame of the characteristic pattern and judging whether the characteristic pattern meets the preset conditions based on the position change of the positioning frame of the characteristic pattern in each image to be recognized, so as to accurately judge whether the position of the characteristic pattern is stable in the continuous images. The code is then recognized only when the position of the characteristic pattern is relatively stable in multiple continuous images. In this way, code recognition errors caused by inaccurate or unstable characteristic patterns can be effectively avoided, further improving the accuracy and reliability of code recognition.
[0201] As an implementation method of the present application, Figure 7 As shown, when the controller executes the above step S102, it can be implemented through step S701:
[0202] S701, for the acquired current image to be identified, detect whether there is a characteristic pattern in the preset region of interest in the current image to be identified. If the detection result is yes, that is, there is a characteristic pattern in the preset region of interest in the current image to be identified, then execute step S103.
[0203] On the one hand, in the optical system of the image acquisition device, the lens will produce a certain degree of distortion. Generally speaking, the lens distortion is more obvious at the edge of the image. When the code is close to the center of the image, the distortion is minimal and can maintain a more regular shape. On the other hand, in the scene where the code is supplemented with light, the edge area of the image may produce shadows or overly bright areas due to the angle of the light, while the central area can obtain more suitable lighting conditions.
[0204] Therefore, the area near the center of the image can be determined as the region of interest. In this way, when the controller detects whether there is a characteristic pattern in the current image to be identified, it can no longer fully scan the entire current image to be identified, but focus on the preset region of interest in the image, that is, detect whether there is a characteristic pattern in the preset region of interest in the current image to be identified. If the detection result is yes, the controller can then execute step S103 to determine whether the detected characteristic pattern meets the preset recognition condition.
[0205] In the solution provided by the embodiment of the present application, since the controller only detects the characteristic pattern in the region of interest in the image, compared with detecting the entire image, unnecessary calculation and processing processes are reduced. Not only can computing resources be saved, but also problems such as image display interference that may be caused by too many detection operations on the entire image can be avoided to a certain extent. In addition, when the characteristic pattern is located in the region of interest in the image, it is less affected by distortion and illumination. At this time, detecting it and triggering the subsequent code reading process can greatly improve the accuracy of the subsequent code reading.
[0206] As an implementation method of the present application, when the controller determines through steps S301-S303 that the characteristic pattern meets the preset recognition condition, such as Figure 8 As shown, when the controller executes the above step S104, it can be specifically implemented through steps S801-S802:
[0207] S801, determining a target position of a code in an image to be identified acquired by a first image acquisition device based on positions of a feature pattern in a plurality of consecutive images to be identified.
[0208] When the judgment result obtained by the controller when executing step S303 is yes (that is, the controller determines that the position change of the characteristic pattern in a plurality of consecutive images to be identified is less than a preset change threshold), the controller can determine the target position of the code in the image to be identified captured by the first image acquisition device based on the position of the characteristic pattern in the plurality of consecutive images to be identified.
[0209] Among them, the position of the characteristic pattern in the multiple consecutive images to be identified can be the position of the characteristic pattern in the last image to be identified in the multiple consecutive images to be identified, or it can be the position of the characteristic pattern in any image to be identified in the multiple consecutive images to be identified, or it can be the average value of the positions of the characteristic pattern in the multiple consecutive images to be identified, and no specific limitation is made here.
[0210] Regarding the specific method of determining the code position based on the characteristic pattern position, the controller may implement it in the following manners, but not limited to:
[0211] In one embodiment, when the characteristic pattern is the code itself, the controller can directly determine the position of the characteristic pattern in a plurality of consecutive images to be identified as the target position of the code in the image to be identified captured by the first image acquisition device.
[0212] For example, a plurality of consecutive images to be identified are image 1 to be identified, image 2 to be identified, and image 3 to be identified. Assuming that the coordinates of the center point of the positioning frame of the characteristic pattern in image 3 to be identified are (4, 5), the controller can determine the pixel point with coordinates (4, 5) in the image to be identified acquired by the first image acquisition device as the center point of the positioning frame of the code.
[0213] In another embodiment, when the above-mentioned characteristic pattern is an identification pattern located on the same target object as the code and having a fixed relative position relationship with the code, since the code and the identification pattern have a fixed relative position relationship, for example, for the same type of object, the code is always in a certain direction of the identification pattern and has a fixed distance from the identification pattern, etc. On this basis, the controller can determine the target position of the code in the image to be identified captured by the first image acquisition device based on the position of the detected characteristic pattern (i.e., the identification pattern) in a plurality of consecutive images to be identified and the preset fixed relative position relationship between the identification pattern and the code.
[0214] S802: Identify the target position in the image to be identified acquired by the first image acquisition device to obtain a recognition result.
[0215] After the controller determines the target position of the code in the image to be identified captured by the first image acquisition device, when performing code recognition on the image to be identified captured by the first image acquisition device, there is no need to perform real-time detection on the image to be identified to determine the position of the code. Instead, the controller can directly identify the target position in the image to be identified to obtain the recognition result.
[0216] In the solution provided in the embodiment of the present application, when the controller determines the position of the characteristic pattern in a plurality of consecutive images to be identified, the controller can further determine the position of the code based on the position of the characteristic pattern. In this way, when the controller identifies the code in the image to be identified, there is no need to determine the position of the code by comprehensively detecting the image to be identified. Instead, the controller can directly determine the position of the code in the image to be identified based on the position of the code determined by the position of the characteristic pattern, and then directly obtain the code from the determined position and identify it to obtain the result, which can greatly improve the efficiency of code recognition. At the same time, the position of the characteristic pattern can be used to more accurately locate the code, effectively improving the accuracy of code recognition.
[0217] As an implementation method of the embodiment of the present application, the controller can communicate with the host computer. On this basis, the controller can also perform the following steps:
[0218] Receive the configuration information of the characteristic graphic sent by the host computer to determine whether the characteristic graphic is a code or an identification pattern.
[0219] In actual application scenarios, the user can configure the characteristic graphic used by the controller when executing the code reading method provided by the embodiment of the present application to be a code or an identification pattern according to actual usage requirements. For example, when the identification pattern structure on the object is relatively simple and the features are relatively clear, detecting the identification pattern is more accurate and convenient than detecting the code. In this case, the user can configure the characteristic graphic to be the identification pattern. For another example, when the controller executes the code reading method, there are many types of objects, and the identification patterns of each object are different. In this case, detecting the code is more accurate and convenient than detecting the identification pattern. In this case, the user can configure the characteristic graphic to be a code.
[0220] Based on the above, the user can determine the characteristic graphic as a code or an identification pattern through configuration operation in the interface of the host computer to generate configuration information. Among them, the configuration operation can be that the user manually selects the characteristic graphic as a code or an identification pattern from the codes and identification patterns displayed in the interface of the host computer, the configuration operation can also be that the user manually marks a pattern of the object as an identification pattern on the object image displayed in the interface of the host computer, and the configuration operation can also be that the user manually draws a pattern as an identification pattern in the interface of the host computer, etc. The specific form of the configuration operation is not limited here.
[0221] After the upper computer generates the configuration information, it can send the configuration information to the controller, and then the controller can determine whether the characteristic pattern to be detected by itself is a code or an identification pattern according to the configuration information. Accordingly, when the characteristic pattern is a code, the controller can specifically "detect whether there is a code in the current image to be identified, and determine whether the code meets the preset identification conditions" when "detecting whether there is a characteristic pattern in the current image to be identified, and determining whether the characteristic pattern meets the preset identification conditions". When the characteristic pattern is an identification pattern, the controller can specifically "detect whether there is a identification pattern in the current image to be identified, and determine whether the identification pattern meets the preset identification conditions" when "detecting whether there is a characteristic pattern in the current image to be identified, and determining whether the characteristic pattern meets the preset identification conditions".
[0222] In addition, based on the fact that the controller can communicate with the host computer, the controller can also perform the following steps:
[0223] Send the recognition results to the host computer.
[0224] The host computer usually has a larger storage capacity and stronger computing power. Therefore, after obtaining the recognition result, the controller can further send the recognition result to the host computer. The host computer can store the recognition result to record and trace the object corresponding to the code, or uniformly integrate, analyze and manage the numerous recognition results from different controllers.
[0225] In the solution provided by the embodiment of the present application, the controller communicates with the host computer, and the user performs flexible and diverse configuration operations on the host computer interface to determine whether the characteristic graphic is a code or an identification pattern, which enables the controller to accurately determine the detection object based on the actual object situation and needs, and can choose a more accurate and convenient detection method in different scenarios, thereby improving the accuracy and efficiency of code reading. In addition, the controller sends the recognition results to the host computer, which, with the help of the host computer's larger storage capacity and stronger computing power, can record and trace the objects corresponding to the code and uniformly integrate, analyze and manage many recognition results.
[0226] As an implementation method of the present application, Fig. 9 As shown, before executing the above step S101, the controller may further execute steps S901-S902:
[0227] S901, acquiring a movement path of a characteristic graphic, and based on the movement path, predicting at least one first image acquisition device that can subsequently acquire the characteristic graphic.
[0228] In order to achieve accurate code reading, a multi-area collaborative image acquisition strategy is adopted in some scenarios, that is, there are multiple first image acquisition devices, and each first image acquisition device is assigned to focus on the code recognition task in a specific area. This division of labor and cooperation between the first image acquisition devices helps to improve the overall code reading accuracy and efficiency.
[0229] On this basis, in order to minimize unnecessary image acquisition and reduce resource consumption, the controller can first obtain the movement path of the characteristic graphic, and then predict at least one first image acquisition device that can subsequently capture the characteristic graphic based on the movement path of the characteristic graphic and the pre-recorded positions of each first image acquisition device.
[0230] For the motion route of the characteristic graphic, the controller may select a corresponding motion route determination method according to a specific application scenario. Several examples are given below, but the motion route determination method is not specifically limited.
[0231] In the first example, a second image acquisition device may be provided before the first image acquisition device, and the controller may acquire the image to be detected acquired by the second image acquisition device, and detect whether a characteristic pattern exists in the acquired image to be detected. If so, the controller may determine the position of the characteristic pattern in a plurality of images to be detected acquired subsequently, and determine the movement route of the characteristic pattern based on the position of the characteristic pattern in each image to be detected.
[0232] Of course, when determining that there is a characteristic pattern in the image to be detected, the controller may further determine whether the characteristic pattern meets a preset condition, for example, determining whether the confidence of the characteristic pattern is greater than a preset confidence threshold.
[0233] In the second example, since the object generally moves in a close to straight line when it is moved by a conveyor belt or the like, a grating may be provided before the first image acquisition device, and the controller may obtain real-time detection data of the grating. When the grating detects that an object passes through a certain position, the controller may use a straight line passing through the position and perpendicular to the setting direction of the grating as the movement route of the characteristic figure.
[0234] In the third example, there may be multiple independent detection lines in the code reading scene, and a first image acquisition device is arranged on each detection line. In this case, a grating, a camera or other detection device may be arranged in front of each first image acquisition device. When the detection device detects that an object passes through a certain detection line, the controller may determine the transmission direction of the object on the detection line as the movement route of the characteristic pattern.
[0235] S902, controlling only at least one first image acquisition device to continue acquiring images.
[0236] After determining at least one first image acquisition device that can subsequently capture the characteristic pattern, the controller can control only the predicted at least one first image acquisition device to continue capturing images, while other first image acquisition devices can be controlled not to capture images, thereby reducing the overall power consumption of each first image acquisition device and extending the service life of each first image acquisition device.
[0237] In one implementation, after determining the at least one first image acquisition device, the controller can directly control the at least one first image acquisition device to acquire images, thereby avoiding missing feature patterns.
[0238] In the second embodiment, as mentioned above, due to the influence of factors such as lens distortion and illumination, when the characteristic pattern is located at the center of the capture field of view of the first image capture device, the first image capture device captures the characteristic pattern, and can capture the details and features of the characteristic pattern more clearly. Therefore, after determining the at least one first image capture device, the controller can first determine the time when the characteristic pattern arrives at the at least one first image capture device, and then control the at least one first image capture device to perform image capture within a certain time range around the time, so as to ensure that the details and features of the characteristic pattern can be clearly captured, and to minimize the invalid acquisition of the first image capture device and reduce resource consumption.
[0239] Among them, regarding "the time when the characteristic pattern arrives at the first image acquisition device".
[0240] In some scenarios, the distance between the first image acquisition device and the second image acquisition device can be predetermined, and the moving speed of the object can also be predetermined (for example, the object is transported at a fixed speed by a conveyor belt). On this basis, the transmission time of the object between the first image acquisition device and the second image acquisition device can be predetermined. In this way, after the characteristic pattern is captured by the second image acquisition device, the time when the characteristic pattern arrives at the first image acquisition device can be directly determined based on the above predetermined transmission time.
[0241] In other scenarios, the distance between the first image acquisition device and the second image acquisition device can be determined in advance, but the moving speed of the object is not fixed (for example, the object is moved by hand). On this basis, the controller can determine the movement route of the characteristic graphic and the position information of each first image acquisition device, and calculate in real time the time when the characteristic graphic arrives at the first image acquisition device.
[0242] Accordingly, when the controller executes step S101, it can be specifically implemented through step S903:
[0243] S903: Acquire an image to be recognized acquired by at least one first image acquisition device.
[0244] Correspondingly, based on the controller controlling only at least one first image acquisition device to continue acquiring images, when acquiring the image to be recognized, the controller specifically acquires the image to be recognized acquired by the at least first image acquisition device.
[0245] In the solution provided in the embodiment of the present application, the solution uses a multi-region collaborative image acquisition strategy to improve the overall code reading accuracy and efficiency by using multiple first image acquisition devices to work together. In addition, based on the movement route of the acquired characteristic graphic, the subsequent acquisition device is predicted, which effectively reduces unnecessary image acquisition, reduces resource consumption, reduces the overall power consumption of each first image acquisition device and extends its service life. After determining the acquisition device, its acquisition can be directly controlled to avoid missing acquisition, or the arrival time of the characteristic graphic can be determined first, and acquisition can be carried out within a specific time range, which can not only ensure clear capture of the details and features of the characteristic graphic, but also reduce invalid acquisition.
[0246] Corresponding to the above-mentioned code reading method, the embodiment of the present application also provides a code reading device, such as Fig.10 As shown, the device may include:
[0247] The image acquisition module 1001 is used to acquire the image to be recognized acquired by the first image acquisition device;
[0248] The characteristic pattern detection module 1002 is used to detect whether there is a characteristic pattern in the current image to be identified, wherein the characteristic pattern is used to indicate the existence of a code in the image;
[0249] The judging module 1003 is used to judge whether the characteristic pattern meets the preset recognition condition when there is a characteristic pattern in the current image to be recognized;
[0250] The code recognition module 1004 is used to recognize the code in the image to be recognized captured by the first image acquisition device and obtain a recognition result when the characteristic pattern meets the preset recognition condition.
[0251] In the solution provided by the embodiment of the present application, an image to be identified acquired by a first image acquisition device is obtained; for the acquired current image to be identified, whether there is a characteristic pattern in the current image to be identified, wherein the characteristic pattern is used to represent the existence of a code in the image; if there is a characteristic pattern in the current image to be identified, whether the characteristic pattern meets a preset identification condition is determined; if the characteristic pattern meets the preset identification condition, the code in the image to be identified acquired by the first image acquisition device is identified to obtain an identification result. Since the code in the image is identified only after the characteristic pattern used to represent the existence of the code is detected in the image and it is confirmed that the characteristic pattern meets the preset identification condition, the accuracy of code identification is improved and the power consumption loss caused by invalid identification is avoided.
[0252] As an implementation of the embodiment of the present application, the above-mentioned determination module 1003 can be specifically used for:
[0253] Based on the confidence and / or motion state of the characteristic pattern in the current image to be identified, it is determined whether the characteristic pattern meets the preset conditions.
[0254] As an implementation of the embodiment of the present application, the above-mentioned determination module 1003 may include:
[0255] A confidence judgment unit, used to judge whether the confidence of the characteristic pattern in the current image to be recognized is greater than a preset confidence threshold;
[0256] a position change determination unit, configured to, when the confidence of the characteristic pattern is greater than a preset confidence threshold, continuously obtain the position of the characteristic pattern in the image to be identified in a plurality of subsequent images to be identified, and determine the position change of the characteristic pattern in the plurality of consecutive images to be identified based on the position of the characteristic pattern in the image to be identified;
[0257] The position change judgment unit is used to determine whether the characteristic pattern meets the preset recognition condition according to the position change situation when the position change amount in a plurality of consecutive images to be recognized is less than a preset change amount threshold.
[0258] As an implementation of the embodiment of the present application, when there are multiple feature graphics in the current image to be identified, the above-mentioned determination module 1003 can be specifically used to:
[0259] For each characteristic pattern, the above-mentioned step of judging whether the confidence of the characteristic pattern in the current image to be identified is greater than a preset confidence threshold is performed; when the confidence of the characteristic pattern is greater than the preset confidence threshold, continuously obtaining the position of the characteristic pattern in the image to be identified in the subsequent multiple images to be identified; based on the position of the characteristic pattern in the image to be identified, determining the position change of the characteristic pattern in the consecutive multiple images to be identified; according to the position change, when the position change amount in the consecutive multiple images to be identified is less than the preset change amount threshold, determining that the characteristic pattern meets the preset identification condition.
[0260] The code recognition module 1004 can be specifically used for:
[0261] For each characteristic pattern, when the characteristic pattern meets the preset recognition condition, the code corresponding to the characteristic pattern in the image to be recognized acquired by the first image acquisition device is recognized to obtain a recognition result of the code.
[0262] As an implementation of the embodiment of the present application, the above-mentioned determination module 1003 can be specifically used for:
[0263] Continuously obtain the position of the positioning frame of the characteristic pattern in the subsequent multiple images to be identified, determine the position change of the positioning frame of the characteristic pattern in the multiple consecutive images to be identified based on the position of the positioning frame of the characteristic pattern in the multiple consecutive images to be identified, and according to the position change, when the position change of the positioning frame in the multiple consecutive images to be identified is less than a preset change threshold, determine that the characteristic pattern meets the preset recognition condition.
[0264] As an implementation of the embodiment of the present application, the above device may further include:
[0265] a light source control module, configured to control the light source to be turned on, so as to fill in the capture field of view of the first image capture device, when the position change in the plurality of consecutive images to be recognized is less than the preset change threshold;
[0266] The code recognition module 1004 can be specifically used for:
[0267] Recognize the code in the image to be recognized acquired by the first image acquisition device under the condition of fill light, and obtain a recognition result;
[0268] The light source control module is also used to control the light source to turn off after the code recognition module 1004 obtains the recognition result.
[0269] As an implementation of the embodiment of the present application, the code recognition module 1004 may include:
[0270] a target position determination unit, which determines the target position of the code in the image to be identified acquired by the first image acquisition device based on the position of the characteristic pattern in the plurality of consecutive images to be identified;
[0271] The recognition unit is used to recognize the target position in the image to be recognized acquired by the first image acquisition device to obtain a recognition result.
[0272] As an implementation of an embodiment of the present application, the target position determination unit may be specifically used for:
[0273] In the case where the characteristic pattern is the code itself, determining the position of the characteristic pattern in the plurality of consecutive images to be identified as the target position of the code in the images to be identified acquired by the first image acquisition device;
[0274] In the case where the characteristic pattern is an identification pattern that is located on the same target object as the code and has a fixed relative position relationship with the code; based on the position of the characteristic pattern in the multiple consecutive images to be identified and the fixed relative position relationship between the code and the identification pattern, the target position of the code in the image to be identified captured by the first image acquisition device is determined.
[0275] As an implementation of the embodiment of the present application, the above-mentioned characteristic pattern detection module 1002 can be specifically used for:
[0276] Detect whether there is a characteristic pattern in the preset region of interest in the current image to be recognized.
[0277] As an implementation method of the embodiment of the present application, the above-mentioned characteristic pattern is an identification pattern located on the same target object as the code and having a fixed relative position relationship with the code;
[0278] The code recognition module 1004 can be specifically used for:
[0279] Based on the fixed relative position relationship between the code and the identification pattern, the code is obtained from the image to be identified acquired by the first image acquisition device for identification to obtain an identification result.
[0280] As an implementation of the embodiment of the present application, the above device may further include:
[0281] The configuration information receiving module is used to receive the configuration information of the characteristic graphic sent by the host computer to determine whether the characteristic graphic is a code or an identification pattern, wherein the configuration information of the characteristic graphic is configured by the user in the interface of the host computer, and the configuration information of the characteristic graphic includes: a code or an identification pattern.
[0282] As an implementation of the embodiment of the present application, the above-mentioned device also includes:
[0283] A device prediction module, used to obtain a movement path of the characteristic pattern, and based on the movement path, predict at least one first image acquisition device that can subsequently acquire the characteristic pattern;
[0284] A control module, used for controlling only the at least one first image acquisition device to continue to acquire images;
[0285] The above-mentioned image acquisition module 1001 can be specifically used for:
[0286] Acquire at least one image to be recognized captured by a first image capturing device.
[0287] As an implementation of the embodiment of the present application, the above-mentioned device prediction module can be specifically used for:
[0288] An image to be detected acquired by a second image acquisition device is acquired, and when a characteristic pattern exists in the acquired image to be detected, a movement route of the characteristic pattern is determined according to a plurality of acquired images to be detected.
[0289] As an implementation method of the embodiment of the present application, the above control module can be specifically used for:
[0290] The time when the characteristic pattern reaches at least one first image acquisition device is determined, and according to the determined time, only the at least one first image acquisition device is controlled to continue to acquire images.
[0291] As an implementation of the embodiment of the present application, the code recognition module 1004 may be specifically used for:
[0292] In the case where the characteristic pattern meets the preset recognition condition, the code in the current image to be recognized is recognized to obtain a recognition result;
[0293] or,
[0294] When the characteristic pattern satisfies the preset recognition condition, it is detected whether there is a code in the current image to be recognized. When there is a code in the current image to be recognized, the code in the image to be recognized acquired after the current image to be recognized is recognized to obtain a recognition result.
[0295] The present application also provides a code reading device, such as Fig.11 As shown, Fig.11 A schematic diagram of the structure of a code reading device provided in an embodiment of the present application, the code reading device may include: a base 1101, a controller (not shown in the figure), an image acquisition device 1102 and a support frame 1103;
[0296] The base 1101 has a scanning table for placing the scanned object, and the support frame 1103 is arranged on a side of the base 1101;
[0297] An image acquisition device 1102 is mounted on top of the support frame 1103 so that the image acquisition device 1102 faces the scanning table;
[0298] The controller is disposed inside the base 1101 and communicates with the image acquisition device 1102 to execute the code reading method described in any of the above embodiments.
[0299] The present application also provides a code reading system. Fig.12 As shown, Fig.12 A schematic diagram of the structure of a code reading system provided in an embodiment of the present application, the code reading system may include: a conveyor belt 1201 for placing scanned objects, a controller 1202 and a plurality of image acquisition devices 1203;
[0300] A plurality of image acquisition devices 1203 are located above the conveyor belt 1201 and are arranged toward the conveyor belt 1201;
[0301] The controller 1202 communicates with the plurality of image acquisition devices 1203 to execute the code reading method described in any of the above embodiments.
[0302] The controller may include: a memory for storing a computer program; and a processor for implementing the code reading method described in any of the above embodiments when executing the program stored in the memory.
[0303] Furthermore, the controller may further include a communication bus and / or a communication interface, and the processor, the communication interface, and the memory communicate with each other via the communication bus.
[0304] The communication bus mentioned in the above controller can be a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus, etc. The communication bus can be divided into an address bus, a data bus, a control bus, etc. The communication interface is used for communication between the above controller and other devices.
[0305] The memory may include a random access memory (RAM) or a non-volatile memory (NVM), such as at least one disk memory. Optionally, the memory may also be at least one storage device located away from the aforementioned processor.
[0306] The above-mentioned processor can be a general-purpose processor, including a central processing unit (CPU), a network processor (NP), etc.; it can also be a digital signal processor (DSP), an application specific integrated circuit (ASIC), a field programmable gate array (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components.
[0307] In another embodiment provided in the present application, a computer-readable storage medium is provided, in which a computer program is stored. When the computer program is executed by a processor, the steps of the code reading method described in any of the above embodiments are implemented.
[0308] In another embodiment provided by the present application, a computer program product including instructions is also provided, and when the computer is run on the computer, the computer executes the code reading method described in any of the above embodiments.
[0309] In the above embodiments, it can be implemented in whole or in part by software, hardware, firmware or any combination thereof. When implemented using software, it can be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, the process or function described in the embodiment of the present application is generated in whole or in part. The computer may be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions may be stored in a computer-readable storage medium, or transmitted from one computer-readable storage medium to another computer-readable storage medium. For example, the computer instructions may be transmitted from a website site, computer, server or data center to another website site, computer, server or data center by wired (e.g., coaxial cable, optical fiber, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) means. The computer-readable storage medium may be any available medium that a computer can access or a data storage device such as a server or data center that includes one or more available media integrated. The available medium may be a magnetic medium (e.g., a floppy disk, a hard disk, a tape), an optical medium (e.g., a DVD), or a solid-state hard disk (SSD), etc.
[0310] It should be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the sentence "comprise a ..." do not exclude the existence of other identical elements in the process, method, article or device including the elements.
[0311] Each embodiment in this specification is described in a related manner, and the same or similar parts between the embodiments can be referred to each other, and each embodiment focuses on the differences from other embodiments. In particular, for the embodiments of the code reading device, the code reading equipment, the code reading system, the computer-readable storage medium, and the computer program product, since they are basically similar to the code reading method embodiment, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiment.
[0312] The above description is only a preferred embodiment of the present application and is not intended to limit the protection scope of the present application. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application are included in the protection scope of the present application.
Claims
1. A code reading method, characterized in that: The method comprises: Acquire an image to be recognized acquired by a first image acquisition device; For the acquired current image to be identified, detecting whether there is a characteristic pattern in the current image to be identified, wherein the characteristic pattern is used to indicate the presence of a code in the image; In the case where the characteristic pattern exists in the current image to be identified, determining whether the characteristic pattern meets a preset identification condition; When the characteristic pattern meets the preset recognition condition, the code in the image to be recognized acquired by the first image acquisition device is recognized to obtain a recognition result.
2. The method according to claim 1, characterized in that The determining whether the characteristic pattern meets a preset recognition condition includes: Based on the confidence and / or motion state of the characteristic pattern in the current image to be identified, it is determined whether the characteristic pattern meets a preset condition.
3. The method according to claim 2, characterized in that The determining whether the characteristic pattern meets a preset condition based on the confidence and / or motion state of the characteristic pattern in the current image to be identified includes: Determining whether the confidence of the characteristic pattern in the current image to be identified is greater than a preset confidence threshold; When the confidence of the characteristic pattern is greater than the preset confidence threshold, continuously acquiring the positions of the characteristic patterns in the image to be identified in a subsequent plurality of images to be identified; Based on the position of the characteristic pattern in the image to be identified, determining the position change of the characteristic pattern in a plurality of consecutive images to be identified; According to the position change situation, when the position change amount in a plurality of consecutive images to be identified is less than a preset change amount threshold, it is determined that the characteristic pattern meets the preset identification condition.
4. The method according to claim 3, characterized in that When there are multiple feature graphics in the current image to be identified, For each characteristic pattern, determining whether the confidence of the characteristic pattern in the current image to be identified is greater than a preset confidence threshold; if the confidence of the characteristic pattern is greater than the preset confidence threshold, continuously acquiring the positions of the characteristic patterns in the subsequent multiple images to be identified in the image to be identified; Based on the position of the characteristic pattern in the image to be identified, determining the position change of the characteristic pattern in a plurality of consecutive images to be identified; and according to the position change, when the position change amount in the plurality of consecutive images to be identified is less than a preset change amount threshold, determining that the characteristic pattern meets a preset identification condition; When the characteristic pattern satisfies the preset recognition condition, recognizing the code in the image to be recognized acquired by the first image acquisition device to obtain a recognition result includes: For each characteristic pattern, when the characteristic pattern meets the preset recognition condition, the code corresponding to the characteristic pattern in the image to be recognized acquired by the first image acquisition device is recognized to obtain a recognition result of the code.
5. The method according to claim 3, characterized in that: The method of continuously acquiring the positions of the characteristic patterns in the subsequent multiple images to be identified; determining the position change of the characteristic pattern in the multiple consecutive images to be identified based on the position of the characteristic pattern in the multiple images to be identified; and determining that the characteristic pattern meets the preset identification condition when the position change amount in the multiple consecutive images to be identified is less than a preset change amount threshold according to the position change, includes: Continuously obtain the position of the positioning frame of the characteristic pattern in the subsequent multiple images to be identified; based on the position of the positioning frame of the characteristic pattern in the image to be identified, determine the position change of the positioning frame of the characteristic pattern in the multiple consecutive images to be identified; according to the position change, when the position change amount of the positioning frame in the multiple consecutive images to be identified is less than a preset change amount threshold, determine that the characteristic pattern meets the preset recognition condition.
6. The method according to claim 3, characterized in that: In a case where the position change in the plurality of consecutive images to be identified is less than the preset change threshold, the method further includes: Controlling the light source to turn on to provide supplementary light to the capture field of view of the first image capture device; The step of recognizing the code in the image to be recognized acquired by the first image acquisition device to obtain a recognition result includes: The code in the image to be identified which is acquired by the first image acquisition device under the condition of supplementary light is identified to obtain an identification result, and the light source is controlled to be turned off after the identification result is obtained.
7. The method according to claim 3, characterized in that The step of recognizing the code in the image to be recognized acquired by the first image acquisition device to obtain a recognition result includes: Determine the target position of the code in the image to be recognized acquired by the first image acquisition device based on the position of the characteristic pattern in the plurality of consecutive images to be recognized; The target position in the image to be identified acquired by the first image acquisition device is identified to obtain an identification result.
8. The method according to claim 7, characterized in that In the case where the characteristic pattern is the code itself, determining the target position of the code in the image to be identified acquired by the first image acquisition device based on the position of the characteristic pattern in the plurality of consecutive images to be identified includes: Determine the position of the characteristic pattern in the plurality of consecutive images to be identified as the target position of the code in the image to be identified acquired by the first image acquisition device; In the case where the characteristic pattern is an identification pattern that is located on the same target object as the code and has a fixed relative position relationship with the code; determining the target position of the code in the image to be identified acquired by the first image acquisition device based on the position of the characteristic pattern in the plurality of consecutive images to be identified includes: Based on the position of the characteristic pattern in the plurality of consecutive images to be identified and the fixed relative position relationship between the code and the identification pattern, the target position of the code in the image to be identified acquired by the first image acquisition device is determined.
9. The method according to any one of claims 1 to 8, characterized in that: The detecting whether there is a characteristic pattern in the current image to be identified includes: Detect whether there is a characteristic pattern in a preset region of interest in the current image to be recognized.
10. The method according to any one of claims 1 to 8, characterized in that: The method further comprises: Receive the configuration information of the characteristic graphic sent by the host computer to determine whether the characteristic graphic is a code or an identification pattern, wherein the configuration information of the characteristic graphic is configured by the user in the interface of the host computer, and the configuration information of the characteristic graphic includes: a code or an identification pattern.
11. The method according to any one of claims 1 to 8, characterized in that: Before acquiring the image to be recognized acquired by the first image acquisition device, the method further includes: Acquire a movement path of the characteristic pattern, and based on the movement path, predict at least one first image acquisition device that can subsequently acquire the characteristic pattern; Controlling only the at least one first image acquisition device to continue acquiring images; The step of acquiring the image to be recognized acquired by the first image acquisition device comprises: Acquire an image to be recognized captured by the at least one first image capturing device.
12. The method according to claim 11, characterized in that The step of obtaining the motion path of the characteristic graphic comprises: Acquire an image to be detected acquired by a second image acquisition device; In the case where the characteristic pattern exists in the acquired image to be detected, the movement route of the characteristic pattern is determined according to the acquired multiple images to be detected.
13. The method according to claim 12, characterized in that The controlling the at least one first image acquisition device to continue to acquire images only includes: Determining a time when the characteristic pattern arrives at the at least one first image acquisition device; According to the determined time, control is performed to continue capturing images only by the at least one first image capturing device.
14. The method according to any one of claims 1 to 8, characterized in that: When the characteristic pattern satisfies the preset recognition condition, recognizing the code in the image to be recognized acquired by the first image acquisition device to obtain a recognition result includes: In the case where the characteristic pattern meets the preset recognition condition, the code in the current image to be recognized is recognized to obtain a recognition result; or, When the characteristic pattern satisfies the preset recognition condition, it is detected whether there is a code in the current image to be recognized. When there is a code in the current image to be recognized, the code in the image to be recognized acquired after the current image to be recognized is recognized to obtain a recognition result.
15. A code reading device, characterized in that: The device comprises: An image acquisition module, used to acquire an image to be recognized acquired by a first image acquisition device; A characteristic pattern detection module is used to detect whether a characteristic pattern exists in the acquired current image to be identified, wherein the characteristic pattern is used to indicate the existence of a code in the image; A judging module, used for judging whether the characteristic pattern satisfies a preset recognition condition when the characteristic pattern exists in the current image to be recognized; The code recognition module is used to recognize the code in the image to be recognized acquired by the first image acquisition device to obtain a recognition result when the characteristic pattern meets the preset recognition condition.
16. A code reading device, characterized in that: include: Base, controller, image acquisition device and support frame; The base has a scanning table for placing the scanned object, and the support frame is arranged on a side of the base; The image acquisition device is mounted on the top of the support frame so that the image acquisition device faces the scanning table; The controller is disposed inside the base and communicates with the image acquisition device, and is used to execute the code reading method described in any one of claims 1-14.
17. A code reading system, characterized in that: include: a conveyor belt for placing scanned objects, a controller, and a plurality of image acquisition devices; The plurality of image acquisition devices are located above the conveyor belt and are arranged toward the conveyor belt; The controller communicates with the multiple image acquisition devices and is used to execute the code reading method described in any one of claims 1-14.
18. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the code reading method according to any one of claims 1 to 14 is implemented.
Citation Information
Patent Citations
Method of recognizing bar code and intelligent wrist ring
CN105765604A
Graphic code identification method and apparatus, mobile terminal and storage medium
CN108563972A
Two-dimensional code image processing method and device, electronic equipment and storage medium
CN111488751A
One-dimensional code identification method and device
CN115775004A
Method and apparatus for detecting a barcode
US20110073657A1