CN109657724B - Parallel computing-based method for rapidly computing characteristic parameters of grooved filter sticks - Google Patents

Parallel computing-based method for rapidly computing characteristic parameters of grooved filter sticks Download PDF

Info

Publication number
CN109657724B
CN109657724B CN201811574987.2A CN201811574987A CN109657724B CN 109657724 B CN109657724 B CN 109657724B CN 201811574987 A CN201811574987 A CN 201811574987A CN 109657724 B CN109657724 B CN 109657724B
Authority
CN
China
Prior art keywords
image
grooves
parameters
connected domain
theta
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
CN201811574987.2A
Other languages
Chinese (zh)
Other versions
CN109657724A (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.)
China Tobacco Zhejiang Industrial Co Ltd
Original Assignee
China Tobacco Zhejiang Industrial 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 China Tobacco Zhejiang Industrial Co Ltd filed Critical China Tobacco Zhejiang Industrial Co Ltd
Priority to CN201811574987.2A priority Critical patent/CN109657724B/en
Publication of CN109657724A publication Critical patent/CN109657724A/en
Application granted granted Critical
Publication of CN109657724B publication Critical patent/CN109657724B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F18/00Pattern recognition
    • G06F18/20Analysing
    • G06F18/23Clustering techniques
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/20Image preprocessing
    • G06V10/28Quantising the image, e.g. histogram thresholding for discrimination between background and foreground patterns
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/40Extraction of image or video features
    • G06V10/44Local feature extraction by analysis of parts of the pattern, e.g. by detecting edges, contours, loops, corners, strokes or intersections; Connectivity analysis, e.g. of connected components

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • Data Mining & Analysis (AREA)
  • General Physics & Mathematics (AREA)
  • Multimedia (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Bioinformatics & Cheminformatics (AREA)
  • Evolutionary Computation (AREA)
  • Evolutionary Biology (AREA)
  • General Engineering & Computer Science (AREA)
  • Bioinformatics & Computational Biology (AREA)
  • Artificial Intelligence (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Image Analysis (AREA)
  • Image Processing (AREA)

Abstract

The invention relates to a parallel computing-based method for quickly computing characteristic parameters of a grooved filter stick. The processing flow of the method comprises four parts of image preprocessing, image cutting, multi-thread parallel computing and data clustering analysis. Firstly, preprocessing such as gray scale, binaryzation, denoising and the like is carried out on the image, and a good preprocessed image is obtained. And secondly, performing image segmentation on the preprocessed image, and dividing the image into four images along the horizontal and vertical directions. And thirdly, creating a thread pool on the program, generating 4 threads, and delivering each pair of threads to a single thread for corrosion expansion operation and parameter calculation. And fourthly, performing cosine similarity clustering analysis on the data obtained by the four threads, and summarizing the data into final data. According to the method, the characteristic parameters of the grooved filter stick can be acquired more quickly and accurately.

Description

Parallel computing-based method for rapidly computing characteristic parameters of grooved filter sticks
Technical Field
The invention relates to a parallel computing-based method for quickly computing characteristic parameters of a grooved filter stick.
Background
The acetate fiber groove filter stick is a common filter stick applied to tar reduction and harm reduction of middle-grade and high-grade cigarettes at present, has the common quality parameters of length, circumference, roundness and the like of the conventional filter stick, and also has the specific parameters of the number of grooves, the depth of the grooves, the area of the grooves and the like, and the parameters have very important influence on the tar and nicotine filtering effect of the conventional filter stick. At present, for the detection of the grooved filter stick, a related detection standard exists, a plurality of detection methods are adopted based on the standard, a digitalized image processing technology is utilized, the surface image of the measured filter stick is shot through an industrial camera or an optical microscope, and the accurate extraction, analysis and calculation are carried out aiming at the image. At present, two modes of image extraction exist, one mode is manual combination, the problem of large error exists in manual extraction, and the other mode is that useful image information is automatically extracted by utilizing an image processing technology, for example, the determination method of the characteristic parameters of the acetate fiber groove filter stick is proposed by the Laoyao, the Hongdong quest and the like, and the parameters are 5-8 in the tobacco science and technology, 2010 (4).
At present, the detection method of the acetate fiber grooved filter stick is mature, but certain problems exist, such as inaccurate detection of the number of grooves. In practical inspection, it is found that if a single trench hole image is relatively loose, as shown in fig. 1 and 2, the inspection procedure is easily recognized as a plurality of trench holes or no trench hole, which results in inaccurate trench hole number.
Disclosure of Invention
In order to solve the technical problems, the invention aims to provide a method for quickly calculating characteristic parameters of a grooved filter stick based on parallel calculation, which can effectively improve the running speed and the calculation accuracy of a program.
In order to achieve the purpose, the invention adopts the following technical scheme:
a rapid calculation method for characteristic parameters of a grooved filter stick based on parallel calculation comprises the following steps:
1) carrying out graying, binarization and median filtering on the obtained end face image of the groove filter stick to finish the preprocessing operation of the image to obtain a preprocessed image;
2) the preprocessed image is divided horizontally and vertically, the preprocessed image is divided horizontally into a first image and a second image, the preprocessed image is divided vertically into a third image and a fourth image, and the four images are divided into four pairs of images;
3) generating a thread pool, creating thread objects, distributing an image to each thread object, performing corrosion expansion operation on each image, extracting internal and external contour processing, and obtaining target parameters of the number of grooves, the specific surface area, the depth of the grooves, the uniformity of the grooves and the regularity of each connected domain and an angular coordinate parameter of the mass center of each connected domain so as to facilitate next clustering operation, wherein the angular coordinate parameters and the target parameters of the number of the grooves, the specific surface area, the depth of the grooves, the uniformity of the grooves and the regularity are in one-to-one correspondence;
4) and performing clustering operation by adopting a cosine similarity method:
assembling the connected domain centroid angular coordinate parameters of each sub-graph into an array [ theta ]1234...]Wherein θ represents an angle of the centroid of the connected domain deviating from the X-axis, and the four arrays obtained from the first, second, third and fourth graphs are respectively:
X1=[θ1234...];X2=[θ'1,θ'2,θ'3,θ'4...];
X3=[θ"1,θ"2,θ"3,θ"4...];X4=[θ"'1,θ'"2,θ'"3,θ"'4...];
cosine similarity calculation is carried out on the connected domain in the division direction, and elements meeting the condition that theta is less than or equal to pi/6 or theta is more than or equal to 5 pi/6 in X1 are counted as XiIs mixing XiCosine similarity calculation is performed with each element of X3 and X4, respectively, as follows, | θ ═ cos (| θ)12|) find the element with the highest similarity to X3 and X4
Figure GDA0003082585540000021
Record the similar element in X3 or X4
Figure GDA0003082585540000024
And X in the sequence of X1iBy replacement with
Figure GDA0003082585540000022
Similarly, the element satisfying theta ≤ pi/6 or theta ≥ 5 pi/6 in X1 at this time is counted as XiIs mixing XiCalculating cosine similarity with each element in X2 to find out the element with highest similarity to X2
Figure GDA0003082585540000023
From the sequence X2
Figure GDA0003082585540000031
Deleting elements from the sequence, and combining the X1 and X2 arrays to obtain the finally required connected domain elements;
5) and 3), in the step 3), each centroid angular coordinate corresponds to other parameters of the connected domain one by one, so that the centroid angular coordinate array is obtained in the step 4), and finally required parameters of the number of the grooves, the specific surface area, the depth of the grooves, the uniformity of the grooves and the regularity can be obtained and displayed.
Preferably, the need for partial small-area connected regions in step 1) is eliminated, and the number of image segmentations in step 2) is determined by the hardware level.
The invention adds the expansion corrosion operation to the image on the basis of the original calculation program, and connects a plurality of small-area connected domains into a large-area connected domain by a method of expansion and corrosion after the expansion, thereby avoiding the condition of calculation omission in the actual operation. The method can effectively improve the running speed and the calculation accuracy of the program.
Drawings
FIG. 1 is a surface image of a measured filter rod according to the present invention;
FIG. 2 is an enlarged view of a portion of FIG. 1;
FIG. 3 is a first view of the present invention after horizontal cutting;
FIG. 4 is a second view of the present invention after horizontal cutting;
FIG. 5 is a third view of the present invention after vertical cutting;
FIG. 6 is a fourth view of the present invention after vertical cutting;
FIG. 7 is a schematic diagram of cosine similarity calculation according to the present invention.
Detailed Description
Reference will now be made in detail to embodiments of the present invention, examples of which are illustrated in the accompanying drawings, wherein like or similar reference numerals refer to the same or similar elements or elements having the same or similar function throughout. The embodiments described below with reference to the drawings are illustrative and intended to be illustrative of the invention and are not to be construed as limiting the invention.
A rapid calculation method for characteristic parameters of a grooved filter stick based on parallel calculation comprises the following steps:
1) firstly, carrying out graying, binarization and median filtering on the obtained end face image of the groove filter stick to finish the preprocessing operation of the image so as to obtain a preprocessed image. And removing or not removing part of the small-area connected domain selectively without influencing the subsequent contour extraction.
2) The preprocessed image is divided horizontally and vertically, the preprocessed image is divided horizontally into a first image and a second image, the preprocessed image is divided vertically into a third image and a fourth image, and the four images are divided into four pairs of images; as shown in fig. 3, 4, 5, 6. The image is divided into several parts according to specific hardware level and design requirement, a common tablet computer is a dual-core processor, each core can generate two threads, the dual-core is four threads, the image is divided into four parts, and if more processor cores are provided, more threads can be provided, and the image can be divided into more parts.
3) Generating a thread pool, creating thread objects, distributing an image to each thread object, performing corrosion expansion operation on each image, extracting internal and external contour processing, and obtaining target parameters such as the number of grooves, the specific surface area, the depth of the grooves, the uniformity of the grooves and the regularity of each connected domain and the angular coordinate parameter of the mass center of each connected domain so as to facilitate next clustering operation, wherein the angular coordinate parameters and the target parameters such as the number of the grooves, the specific surface area, the depth of the grooves, the uniformity of the grooves and the regularity are in one-to-one correspondence. The program is added with corrosion and expansion operation, mainly aiming at the situation that in the process of image identification, a plurality of groove holes are identified due to the fact that some connected domains are subdivided into a plurality of small connected domains due to some factors, and the corrosion and expansion operation is added, so that the situation that a single connected domain is identified into a plurality of connected domains can be avoided.
4) And performing clustering operation by adopting a cosine similarity method:
as shown in FIGS. 3 to 6, the connected domain centroid angular coordinate parameters of each graph are combined into an array [ theta ]1234...]Wherein θ represents an angle of the centroid of the connected domain deviating from the X-axis, and the four arrays obtained from the first, second, third and fourth graphs are respectively:
X1=[θ1234...];X2=[θ'1,θ'2,θ'3,θ'4...];
X3=[θ"1,θ"2,θ"3,θ"4...];X4=[θ"'1,θ'"2,θ'"3,θ"'4...];
in the process of segmenting the image, some connected domains in the segmenting direction are easily divided into two parts, and meanwhile, in order to reduce the calculation amount, only cosine similarity calculation needs to be carried out on the connected domains in the segmenting direction.
The cosine similarity is obtained by calculating cosine values of included angles of two vectors to judge the similarity of the two vectors, as shown in fig. 7, the cosine similarity calculation value is between [ -1,1], the closer the cosine value is to 1, the closer the directions of the two vectors are proved to be, and the higher the similarity is. In the grooved filter stick image, the distance from each communication domain to the origin in the radial direction is relatively close, which means that the higher the similarity value is, the higher the similarity is, and the more credible the similarity is.
Taking the element satisfying theta not more than pi/6 or theta not less than 5 pi/6 in X1 as XiIs mixing XiCosine similarity calculation is performed with each element of X3 and X4, respectively, as follows, | θ ═ cos (| θ)12L) find outThe element with the highest similarity with X3 and X4 is obtained
Figure GDA0003082585540000051
Record the similar elements in X3 or X4
Figure GDA0003082585540000052
And X in the sequence of X1iBy replacement with
Figure GDA0003082585540000053
Similarly, the element satisfying theta ≤ pi/6 or theta ≥ 5 pi/6 in X1 at this time is counted as XiIs mixing XiCalculating cosine similarity with each element in X2 to find out the element with highest similarity to X2
Figure GDA0003082585540000054
From the sequence X2
Figure GDA0003082585540000055
Deleting elements from the sequence, and combining the X1 and X2 arrays to obtain the finally required connected domain elements;
5) because in step 3) we have mapped each centroid angular coordinate to other parameters of the connected domain, such as size, area, depth, regularity and uniformity. Therefore, by obtaining the centroid angular coordinate array in step 4), we can obtain the finally required parameters such as the number of trenches, the area, the depth, the uniformity and the regularity, and display the parameters.
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. A rapid calculation method for characteristic parameters of a grooved filter stick based on parallel calculation is characterized by comprising the following steps:
1) carrying out graying, binarization and median filtering on the obtained end face image of the groove filter stick to finish the preprocessing operation of the image to obtain a preprocessed image;
2) respectively carrying out horizontal and vertical segmentation on the preprocessed image, horizontally segmenting the preprocessed image into a first image and a second image, vertically segmenting the preprocessed image into a third image and a fourth image, and segmenting the preprocessed image into four images in total;
3) generating a thread pool, creating thread objects, distributing a pair of images to each thread object, performing corrosion expansion operation on each image, extracting internal and external contour processing, and obtaining target parameters of the number of grooves, the specific surface area, the depth of the grooves, the uniformity of the grooves and the regularity of each connected domain and an angular coordinate parameter of the mass center of each connected domain so as to facilitate next clustering operation, wherein the angular coordinate parameters and the target parameters of the number of the grooves, the specific surface area, the depth of the grooves, the uniformity of the grooves and the regularity are in one-to-one correspondence;
4) and performing clustering operation by adopting a cosine similarity method:
assembling the connected domain centroid angular coordinate parameters of each sub-graph into an array [ theta ]1234...]Wherein θ represents an angle of the centroid of the connected domain deviating from the X-axis, and the four arrays obtained from the first, second, third and fourth graphs are respectively:
X1=[θ1234...];X2=[θ'1,θ'2,θ'3,θ'4...];
X3=[θ"1,θ"2,θ"3,θ"4...];X4=[θ"'1,θ'"2,θ'"3,θ"'4...];
cosine similarity calculation is carried out on the connected domain in the division direction, and elements meeting the condition that theta is less than or equal to pi/6 or theta is more than or equal to 5 pi/6 in X1 are counted as XiIs mixing XiCosine similarity calculation is performed with each element of X3 and X4, respectively, as follows, | θ ═ cos (| θ)12|) find the element with the highest similarity to X3 and X4
Figure FDA0003082585530000011
Record the element with the highest similarity in X3 or X4
Figure FDA0003082585530000012
And X in the sequence of X1iBy replacement with
Figure FDA0003082585530000013
Similarly, the element satisfying theta ≤ pi/6 or theta ≥ 5 pi/6 in X1 at this time is counted as XiIs mixing XiCalculating cosine similarity with each element in X2 to find out the element with highest similarity to X2
Figure FDA0003082585530000021
From the sequence X2
Figure FDA0003082585530000022
Deleting elements from the sequence, and combining the X1 and X2 arrays to obtain the finally required connected domain elements;
5) and 3), in the step 3), each centroid angular coordinate corresponds to other parameters of the connected domain one by one, so that the centroid angular coordinate array is obtained in the step 4), and finally required parameters of the number of the grooves, the specific surface area, the depth of the grooves, the uniformity of the grooves and the regularity can be obtained and displayed.
CN201811574987.2A 2018-12-21 2018-12-21 Parallel computing-based method for rapidly computing characteristic parameters of grooved filter sticks Active CN109657724B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201811574987.2A CN109657724B (en) 2018-12-21 2018-12-21 Parallel computing-based method for rapidly computing characteristic parameters of grooved filter sticks

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201811574987.2A CN109657724B (en) 2018-12-21 2018-12-21 Parallel computing-based method for rapidly computing characteristic parameters of grooved filter sticks

Publications (2)

Publication Number Publication Date
CN109657724A CN109657724A (en) 2019-04-19
CN109657724B true CN109657724B (en) 2021-08-03

Family

ID=66114986

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201811574987.2A Active CN109657724B (en) 2018-12-21 2018-12-21 Parallel computing-based method for rapidly computing characteristic parameters of grooved filter sticks

Country Status (1)

Country Link
CN (1) CN109657724B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113269757B (en) * 2021-05-28 2022-05-27 浙江中烟工业有限责任公司 Groove characteristic parameter processing method based on hierarchical clustering analysis

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103295399A (en) * 2013-05-14 2013-09-11 西安理工大学 On-state judging method of headlights on full beam of night-driving cars based on morphological characteristics
CN103292723A (en) * 2013-06-01 2013-09-11 南通烟滤嘴有限责任公司 Determining method for grooved filter stick feature parameters
CN107220973A (en) * 2017-06-29 2017-09-29 浙江中烟工业有限责任公司 The hollow filter stick quick determination method of hexagon based on Python+OpenCV
CN107909039A (en) * 2017-11-16 2018-04-13 武汉大学 The ground mulching sorting technique of high-resolution remote sensing image based on parallel algorithm
EP3398158A4 (en) * 2016-03-01 2018-12-05 SZ DJI Technology Co., Ltd. System and method for identifying target objects

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP2219020A4 (en) * 2007-11-28 2014-02-05 Konica Minolta Opto Inc Blood fluidity measurement system and blood fluidity measurement method

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103295399A (en) * 2013-05-14 2013-09-11 西安理工大学 On-state judging method of headlights on full beam of night-driving cars based on morphological characteristics
CN103292723A (en) * 2013-06-01 2013-09-11 南通烟滤嘴有限责任公司 Determining method for grooved filter stick feature parameters
EP3398158A4 (en) * 2016-03-01 2018-12-05 SZ DJI Technology Co., Ltd. System and method for identifying target objects
CN107220973A (en) * 2017-06-29 2017-09-29 浙江中烟工业有限责任公司 The hollow filter stick quick determination method of hexagon based on Python+OpenCV
CN107909039A (en) * 2017-11-16 2018-04-13 武汉大学 The ground mulching sorting technique of high-resolution remote sensing image based on parallel algorithm

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
基于数字图像处理的滤棒沟槽检测技术的研究与实现;张艳艳;《中国优秀硕士学位论文全文数据库 信息科技辑》;20160315;正文第2,4,5章 *
醋纤沟槽滤棒特征参数测定方法;洪深求 等;《烟草科技》;20100430;第5-8,20页 *

Also Published As

Publication number Publication date
CN109657724A (en) 2019-04-19

Similar Documents

Publication Publication Date Title
CN109060836B (en) Machine vision-based high-pressure oil pipe joint external thread detection method
WO2018040302A1 (en) Method and system for measuring width of cut tobacco piece or cut stem, and server having said system
CN106289777B (en) A kind of multi-state rolling bearing performance appraisal procedure based on geometry measurement
CN107369140B (en) Method for extracting center of high-precision target ball in unstructured environment
CN106529559A (en) Pointer-type circular multi-dashboard real-time reading identification method
CN107066998A (en) A kind of pointer-type circular single instrument board real-time identification method of utilization mobile device
WO2016201671A1 (en) Method and device for extracting local features of three-dimensional point cloud
CN110580705B (en) Method for detecting building edge points based on double-domain image signal filtering
CN106340010B (en) A kind of angular-point detection method based on second order profile difference
CN104268853A (en) Infrared image and visible image registering method
CN108416787A (en) Workpiece linear edge localization method applied to Machine Vision Detection
CN108648184A (en) A kind of detection method of remote sensing images high-altitude cirrus
CN111260708A (en) Line structure optical center extraction method and system
Flesia et al. Sub-pixel straight lines detection for measuring through machine vision
CN108182705A (en) A kind of three-dimensional coordinate localization method based on machine vision
CN104614386A (en) Lens defects type identification method
CN109657724B (en) Parallel computing-based method for rapidly computing characteristic parameters of grooved filter sticks
Kang et al. Research on improved region growing point cloud algorithm
CN115526885A (en) Product image defect detection method, system, device and medium
CN115760893A (en) Single droplet particle size and speed measuring method based on nuclear correlation filtering algorithm
CN105631857B (en) A kind of scratch detection method and apparatus of optical element surface
CN106802149B (en) Rapid sequence image matching navigation method based on high-dimensional combination characteristics
CN113095385A (en) Multimode image matching method based on global and local feature description
CN112560839A (en) Automatic identification method and system for reading of pointer instrument
CN115294119B (en) Machine vision-based method for detecting stains in inner grooves of heads of plum-blossom-shaped threads

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