Identification code binding method and device, electronic terminal and computer readable storage medium
By obtaining the identification code and the package list, and using time and location information, the accurate binding of the identification code and the package is achieved, the problem of low accuracy of identification code binding in the prior art is solved, and the efficiency of automatic sorting is improved.
Patent Information
- Application Number
- CN202510309825.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-03-14
- Publication Date
- 2025-08-08
AI Technical Summary
In the prior art, the accuracy of binding between the identification code and the package is low, resulting in the need to manually replenish the barcode during the automatic sorting process.
By obtaining the target identification code and package list, the matching relationship between the identification code and the package is determined and bound to it using the collection time of the identification code and the package. The specific steps include: based on the difference between the acquisition time of the identification code and the time difference between the package, converting the three-dimensional image position to the plane image coordinate system, determining whether the identification code is on the package, filtering overlap or error codes, and achieving accurate binding.
It improves the matching accuracy of the identification code and the package, ensures the accurate binding of the identification code and the package, reduces the need for manual barcode supplementation, and improves automatic sorting efficiency.
Smart Images

Figure CN120449904A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of data processing technology, and in particular to an identification code binding method, device, electronic terminal and computer-readable storage medium. Background Art
[0002] With the development of the logistics industry and e-commerce, the number of express parcels has increased rapidly. Currently, the logistics industry primarily sorts parcels through automated sorting. The automated sorting process generally involves parcel identification, positioning, and binding. For example, parcels with barcodes on a conveyor belt are identified using image processing technology. Successfully identified parcels are automatically sorted manually or by robotic arms, while parcels that fail to be identified require manual barcode addition. During the automated sorting process, a binding area is typically provided on the conveyor belt to bind the barcode to the parcel. However, the current accuracy of barcode-to-parcel binding is low. Summary of the Invention
[0003] The main technical problem solved by this application is to provide an identification code binding method, device, electronic terminal and computer-readable storage medium to solve the problem of low binding accuracy between identification codes and packages in the prior art.
[0004] To solve the above technical problems, the first technical solution adopted by this application is to provide an identification code binding method, which includes:
[0005] Obtain a target identification code and a package list; the target identification code is the identification code area detected by the two-dimensional image captured for the target range; the package list includes multiple packages that are not bound to identification codes; multiple packages are obtained by recognizing multiple three-dimensional images captured for the target area;
[0006] Determining second position information of each package in the three-dimensional image at the time of acquisition of the target identification code based on the acquisition time of the target identification code, the acquisition time of each package, and the first position information of each package in the three-dimensional image;
[0007] Determining a package that matches the target identification code based on a detected position of the target identification code in the two-dimensional image and second position information of each package in the three-dimensional image;
[0008] Bind the matching target identification code to the package.
[0009] Determining the second position information of each package in the three-dimensional image at the time of acquisition of the target identification code based on the acquisition time of the target identification code, the acquisition time of each package, and the first position information of each package in the three-dimensional image includes:
[0010] Determining the time difference corresponding to each package based on the acquisition time of the target identification code and the acquisition time of the three-dimensional image to which each package belongs;
[0011] Based on the first position information of each package in the corresponding three-dimensional image and the time difference of the packages, the second position information of each package in the three-dimensional image at the time of acquisition of the target identification code is determined.
[0012] The detection position of the target identification code in the plane image is in the plane image coordinate system; the first position information and the second position information wrapped in the three-dimensional image are in the three-dimensional image coordinate system;
[0013] Determining a package matching the target identification code based on a detected position of the target identification code in the two-dimensional image and second position information of each package in the three-dimensional image includes:
[0014] converting the second position information of each package in the three-dimensional image into a planar image coordinate system to obtain third position information of each package in the planar image coordinate system;
[0015] Based on the detected position of the target identification code in the planar image coordinate system and the third position information of the package in the planar image coordinate system, it is determined whether the target identification code is on the package.
[0016] The third position information wrapped in the plane image coordinate system includes the third position information of each vertex wrapped in the plane image coordinate system;
[0017] Determining whether the target identification code is on the package based on the detected position of the target identification code in the planar image coordinate system and third position information of the package in the planar image coordinate system includes:
[0018] Determine a bounding box corresponding to the package based on third position information of each vertex in the plane image coordinate system;
[0019] In response to the center point of the target identification code being located within the bounding box corresponding to the package, it is determined that the target identification code is on the package.
[0020] Wherein, determining a package matching the target identification code based on the detected position of the target identification code in the two-dimensional image and the second position information of each package in the three-dimensional image further includes:
[0021] In response to the target identification code being on at least two packages, converting the detected position of the target identification code in the planar image coordinate system into the three-dimensional image coordinate system to determine a direction vector corresponding to the target identification code;
[0022] Determining a target surface on each package that intersects the target identification code based on the direction vector of the target identification code and the plane equations of each surface corresponding to each package;
[0023] determining the distance between each package and a 3D data acquisition device that captures a 3D image based on second position information of a corresponding intersection between the target surface on the package and the target identification code;
[0024] The package corresponding to the shortest distance is selected and matched with the target identification code.
[0025] The identification code matching method further includes:
[0026] In response to at least two different identification codes being bound to the package, determining whether the identification codes overlap based on a detection position of each identification code in the corresponding planar image and a capture time of each planar image;
[0027] In response to the identification codes bound to the packages being overlapped, the identification codes bound to the packages are screened.
[0028] Wherein, determining whether the identification codes overlap based on the detection position of each identification code in the corresponding planar image and the acquisition time of each planar image includes:
[0029] determining an initial three-dimensional coordinate position of the identification code in the three-dimensional image coordinate system based on a detected position of the identification code in the plane image to which it belongs;
[0030] Determining an updated three-dimensional coordinate position of each identification code at a predetermined time based on the acquisition time of the planar image to which each identification code belongs and the initial three-dimensional coordinate position of the identification code in the three-dimensional image coordinate system;
[0031] The updated three-dimensional coordinate positions of each identification code are projected onto the same plane image coordinate system to determine whether the identification codes overlap.
[0032] The identification code bound to the package includes a first identification code and a second identification code;
[0033] Identify errors in the identification codes bound to the package, including:
[0034] comparing the character information of the first identification code with the character information of the second identification code;
[0035] In response to the character information of the first identification code being a subset of the character information of the second identification code, the first identification code is determined to be an error code.
[0036] Among them, the error code identification of each identification code bound to the package also includes:
[0037] In response to the fact that there is no inclusion relationship between the character information of the first identification code and the character information of the second identification code, comparing the number of times the first identification code is read with the number of times the second identification code is read;
[0038] In response to the difference between the number of times the first identification code is read and the number of times the second identification code is read being greater than a preset difference, and the number of times the first identification code is read or the number of times the second identification code is read being less than a preset number, the identification code corresponding to the number of times less than the preset number is determined to be an error code.
[0039] Among them, the error code identification of each identification code bound to the package also includes:
[0040] In response to the difference between the number of times the first identification code is read and the number of times the second identification code is read being no greater than a preset difference, or the number of times both the first identification code and the second identification code are read being no less than a preset number, comparing the first identification code and the second identification code at their respective detection positions in the plane image;
[0041] In response to the fact that the distance between the second identification code and the edge of the plane image to which it belongs is less than a preset value and the character length of the second identification code is less than a preset length, the second identification code is determined to be an error code.
[0042] To solve the above technical problems, the second technical solution adopted by this application is to provide an identification code binding device, which includes:
[0043] The acquisition module is used to obtain the target identification code and the package list; the target identification code is the identification code area detected by the two-dimensional image collected for the target range; the package list includes multiple packages that are not bound to the identification code; multiple packages are obtained by recognizing multiple three-dimensional images collected for the target area;
[0044] a conversion module configured to determine second position information of each package in the three-dimensional image at the time of acquisition of the target identification code based on the acquisition time of the target identification code, the acquisition time of each package, and the first position information of each package in the three-dimensional image;
[0045] an analysis module for determining a package matching the target identification code based on a detected position of the target identification code in the two-dimensional image and second position information of each package in the three-dimensional image;
[0046] The binding module is used to bind the matching target identification code to the package.
[0047] To solve the above technical problems, the third technical solution adopted in this application is: to provide an electronic terminal, the electronic terminal includes a memory, a processor, and a computer program stored in the memory and running on the processor, and the processor is used to execute the computer program to implement the steps in the above-mentioned identification code binding method.
[0048] In order to solve the above technical problems, the fourth technical solution adopted in this application is: to provide a computer-readable storage medium, on which a computer program is stored, and when the computer program is executed by the processor, the steps in the above-mentioned identification code binding method are implemented.
[0049] The beneficial effects of the present application are as follows: different from the prior art, a method, device, electronic terminal and computer-readable storage medium for binding an identification code are provided, wherein the identification code binding method comprises: obtaining a target identification code and a package list; the target identification code is an identification code area detected by a two-dimensional image captured for a target range; the package list comprises a plurality of packages to which identification codes are not bound; the plurality of packages are identified by a plurality of three-dimensional images captured for the target area; determining the second position information of each package in the three-dimensional image at the time of capturing the target identification code based on the capture time of the target identification code, the capture time of each package, and the first position information of each package in the three-dimensional image; determining a package matching the target identification code based on the detected position of the target identification code in the two-dimensional image and the second position information of each package in the three-dimensional image; and binding the matching target identification code to the package. This application matches the target identification code with the packages in the package list, aligns the coordinate position of the package in the three-dimensional image to the acquisition time of the target identification code, and then determines the package that matches the target identification code based on the three-dimensional coordinate information of each package at the acquisition time of the target identification code, thereby improving the matching accuracy of the package and the identification code, and thus helping to achieve accurate binding of the identification code and the package. BRIEF DESCRIPTION OF THE DRAWINGS
[0050] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the following briefly introduces the drawings required for use in the description of the embodiments. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without any creative work.
[0051] Figure 1 A schematic diagram of an application scenario provided in an embodiment of the present application.
[0052] Figure 2 This is a flowchart of an embodiment of the identification code binding method provided by this application;
[0053] Figure 3 yes Figure 2 A flowchart of a specific embodiment of step S3 in the identification code binding method provided;
[0054] Figure 4 This is a flowchart of another embodiment of the identification code binding method provided by the present application;
[0055] Figure 5This is a schematic diagram of a framework of an embodiment of an identification code binding device provided by the present application;
[0056] Figure 6 This is a schematic diagram of the framework of an embodiment of an electronic terminal provided by the present application;
[0057] Figure 7 It is a schematic diagram of a framework of an embodiment of a computer-readable storage medium provided by this application. DETAILED DESCRIPTION
[0058] The following describes the embodiments of the present application in detail with reference to the accompanying drawings.
[0059] In the following description, for the purpose of explanation rather than limitation, specific details such as specific system structures, interfaces, and technologies are provided to facilitate a thorough understanding of the present application.
[0060] The term "and / or" in this document simply describes a relationship between related objects, indicating that three possible relationships exist. For example, "A and / or B" can mean: A exists alone, A and B exist simultaneously, or B exists alone. Furthermore, the character " / " in this document generally indicates that the related objects are in an "or" relationship. Furthermore, "many" in this document means two or more than two.
[0061] In order to enable those skilled in the art to better understand the technical solution of the present application, an identification code binding method provided by the present application is further described in detail below with reference to the accompanying drawings and specific implementation methods.
[0062] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by those skilled in the art to which this application pertains. The terms used herein are for the purpose of describing the embodiments of this application only and are not intended to limit this application.
[0063] Before further describing the embodiments of the present application in detail, the nouns and terms involved in the embodiments of the present application are explained. The nouns and terms involved in the embodiments of the present application are subject to the following interpretations.
[0064] In the embodiments of the present application, the term "plurality" refers to two or more than two, and other quantifiers are similar.
[0065] Automated sorting is a current trend in express logistics. This system uses image processing to automatically identify parcel barcodes, and then uses mechanical swing arms and other devices to automatically sort packages. The key to automated sorting systems lies in barcode recognition technology. One-dimensional codes (barcodes) typically bind the sender's address and contact number as unique identification information for packages, and are crucial identifiers in the express delivery process.
[0066] Figure 1 This is a schematic diagram of an application scenario provided by an embodiment of the present application. As shown, the diagram includes: a package 20 is placed on a conveyor belt 10. An identification code acquisition device 30 and a 3D data acquisition device 40 are positioned around the conveyor belt 10. Multiple identification code acquisition devices 30 and 3D data acquisition devices 40 may be provided. Each of the identification code acquisition devices 30 and 3D data acquisition devices 40 is positioned according to actual circumstances and is fixed in place.
[0067] The 3D data acquisition device 40 can be used to capture images of the packages 20 on the conveyor belt 10. The 3D data acquisition device 40 can perform image acquisition at a set interval. By identifying and analyzing the 3D images captured by the 3D data acquisition device 40, each package 20 on the conveyor belt 10 can be located and tracked. The image acquisition area of the 3D data acquisition device 40, or a portion thereof, can be referred to as a target area, and only packages 20 within this target area can be located and tracked.
[0068] The identification code acquisition device 30 is used to capture images of the barcodes attached to the packages 20 on the conveyor belt 10. The identification code acquisition device 30 can capture two-dimensional images at a set interval. By recognizing and analyzing the images captured by the identification code acquisition device 30, the identification code on each package 20 can be obtained, such as the character information corresponding to the recognized identification code and the location information of the identification code area.
[0069] The controller 50 can bind the package 20 with the matching identification code based on the identification code information on each package 20 and the positioning result of the package 20, that is, establish a corresponding relationship between the package 20 (such as the package ID) and the identification code.
[0070] The identification code binding method provided in the embodiment of the present application can be implemented separately by the server or the terminal, or can be implemented collaboratively by the server and the terminal. In some embodiments, the terminal or the server can implement the identification code binding method provided in the embodiment of the present application by running a computer program. For example, the computer program can be a native program or software module in the operating system; it can be a local (Native) application (APP, Application), that is, a program that needs to be installed in the operating system to run, such as a client that supports virtual scenes, such as a game APP; it can also be a small program, that is, a program that can be run only by downloading it into a browser environment; it can also be a small program that can be embedded in any APP. In short, the above-mentioned computer program can be an application, module or plug-in in any form.
[0071] The following uses server implementation as an example to illustrate the identification code binding method provided in the embodiment of the present application.
[0072] See also Figure 2 , Figure 2 This is a flowchart of an embodiment of the identification code binding method provided by this application.
[0073] This embodiment provides an identification code binding method, which includes the following steps.
[0074] S1: Obtain a target identification code and a package list; the target identification code is an identification code area detected by a planar image captured within the target range; the package list includes multiple packages that are not bound to identification codes; multiple packages are obtained by recognizing multiple three-dimensional images captured within the target area.
[0075] S2: Determine the second position information of each package in the three-dimensional image at the time of acquisition of the target identification code based on the acquisition time of the target identification code, the acquisition time of each package, and the first position information of each package in the three-dimensional image.
[0076] S3: Determine a package that matches the target identification code based on the detected position of the target identification code in the two-dimensional image and the second position information of each package in the three-dimensional image.
[0077] S4: Bind the matching target identification code to the package.
[0078] Specifically, the specific implementation method of obtaining the target identification code and the package list in step S1 is as follows.
[0079] In one embodiment, during the conveyor belt transmission process, a three-dimensional data acquisition device is used to capture images of packages passing through a target area to obtain a three-dimensional image containing the packages. The three-dimensional image can be an RGB image. Target detection is performed on the three-dimensional image to obtain first position information and size information of each package in the three-dimensional image, such as first position information (x1, y1, z1). The size information includes length, width, and height. Specifically, when the package is rectangular, the first position information of the package includes the first position information of the eight vertices. The three-dimensional image has a corresponding three-dimensional image coordinate system. All three-dimensional images acquired by the same three-dimensional data acquisition device have the same three-dimensional image coordinate system, and each first position information in the three-dimensional image is in the corresponding three-dimensional image coordinate system. In one embodiment, the three-dimensional data acquisition device is a static 3D camera.
[0080] The barcodes on the packages passing through the target area are collected by the identification code collection device to obtain a plane image containing the identification code. The plane image is detected and read to obtain the character data corresponding to each identification code in the plane image and the detection position of the identification code area. The identification code area can be a rectangular area or a square area. The detection position of the identification code area includes the position coordinates of the four vertices or the position coordinates of the diagonal vertices. For example, if the position coordinates of the vertex are (xa ,y a ). Among them, the plane image has a corresponding plane image coordinate system, all plane images collected by the same identification code acquisition device have the same plane image coordinate system, and all plane images collected by the same identification code acquisition device have the same plane image coordinate system, and each detection position in the plane image is in the corresponding plane image coordinate system.
[0081] In this embodiment, a corresponding RT matrix is provided between the three-dimensional data acquisition device and the identification code acquisition device to realize position conversion between the three-dimensional image coordinate system and the two-dimensional image coordinate system.
[0082] Through the above steps, a package list consisting of multiple packages collected within a preset time period can be obtained, wherein each package in the package list is unique and no package is bound to an identification code. Through the above steps, an identification code list consisting of multiple identification codes collected within a preset time period can be obtained, wherein each identification code in the identification code list corresponds to a unique identification code character and no package is bound to an identification code. Each identification code in the identification code list is sequentially used as a target identification code. The target identification code is compared with each package in the package list to determine a package that matches the target identification code.
[0083] Specifically, in step S2, based on the acquisition time of the target identification code, the acquisition time of each package, and the first position information of each package in the three-dimensional image, a specific implementation method for determining the second position information of each package in the three-dimensional image at the acquisition time of the target identification code is as follows.
[0084] In one embodiment, a time difference corresponding to each package is determined based on the acquisition time of the target identification code and the acquisition time of the 3D image to which each package belongs. Second position information of each package in the 3D image at the time of acquisition of the target identification code is determined based on the first position information of each package in the 3D image to which it belongs and the time difference of each package.
[0085] In one specific embodiment, the time difference corresponding to each package is determined based on the acquisition time of the two-dimensional image to which the target identification code belongs and the acquisition time of the three-dimensional image to which each package belongs. The second position information of each package in the three-dimensional image at the time of acquisition of the target identification code is determined based on the first position information of the package in the three-dimensional image to which it belongs, the conveyor speed, and the conveying direction. This means that the second position information of each package in the three-dimensional image at the time of acquisition of the identification code is obtained. The second position information of the package in the three-dimensional image is, for example, the second position information (x2, y2, z2). Specifically, the second position information of the package includes the second position information corresponding to each of the eight vertices. The second position information is in the three-dimensional image coordinate system.
[0086] See also Figure 3 , Figure 3 yes Figure 2 A flowchart of a specific embodiment of step S3 in the identification code binding method is provided.
[0087] Specifically, in step S3, a specific implementation method of determining a package matching the target identification code based on the detected position of the target identification code in the two-dimensional image and the second position information of each package in the three-dimensional image is as follows.
[0088] S31: converting the second position information of each package in the three-dimensional image into a planar image coordinate system to obtain the third position information of each package in the planar image coordinate system.
[0089] Specifically, based on the open source function, the second position information of each part wrapped in the three-dimensional image is converted to the plane image coordinate system corresponding to the target identification code. Specifically, through the RT matrix between the three-dimensional data acquisition device and the identification code acquisition device corresponding to the target identification code, the internal parameters of the identification code acquisition device and the distortion coefficient, the second position information wrapped in the three-dimensional image is converted to the plane image coordinate system corresponding to the target identification code, and the coordinates wrapped in the plane image are obtained, that is, the third position information. The third position information wrapped in the plane image coordinate system includes the third position information (x3, y3) of the eight vertices PT1, PT2, PT3, PT4, PT5, PT6, PT7, and PT8 wrapped in the plane image coordinate system.
[0090] S32: Determine whether the target identification code is on the package based on the detected position of the target identification code in the plane image coordinate system and the third position information of the package in the plane image coordinate system.
[0091] Specifically, based on the third position information of each vertex in the plane image coordinate system, a bounding box corresponding to the enclosed area is determined. In other words, the outer vertices of the eight vertices enclosed in the plane image are sequentially connected to obtain the bounding box corresponding to the enclosed area.
[0092] Determine whether the target identification code area is within the enclosing box.
[0093] In one embodiment, it is determined whether the target identification code area is included in the bounding box of the package; or, it is determined whether the target identification code area intersects with the bounding box of the package; and it is determined whether the preset position of the target identification code area is within the bounding box of the package.
[0094] In one embodiment, it is determined whether the center point of the target identification code is within the enclosing bounding box, wherein the center point of the target identification code is the center point of the target identification code region.
[0095] In response to the center point of the target identification code being located within the bounding box corresponding to the package, it is determined that the target identification code is on the package.
[0096] In one embodiment, in response to the target identification code being located on at least two packages, the detected position of the target identification code in the two-dimensional image coordinate system is converted to the three-dimensional image coordinate system to determine the direction vector corresponding to the target identification code. Furthermore, the surface of the package on which the target identification code is located is determined, thereby improving the accuracy of matching the package with the target identification code.
[0097] Specifically, a direction vector of the target identification code in the three-dimensional image coordinate system is generated according to the internal parameters of the identification code acquisition device and the detection position of the center point of the target identification code in the plane image.
[0098] In a specific embodiment, the internal parameters of the identification code acquisition device include the value of the focal length of the identification code acquisition device in the x direction (f x ), the focal length of the identification code acquisition device in the y direction (f y ), the offset value of the main point of the identification code acquisition device in the x direction (c x ), the offset value of the main point of the identification code acquisition device in the y direction (c y The center point coordinates of the target identification code are (centerPt.x, centerPt.y). The center point of the target identification code is normalized based on the internal parameters of the identification code acquisition device, and the image coordinates of the center point of the target identification code are x'=(centerPt.xc x ) / f x ,y'=(centerPt.yc y ) / f y . The direction vector of the center point of the target identification code is constructed as vec{v}=(x', y', 1). The distance between the center point of the target identification code and the identification code acquisition device corresponding to the target identification code is taken as the length of the direction vector of the center point of the target identification code, len=sqrt(x'^2+y'^2+1^2). Based on the length of the direction vector of the center point of the target identification code and the direction vector of the center point of the constructed target identification code, the direction vector of the target identification code in the three-dimensional image coordinate system is determined to be vec{v}=(x' / len, y' / len, 1 / len).
[0099] When the package is rectangular, the package has six surfaces. A plane equation corresponding to each surface is generated according to second position information of four vertices corresponding to each plane in the three-dimensional image.
[0100] Based on the direction vector of the target identification code and the plane equations of the surfaces corresponding to each package, a target surface on each package that intersects the target identification code is determined. Based on the second position information corresponding to the intersection point between the target surface on the package and the target identification code, the distance between each package and the 3D data acquisition device used to capture the 3D image is determined.
[0101] The distance between each package corresponding to the target identification code and the 3D data acquisition device is obtained through the above steps. The package corresponding to the target identification code with the shortest distance is selected for matching.
[0102] See also Figure 4 , Figure 4 This is a flowchart of another embodiment of the identification code binding method provided by this application.
[0103] In one embodiment, the identification code binding method further includes the following steps.
[0104] S5: In response to at least two different identification codes being bound to the package, determining whether the identification codes overlap based on a detection position of each identification code in the corresponding plane image and a capture time of each plane image.
[0105] The step of determining whether the identification codes overlap based on the detection position of each identification code in the corresponding planar image and the acquisition time of each planar image includes the following implementation methods.
[0106] Because when the identification code acquisition device acquires identification codes, within a fixed time period, the running distance of the identification codes close to the identification code acquisition device is greater than the running distance of the identification codes far away from the identification code acquisition device. In order to reduce the problem of inconsistent running distances of the identification code acquisition device's acquisition targets.
[0107] In one embodiment, an initial three-dimensional coordinate position of an identification code in a three-dimensional image coordinate system is determined based on a detection position of the identification code in the plane image to which it belongs; an updated three-dimensional coordinate position of each identification code at a preset time is determined based on an acquisition time of the plane image to which each identification code belongs and the initial three-dimensional coordinate position of the identification code in the three-dimensional image coordinate system; and the updated three-dimensional coordinate position of each identification code is projected onto the same plane image coordinate system to determine whether the identification codes overlap.
[0108] In one specific embodiment, when a package is bound to a first identification code and a second identification code, the initial three-dimensional coordinate positions P1 and P2 of the first and second identification codes in the same three-dimensional image coordinate system are determined based on the detected positions of the first and second identification codes in the corresponding two-dimensional images. The acquisition time of the two-dimensional image to which the first identification code belongs is T1, and the acquisition time of the two-dimensional image to which the second identification code belongs is T2. The initial three-dimensional coordinate position P2 of the second identification code is converted to time T1 to obtain the updated three-dimensional coordinate position P2' of the second identification code = P2 + V*D*(T2-T1). Where V is the conveyor belt's speed and D is the direction vector of the conveyor belt's motion.
[0109] The initial 3D coordinate position P1 of the first identification code and the updated 3D coordinate position P2' of the second identification code are projected onto the plane image coordinate system of the same identification code acquisition device to determine whether the projection area of the first identification code overlaps with the projection area of the second identification code.
[0110] In response to the projection area of the first identification code being overlapped or partially overlapped with the projection area of the second identification code, it indicates that the first identification code and the second identification code may be the same identification code.
[0111] In response to the projection area of the first identification code not overlapping the projection area of the second identification code, the first identification code and the second identification code are determined to be different identification codes. The first identification code is bound to the package, and the second identification code is bound to the package.
[0112] In one embodiment, any time may be set, and the three-dimensional coordinate positions of the first identification code and the second identification code may be aligned at that time.
[0113] S6: In response to the identification codes bound to the packages being overlapped, the identification codes bound to the packages are screened.
[0114] Specifically, the step of screening the identification codes bound to the package includes the following implementation methods.
[0115] In one embodiment, the character information of the first identification code is compared with the character information of the second identification code.
[0116] In one embodiment, in response to the character information of the first identification code being a subset of the character information of the second identification code, the first identification code is determined to be an error code.
[0117] For example, the character information of the first identification code is SF12345; the character information of the second identification code is SF12345678, then the character information of the first identification code is a subset of the character information of the second identification code, and the first identification code is determined to be an error code.
[0118] In one embodiment, in response to the fact that there is no inclusion relationship between the character information of the first identification code and the character information of the second identification code, the number of times the first identification code is read is compared with the number of times the second identification code is read.
[0119] In one embodiment, in response to a difference between the number of times the first identification code is read and the number of times the second identification code is read being greater than a preset difference, and the number of times the first identification code is read or the number of times the second identification code is read being less than a preset number, the identification code corresponding to the number of times the first identification code is read being less than the preset number is determined to be an error code.
[0120] For example, if the preset number of times is 3, the preset difference is 5, and the first identification code is read 10 times and the second identification code is read 1 time in the preset time period, the second identification code is determined to be an error code.
[0121] In one embodiment, in response to the difference between the number of times the first identification code is read and the number of times the second identification code is read being no greater than a preset difference, or the number of times both the first identification code and the second identification code are read being no less than a preset number, the first identification code and the second identification code are compared at their respective detection positions in the plane image to which they belong.
[0122] In one embodiment, in response to the distance between the second identification code and the edge of the plane image to which it belongs being smaller than a preset value and the character length of the second identification code being smaller than a preset length, the second identification code is determined to be an error code.
[0123] For example, if the distance between the edge of the area of the second identification code and the edge of the plane image to which it belongs is smaller than a preset value and the character length of the second identification code is smaller than 10 characters, the second identification code is determined to be an error code.
[0124] The identification code binding method provided in this embodiment matches the target identification code with the packages in the package list, aligns the coordinate positions of the packages in the three-dimensional image with the acquisition time of the target identification code, and then determines the package that matches the target identification code based on the three-dimensional coordinate information of each package at the acquisition time of the target identification code. This improves the accuracy of matching packages and identification codes, thereby facilitating accurate binding of identification codes to packages.
[0125] See also Figure 5 , Figure 5 It is a schematic diagram of the framework of an embodiment of the identification code binding device provided by this application.
[0126] This embodiment provides an identification code binding device 60 , which includes an acquisition module 61 , a conversion module 62 , an analysis module 63 and a binding module 64 .
[0127] The acquisition module 61 is used to obtain a target identification code and a package list. The target identification code is an identification code area detected by detecting a two-dimensional image captured within the target range. The package list includes multiple packages that are not bound to identification codes. Multiple packages are obtained by recognizing multiple three-dimensional images captured within the target area.
[0128] The conversion module 62 is configured to determine the second position information of each package in the 3D image at the time of acquisition of the target identification code based on the acquisition time of the target identification code, the acquisition time of each package, and the first position information of each package in the 3D image.
[0129] The analysis module 63 is configured to determine a package matching the target identification code based on the detected position of the target identification code in the two-dimensional image and the second position information of each package in the three-dimensional image.
[0130] The binding module 64 is used to bind the matching target identification code to the package.
[0131] The identification code binding device provided in this embodiment matches the target identification code with the packages in the package list, aligns the coordinate positions of the packages in the three-dimensional image with the acquisition time of the target identification code, and then determines the package that matches the target identification code based on the three-dimensional coordinate information of each package at the acquisition time of the target identification code, thereby improving the matching accuracy between the package and the identification code, and thus facilitating the accurate binding of the identification code and the package.
[0132] See also Figure 6 , Figure 6 is a schematic diagram of the framework of an embodiment of an electronic terminal provided in this application. The electronic terminal 80 includes a memory 81 and a processor 82 coupled to each other. The processor 82 is configured to execute computer instructions stored in the memory 81 to implement the steps of any of the aforementioned identification code binding method embodiments. In a specific implementation scenario, the electronic terminal 80 may include, but is not limited to, a microcomputer and a server. Furthermore, the electronic terminal 80 may also include mobile devices such as laptops and tablet computers, which are not limited here.
[0133] Specifically, the processor 82 is used to control itself and the memory 81 to implement the steps of any of the above-mentioned identification code binding method embodiments. The processor 82 can also be called a CPU (Central Processing Unit). The processor 82 may be an integrated circuit chip with signal processing capabilities. The processor 82 can also be a general-purpose processor, a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field-programmable gate array (FPGA) or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components. The general-purpose processor can be a microprocessor or the processor can also be any conventional processor, etc. In addition, the processor 82 can be implemented by an integrated circuit chip.
[0134] In the above-mentioned solution, the identification code binding method includes: obtaining a target identification code and a package list; the target identification code is an identification code area detected by a two-dimensional image captured for a target range; the package list includes multiple packages to which identification codes are not bound; the multiple packages are identified by multiple three-dimensional images captured for the target area; determining the second position information of each package in the three-dimensional image at the time of acquisition of the target identification code based on the acquisition time of the target identification code, the acquisition time of each package, and the first position information of each package in the three-dimensional image; determining the package that matches the target identification code based on the detected position of the target identification code in the two-dimensional image and the second position information of each package in the three-dimensional image; and binding the matching target identification code to the package.
[0135] See also Figure 7 , Figure 7 The computer-readable storage medium 90 stores program instructions 901 that can be executed by a processor, and the program instructions 901 are used to implement the steps of any of the above-mentioned identification code binding method embodiments.
[0136] In the above-mentioned solution, the identification code binding method includes: obtaining a target identification code and a package list; the target identification code is an identification code area detected by a two-dimensional image captured for a target range; the package list includes multiple packages to which identification codes are not bound; the multiple packages are identified by multiple three-dimensional images captured for the target area; determining the second position information of each package in the three-dimensional image at the time of acquisition of the target identification code based on the acquisition time of the target identification code, the acquisition time of each package, and the first position information of each package in the three-dimensional image; determining the package that matches the target identification code based on the detected position of the target identification code in the two-dimensional image and the second position information of each package in the three-dimensional image; and binding the matching target identification code to the package.
[0137] In some embodiments, the functions or modules included in the device provided by the embodiments of the present disclosure can be used to execute the method described in the above method embodiments. The specific implementation can refer to the description of the above method embodiments. For the sake of brevity, it will not be repeated here.
[0138] The above description of the various embodiments tends to emphasize the differences between the various embodiments. The same or similar aspects can be referenced with each other and will not be repeated herein for the sake of brevity.
[0139] In the several embodiments provided in this application, it should be understood that the disclosed methods and devices can be implemented in other ways. For example, the device implementation methods described above are only schematic. For example, the division of modules or units is only a logical function division. There may be other division methods in actual implementation. For example, units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, and the indirect coupling or communication connection of devices or units can be electrical, mechanical or other forms.
[0140] In addition, the functional units in the various embodiments of the present application may be integrated into a single processing unit, or each unit may exist physically separately, or two or more units may be integrated into a single unit. The aforementioned integrated units may be implemented in the form of hardware or software functional units.
[0141] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application, or the part that contributes to the prior art, or all or part of the technical solution can be embodied in the form of a software product, which is stored in a storage medium and includes several instructions for enabling a computer device (which can be a personal computer, server, or network device, etc.) or a processor to execute all or part of the steps of each embodiment method of the present application. The aforementioned storage medium includes: various media that can store program codes, such as a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk.
[0142] The above is only an implementation method of the present application and does not limit the scope of patent protection of the present application. Any equivalent structure or equivalent process transformation made using the contents of the description and drawings of this application, or directly or indirectly applied in other related technical fields, are also included in the scope of patent protection of the present application.
Claims
1. A method for binding an identification code, characterized in that: The identification code binding method includes: Obtaining a target identification code and a package list; the target identification code is an identification code area detected by detecting a two-dimensional image captured within a target range; the package list includes multiple packages that are not bound to identification codes; the multiple packages are obtained by recognizing multiple three-dimensional images captured for the target area; Determining, based on the acquisition time of the target identification code, the acquisition time of each of the packages, and the first position information of each of the packages in the three-dimensional image, the second position information of each of the packages in the three-dimensional image at the time of acquisition of the target identification code; determining the package matching the target identification code based on the detected position of the target identification code in the planar image and the second position information of each package in the three-dimensional image; The matched target identification code is bound to the package.
2. The identification code binding method according to claim 1, characterized in that: The determining, based on the acquisition time of the target identification code, the acquisition time of each package, and the first position information of each package in the three-dimensional image, the second position information of each package in the three-dimensional image at the acquisition time of the target identification code includes: Determining a time difference corresponding to each package based on the acquisition time of the target identification code and the acquisition time of the three-dimensional image to which each package belongs; The second position information of each package in the three-dimensional image at the time of acquisition of the target identification code is determined based on the first position information of each package in the three-dimensional image and the time difference of the package.
3. The identification code binding method according to claim 1, characterized in that: The detection position of the target identification code in the planar image is in a planar image coordinate system; the first position information and the second position information wrapped in the three-dimensional image are in a three-dimensional image coordinate system; The determining the package matching the target identification code based on the detected position of the target identification code in the planar image and the second position information of each package in the three-dimensional image includes: converting the second position information of each of the packages in the three-dimensional image into the planar image coordinate system to obtain third position information of each of the packages in the planar image coordinate system; Based on the detected position of the object identification code in the planar image coordinate system and the third position information of the package in the planar image coordinate system, it is determined whether the object identification code is on the package.
4. The identification code binding method according to claim 3, characterized in that: The third position information of the package in the plane image coordinate system includes the third position information of each of the package vertices in the plane image coordinate system; The determining whether the target identification code is on the package based on the detected position of the target identification code in the planar image coordinate system and the third position information of the package in the planar image coordinate system includes: Determining a bounding box corresponding to the package based on the third position information of each vertex of the package in the plane image coordinate system; In response to the center point of the target identification code being located within the bounding box corresponding to the package, it is determined that the target identification code is on the package.
5. The identification code binding method according to claim 3, characterized in that: The determining the package matching the target identification code based on the detected position of the target identification code in the planar image and the second position information of each package in the three-dimensional image further includes: In response to the target identification code being on at least two of the packages, converting the detected position of the target identification code in the planar image coordinate system into the three-dimensional image coordinate system to determine a direction vector corresponding to the target identification code; Determining a target surface on each of the packages that intersects the target identification code based on a direction vector of the target identification code and a plane equation of each surface corresponding to each of the packages; determining, based on second position information of a corresponding intersection between the target surface on the package and the target identification code, a distance between each of the packages and a 3D data acquisition device that acquires the 3D image; The package corresponding to the shortest distance is selected and matched with the target identification code.
6. The identification code binding method according to any one of claims 1 to 5, characterized in that: The identification code matching method further includes: In response to at least two different identification codes being bound to the package, determining whether the identification codes overlap based on the detection positions of the identification codes in the plane images to which they belong and the acquisition times of the plane images; In response to the identification codes bound to the packages being overlapped, the identification codes bound to the packages are screened.
7. The identification code binding method according to claim 6, characterized in that: The determining whether the identification codes overlap based on the detection positions of the identification codes in the plane images to which they belong and the acquisition times of the plane images includes: determining an initial three-dimensional coordinate position of the identification code in a three-dimensional image coordinate system based on the detected position of the identification code in the plane image to which it belongs; Determining an updated three-dimensional coordinate position of each identification code at a preset time based on the acquisition time of the planar image to which each identification code belongs and the initial three-dimensional coordinate position of the identification code in the three-dimensional image coordinate system; The updated three-dimensional coordinate positions of the identification codes are projected onto the same plane image coordinate system to determine whether the identification codes overlap.
8. The identification code binding method according to claim 6, characterized in that: The identification code bound to the package includes a first identification code and a second identification code; The performing error code identification on each identification code bound to the package includes: comparing the character information of the first identification code with the character information of the second identification code; In response to the character information of the first identification code being a subset of the character information of the second identification code, the first identification code is determined to be an error code.
9. The identification code binding method according to claim 8, characterized in that: The performing error code identification on each identification code bound to the package further includes: In response to the fact that there is no inclusion relationship between the character information of the first identification code and the character information of the second identification code, comparing the number of times the first identification code is read with the number of times the second identification code is read; In response to the difference between the number of times the first identification code is read and the number of times the second identification code is read being greater than a preset difference, and the number of times the first identification code is read or the number of times the second identification code is read being less than a preset number, the identification code corresponding to the number of times the first identification code is read being less than the preset number is determined to be an error code.
10. The identification code binding method according to claim 9, characterized in that: The performing error code identification on each identification code bound to the package further includes: In response to the difference between the number of times the first identification code is read and the number of times the second identification code is read being no greater than the preset difference, or the number of times both the first identification code and the second identification code are read being no less than the preset number, comparing the first identification code and the second identification code at the detection positions in the plane image to which they belong; In response to the fact that the distance between the second identification code and the edge of the plane image to which it belongs is less than a preset value and the character length of the second identification code is less than a preset length, the second identification code is determined to be an error code.
11. An identification code binding device, characterized in that: The identification code binding device includes: An acquisition module is configured to acquire a target identification code and a package list; the target identification code is an identification code area detected by detecting a two-dimensional image captured within a target range; the package list includes multiple packages that are not bound to an identification code; the multiple packages are obtained by recognizing multiple three-dimensional images captured within the target area; a conversion module, configured to determine second position information of each package in the three-dimensional image at the time of acquisition of the target identification code based on the acquisition time of the target identification code, the acquisition time of each package, and the first position information of each package in the three-dimensional image; an analysis module, configured to determine the package matching the target identification code based on a detected position of the target identification code in the planar image and the second position information of each package in the three-dimensional image; A binding module is used to bind the matched target identification code to the package.
12. An electronic terminal, characterized in that: The electronic terminal includes a memory, a processor, and a computer program stored in the memory and running on the processor, and the processor is configured to execute the computer program to implement the steps of the identification code binding method according to any one of claims 1 to 10.
13. 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 steps of the identification code binding method according to any one of claims 1 to 10 are implemented.
Citation Information
Patent Citations
Bar code reading method and bar code reading system
CN109127445A
Security check code reading result binding method and device and electronic equipment
CN114780916A
Parcel detection system, method and device, electronic equipment and storage medium
CN118396006A
Information binding method and apparatus, and electronic device and computer-readable storage medium
WO2025031519A1