Cigarette cylindricity and roundness measuring method based on machine vision

Through machine vision technology, the use of high-resolution cameras and parallel light sources for non-contact measurement of cigarettes has been solved, and the limitations of insufficient measurement accuracy and contact measurement in the prior art have been achieved, and the roundness and cylindricality of cigarettes has been achieved. Accurate measurement improves productivity and measurement safety.

CN119444834APending Publication Date: 2025-02-14CHINA JILIANG UNIV
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411573865.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-11-06
Publication Date
2025-02-14

AI Technical Summary

Technical Problem

The existing methods for measuring cylindrical and roundness of cigarettes have insufficient accuracy and limitations of contact measurement, making it difficult to be applicable to cigarette production and acceptance.

Method used

Using a contactless measurement method based on machine vision technology, imaging is performed through a high-resolution camera and parallel light source, combining computer technology and digital image processing technology, the maximum and minimum circumferential circle diameter of the cigarette is obtained by using Canny edge detection and Hough circle transformation. Calculate its roundness and cylindricality.

Benefits of technology

It realizes fast, accurate and non-contact measurement of the roundness and cylindricality of cigarettes, ensures the accuracy and safety of measurement, facilitates online automatic detection, and improves production efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119444834A_ABST
    Figure CN119444834A_ABST
Patent Text Reader

Abstract

The invention relates to a cigarette cylindricity and roundness measuring method based on machine vision. The method comprises the steps of cigarette image acquisition, image preprocessing, cigarette edge detection and feature extraction, contour circumcircle and incircle drawing and cigarette cylindricity and roundness calculation. According to the cylindricity and roundness measuring method, digital image processing and computer technologies are fused according to a machine vision technology, extra damage and deformation cannot be caused in the detection process, the detection precision is high, convenience and rapidness are achieved, online automatic detection is easy to achieve, and the cigarette production acceptance efficiency is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The invention relates to a method for measuring the cylindricity of cigarettes, in particular to a non-contact method for measuring the cylindricity and roundness of cigarettes based on machine vision technology. Background Art

[0002] The existing method for measuring the cylindricity and roundness of cigarettes is the projection method, but it is not possible to accurately measure the roundness of the cross section. For the measurement of the cylindricity of the sample, the three-coordinate measuring instrument is currently more commonly used, but the three-coordinate measuring instrument belongs to contact measurement and is difficult to apply to cigarettes. Based on the above measurement status and existing problems, the present invention proposes a non-contact measurement method for the cylindricity of cigarettes based on machine vision, which uses a high-resolution camera and lens, cooperates with an industrial parallel light source for imaging, and combines computer technology, digital image processing technology, etc. to complete the measurement of the cylindricity and roundness of cigarettes. The measurement process does not cause any damage to the cigarettes, providing reliable guarantee for the correct production and acceptance of cigarettes. Summary of the invention

[0003] The purpose of the present invention is to use machine vision technology to achieve non-contact measurement of physical indicators such as cylindricity and circumference of cigarettes, so as to provide reliable guarantee for production acceptance of cigarettes. The specific technical scheme is as follows:

[0004] A non-contact cigarette physical index measurement method based on machine vision, comprising the following steps:

[0005] Step S1: photographing a cigarette placed on a rotating table by using a high-resolution area array CCD camera and a parallel surface light source, and controlling the rotation at the same angle to photograph the axial cross section of the cigarette until the cigarette is photographed for one circle, thereby completing the acquisition of the cigarette image;

[0006] Step S2: performing image preprocessing on the original cigarette image acquired in S1, adjusting the brightness through frequency domain filtering, and performing image denoising by combining median filtering and Gaussian filtering;

[0007] Step S3: Using the Canny edge detection operator to detect cigarette edges on the image processed by S2, and extract edge features;

[0008] Step S4: For the edge contour extracted in S3, the maximum circumscribed circle and the minimum circumscribed circle are obtained by using Hough circle transform, and the circumscribed circle diameter and the inscribed circle diameter of the contour can be obtained;

[0009] Step S5: obtaining the maximum diameter and the minimum diameter of the cigarette outline in S4, and calculating the roundness and cylindricity of the cigarette respectively according to the roundness and cylindricity calculation formulas.

[0010] In a preferred embodiment of the present invention, the image preprocessing in step S2 refers to image filtering and denoising of the original cigarette image loaded into the processing program, with the purpose of highlighting the area where the cigarette is located, distinguishing the background part, and facilitating the subsequent drawing of the inscribed circle and the subsequent accurate positioning of the edge contour pixels of the cigarette.

[0011] In a preferred embodiment of the present invention, the number of equally spaced transverse sections of a cigarette is m, and n images of the cigarette are taken at equal angles. The maximum circumscribed circle diameter and the minimum circumscribed circle diameter of the cigarette are respectively denoted as max D ij and min D ij , where i is the i-th transverse section of the cigarette image, i = 1, 2, ..., m, j is the j-th cigarette image, j = 1, 2, ..., n, and there are mn diameter values ​​in total. The roundness C i Cylindricity R i The calculation formula is as follows:

[0012] R i =max(D i1 ~D in )-min(D i1 ~D in ) (1)

[0013] C i =min(D i1 ~D in ) / max(D i1 ~D in )×100% (2)

[0014] Compared with other measurement methods, the present measurement method has the following beneficial effects: non-contact comprehensive measurement of the roundness and cylindricity of cigarettes is achieved through machine vision technology, and the measurement process does not cause damage to the target. At the same time, based on computer vision technology, the detection time can be greatly shortened, the detection accuracy is guaranteed, and it is convenient and fast, and it is easy to realize online automatic detection, thereby improving production efficiency. BRIEF DESCRIPTION OF THE DRAWINGS

[0015] When considered in conjunction with the accompanying drawings, the present invention can be better understood and many of the accompanying advantages can be easily known by referring to the following detailed description, but the drawings described herein are used to provide a further understanding of the present invention and constitute a part of the present invention. The exemplary embodiments and descriptions of the present invention are used to explain the present invention and do not constitute an improper limitation of the present invention, wherein:

[0016] Figure 1 The present invention is a flow chart of the steps of measuring the roundness and cylindricity of cigarettes by machine vision.

[0017] Figure 2 It is the image preprocessing flow chart of the present invention.

[0018] Figure 3 The present invention is a flowchart of the sub-algorithm for calculating the cylindricity and roundness of cigarettes.

[0019] Figure 4 The present invention is an image processing effect diagram. DETAILED DESCRIPTION

[0020] The present invention is further described below with reference to the accompanying drawings using an embodiment, but this embodiment is merely illustrative and the protection scope of the present invention is not limited by this embodiment.

[0021] like Figure 1 As shown, a non-contact cigarette physical index measurement method based on machine vision includes the following specific implementation steps:

[0022] Step S1, acquisition of cigarette image: imaging is performed using high-resolution area array CCD cameras and parallel surface light sources distributed on both sides of the cigarette, and the rotating stage is controlled to rotate at the same angle each time to take a photo until the cigarette has made a complete rotation. After the complete imaging is performed, it can be transmitted in real time to the host computer software algorithm for subsequent processing.

[0023] Step S2, image preprocessing: Figure 2 As shown in FIG. 1 , the original cigarette image is subjected to image filtering. The filtering method uses a combination of median filtering and Gaussian filtering, which can effectively remove image edge noise and improve edge recognition accuracy.

[0024] Step S3, cigarette edge detection and feature extraction: the cigarette image that has undergone image preprocessing is processed by the Canny edge detection operator to determine the edge pixels, and then the edge contour of the cigarette is identified to extract the edge contour of the cigarette.

[0025] Step S4, such as Figure 4 As shown, the Hough circle transform is used to obtain the circumscribed circle and the inscribed circle of the cigarette contour obtained by S3.

[0026] Step S5, calculation of cylindricity and roundness: Figure 3 As shown, the circumscribed circle and the inscribed circle of the cigarette edge contour line are obtained through processing in step S4, and the maximum and minimum diameters of each cross section in each radial section of the cigarette can be obtained, and the roundness and cylindricity measurement can be completed according to the above formula.

[0027] The present invention can realize fast and accurate calculation of the cylindricity and roundness of cigarettes through image processing and Hough circle transformation, and can ensure product quality, improve production efficiency and reduce raw material waste in the tobacco production process.

[0028] The above examples are only used to help understand the core idea of ​​the present invention. At the same time, for those skilled in the art, according to the idea of ​​the present invention, there will be changes in the specific implementation methods and application scope. In summary, the content of this specification should not be understood as limiting the present invention.

Claims

1. A method for measuring the cylindricity and roundness of cigarettes based on machine vision, comprising: Step S1 is to obtain the cigarette image, step S2 is to pre-process the image, step S3 is to detect the cigarette edge and extract the feature, step S4 is to draw the outline circumscribed circle and inscribed circle, and step S5 is to calculate the cylindricity and roundness of the cigarette.

2. The step S1 of acquiring the cigarette image according to claim 1, characterized in that: The cigarette image needs to be photographed using a high-resolution area array CCD camera in conjunction with a parallel surface light source. The cigarette needs to be placed on a rotating table, and the rotating table is controlled to rotate at the same angle each time to take a photo until the cigarette has made a complete rotation. The camera's field of view needs to be larger than the length of the cigarette so that it can be transmitted to the host computer after imaging is completed.

3. The image preprocessing in step S2 according to claim 1, characterized in that: By setting a 5×5 median filter operator and a 5×5 Gaussian filter operator, the cigarette image is subjected to noise filtering to filter out salt and pepper noise and Gaussian noise contained in the image.

4. The cigarette edge detection and feature extraction in step S3 of claim 1 is characterized in that: The Canny edge detection operator is used to search for grayscale value mutation points in the horizontal and vertical directions of the image, determine the edge pixels, and draw contour lines.

5. The step S4 of drawing the circumscribed circle and the inscribed circle of the outline according to claim 1, characterized in that: The obtained cigarette contour image is subjected to Hough circle transformation to draw the circumscribed circle and inscribed circle of the cigarette contour.

6. The step S5 of calculating cylindricity and roundness according to claim 1, characterized in that: The number of transverse sections and axial sections of the cigarette should be selected to reflect the actual cylindricity and roundness of the cigarette. The maximum diameter max D is obtained based on the pixel points of the cigarette edge contour. ij With minimum diameter min D ij , so as to calculate the cylindricity and roundness.