A tow flipping visual detection method and system based on probabilistic Hough transform
By using a visual detection method based on probability Hough transformation in the production process of the filter rod, the flip or folding of the tow surface is recognized in real time, and the quality problem of the filter rod caused by flip or folding during the tow opening is solved, and the filter rod quality problem is achieved. Full coverage inspection and quality assurance of the tow opening process are carried out.
Patent Information
- Application Number
- CN202111340661.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-11-12
- Publication Date
- 2025-02-18
- Estimated Expiration
- 2041-11-12
AI Technical Summary
During the production process of the filter rod, the tow is easily flipped or folded during the loosening process, resulting in abnormal suction resistance or weight of the filter rod. Due to the low frequency, it is difficult to pass manual detection, which poses a quality hazard.
Using a visual detection method based on probability Hoff transformation, the images of the tow surface are collected in real time through the camera, and image processing is performed using mean filtering, glue line edge extraction and probability Hoff transformation algorithms, to identify the contour lines of the tow surface and calculate its slope. and include angles to determine whether the tow is flipped or folded.
Accurate and rapid detection of the flip or folding situation during the tow opening process is achieved, reducing the quality problems of filter rods caused by tow flip or folding, and improving the quality assurance of cigarette support production.
Smart Images

Figure CN114092429B_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the field of machine vision image detection and recognition, and in particular, relates to a tow flipping visual detection method and system based on probabilistic Hough transform. Background Art
[0002] The tow is the main auxiliary material in the production process of filter rods. The opening process of the tow will affect whether the production of filter rods can meet the process quality standards. In the production of filter rods, the tow is initially in the shape of a tightly structured rope, and needs to be opened by an opener. However, during the opening process, the tow will inevitably flip or fold, which will cause the filter rod to have abnormal suction resistance or weight, resulting in quality risks in the production of cigarettes. Since this situation occurs less frequently, it is not easy to find during quality inspections, and when the opener is running at full speed, the moving speed of the tow reaches 10m / s. During the production of filter rods, it is impossible to detect whether the tow has flipped or folded through manual observation. At present, there is no good way in China to detect the flipping or folding of the tow during the opening process of the opener, which leads to certain difficulties in quality assurance of cigarette production. Summary of the invention
[0003] In order to solve at least one aspect of the above problems, the present invention provides a tow flipping visual detection method based on probabilistic Hough transform, comprising the following steps:
[0004] Step S1: starting the filter rod forming machine and sending a starting signal;
[0005] Step S2: after receiving the signal of step S1, the camera is started to collect images of the opening surface of the tow in real time;
[0006] Step S3: converting the image collected in step S2 into a grayscale image, and performing histogram equalization on the grayscale image;
[0007] Step S4: Smoothing the image obtained in step S3 using a mean filtering algorithm;
[0008] Step S5: extracting the contour of the tow surface from the image processed in step S4 using a glue line edge extraction algorithm, and performing multiple expansion operations on the contour line of the tow surface;
[0009] Step S6: using the probabilistic Hough transform algorithm to identify the contour lines of the tow surface processed in step S5, and output the starting coordinates and the ending coordinates of all the contour lines of the tow surface;
[0010] Step S7: Calculate the starting coordinates and the end coordinates obtained in step S6 by programming, obtain the slope of all the tow surface contour lines and their angles with the horizontal direction, and determine whether the tow is flipped and folded when it is opened based on the range of the angle.
[0011] Furthermore, in the mean filtering algorithm in step S4, the size of the filtering operator is 9×9.
[0012] Furthermore, the algorithm for extracting the contour of the tow surface in step S5 is the Canny edge detection algorithm, and the morphological structure element created by the multiple dilation operations is a 3×3 cross-shaped element.
[0013] Furthermore, in the process of identifying the contour line of the tow surface using the probabilistic Hough transform algorithm in step S6, the distance resolution is set to 1, the angle resolution is set to 1, the cumulative threshold parameter is set between 80 and 100, the shortest identification line segment parameter is set between 140 and 190, and the maximum distance between two points is set between 8 and 15.
[0014] Furthermore, the step S7 comprises the following steps:
[0015] Step S7a: using a program to create a four-dimensional container Container for receiving the starting coordinates and the ending coordinates of all the line segments recorded after the probabilistic Hough transform in step S6, and receiving the starting coordinates and the ending coordinates of all the line segments recorded after the probabilistic Hough transform in step S6;
[0016] Step S7b: Use the program to traverse and calculate the slope K of all line segments received in the Container in step S7a n , where K n =(Y n+1 -Y n ) / (X n+1 -X n ), n≥1, where X n , Y n is the starting coordinate of the line segment; X n+1 , Y n+1 is the coordinate of the end point of the line segment; n is the number of line segments;
[0017] Step S7c: Calculate the slope K obtained in step S7b using a program n The arctan(Kn) value of the angle between all line segments that are not equal to 0 and the horizontal direction. When the number of line segments that satisfy the arctan(Kn) value between 20 degrees and 70 degrees is greater than 3 and the number of line segments that satisfy the arctan(Kn) value between -70 degrees and -20 degrees is also greater than 3, it means that the tow opening is flipped or folded, and a rejection signal is issued. Otherwise, it means that the tow opening is normal and no signal is issued.
[0018] According to a tow flip visual detection method based on probabilistic Hough transform, a tow flip visual detection system based on probabilistic Hough transform is provided, including a camera, a computer, an I / O module, a display screen, and a filter rod forming machine;
[0019] The computer is connected to the camera, the I / O module and the display screen respectively, and is used to execute an image processing program on the collected tow surface image, transmit the processed image to the display screen, and output the processing result signal to the I / O module at the same time;
[0020] The I / O module is connected to the computer and the filter rod forming machine respectively, and is used to receive a start signal of the filter rod forming machine and transmit the start signal to the computer, or receive a result signal of the execution of the computer program and output a rejection signal to the filter rod forming machine;
[0021] The camera is set in the middle of the opening roller pair of the opener, perpendicular to the tow surface and 10 cm to 25 cm away from the tow surface, for collecting the tow surface image and transmitting it to the computer;
[0022] The display screen receives and displays the computer program execution results via the DP line;
[0023] The filter rod forming machine is used to send equipment start-up signals and receive filter rod rejection signals and perform rejection actions.
[0024] Furthermore, the computer is an industrial computer, the CPU of the computer is a quad-core processor with a main frequency greater than 3.0 GHz, and the industrial computer is internally installed with TwinCAT 3.0 software and TwinCAT Vision module.
[0025] Furthermore, the camera is a GigE industrial camera, and the camera transmits the collected tow surface image to a computer via Gigabit Ethernet technology.
[0026] Furthermore, the camera has a pixel of 300,000 and a maximum frame rate greater than 280PFS.
[0027] Furthermore, the I / O module communicates with the computer via EtherCat technology.
[0028] The present invention provides a tow flipping visual detection method and system based on probabilistic Hough transform, which has the following beneficial effects:
[0029] (1) By adopting the detection method of the present application, using a camera to collect images of the tow surface, and processing and calculating the images through programs such as a mean filtering algorithm, a rubber line edge extraction algorithm, and a probabilistic Hough transform straight line detection algorithm in a computer, the flipping or folding of the tow can be accurately and quickly determined, and online detection of the tow surface can be achieved, thereby reducing the occurrence of quality problems such as suction resistance or abnormal weight of some filter rods caused by flipping or folding of the tow.
[0030] (2) By adopting a high frame rate camera with a maximum frame rate of 280PFS and transmitting the collected tow surface images to a computer with a quad-core processor with a CPU main frequency greater than 3.0GHz and TwinCAT3.0 software installed internally through Gigabit Ethernet technology, the tow surface image acquisition speed can reach more than 280 images per second, the image transmission speed between the camera and the computer is less than 3.5ms per image, and the speed of processing and calculating the collected images is less than 0.015ms per frame, thereby achieving 280 images collected, processed and calculated per second, and being able to cope with real-time detection of tows moving at a speed of 10m / s, thereby reducing the occurrence of quality problems in filter rods caused by untimely detection due to the excessive speed of the tow.
[0031] (3) By using a GigE industrial camera, the image of the tow flipping or folding can be accurately captured and identified, and the full-image detection of the tow surface can be achieved, thereby achieving full coverage detection of the system and reducing the occurrence of quality problems in the filter rod caused by incomplete detection due to blind spots in the tow shooting. BRIEF DESCRIPTION OF THE DRAWINGS
[0032] In order to better understand the above and other purposes, features, advantages and functions of the present invention, reference may be made to the embodiments shown in the accompanying drawings. The same reference numerals in the accompanying drawings refer to the same components. It should be understood by those skilled in the art that the accompanying drawings are intended to schematically illustrate the preferred embodiments of the present invention and have no limiting effect on the scope of the present invention, and the components in the drawings are not drawn to scale.
[0033] Figure 1 A flow chart of a tow flipping visual detection method based on probabilistic Hough transform according to an embodiment of the present invention is shown;
[0034] Figure 2 A structural block diagram of a tow flipping visual detection system based on probabilistic Hough transform according to an embodiment of the present invention is shown. DETAILED DESCRIPTION
[0035] The following is a description of exemplary embodiments of the present disclosure in conjunction with the accompanying drawings, including various details of the embodiments of the present disclosure to facilitate understanding, which should be considered as merely exemplary. Therefore, it should be recognized by those of ordinary skill in the art that various changes and modifications may be made to the embodiments described herein without departing from the scope and spirit of the present disclosure. Similarly, for the sake of clarity and conciseness, descriptions of well-known functions and structures are omitted in the following description.
[0036] As used herein, the term "including" and its variations mean open inclusion, i.e., "including but not limited to". Unless otherwise stated, the term "or" means "and / or". The term "based on" means "based at least in part on". The terms "an example embodiment" and "an embodiment" mean "at least one example embodiment". The term "another embodiment" means "at least one additional embodiment". The terms "first", "second", etc. may refer to different or the same objects. Other explicit and implicit definitions may also be included below.
[0037] In order to at least partially solve the above problems and one or more of other potential problems, an embodiment of the present disclosure proposes a tow flipping visual detection method based on probabilistic Hough transform, comprising the following steps:
[0038] Step S1: starting the filter rod forming machine and sending a starting signal;
[0039] Step S2: after receiving the signal of step S1, the camera is started to collect images of the opening surface of the tow in real time;
[0040] Step S3: converting the image collected in step S2 into a grayscale image, and performing histogram equalization on the grayscale image;
[0041] Step S4: Smoothing the image obtained in step S3 using a mean filtering algorithm;
[0042] Step S5: extracting the contour of the tow surface from the image processed in step S4 using a glue line edge extraction algorithm, and performing multiple expansion operations on the contour line of the tow surface;
[0043] Step S6: using the probabilistic Hough transform algorithm to identify the contour lines of the tow surface processed in step S5, and output the starting coordinates and the ending coordinates of all the contour lines of the tow surface;
[0044] Step S7: Calculate the starting coordinates and the end coordinates obtained in step S6 by programming, obtain the slope of all the tow surface contour lines and their angles with the horizontal direction, and determine whether the tow is flipped and folded when it is opened based on the range of the angle.
[0045] Specifically, Figure 1As shown, step S1: start the filter rod forming machine and send a start signal to the computer;
[0046] Step S2: After the computer receives the signal of step S1, the camera is started, and the camera is selected to collect images of the opening surface of the tow at a frame rate of 280, and the collected images are transmitted to the computer;
[0047] Step S3: converting the image collected in step S2 into a grayscale image through the TwinCAT Vision (a development platform with image processing function in software based on Windows control and automation technology) module in the TwinCAT (short for The Windows Control and Automation Technology, a control and automation technology based on Windows) 3.0 software platform of the computer, and performing histogram equalization on the grayscale image;
[0048] Step S4: using a mean filter algorithm with a filter operator of 9×9 in a computer to smooth the image processed in step S3;
[0049] In some embodiments, the filter operator may select an odd×odd type filter operator of other scales, for example, a 7×7 filter operator, a 11×11 filter operator, and so on.
[0050] Step S5: using the Canny edge detection algorithm in the computer to extract the edge of the rubber line, creating a 3×3 cross-shaped morphological structure element, performing two expansion operations on the contour line of the tow surface, and extracting the contour of the tow surface from the image processed in step S4;
[0051] Among them, in some embodiments, the morphological structure element can select a morphological structure element of other scales of positive integer × positive integer type, and the two positive integers are equal, for example, selecting a morphological structure element of 4×4, selecting a morphological structure element of 5×5, and so on; in other embodiments, the type of morphological structure element can be selected as disk type or diamond type; the dilation operation can be selected to be performed multiple times.
[0052] Step S6: using the probabilistic Hough transform algorithm in the computer, the distance resolution in the probabilistic Hough transform algorithm is set to 1, the angle resolution is set to 1, the cumulative threshold parameter is set to 90, the shortest recognition line segment parameter is set to 150, and the maximum distance of two-point filling is set to 10, the contour lines of the tow surface processed in step S5 are identified, and the starting coordinates and end coordinates of all the contour lines of the tow surface are output;
[0053] In some embodiments, the cumulative threshold parameter can be set between 80 and 100, the shortest recognition line segment parameter can be set between 140 and 190, and the maximum distance between two points can be set between 8 and 15.
[0054] Step S7a: using a programming program in a computer, a four-dimensional container (a container for storing data) is created by programming to receive the starting coordinates and the ending coordinates of all the line segments recorded after the probabilistic Hough transform in step S6, and the starting coordinates and the ending coordinates of all the line segments recorded after the probabilistic Hough transform in step S6 are received;
[0055] Step S7b: Use a programming program in the computer to traverse and calculate the slope K of all line segments received in the Container in step S7a. n , where K n =(Y n+1 -Y n ) / (X n+1 -X n ), n≥1, where X n , Y n is the starting coordinate of the line segment; X n+1 , Y n+1 is the coordinate of the end point of the line segment; n is the number of line segments;
[0056] Step S7c: Use the programming program in the computer to calculate the slope K obtained in step S7b by programming n The arctan(Kn) value of the angle between all line segments that are not equal to 0 and the horizontal direction. When the number of line segments that satisfy the arctan(Kn) value between 20 degrees and 70 degrees is greater than 3 and the number of line segments that satisfy the arctan(Kn) value between -70 degrees and -20 degrees is also greater than 3, it means that the tow opening is flipped or folded, and a rejection signal is issued. Otherwise, it means that the tow opening is normal and no signal is issued.
[0057] A tow flipping visual detection method based on probabilistic Hough transform is adopted. The image of the tow surface is collected by a camera. All the collected images are transformed into single-channel grayscale images through the TwinCAT 3.0 platform and TwinCATVision module in the computer, and the grayscale images are histogram-equalized. Then the image is smoothed by the mean filter algorithm to remove the image noise caused by the surface texture of the tow. Then the contour edge of the tow surface is extracted by the glue line edge extraction algorithm and multiple expansion calculations are performed. Then the contour line of the tow surface is identified by the probabilistic Hough transform algorithm, and then the slope and the angle between the identified contour line and the horizontal direction are calculated by the program. According to the value range of the angle, it is judged whether the tow is flipped or folded when it is opened and whether this part of the filter rod is removed, so as to realize the online detection of the tow and the full coverage detection of the tow.
[0058] According to a method for visual detection of tow flipping based on probabilistic Hough transform, a disclosed embodiment proposes a visual detection system for tow flipping based on probabilistic Hough transform, such as Figure 2 As shown, it includes a camera, a computer, an I / O module, a display screen, and a filter rod forming machine; the camera adopts a GigE (short for Gigabit Ethernet, Gigabit Ethernet protocol) industrial camera with a pixel of 300,000 and a maximum frame rate greater than 280PFS. The camera is fixedly arranged in the middle of the opening roller pair of the opener, perpendicular to the filament surface and 10cm to 25cm away from the filament surface, preferably 20cm away from the filament surface, and collects images of the filament surface at a maximum speed of 280 frames per second.
[0059] The camera is connected to a computer, and the camera transmits the collected tow surface images to the computer through Gigabit Ethernet technology at a speed of less than 3.5 ms per frame; the computer adopts a Beckhoff C6032 series industrial computer with a CPU (abbreviation of Central processing unit, central processing unit) as a quad-core processor with a main frequency greater than 3.0 GHz, and TwinCAT 3.0 software is installed inside the computer. The TwinCAT 3.0 software includes a TwinCAT Vision module, a mean filter algorithm program, a Canny edge extraction algorithm program, a probabilistic Hough transform algorithm, and an autonomous programming module. The computer executes an image processing program on the collected tow surface images at a speed of less than 0.015 ms per frame, and obtains a result of whether the tow is flipped and folded.
[0060] The display screen is connected to the computer via a DP (short for DisplayPort, digital video interface) line, and the display screen is used to display the execution results of the image processing program executed by the computer.
[0061] The I / O module is connected to the computer through EtherCat technology communication, and the I / O module is connected to the filter rod forming machine. The I / O module is used to receive the input of the start signal of the filter rod forming machine and output the start signal of the filter rod forming machine to the computer, and receive the input of the computer's result of whether the tow is flipped and folded and output the signal of whether to reject this part of the filter rod to the filter rod forming machine; the filter rod forming machine is used to send the equipment start signal to the I / O module, and receive the signal of whether to reject this part of the filter rod output by the I / O module and perform the corresponding rejection action.
[0062] According to a yarn tow flipping visual detection method based on probabilistic Hough transform, a GigE camera is used to collect a full image of the yarn tow surface at high speed, and a high-configuration computer is used to realize image processing of less than 0.015ms per frame and high-speed transmission of less than 3.5ms per frame, so that a yarn tow flipping visual detection system based on probabilistic Hough transform can realize full coverage and real-time online detection of the flipping or folding of the yarn tow during the opening process, thereby eliminating filter rods with quality problems caused by the flipping or folding of the yarn tow, and improving the production quality of filter rods.
[0063] The embodiments of the present disclosure have been described above, and the above description is exemplary, not exhaustive, and is not limited to the disclosed embodiments. Many modifications and changes will be apparent to those of ordinary skill in the art without departing from the scope and spirit of the described embodiments. The selection of terms used herein is intended to best explain the principles of the embodiments, practical applications, or technical improvements in the market, or to enable other persons of ordinary skill in the art to understand the present invention.
Claims
1. A tow flipping visual detection method based on probabilistic Hough transform, characterized in that: The steps include: Step S1: starting the filter rod forming machine and sending a starting signal; Step S2: after receiving the signal of step S1, the camera is started to collect images of the opening surface of the tow in real time; Step S3: converting the image collected in step S2 into a grayscale image, and performing histogram equalization on the grayscale image; Step S4: Smoothing the image obtained in step S3 using a mean filtering algorithm; Step S5: extracting the contour of the tow surface from the image processed in step S4 using a glue line edge extraction algorithm, and performing multiple expansion operations on the contour line of the tow surface; Step S6: using the probabilistic Hough transform algorithm to identify the contour lines of the tow surface processed in step S5, and output the starting coordinates and the ending coordinates of all the contour lines of the tow surface; Step S7: Use program programming to calculate the starting coordinates and the end coordinates obtained in step S6 to obtain the slopes of all the contour lines of the tow surface and their angles with the horizontal direction, and judge whether flipping and folding occurred when the tow was opened according to the value range of the angle; when the number of line segments in the angle range between 20 degrees and 70 degrees is greater than 3 and the number of line segments in the angle range between -70 degrees and -20 degrees is also greater than 3, it indicates that flipping or folding occurred when the tow was opened; otherwise, it indicates that the tow opening is normal.
2. The tow flipping visual detection method based on probabilistic Hough transform according to claim 1 is characterized in that: In the mean filtering algorithm in step S4, the size of the filtering operator is 9×9.
3. The tow flipping visual detection method based on probabilistic Hough transform according to claim 1 is characterized in that: The algorithm for extracting the contour of the tow surface in step S5 is the Canny edge detection algorithm, and the morphological structure element created by multiple dilation operations is a 3×3 cross type.
4. The method for visual inspection of tow flipping based on probabilistic Hough transform according to claim 1, characterized in that: In the process of identifying the contour line of the tow surface using the probabilistic Hough transform algorithm in step S6, the distance resolution is set to 1, the angle resolution is set to 1, the cumulative threshold parameter is set between 80 and 100, the shortest identification line segment parameter is set between 140 and 190, and the maximum distance between two points is set between 8 and 15.
5. The method for visual inspection of tow flipping based on probabilistic Hough transform according to claim 1, characterized in that: The step S7 comprises the following steps: Step S7a: using a program to create a four-dimensional container Container for receiving the starting coordinates and the ending coordinates of all the line segments recorded after the probabilistic Hough transform in step S6, and receiving the starting coordinates and the ending coordinates of all the line segments recorded after the probabilistic Hough transform in step S6; Step S7b: Use the program to traverse and calculate the slope K of all line segments received in the Container in step S7a n , where K n =(Y n+1 -Y n ) / (X n+1 -X n ), n≥1, where X n , Y n is the starting coordinate of the line segment; X n+1 , Y n+1 is the coordinate of the end point of the line segment; n is the number of line segments; Step S7c: Calculate the slope K obtained in step S7b using a program n The arctan(Kn) value of the angle between all line segments and the horizontal direction that is not equal to 0, when the value range of the arctan(Kn) value indicates that the tow opening is flipped or folded, a rejection signal is issued; otherwise, it indicates that the tow opening is normal and no signal is issued.
6. A tow flip visual detection system based on probabilistic Hough transform, comprising a tow flip visual detection method based on probabilistic Hough transform according to any one of claims 1 to 5, characterized in that: Includes cameras, computers, I / O modules, display screens, filter rod forming machines; The computer is connected to the camera, the I / O module, and the display screen respectively, and is used to execute an image processing program on the collected tow surface image, transmit the processed image to the display screen, and output the processing result signal to the I / O module at the same time; The I / O module is connected to the computer and the filter rod forming machine respectively, and is used to receive a start signal of the filter rod forming machine and transmit the start signal to the computer, or receive a result signal of the execution of the computer program and output a rejection signal to the filter rod forming machine; The camera is set in the middle of the opening roller pair of the opener, perpendicular to the tow surface and 10 cm to 25 cm away from the tow surface, for collecting the tow surface image and transmitting it to the computer; The display screen receives and displays the computer program execution results via the DP line; The filter rod forming machine is used to send equipment start-up signals and receive filter rod rejection signals and perform rejection actions.
7. The tow flipping visual detection system based on probabilistic Hough transform according to claim 6, characterized in that: The computer is an industrial computer, the CPU of the computer is a quad-core processor with a main frequency greater than 3.0 GHz, and the industrial computer is installed with TwinCAT 3.0 software and TwinCAT Vision module.
8. The tow flipping visual detection system based on probabilistic Hough transform according to claim 6, characterized in that: The camera is a GigE industrial camera, which transmits the collected tow surface image to a computer via Gigabit Ethernet technology.
9. The tow flipping visual detection system based on probabilistic Hough transform according to claim 8, characterized in that: The camera has a pixel of 300,000 and a maximum frame rate of more than 280PFS.
10. The tow flipping visual detection system based on probabilistic Hough transform according to claim 6, characterized in that: The I / O module communicates with the computer via EtherCat technology.
Citation Information
Patent Citations
Ingot scratch detection system and method based on depth learning and image processing technology
CN109255787A
Strand tension balancing device of filter rod forming machine
CN109984377A