CN111402206A - Visual detection method and system for cigarette scraping - Google Patents

Visual detection method and system for cigarette scraping Download PDF

Info

Publication number
CN111402206A
CN111402206A CN202010125155.3A CN202010125155A CN111402206A CN 111402206 A CN111402206 A CN 111402206A CN 202010125155 A CN202010125155 A CN 202010125155A CN 111402206 A CN111402206 A CN 111402206A
Authority
CN
China
Prior art keywords
cigarette
image
appearance image
scraping
appearance
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
CN202010125155.3A
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.)
Hongyun Honghe Tobacco Group Co Ltd
Original Assignee
Hongyun Honghe Tobacco Group 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 Hongyun Honghe Tobacco Group Co Ltd filed Critical Hongyun Honghe Tobacco Group Co Ltd
Priority to CN202010125155.3A priority Critical patent/CN111402206A/en
Publication of CN111402206A publication Critical patent/CN111402206A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/0002Inspection of images, e.g. flaw detection
    • G06T7/0004Industrial image inspection
    • 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/95Investigating the presence of flaws or contamination characterised by the material or shape of the object to be examined
    • G01N21/952Inspecting the exterior surface of cylindrical bodies or wires
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T5/00Image enhancement or restoration
    • G06T5/20Image enhancement or restoration using local operators
    • G06T5/30Erosion or dilatation, e.g. thinning
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/10Segmentation; Edge detection
    • G06T7/187Segmentation; Edge detection involving region growing; involving region merging; involving connected component labelling
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/90Determination of colour characteristics
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/20Image preprocessing
    • G06V10/25Determination of region of interest [ROI] or a volume of interest [VOI]
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/20Image preprocessing
    • G06V10/28Quantising the image, e.g. histogram thresholding for discrimination between background and foreground patterns
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/30Subject of image; Context of image processing
    • G06T2207/30108Industrial image inspection

Landscapes

  • Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Chemical & Material Sciences (AREA)
  • Health & Medical Sciences (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Multimedia (AREA)
  • Analytical Chemistry (AREA)
  • Biochemistry (AREA)
  • General Health & Medical Sciences (AREA)
  • Immunology (AREA)
  • Pathology (AREA)
  • Quality & Reliability (AREA)
  • Signal Processing (AREA)
  • Investigating Materials By The Use Of Optical Means Adapted For Particular Applications (AREA)
  • Image Analysis (AREA)

Abstract

The invention provides a visual detection method and a system for cigarette scratching, wherein the method comprises the following steps: arranging an industrial camera at an inlet of a packing machine to acquire an appearance image of a cigarette in a cigarette discharging channel and carrying out image preprocessing according to the appearance image of the cigarette; defining an interested area of the preprocessed cigarette appearance image to determine the cigarette detection range and obtain a color abnormal area of the cigarette appearance image; and calculating to obtain an abnormal area communication domain according to the color abnormal area, further determining whether the corresponding cigarettes are scratched according to the abnormal area communication domain, and if so, rejecting the scratched cigarettes. The invention can solve the problem that the cigarette scraping defect can not be accurately detected by cigarette detection at the inlet of the existing packing machine, and the quality problem of cigarette production is easily caused, and can improve the process quality of cigarette production.

Description

Visual detection method and system for cigarette scraping
Technical Field
The invention relates to the technical field of cigarette detection, in particular to a cigarette scraping visual detection method and a cigarette scraping visual detection system.
Background
The cigarette packing machine undertakes the whole packing work flow of cigarette packing, cigarettes produced by a cigarette making machine are fed into the packing machine through a cigarette conveying channel, a cigarette discharging channel is the last conveying inlet of the cigarettes into the packing machine, automatic cigarette conveying improves cigarette packing efficiency, however, the cigarettes can be scratched or extruded and deformed in the conveying process. Meanwhile, the appearance detection of the cigarettes at the inlet of the existing packing machine mainly detects the loose ends and the missing cigarettes, the defects of the cigarette scraping and breaking type cannot be identified, the process requirements of cigarette production cannot be met, a quality detection device for the cigarettes is not arranged in the later process, and once similar conditions occur, the influence and loss caused by the defects are very huge.
Disclosure of Invention
The invention provides a visual detection method and a visual detection system for cigarette scraping, which solve the problem that cigarette scraping defects cannot be accurately detected by cigarette detection at an inlet of an existing packing machine, so that the quality of cigarette production is easy to cause, can improve the process quality of cigarette production, and improves the production intelligence.
In order to achieve the above purpose, the invention provides the following technical scheme:
a cigarette scratching visual detection method comprises the following steps:
arranging an industrial camera at an inlet of a packing machine to acquire an appearance image of a cigarette in a cigarette discharging channel and carrying out image preprocessing according to the appearance image of the cigarette;
defining an interested area of the preprocessed cigarette appearance image to determine the cigarette detection range and obtain a color abnormal area of the cigarette appearance image;
and calculating to obtain an abnormal area communication domain according to the color abnormal area, further determining whether the corresponding cigarettes are scratched according to the abnormal area communication domain, and if so, rejecting the scratched cigarettes.
Preferably, the image preprocessing is performed according to the cigarette appearance image, and includes:
carrying out affine transformation processing on the cigarette appearance image so as to correct image deformation caused by the position of a camera;
setting a binarization threshold value, and performing binarization processing on the image subjected to affine transformation processing to obtain a binarization image;
and expanding the binary image, and then corroding to complete the morphological closed-loop calculation.
Preferably, the image preprocessing is performed according to the cigarette appearance image, and the method further includes:
and setting a multi-thread algorithm to process the cigarette appearance image, wherein the multi-thread algorithm comprises the following steps: judging whether the industrial camera receives a trigger callback function in the main thread, if so, reading the cigarette appearance image and storing the cigarette appearance image into a queue;
and each sub-thread judges whether an image exists in the corresponding queue, if so, the cigarette appearance image is read from the queue and image processing of a preset algorithm is carried out.
Preferably, the determining the corresponding scraped cigarette according to the abnormal region connected domain includes:
acquiring the number of connected domains of the abnormal region, judging whether the number of the connected domains is greater than or equal to 1, and if not, determining that the appearance of the cigarette is normal;
and when the number of the connected domains is greater than or equal to 1, judging whether the connected area of the connected domains of each abnormal region is greater than a set threshold value, and if so, determining that the cigarette is abnormal in scraping.
Preferably, the binarization processing includes:
converting the image after the affine transformation into a gray image, and rewriting each pixel point of the gray image according to the binarization threshold value;
when the gray value of the pixel point is larger than the binarization threshold, the gray value of the pixel point is rewritten 255;
when the gray value of the pixel point is smaller than the binarization threshold, rewriting the gray value of the pixel point to 0;
and after all the pixel points of the gray level image are rewritten, obtaining the binary image.
Preferably, the expanding and then corroding the binarized image to complete morphology closed-loop calculation includes:
and amplifying the binary image in proportion, and removing pixel points with different gray values in each set area to ensure that the gray values of the pixel points in the same area are the same so as to form a morphological closed loop.
The invention also provides a visual detection system for the cigarette scraping, which comprises:
the industrial camera is used for acquiring the appearance image of the cigarette in the cigarette discharging channel;
the image processing device is used for carrying out image preprocessing according to the cigarette appearance image;
the detection controller is used for delimiting an interested area of the preprocessed cigarette appearance image so as to determine the detection range of the cigarette and obtain a color abnormal area of the cigarette appearance image;
the detection controller is further used for calculating an abnormal region communication domain according to the color abnormal region, and then determining the corresponding broken cigarette according to the abnormal region communication domain.
Preferably, the image processing apparatus includes:
the transformation processing unit is used for carrying out affine transformation processing on the cigarette appearance image so as to correct image deformation caused by the position of the camera;
a binarization processing unit, configured to set a binarization threshold, and perform binarization processing on the image after affine transformation processing to obtain a binarized image;
and the morphology closed-loop processing unit is used for expanding the binary image and then corroding the binary image so as to finish morphology closed-loop calculation.
Preferably, the image processing apparatus further includes:
the main thread unit is used for setting a multi-thread algorithm to process the cigarette appearance image, reading the cigarette appearance image when the industrial camera receives the trigger callback function, and storing the cigarette appearance image into a queue;
and the sub-thread unit is used for reading the cigarette appearance image from the queue and performing image processing of a preset algorithm when the image is stored in the queue corresponding to each sub-thread judgment.
Preferably, the detection controller includes:
the judging and reasoning unit is used for acquiring the number of the connected domains of the abnormal area, judging whether the number of the connected domains is greater than or equal to 1, and if not, determining that the appearance of the cigarette is normal; and when the number of the connected domains is greater than or equal to 1, judging whether the connected area of the connected domain of each abnormal region is greater than a set threshold value, and if so, determining that the cigarette is abnormal in scraping.
The invention provides a visual detection method and a system for cigarette scraping, which are used for collecting an appearance image of a cigarette in a cigarette discharging channel, and performing image preprocessing according to the appearance image of the cigarette to obtain a color abnormal area of the appearance image of the cigarette so as to judge whether the cigarette is scraped, solve the problem that the cigarette scraping defect cannot be accurately detected by cigarette detection at an inlet of the existing packing machine, easily cause the quality problem of cigarette production, improve the process quality of cigarette production and improve the production intelligence.
Drawings
In order to more clearly describe the specific embodiments of the present invention, the drawings to be used in the embodiments will be briefly described below.
FIG. 1 is a schematic view of a visual inspection method for cigarette scratching according to the present invention;
FIG. 2 is a flow diagram of multi-threaded execution of image pre-processing provided by the present invention;
FIG. 3 is a flow chart of cigarette abnormality determination provided by the present invention;
FIG. 4 is a schematic diagram of a cigarette pretreatment process provided by an embodiment of the present invention;
FIG. 5 is a schematic view of a visual inspection system for cigarette scraping according to the present invention.
Detailed Description
In order to make the technical field of the invention better understand the scheme of the embodiment of the invention, the embodiment of the invention is further described in detail with reference to the drawings and the implementation mode.
The method is characterized in that mechanical, capacitive and infrared photoelectric detection sensors are adopted for detecting cigarettes at the inlet of the current packing machine mostly, missing cigarettes and the empty ends of the cigarettes are detected, signals are transmitted back to a controller for signal processing, the controller sends processing signals to a cigarette removing device according to processing results, and the cigarettes with quality defects are removed in corresponding phases. But the sensor can not accurately detect the scraping of the cigarette, and the quality problem is easy to cause. The invention provides a visual detection method and a system for cigarette scraping, which are used for collecting an appearance image of a cigarette in a cigarette discharging channel, and performing image preprocessing according to the appearance image of the cigarette to obtain a color abnormal area of the appearance image of the cigarette so as to judge whether the cigarette is scraped, solve the problem that the cigarette scraping defect cannot be accurately detected by cigarette detection at an inlet of the existing packing machine, easily cause the quality problem of cigarette production, improve the process quality of cigarette production and improve the production intelligence.
As shown in fig. 1, a visual inspection method for cigarette scratching comprises:
s1: arranging an industrial camera at an inlet of a packing machine to acquire an appearance image of a cigarette in a cigarette discharging channel and carrying out image preprocessing according to the appearance image of the cigarette;
s2: defining an interested area of the preprocessed cigarette appearance image to determine the cigarette detection range and obtain a color abnormal area of the cigarette appearance image;
s3: and calculating to obtain an abnormal area communication domain according to the color abnormal area, further determining whether the corresponding cigarettes are scratched according to the abnormal area communication domain, and if so, rejecting the scratched cigarettes.
Specifically, an industrial camera is adopted to photograph the cigarettes at the inlet of the packaging machine to obtain a cigarette appearance image, the image is preprocessed through a preset algorithm, then an interested region of the processed image is divided, the detection cigarettes can be divided into different concerned regions, the region which is easy to scratch is used as the interested region to be used as the range of cigarette detection, and in practical application, the specific region of the cigarettes can also be set as the interested region. And judging the color abnormal area according to the color of the cigarette appearance image, further taking the area with similar color as the color abnormal area, and calculating to obtain the abnormal area communication area. And finally, determining whether the corresponding cigarette is scratched according to the size or the area of the abnormal region communication domain. The scraped cigarettes are screened out and removed, so that the process quality of cigarette production is ensured, the production intelligence is improved, and the production cost of the cigarettes is reduced.
Further, according to the cigarette appearance image, image preprocessing is performed, and the method comprises the following steps:
s11: carrying out affine transformation processing on the cigarette appearance image so as to correct image deformation caused by the position of a camera;
s12: setting a binarization threshold value, and performing binarization processing on the image subjected to affine transformation processing to obtain a binarization image;
s13: and expanding the binary image, and then corroding to complete the morphological closed-loop calculation.
Specifically, after the original image is acquired, affine transformation is firstly performed on the original image to correct image deformation caused by the position of the camera, and the affine transformation method comprises the following steps: carrying out data lifting means such as translation, rotation, turnover, lifting and the like on the image; then, performing binarization processing by setting a threshold value to highlight the abnormal color part of the cigarette; and expanding the obtained binary image, and then corroding to complete the morphological closed-loop calculation. Wherein a morphologically closed loop can be understood as various geometric morphologies.
Further, the binarization processing includes: converting the image after the affine transformation into a gray image, and rewriting each pixel point of the gray image according to the binarization threshold value; when the gray value of the pixel point is larger than the binarization threshold, the gray value of the pixel point is rewritten 255; when the gray value of the pixel point is smaller than the binarization threshold, rewriting the gray value of the pixel point to 0; and after all the pixel points of the gray level image are rewritten, obtaining the binary image.
Further, the expanding and then corroding the binarized image to complete morphology closed-loop calculation includes: and amplifying the binary image in proportion, and removing pixel points with different gray values in each set area to ensure that the gray values of the pixel points in the same area are the same so as to form a morphological closed loop.
Specifically, as shown in fig. 4, the image preprocessing is performed on the acquired cigarette appearance image, and includes: affine transformation, binarization processing, morphology closed-loop calculation, abnormal region connected domain calculation and the like. And a binary image can be obtained, and a final image processing result can be obtained according to the binary image, so that the position of the scraped cigarette can be easily judged.
According to a cigarette outward appearance image carries out image preprocessing, still include: and setting a multi-thread algorithm to process the cigarette appearance image, wherein the multi-thread algorithm comprises the following steps: judging whether the industrial camera receives a trigger callback function in the main thread, if so, reading the cigarette appearance image and storing the cigarette appearance image into a queue; and each sub-thread judges whether an image exists in the corresponding queue, if so, the cigarette appearance image is read from the queue and image processing of a preset algorithm is carried out.
Specifically, as shown in fig. 2, the main thread is used for completing functions of hardware initialization, creating a sub-thread, calling a callback function to acquire an image, and the like, and the sub-thread one, two, and three are used for processing a picture of a cigarette scratch detection camera at an inlet of a packing machine; by adopting a multithreading mode, different camera processing programs can run independently, the efficiency is improved, a main thread for acquiring the picture and a sub thread for reading the picture to process are separated, and the picture cannot be lost in the processing process. The image processing efficiency can be effectively improved.
According to the scratch cigarette that corresponds is confirmed to abnormal area connected domain, include:
s31: acquiring the number of connected domains of the abnormal region, judging whether the number of the connected domains is greater than or equal to 1, and if not, determining that the appearance of the cigarette is normal;
s32: and when the number of the connected domains is greater than or equal to 1, judging whether the connected area of the connected domains of each abnormal region is greater than a set threshold value, and if so, determining that the cigarette is abnormal in scraping.
In practical application, as shown in fig. 3, abnormal region connected domains are calculated, the number of the connected domains is obtained, whether a cigarette is scratched or not is preliminarily judged according to the number of the connected domains, then whether the area of each connected domain is equal to a set threshold value or not is judged, if yes, the cigarette is determined to be abnormal, and if not, the next connected domain is judged.
Therefore, the invention provides a visual detection method for cigarette scraping, which is used for collecting the cigarette appearance image in a cigarette discharging channel, and carrying out image preprocessing according to the cigarette appearance image to obtain the color abnormal area of the cigarette appearance image so as to judge whether the cigarette is scraped, thereby solving the problem that the cigarette scraping defect cannot be accurately detected by cigarette detection at the inlet of the existing packing machine, the quality of cigarette production is easy to cause, the process quality of cigarette production can be improved, and the production intelligence is improved.
Correspondingly, as shown in fig. 5, the present invention further provides a visual inspection system for cigarette scraping, including: the industrial camera is used for collecting the cigarette appearance images in the cigarette discharging channel. And the image processing device is used for carrying out image preprocessing according to the cigarette appearance image. And the detection controller is used for delimiting an interested area of the preprocessed cigarette appearance image so as to determine the detection range of the cigarette and obtain a color abnormal area of the cigarette appearance image. The detection controller is further used for calculating an abnormal region communication domain according to the color abnormal region, and then determining the corresponding broken cigarette according to the abnormal region communication domain.
Further, the image processing apparatus includes: and the transformation processing unit is used for carrying out affine transformation processing on the cigarette appearance image so as to correct image deformation caused by the position of the camera. And the binarization processing unit is used for setting a binarization threshold value and carrying out binarization processing on the image after the affine transformation processing so as to obtain a binarization image. And the morphology closed-loop processing unit is used for expanding the binary image and then corroding the binary image so as to finish morphology closed-loop calculation.
Further, the image processing apparatus further includes: and the main thread unit is used for setting a multi-thread algorithm to process the cigarette appearance image, reading the cigarette appearance image when the industrial camera receives the trigger callback function, and storing the cigarette appearance image into a queue. And the sub-thread unit is used for reading the cigarette appearance image from the queue and performing image processing of a preset algorithm when the image is stored in the queue corresponding to each sub-thread judgment.
The detection controller includes: the judging and reasoning unit is used for acquiring the number of the connected domains of the abnormal area, judging whether the number of the connected domains is greater than or equal to 1, and if not, determining that the appearance of the cigarette is normal; and when the number of the connected domains is greater than or equal to 1, judging whether the connected area of the connected domain of each abnormal region is greater than a set threshold value, and if so, determining that the cigarette is abnormal in scraping.
Further, as shown in FIG. 5, the system further comprises L ED light source, a touch screen display, a 24V DC power supply and a regulated power supply module, wherein the L ED light source is used for illuminating the cigarette to be detected when the industrial camera takes a picture, the touch screen display is used for detecting information or instruction interaction between the controller and an operator, the regulated power supply module is used for stabilizing external power supply to form the DC power supply, and the 24V DC power supply provides power for all components of the detection system.
It should be noted that the detection controller may be implemented by an industrial personal computer, or may be implemented by a dedicated controller, specifically based on design requirements. Simultaneously, can adopt a plurality of industry cameras to shoot a plurality of angles to a cigarette outward appearance.
The invention provides a visual detection system for cigarette scraping, which adopts an industrial camera to acquire an appearance image of a cigarette in a cigarette discharging channel, an image processing device carries out image preprocessing according to the appearance image of the cigarette, and a detection controller obtains a color abnormal area of the appearance image of the cigarette according to the processed image so as to judge whether the cigarette is scraped, thereby solving the problem that the cigarette scraping defect cannot be accurately detected by cigarette detection at an inlet of the existing packing machine, easily causing the quality problem of cigarette production, improving the process quality of cigarette production and improving the production intelligence.
The construction, features and functions of the present invention have been described in detail with reference to the embodiments shown in the drawings, but the present invention is not limited to the embodiments shown in the drawings, and all equivalent embodiments modified or modified by the spirit and scope of the present invention should be protected without departing from the spirit of the present invention.

Claims (10)

1. A visual detection method for cigarette scraping is characterized by comprising the following steps:
arranging an industrial camera at an inlet of a packing machine to acquire an appearance image of a cigarette in a cigarette discharging channel and carrying out image preprocessing according to the appearance image of the cigarette;
defining an interested area of the preprocessed cigarette appearance image to determine the cigarette detection range and obtain a color abnormal area of the cigarette appearance image;
and calculating to obtain an abnormal area communication domain according to the color abnormal area, further determining whether the corresponding cigarettes are scratched according to the abnormal area communication domain, and if so, rejecting the scratched cigarettes.
2. The visual inspection method for cigarette scraping according to claim 1, wherein the image preprocessing according to the cigarette appearance image comprises:
carrying out affine transformation processing on the cigarette appearance image so as to correct image deformation caused by the position of a camera;
setting a binarization threshold value, and performing binarization processing on the image subjected to affine transformation processing to obtain a binarization image;
and expanding the binary image, and then corroding to complete the morphological closed-loop calculation.
3. The visual inspection method for cigarette scraping according to claim 2, wherein the image preprocessing is performed according to the cigarette appearance image, and further comprising:
and setting a multi-thread algorithm to process the cigarette appearance image, wherein the multi-thread algorithm comprises the following steps: judging whether the industrial camera receives a trigger callback function in the main thread, if so, reading the cigarette appearance image and storing the cigarette appearance image into a queue;
and each sub-thread judges whether an image exists in the corresponding queue, if so, the cigarette appearance image is read from the queue and image processing of a preset algorithm is carried out.
4. The visual cigarette scraping detection method according to claim 3, wherein the determining of the corresponding scraped cigarette according to the abnormal area communication domain comprises:
acquiring the number of connected domains of the abnormal region, judging whether the number of the connected domains is greater than or equal to 1, and if not, determining that the appearance of the cigarette is normal;
and when the number of the connected domains is greater than or equal to 1, judging whether the connected area of the connected domains of each abnormal region is greater than a set threshold value, and if so, determining that the cigarette is abnormal in scraping.
5. The visual cigarette scraping detection method according to claim 4, wherein the binarization processing comprises:
converting the image after the affine transformation into a gray image, and rewriting each pixel point of the gray image according to the binarization threshold value;
when the gray value of the pixel point is larger than the binarization threshold, the gray value of the pixel point is rewritten 255;
when the gray value of the pixel point is smaller than the binarization threshold, rewriting the gray value of the pixel point to 0;
and after all the pixel points of the gray level image are rewritten, obtaining the binary image.
6. The visual inspection method for cigarette scraping according to claim 5, wherein the expanding and then corroding the binarized image to complete the morphological closed-loop calculation comprises:
and amplifying the binary image in proportion, and removing pixel points with different gray values in each set area to ensure that the gray values of the pixel points in the same area are the same so as to form a morphological closed loop.
7. A cigarette scraping visual detection system, comprising:
the industrial camera is used for acquiring the appearance image of the cigarette in the cigarette discharging channel;
the image processing device is used for carrying out image preprocessing according to the cigarette appearance image;
the detection controller is used for delimiting an interested area of the preprocessed cigarette appearance image so as to determine the detection range of the cigarette and obtain a color abnormal area of the cigarette appearance image;
the detection controller is further used for calculating an abnormal region communication domain according to the color abnormal region, and then determining the corresponding broken cigarette according to the abnormal region communication domain.
8. The visual cigarette scraping detection system according to claim 7, wherein the image processing device comprises:
the transformation processing unit is used for carrying out affine transformation processing on the cigarette appearance image so as to correct image deformation caused by the position of the camera;
a binarization processing unit, configured to set a binarization threshold, and perform binarization processing on the image after affine transformation processing to obtain a binarized image;
and the morphology closed-loop processing unit is used for expanding the binary image and then corroding the binary image so as to finish morphology closed-loop calculation.
9. The visual cigarette scraping detection system of claim 8, wherein the image processing device further comprises:
the main thread execution unit is used for setting a multi-thread algorithm to process the cigarette appearance image, reading the cigarette appearance image when the industrial camera receives the trigger callback function, and storing the cigarette appearance image into a queue;
and the sub-thread execution unit is used for reading the cigarette appearance image from the queue and performing image processing of a preset algorithm when the image is stored in the queue corresponding to the judgment of each sub-thread.
10. The visual cigarette rod scraping detection system of claim 9, wherein the detection controller comprises:
the judging and reasoning unit is used for acquiring the number of the connected domains of the abnormal area, judging whether the number of the connected domains is greater than or equal to 1, and if not, determining that the appearance of the cigarette is normal; and when the number of the connected domains is greater than or equal to 1, judging whether the connected area of the connected domain of each abnormal region is greater than a set threshold value, and if so, determining that the cigarette is abnormal in scraping.
CN202010125155.3A 2020-02-27 2020-02-27 Visual detection method and system for cigarette scraping Pending CN111402206A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010125155.3A CN111402206A (en) 2020-02-27 2020-02-27 Visual detection method and system for cigarette scraping

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010125155.3A CN111402206A (en) 2020-02-27 2020-02-27 Visual detection method and system for cigarette scraping

Publications (1)

Publication Number Publication Date
CN111402206A true CN111402206A (en) 2020-07-10

Family

ID=71413935

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010125155.3A Pending CN111402206A (en) 2020-02-27 2020-02-27 Visual detection method and system for cigarette scraping

Country Status (1)

Country Link
CN (1) CN111402206A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113989235A (en) * 2021-10-28 2022-01-28 厦门烟草工业有限责任公司 Method, device and system for detecting appearance in cigarette case and storage medium

Citations (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103593831A (en) * 2013-10-25 2014-02-19 同济大学 Method for automatically overcoming defects of cement paste backscattered electron image sample preparation
CN103868935A (en) * 2014-02-14 2014-06-18 中国科学院合肥物质科学研究院 Cigarette appearance quality detection method based on computer vision
CN105405142A (en) * 2015-11-12 2016-03-16 冯平 Edge defect detection method and system for glass panel
CN105654461A (en) * 2014-12-02 2016-06-08 中国科学院沈阳自动化研究所 Machine vision detection method for fracture of multi-bundle conductor spacer
CN106780635A (en) * 2016-12-30 2017-05-31 深圳创维-Rgb电子有限公司 The picture adapting method and system of a kind of intelligent terminal
CN106910181A (en) * 2015-12-23 2017-06-30 上海功源自动化技术有限公司 A kind of image processing method of the wafer detection based on many computers
CN107851314A (en) * 2015-07-27 2018-03-27 米其林集团总公司 For the method for the optimization for analyzing surface of tyre uniformity
CN108154510A (en) * 2018-01-17 2018-06-12 深圳市亿图视觉自动化技术有限公司 Method for detecting surface defects of products, device and computer readable storage medium
CN110490847A (en) * 2019-07-31 2019-11-22 浙江大学山东工业技术研究院 The LED chip quality determining method of view-based access control model
CN110766095A (en) * 2019-11-01 2020-02-07 易思维(杭州)科技有限公司 Defect detection method based on image gray level features

Patent Citations (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103593831A (en) * 2013-10-25 2014-02-19 同济大学 Method for automatically overcoming defects of cement paste backscattered electron image sample preparation
CN103868935A (en) * 2014-02-14 2014-06-18 中国科学院合肥物质科学研究院 Cigarette appearance quality detection method based on computer vision
CN105654461A (en) * 2014-12-02 2016-06-08 中国科学院沈阳自动化研究所 Machine vision detection method for fracture of multi-bundle conductor spacer
CN107851314A (en) * 2015-07-27 2018-03-27 米其林集团总公司 For the method for the optimization for analyzing surface of tyre uniformity
CN105405142A (en) * 2015-11-12 2016-03-16 冯平 Edge defect detection method and system for glass panel
CN106910181A (en) * 2015-12-23 2017-06-30 上海功源自动化技术有限公司 A kind of image processing method of the wafer detection based on many computers
CN106780635A (en) * 2016-12-30 2017-05-31 深圳创维-Rgb电子有限公司 The picture adapting method and system of a kind of intelligent terminal
CN108154510A (en) * 2018-01-17 2018-06-12 深圳市亿图视觉自动化技术有限公司 Method for detecting surface defects of products, device and computer readable storage medium
CN110490847A (en) * 2019-07-31 2019-11-22 浙江大学山东工业技术研究院 The LED chip quality determining method of view-based access control model
CN110766095A (en) * 2019-11-01 2020-02-07 易思维(杭州)科技有限公司 Defect detection method based on image gray level features

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
王辉: "《基于机器视觉的接装纸缺陷检测装置》", 《烟草科技》 *

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113989235A (en) * 2021-10-28 2022-01-28 厦门烟草工业有限责任公司 Method, device and system for detecting appearance in cigarette case and storage medium

Similar Documents

Publication Publication Date Title
WO2022062812A1 (en) Screen defect detection method, apparatus, and electronic device
JP6208426B2 (en) Automatic unevenness detection apparatus and automatic unevenness detection method for flat panel display
CN113298769B (en) FPC flexible flat cable appearance defect detection method, system and medium
WO2013002047A1 (en) Trolley wire abrasion measuring apparatus using image process
JP2007003243A (en) Visual examination device of long article
CN111402206A (en) Visual detection method and system for cigarette scraping
JP2019200775A (en) Surface defect inspection device and surface defect inspection method
JP5889778B2 (en) Automatic unevenness detection apparatus and automatic unevenness detection method for flat panel display
CN111008960B (en) Aluminum electrolytic capacitor bottom appearance detection method and device based on machine vision
CN108171691B (en) Detection method of plastic container
CN111458344A (en) Mask defect visual detection method, equipment and storage medium
CN105954295A (en) Helmet top facing defect detection system and method
JPH04238592A (en) Automatic bundled bar steel tally device
JP4998722B2 (en) Work defect inspection method by image processing
CN110634124A (en) Method and equipment for area detection
CN114463327A (en) Multi-shooting imaging detection equipment and method for watermark defect of electronic product lining package
CN114926675A (en) Method and device for detecting shell stain defect, computer equipment and storage medium
JPH06103276B2 (en) Surface inspection device
JP2003156451A (en) Defect detecting device
Chavda et al. Detection of defect in pharma-tablets using image processing
JP4036048B2 (en) Defect identification method
JP2007249743A (en) Identification method for moving object, identification device for moving object and program making identification processing for moving object to be performed
JPH06102199A (en) Method and device for automatic cloth inspection
JP6043178B2 (en) Automatic unevenness detection apparatus and automatic unevenness detection method for flat panel display
JP3753234B2 (en) Defect detection method

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
RJ01 Rejection of invention patent application after publication
RJ01 Rejection of invention patent application after publication

Application publication date: 20200710