[go: up one dir, main page]

CN114997202B - Method for identifying two-dimensional information of droplets - Google Patents

Method for identifying two-dimensional information of droplets Download PDF

Info

Publication number
CN114997202B
CN114997202B CN202110802378.3A CN202110802378A CN114997202B CN 114997202 B CN114997202 B CN 114997202B CN 202110802378 A CN202110802378 A CN 202110802378A CN 114997202 B CN114997202 B CN 114997202B
Authority
CN
China
Prior art keywords
image
matrix
template
droplet
calculating
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.)
Active
Application number
CN202110802378.3A
Other languages
Chinese (zh)
Other versions
CN114997202A (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.)
Shandong Lvxin Siyuan Counter Forgery Technology Co ltd
Original Assignee
Shandong Lvxin Siyuan Counter Forgery Technology 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 Shandong Lvxin Siyuan Counter Forgery Technology Co ltd filed Critical Shandong Lvxin Siyuan Counter Forgery Technology Co ltd
Priority to CN202110802378.3A priority Critical patent/CN114997202B/en
Publication of CN114997202A publication Critical patent/CN114997202A/en
Application granted granted Critical
Publication of CN114997202B publication Critical patent/CN114997202B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06KGRAPHICAL DATA READING; PRESENTATION OF DATA; RECORD CARRIERS; HANDLING RECORD CARRIERS
    • G06K7/00Methods or arrangements for sensing record carriers, e.g. for reading patterns
    • G06K7/10Methods or arrangements for sensing record carriers, e.g. for reading patterns by electromagnetic radiation, e.g. optical sensing; by corpuscular radiation
    • G06K7/14Methods or arrangements for sensing record carriers, e.g. for reading patterns by electromagnetic radiation, e.g. optical sensing; by corpuscular radiation using light without selection of wavelength, e.g. sensing reflected white light
    • G06K7/1404Methods for optical code recognition
    • G06K7/1408Methods for optical code recognition the method being specifically adapted for the type of code
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06KGRAPHICAL DATA READING; PRESENTATION OF DATA; RECORD CARRIERS; HANDLING RECORD CARRIERS
    • G06K7/00Methods or arrangements for sensing record carriers, e.g. for reading patterns
    • G06K7/10Methods or arrangements for sensing record carriers, e.g. for reading patterns by electromagnetic radiation, e.g. optical sensing; by corpuscular radiation
    • G06K7/14Methods or arrangements for sensing record carriers, e.g. for reading patterns by electromagnetic radiation, e.g. optical sensing; by corpuscular radiation using light without selection of wavelength, e.g. sensing reflected white light
    • G06K7/1404Methods for optical code recognition
    • G06K7/146Methods for optical code recognition the method including quality enhancement steps
    • 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
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/20Special algorithmic details
    • G06T2207/20024Filtering details
    • G06T2207/20032Median filtering

Landscapes

  • Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Electromagnetism (AREA)
  • Health & Medical Sciences (AREA)
  • General Health & Medical Sciences (AREA)
  • Toxicology (AREA)
  • Artificial Intelligence (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Quality & Reliability (AREA)
  • Image Analysis (AREA)
  • Image Processing (AREA)

Abstract

本发明涉及一种液滴二维信息的识别方法,其特征在于,包括:定义计算模板,采集承载液滴矩阵的图像,转换成灰度图像,获取二值化阈值T,对I1进行二值化处理;进行形态学膨胀操作,消除噪声,使用形态学腐蚀,将残缺尽量补足,进行水平和垂直投影操作,获得ROI四个角点集合,根据Template,构造矩形四个角点的集合Rt,计算R0到Rt的透视变换矩阵,并根据变换矩阵进行透视变换,根据Template,构造所有矩阵点的水平坐标集合和垂直坐标集合,结合图像的宽、高和Template的宽、高,分别计算水平和垂直方向的比例因子Fx和Fy,计算得到I5的所有液滴位置的矩阵点坐标集合;通过对液滴信息进行处理,能够有效的提高防伪标签上标签信息的识别效率和准确率。

The invention relates to a method for identifying two-dimensional information of a droplet, which is characterized by comprising: defining a calculation template, collecting an image of a matrix carrying a droplet, converting the image into a grayscale image, obtaining a binarization threshold T, and performing binarization processing on I 1 ; performing a morphological expansion operation to eliminate noise, using morphological corrosion to supplement the incompleteness as much as possible, performing horizontal and vertical projection operations, obtaining a set of four corner points of ROI, constructing a set R t of four corner points of a rectangle according to a Template, calculating a perspective transformation matrix from R 0 to R t , and performing perspective transformation according to the transformation matrix, constructing a horizontal coordinate set and a vertical coordinate set of all matrix points according to the Template, respectively calculating scale factors F x and F y in the horizontal and vertical directions in combination with the width and height of the image and the width and height of the Template, and calculating a set of matrix point coordinates of all droplet positions of I 5 ; by processing the droplet information, the recognition efficiency and accuracy of label information on an anti-counterfeiting label can be effectively improved.

Description

Identification method of two-dimensional information of liquid drop
Technical Field
The invention relates to the technical field of image recognition, in particular to a method for recognizing two-dimensional information of liquid drops by adopting an image recognition mode to recognize the two-dimensional information of the liquid drops, and further realizing the reading of anti-counterfeiting data on an anti-counterfeiting label.
Background
Chinese patent CN104966463B discloses an anti-counterfeit label, which uses a unique anti-counterfeit ink composition to form an anti-counterfeit pattern in an ink bag array on a bottom plate with a thickness of 0.2-2.0mm, in order to ensure the anti-counterfeit pattern to be effective, the anti-counterfeit ink needs to be filled into the ink bags in the ink bag array, the depth of the ink bags is in a microporous shape of 0.0019-1.99mm, and the anti-counterfeit ink is in a flowing shape. The product formed based on the prior patent finally sets at least four groups of ink bag lattices at equal intervals in a 7x18mm area, 24 ink bags which are arranged at equal intervals are arranged in each group of ink bag lattices, the distance between adjacent ink bags is smaller than 0.5mm, and in the practical application process, the anti-counterfeiting pattern carried by the anti-counterfeiting label is ensured to be rapidly and accurately identified in the color development period, so that the key for realizing the anti-counterfeiting effect is realized.
However, after the ink bag in the anti-counterfeit label is filled with liquid, the liquid drops have the problems of light reflection and the like, so that the difficulty is brought to the identification of information.
Disclosure of Invention
Aiming at the difficulties existing in the prior art, the invention provides a method for identifying the two-dimensional information of liquid drops, which can quickly and accurately identify the anti-counterfeiting pattern consisting of the liquid drops in the color development period of the anti-counterfeiting ink.
The invention is achieved by the following measures:
the method for identifying the two-dimensional information of the liquid drop is characterized by comprising the following steps of:
Step 1, defining a calculation Template for subsequent recognition according to original design size data of a small hole matrix, and defining position representation data 1 of liquid drops, wherein the position representation data is otherwise 0;
Step2, acquiring an image I 0 of the matrix of the bearing liquid drops through a camera,
Step 3-converting I 0 into a grayscale image I 1,
Step 4, acquiring a binarization threshold T by using a minimum cross entropy image segmentation algorithm,
Step 5, performing binarization processing on the I 1 by using a threshold T to obtain an image I 2;
Step 6, performing morphological dilation operation on the image I 2, eliminating noise to obtain an image I 3,
I3=Dilate(I2,kernel=5x5,iterations=2)
Due to the special physical form of the liquid drops, the reflection condition can occur, so that part of image positions containing the liquid drops are incomplete, black dot images are incomplete, the later recognition accuracy can be influenced, and the defects are complemented as much as possible by using morphological corrosion, so that an image I is obtained 4,
I4=Erode(I3,kernel=3x3,iterations=3);
Step 7, performing horizontal and vertical projection operation on the I 4 to obtain an ROI of a droplet image, obtaining four corner sets R 0 of the ROI, constructing a set R t of four corner points of a rectangle according to Template, calculating a perspective transformation matrix of R 0 to R t, and performing perspective transformation on the image I 4 according to the transformation matrix to obtain an image I 5;
Step 8, constructing a horizontal coordinate set P tx and a vertical coordinate set P ty of all matrix points according to Template, respectively calculating the scale factors F x and F y in the horizontal and vertical directions by combining the width and the height of I 5 and the width and the height of Template, calculating to obtain the matrix point coordinate set of all the liquid drop positions (including the small holes without liquid drops) of I 5, namely the horizontal coordinate set P ix=Ptx*Fx and the vertical coordinate set P iy=Pty*Fy, calculating to obtain the liquid drop Radius radius=Min (Template. Radius) F x,Template.Radius*Fy,
Combining P ix and P iy, the positions of the liquid drop points can be sequentially positioned, whether the liquid drop exists at the positions or not is determined by acquiring whether the pixel value of the coordinate positions is 255, if the pixel value is 255, the liquid drop exists, the code is 1, if the pixel value is 0, the liquid drop does not exist, and the code is 0, so that the decoding identification of the liquid drop information is realized.
In the actual verification process, the invention also comprises a step 9 of performing median filtering treatment on the I 1 which is not subjected to binarization treatment to obtain an image I 6, wherein the condition that small bubbles possibly occur when liquid drops drop into small holes is found, and the identification accuracy in a given test set can not reach 100% up to the above step,
I6=MedianBlur(I1,ksize=5)
Determining the coordinates of the central points of the matrixes of the liquid drops (including small holes without the liquid drops) for the I 6 by combining the P ix and the P iy obtained in the step 8, and summing up pixel values in a range according to Radius for the central point of each matrix to obtain a set S 0;
The sorting of S 0 results in S 1, and then the discrete difference Diff for each element is found. Finding out the index i of the element with the largest difference, wherein the pixel value of the range corresponding to the matrix point is larger than S1[ i ], the pixel value is free of liquid drops, the code is 0, otherwise, the code is 1, so that the decoding identification of the liquid drop information is realized, and the identification accuracy reaches 100% in a given test set after the processing of the step 9.
In the step 6, the morphological dilation operation is performed on the image I 2 to eliminate noise, when the image I 3 is obtained, the morphological dilation operation is performed for more than two times according to the image processing requirement, and when the image I 4 is obtained by complementing the defect as much as possible by using the morphological erosion, the morphological erosion treatment is performed for more than two times according to the image processing requirement.
The invention can effectively improve the identification efficiency and accuracy of the label information on the anti-counterfeiting label by processing the droplet information, and has the remarkable advantages of low calculation complexity, high working efficiency, high accuracy and the like.
Drawings
Fig. 1 is a schematic diagram of the present invention for forming a security pattern in a security tag product.
Fig. 2 is a binarized image of example 1.
FIG. 3 is an image of example 1 after 2 rounds of inflation.
FIG. 4 is an image of example 1 after 3 rounds of corrosion.
The anti-counterfeiting label comprises an anti-counterfeiting label base plate 1, an ink bag 2, a blank ink bag 3 and an ink bag 4 filled with liquid drops.
Detailed Description
The invention will be further described with reference to the drawings and examples.
Example 1:
The embodiment provides a method for identifying drop anti-counterfeiting information on an anti-counterfeiting label, which specifically comprises the following steps:
according to the original design size data of the aperture matrix, defining a calculation Template for subsequent identification, defining position representation data 1 of liquid drops, and otherwise, defining the position representation data as 0;
Acquiring an image I 0 carrying a liquid drop matrix by a camera (a mobile phone camera, a digital camera, an industrial camera and the like);
The image I 2 is obtained by using the threshold T and performing binarization processing on the I 1, wherein most noise pixels are filtered, but partial fine noise pixels (mostly because small holes without liquid drops are formed in part and heavier shadows are formed in imaging) need to be processed (as shown in figure 2);
performing morphological dilation operation on the image I 2 to eliminate noise and obtain an image I 3 as shown in FIG. 3;
I3=Dilate(I2,kernel=5x5,iterations=2)
Due to the special physical form of the liquid drop, reflection causes to occur, so that part of the image position containing the liquid drop is incomplete, the black dot image is incomplete, the later recognition precision is affected, and the incomplete is complemented by morphological corrosion, so that an image I 4 is obtained, as shown in fig. 4.
I4=Erode(I3,kernel=3x3,iterations=3)
Performing horizontal and vertical projection operation on the I 4 to obtain an ROI of the droplet image and obtaining four corner sets R 0 of the ROI;
Constructing a set R t of four corner points of the rectangle according to the Template;
Calculating perspective transformation matrixes from R 0 to R t, and performing perspective transformation on the image I 4 according to the transformation matrixes to obtain an image I 5;
According to the Template, a horizontal coordinate set P tx and a vertical coordinate set P ty of all matrix points are constructed, the scale factors F x and F y in the horizontal and vertical directions are calculated respectively by combining the width and the width of I 5 and the width and the height of the Template, and the matrix point coordinate sets of all liquid drop positions (including small holes without liquid drops) of I 5 are calculated, namely a horizontal coordinate set P ix=Ptx*Fx and a vertical coordinate set P iy=Pty*Fy. And calculate the droplet Radius = Min (template. Radius F x,Template.Radius*Fy)
Combining P ix and P iy, the positions of the liquid drop points can be sequentially positioned, whether the liquid drop exists at the positions or not is determined by acquiring whether the pixel value of the coordinate positions is 255, if the pixel value is 255, the liquid drop exists, the code is 1, if the pixel value is 0, the liquid drop does not exist, and the code is 0, so that the decoding identification of the liquid drop information is realized.
In the actual verification process, the situation that small bubbles are generated possibly occurs when the liquid drops drop into the small holes is found, and the identification accuracy in the given test set cannot reach 100% by the steps, and for the situation, median filtering processing is performed on the I 1 which is not subjected to binarization processing, so that an image I 6 is obtained:
I6=MedianBlur(I1,ksize=5)
Determining the coordinates of the central points of the matrixes of the liquid drops (including small holes without liquid drops) for the I 6 by combining the obtained P ix and P iy, and summing up pixel values in the range according to Radius for the central point of each matrix to obtain a set S 0;
S 0 is sequenced to obtain S 1, then the discrete difference value Diff of each element is obtained, the index i of the element with the largest difference value is found, the pixel value of the range corresponding to the matrix point is larger than S1[ i ], no liquid drop exists, the code is 0, otherwise, the liquid drop exists, the code is 1, and therefore decoding identification of liquid drop information is achieved.
The identification method provided by the invention has the obvious advantages of high efficiency, high accuracy and the like in a given test set, the identification accuracy reaches 100%, and the identification method is suitable for industrial production and application.

Claims (3)

1. The method for identifying the two-dimensional information of the liquid drop is characterized by comprising the following steps of:
Step 1, defining a calculation Template for subsequent recognition according to original design size data of a small hole matrix, and defining position representation data 1 of liquid drops, wherein the position representation data is otherwise 0;
Step2, acquiring an image I 0 of the matrix of the bearing liquid drops through a camera,
Step 3-converting I 0 into a grayscale image I 1,
Step 4, acquiring a binarization threshold T by using a minimum cross entropy image segmentation algorithm,
Step 5, performing binarization processing on the I 1 by using a threshold T to obtain an image I 2;
step 6, performing morphological dilation operation on the image I 2 to eliminate noise and obtain an image I 3,I3 = Dilate(I2, wherein kernel=5x5 and interfaces=2), due to the particularity of the physical form of the liquid drops, reflection conditions can occur, so that part of the image positions containing the liquid drops are caused, black point images are incomplete and incomplete, the later recognition precision can be influenced, morphological corrosion is used, the incomplete is complemented as much as possible, and the image I 4,I4 = Erode(I3, kernel=3x3 and interfaces=3 are obtained;
Step 7, performing horizontal and vertical projection operation on the I 4 to obtain the ROI of the droplet image, obtaining four corner sets R 0 of the ROI,
Constructing a set R t of four corner points of a rectangle according to the Template, calculating a perspective transformation matrix from R 0 to R t, and performing perspective transformation on an image I 4 according to the transformation matrix to obtain an image I 5;
And 8, constructing a horizontal coordinate set P tx and a vertical coordinate set P ty of all matrix points according to the Template, respectively calculating the scale factors F x and F y in the horizontal and vertical directions by combining the width and the height of I 5 and the width and the height of the Template, calculating to obtain the matrix point coordinate set of all the droplet positions of I 5, namely, the horizontal coordinate set P ix=Ptx * Fx and the vertical coordinate set P iy=Pty * Fy, calculating to obtain the droplet Radius R (Template. Radius) F x, Template.Radius*Fy, sequentially positioning the droplet positions by combining P ix and P iy, determining whether the droplet exists at the position by acquiring whether the pixel value of the coordinate position is 255, if the pixel value is 255, then, encoding to be 1, and if the pixel value is 0, then, encoding to be 0, thereby realizing decoding identification of droplet information.
2. The method for recognizing two-dimensional information of liquid drop according to claim 1, further comprising step 9 of median filtering the I 1 which is not binarized to obtain an image I 6,
I6=MedianBlur(I1, ksize=5)
Determining the center point coordinates of the liquid drop matrixes for the I 6 by combining the P ix and the P iy obtained in the step 8, and summing up pixel values in a range according to Radius for each matrix center point to obtain a set S 0;
And sequencing S 0 to obtain S 1, then solving the discrete difference value Diff of each element, finding out the index i of the element with the largest difference value, wherein the pixel value of the corresponding point in the matrix range is larger than that of S 1[i], and the pixel value is no liquid drop, the code is 0, otherwise, the code is 1, so that the decoding identification of the liquid drop information is realized.
3. The method of claim 1, wherein in the step 6, the image I 2 is subjected to morphological dilation operation to eliminate noise, and the image I 3 is obtained by performing the morphological dilation operation twice or more according to the image processing requirement, and the image I 4 is obtained by complementing the defect as much as possible by morphological erosion, and the morphological erosion process is performed twice or more according to the image processing requirement.
CN202110802378.3A 2021-07-15 2021-07-15 Method for identifying two-dimensional information of droplets Active CN114997202B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110802378.3A CN114997202B (en) 2021-07-15 2021-07-15 Method for identifying two-dimensional information of droplets

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110802378.3A CN114997202B (en) 2021-07-15 2021-07-15 Method for identifying two-dimensional information of droplets

Publications (2)

Publication Number Publication Date
CN114997202A CN114997202A (en) 2022-09-02
CN114997202B true CN114997202B (en) 2024-12-24

Family

ID=83018765

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110802378.3A Active CN114997202B (en) 2021-07-15 2021-07-15 Method for identifying two-dimensional information of droplets

Country Status (1)

Country Link
CN (1) CN114997202B (en)

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103559473A (en) * 2013-10-28 2014-02-05 汝思商务咨询(上海)有限公司 Method and system using feature images to achieve printing stock security
CN104966463A (en) * 2015-07-27 2015-10-07 于池 Anti-counterfeit label and method for producing same

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6959866B2 (en) * 2002-05-30 2005-11-01 Ricoh Company, Ltd. 2-Dimensional code pattern, 2-dimensional code pattern supporting medium, 2-dimensional code pattern generating method, and 2-dimensional code reading apparatus and method
CN106462786B (en) * 2014-05-14 2020-01-07 共同印刷株式会社 Two-dimensional code, two-dimensional code analysis system and two-dimensional code production system
CN107506817B (en) * 2017-07-13 2023-06-27 拍拍看(海南)人工智能有限公司 Commodity virtual coding method and system based on personality patterns
CN112541369B (en) * 2020-12-14 2022-08-05 合肥高维数据技术有限公司 Information code identification method and system

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103559473A (en) * 2013-10-28 2014-02-05 汝思商务咨询(上海)有限公司 Method and system using feature images to achieve printing stock security
CN104966463A (en) * 2015-07-27 2015-10-07 于池 Anti-counterfeit label and method for producing same

Also Published As

Publication number Publication date
CN114997202A (en) 2022-09-02

Similar Documents

Publication Publication Date Title
CN107545239B (en) Fake plate detection method based on license plate recognition and vehicle characteristic matching
CN108920992B (en) A positioning and recognition method of medical label barcode based on deep learning
KR101403876B1 (en) Method and Apparatus for Vehicle License Plate Recognition
CN108596166A (en) A kind of container number identification method based on convolutional neural networks classification
CN108615034A (en) A kind of licence plate recognition method that template matches are combined with neural network algorithm
CN106875546A (en) A method for identifying value-added tax invoices
CN102375982A (en) Multi-character characteristic fused license plate positioning method
CN105260693A (en) Laser two-dimensional code positioning method
CN110472625B (en) A Visual Recognition Method of Chess Pieces Based on Fourier Descriptor
CN112560538B (en) Method for quickly positioning damaged QR (quick response) code according to image redundant information
CN106446894A (en) Method for recognizing position of spherical object based on contour
CN109784328B (en) Method for positioning bar code, terminal and computer readable storage medium
CN105260694B (en) A kind of two-dimension code area localization method based on multistage key extraction with analysis
WO2021253633A1 (en) Recognition method and terminal for batch of qr codes
CN103606220A (en) Check printed number recognition system and check printed number recognition method based on white light image and infrared image
CN108537217A (en) Identification based on character code mark and localization method
CN112132036A (en) Big data image processing method and system based on safe area
CN111222507A (en) Automatic identification method of digital meter reading, computer readable storage medium
JP2011248702A (en) Image processing device, image processing method, image processing program, and program storage medium
CN110046618B (en) License plate recognition method based on machine learning and maximum extremum stable region
CN100489885C (en) Method for identifying image and device for realizing same
CN112541943A (en) Robot positioning method based on visual road signs
CN114997202B (en) Method for identifying two-dimensional information of droplets
JP4492258B2 (en) Character and figure recognition and inspection methods
CN111429437B (en) Object Detection-Oriented Image No-Reference Sharpness Quality 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
GR01 Patent grant
GR01 Patent grant