CN112432952A - Cigarette loose end detection method based on machine vision technology - Google Patents

Cigarette loose end detection method based on machine vision technology Download PDF

Info

Publication number
CN112432952A
CN112432952A CN202011305339.4A CN202011305339A CN112432952A CN 112432952 A CN112432952 A CN 112432952A CN 202011305339 A CN202011305339 A CN 202011305339A CN 112432952 A CN112432952 A CN 112432952A
Authority
CN
China
Prior art keywords
cigarette
image
machine vision
loose
vision technology
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
CN202011305339.4A
Other languages
Chinese (zh)
Other versions
CN112432952B (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.)
CETC 41 Institute
Original Assignee
CETC 41 Institute
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 CETC 41 Institute filed Critical CETC 41 Institute
Priority to CN202011305339.4A priority Critical patent/CN112432952B/en
Priority claimed from CN202011305339.4A external-priority patent/CN112432952B/en
Publication of CN112432952A publication Critical patent/CN112432952A/en
Application granted granted Critical
Publication of CN112432952B publication Critical patent/CN112432952B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G01MEASURING; TESTING
    • G01NINVESTIGATING OR ANALYSING MATERIALS BY DETERMINING THEIR CHEMICAL OR PHYSICAL PROPERTIES
    • G01N21/00Investigating or analysing materials by the use of optical means, i.e. using sub-millimetre waves, infrared, visible or ultraviolet light
    • G01N21/84Systems specially adapted for particular applications
    • G01N21/88Investigating the presence of flaws or contamination
    • G01N21/89Investigating the presence of flaws or contamination in moving material, e.g. running paper or textiles
    • G01N21/892Investigating the presence of flaws or contamination in moving material, e.g. running paper or textiles characterised by the flaw, defect or object feature examined
    • GPHYSICS
    • G01MEASURING; TESTING
    • G01NINVESTIGATING OR ANALYSING MATERIALS BY DETERMINING THEIR CHEMICAL OR PHYSICAL PROPERTIES
    • G01N21/00Investigating or analysing materials by the use of optical means, i.e. using sub-millimetre waves, infrared, visible or ultraviolet light
    • G01N21/84Systems specially adapted for particular applications
    • G01N21/88Investigating the presence of flaws or contamination
    • G01N21/8851Scan or image signal processing specially adapted therefor, e.g. for scan signal adjustment, for detecting different kinds of defects, for compensating for structures, markings, edges
    • GPHYSICS
    • G01MEASURING; TESTING
    • G01NINVESTIGATING OR ANALYSING MATERIALS BY DETERMINING THEIR CHEMICAL OR PHYSICAL PROPERTIES
    • G01N21/00Investigating or analysing materials by the use of optical means, i.e. using sub-millimetre waves, infrared, visible or ultraviolet light
    • G01N21/84Systems specially adapted for particular applications
    • G01N21/88Investigating the presence of flaws or contamination
    • G01N21/89Investigating the presence of flaws or contamination in moving material, e.g. running paper or textiles
    • G01N21/8901Optical details; Scanning details
    • GPHYSICS
    • G01MEASURING; TESTING
    • G01NINVESTIGATING OR ANALYSING MATERIALS BY DETERMINING THEIR CHEMICAL OR PHYSICAL PROPERTIES
    • G01N21/00Investigating or analysing materials by the use of optical means, i.e. using sub-millimetre waves, infrared, visible or ultraviolet light
    • G01N21/84Systems specially adapted for particular applications
    • G01N21/88Investigating the presence of flaws or contamination
    • G01N21/8851Scan or image signal processing specially adapted therefor, e.g. for scan signal adjustment, for detecting different kinds of defects, for compensating for structures, markings, edges
    • G01N2021/8887Scan or image signal processing specially adapted therefor, e.g. for scan signal adjustment, for detecting different kinds of defects, for compensating for structures, markings, edges based on image processing techniques

Abstract

The invention discloses a cigarette loose end detection method based on a machine vision technology, which belongs to the field of cigarette loose end detection and comprises the following steps: irradiating the end face of the tobacco shred of the cigarette to be detected by adopting a linear laser source; the method comprises the following steps that (1) two high-speed area array image sensors which are symmetrically distributed alternately acquire images of cigarettes moving horizontally at equal intervals and transmit the images to a computer; and the computer calculates the total number of pixels with the sinking depth exceeding a set threshold value through an image processing technology, and finally determines whether the cigarette to be detected is a loose-end cigarette. The invention can carry out full-coverage detection on the tobacco shred end face of the cigarette to be detected, solves the defect that the traditional machine vision detection mode can not accurately detect partial tobacco shred sinking cigarettes, and has wide application space.

Description

Cigarette loose end detection method based on machine vision technology
Technical Field
The invention belongs to the field of cigarette loose end detection, and particularly relates to a cigarette loose end detection method based on a machine vision technology.
Background
In the cigarette processing and producing process, the quality of cigarettes directly influences the quality of final products. In order to ensure the quality of cigarettes, cigarette loose end detection devices are required to be installed in multiple links of a cigarette production line and used for detecting whether the cigarettes have the defect of loose ends.
With the development of electronic technology, cigarette detection modes successively appear in various detection modes such as a mechanical contact type detection mode, a static infrared photoelectric type detection mode, a dynamic infrared photoelectric type detection mode and a traditional machine vision type detection mode. The mechanical contact type detection mode has lower detection sensitivity, and the tobacco shreds are easy to sink due to the contact with the cigarettes in the detection process, so the attractiveness of the cigarettes is influenced; the static infrared photoelectric type solves the problem that the mechanical contact type detection device easily causes tobacco shred sinking, but still has the defects of low sensitivity, complex debugging and maintenance and the like; the dynamic infrared photoelectric debugging and maintenance are relatively simple, the detection performance is improved to a certain extent compared with that of the infrared photoelectric type, but the sinking of the tobacco shred part cannot be accurately detected due to the large photosensitive surface; the visual formula of traditional machine adopts inclination to shoot the principle of a cigarette discernment pipe tobacco area, can't carry out accurate detection to the hollow cigarette that some pipe tobacco sinks.
In the tobacco industry at home and abroad, the machine vision technology is more and more widely applied, mainly applied to the detection of the appearance quality of a small bag, the detection of the quality of a lining package and the detection of the appearance quality of a carton, and less applied to the detection of cigarette loose ends. With the continuous maturity of machine vision technology, adopt the cigarette odd test mode based on machine vision technology, it is the problem that needs to solve to accurately detect the odd cigarette that some shredded tobacco subsides.
Disclosure of Invention
Aiming at the problem of the prior art that the existing detection mode is insufficient, the invention provides a cigarette loose end detection method based on a machine vision technology, which overcomes the defects of the prior art and has good effect.
In order to achieve the purpose, the invention adopts the following technical scheme:
a cigarette loose end detection method based on a machine vision technology is characterized by comprising the following steps:
step 1: a linear laser source is adopted to irradiate the end face of the tobacco shred of the cigarette to be detected, the brightness of the irradiated area is obviously higher than that of other areas, and a foundation is provided for subsequent image acquisition and processing;
step 2: two imaging lenses which are symmetrically distributed are adopted to image the laser lines irradiated on the end faces of the tobacco shreds onto the corresponding high-speed area array image sensors respectively;
and step 3: alternately acquiring images by adopting two high-speed area array image sensors which are symmetrically distributed and transmitting the images to a computer;
and 4, step 4: the computer calculates the corresponding tobacco shred sinking depth according to the position of the laser line on the image sensor, converts the tobacco shred sinking depth corresponding to each pixel into a gray value of 0-255 and draws the gray value on the image template;
and 5: sampling the horizontally moving cigarettes for multiple times at equal intervals to finally obtain a corresponding two-dimensional gray image, wherein the gray value of each pixel on the image corresponds to the sinking depth of the tobacco shreds of the cigarettes to be detected;
step 6: the computer processes the two-dimensional gray image generated by scanning by an image processing technology, and finally calculates the number of pixels of which the sinking depth exceeds a set threshold value.
Preferably, in the step 2, the sinking degrees of the tobacco shreds are different, and the positions of the laser lines imaged on the image sensor are correspondingly different.
Preferably, in the step 3, the two image sensors are used for alternately acquiring images, so that the sampling rate can be doubled, the detection accuracy can be improved, and the requirement on the hardware processing performance can be reduced.
Preferably, in step 4, each time the image sensor acquires one frame of image, a vertical corresponding one-dimensional grayscale image is generated.
Preferably, in step 6, the two-dimensional grayscale image processing step sequentially includes: extracting interest areas, binarizing, searching contours and counting pixels.
Preferably, in the step 6, when the percentage of the number of pixels to the total number of pixels of the cigarette exceeds a set value, the cigarette is regarded as a loose-end cigarette.
The invention has the following beneficial technical effects:
1. the invention can carry out full-coverage detection on the tobacco shred end face of the cigarette to be detected, and solves the defect that the traditional machine vision detection mode can not detect the sinking cigarette of the tobacco shred part; the sampling rate can be doubled by alternately acquiring images through the two symmetrically distributed high-speed area array image sensors, the detection precision is improved, and meanwhile, the requirement on the hardware processing performance can be reduced;
2. the linear laser source, the imaging lens and the high-speed area array image sensor are mature technologies, the used image processing algorithm is contained in various commercial or open-source machine vision function libraries, developers can directly call the functions, and the whole technology has high feasibility;
3. the cigarette loose end detection method provided by the invention can be applied to the loose end detection of a single cigarette, can also be applied to the loose end detection of a plurality of cigarettes in a cigarette packet, and has wide application space.
Drawings
FIG. 1 is a schematic diagram of the optical path of the present invention;
FIG. 2 is a diagram showing the effect of the image collected by the high-speed area array image sensor according to the present invention;
FIG. 3 is a diagram of a one-dimensional gray scale image effect corresponding to one frame of image of the image sensor according to the present invention;
FIG. 4 is a two-dimensional gray scale image effect graph obtained by sampling a moving cigarette for multiple times according to the present invention;
FIG. 5 is an effect diagram of the present invention for performing image processing on a two-dimensional gray scale image of a cigarette without ends.
Detailed Description
The invention is described in further detail below with reference to the following figures and detailed description:
FIG. 1 is a schematic view of a light path of the present invention, wherein a linear laser source is adopted to irradiate the end face of tobacco shred of a cigarette to be detected, and the brightness of the irradiated area is obviously higher than that of other areas, so as to provide a basis for subsequent image acquisition and processing; the two imaging lenses which are symmetrically distributed image the laser lines irradiated on the end faces of the tobacco shreds onto the corresponding high-speed area array image sensors respectively, the sinking degrees of the tobacco shreds of the cigarettes are different, and the imaging positions of the laser lines on the image sensors are correspondingly different.
When the tobacco shred surface is at the point A, the laser lines are respectively imaged on the point A 'of the image sensor 1 and the point A' of the image sensor 2; when the tobacco shred surface is at the point B, the laser lines are respectively imaged on the point B 'of the image sensor 1 and the point B' of the image sensor 2. The two high-speed area array image sensors which are symmetrically distributed alternately acquire images and transmit the images to the computer, and the two image sensors alternately sample and can double the sampling rate, so that the detection precision is improved, and the requirement on the hardware processing performance can be reduced.
Fig. 2 is an effect diagram of an image acquired by a high-speed area array image sensor, and it can be seen that the brightness of the laser line irradiated area is obviously higher than that of other areas, and the more the cut tobacco sinks, the more the horizontal position of the laser line in the image is closer to the right side. The corresponding relation between the horizontal position of the laser line in the image and the sinking depth of the tobacco shreds is obtained in advance in a calibration mode and stored in a table for subsequent use. And the computer calculates the corresponding tobacco shred sinking depth by a table look-up mode according to the position of the laser line on the image sensor, converts the tobacco shred sinking depth corresponding to each pixel into a gray value of 0-255 and draws the gray value on the image template. The conversion formula is as follows:
Figure BDA0002788161080000031
wherein GrayiFor the corresponding gray value after the i-th line image data conversion, DiAnd (5) obtaining the sinking depth of the tobacco shreds by looking up the table of the image data in the ith row, wherein 10 is the maximum value of the sinking depth of the tobacco shreds in mm. Each frame of image acquired by the image sensor generates a vertical corresponding one-dimensional gray image, and the effect of the one-dimensional gray image corresponding to one frame of image of the image sensor is shown in fig. 3.
FIG. 4 is a diagram showing that two high-speed area array image sensors sample horizontally moving cigarettes for multiple times at equal intervals to finally obtain a corresponding two-dimensional gray image, the gray value of each pixel on the image corresponds to the sinking depth of tobacco shreds of the cigarettes to be detected, and the larger the tobacco shreds are, the smaller the corresponding gray value is.
FIG. 5 is an effect diagram of image processing performed by a computer on a two-dimensional gray scale image of a cigarette with a hollow tip, which is sequentially performed with the processes of region of interest extraction, binarization, contour searching and pixel counting. The interest region extraction is to divide the cigarette region from the two-dimensional gray image, and the pixel gray value of the region outside the cigarette is set to be 255; the binarization is to separate the number of pixels with the sinking depth exceeding a set threshold value from other pixels, and the gray value of the pixel with the sinking depth exceeding the set threshold value is set as 0, and the gray value of the other pixels is set as 255; the contour is searched for drawing the contour line of the area with the gray value of 0, which is the premise of the subsequent pixel total number calculation; the pixel count is to count the number of pixels in the contour, i.e., the total number of pixels whose depression depth exceeds a set threshold. The formula for finally judging whether the cigarette to be detected is empty is as follows:
Figure BDA0002788161080000041
wherein ScurTotal number of pixels for which the sag depth exceeds a set threshold value, StotalIs the total number of pixels, P, of a cigarettemaxIs the allowable percentage of defective area. When the sinking depth of the cigarette exceeds the set threshold value, the ratio of the number of pixels of the cigarette to the total number of pixels of the cigarette is lower than PmaxAnd judging that the current cigarette is a qualified cigarette, or judging that the current cigarette is a loose-end cigarette.
It is to be understood that the above description is not intended to limit the present invention, and the present invention is not limited to the above examples, and those skilled in the art may make modifications, alterations, additions or substitutions within the spirit and scope of the present invention.

Claims (6)

1. A cigarette loose end detection method based on a machine vision technology is characterized by comprising the following steps:
step 1: a linear laser source is adopted to irradiate the end face of the tobacco shred of the cigarette to be detected, the brightness of the irradiated area is obviously higher than that of other areas, and a foundation is provided for subsequent image acquisition and processing;
step 2: two imaging lenses which are symmetrically distributed are adopted to image the laser lines irradiated on the end faces of the tobacco shreds onto the corresponding high-speed area array image sensors respectively;
and step 3: alternately acquiring images by adopting two high-speed area array image sensors which are symmetrically distributed and transmitting the images to a computer;
and 4, step 4: the computer calculates the corresponding tobacco shred sinking depth according to the position of the laser line on the image sensor, converts the tobacco shred sinking depth corresponding to each pixel into a gray value of 0-255 and draws the gray value on the image template;
and 5: sampling the horizontally moving cigarettes for multiple times at equal intervals to finally obtain a corresponding two-dimensional gray image, wherein the gray value of each pixel on the image corresponds to the sinking depth of the tobacco shreds of the cigarettes to be detected;
step 6: the computer processes the two-dimensional gray image generated by scanning by an image processing technology, and finally calculates the number of pixels of which the sinking depth exceeds a set threshold value.
2. The method for detecting the cigarette loose end based on the machine vision technology according to the claim 1, characterized in that in the step 2, the sinking degrees of the cigarette tobacco shreds are different, and the positions of the laser lines imaged on the image sensor are correspondingly different.
3. The method for detecting cigarette loose-end based on machine vision technology as claimed in claim 1, wherein in said step 3, two image sensors are used to alternately collect images, which can double the sampling rate, improve the detection precision, and reduce the requirement for hardware processing performance.
4. The method for detecting cigarette loose-end based on machine vision technology as claimed in claim 1, wherein in the step 4, every time an image sensor collects a frame of image, a vertical corresponding one-dimensional gray scale image is generated.
5. The method for detecting the cigarette loose-end based on the machine vision technology as claimed in claim 1, wherein in the step 6, the two-dimensional gray scale image processing steps are as follows in sequence: extracting interest areas, binarizing, searching contours and counting pixels.
6. The method for detecting the loose-end cigarette based on the machine vision technology as claimed in claim 1, wherein in the step 6, when the percentage of the number of pixels to the total number of pixels of the cigarette exceeds a set value, the cigarette is considered to be the loose-end cigarette.
CN202011305339.4A 2020-11-20 Cigarette empty head detection method based on machine vision technology Active CN112432952B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202011305339.4A CN112432952B (en) 2020-11-20 Cigarette empty head detection method based on machine vision technology

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011305339.4A CN112432952B (en) 2020-11-20 Cigarette empty head detection method based on machine vision technology

Publications (2)

Publication Number Publication Date
CN112432952A true CN112432952A (en) 2021-03-02
CN112432952B CN112432952B (en) 2024-04-23

Family

ID=

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113333329A (en) * 2021-08-04 2021-09-03 南京创智出彩科技有限公司 Cigarette defect detection system based on deep learning
CN113670945A (en) * 2021-08-03 2021-11-19 深圳市联君科技股份有限公司 Cut tobacco empty end detection system and method

Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH11304723A (en) * 1998-04-23 1999-11-05 Matsushita Electric Works Ltd Visual inspection method
US20040245485A1 (en) * 2002-04-11 2004-12-09 Hamed Sari-Sarraf Fabric wrinkle evaluation
JP2010071722A (en) * 2008-09-17 2010-04-02 Nippon Steel Corp Method and device for inspecting unevenness flaws
CN102499471A (en) * 2011-10-25 2012-06-20 中国电子科技集团公司第四十一研究所 Cigarette loose-end detection method based on machine vision technology
CN104995659A (en) * 2013-02-13 2015-10-21 菲利普莫里斯生产公司 Evaluating porosity distribution within a porous rod
CN111044517A (en) * 2019-12-31 2020-04-21 宁波高新区意融科技有限公司 Three-dimensional feature-based fabric fold grade evaluation method
CN111189837A (en) * 2020-01-08 2020-05-22 征图新视(江苏)科技股份有限公司 Cigarette appearance online detection method and device
CN111369511A (en) * 2020-02-28 2020-07-03 浙江大学 Optical element surface weak scratch detection method based on spectral characteristics

Patent Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH11304723A (en) * 1998-04-23 1999-11-05 Matsushita Electric Works Ltd Visual inspection method
US20040245485A1 (en) * 2002-04-11 2004-12-09 Hamed Sari-Sarraf Fabric wrinkle evaluation
JP2010071722A (en) * 2008-09-17 2010-04-02 Nippon Steel Corp Method and device for inspecting unevenness flaws
CN102499471A (en) * 2011-10-25 2012-06-20 中国电子科技集团公司第四十一研究所 Cigarette loose-end detection method based on machine vision technology
CN104995659A (en) * 2013-02-13 2015-10-21 菲利普莫里斯生产公司 Evaluating porosity distribution within a porous rod
CN111044517A (en) * 2019-12-31 2020-04-21 宁波高新区意融科技有限公司 Three-dimensional feature-based fabric fold grade evaluation method
CN111189837A (en) * 2020-01-08 2020-05-22 征图新视(江苏)科技股份有限公司 Cigarette appearance online detection method and device
CN111369511A (en) * 2020-02-28 2020-07-03 浙江大学 Optical element surface weak scratch detection method based on spectral characteristics

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113670945A (en) * 2021-08-03 2021-11-19 深圳市联君科技股份有限公司 Cut tobacco empty end detection system and method
CN113670945B (en) * 2021-08-03 2022-07-26 深圳市联君科技股份有限公司 Cut tobacco empty end detection system and method
CN113333329A (en) * 2021-08-04 2021-09-03 南京创智出彩科技有限公司 Cigarette defect detection system based on deep learning

Similar Documents

Publication Publication Date Title
CN111855664B (en) Adjustable three-dimensional tunnel defect detection system
CN104535586B (en) Strip steel edge defect detection identification method
CN106952260B (en) Solar cell defect detection system and method based on CIS image acquisition
CN102288613B (en) Surface defect detecting method for fusing grey and depth information
CN115239704B (en) Accurate detection and repair method for wood surface defects
CN101403610B (en) System and method for measuring leather area based on digital image method
CN102261892B (en) Rapid width measurement system for tobacco shreds
CN110146516B (en) Fruit grading device based on orthogonal binocular machine vision
CN101178369B (en) Industry ray detection negative film digitalizer
CN107345789B (en) PCB hole position detection device and method
CN106934800A (en) A kind of metal plate and belt detection method of surface flaw and device based on YOLO9000 networks
CN107845090A (en) A kind of silicon chip detection method and silicon chip detection means
CN107796826B (en) Micro duplicate gear broken tooth defect detection method based on tooth center distance curve analysis
CN105160754B (en) Coin surface quality detection device based on height measurement and detection method thereof
CN111179362B (en) Test paper color uniformity detection method based on dynamic illumination correction algorithm
CN210071686U (en) Fruit grading plant based on orthogonal binocular machine vision
CN112858321A (en) Steel plate surface defect detection system and method based on linear array CCD
CN203908956U (en) System for detecting surface defects of workpiece
CN1991341A (en) Interference pattern automatic focusing and automatic detection method
CN112432953B (en) Cigarette pack missing and anti-cigarette detection method based on machine vision technology
CN114170165A (en) Chip surface defect detection method and device
CN110873718A (en) Steel plate surface defect detection system and method based on machine vision
CN112432952B (en) Cigarette empty head detection method based on machine vision technology
CN112432952A (en) Cigarette loose end detection method based on machine vision technology
CN203365339U (en) On-line detecting system for surface defect of cold rolling aluminum plate

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