CN112902843A - Label attaching effect detection method - Google Patents

Label attaching effect detection method Download PDF

Info

Publication number
CN112902843A
CN112902843A CN202110154189.XA CN202110154189A CN112902843A CN 112902843 A CN112902843 A CN 112902843A CN 202110154189 A CN202110154189 A CN 202110154189A CN 112902843 A CN112902843 A CN 112902843A
Authority
CN
China
Prior art keywords
label
attaching effect
detection
template
light
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.)
Granted
Application number
CN202110154189.XA
Other languages
Chinese (zh)
Other versions
CN112902843B (en
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.)
Beijing Chuangyuan Microsoft Co ltd
Original Assignee
Beijing Chuangyuan Microsoft 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 Beijing Chuangyuan Microsoft Co ltd filed Critical Beijing Chuangyuan Microsoft Co ltd
Priority to CN202110154189.XA priority Critical patent/CN112902843B/en
Publication of CN112902843A publication Critical patent/CN112902843A/en
Application granted granted Critical
Publication of CN112902843B publication Critical patent/CN112902843B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G01MEASURING; TESTING
    • G01BMEASURING LENGTH, THICKNESS OR SIMILAR LINEAR DIMENSIONS; MEASURING ANGLES; MEASURING AREAS; MEASURING IRREGULARITIES OF SURFACES OR CONTOURS
    • G01B11/00Measuring arrangements characterised by the use of optical techniques
    • BPERFORMING OPERATIONS; TRANSPORTING
    • B65CONVEYING; PACKING; STORING; HANDLING THIN OR FILAMENTARY MATERIAL
    • B65CLABELLING OR TAGGING MACHINES, APPARATUS, OR PROCESSES
    • B65C9/00Details of labelling machines or apparatus
    • B65C9/40Controls; Safety devices
    • GPHYSICS
    • G01MEASURING; TESTING
    • G01BMEASURING LENGTH, THICKNESS OR SIMILAR LINEAR DIMENSIONS; MEASURING ANGLES; MEASURING AREAS; MEASURING IRREGULARITIES OF SURFACES OR CONTOURS
    • G01B11/00Measuring arrangements characterised by the use of optical techniques
    • G01B11/26Measuring arrangements characterised by the use of optical techniques for measuring angles or tapers; for testing the alignment of axes
    • BPERFORMING OPERATIONS; TRANSPORTING
    • B65CONVEYING; PACKING; STORING; HANDLING THIN OR FILAMENTARY MATERIAL
    • B65CLABELLING OR TAGGING MACHINES, APPARATUS, OR PROCESSES
    • B65C9/00Details of labelling machines or apparatus
    • B65C9/40Controls; Safety devices
    • B65C2009/402Controls; Safety devices for detecting properties or defects of labels
    • B65C2009/407Controls; Safety devices for detecting properties or defects of labels after labelling

Landscapes

  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Image Analysis (AREA)

Abstract

The invention discloses a label attaching effect detection method, and belongs to the technical field of automation. A label attaching effect detection method comprises the following steps: step 1) a CCD camera takes pictures and images and carries out image preprocessing on the pictures; step 2) respectively establishing templates based on the label and the packaging box characteristics; step 3) repeating the step 1), matching and searching the processed picture and the template to realize coarse positioning; step 4) identifying the corner information of the label, and calculating the relative position relationship between the label and the packaging box by identifying the corner information of the packaging box, wherein the relative position relationship comprises the information of the X direction, the Y direction and the rotation angle, so as to obtain the offset from the optimal position; and 5) judging whether the offset is in a specified range and publishing a detection result. The invention realizes automatic detection of the label attaching effect, effectively reduces the interference to the detection due to unobvious characteristics of the detected object or background environment and the like, and greatly improves the detection success rate and the detection efficiency.

Description

Label attaching effect detection method
Technical Field
The invention relates to the technical field of automation, in particular to a method for detecting a label attaching effect in automatic machine vision.
Background
The detection of the attaching effect of the label refers to the detection of the attaching effect of the label after the label is attached to the product, and comprises the detection of the attaching effect, and the offset information of the X direction, the Y direction and the rotating angle between the label paper and the product. However, in the current market application occasions, on one hand, based on the condition that the contrast of the black label of the black product is not obvious, the information of grabbing the paper edge of the label cannot be stably identified; on the other hand, the surface of some black products at present has tiny irregularly distributed white stains, so that the difficulty of identifying and grabbing the edges of the label paper is increased, and a large amount of phenomena of identifying and grabbing failures exist. Therefore, the invention provides a novel detection method aiming at the misjudgment condition of label attaching effect detection so as to solve the problem.
Disclosure of Invention
The invention aims to provide a novel label attaching effect detection method to reduce misjudgment in label attaching effect detection.
To achieve the above technical object, the technical solution of the embodiment of the present invention is as follows.
Step 1) a CCD camera takes pictures and pictures, and cuts the pictures and processes the gray scale to obtain images with obvious clear characteristics;
step 2) respectively establishing templates of the characteristics of the label and the packing box when the label and the packing box are at the optimal positions;
step 3) repeating the step 1), matching and searching the processed picture and the template, and realizing coarse positioning so that the position of the tool completing the subsequent step changes along with the position change of the template;
step 4) identifying corner information of the label through detecting the relation between the light and shade contrast of the two sides of the edge, and calculating the relative position relation between the label and the packing box through identifying the corner information of the packing box, wherein the relative position relation comprises X direction, Y direction and rotation angle information, so as to obtain the offset with the optimal position;
when the light and shade contrast on the two sides of the edge to be identified is low, the caliper scoring mode adopts position scoring;
and 5) judging whether the offset is in a specified range according to the offset, and publishing a detection result.
Judging the offset to be qualified when the offset is within a fixed range, and classifying the qualified condition as OK display;
and judging the deviation as unqualified when the deviation is not in the fixed range, and classifying the unqualified condition as NG display.
Further, in step 2), a template containing the characteristic value of the product to be searched is established and trained.
Further, in the step 3), the template matching search is set to search only one template, and the matching threshold is set to be about 0.5, so that the success rate of template identification is effectively improved; the threshold is the similarity between the picture processed in the step 3) and the template in the step 2).
Furthermore, in the step 3), a certain photographing error is considered, the scaling is limited to 0.9-1.1, and the influence of the placing position of the product and the photographing error of the CCD camera on the template recognition is effectively avoided.
Further, in the step 4), the caliper is a tool for detecting and identifying the edge, the caliper selects a certain number of points with obvious light and shade contrast on two sides through detection, the selected points are fitted into a line, and the fitted line is the edge required to be detected and identified.
Furthermore, in the setting, certain number of points is ignored, so that the number of the ignored points is not more than 25 percent of the number of the calipers in the fitting calculation without adding a line
Further, in step 4), the caliper selects a single edge mode and analyzes the single edge mode by using a method of light-to-dark or dark-to-light analysis; the false judgment caused by the detection and identification of the opposite sides such as stain spots and the like on the surface of the product is effectively avoided.
Furthermore, in the step 4), the position score means that a point with light and dark contrast on two sides is selected near the center line of the caliper in priority, so that the interference of the condition that the contrast on two sides of the edge to be detected and identified is not obvious to the detection result is effectively reduced.
Compared with the prior art, the embodiment of the invention has the advantages that:
when the light and shade contrast on two sides of the edge to be identified is low, the caliper uses a position scoring mode to preferentially search a point with the light and shade contrast near the center line of the search box, and the point is adopted to carry out fitting calculation of a line, so that the interference of the low light and shade contrast on two sides of the edge to be identified on a search result is reduced, and the identification success rate of the edge of the product when the light and shade contrast on two sides of the edge to be identified is low is effectively improved;
when the light and shade contrast of the two sides of the edge to be identified is low, certain points are ignored in the caliper setting, so that the points are not added in the fitting calculation of the line, the number of the ignored points is not more than 25% of the number of the calipers, the interference of the product background environment on the search result is reduced, and the success rate of identifying the edge line of the product when the background environment is interfered is effectively improved.
Detailed Description
In order to make the objects, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below, and it is obvious that the described embodiments are a part of the embodiments of the present invention, but not all of the embodiments.
In an embodiment of the present invention, the method specifically includes the following steps:
step 1) a CCD camera takes pictures and pictures, and cuts the pictures and processes the gray scale to obtain images with obvious clear characteristics;
step 2) respectively establishing templates of the characteristics of the label and the packing box when the label and the packing box are at the optimal positions;
step 3) repeating the step 1), matching and searching the processed picture and the template, and realizing coarse positioning so that the position of the tool completing the subsequent step changes along with the position change of the template;
step 4) identifying corner information of the label through detecting the relation between the light and shade contrast of the two sides of the edge, and calculating the relative position relation between the label and the packing box through identifying the corner information of the packing box, wherein the relative position relation comprises X direction, Y direction and rotation angle information, so as to obtain the offset with the optimal position;
when the light and shade contrast on the two sides of the edge to be identified is low, the caliper scoring mode adopts position scoring;
and 5) judging whether the offset is in a specified range according to the offset, and publishing a detection result.
Judging the offset to be qualified when the offset is within a fixed range, and classifying the qualified condition as OK display;
and judging the deviation as unqualified when the deviation is not in the fixed range, and classifying the unqualified condition as NG display. In an embodiment of the present invention, in step 2), a template containing the feature values of the product to be searched is established and trained.
Further, in the process of establishing the template in step 2), as an optimal technical scheme, the template needs to reduce other background environment information.
Furthermore, in the process of establishing the template in step 2), the feature training box is included in the search box.
In one embodiment of the invention, in the step 3), the template matching search is set to search only one template, and the matching threshold is set to be about 0.5, so that the success rate of template identification is effectively improved; the threshold is the similarity between the picture processed in the step 3) and the template in the step 2).
Furthermore, in the step 3), a certain photographing error is considered, the scaling is limited to 0.9-1.1, and the influence of the placing position of the product and the photographing error of the CCD camera on the template recognition is effectively avoided.
In an embodiment of the present invention, in step 4), the caliper is a tool for detecting and identifying the edge, the caliper selects a certain number of points with obvious light-dark contrast on two sides through detection, and fits the selected points into a line, where the fitted line is the edge to be detected and identified.
Further, in the setting of the caliper, a search frame of the caliper is moved to a position of a sideline required to be detected and identified in the image of the product, and the search frame should include the sideline required to be identified in the image;
furthermore, in the setting of the caliper, certain points are ignored, so that the number of the ignored points is not more than 25% of the number of the caliper without the fitting calculation of a line.
Further, in step 4), the caliper selects a single edge mode and analyzes the single edge mode by using a method from light to dark or from dark to light; the false judgment caused by the detection and identification of the opposite sides such as stain spots and the like on the surface of the product is effectively avoided.
In an embodiment of the present invention, in step 4), the position score refers to preferentially considering selecting points with light and dark contrast on two sides near the center line of the caliper, so as to effectively reduce interference on the detection result when the contrast on two sides of the edge to be detected and identified is not obvious. In an embodiment of the invention, on the premise that the characteristics of the detected object are not changed, in the detection process, the steps 1) and 2) are completed once and then do not need to be repeated.
In the description herein, references to the term "an embodiment" or the like are intended to mean that a particular feature, structure, material, or characteristic described in connection with the embodiment is included in at least one embodiment or example of the invention. In this specification, the schematic representations of the terms used above do not necessarily refer to the same embodiment.

Claims (7)

1. A label attaching effect detection method is characterized by comprising the following steps: the method specifically comprises the following steps:
step 1) a CCD camera takes pictures and images and carries out image preprocessing on the pictures;
step 2) respectively establishing templates based on the characteristics of the label and the packing box when the label and the packing box are at the optimal positions;
step 3) repeating the step 1), matching and searching the processed picture and the template to realize coarse positioning;
step 4) identifying the corner information of the label, and calculating the relative position relationship between the label and the packaging box by identifying the corner information of the packaging box, wherein the relative position relationship comprises the information of the X direction, the Y direction and the rotation angle, so as to obtain the offset from the optimal position;
when the light and shade contrast on the two sides of the edge to be identified is low, the caliper scoring mode adopts position scoring;
and 5) judging whether the offset is in a specified range according to the offset, and publishing a detection result.
2. The method for detecting the attaching effect of the label according to claim 1, wherein: in step 2), a template containing the characteristic value of the product to be searched is established and trained.
3. The method for detecting the attaching effect of the label according to claim 1, wherein: in step 3), the template matching search is set to search only one template, and the threshold value of the matching is set to be about 0.5.
4. The method for detecting the attaching effect of the label according to claim 1, wherein: in the step 3), the scaling ratio is limited to be 0.9-1.1.
5. The method for detecting the attaching effect of the label according to claim 1, wherein: in step 4), the caliper is set to single edge mode and analyzed using either a light to dark or dark to light method.
6. The method for detecting the attaching effect of the label according to claim 1, wherein: in the step 4), the number of the calipers is set to be 20-40, certain points are ignored, and the number of the ignored points is not more than 25% of the number of the calipers.
7. The method for detecting the attaching effect of the label according to claim 1, wherein: in the step 4), when the light and shade contrast on the two sides of the edge to be identified is low, the caliper uses a position scoring mode, the center line of the search box is moved to the side line to be identified in the image of the product, and a point with the light and shade contrast near the center line of the search box is preferentially searched.
CN202110154189.XA 2021-02-04 2021-02-04 Label attaching effect detection method Active CN112902843B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110154189.XA CN112902843B (en) 2021-02-04 2021-02-04 Label attaching effect detection method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110154189.XA CN112902843B (en) 2021-02-04 2021-02-04 Label attaching effect detection method

Publications (2)

Publication Number Publication Date
CN112902843A true CN112902843A (en) 2021-06-04
CN112902843B CN112902843B (en) 2022-12-09

Family

ID=76122277

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110154189.XA Active CN112902843B (en) 2021-02-04 2021-02-04 Label attaching effect detection method

Country Status (1)

Country Link
CN (1) CN112902843B (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113537301A (en) * 2021-06-23 2021-10-22 天津中科智能识别产业技术研究院有限公司 Defect detection method based on template self-adaptive matching of bottle body labels

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20120015789A1 (en) * 2010-07-13 2012-01-19 Xerox Corporation Peel-off label area on packaging stock
CN104835173A (en) * 2015-05-21 2015-08-12 东南大学 Positioning method based on machine vision
CN109724990A (en) * 2019-01-08 2019-05-07 上海大学 The quick positioning and detection method in coding region in a kind of packing box label
US20190180150A1 (en) * 2017-12-13 2019-06-13 Bossa Nova Robotics Ip, Inc. Color Haar Classifier for Retail Shelf Label Detection
CN109934809A (en) * 2019-03-08 2019-06-25 深慧视(深圳)科技有限公司 A kind of paper labels character defect inspection method
CN111652896A (en) * 2020-05-29 2020-09-11 北京理工大学 Inertial navigation auxiliary meteorite crater coarse-to-fine detection method

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20120015789A1 (en) * 2010-07-13 2012-01-19 Xerox Corporation Peel-off label area on packaging stock
CN104835173A (en) * 2015-05-21 2015-08-12 东南大学 Positioning method based on machine vision
US20190180150A1 (en) * 2017-12-13 2019-06-13 Bossa Nova Robotics Ip, Inc. Color Haar Classifier for Retail Shelf Label Detection
CN109724990A (en) * 2019-01-08 2019-05-07 上海大学 The quick positioning and detection method in coding region in a kind of packing box label
CN109934809A (en) * 2019-03-08 2019-06-25 深慧视(深圳)科技有限公司 A kind of paper labels character defect inspection method
CN111652896A (en) * 2020-05-29 2020-09-11 北京理工大学 Inertial navigation auxiliary meteorite crater coarse-to-fine detection method

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
张苏新 等: "基于机器视觉技术的工件尺寸测量实训教学项目设计", 《现代信息科技》 *

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113537301A (en) * 2021-06-23 2021-10-22 天津中科智能识别产业技术研究院有限公司 Defect detection method based on template self-adaptive matching of bottle body labels
CN113537301B (en) * 2021-06-23 2022-08-16 天津中科智能识别产业技术研究院有限公司 Defect detection method based on template self-adaptive matching of bottle body labels

Also Published As

Publication number Publication date
CN112902843B (en) 2022-12-09

Similar Documents

Publication Publication Date Title
CN109785316B (en) Method for detecting apparent defects of chip
CN111604909A (en) Visual system of four-axis industrial stacking robot
CN113537301B (en) Defect detection method based on template self-adaptive matching of bottle body labels
CN109993154B (en) Intelligent identification method for single-pointer sulfur hexafluoride instrument of transformer substation
CN109584239B (en) High-light object surface defect detection system and method based on reflected light
CN110108712A (en) Multifunctional visual sense defect detecting system
CN113034488B (en) Visual inspection method for ink-jet printed matter
CN112381870B (en) Binocular vision-based ship identification and navigational speed measurement system and method
CN112304957A (en) Machine vision-based intelligent detection method and system for appearance defects
CN112902843B (en) Label attaching effect detection method
CN104050684A (en) Video moving object classification method and system based on on-line training
Cai et al. Real-time arrow traffic light recognition system for intelligent vehicle
CN111968082A (en) Product packaging defect detection and identification method based on machine vision
WO2022222467A1 (en) Open circular ring workpiece appearance defect detection method and system, and computer storage medium
CN113658039A (en) Method for determining splicing sequence of label images of medicine bottles
US20160188967A1 (en) Pedestrian detecting system
CN111967457A (en) OCR detection method based on deep learning
CN113192061B (en) Extraction method and device of LED package appearance detection image, electronic equipment and storage medium
CN111369806A (en) Method and device for photographing, measuring speed and identifying license plate of freight train
CN116205860A (en) Wine bottle packaging defect detection system based on machine vision
CN111091086B (en) Method for improving identification rate of single characteristic information of logistics surface by utilizing machine vision technology
CN109521029B (en) Method for detecting appearance defects of side surface of lamp holder of bayonet type automobile lamp
CN205788212U (en) A kind of many bar codes position detecting system based on Vision Builder for Automated Inspection
CN110738268A (en) intelligent stereoscopic warehouse goods automatic identification method based on SIFT and DDIS
Aiteanu et al. Content based threshold adaptation for image processing in industrial application

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
GR01 Patent grant
GR01 Patent grant