CN105373789A - Cigarette invisible sprayed code integrity detection method - Google Patents

Cigarette invisible sprayed code integrity detection method Download PDF

Info

Publication number
CN105373789A
CN105373789A CN201510652089.4A CN201510652089A CN105373789A CN 105373789 A CN105373789 A CN 105373789A CN 201510652089 A CN201510652089 A CN 201510652089A CN 105373789 A CN105373789 A CN 105373789A
Authority
CN
China
Prior art keywords
coding
image
character
cigarette
detection method
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
CN201510652089.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 CN201510652089.4A priority Critical patent/CN105373789A/en
Publication of CN105373789A publication Critical patent/CN105373789A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V30/00Character recognition; Recognising digital ink; Document-oriented image-based pattern recognition
    • G06V30/10Character recognition
    • G06V30/22Character recognition characterised by the type of writing
    • G06V30/224Character recognition characterised by the type of writing of printed characters having additional code marks or containing code marks
    • G06V30/2253Recognition of characters printed with magnetic ink
    • 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/30168Image quality inspection

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Multimedia (AREA)
  • Quality & Reliability (AREA)
  • Image Analysis (AREA)

Abstract

The invention discloses a cigarette invisible sprayed code integrity detection method. The detection method is completed based on an ultraviolet light source, an industrial camera and a computer and comprises the steps that: (1) the industrial camera collects a sprayed code image under the assistance of the ultraviolet light source and a blue band-pass optical filter and transmits the sprayed code image to the computer; (2) the computer carries out double-threshold segmentation on the image by means of blue and red components of an RGB color space and extracts sprayed code characters; (3) horizontal projection is carried out on a character image after the segmentation, and edge retrieval is carried out on a horizontal projection curve so as to determine the positions of the sprayed code characters in a longitudinal coordinate; and (4) vertical projection is carried out on the positioned sprayed code areas, edge retrieval is carried out on a vertical projection curve, characteristic values such as a sprayed code character string length and widths of fracture gaps among the characters, and the missing of sprayed codes is determined by means of characteristic value multi-judgment. The method has the advantages that the high-quality sprayed code image can be collected, the difficulty of subsequent image processing is lowered, the detection precision is relatively high, and the quality of cigarette sprayed codes is ensured.

Description

The stealthy coding integrality detection method of a kind of cigarette
Technical field
The present invention relates to the stealthy coding integrality detection method of a kind of cigarette.
Background technology
In order to need with brand image false proof, domestic tobacco company is more and more inclined to stealthy code spraying technology, Cai with only profiling under ultraviolet light auxiliary irradiation specialty inks by information spray printings such as cigarette dates of manufacture on cigarette transparent packaging paper.On the cigarette production line employing code spraying technology, may there is not ink-jet phenomenon in ink jet numbering machine, causes the defects such as coding disappearance appear in cigarette transparent packaging material.Current each cigarette factory owner will rely on the method for artificial sampling observation to ensure coding quality, has not only added human cost but also can not ensure the quality of all cigarette, may cause immeasurable impact to the image of cigarette enterprise.
For ensureing quality cigarette, the coding pick-up unit based on colour code sensing principle has been installed by part producer, but this pick-up unit man-machine interaction is poor, and accuracy of detection is low, cannot realize the effective detection to cigarette coding.
Summary of the invention
In order to detect the stealthy coding disappearance problem that may occur in parcel and carton box cigarette packaging process, ensureing quality cigarette, the invention provides the stealthy coding integrality detection method of a kind of cigarette based on machine vision technique.The present invention adopts following technical scheme to achieve these goals:
The stealthy coding integrality detection method of a kind of cigarette, the stealthy coding integrality detection method of described cigarette relies on ultraviolet source, industrial camera and computing machine to complete, and detecting step is as follows:
(1) the stealthy coding of ultraviolet source auxiliary irradiation, industrial camera gathers coding image and is sent to computing machine;
(2) first computing machine carries out Double Thresholding Segmentation by the blueness of RGB color space, red component to image and extracts coding character;
(3) then horizontal projection is carried out to the character picture after segmentation, horizontal projection curve carries out edge retrieval to locate the position of coding character in longitudinal coordinate;
(4) finally vertical projection is carried out to the coding region of location, retrieve at vertical projection curve coboundary and calculate coding string length and character interruption splits the eigenwerts such as gap width, determine whether there is coding lack by the multiple judgement of eigenwert.
Described ultraviolet source is the ultraviolet source of 365nm wavelength, the stealthy coding of ultraviolet source auxiliary irradiation of 365nm wavelength, makes code-spraying printing ink be blue under ultraviolet light and forms sharp contrast with background area;
Adopt two becomes the ultraviolet source at 30 degree of angles to irradiate from coding both sides with level simultaneously.
Described industrial camera is installed on directly over coding, and increases the blue ribbon pass filter for removing the interference of other light before camera lens.
Blueness, the red component of the middle RGB color space of described step (2) carry out Double Thresholding Segmentation to image, adopt following formula:
Wherein, image for the purpose of g (x, y), f (x, y) is source images, T b, T rbe respectively blue component threshold value and red component threshold value.
In described step (3), with the row pixel average gray value of image for feature carries out horizontal direction projection to coding image, obtain horizontal projection curve, then with curve two-end-point for starting point is respectively toward the trip point position (i.e. rising edge) that other end point search first is stable, correspondence obtains the top and bottom position of coding character, location coding character, meets following formula and stops search when wherein searching for trip point in drop shadow curve:
A(x+i)≥A(x)+dis,{i|i=1,…,4}
A (x) is the projection value of image xth row, and dis is the projection value difference being set as rising edge.
In described step (4), carry out vertical direction projection with the row pixel average gray value of image for the coding image of feature to location, obtain vertical projection curve;
Wherein string length value calculating method is, with vertical projection curve two-end-point for starting point is respectively toward the trip point position (rising edge) that other end point search first is stable, distance between two trip points is string length, when the absolute difference of the string length value calculated and standard value is greater than the threshold value of setting, then think that coding end has more character or lacks character;
Otherwise, the part on traversal vertical projection curve between two trip points (rising edge), search meets the trip point (negative edge) of following formula:
A(x-i)≥A(x)+dis,{i|i=1,…,4}
After searching the trip point (negative edge) meeting above-mentioned condition, record this position and continue to search for the trip point (i.e. rising edge) closed on, distance values between calculating at 2, when the distance values calculated is greater than the threshold value of setting, then thinks that this place's character of coding lacks.
The Advantageous Effects adopting as above technical scheme to obtain is:
The present invention after understanding code-spraying printing ink characteristic and optical filter feature in depth, innovation propose a kind of novel cigarette stealthy coding integrity detection mode, detected by the integrality of method to coding character such as special image acquisition mode and projective transformations.The method can collect the coding image of high-quality, greatly reduces the difficulty of successive image process, has higher accuracy of detection, can ensure the quality of cigarette coding, have application space widely.
Accompanying drawing explanation
Fig. 1 is cigarette stealthy coding integrity detection schematic diagram.
Fig. 2 is the complete stealthy coding drop shadow curve figure of cigarette.
Fig. 3 is the stealthy coding drop shadow curve figure of cigarette of disappearance.
Embodiment
1 to 3 pair of the specific embodiment of the present invention is described further with reference to the accompanying drawings:
For the stealthy coding disappearance of the cigarette of the stealthy coding 031420599193 of complete cigarette, disappearance for 0314299193.
Fig. 1 is tested tobacco bale 1 (parcel or carton box cigarette) of the present invention, ultraviolet source 2, optical filter 3 and industrial camera 4 relative mounting positions, two are adopted to become the 365nm length ultraviolet light source at 30 degree of angles to throw light on from coding both sides to stealthy coding with level, make coding area light according to all and avoid reflectively affecting image quality, use simultaneously blue ribbon pass filter be in order to filtering blueness outside light, reduce interference.
Industrial camera with or without gather during blue ribbon pass filter coding image effect contrast, after use blue ribbon pass filter, the blue light that only specialty inks produces enters camera by optical filter, and other light are isolated by optical filter, therefore the background of figure is simple, can facilitate the process such as successive character segmentation.
The stealthy coding integrality detection method of a kind of cigarette, the stealthy coding integrality detection method of described cigarette relies on ultraviolet source, industrial camera and computing machine to complete, and detecting step is as follows:
(1) the stealthy coding of ultraviolet source auxiliary irradiation, industrial camera gathers coding image and is sent to computing machine;
(2) first computing machine carries out Double Thresholding Segmentation by the blueness of RGB color space, red component to image and extracts coding character;
(3) then horizontal projection is carried out to the character picture after segmentation, horizontal projection curve carries out edge retrieval to locate the position of coding character in longitudinal coordinate;
(4) finally vertical projection is carried out to the coding region of location, retrieve at vertical projection curve coboundary and calculate coding string length and character interruption splits the eigenwerts such as gap width, determine whether there is coding lack by the multiple judgement of eigenwert.
Blueness, the red component of the middle RGB color space of described step (2) carry out Double Thresholding Segmentation to image, adopt following formula:
Wherein, image for the purpose of g (x, y), f (x, y) is source images, T b, T rbe respectively blue component threshold value and red component threshold value.
In described step (3), for feature, horizontal direction projection is carried out to image with the row pixel average gray value of image, obtain curve A in Fig. 2.With horizontal projection curve two-end-point for starting point is respectively toward the trip point position (rising edge) that other end point search first is stable, correspondence obtains the top and bottom position of coding character, location coding character, meets following formula and stops search when wherein searching for trip point in drop shadow curve:
A(x+i)≥A(x)+dis,{i|i=1,…,4}
A (x) is the projection value of image xth row, and dis is the projection value difference being set as rising edge.
In described step (4), carry out vertical direction projection with the row pixel average gray value of image for the coding image of feature to location, obtain vertical projection curve, i.e. curve B in Fig. 2;
Wherein string length value calculating method is, with curve B two-end-point for starting point is respectively toward the trip point position (rising edge) that other end point search first is stable, distance between two trip points is string length, when the absolute difference of the string length value calculated and standard value is greater than the threshold value of setting, then think that coding end has more character or lacks character;
Otherwise, the part in traversal curve B between two trip points (rising edge), search meets the trip point (negative edge) of following formula:
A(x-i)≥A(x)+dis,{i|i=1,…,4}
The stealthy coding disappearance of cigarette is 0314299193, and its vertical projection curve as shown in Figure 3, according to above-mentioned theory calculating character string length value and middle fracture width value in drop shadow curve, finally judges that this coding is defect coding.
Certainly; more than illustrate and be only preferred embodiment of the present invention; the present invention is not limited to enumerate above-described embodiment; should be noted that; any those of ordinary skill in the art are under the guidance of this instructions; made all equivalently to substitute, obvious form of distortion, within the essential scope all dropping on this instructions, protection of the present invention ought to be subject to.

Claims (6)

1. the stealthy coding integrality detection method of cigarette, is characterized in that, the stealthy coding integrality detection method of described cigarette relies on ultraviolet source, industrial camera and computing machine to complete, and detecting step is as follows:
(1) the stealthy coding of ultraviolet source auxiliary irradiation, industrial camera gathers coding image and is sent to computing machine;
(2) first computing machine carries out Double Thresholding Segmentation by the blueness of RGB color space, red component to image and extracts coding character;
(3) then horizontal projection is carried out to the character picture after segmentation, horizontal projection curve carries out edge retrieval to locate the position of coding character in longitudinal coordinate;
(4) finally vertical projection is carried out to the coding region of location, retrieve at vertical projection curve coboundary and calculate coding string length and character interruption splits the eigenwerts such as gap width, determine whether there is coding lack by the multiple judgement of eigenwert.
2. the stealthy coding integrality detection method of a kind of cigarette according to claim 1, it is characterized in that, described ultraviolet source is the ultraviolet source of 365nm wavelength, the stealthy coding of ultraviolet source auxiliary irradiation of 365nm wavelength, makes code-spraying printing ink be blue under ultraviolet light and forms sharp contrast with background area;
Adopt two becomes the ultraviolet source at 30 degree of angles to irradiate from coding both sides with level simultaneously.
3. the stealthy coding integrality detection method of a kind of cigarette according to claim 1, it is characterized in that, described industrial camera is installed on directly over coding, and increases the blue ribbon pass filter for removing the interference of other light before camera lens.
4. the stealthy coding integrality detection method of a kind of cigarette according to claim 1, is characterized in that, blueness, the red component of the middle RGB color space of described step (2) carry out Double Thresholding Segmentation to image, adopt following formula:
Wherein, image for the purpose of g (x, y), f (x, y) is source images, T b, T rbe respectively blue component threshold value and red component threshold value.
5. the stealthy coding integrality detection method of a kind of cigarette according to claim 1, it is characterized in that, in described step (3), with the row pixel average gray value of image for feature carries out horizontal direction projection to coding image, obtain horizontal projection curve, then with curve two-end-point for starting point is respectively toward the trip point position (rising edge) that other end point search first is stable, correspondence obtains the top and bottom position of coding character, location coding character, meets following formula and stops search when wherein searching for trip point in drop shadow curve:
A(x+i)≥A(x)+dis,{i|i=1,…,4}
A (x) is the projection value of image xth row, and dis is the projection value difference being set as rising edge.
6. the stealthy coding integrality detection method of a kind of cigarette according to claim 1, it is characterized in that, in described step (4), carry out vertical direction projection with the row pixel average gray value of image for the coding image of feature to location, obtain vertical projection curve;
Wherein string length value calculating method is, with vertical projection curve two-end-point for starting point is respectively toward the trip point position (rising edge) that other end point search first is stable, distance between two trip points is string length, when the absolute difference of the string length value calculated and standard value is greater than the threshold value of setting, then think that coding end has more character or lacks character;
Otherwise, the part on traversal vertical projection curve between two trip points (rising edge), search meets the trip point (negative edge) of following formula:
A(x-i)≥A(x)+dis,{i|i=1,…,4}
After searching the trip point (negative edge) meeting above-mentioned condition, record this position and continue to search for the trip point (rising edge) closed on, distance values between calculating at 2, when the distance values calculated is greater than the threshold value of setting, then thinks that this place's character of coding lacks.
CN201510652089.4A 2015-10-08 2015-10-08 Cigarette invisible sprayed code integrity detection method Pending CN105373789A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201510652089.4A CN105373789A (en) 2015-10-08 2015-10-08 Cigarette invisible sprayed code integrity detection method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201510652089.4A CN105373789A (en) 2015-10-08 2015-10-08 Cigarette invisible sprayed code integrity detection method

Publications (1)

Publication Number Publication Date
CN105373789A true CN105373789A (en) 2016-03-02

Family

ID=55375972

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201510652089.4A Pending CN105373789A (en) 2015-10-08 2015-10-08 Cigarette invisible sprayed code integrity detection method

Country Status (1)

Country Link
CN (1) CN105373789A (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106056617A (en) * 2016-05-31 2016-10-26 中国电子科技集团公司第四十研究所 Cigarette carton sealing machine hot melt adhesive detection method
CN106650537A (en) * 2016-12-21 2017-05-10 贵州省烟草公司贵阳市公司 Identification reading inputting instrument of tobacco carton 32-bit laser code
CN109631763A (en) * 2019-02-01 2019-04-16 东莞中科蓝海智能视觉科技有限公司 Irregular part detects localization method
CN114654911A (en) * 2022-04-07 2022-06-24 常德金鹏印务有限公司 Method and device for automatically jet-printing two-dimensional code

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2002183729A (en) * 2000-10-20 2002-06-28 Eastman Kodak Co Blond-hair-pixel removing method in image skin-color detection
CN102184378A (en) * 2011-04-27 2011-09-14 茂名职业技术学院 Method for cutting portable data file (PDF) 417 standard two-dimensional bar code image
CN204399579U (en) * 2014-12-31 2015-06-17 中国电子科技集团公司第四十一研究所 For the industrial camera module that the stealthy coding of carton box cigarette detects

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2002183729A (en) * 2000-10-20 2002-06-28 Eastman Kodak Co Blond-hair-pixel removing method in image skin-color detection
CN102184378A (en) * 2011-04-27 2011-09-14 茂名职业技术学院 Method for cutting portable data file (PDF) 417 standard two-dimensional bar code image
CN204399579U (en) * 2014-12-31 2015-06-17 中国电子科技集团公司第四十一研究所 For the industrial camera module that the stealthy coding of carton box cigarette detects

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
徐勇等: "基于BP神经网络的烟包喷码字符智能识别系统研究", 《万方数据库》 *

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106056617A (en) * 2016-05-31 2016-10-26 中国电子科技集团公司第四十研究所 Cigarette carton sealing machine hot melt adhesive detection method
CN106650537A (en) * 2016-12-21 2017-05-10 贵州省烟草公司贵阳市公司 Identification reading inputting instrument of tobacco carton 32-bit laser code
CN109631763A (en) * 2019-02-01 2019-04-16 东莞中科蓝海智能视觉科技有限公司 Irregular part detects localization method
CN114654911A (en) * 2022-04-07 2022-06-24 常德金鹏印务有限公司 Method and device for automatically jet-printing two-dimensional code

Similar Documents

Publication Publication Date Title
CN105373789A (en) Cigarette invisible sprayed code integrity detection method
CN104616275B (en) A kind of defect inspection method and device
WO2020146491A3 (en) Using light detection and ranging (lidar) to train camera and imaging radar deep learning networks
CN102020036A (en) Visual detection method for transparent paper defect of outer package of strip cigarette
EP2426642A1 (en) Method, device and system for motion detection
CN108333488A (en) The arcing detection method blended based on ultraviolet, infrared and optical imagery
CN103150549B (en) A kind of road tunnel fire detection method based on the early stage motion feature of smog
CN103051872A (en) Method for detecting conveyor belt deviation based on image edge extraction
CN109752392B (en) PCB defect type detection system and method
CN101244648B (en) Ink splitting correction method
CN102601131B (en) A kind of billet surface quality on-line detecting device
CN105959655A (en) Alarm method and device for identifying region invasion by intelligent eye
CN102509264B (en) Image-segmentation-based scanning image dedusting method
CN106599896A (en) Character segmentation method, character segmentation device, element detection method, and element detection device
CN110838097A (en) Conveyor belt offset measurement method based on machine vision
CN103020583A (en) Image processing apparatus
JP6197340B2 (en) Image processing apparatus, image processing method, and program
CN104535584A (en) Vision detection method
CN102663781A (en) Sub-pixel level welding center extraction method based on visual sense
CN105701809A (en) Flat-field correction method based on line-scan digital camera scanning
CN104331695A (en) Robust round identifier shape quality detection method
CN103385539A (en) Single cigarette empty head detection method based on machine vision and special equipment
CN103913149A (en) Binocular range finding system based on STM 32 single chip microcomputer and range finding method thereof
CN110751669A (en) Novel CBOCP online infrared converter tapping steel flow automatic detection and tracking method and system
CN110084171B (en) Detection device and detection method for foreign matters on top of subway train

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
RJ01 Rejection of invention patent application after publication

Application publication date: 20160302

RJ01 Rejection of invention patent application after publication