CN109493316B - Intelligent detection method for cigarette packet missing strip of carton sealing machine based on similarity analysis and feature increment learning - Google Patents
Intelligent detection method for cigarette packet missing strip of carton sealing machine based on similarity analysis and feature increment learning Download PDFInfo
- Publication number
- CN109493316B CN109493316B CN201811107992.2A CN201811107992A CN109493316B CN 109493316 B CN109493316 B CN 109493316B CN 201811107992 A CN201811107992 A CN 201811107992A CN 109493316 B CN109493316 B CN 109493316B
- Authority
- CN
- China
- Prior art keywords
- image
- similarity
- picture
- carton
- missing
- 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
Links
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T7/00—Image analysis
- G06T7/0002—Inspection of images, e.g. flaw detection
- G06T7/0004—Industrial image inspection
- G06T7/0008—Industrial image inspection checking presence/absence
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T2207/00—Indexing scheme for image analysis or image enhancement
- G06T2207/10—Image acquisition modality
- G06T2207/10004—Still image; Photographic image
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T2207/00—Indexing scheme for image analysis or image enhancement
- G06T2207/10—Image acquisition modality
- G06T2207/10024—Color image
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T2207/00—Indexing scheme for image analysis or image enhancement
- G06T2207/30—Subject of image; Context of image processing
- G06T2207/30108—Industrial 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)
- Wrapping Of Specific Fragile Articles (AREA)
Abstract
The invention discloses an intelligent detection method for tobacco bale strip missing of a carton sealing machine based on similarity analysis and characteristic increment learning. The method comprises an off-line modeling stage: carrying out gray level transformation and image segmentation on the collected cigarette carton front position and back position picture sheets in the cigarette packet, calculating 16 characteristic similarity indexes of the modeling picture by adopting a horizontal and longitudinal block similarity analysis method, and determining a threshold value of the 16 characteristics of the modeling picture by utilizing a kernel density estimation method. And (3) an online identification stage: and calculating the front position and the rear position of the cigarette carton in the currently acquired cigarette packet in real time by adopting a similarity analysis method of horizontal and vertical partitioning, acquiring 16 characteristic similarity indexes of the current picture, and identifying whether the front position and the rear position have carton defects or not by comparing the similarity indexes with a current threshold value. The invention realizes effective characterization and quantification of cigarette carton picture characteristic information in the cigarette packet, can accurately judge the occurrence of cigarette carton missing quality defects, and provides an information basis for carton missing proof through picture marking.
Description
Technical Field
The invention relates to the field of carton missing detection of carton sealing machine tobacco packets, in particular to an intelligent carton missing detection method of carton sealing machine tobacco packets based on similarity analysis and feature increment learning, which is suitable for cigarette carton sealing machine equipment.
Background
The carton cigarette packing is the last procedure of cigarette production, and the quality problem of cigarette packet strip shortage can occur in the packing process. Most cigarette enterprises strengthen process monitoring management, and detect the possible cigarette packet strip shortage quality problem in the packing process by adopting an electronic scale heavy type strip shortage detection method or a machine vision type strip shortage detection method through the transformation and upgrading of a box sealing machine. Along with the popularization of cigarette carton recycling projects in the tobacco industry, the deviation fluctuation of the weight of the recycling carton and the weight of the calibrated carton is large due to the reasons of moisture absorption in the use and recycling processes of the cartons and the like, and the accuracy of the heavy type strip missing detection method of the electronic scale is influenced. Meanwhile, the strip missing detection of the heavy cigarette packet with the electronic scale lacks the storage of strip missing evidences in the production process, and complaints about the strip missing quality problem are difficult to prove. The machine vision type strip missing detection method has the characteristics of accuracy, rapidness, good stability, strong adaptability, easiness in evidential demonstration and the like, and is concerned more recently. With the application of the novel strip-missing detection method and the novel strip-missing detection system, the strip-missing quality problem is reduced, but the strip-missing quality problem is not completely cured all the time, and almost several or even more than ten strip-missing complaints appear in a cigarette factory every year, so that the brand image of an enterprise is negatively influenced. Further study on a machine vision type strip missing detection method is needed, and the problem of strip missing quality of cigarette packets is effectively avoided.
Disclosure of Invention
In order to solve the technical problems, the invention aims to provide an intelligent detection method for cigarette packet missing strip of a carton sealing machine based on similarity analysis and feature increment learning, which realizes effective characterization and quantification of picture feature information; by means of feature increment learning of online recognition of pictures without missing strips, the threshold value of the similarity index is continuously updated, the quality defect of the tobacco packet missing strips is accurately judged, and an information basis is provided for missing strip evidences through picture marking.
In order to achieve the purpose, the invention adopts the following technical scheme:
the intelligent detection method for cigarette packet missing of the carton sealing machine based on similarity analysis and feature increment learning comprises the following steps:
(1) image graying and active area selection
Based on the front and rear imaging devices added on the carton sealing machine, when the push plate pushes the front 25 cigarettes into the carton completely, a front picture OF (N) is obtainedof×MofX 3) when the back 25 cigarettes are all pushed into the carton push plate to return, a back bitmap OB (N) is obtainedob×MobX 3) of the front and rear pictures into a gray image GF (N)of×Mof) And GB (N)ob×Mob) Because the shooting angles of the front picture and the rear picture are relatively fixed aiming at a certain carton sealing machine, in order to quickly identify the effective area of the cigarette packet, the method of manually marking the effective area of the cigarette packet is adopted to respectively obtain the coordinates (X) of the upper left corners of the front picture and the rear picturef、xb) Upper left corner Y-axis coordinate (Y)f、yb) Width (w)f、wb) Height (h)f、hb) Waiting for 8 parameters to obtain a gray image PF (N) of the effective area of the tobacco balepf×Mpf) And PB (N)pb×Mpb);
(2) Similarity analysis based on blocking idea
Based on the gray level image of the effective area of the cigarette packet of the preceding picture, equally dividing the gray level image into 5 blocks according to the height of the image to obtain 5 lines of sub-images XPFi(Nxpf×Mpf) (i-1, …,5), calculate each sub-image matrix XPFiMean value of column vectors, obtaining vector XMPF of 5 rows of sub-imagesi(1×Mpf) Calculating the similarity (rho) between every two adjacent rows by using the Pearson correlation coefficientf12、ρf23、ρf34、ρf45) (ii) a Equally dividing the gray image based on the front picture cigarette packet effective area into 5 blocks according to the width of the image to obtain 5 columns of sub-images YPFi(Npf×Mypf) (i 1, …,5), each sub-image matrix YPF is calculatediObtaining the vector YMPF of 5 columns of sub-images by averaging the row vectorsi(NpfX 1), calculating the similarity (rho ') between every two adjacent columns by using Pearson correlation coefficient'f12、ρ′f23、ρ′f34、ρ′f45);
Calculating the bitmap cigarette carton by the same methodSimilarity (p) between every two adjacent lines of the active area gray scale imageb12、ρb23、ρb34、ρb45) And a similarity (ρ'b12、ρ′b23、ρ′b34、ρ′b45);
(3) Modeling picture threshold calculation based on kernel density estimation
A similarity row vector rho can be calculated according to a front bit picture and a rear bit picture of a cigarette packet1In turn from rhof12、ρf23、ρf34、ρf45、ρ′f12、ρ′f23、ρ′f34、ρ′f45、ρb12、ρb23、ρb34、ρb45、ρ′b12、ρ′b23、ρ′b34、ρ′b45Elemental composition, collecting NoCalculating the similarity row vector rho of each cigarette packetj(1×16)(j=1,…,No) Form a similarity matrixAiming at each row of data of the matrix, determining the distribution characteristics of the data by adopting a kernel density estimation method because the distribution condition of the data is unknown, and calculating to obtain a kernel density curve corresponding to each row; taking the similarity data at the leftmost side (namely, the minimum similarity) in the nuclear density curve as a threshold corresponding to the position in the modeling image to obtain a threshold vector theta (1 × 16);
(4) tobacco bale picture on-line identification based on similarity
Re-collecting front picture OF OF cigarette packetTAnd a back bit slice OBTConvert it into a gray image GFTAnd GBTRespectively obtaining gray front image PF of effective area of tobacco bale based on the coordinates of effective area of front image and rear image recognized in advanceTAnd a back picture PBTThe gray front image PFTDividing lines according to the height of the image, and calculating the similarity rho between adjacent linestf12、ρtf23、ρtf34、ρtf45Then, the image is divided into columns according to the image width, and the similarity ρ 'between adjacent columns is calculated'tf12、ρ′tf23、ρ′tf34、ρ′tf45Comparing the calculated 8 similarity indexes with the first 8 elements of the threshold vector theta one by one, if all the similarity indexes are larger than the corresponding elements of the threshold vector theta, identifying that the front image has no missing bars and performing corresponding marking on the image, otherwise identifying that the front image has missing bars and performing corresponding marking on the image, and identifying the gray level back image PB by adopting the same methodTWhether the strip is missing or not;
(5) feature incremental learning based threshold updating
For the tobacco bale image without the missing strips, after the identification by the technologist, the similarity row vector rho representing the tobacco bale image characteristicsTAdding the obtained similarity matrix into the existing similarity matrix R based on the updated similarity matrixRecalculating to obtain a kernel density curve corresponding to each column, taking the leftmost (i.e. the smallest similarity) similarity data in the kernel density curves as the latest threshold corresponding to the position, and obtaining an updated threshold vector thetaT(1×16)。
The invention provides an intelligent detection method for cigarette packet strip missing of a carton sealing machine based on similarity analysis and feature increment learning, which comprises an offline modeling stage and an online identification stage. An off-line modeling stage: carrying out gray level transformation and image segmentation on tobacco bale internal front and rear position picture sheets collected by front and rear imaging devices of a cigarette pack of a carton sealing machine, calculating 16 characteristic similarity indexes of a modeling picture by adopting a picture transverse and longitudinal blocking similarity analysis method, and determining a threshold value of 16 characteristics of the modeling picture by utilizing a kernel density estimation method. And (3) an online identification stage: and calculating the front position and the rear position of the cigarette carton in the currently acquired cigarette packet in real time by adopting a similarity analysis method of horizontal and vertical partitioning, acquiring 16 characteristic similarity indexes of the current picture, and identifying whether the front position and the rear position have carton defects or not by comparing the similarity indexes with a current threshold value. And for the tobacco bale images which are not stripped on line, after the identification by process personnel, adding the similarity row vector which represents the tobacco bale image characteristics to the existing similarity matrix, and updating the threshold value by using a kernel density estimation method.
The invention has the beneficial effects that: the invention provides an intelligent detection method for cigarette packet strip shortage of a carton sealing machine based on similarity analysis and characteristic increment learning, aiming at the problem that the quality defect of the cigarette packet strip shortage occasionally occurs and based on front and rear pictures of cigarette strips in the cigarette packet, which are acquired by front and rear imaging devices of the cigarette packet of the carton sealing machine. Effective characterization and quantification of picture characteristic information are realized through the horizontal and vertical block division of the front bit and the rear bit picture and the similarity index calculation between the blocks; by means of feature increment learning of online recognition of pictures without missing strips, the threshold value of the similarity index is continuously updated, the quality defect of the tobacco packet missing strips is accurately judged, and an information basis is provided for missing strip evidences through picture marking.
Drawings
Fig. 1 is a flow chart of an intelligent detection method for tobacco bale strip missing of a carton sealing machine based on similarity analysis and feature increment learning;
FIG. 2 is an original image of the front and back of a tobacco rod inside a certain cigarette packet;
FIG. 3 is a gray scale image of the front and rear positions of the tobacco rod inside the cigarette packet after gray scale conversion;
FIG. 4 is a tobacco bale effective area gray level image after image segmentation;
FIG. 5 is a graph of kernel density corresponding to 16 similarity indicators for the anterior and posterior images;
FIG. 6 is a diagram illustrating an on-line recognition of a previous original image without a missing bar and a recognized annotation image;
FIG. 7 is a diagram illustrating an on-line recognition of a posterior original image without missing bars and a recognized annotation image;
FIG. 8 is a diagram illustrating an on-line recognition of a previous original image with a missing bar and a recognized annotation image;
FIG. 9 is a diagram illustrating an on-line identification of a post-original image with a missing bar and an identified annotation image.
Detailed Description
In order to better understand the technical scheme of the invention, the following description is further provided for the embodiment of the invention with the accompanying drawings. The implementation is an intelligent detection method for carton missing of a carton sealing machine cigarette packet, and the carton missing detection system of the carton sealing machine cigarette packet comprises a control PLC, front and rear cameras, front and rear light sources, a carton missing identification algorithm and the like. In the process that the front 25 cigarettes and the rear 25 cigarettes are pushed into the packing box by the push plate, when all the front 25 cigarettes enter the packing box, the front camera takes a picture; after the back 25 cigarettes are all pushed into the packing box, the lower part of the push plate is turned upwards in the process of returning the push plate, and at the moment, the back camera takes a picture. And (3) adopting image similarity analysis and feature increment learning technology to collect and judge whether the front and rear bitmap sheets of the tobacco strips in the tobacco bale have strip-lacking quality defects in real time. If the defective strip quality exists, sending a removing instruction to a defective strip removing control system; and if the strip-missing quality defect does not exist, sending a quality qualified signal to a quality tracing code pasting system. The implementation block diagram of the intelligent detection method for cigarette packet missing strip of the carton sealing machine based on similarity analysis and feature increment learning is shown in figure 1, and the method mainly comprises the following steps:
(1) image graying and active area selection
Based on the front and rear imaging devices added on the carton sealing machine, when the push plate pushes the front 25 cigarettes into the carton completely, a front picture OF (N) is obtainedof×MofX 3) when the back 25 cigarettes are all pushed into the carton push plate to return, a back bitmap OB (N) is obtainedob×MobX 3) of the front and rear pictures into a gray image GF (N)of×Mof) And GB (N)ob×Mob). As the shooting angles of the front picture and the rear picture are relatively fixed aiming at a certain carton sealing machine, in order to quickly identify the effective area of the cigarette packet, the method of manually marking the effective area of the cigarette packet is adopted to respectively obtain the coordinates (X) of the upper left corners of the front picture and the rear picturef、xb) Upper left corner Y-axis coordinate (Y)f、yb) Width (w)f、wb) Height (h)f、hb) Waiting for 8 parameters to obtain a gray image PF (N) of the effective area of the tobacco balepf×Mpf) And PB (N)pb×Mpb)。
In this example, the front and back original pictures OF the tobacco rod inside a certain cigarette packet are shown in fig. 2, and the matrices OF the original pictures are OF (652 × 738 × 3) and OB (652 × 738 × 3), respectively. The grayscale images after the grayscale conversion are represented by grayscale image matrices GF (652 × 738) and GB (652 × 738) in fig. 3. The effective area of the front gray level image of the artificial mark is as follows: upper left corner X-axis coordinate XfIs 121, upper left corner Y axis coordinate YfIs 196 and has a width wfIs 550 and the height hfIs 290; the effective area of the rear gray level image is as follows: upper left corner X-axis coordinate XbIs 131, upper left corner Y-axis coordinate YbIs 280 and width wbIs 470 and the height hbIs 245. Fig. 4 shows a gray scale image of the effective area of the cigarette packet, and gray scale image matrices PF (290 × 550) and PB (245 × 470) of the effective area.
(2) Similarity analysis based on blocking idea
Based on the gray level image of the effective area of the cigarette packet of the preceding picture, equally dividing the gray level image into 5 blocks according to the height of the image to obtain 5 lines of sub-images XPFi(Nxpf×Mpf) (i-1, …,5), calculate each sub-image matrix XPFiMean value of column vectors, obtaining vector XMPF of 5 rows of sub-imagesi(1×Mpf) Calculating the similarity (rho) between every two adjacent rows by using the Pearson correlation coefficientf12、ρf23、ρf34、ρf45) The calculation formula is as follows:
cov (XMPF)i,XMPFi+1) Representing two adjacent row vectors XMPFiAnd XMPFi+1The covariance of (a) of (b),respectively represent vectors XMPFi、XMPFi+1Standard deviation of (2).
Equally dividing the gray image based on the front picture cigarette packet effective area into 5 blocks according to the width of the image to obtain 5 columns of sub-images YPFi(Npf×Mypf) (i 1, …,5), each sub-image matrix YPF is calculatediObtaining the vector YMPF of 5 columns of sub-images by averaging the row vectorsi(NpfX 1), calculating the similarity (rho ') between every two adjacent columns by using Pearson correlation coefficient'f12、ρ′f23、ρ′f34、ρ′f45)。
Calculating the similarity (rho) between every two adjacent rows of the effective area gray level image of the bitmap tobacco lamina package by adopting the same methodb12、ρb23、ρb34、ρb45) And a similarity (ρ'b12、ρ′b23、ρ′b34、ρ′b45)。
In this example, the 5 lines of sub-images of the gray scale image of the effective area of the cigarette packet in the front picture are XPFi(58X 550), by calculation XPFiObtaining the vector of the sub-image of 5 rows by the mean value of the column vectors as XMPFi(1 × 550), degree of similarity ρ between each two adjacent rowsf12、ρf23、ρf34、ρf450.9181, 0.9375, 0.9472, 0.8916, respectively. 5 columns of sub-images of the gray scale image of the effective area of the front picture cigarette packet are YPFsi(290X 110) by calculating YPFiThe vector of 5 columns of sub-images obtained by the mean value of the row vectors is YMPFi(290 × 1), similarity ρ 'between each two adjacent columns'f12、ρ′f23、ρ′f34、ρ′f450.7799, 0.8350, 0.9184, 0.9218, respectively.
The 5 lines of subimages of the effective area gray level image of the back bitmap chip tobacco bale are XPBi(49X 470) by calculating XPBiObtaining the vector of 5 lines of sub-images as XMPB by the mean value of the column vectorsi(1 × 470), the degree of similarity ρ between each two adjacent rowsb12、ρb23、ρb34、ρb450.9825, 0.9322, 0.9472, 0.9602, respectively. 5 columns of sub-images of the effective area gray scale image of the back bitmap film tobacco package are YPBi(245X 94), by calculating YPBiThe vector of 5 columns of sub-images obtained by the mean value of the row vectors is YMPBi(245 x 1), similarity ρ 'between each two adjacent columns'b12、ρ′b23、ρ′b34、ρ′b450.7457, 0.6217, 0.8400, 0.9247, respectively.
(3) Modeling picture threshold calculation based on kernel density estimation
A similarity row vector rho can be calculated according to a front bit picture and a rear bit picture of a cigarette packet1In turn from rhof12、ρf23、ρf34、ρf45、ρ′f12、ρ′f23、ρ′f34、ρ′f45、ρb12、ρb23、ρb34、ρb45、ρ′b12、ρ′b23、ρ′b34、ρ′b45And (3) element composition. Collecting NoCalculating the similarity row vector rho of each cigarette packetj(1×16)(j=1,…,No) Form a similarity matrixAnd aiming at each row of data of the matrix, determining the distribution characteristics of the data by adopting a kernel density estimation method because the distribution condition of the data is unknown, and calculating to obtain a kernel density curve corresponding to each row. The kernel density estimation calculation formula in column k is as follows:
where K (-) is a Gaussian kernel function, ρjkIs a similarity index of the jth row and kth column of the similarity matrix R, NoFor modeling the number of pictures, h is the window width, when h is smaller, the nuclear density estimation curve can reflect more details but has poorer smoothness, and when h is larger, the nuclear density estimation curve is smoother but can cover some details.
The similarity data at the leftmost side (i.e., the minimum similarity) in the kernel density curve is used as a threshold corresponding to the position in the modeled image, and a threshold vector θ (1 × 16) is obtained.
In this example, a front bitmap of 130 groups of cigarette packets without strip missing is collectedCalculating similarity row vector rho of each tobacco packet by using the sheet and the rear bitmap sheetj(1 × 16), a similarity matrix R (130 × 16) is constructed. And aiming at each row of data of the matrix, selecting a window width h as 3, calculating a kernel density curve of each row according to a kernel density estimation calculation formula, wherein 16 similarity indexes correspond to the kernel density curve and are shown in fig. 4.
The similarity data at the leftmost side (i.e., the minimum similarity) in the nuclear density curve is used as a threshold corresponding to the position in the modeled image, and a threshold vector θ (1 × 16) is obtained, and 16 elements of the threshold vector θ are 0.8477, 0.8397, 0.8139, 0.8246, 0.6315, 0.6740, 0.7602, 0.7621, 0.9572, 0.8831, 0.9122, 0.9096, 0.5443, 0.5367, 0.7551, and 0.8267.
(4) Tobacco bale picture on-line identification based on similarity
Re-collecting front picture OF OF cigarette packetTAnd a back bit slice OBTConvert it into a gray image GFTAnd GBT. Respectively obtaining gray front image PF of effective area of tobacco bale based on the coordinates of effective areas of front image and rear image which are recognized in advanceTAnd a back picture PBT. PF (front gray level) imageTDividing lines according to the height of the image, and calculating the similarity rho between adjacent linestf12、ρtf23、ρtf34、ρtf45Then, the image is divided into columns according to the image width, and the similarity ρ 'between adjacent columns is calculated'tf12、ρ′tf23、ρ′tf34、ρ′tf45. And comparing the 8 similarity indexes obtained by calculation with the first 8 elements of the threshold vector theta one by one, if all the similarity indexes are greater than the corresponding elements of the threshold vector theta, identifying that the front image has no missing bars and carrying out corresponding marking on the image, and otherwise, identifying that the front image has missing bars and carrying out corresponding marking on the image. Identifying a grayscale post-image PB using the same methodTWhether the strip missing occurs.
In this example, the front images and the rear images of 1 group of cigarette packets without missing strips are collected again for online identification, and the original front image is shown in fig. 6 (a). Gray level image matrix PF of effective area obtained by gray level transformation and image segmentationT1(290 × 550), PF is calculatedT18 similarity indexes ρtf12、ρtf23、ρtf34、ρtf45、ρ′tf12、ρ′tf23、ρ′tf34、ρ′tf45Respectively as follows: 0.9028, 0.8716, 0.9407, 0.8638, 0.8168, 0.8085, 0.8457, 0.8888. The 8 similarity indexes are all larger than the first 8 elements of the threshold vector theta (1 × 16), the previous picture is identified that the missing bar does not appear, and the picture is labeled correspondingly, as shown in fig. 6 (b).
The original posterior image is shown in fig. 7 (a). Obtaining a gray image matrix PB of an active area by gray conversion and image segmentationT1(245X 470) to calculate PBT18 similarity indexes ρtb12、ρtb23、ρtb34、ρtb45、ρ′tb12、ρ′tb23、ρ′tb34、ρ′tb45Respectively as follows: 0.9768, 0.9272, 0.9548, 0.9514, 0.7241, 0.6833, 0.8539, 0.9264. The 8 similarity indexes are all larger than the last 8 elements of the threshold vector theta (1 × 16), the fact that the back bitmap slice has no missing bars is identified, and corresponding labeling is performed on the picture, as shown in fig. 7 (b).
And then, the image of the front cigarette rod in 1 group of cigarette packets is collected again for online identification, and the original front image is shown in fig. 8 (a). Gray level image matrix PF of effective area obtained by gray level transformation and image segmentationT2(290 × 550), PF is calculatedT28 similarity indexes ρtf12、ρtf23、ρtf34、ρtf45、ρ′tf12、ρ′tf23、ρ′tf34、ρ′tf45Respectively as follows: 0.4856, 0.9295, 0.8801, 0.9198, 0.8183, 0.8139, 0.8542, 0.6398. Among the 8 similarity indexes, ρtf12And ρ'tf45And identifying the missing bar of the previous picture when the element is smaller than the element corresponding to the threshold vector theta (1 × 16), and labeling the picture correspondingly, as shown in fig. 8 (b).
And then, the image of the back cigarette strip in 1 group of cigarette packets is collected again for online identification, and the original back image is shown in fig. 9 (a). By grey scale transformation and mappingObtaining gray image matrix PB of effective area by image divisionT2(245X 470) to calculate PBT28 similarity indexes ρtb12、ρtb23、ρtb34、ρtb45、ρ′tb12、ρ′tb23、ρ′tb34、ρ′tb45Respectively as follows: 0.8437, 0.9165, 0.9431, 0.9601, 0.5909, 0.5157, 0.8406, 0.9079. Among the 8 similarity indexes, ρtb12And ρ'tb23And identifying the elements smaller than the threshold vector theta (1 × 16), and labeling the picture correspondingly, as shown in fig. 9 (b).
(5) Feature incremental learning based threshold updating
For the tobacco bale image without the missing strips, after the identification by the technologist, the similarity row vector rho representing the tobacco bale image characteristicsTAdding the obtained similarity matrix into the existing similarity matrix R based on the updated similarity matrixThe kernel density curve corresponding to each column is recalculated. Taking the similarity data at the leftmost side (namely, the similarity is minimum) in the nuclear density curve as the latest threshold corresponding to the position, and obtaining an updated threshold vector thetaT(1×16)。
In this example, the front picture and the rear picture of 10 groups of cigarette packets without the occurrence of the missing carton are collected again for online identification, and the occurrence of the missing carton is identified. The similarity row vector rho of the 10 groups of non-missing tobacco bale image features is representedT1,…,ρT10And adding the similarity matrix R to the existing similarity matrix R in sequence. Selecting the window width h as 3, recalculating the kernel density curve of each row by adopting kernel density estimation, and obtaining an updated threshold vector thetaT(1 × 16), 16 elements of which are 0.8466, 0.8390, 0.8116, 0.8222, 0.6297, 0.6771, 0.7608, 0.7625, 0.9568, 0.8831, 0.9128, 0.9104, 0.5408, 0.5375, 0.7550, 0.8273, respectively.
It should be noted that the above embodiments are merely representative examples of the present invention. Many variations of the invention are possible. Any simple modification, equivalent change and modification of the above embodiments according to the spirit of the present invention should be considered to be within the protection scope of the present invention.
Claims (1)
1. The intelligent detection method for cigarette packet missing of the carton sealing machine based on similarity analysis and feature increment learning is characterized by comprising the following steps of:
(1) image graying and active area selection
Based on a front imaging device and a rear imaging device which are additionally arranged on a carton sealing machine, when a push plate pushes all the front 25 cigarettes into a carton, a front picture OF is obtained, when a push plate pushes all the rear 25 cigarettes into the carton push plate to return, a rear picture OB is obtained, and color RGB images OF the front picture and the rear picture are converted into gray level images GF and GB;
(2) similarity analysis based on blocking idea
Based on the gray level image of the effective area of the cigarette packet of the preceding picture, equally dividing the gray level image into 5 blocks according to the height of the image to obtain 5 lines of sub-images XPFi1, 5, calculate each sub-image matrix XPFiMean value of column vectors, obtaining vector XMPF of 5 rows of sub-imagesiCalculating the similarity rho between every two adjacent lines by using the Pearson correlation coefficientf12、ρf23、ρf34、ρf45(ii) a Equally dividing the gray image based on the front picture cigarette packet effective area into 5 blocks according to the width of the image to obtain 5 columns of sub-images YPFiI 1, …,5, calculating the respective sub-image matrix YPFiObtaining the vector YMPF of 5 columns of sub-images by averaging the row vectorsiCalculating the similarity rho 'between every two adjacent columns by using Pearson correlation coefficients'f12、ρ′f23、ρ′f34、ρ′f45;
Calculating the effective area of the bitmap cigarette carton package by adopting the same methodSimilarity rho between every two adjacent lines of the domain gray imageb12、ρb23、ρb34、ρb45And a similarity ρ 'between each two adjacent columns'b12、ρ′b23、ρ′b34、ρ′b45;
(3) Modeling picture threshold calculation based on kernel density estimation
A similarity row vector rho can be calculated according to a front bit picture and a rear bit picture of a cigarette packet1In turn from rhof12、ρf23、ρf34、ρf45、ρ′f12、ρ′f23、ρ′f34、ρ′f45、ρb12、ρb23、ρb34、ρb45、ρ′b12、ρ′b23、ρ′b34、ρ′b45Elemental composition, collecting NoCalculating the similarity row vector rho of each cigarette packetj,j=1,…,NoForm a similarity matrixAiming at each row of data of the matrix, determining the distribution characteristics of the data by adopting a kernel density estimation method because the distribution condition of the data is unknown, and calculating to obtain a kernel density curve corresponding to each row; taking the similarity data at the leftmost side in the nuclear density curve as a threshold value of a corresponding position in a modeling image to obtain a threshold value vector theta;
(4) tobacco bale picture on-line identification based on similarity
Re-collecting front picture OF OF cigarette packetTAnd a back bit slice OBTConvert it into a gray image GFTAnd GBTRespectively obtaining gray front image PF of effective area of tobacco bale based on the coordinates of effective area of front image and rear image recognized in advanceTAnd a back picture PBTThe gray front image PFTDividing lines according to the height of the image, and calculating the similarity rho between adjacent linestf12、ρtf23、ρtf34、ρtf45According to the image widthDividing columns, and calculating the similarity rho 'between adjacent columns'tf12、ρ′tf23、ρ′tf34、ρ′tf45Comparing the calculated 8 similarity indexes with the first 8 elements of the threshold vector theta one by one, if all the similarity indexes are larger than the corresponding elements of the threshold vector theta, identifying that the front image has no missing bars and performing corresponding marking on the image, otherwise identifying that the front image has missing bars and performing corresponding marking on the image, and identifying the gray level back image PB by adopting the same methodTWhether the strip is missing or not;
(5) feature incremental learning based threshold updating
For the tobacco bale image without the missing strips, after the identification by the technologist, the similarity row vector rho representing the tobacco bale image characteristicsTAdding the obtained similarity matrix into the existing similarity matrix R based on the updated similarity matrixRecalculating to obtain a nuclear density curve corresponding to each column, taking the leftmost similarity data in the nuclear density curve as the latest threshold of the corresponding position, and obtaining an updated threshold vector thetaT。
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201811107992.2A CN109493316B (en) | 2018-09-21 | 2018-09-21 | Intelligent detection method for cigarette packet missing strip of carton sealing machine based on similarity analysis and feature increment learning |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201811107992.2A CN109493316B (en) | 2018-09-21 | 2018-09-21 | Intelligent detection method for cigarette packet missing strip of carton sealing machine based on similarity analysis and feature increment learning |
Publications (2)
Publication Number | Publication Date |
---|---|
CN109493316A CN109493316A (en) | 2019-03-19 |
CN109493316B true CN109493316B (en) | 2021-06-15 |
Family
ID=65689401
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201811107992.2A Active CN109493316B (en) | 2018-09-21 | 2018-09-21 | Intelligent detection method for cigarette packet missing strip of carton sealing machine based on similarity analysis and feature increment learning |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN109493316B (en) |
Families Citing this family (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN111806803A (en) * | 2019-04-10 | 2020-10-23 | 红塔烟草(集团)有限责任公司 | Packagine machine barrel is glued some defect imaging detecting system |
CN114446416B (en) * | 2022-01-28 | 2023-01-31 | 上海智佴智能科技有限公司 | Intelligent tour house inquiry robot |
Citations (11)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
KR20070002443A (en) * | 2005-06-30 | 2007-01-05 | 브리티쉬 아메리칸 토바코 코리아 (주) | System for sensing missing cigarette pack and imperfect cigarette pack, and method therefor |
WO2013026504A1 (en) * | 2011-08-22 | 2013-02-28 | Focke & Co. (Gmbh & Co. Kg) | Method and apparatus for checking bar‑shaped tobacco products |
EP2605212A2 (en) * | 2011-12-12 | 2013-06-19 | Focke & Co. (GmbH & Co. KG) | Method and apparatus for optically testing of objects to be tested in the production and/or packaging of cigarettes |
CN103512888A (en) * | 2013-06-05 | 2014-01-15 | 北京化工大学 | Cigarette packet seal defect detecting system based on image identification technology |
CN203902927U (en) * | 2014-04-11 | 2014-10-29 | 龙岩烟草工业有限责任公司 | Self-diagnosis system of case packing carton lack detection device |
CN204037961U (en) * | 2014-08-13 | 2014-12-24 | 河南中烟工业有限责任公司 | There is the small box transparent paper packaging machine that soft box cigarette packet seal disappearance detects removing function |
CN105512672A (en) * | 2015-11-24 | 2016-04-20 | 云南中烟工业有限责任公司 | Star graph identification method for cigarette quality characteristics |
CN106770303A (en) * | 2017-03-31 | 2017-05-31 | 河南农业大学 | Cigarette shreds structure characterization methods based on graphical analysis |
CN107117358A (en) * | 2017-06-30 | 2017-09-01 | 红云红河烟草(集团)有限责任公司 | Strip missing detection device and detection method for box filling and sealing machine |
CN107169961A (en) * | 2017-05-15 | 2017-09-15 | 中烟追溯(北京)科技有限公司 | A kind of cigarette sorting detecting system and method based on CIS IMAQs |
CN108100343A (en) * | 2017-12-19 | 2018-06-01 | 中国电子科技集团公司第四十研究所 | A kind of cigarette bag automatic positioning method applied to FOCKE packing machines of optimization |
-
2018
- 2018-09-21 CN CN201811107992.2A patent/CN109493316B/en active Active
Patent Citations (11)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
KR20070002443A (en) * | 2005-06-30 | 2007-01-05 | 브리티쉬 아메리칸 토바코 코리아 (주) | System for sensing missing cigarette pack and imperfect cigarette pack, and method therefor |
WO2013026504A1 (en) * | 2011-08-22 | 2013-02-28 | Focke & Co. (Gmbh & Co. Kg) | Method and apparatus for checking bar‑shaped tobacco products |
EP2605212A2 (en) * | 2011-12-12 | 2013-06-19 | Focke & Co. (GmbH & Co. KG) | Method and apparatus for optically testing of objects to be tested in the production and/or packaging of cigarettes |
CN103512888A (en) * | 2013-06-05 | 2014-01-15 | 北京化工大学 | Cigarette packet seal defect detecting system based on image identification technology |
CN203902927U (en) * | 2014-04-11 | 2014-10-29 | 龙岩烟草工业有限责任公司 | Self-diagnosis system of case packing carton lack detection device |
CN204037961U (en) * | 2014-08-13 | 2014-12-24 | 河南中烟工业有限责任公司 | There is the small box transparent paper packaging machine that soft box cigarette packet seal disappearance detects removing function |
CN105512672A (en) * | 2015-11-24 | 2016-04-20 | 云南中烟工业有限责任公司 | Star graph identification method for cigarette quality characteristics |
CN106770303A (en) * | 2017-03-31 | 2017-05-31 | 河南农业大学 | Cigarette shreds structure characterization methods based on graphical analysis |
CN107169961A (en) * | 2017-05-15 | 2017-09-15 | 中烟追溯(北京)科技有限公司 | A kind of cigarette sorting detecting system and method based on CIS IMAQs |
CN107117358A (en) * | 2017-06-30 | 2017-09-01 | 红云红河烟草(集团)有限责任公司 | Strip missing detection device and detection method for box filling and sealing machine |
CN108100343A (en) * | 2017-12-19 | 2018-06-01 | 中国电子科技集团公司第四十研究所 | A kind of cigarette bag automatic positioning method applied to FOCKE packing machines of optimization |
Non-Patent Citations (5)
Title |
---|
Detection of Cigarette Missing in Packing Based on Deep Convolutional Neural Network;Wei Ying 等;《2017 IEEE 3rd information technology and mechatronics engineering conference》;20171201;1252-1256 * |
YP13 型装封箱机缺条视觉检测系统设计;蔡培良 等;《包装工程》;20170630;第38卷(第11期);92-96 * |
卷烟制叶丝段批次过程的多阶段分布式监测与异常诊断;王伟 等;《烟草科技》;20180228;第51卷(第2期);69-76 * |
图像处理技术在卷烟包装过程中的应用与发展;王伟;《中国新技术产品》;20161231(第2期);19 * |
机器视觉检测技术在烟箱缺条检测方面的运用;吴忠云 等;《电气与自动化》;20141231;第43卷(第6期);188-190,200 * |
Also Published As
Publication number | Publication date |
---|---|
CN109493316A (en) | 2019-03-19 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN110059694B (en) | Intelligent identification method for character data in complex scene of power industry | |
CN108918536B (en) | Tire mold surface character defect detection method, device, equipment and storage medium | |
CN109919934A (en) | A kind of liquid crystal display panel defect inspection method based on the study of multi-source domain depth migration | |
WO2020052352A1 (en) | Method and device for damage segmentation of vehicle damage image | |
CN107977686B (en) | Industrial X-ray image classification method | |
CN109886947A (en) | The high-tension bus-bar defect inspection method of convolutional neural networks based on region | |
CN113850749B (en) | Method for training defect detector | |
CN113205511B (en) | Electronic component batch information detection method and system based on deep neural network | |
CN110310305B (en) | Target tracking method and device based on BSSD detection and Kalman filtering | |
CN112215125A (en) | Water level identification method based on YOLOv3 | |
CN111127417B (en) | Printing defect detection method based on SIFT feature matching and SSD algorithm improvement | |
CN111832410B (en) | Forward train detection method based on fusion of vision and laser radar | |
CN113870267B (en) | Defect detection method, defect detection device, computer equipment and readable storage medium | |
CN109493316B (en) | Intelligent detection method for cigarette packet missing strip of carton sealing machine based on similarity analysis and feature increment learning | |
CN111126393A (en) | Vehicle appearance refitting judgment method and device, computer equipment and storage medium | |
CN113592839B (en) | Distribution network line typical defect diagnosis method and system based on improved fast RCNN | |
CN113963154A (en) | Method, system, storage medium and equipment for detecting gas leakage of VOCs (volatile organic compounds) based on Faster R-CNN (fast R-CNN) | |
CN114241469A (en) | Information identification method and device for electricity meter rotation process | |
CN117215327A (en) | Unmanned aerial vehicle-based highway inspection detection and intelligent flight control method | |
CN116385353A (en) | Camera module abnormality detection method | |
CN113343782B (en) | Expressway sign label detection method based on unmanned aerial vehicle remote sensing | |
CN117635603B (en) | System and method for detecting on-line quality of hollow sunshade product based on target detection | |
CN113936291A (en) | Aluminum template quality inspection and recovery method based on machine vision | |
CN114529555A (en) | Image recognition-based efficient cigarette box in-and-out detection method | |
CN110163090B (en) | PCB (printed circuit board) identification tracking method based on multi-feature and scale estimation |
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 |