CN106600582A - Die box identification method in cigarette loose-end detection process - Google Patents

Die box identification method in cigarette loose-end detection process Download PDF

Info

Publication number
CN106600582A
CN106600582A CN201611108521.4A CN201611108521A CN106600582A CN 106600582 A CN106600582 A CN 106600582A CN 201611108521 A CN201611108521 A CN 201611108521A CN 106600582 A CN106600582 A CN 106600582A
Authority
CN
China
Prior art keywords
value
gray
mask image
image
tobacco shred
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
CN201611108521.4A
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.)
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 CN201611108521.4A priority Critical patent/CN106600582A/en
Publication of CN106600582A publication Critical patent/CN106600582A/en
Pending legal-status Critical Current

Links

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
    • 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)
  • Quality & Reliability (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Image Analysis (AREA)

Abstract

The invention discloses a die box identification method in the cigarette loose-end detection process. The method includes segmenting a cut tobacco end face image into three gray-scale images according to RGB three channels, comparing two of the gray-scale image pixel points with the third gray-scale image pixel point, assigning the corresponding mask image according to the comparison result, performing AND operation on the two mask images to get an intersection to obtain a new mask image, at the end, assigning the original image by means of a new mask image, namely, identifying the increasingly yellow die box part and whitening the die box. The method solves the problem that the increasingly yellow die box is easy to be identified as cut tobacco, and improves the loose-end detection accuracy based on the machine vision technology to a large extent.

Description

A kind of diaphragm capsule recognition methodss in cigarette short detection process
Technical field
The present invention relates to cigarette loose-end detection method field, the diaphragm capsule identification in specifically a kind of cigarette short detection process Method.
Background technology
With the continuous maturation of machine vision technique, the cigarette short detection mode based on machine vision technique is in medicated cigarette matter Increasingly it is widely applied in amount detection.In the cigarette short detection using machine vision technique, system photographs diaphragm capsule Interior cigarette tobacco shred end view drawing picture, calculates the tobacco shred pixel count in each cigarette region, when the pixel count is less than the base of default The cigarette is then thought during quasi- value for nominal cigarette.
In the tobacco shred end view drawing picture of system photographs, only comprising tobacco shred and obbbin in most cigarette regions, gray difference compared with Greatly, system can accurately split in tobacco shred according to this feature.But having in the cigarette region of part also include diaphragm capsule part, diaphragm capsule with The lengthening of use time can be gradually aging, and its color also can gradually become yellow by white, after gray processing process, diaphragm capsule and cigarette The gray value of silk closely, may be mistakenly identified as tobacco shred in follow-up process, affect the accuracy in detection of system.
The content of the invention
It is an object of the invention to provide the diaphragm capsule recognition methodss in a kind of cigarette short detection process, to solve prior art The diaphragm capsule of gradual change yellowly there is a problem of being mistakenly identified as tobacco shred.
In order to achieve the above object, the technical solution adopted in the present invention is:
A kind of diaphragm capsule recognition methodss in cigarette short detection process, it is characterised in that:To cigarette tobacco shred end view drawing picture Carry out before tobacco shred separates with white obbbin, first distinguishing tobacco shred and diaphragm capsule and putting white to diaphragm capsule, comprise the following steps:
(1), tobacco shred end view drawing picture is divided into into three gray level images by RGB triple channel, Ib, Ig, Ir is designated as respectively;
(2), by the corresponding gray value of gray level image Ib each pixel ash corresponding with gray level image Ir each pixel Angle value is compared, and result is assigned to into mask image Mask1, if fiducial value is just, respective pixel on mask image Mask1 The gray value of point is entered as 0, if fiducial value anon-normal, the gray value of respective pixel point is entered as 255 on mask image Mask1.
(3), by the corresponding gray value of gray level image Ig each pixel ash corresponding with gray level image Ir each pixel Angle value is made difference and is taken absolute value, and is as a result compared with the threshold value of setting, and comparative result is assigned to into another mask image Mask2, if fiducial value is for just, the gray value of respective pixel point is entered as 0 on mask image Mask2, if fiducial value anon-normal, mask The gray value of respective pixel point is entered as 255 on image Mask2;
(4), mask image mask1, mask image mask2 are sought common ground, and two mask images is made to be covered with operation Plate image mask3;
(5), assignment process is carried out to original color image using mask image mask3, if certain pixel in mask image mask3 The gray value of point is 255, then by tobacco shred end view drawing as the rgb value of respective pixel point is all entered as 255;If mask image The gray value of mask3 pixels is 0, then the rgb value of respective pixel point is constant, now, in tobacco shred end view drawing picture Huang is crossfaded into The diaphragm capsule part of color has recognized juxtaposition white.
Compared with the prior art, beneficial effects of the present invention are embodied in:
Rgb value characteristic that the present invention passes through observation analysis tobacco shred and yellow diaphragm capsule, innovation is proposed by judging B, G, R Distinguishing tobacco shred and diaphragm capsule, the diaphragm capsule for solving gradual change yellowly exists and is mistakenly identified as asking for tobacco shred three-channel intensity level relation Topic, greatly enhances based on the void end detection accuracy of machine vision technique.
Description of the drawings
Fig. 1 is the cigarette region comprising yellow diaphragm capsule using the image processing effect comparison diagram before and after the present invention.
Specific embodiment
As shown in figure 1, the diaphragm capsule recognition methodss in a kind of cigarette short detection process, are entering to cigarette tobacco shred end view drawing picture Before row tobacco shred is separated with white obbbin, first tobacco shred and diaphragm capsule are distinguished and white is put to diaphragm capsule, comprised the following steps:
(1), tobacco shred end view drawing picture is divided into into three gray level images by RGB triple channel, Ib, Ig, Ir is designated as respectively;
(2), by the corresponding gray value of gray level image Ib each pixel ash corresponding with gray level image Ir each pixel Angle value is compared, and result is assigned to into mask image Mask1, if fiducial value is just, respective pixel on mask image Mask1 The gray value of point is entered as 0, if fiducial value anon-normal, the gray value of respective pixel point is entered as 255 on mask image Mask1.
(3), by the corresponding gray value of gray level image Ig each pixel ash corresponding with gray level image Ir each pixel Angle value is made difference and is taken absolute value, and is as a result compared with the threshold value of setting, and comparative result is assigned to into another mask image Mask2, if fiducial value is for just, the gray value of respective pixel point is entered as 0 on mask image Mask2, if fiducial value anon-normal, mask The gray value of respective pixel point is entered as 255 on image Mask2;
(4), mask image mask1, mask image mask2 are sought common ground, and two mask images is made to be covered with operation Plate image mask3;
(5), assignment process is carried out to original color image using mask image mask3, if certain pixel in mask image mask3 The gray value of point is 255, then by tobacco shred end view drawing as the rgb value of respective pixel point is all entered as 255;If mask image The gray value of mask3 pixels is 0, then the rgb value of respective pixel point is constant, now, in tobacco shred end view drawing picture Huang is crossfaded into The diaphragm capsule part of color has recognized juxtaposition white.
As shown in figure 1, Fig. 1 is the image processing effect before and after the employing present invention of the cigarette area image comprising yellow diaphragm capsule Comparison diagram.
The Dan Zhiyan original images comprising yellow diaphragm capsule that Fig. 1 (A) is photographed for industrial camera, after gray processing To Fig. 1 (B).Respectively the tobacco shred and diaphragm capsule part of Fig. 1 (A) and Fig. 1 (B) are carried out taking a little and pixel analysis, acquired results such as table 1 And shown in table 2.In original image the color of diaphragm capsule and tobacco shred closely, diaphragm capsule part gray value and cigarette after gray processing The gray value of silk part is close, and there is common factor, is shown in Table the hurdle of gray value one of 1 and table 2.As shown in Fig. 1 (C), if carrying out two-value Change processes and draws target tobacco shred profile, and yellow diaphragm capsule is mistakenly identified as the situation of tobacco shred for appearance.
Table 1 is tobacco shred pixel rgb value analytical table
Table 2 is yellow diaphragm capsule pixel rgb value analytical table
Table 3 is white obbbin pixel rgb value analytical table
The present invention has found yellow diaphragm capsule with the same white obbbin part of tobacco shred in channel B and the ash of R passages by data analysiss There is certain rule in angle value difference, yellow diaphragm capsule is negative with the channel B of tobacco section and the difference of R passage gray values, and The channel B of white obbbin part and the difference of R passage gray values are non-negative, and such as table 1 and (B-R) in table 2 one is negative, maximum It is worth for -19, and respective items are positive number in table 3, minima is 13.
For yellow diaphragm capsule, it has one on the absolute value of G passages and R passage grey value differences and establishes rules with tobacco section Rule.The absolute value of tobacco section G passages and R passage grey value differences more than 15, (| G-R |) item being shown in Table in 1, minima is 20;And yellow diaphragm capsule part G passages are respectively less than 10 with the absolute value of R passage grey value differences, (| G-R |) item being shown in Table in 2, most Big value is 5.
Therefore, the present invention proposes that the Dan Zhiyan original color images for photographing industrial camera carry out BGR triple channel separation, Triple channel gray value multilevel iudge is carried out to each pixel, when the pixel meets the condition of formula (1), then the pixel is judged Point is the point of yellow diaphragm capsule.
Wherein, B (x), G (x), R (x) are respectively the gray value of tri- passages of original image BGR.
After original color image is processed by the invention, obtain shown in result such as Fig. 1 (D), the yellow diaphragm capsule part on the right side of tobacco shred Identify and put white entirely, now diaphragm capsule has defined striking contrast with tobacco section.As shown in Fig. 1 (E), its process The binary conversion treatment and profile drawn more can accurately reflect the practical situation of tobacco shred.
The present invention by observing and analyzing the BGR value characteristics of yellow diaphragm capsule and tobacco shred, innovation propose by judge B, The three-channel intensity level relation of G, R is recognizing yellow diaphragm capsule.Diaphragm capsule recognition methodss proposed by the present invention can easily to mould Box is identified, and greatly enhances the accuracy of later stage tobacco shred segmentation.

Claims (1)

1. the diaphragm capsule recognition methodss in a kind of cigarette short detection process, it is characterised in that:Cigarette tobacco shred end view drawing picture is being entered Before row tobacco shred is separated with white obbbin, first tobacco shred and diaphragm capsule are distinguished and white is put to diaphragm capsule, comprised the following steps:
(1), tobacco shred end view drawing picture is divided into into three gray level images by RGB triple channel, Ib, Ig, Ir are designated as respectively;
(2), by the corresponding gray value of gray level image Ib each pixel gray value corresponding with gray level image Ir each pixel It is compared, and result is assigned to into mask image Mask1, if fiducial value is just, respective pixel point on mask image Mask1 Gray value is entered as 0, if fiducial value anon-normal, the gray value of respective pixel point is entered as 255 on mask image Mask1;
(3), by the corresponding gray value of gray level image Ig each pixel gray value corresponding with gray level image Ir each pixel Make difference to take absolute value, be as a result compared with the threshold value of setting, comparative result is assigned to into another mask image Mask2, If fiducial value is for just, the gray value of respective pixel point is entered as 0 on mask image Mask2, if fiducial value anon-normal, mask image The gray value of the upper respective pixel points of Mask2 is entered as 255;
(4), mask image mask1, mask image mask2 sought common ground, and two mask images are made to obtain mask figure with operation As mask3;
(5), using mask image mask3 assignment process is carried out to original color image, if certain pixel in mask image mask3 Gray value is 255, then by tobacco shred end view drawing as the rgb value of respective pixel point is all entered as 255;If mask image mask3 The gray value of pixel is 0, then the rgb value of respective pixel point is constant, now, the diaphragm capsule of gradual change yellowly in tobacco shred end view drawing picture Part has recognized juxtaposition white.
CN201611108521.4A 2016-12-06 2016-12-06 Die box identification method in cigarette loose-end detection process Pending CN106600582A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201611108521.4A CN106600582A (en) 2016-12-06 2016-12-06 Die box identification method in cigarette loose-end detection process

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201611108521.4A CN106600582A (en) 2016-12-06 2016-12-06 Die box identification method in cigarette loose-end detection process

Publications (1)

Publication Number Publication Date
CN106600582A true CN106600582A (en) 2017-04-26

Family

ID=58595852

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201611108521.4A Pending CN106600582A (en) 2016-12-06 2016-12-06 Die box identification method in cigarette loose-end detection process

Country Status (1)

Country Link
CN (1) CN106600582A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114092573A (en) * 2021-11-22 2022-02-25 中国电子科技集团公司第四十一研究所 Automatic tipping paper identification method in cigarette packet missing detection process
CN114295202A (en) * 2021-12-29 2022-04-08 湖南汉状元教育科技有限公司 Infrared information processing method and device, electronic equipment and readable storage medium

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102968616A (en) * 2012-10-25 2013-03-13 中国电子科技集团公司第四十一研究所 Light yellow tobacco shred identification and deepening method in cigarette loose-end detection process
CN105029691A (en) * 2015-06-02 2015-11-11 国家烟草质量监督检验中心 Three-dimensional reconstruction technique based method for detecting loose ends of cigarettes
CN106043785A (en) * 2016-06-29 2016-10-26 河南中烟工业有限责任公司 Detection system of cigarette loose ends

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102968616A (en) * 2012-10-25 2013-03-13 中国电子科技集团公司第四十一研究所 Light yellow tobacco shred identification and deepening method in cigarette loose-end detection process
CN105029691A (en) * 2015-06-02 2015-11-11 国家烟草质量监督检验中心 Three-dimensional reconstruction technique based method for detecting loose ends of cigarettes
CN106043785A (en) * 2016-06-29 2016-10-26 河南中烟工业有限责任公司 Detection system of cigarette loose ends

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114092573A (en) * 2021-11-22 2022-02-25 中国电子科技集团公司第四十一研究所 Automatic tipping paper identification method in cigarette packet missing detection process
CN114092573B (en) * 2021-11-22 2024-06-04 中国电子科技集团公司第四十一研究所 Automatic tipping paper identification method in cigarette packet shortage detection process
CN114295202A (en) * 2021-12-29 2022-04-08 湖南汉状元教育科技有限公司 Infrared information processing method and device, electronic equipment and readable storage medium

Similar Documents

Publication Publication Date Title
CN100354875C (en) Red eye moving method based on human face detection
US8774503B2 (en) Method for color feature extraction
US10509961B2 (en) Blindman navigation method and blindman navigation apparatus
RU2017135215A (en) DETECTION AND CLASSIFICATION OF A LIGHT TRAFFIC USING MACHINERY VISION AND DEPTH TRAINING
TWI726321B (en) Method, device and system for determining whether pixel positions in an image frame belong to a background or a foreground
CN106651966B (en) Picture color identification method and system
CN110032946B (en) Aluminum/aluminum blister packaging tablet identification and positioning method based on machine vision
US10455123B2 (en) Method for increasing the saturation of an image, and corresponding device
CN108734074B (en) Fingerprint identification method and fingerprint identification device
US20140247984A1 (en) Methods for color correcting digital images and devices thereof
KR101428923B1 (en) System and Method for Automatic Extraction of Component Packaging Regions in PCB
CN106600582A (en) Die box identification method in cigarette loose-end detection process
CN108345867A (en) Gesture identification method towards Intelligent household scene
KR20130064556A (en) Apparatus and method for face detection using multi detection
US9384561B2 (en) Method of selecting a region of interest
CN102968616B (en) The method that in cigarette short testing process, light yellow pipe tobacco identification is also deepened
CN112507767A (en) Face identification method and related computer system
CN114549694B (en) Certificate photo reloading method and system
CN109416747B (en) Target color recognition method and device and computer system
CN113393399A (en) Color designation enhancement plug-in for Maya and color enhancement method thereof
US20170116746A1 (en) Method for segmenting a color image and digital microscope
KR20030091471A (en) YCrCb color based human face location detection method
CN106855949A (en) Identification method and device of mark points
CN113705681A (en) Lipstick number identification method based on machine learning
CN113674177A (en) Automatic makeup method, device, equipment and storage medium for portrait lips

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

Application publication date: 20170426

RJ01 Rejection of invention patent application after publication