CN116681913A - Positioning method, device, equipment and storage medium for label printing - Google Patents

Positioning method, device, equipment and storage medium for label printing Download PDF

Info

Publication number
CN116681913A
CN116681913A CN202310539141.XA CN202310539141A CN116681913A CN 116681913 A CN116681913 A CN 116681913A CN 202310539141 A CN202310539141 A CN 202310539141A CN 116681913 A CN116681913 A CN 116681913A
Authority
CN
China
Prior art keywords
image
determining
contour
label
detected
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202310539141.XA
Other languages
Chinese (zh)
Inventor
吴海涛
黄保金
赵兵
李飞
周觅
阮学高
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Hefei Lianbao Information Technology Co Ltd
Original Assignee
Hefei Lianbao Information Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Hefei Lianbao Information Technology Co Ltd filed Critical Hefei Lianbao Information Technology Co Ltd
Priority to CN202310539141.XA priority Critical patent/CN116681913A/en
Publication of CN116681913A publication Critical patent/CN116681913A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/70Arrangements for image or video recognition or understanding using pattern recognition or machine learning
    • G06V10/74Image or video pattern matching; Proximity measures in feature spaces
    • G06V10/75Organisation of the matching processes, e.g. simultaneous or sequential comparisons of image or video features; Coarse-fine approaches, e.g. multi-scale approaches; using context analysis; Selection of dictionaries
    • G06V10/751Comparing pixel values or logical combinations thereof, or feature values having positional relevance, e.g. template matching
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T5/00Image enhancement or restoration
    • G06T5/50Image enhancement or restoration by the use of more than one image, e.g. averaging, subtraction
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/60Analysis of geometric attributes
    • G06T7/62Analysis of geometric attributes of area, perimeter, diameter or volume
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/20Special algorithmic details
    • G06T2207/20212Image combination
    • G06T2207/20224Image subtraction

Abstract

The disclosure provides a positioning method, a device, equipment and a storage medium for label printing, wherein the method comprises the following steps: acquiring an initial binarization image of a label to be detected; determining a difference image between the initial binarized image and a binarized image of a template map; determining all contours in the difference image to obtain a contour set; determining the contour characteristics of each contour in the contour set; determining offset parameters of the label to be detected according to all the contour features; and adjusting the initial binarized image of the label to be detected according to the offset parameter. According to the method, the binary image of the label to be detected is adjusted, so that positioning offset caused by noise and the like is avoided, the positioning accuracy of the label is improved, and the false detection rate is further reduced.

Description

Positioning method, device, equipment and storage medium for label printing
Technical Field
The disclosure relates to the technical field of visual detection, and in particular relates to a positioning method, device and equipment for label printing and a storage medium.
Background
The application of the machine vision technology in the printing detection of the packaged products improves the printing accuracy of the packaged products. However, because the production environment of the packaged product is not in a dust-free state, and the defects of ink throwing and the like are easily generated in the printing process, noise is further introduced, positioning errors are generated when the product to be detected is compared with the template of the design drawing, and the detection precision is affected. The positioning method of the label to be detected in the image of the packaged product is a key technology in the printing detection of the packaged product, so that the positioning precision of the label printing needs to be improved, and the label detection precision is improved.
Disclosure of Invention
The present disclosure provides a positioning method, apparatus, device and storage medium for label printing, so as to at least solve the above technical problems in the prior art.
According to a first aspect of the present disclosure, there is provided a method of positioning label printing, the method comprising:
acquiring an initial binarization image of a label to be detected;
determining a difference image between the initial binarized image and a binarized image of a template map;
determining all contours in the difference image to obtain a contour set; determining the contour characteristics of each contour in the contour set;
determining offset parameters of the label to be detected according to all the contour features;
and adjusting the initial binarized image of the label to be detected according to the offset parameter.
In an embodiment, the acquiring the initial binary image of the tag to be detected includes:
acquiring an original image of a label to be detected;
and after the original image and the template image are subjected to primary template matching, obtaining an initial binarization image of the label to be detected.
In one embodiment, the profile features include a profile moment, a profile length, a profile area, and a barycentric coordinate.
In an embodiment, the determining the offset parameter of the label to be detected according to all contour features includes:
determining a contour corresponding to the longest contour length, and determining the width and direction of the contour at the center of gravity;
shifting the initial binarization image for a plurality of times in the width direction according to the width of the outline to obtain a plurality of binary images to be detected;
determining a difference value diagram between each binary diagram to be detected and a binary image of the template diagram;
determining whether the minimum value of the total outline area of all the difference images meets a threshold condition, and if so, enabling the initial binarized image to have deviation; and determining the offset parameter of the label to be detected according to the difference value diagram corresponding to the minimum value.
In an embodiment, the determining the offset parameter of the to-be-detected tag according to the difference map corresponding to the minimum value includes:
and determining a translation matrix according to the width and the direction of the outline, wherein each element in the translation matrix is the translation parameter.
According to a second aspect of the present disclosure there is provided a label printed positioning device, the device comprising:
the acquisition module is used for acquiring an initial binarization image of the label to be detected;
the difference image determining module is used for determining a difference image between the initial binarization image and the binarization image of the template image;
the contour feature determining module is used for determining all contours in the difference image to obtain a contour set; determining the contour characteristics of each contour in the contour set;
the offset parameter determining module is used for determining the offset parameters of the label to be detected according to all the contour features;
and the adjusting module is used for adjusting the initial binarized image of the label to be detected according to the offset parameter.
In an embodiment, the obtaining module is specifically configured to:
acquiring an original image of a label to be detected;
and after the original image and the template image are subjected to primary template matching, obtaining an initial binarization image of the label to be detected.
In an embodiment, the offset parameter determining module is specifically configured to:
determining a contour corresponding to the longest contour length, and determining the width and direction of the contour at the center of gravity;
shifting the initial binarization image for a plurality of times in the width direction according to the width of the outline to obtain a plurality of binary images to be detected;
determining a difference value diagram between each binary diagram to be detected and a binary image of the template diagram;
determining whether the minimum value of the total outline area of all the difference images meets a threshold condition, and if so, enabling the initial binarized image to have deviation; and determining the offset parameter of the label to be detected according to the difference value diagram corresponding to the minimum value.
According to a third aspect of the present disclosure, there is provided an electronic device comprising:
at least one processor; and
a memory communicatively coupled to the at least one processor; wherein, the liquid crystal display device comprises a liquid crystal display device,
the memory stores instructions executable by the at least one processor to enable the at least one processor to perform the methods described in the present disclosure.
According to a fourth aspect of the present disclosure, there is provided a non-transitory computer readable storage medium storing computer instructions for causing the computer to perform the method of the present disclosure.
The disclosure provides a positioning method, a positioning device, positioning equipment and a storage medium for label printing, wherein an initial binarized image of a label to be detected is acquired first; determining a difference image between the initial binarization image and a binarization image of a template image; determining all contours in the difference image to obtain a contour set; determining the contour characteristics of each contour in the contour set; further determining offset parameters of the label to be detected according to all the contour features; and finally, adjusting the initial binarization image of the label to be detected according to the offset parameter. According to the technical scheme, through adjusting the binarized image of the label to be detected, positioning offset caused by noise and the like is avoided, the positioning accuracy of the label is improved, and the false detection rate is further reduced.
It should be understood that the description in this section is not intended to identify key or critical features of the embodiments of the disclosure, nor is it intended to be used to limit the scope of the disclosure. Other features of the present disclosure will become apparent from the following specification.
Drawings
The above, as well as additional purposes, features, and advantages of exemplary embodiments of the present disclosure will become readily apparent from the following detailed description when read in conjunction with the accompanying drawings. Several embodiments of the present disclosure are illustrated by way of example, and not by way of limitation, in the figures of the accompanying drawings, in which:
in the drawings, the same or corresponding reference numerals indicate the same or corresponding parts.
FIG. 1 illustrates a flow diagram of a method for positioning label printing in accordance with an embodiment of the present disclosure;
FIG. 2 illustrates a flow diagram of an implementation of a method of a positioning method of label printing according to an embodiment of the present disclosure;
FIG. 3 illustrates a schematic diagram of acquiring an initial binarized image of a label to be detected in accordance with an embodiment of the present disclosure;
FIG. 4 illustrates a schematic diagram of determining an offset parameter of a tag to be detected in accordance with an embodiment of the present disclosure;
FIG. 5 shows a schematic structural view of a label-printing positioning device according to an embodiment of the present disclosure;
fig. 6 shows a schematic diagram of a composition structure of an electronic device according to an embodiment of the present disclosure.
Detailed Description
In order to make the objects, features and advantages of the present disclosure more comprehensible, the technical solutions in the embodiments of the present disclosure will be clearly described in conjunction with the accompanying drawings in the embodiments of the present disclosure, and it is apparent that the described embodiments are only some embodiments of the present disclosure, but not all embodiments. Based on the embodiments in this disclosure, all other embodiments that a person skilled in the art would obtain without making any inventive effort are within the scope of protection of this disclosure.
Fig. 1-2 are schematic flow diagrams of a positioning method for label printing according to an embodiment of the present invention, where the method includes:
s1, acquiring an initial binarization image of a label to be detected;
in one example, acquiring an initial binarized image of a tag to be detected includes:
s11, acquiring an original image of a label to be detected;
s12, after the original image and the template image are subjected to primary template matching, an initial binarization image of the label to be detected is obtained.
The original image of the label to be detected can be a label printing sample image processed by a worker, or can be an original image acquired by acquisition equipment, and the invention is not limited to the original image. The template diagram is a template obtained by shooting by the acquisition equipment. After the primary template matching is carried out on the original image and the template image, conventional image processing operations such as gray level conversion, gaussian filtering, binarization processing and the like are carried out, and then an initial binarization image of the label to be detected is obtained.
S2, determining a difference image between the initial binarization image and a binarization image of a template image;
and subtracting the initial binarized image of the label to be detected from the binarized image of the template image, namely performing difference operation to obtain a difference image between the two binarized images. The calculation formula is as follows:
dst(I)=abs(src1(I)-src2(I))#(1)
wherein, in formula (1), I is traversing the pixel, src1 is a binary image of the label to be detected, src2 is a binary image of the template image, and dst is a difference image.
S3, determining all contours in the difference image to obtain a contour set; determining the contour characteristics of each contour in the contour set;
performing contour searching on the difference image, determining all contours, and obtaining a contour set; the profile features of each profile are further determined, wherein the profile features include a profile moment, a profile length, a profile area, and a barycentric coordinate.
Calculating the contour moment, the contour length and the contour area of each contour, and further calculating the center coordinate of the contour through the contour moment, wherein the center coordinate is calculated as follows:
G x =m 10 ÷m 00 #(2)
G y =m 01 ÷m 00 #(3)
in the formulas (2) and (3), gx and Gy are the x and y coordinates of the center of gravity of the profile, and m 00 For the 0 th moment of the outline, m 10 、m 01 Is the 1 st moment of the contour.
S4, determining offset parameters of the label to be detected according to all the contour features;
in one example, the determining the offset parameter of the tag to be detected according to all profile features includes:
s41, determining a contour corresponding to the longest contour length, and determining the width and the direction of the contour at the center of gravity;
s42, shifting the initial binarization image for a plurality of times in the width direction according to the width of the outline to obtain a plurality of binary images to be detected;
s43, determining a difference value diagram between each binary diagram to be detected and a binary image of the template diagram;
s44, determining whether the minimum value of the total outline area of all the difference images meets a threshold condition, and if so, enabling the initial binarized image to have deviation; and determining the offset parameter of the label to be detected according to the difference value diagram corresponding to the minimum value.
And determining the contour corresponding to the longest line in the contour set according to the contour length in all contour features, calculating the contour width w and the width direction theta of the contour at the center of gravity, and shifting the label binary images for a plurality of times in the (-w, w) range along the width direction to obtain a plurality of binary images to be detected to form a binary image set to be detected. For example, the (-w, w) range is divided into 5 times, and the label binary image is moved 5 times, so that 5 binary images to be detected are obtained to form a binary image set to be detected.
And calculating a difference value diagram by the binary diagrams to be detected and the binary diagram of the template diagram, and calculating whether the minimum value of the total contour area of the difference value diagram is smaller than a threshold value, wherein the threshold value is set as an original value, and the original value is the sum of all contour areas determined according to the step S3. If the minimum value is smaller than the original value, the deviation exists in the primary positioning, positioning adjustment is carried out according to the minimum value state, and otherwise, the original binary image is still used. The translation formula in the width direction is as follows:
dst(x,y)=src(M 11 x+M 12 y+M 13 ,M 21 x+M 22 y+M 23 )#(4)
dst in formulas (4) - (5) is a post-shift image, src is a pre-shift image, M is a shift matrix, w is a contour line width, and θ is a width direction.
S5, adjusting the initial binarization image of the label to be detected according to the offset parameter.
In one example, determining the offset parameter of the tag to be detected according to the difference map corresponding to the minimum value includes:
and determining a translation matrix according to the width and the direction of the outline, wherein each element in the translation matrix is the translation parameter.
The method comprises the steps of firstly obtaining an initial binarization image of a label to be detected; determining a difference image between the initial binarization image and a binarization image of a template image; determining all contours in the difference image to obtain a contour set; determining the contour characteristics of each contour in the contour set; further determining offset parameters of the label to be detected according to all the contour features; and finally, adjusting the initial binarization image of the label to be detected according to the offset parameter. According to the technical scheme, through adjusting the binarized image of the label to be detected, positioning offset caused by noise and the like is avoided, the positioning accuracy of the label is improved, and the false detection rate is further reduced.
Fig. 3 is a schematic structural diagram of a positioning device for label printing according to the present invention, where the device includes:
an acquisition module 10, configured to acquire an initial binarized image of a tag to be detected;
a difference image determining module 20, configured to determine a difference image between the initial binarized image and a binarized image of a template map;
a contour feature determining module 30, configured to determine all contours in the difference image, so as to obtain a contour set; determining the contour characteristics of each contour in the contour set;
an offset parameter determining module 40, configured to determine an offset parameter of the tag to be detected according to all profile features;
the adjustment module 50 is configured to adjust the initial binary image of the tag to be detected according to the offset parameter.
In one example, the acquisition module 10 is specifically configured to:
acquiring an original image of a label to be detected;
and after the original image and the template image are subjected to primary template matching, obtaining an initial binarization image of the label to be detected.
In one example, the profile features include a profile moment, a profile length, a profile area, and a barycentric coordinate.
In one example, the offset parameter determination module 40 is specifically configured to:
determining a contour corresponding to the longest contour length, and determining the width and direction of the contour at the center of gravity;
shifting the initial binarization image for a plurality of times in the width direction according to the width of the outline to obtain a plurality of binary images to be detected;
determining a difference value diagram between each binary diagram to be detected and a binary image of the template diagram;
determining whether the minimum value of the total outline area of all the difference images meets a threshold condition, and if so, enabling the initial binarized image to have deviation; and determining the offset parameter of the label to be detected according to the difference value diagram corresponding to the minimum value.
In one example, the adjustment module 50 is specifically configured to:
and determining a translation matrix according to the width and the direction of the outline, wherein each element in the translation matrix is the translation parameter.
According to embodiments of the present disclosure, the present disclosure also provides an electronic device and a readable storage medium.
Fig. 6 shows a schematic block diagram of an example electronic device 800 that may be used to implement embodiments of the present disclosure. Electronic devices are intended to represent various forms of digital computers, such as laptops, desktops, workstations, personal digital assistants, servers, blade servers, mainframes, and other appropriate computers. The electronic device may also represent various forms of mobile devices, such as personal digital processing, cellular telephones, smartphones, wearable devices, and other similar computing devices. The components shown herein, their connections and relationships, and their functions, are meant to be exemplary only, and are not meant to limit implementations of the disclosure described and/or claimed herein.
As shown in fig. 6, the apparatus 800 includes a computing unit 801 that can perform various appropriate actions and processes according to a computer program stored in a Read Only Memory (ROM) 802 or a computer program loaded from a storage unit 808 into a Random Access Memory (RAM) 803. In the RAM 803, various programs and data required for the operation of the device 800 can also be stored. The computing unit 801, the ROM 802, and the RAM 803 are connected to each other by a bus 804. An input/output (I/O) interface 805 is also connected to the bus 804.
Various components in device 800 are connected to I/O interface 805, including: an input unit 806 such as a keyboard, mouse, etc.; an output unit 807 such as various types of displays, speakers, and the like; a storage unit 808, such as a magnetic disk, optical disk, etc.; and a communication unit 809, such as a network card, modem, wireless communication transceiver, or the like. The communication unit 809 allows the device 800 to exchange information/data with other devices via a computer network such as the internet and/or various telecommunication networks.
The computing unit 801 may be a variety of general and/or special purpose processing components having processing and computing capabilities. Some examples of computing unit 801 include, but are not limited to, a Central Processing Unit (CPU), a Graphics Processing Unit (GPU), various specialized Artificial Intelligence (AI) computing chips, various computing units running machine learning model algorithms, a Digital Signal Processor (DSP), and any suitable processor, controller, microcontroller, etc. The computing unit 801 performs the various methods and processes described above, such as a label printing positioning method. For example, in some embodiments, the positioning method of label printing may be implemented as a computer software program tangibly embodied on a machine-readable medium, such as the storage unit 808. In some embodiments, part or all of the computer program may be loaded and/or installed onto device 800 via ROM 802 and/or communication unit 809. When the computer program is loaded into RAM 803 and executed by computing unit 801, one or more steps of the positioning method of label printing described above may be performed. Alternatively, in other embodiments, the computing unit 801 may be configured to perform the positioning method of label printing by any other suitable means (e.g., by means of firmware).
Various implementations of the systems and techniques described here above may be implemented in digital electronic circuitry, integrated circuit systems, field Programmable Gate Arrays (FPGAs), application Specific Integrated Circuits (ASICs), application Specific Standard Products (ASSPs), systems On Chip (SOCs), load programmable logic devices (CPLDs), computer hardware, firmware, software, and/or combinations thereof. These various embodiments may include: implemented in one or more computer programs, the one or more computer programs may be executed and/or interpreted on a programmable system including at least one programmable processor, which may be a special purpose or general-purpose programmable processor, that may receive data and instructions from, and transmit data and instructions to, a storage system, at least one input device, and at least one output device.
Program code for carrying out methods of the present disclosure may be written in any combination of one or more programming languages. These program code may be provided to a processor or controller of a general purpose computer, special purpose computer, or other programmable data processing apparatus such that the program code, when executed by the processor or controller, causes the functions/operations specified in the flowchart and/or block diagram to be implemented. The program code may execute entirely on the machine, partly on the machine, as a stand-alone software package, partly on the machine and partly on a remote machine or entirely on the remote machine or server.
In the context of this disclosure, a machine-readable medium may be a tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. The machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. The machine-readable medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any suitable combination of the foregoing. More specific examples of a machine-readable storage medium would include an electrical connection based on one or more wires, a portable computer diskette, 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 disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
To provide for interaction with a user, the systems and techniques described here 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 a user; and a keyboard and pointing device (e.g., a mouse or trackball) by which a user can provide input to the computer. Other kinds of devices may also be used to provide for interaction with a user; for example, feedback provided to the user may be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user may be received in any form, including acoustic input, speech input, or tactile input.
The systems and techniques described here can be implemented in a computing system that includes a background component (e.g., as a data server), or that includes a middleware component (e.g., an application server), or that includes a front-end component (e.g., a user computer having a graphical user interface or a web browser through which a user can interact with an implementation of the systems and techniques described here), or any combination of such background, middleware, or front-end components. The components of the system can be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: local Area Networks (LANs), wide Area Networks (WANs), and the internet.
The computer system may include a client and a server. The client and server are typically remote from each other and typically interact through a communication network. The relationship of client and server arises by virtue of computer programs running on the respective computers and having a client-server relationship to each other. The server may be a cloud server, a server of a distributed system, or a server incorporating a blockchain.
It should be appreciated that various forms of the flows shown above may be used to reorder, add, or delete steps. For example, the steps recited in the present disclosure may be performed in parallel or sequentially or in a different order, provided that the desired results of the technical solutions of the present disclosure are achieved, and are not limited herein.
Furthermore, the terms "first," "second," and the like, are used for descriptive purposes only and are not to be construed as indicating or implying a relative importance or implicitly indicating the number of technical features indicated. Thus, a feature defining "a first" or "a second" may explicitly or implicitly include at least one such feature. In the description of the present disclosure, the meaning of "a plurality" is two or more, unless explicitly defined otherwise.
The foregoing is merely specific embodiments of the disclosure, but the protection scope of the disclosure is not limited thereto, and any person skilled in the art can easily think about changes or substitutions within the technical scope of the disclosure, and it is intended to cover the scope of the disclosure. Therefore, the protection scope of the present disclosure shall be subject to the protection scope of the claims.

Claims (10)

1. A method of positioning label printing, the method comprising:
acquiring an initial binarization image of a label to be detected;
determining a difference image between the initial binarized image and a binarized image of a template map;
determining all contours in the difference image to obtain a contour set; determining the contour characteristics of each contour in the contour set;
determining offset parameters of the label to be detected according to all the contour features;
and adjusting the initial binarized image of the label to be detected according to the offset parameter.
2. The method of claim 1, wherein the acquiring the initial binarized image of the tag to be detected comprises:
acquiring an original image of a label to be detected;
and after the original image and the template image are subjected to primary template matching, obtaining an initial binarization image of the label to be detected.
3. The method of claim 1, wherein the profile features comprise a profile moment, a profile length, a profile area, and a barycentric coordinate.
4. A method according to claim 3, wherein said determining the offset parameters of the label to be detected from all profile features comprises:
determining a contour corresponding to the longest contour length, and determining the width and direction of the contour at the center of gravity;
shifting the initial binarization image for a plurality of times in the width direction according to the width of the outline to obtain a plurality of binary images to be detected;
determining a difference value diagram between each binary diagram to be detected and a binary image of the template diagram;
determining whether the minimum value of the total outline area of all the difference images meets a threshold condition, and if so, enabling the initial binarized image to have deviation; and determining the offset parameter of the label to be detected according to the difference value diagram corresponding to the minimum value.
5. The method according to claim 4, wherein determining the offset parameter of the tag to be detected according to the difference map corresponding to the minimum value includes:
and determining a translation matrix according to the width and the direction of the outline, wherein each element in the translation matrix is the translation parameter.
6. A positioning device for label printing, the device comprising:
the acquisition module is used for acquiring an initial binarization image of the label to be detected;
the difference image determining module is used for determining a difference image between the initial binarization image and the binarization image of the template image;
the contour feature determining module is used for determining all contours in the difference image to obtain a contour set; determining the contour characteristics of each contour in the contour set;
the offset parameter determining module is used for determining the offset parameters of the label to be detected according to all the contour features;
and the adjusting module is used for adjusting the initial binarized image of the label to be detected according to the offset parameter.
7. The apparatus of claim 6, wherein the obtaining module is specifically configured to:
acquiring an original image of a label to be detected;
and after the original image and the template image are subjected to primary template matching, obtaining an initial binarization image of the label to be detected.
8. The apparatus of claim 6, wherein the offset parameter determination module is specifically configured to:
determining a contour corresponding to the longest contour length, and determining the width and direction of the contour at the center of gravity;
shifting the initial binarization image for a plurality of times in the width direction according to the width of the outline to obtain a plurality of binary images to be detected;
determining a difference value diagram between each binary diagram to be detected and a binary image of the template diagram;
determining whether the minimum value of the total outline area of all the difference images meets a threshold condition, and if so, enabling the initial binarized image to have deviation; and determining the offset parameter of the label to be detected according to the difference value diagram corresponding to the minimum value.
9. An electronic device, comprising:
at least one processor; and
a memory communicatively coupled to the at least one processor; wherein, the liquid crystal display device comprises a liquid crystal display device,
the memory stores instructions executable by the at least one processor to enable the at least one processor to perform the method of any one of claims 1-5.
10. A non-transitory computer readable storage medium storing computer instructions for causing the computer to perform the method of any one of claims 1-5.
CN202310539141.XA 2023-05-11 2023-05-11 Positioning method, device, equipment and storage medium for label printing Pending CN116681913A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202310539141.XA CN116681913A (en) 2023-05-11 2023-05-11 Positioning method, device, equipment and storage medium for label printing

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202310539141.XA CN116681913A (en) 2023-05-11 2023-05-11 Positioning method, device, equipment and storage medium for label printing

Publications (1)

Publication Number Publication Date
CN116681913A true CN116681913A (en) 2023-09-01

Family

ID=87784451

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202310539141.XA Pending CN116681913A (en) 2023-05-11 2023-05-11 Positioning method, device, equipment and storage medium for label printing

Country Status (1)

Country Link
CN (1) CN116681913A (en)

Similar Documents

Publication Publication Date Title
CN113705362B (en) Training method and device of image detection model, electronic equipment and storage medium
CN113034456B (en) Bolt loosening detection method, device, equipment and storage medium
CN116740355A (en) Automatic driving image segmentation method, device, equipment and storage medium
WO2023029491A1 (en) Panel array short circuit detection method and apparatus, electronic device, and storage medium
CN115272290A (en) Defect detection method and device, electronic equipment and storage medium
CN112508005B (en) Method, apparatus, device and storage medium for processing image
CN116486126B (en) Template determination method, device, equipment and storage medium
CN116402820A (en) Detection method, detection device, detection equipment and storage medium
CN116681913A (en) Positioning method, device, equipment and storage medium for label printing
CN114677566B (en) Training method of deep learning model, object recognition method and device
CN116205889A (en) Offset detection method, offset detection device, electronic equipment and storage medium
CN116188940A (en) Method and device for training model, storage medium and electronic equipment
CN115311624A (en) Slope displacement monitoring method and device, electronic equipment and storage medium
CN114581711A (en) Target object detection method, apparatus, device, storage medium, and program product
CN116091486B (en) Surface defect detection method, surface defect detection device, electronic equipment and storage medium
CN116823924B (en) Determination method and device for defect area, electronic equipment and storage medium
CN117372408A (en) Equipment detection method, device, equipment and storage medium
CN112507951B (en) Indicating lamp identification method, indicating lamp identification device, indicating lamp identification equipment, road side equipment and cloud control platform
CN117764913A (en) Image detection method, device, electronic equipment and storage medium
CN116597209A (en) Image classification method, device, equipment and storage medium
CN113409288B (en) Image definition detection method, device, equipment and storage medium
CN114092874B (en) Training method of target detection model, target detection method and related equipment thereof
CN116109991B (en) Constraint parameter determination method and device of model and electronic equipment
CN117635550A (en) Detection method, detection device, detection equipment and storage medium
CN116596941A (en) Image segmentation method, device, equipment and storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination