Label foot warping detection method and device, electronic equipment and storage medium

By extracting edge lines and corner points features in the label image and determining the actual coordinates of corner points, the problems of poor universality and generalization capabilities in the prior art are solved, and effective foot-bending detection of various types of tags is achieved.

CN120014663APending Publication Date: 2025-05-16HEFEI LCFC INFORMATION TECH
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411901562.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-20
Publication Date
2025-05-16

AI Technical Summary

Technical Problem

The existing tag foot detection method is poor in terms of universality and generalization ability, and is unable to be compatible with multiple types of tags, resulting in high maintenance costs.

Method used

By obtaining the image of the label to be tested, extracting the edge lines, determining the ideal coordinates of the corner points under the label coordinate system, obtaining the area of ​​interest of the corner points, extracting the corner points characteristics, determining the actual coordinates of the corner points, and determining whether there is a tilt by comparing the ideal coordinates and actual coordinates.

Benefits of technology

It improves the universality and generalization ability of label foot-reel detection, reduces maintenance costs, and can effectively detect the foot-reel of various types of labels.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120014663A_ABST
    Figure CN120014663A_ABST
Patent Text Reader

Abstract

The invention provides a label foot warping detection method and device, electronic equipment and a storage medium, and the method comprises the steps: obtaining an image of a to-be-detected label, and enabling the to-be-detected label to comprise a plurality of corner points; extracting an edge line in the image of the to-be-detected label; according to the edge line, determining an ideal coordinate of each angular point of the to-be-detected label in a label coordinate system; wherein the label coordinate system is a coordinate system under the image of the label to be detected; taking the ideal coordinate position of each angular point as a center to obtain a region of interest of each angular point; determining an image of each angular point according to the image of the to-be-detected label and the region of interest of each angular point; angular point features of the image of each angular point are extracted; according to the angular point features, determining actual coordinates of each angular point in the label coordinate system; and according to the ideal coordinate and the actual coordinate of each angular point, judging whether the to-be-detected label has a warped foot or not.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to the technical field of label detection, and in particular to a label lift detection method, device, electronic device and storage medium. Background Art

[0002] During the production of laptops, it is necessary to detect whether the labels on the laptop packaging boxes are tilted. However, there are many types of labels on the packaging boxes, and it is impossible to use one method to detect the tilted labels of all types. This poses a huge challenge to the detection of tilted labels. Therefore, how to deal with the tilted labels of various types is a key step to ensure the quality of laptop shipments.

[0003] In the prior art, detecting the tip of a label from an image can be understood as an image detection problem. The existing tip detection method is a tip detection method based on statistical methods. Rectangular frames are set for the four corners of the label respectively, and the mean and variance information of the image within the rectangular frame are statistically analyzed to determine whether it is a tip. Due to the statistical image processing method, targeted image processing is required for various types of labels, which makes the versatility and generalization ability of the tip detection method poor. The large number of label types and frequent updates greatly increase the subsequent maintenance costs. Summary of the invention

[0004] The present disclosure provides a method, device, electronic device and storage medium for detecting a lifted tag, so as to at least solve the above technical problems existing in the prior art.

[0005] According to a first aspect of the present disclosure, a method for detecting a label tip-up is provided, wherein the method comprises:

[0006] Acquire an image of a label to be tested, wherein the label to be tested includes a plurality of corner points;

[0007] Extracting edge lines in the image of the label to be tested;

[0008] According to the edge line, determine the ideal coordinates of each corner point of the label to be tested in the label coordinate system; wherein the label coordinate system is a coordinate system under the image of the label to be tested;

[0009] Taking the ideal coordinate position of each corner point as the center, obtain the region of interest of each corner point;

[0010] Determine the image of each corner point according to the image of the label to be tested and the region of interest of each corner point;

[0011] Extracting corner features of the image at each corner point;

[0012] Determine the actual coordinates of each corner point in the label coordinate system according to the corner point features;

[0013] According to the ideal coordinates and actual coordinates of each corner point, it is determined whether the tag to be tested has a tilted foot.

[0014] In one possible implementation, determining the actual coordinates of each corner point in the tag coordinate system according to the corner point features includes:

[0015] Determine the coordinates of each corner point in a corner point coordinate system and the translation values ​​in the X-axis direction and the Y-axis direction according to the corner point features, wherein the corner point coordinate system is a coordinate system in the image of the corner point;

[0016] According to the coordinates of each corner point in the corner point coordinate system and the translation values ​​in the X-axis direction and the Y-axis direction, the actual coordinates of each corner point in the label coordinate system are determined.

[0017] In one possible implementation manner, determining the coordinates of each corner point in the corner point coordinate system and the translation values ​​in the X-axis direction and the Y-axis direction according to the corner point features includes:

[0018] The image of each corner point includes multiple pixels, each pixel corresponds to a rectangular window W, and the pixel in the rectangular window W is the target pixel;

[0019] The coordinates of each corner point in the corner point coordinate system and the translation values ​​in the X-axis and Y-axis directions are determined according to the following formula:

[0020]

[0021] Where E represents the expectation, x and y represent the horizontal and vertical coordinates of each pixel in the image of each corner point, u and v represent the translation values ​​of each pixel in the rectangular window and the target pixel in the X-axis direction and Y-axis direction, respectively, and I represents the pixel value corresponding to each pixel;

[0022] When the expected value is the largest, the coordinates of each corner point in the corner point coordinate system and the translation values ​​in the X-axis direction and the Y-axis direction are determined.

[0023] In one possible implementation, determining the actual coordinates of each corner point in the tag coordinate system according to the coordinates of each corner point in the corner point coordinate system and the translation values ​​in the X-axis direction and the Y-axis direction includes:

[0024] The actual coordinates of each corner point in the label coordinate system are determined according to the following formula:

[0025] cor_x=x_cor+u_cor+ROI_x

[0026] cor_y=y_cor+v_cor+ROI_y

[0027] Wherein, cor_x and cor_y represent the actual coordinates of the corner points, x_cor and y_cor represent the coordinates of each corner point in the corner point coordinate system when the expected value is maximum, u_cor and v_cor represent the translation values ​​of each corner point in the X-axis direction and the Y-axis direction when the expected value is maximum, respectively, and ROI_x and ROI_y represent the coordinates of the region of interest in the label coordinate system.

[0028] In one possible implementation manner, judging whether the tag to be tested has a raised foot according to the ideal coordinates and the actual coordinates of each corner point includes:

[0029] According to the ideal coordinates and actual coordinates of each corner point, determine the position offset of each corner point;

[0030] Determine whether the position offset of each corner point is less than the threshold;

[0031] If the position offsets of all corner points are less than the threshold, the tag to be tested does not have a tilted foot; if the position offset of at least one corner point is greater than or equal to the threshold, the tag to be tested has a tilted foot.

[0032] In one possible implementation manner, determining the position offset of each corner point according to the ideal coordinates and the actual coordinates of each corner point includes:

[0033] Determine the position offset of each corner point according to the following formula:

[0034]

[0035] Among them, Offset represents the position offset, i represents the corner point index value, and its value range is {1, 2, ..., m}, m represents the number of corner points, cor_x(i) and cor_y(i) represent the actual coordinates of each corner point, and x(i) and y(i) represent the ideal coordinates of each corner point.

[0036] According to a second aspect of the present disclosure, a label leg lift detection device is provided, wherein the device comprises:

[0037] A first acquisition unit is configured to acquire an image of a label to be tested, wherein the label to be tested includes a plurality of corner points;

[0038] A first extraction unit, configured to extract edge lines in the image of the label to be tested;

[0039] A first determining unit is configured to determine the ideal coordinates of each corner point of the label to be tested in a label coordinate system according to the edge line; wherein the label coordinate system is a coordinate system under the image of the label to be tested;

[0040] A second acquisition unit is configured to acquire a region of interest of each corner point with the ideal coordinate position of each corner point as the center;

[0041] A second determining unit is configured to determine the image of each corner point according to the image of the label to be tested and the region of interest of each corner point;

[0042] A second extraction unit is configured to extract corner point features of the image of each corner point;

[0043] A third determining unit is configured to determine the actual coordinates of each corner point in the label coordinate system according to the corner point features;

[0044] The judging unit is configured to judge whether the tag to be tested has a raised foot according to the ideal coordinates and the actual coordinates of each corner point.

[0045] In one possible implementation, the third determining unit includes:

[0046] a first sub-determining unit configured to determine the coordinates of each corner point in a corner point coordinate system and translation values ​​in the X-axis direction and the Y-axis direction according to the corner point features, wherein the corner point coordinate system is a coordinate system in the image of the corner point;

[0047] The second sub-determining unit is configured to determine the actual coordinates of each corner point in the tag coordinate system according to the coordinates of each corner point in the corner point coordinate system and the translation values ​​in the X-axis direction and the Y-axis direction.

[0048] In one possible implementation, the determining unit includes:

[0049] A third sub-determining unit is configured to determine a position offset of each corner point according to the ideal coordinates and the actual coordinates of each corner point;

[0050] A first sub-judgment unit is configured to judge whether the position offset of each corner point is less than a threshold;

[0051] If the position offsets of all corner points are less than the threshold, the tag to be tested does not have a tilted foot; if the position offset of at least one corner point is greater than or equal to the threshold, the tag to be tested has a tilted foot.

[0052] According to a third aspect of the present disclosure, there is provided an electronic device, including:

[0053] at least one processor; and

[0054] a memory communicatively connected to the at least one processor; wherein,

[0055] The memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to perform the method described in the present disclosure.

[0056] According to a fourth aspect of the present disclosure, a non-transitory computer-readable storage medium storing computer instructions is provided, wherein the computer instructions are used to cause the computer to execute the method described in the present disclosure.

[0057] The label tilting detection method, device, electronic device and storage medium disclosed in the present invention first obtain the ideal coordinates of each corner point of the label to be tested through the label image to be tested, then obtain the image of each corner point, determine the actual coordinates of each corner point according to the corner point features of the image of each corner point, and then compare the actual coordinates with the ideal coordinates to determine whether each corner point is tilted. The tilting detection method used in the embodiments of the present invention solves the problem of poor versatility and generalization ability in the existing label tilting detection methods.

[0058] It should be understood that the content described in this section is not intended to identify the key or important features of the embodiments of the present disclosure, nor is it intended to limit the scope of the present disclosure. Other features of the present disclosure will become easily understood through the following description. BRIEF DESCRIPTION OF THE DRAWINGS

[0059] The above and other objects, features and advantages of the exemplary embodiments of the present disclosure will become readily understood by reading the detailed description below with reference to the accompanying drawings. In the accompanying drawings, several embodiments of the present disclosure are shown in an exemplary and non-limiting manner, in which:

[0060] In the drawings, the same or corresponding reference numerals represent the same or corresponding parts.

[0061] Figure 1 A flowchart of a method for detecting a label leg tilting provided in an embodiment of the present disclosure;

[0062] Figure 2 A detailed process diagram of a label tip detection method provided by an embodiment of the present disclosure;

[0063] Figure 3 A schematic diagram of the structure of a label leg lift detection device provided in an embodiment of the present disclosure;

[0064] Figure 4 A schematic diagram of the structure of an electronic device according to an embodiment of the present disclosure is shown. DETAILED DESCRIPTION

[0065] In order to make the purpose, features, and advantages of the present disclosure more obvious and easy to understand, the technical solutions in the embodiments of the present disclosure will be clearly and completely described below in conjunction with the drawings in the embodiments of the present disclosure. Obviously, the described embodiments are only part of the embodiments of the present disclosure, not all of the embodiments. Based on the embodiments in the present disclosure, all other embodiments obtained by those skilled in the art without creative work are within the scope of protection of the present disclosure.

[0066] The present disclosure provides a method for detecting a label leg tilting. Figure 1 A flowchart of a method for detecting a label leg tilting provided in an embodiment of the present disclosure. Figure 2 A detailed process diagram of the label leg detection method provided in the embodiment of the present disclosure, such as Figure 1 and Figure 2 As shown, the method includes:

[0067] Step 101: Acquire an image of a label to be tested, wherein the label to be tested includes a plurality of corner points.

[0068] First, read the image of the label to be tested, which is recorded as LabelImg; the label to be tested is generally rectangular in shape, so the label to be tested includes 4 corner points.

[0069] Step 102: extract edge lines in the image of the label to be tested.

[0070] Specifically, algorithms such as FastLineDetecter (fast line detector) can be used to extract edge lines of the label to be tested. The label to be tested may include 4 edge lines.

[0071] Step 103, determining the ideal coordinates of each corner point of the label to be measured in the label coordinate system according to the edge line; wherein the label coordinate system is a coordinate system under the image of the label to be measured.

[0072] The intersection of two adjacent edge lines is the corner point, so that the four corner points of the label to be tested are obtained. The corner point position obtained by the intersection of two edge lines is the ideal corner point position of the label to be tested, that is, the corner point is not tilted at this time.

[0073] In the disclosed embodiment, a coordinate system can be established under the image of the label to be tested, which is recorded as the label coordinate system. Specifically, the label coordinate system can take one of the corner points as the origin, and take two edge lines adjacent to the corner point in the image of the label to be tested as the X-axis and Y-axis. In this way, the ideal coordinates of the four corner points in the label coordinate system can be obtained, which are recorded as (x1, y1), (x2, y2), (x3, y3) and (x4, y4).

[0074] It should be explained that the label coordinate system can also use any point in the image of the label to be tested as the origin, and use two mutually perpendicular lines intersecting the origin as the X-axis and the Y-axis.

[0075] Step 104, taking the ideal coordinate position of each corner point as the center, obtaining the region of interest of each corner point;

[0076] Specifically, with the ideal coordinate position of each corner point as the center, the region of interest (ROI) of each corner point is obtained, which is recorded as ROI1, ROI2, ROI3 and ROI4. The region of interest of each corner point can be a rectangular area.

[0077] Next, the coordinates of the upper left corner of the region of interest of each corner point in the label coordinate system can be used as the coordinates of the region of interest, recorded as (ROI_x1, ROI_y1), (ROI_x2, ROI_y2), (ROI_x3, ROI_y3) and (ROI_x4, ROI_y4).

[0078] Step 105 , determining the image of each corner point according to the image of the label to be tested and the region of interest of each corner point.

[0079] Specifically, the image of each corner point is recorded as CornerImg(i), where

[0080] CornerImg(i)=LabelImg(ROI(i))

[0081] Wherein, i represents the corner point index value, and its value range is {1, 2, ..., m}, and m represents the number of corner points. In the embodiment of the present disclosure, m can be equal to 4.

[0082] Step 106: extract corner point features of the image at each corner point.

[0083] For each corner point of the image, the corner point features of each corner point are extracted using a corner point extraction algorithm such as CornerHarris.

[0084] Step 107, determining the actual coordinates of each corner point in the label coordinate system according to the corner point features;

[0085] In one embodiment, determining the actual coordinates of each corner point in the tag coordinate system according to the corner point features includes:

[0086] According to the corner point features, determine the coordinates of each corner point in the corner point coordinate system and the translation values ​​in the X-axis direction and the Y-axis direction, wherein the corner point coordinate system is the coordinate system under the image of the corner point;

[0087] According to the coordinates of each corner point in the corner point coordinate system and the translation values ​​in the X-axis direction and the Y-axis direction, the actual coordinates of each corner point in the label coordinate system are determined.

[0088] In one embodiment, the coordinates of each corner point in the corner point coordinate system and the translation values ​​in the X-axis direction and the Y-axis direction are determined according to the corner point features, including:

[0089] The image of each corner point includes multiple pixels, each pixel corresponds to a rectangular window W, and the pixel in the rectangular window W is the target pixel;

[0090] The coordinates of each corner point in the corner point coordinate system and the translation values ​​in the X-axis and Y-axis directions are determined according to the following formula:

[0091]

[0092] Where E represents the expectation, x and y represent the horizontal and vertical coordinates of each pixel in the image of each corner point, u and v represent the translation values ​​of each pixel in the rectangular window and the target pixel in the X-axis direction and Y-axis direction, respectively, and I represents the pixel value corresponding to each pixel;

[0093] When the expected value is the largest, the coordinates of each corner point in the corner point coordinate system and the translation values ​​in the X-axis direction and the Y-axis direction are determined.

[0094] Specifically, the image of each corner point has its own corner point coordinate system. Generally, the image of each corner point can be rectangular, so for example, the lower left corner of the image of each corner point can be used as the origin of the corner point coordinate system, and the two sides adjacent to the point can be used as the X axis and the Y axis. In the corner point coordinate system, the coordinates of each pixel in the corner point image can be obtained.

[0095] The rectangular window corresponding to each pixel point may be, for example, a 3×3 window, so the values ​​of u and v may be selected from 0, 1, and 2. The target pixel point in each rectangular window may be located at the center of the window.

[0096] In the disclosed embodiment, by traversing the pixel points in the image of each corner point and traversing the rectangular window corresponding to the pixel point, when the expected value is the largest, indicating that the intensity changes dramatically, the corresponding pixel point at this time is the corner point, and the coordinates of the pixel point in the corner point coordinate system (x_cor(i), y_cor(i)) and the translation values ​​u_cor(i) and v_cor(i) corresponding to the pixel point in the X-axis direction and the Y-axis direction are recorded.

[0097] In one embodiment, determining the actual coordinates of each corner point in the tag coordinate system according to the coordinates of each corner point in the corner point coordinate system and the translation values ​​in the X-axis direction and the Y-axis direction includes:

[0098] Determine the actual coordinates of each corner point in the label coordinate system according to the following formula:

[0099] cor_x=x_cor+u_cor+ROI_x

[0100] cor_y=y_cor+v_cor+ROI_y

[0101] Among them, cor_x and cor_y represent the actual coordinates of the corner points, x_cor and y_cor represent the coordinates of each corner point in the corner point coordinate system when the expected value is maximum, u_cor and v_cor represent the translation values ​​of each corner point in the X-axis direction and Y-axis direction respectively when the expected value is maximum, ROI_x and ROI_y represent the coordinates of the region of interest in the label coordinate system.

[0102] According to the above formula, we can obtain the actual coordinates of the four corner points in the label coordinate system: (cor_x1, cor_y1), (cor_x2, cor_y2), (cor_x3, cor_y3) and (cor_x4, cor_y4).

[0103] Step 108, judging whether the tag to be tested has a raised foot according to the ideal coordinates and the actual coordinates of each corner point.

[0104] In one embodiment, judging whether the tag to be tested has a raised foot according to the ideal coordinates and the actual coordinates of each corner point includes:

[0105] According to the ideal coordinates and actual coordinates of each corner point, determine the position offset of each corner point;

[0106] Determine whether the position offset of each corner point is less than the threshold;

[0107] If the position offsets of all corner points are less than the threshold, the tag to be tested does not have a tilted foot; if the position offset of at least one corner point is greater than or equal to the threshold, the tag to be tested has a tilted foot.

[0108] In one embodiment, determining the position offset of each corner point according to the ideal coordinates and the actual coordinates of each corner point includes:

[0109] The position offset of each corner point is determined according to the following formula:

[0110]

[0111] Among them, Offset represents the position offset, i represents the corner point index value, and its value range is {1, 2, ..., m}, m represents the number of corner points, cor_x(i) and cor_y(i) represent the actual coordinates of each corner point, and x(i) and y(i) represent the ideal coordinates of each corner point.

[0112] After obtaining the position offset of each corner point, the position offset can be compared with the threshold to determine whether there is a tilted foot. Specifically, the comparison can be made using the following formula:

[0113]

[0114] FlagFinal=Flag(1)|Flag(2)|Flag(3)|Flag(4)

[0115] Among them, Flag is the flag bit of whether there is a corner tipping defect, 1 indicates that there is a corner tipping defect, 0 indicates that there is no corner tipping defect, Thresh is the threshold, and FlagFinal is the flag bit of whether there is a corner tipping defect in the tag to be tested.

[0116] In the disclosed embodiment, as long as there is a curling defect at one corner point, the label to be tested has a curling defect.

[0117] The present disclosure also provides a device for detecting a label leg tilting. Figure 3 A schematic diagram of the structure of a label leg detection device provided in an embodiment of the present disclosure, as shown in FIG. Figure 3 As shown, the device comprises:

[0118] A first acquisition unit 301 is configured to acquire an image of a tag to be tested, wherein the tag to be tested includes a plurality of corner points;

[0119] A first extraction unit 302 is configured to extract edge lines in the image of the label to be tested;

[0120] The first determining unit 303 is configured to determine the ideal coordinates of each corner point of the label to be measured in the label coordinate system according to the edge line; wherein the label coordinate system is a coordinate system under the image of the label to be measured;

[0121] The second acquisition unit 304 is configured to acquire the region of interest of each corner point with the ideal coordinate position of each corner point as the center;

[0122] A second determining unit 305 is configured to determine the image of each corner point according to the image of the label to be tested and the region of interest of each corner point;

[0123] A second extraction unit 306 is configured to extract corner point features of the image of each corner point;

[0124] The third determining unit 307 is configured to determine the actual coordinates of each corner point in the label coordinate system according to the corner point features;

[0125] The judging unit 308 is configured to judge whether the tag to be tested has a raised foot according to the ideal coordinates and the actual coordinates of each corner point.

[0126] In one embodiment, the third determining unit 307 includes:

[0127] A first sub-determining unit is configured to determine the coordinates of each corner point in a corner point coordinate system and a translation value in an X-axis direction and a Y-axis direction according to the corner point features, wherein the corner point coordinate system is a coordinate system in an image of the corner point;

[0128] The second sub-determination unit is configured to determine the actual coordinates of each corner point in the tag coordinate system according to the coordinates of each corner point in the corner point coordinate system and the translation values ​​in the X-axis direction and the Y-axis direction.

[0129] In one embodiment, the determining unit 308 includes:

[0130] A third sub-determining unit is configured to determine a position offset of each corner point according to the ideal coordinates and the actual coordinates of each corner point;

[0131] A first sub-judgment unit is configured to judge whether the position offset of each corner point is less than a threshold;

[0132] If the position offsets of all corner points are less than the threshold, the tag to be tested does not have a tilted foot; if the position offset of at least one corner point is greater than or equal to the threshold, the tag to be tested has a tilted foot.

[0133] According to an embodiment of the present disclosure, the present disclosure also provides an electronic device and a readable storage medium.

[0134] Figure 4 A schematic block diagram of an example electronic device 400 that can be used to implement an embodiment of the present disclosure is shown. The electronic device is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device can also represent various forms of mobile devices, such as personal digital processing, cellular phones, smart phones, wearable devices, and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely examples and are not intended to limit the implementation of the present disclosure described and / or required herein.

[0135] like Figure 4As shown, the device 400 includes a computing unit 401, which can perform various appropriate actions and processes according to a computer program stored in a read-only memory (ROM) 402 or a computer program loaded from a storage unit 408 into a random access memory (RAM) 403. In the RAM 403, various programs and data required for the operation of the device 400 can also be stored. The computing unit 401, the ROM 402, and the RAM 403 are connected to each other via a bus 404. An input / output (I / O) interface 405 is also connected to the bus 404.

[0136] A number of components in the device 400 are connected to the I / O interface 405, including: an input unit 406, such as a keyboard, a mouse, etc.; an output unit 407, such as various types of displays, speakers, etc.; a storage unit 408, such as a disk, an optical disk, etc.; and a communication unit 409, such as a network card, a modem, a wireless communication transceiver, etc. The communication unit 409 allows the device 400 to exchange information / data with other devices through a computer network such as the Internet and / or various telecommunication networks.

[0137] The computing unit 401 may be a variety of general and / or special processing components with processing and computing capabilities. Some examples of the computing unit 401 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various dedicated artificial intelligence (AI) computing chips, various computing units running machine learning model algorithms, digital signal processors (DSPs), and any appropriate processors, controllers, microcontrollers, etc. The computing unit 401 performs the various methods and processes described above, such as a tag tipping detection method. For example, in some embodiments, the tag tipping detection method may be implemented as a computer software program, which is tangibly contained in a machine-readable medium, such as a storage unit 408. In some embodiments, part or all of the computer program may be loaded and / or installed on the device 400 via ROM 402 and / or communication unit 409. When the computer program is loaded into RAM 403 and executed by the computing unit 401, one or more steps of the tag tipping detection method described above may be performed. Alternatively, in other embodiments, the computing unit 401 may be configured to perform the tag tipping detection method in any other appropriate manner (e.g., by means of firmware).

[0138] Various implementations of the systems and techniques described above herein can be implemented in digital electronic circuit systems, integrated circuit systems, field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on chips (SOCs), complex programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various implementations can include: being implemented in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which can be a special purpose or general purpose programmable processor that can receive data and instructions from a storage system, at least one input device, and at least one output device, and transmit data and instructions to the storage system, the at least one input device, and the at least one output device.

[0139] The program code for implementing the method of the present disclosure may be written in any combination of one or more programming languages. These program codes may be provided to a processor or controller of a general-purpose computer, a special-purpose computer, or other programmable data processing device, so that the program code, when executed by the processor or controller, enables the functions / operations specified in the flow chart and / or block diagram to be implemented. The program code may be executed entirely on the machine, partially on the machine, partially on the machine and partially on a remote machine as a stand-alone software package, or entirely on a remote machine or server.

[0140] In the context of the present disclosure, a machine-readable medium may be a tangible medium that may contain or store a program for use by or in conjunction with an instruction execution system, device, or equipment. A machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, device, or equipment, or any suitable combination of the foregoing. A more specific example of a machine-readable storage medium may include an electrical connection based on one or more lines, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.

[0141] To provide interaction with a user, the systems and techniques described herein can be implemented on a computer having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user; and a keyboard and pointing device (e.g., a mouse or trackball) through which the user can provide input to the computer. Other types of devices can also be used to provide interaction with the user; for example, the feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form (including acoustic input, voice input, or tactile input).

[0142] The systems and techniques described herein may be implemented in a computing system that includes back-end components (e.g., as a data server), or a computing system that includes middleware components (e.g., an application server), or a computing system that includes front-end components (e.g., a user computer with a graphical user interface or a web browser through which a user can interact with implementations of the systems and techniques described herein), or a computing system that includes any combination of such back-end components, middleware components, or front-end components. The components of the system may be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: a local area network (LAN), a wide area network (WAN), and the Internet.

[0143] A computer system may include a client and a server. The client and the server are generally remote from each other and usually interact through a communication network. The relationship of client and server is generated by computer programs running on respective computers and having a client-server relationship with each other. The server may be a cloud server, a server of a distributed system, or a server combined with a blockchain.

[0144] It should be understood that the various forms of processes shown above can be used to reorder, add or delete steps. For example, the steps recorded in this disclosure can be executed in parallel, sequentially or in different orders, as long as the desired results of the technical solutions disclosed in this disclosure can be achieved, and this document does not limit this.

[0145] In addition, the terms "first" and "second" are used for descriptive purposes only and should not be understood as indicating or implying relative importance or implicitly indicating the number of technical features indicated. Thus, a feature defined as "first" or "second" may explicitly or implicitly include at least one of the features. In the description of the present disclosure, the meaning of "plurality" is two or more, unless otherwise clearly and specifically defined.

[0146] The above is only a specific embodiment of the present disclosure, but the protection scope of the present disclosure is not limited thereto. Any person skilled in the art who is familiar with the technical field can easily think of changes or substitutions within the technical scope disclosed in the present disclosure, which should be included in the protection scope of the present disclosure. Therefore, the protection scope of the present disclosure should be based on the protection scope of the claims.

Claims

1. A method for detecting a label leg tilting, characterized in that: The method comprises: Acquire an image of a label to be tested, wherein the label to be tested includes a plurality of corner points; Extracting edge lines in the image of the label to be tested; According to the edge line, determine the ideal coordinates of each corner point of the label to be tested in the label coordinate system; wherein the label coordinate system is a coordinate system under the image of the label to be tested; Taking the ideal coordinate position of each corner point as the center, obtain the region of interest of each corner point; Determine the image of each corner point according to the image of the label to be tested and the region of interest of each corner point; Extracting corner features of the image at each corner point; Determine the actual coordinates of each corner point in the label coordinate system according to the corner point features; According to the ideal coordinates and actual coordinates of each corner point, it is determined whether the tag to be tested has a tilted foot.

2. The method according to claim 1, characterized in that Determining the actual coordinates of each corner point in the label coordinate system according to the corner point features includes: Determine the coordinates of each corner point in a corner point coordinate system and the translation values ​​in the X-axis direction and the Y-axis direction according to the corner point features, wherein the corner point coordinate system is a coordinate system in the image of the corner point; According to the coordinates of each corner point in the corner point coordinate system and the translation values ​​in the X-axis direction and the Y-axis direction, the actual coordinates of each corner point in the label coordinate system are determined.

3. The method according to claim 2, characterized in that Determining the coordinates of each corner point in the corner point coordinate system and the translation values ​​in the X-axis direction and the Y-axis direction according to the corner point features includes: The image of each corner point includes multiple pixels, each pixel corresponds to a rectangular window W, and the pixel in the rectangular window W is the target pixel; The coordinates of each corner point in the corner point coordinate system and the translation values ​​in the X-axis and Y-axis directions are determined according to the following formula: Where E represents the expectation, x and y represent the horizontal and vertical coordinates of each pixel in the image of each corner point, u and v represent the translation values ​​of each pixel in the rectangular window and the target pixel in the X-axis direction and Y-axis direction, respectively, and I represents the pixel value corresponding to each pixel; When the expected value is the largest, the coordinates of each corner point in the corner point coordinate system and the translation values ​​in the X-axis direction and the Y-axis direction are determined.

4. The method according to claim 3, characterized in that Determining the actual coordinates of each corner point in the label coordinate system according to the coordinates of each corner point in the corner point coordinate system and the translation values ​​in the X-axis direction and the Y-axis direction includes: The actual coordinates of each corner point in the label coordinate system are determined according to the following formula: Cor_x=x_cor+u_cor+ROI_x cor_y=y_cor+v _ cor+ROI_y Among them, cor_x and cor_y represent the actual coordinates of the corner points, x_cor and y_cor represent the coordinates of each corner point in the corner point coordinate system when the expected value is maximum, u_cor and v _ cor represents the translation value of each corner point in the X-axis direction and the Y-axis direction when the expected value is maximum, and ROI_x and ROI_y represent the coordinates of the region of interest in the label coordinate system.

5. The method according to claim 1, characterized in that The step of judging whether the tag to be tested has a raised foot according to the ideal coordinates and the actual coordinates of each corner point includes: According to the ideal coordinates and actual coordinates of each corner point, determine the position offset of each corner point; Determine whether the position offset of each corner point is less than the threshold; If the position offsets of all corner points are less than the threshold, the tag to be tested does not have a tilted foot; if the position offset of at least one corner point is greater than or equal to the threshold, the tag to be tested has a tilted foot.

6. The method according to claim 5, characterized in that Determining the position offset of each corner point according to the ideal coordinates and the actual coordinates of each corner point includes: Determine the position offset of each corner point according to the following formula: Where Offset represents the position offset, i represents the corner point index value, and its value range is {1, 2, ..., m}, m represents the number of corner points, cor_x(i) and cor_y(i) represent the actual coordinates of each corner point, and x(i) and y(i) represent the ideal coordinates of each corner point.

7. A label leg detection device, characterized in that: The device comprises: A first acquisition unit is configured to acquire an image of a label to be tested, wherein the label to be tested includes a plurality of corner points; A first extraction unit, configured to extract edge lines in the image of the label to be tested; A first determining unit is configured to determine the ideal coordinates of each corner point of the label to be tested in a label coordinate system according to the edge line; wherein the label coordinate system is a coordinate system under the image of the label to be tested; A second acquisition unit is configured to acquire a region of interest of each corner point with the ideal coordinate position of each corner point as the center; A second determining unit is configured to determine the image of each corner point according to the image of the label to be tested and the region of interest of each corner point; A second extraction unit is configured to extract corner point features of the image of each corner point; A third determining unit is configured to determine the actual coordinates of each corner point in the label coordinate system according to the corner point features; The judging unit is configured to judge whether the tag to be tested has a raised foot according to the ideal coordinates and the actual coordinates of each corner point.

8. The device according to claim 7, characterized in that The third determining unit includes: a first sub-determining unit configured to determine the coordinates of each corner point in a corner point coordinate system and translation values ​​in the X-axis direction and the Y-axis direction according to the corner point features, wherein the corner point coordinate system is a coordinate system in the image of the corner point; The second sub-determining unit is configured to determine the actual coordinates of each corner point in the tag coordinate system according to the coordinates of each corner point in the corner point coordinate system and the translation values ​​in the X-axis direction and the Y-axis direction.

9. The device according to claim 7, characterized in that The judging unit comprises: A third sub-determining unit is configured to determine a position offset of each corner point according to the ideal coordinates and the actual coordinates of each corner point; A first sub-judgment unit is configured to judge whether the position offset of each corner point is less than a threshold; If the position offsets of all corner points are less than the threshold, the tag to be tested does not have a tilted foot; if the position offset of at least one corner point is greater than or equal to the threshold, the tag to be tested has a tilted foot.

10. An electronic device, characterized in that: include: at least one processor; as well as a memory communicatively connected to the at least one processor; wherein, The memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to perform the method according to any one of claims 1 to 6.

11. A non-transitory computer-readable storage medium storing computer instructions, characterized in that: The computer instructions are used to make a computer execute the method according to any one of claims 1-6.