Multi-algorithm fused tobacco foreign matter removal control method, storage medium and system
Through the multi-algorithm fusion and the construction of the control matrix, the problems of inconsistent detection information and high error rate in tobacco foreign matter removal equipment are solved, and the accurate removal of foreign matter and the high purity of tobacco materials are achieved.
Patent Information
- Application Number
- CN202411250497.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-06
- Publication Date
- 2025-01-03
AI Technical Summary
During the identification and removal process of existing tobacco foreign object removal equipment, there are problems such as inconsistent information output by multiple detection algorithms and high error rate, which is difficult to meet the high requirements of the tobacco industry for material purity.
By fusion of multiple algorithms, the culling control matrix is constructed, the output information of different detection algorithms is mapped and added together, and a unified culling control matrix is generated to accurately control the actions and periods of the culling unit to achieve accurate culling of foreign objects.
It improves the foreign object recognition rate, reduces the error rate, ensures the high purity of tobacco materials, and reduces the need for manual intervention.
Smart Images

Figure CN119237332A_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the field of tobacco production industry, and is particularly suitable for foreign body detection and removal equipment in leaf threshing and re-drying lines and silk production lines in cigarette industrial production lines, and specifically relates to a tobacco foreign body removal control method, storage medium and system integrating multiple algorithms. Background Art
[0002] Foreign body rejection equipment is currently widely used in the tobacco processing industry to remove non-tobacco foreign bodies contained in tobacco materials online, thereby improving the purity of the materials. Its working principle is as follows: tobacco materials are transported in a single layer through high-speed belts, air conveying, etc., and a line scan camera is used to collect real-time images during high-speed movement. A group of electromagnetic valves (rejection units) are evenly arranged along the cross-section of the conveying device at the rejection position to perform the foreign body rejection action; the target foreign bodies in the collected image are detected by machine vision algorithms, and the time when the target foreign bodies are at the rejection position is obtained through accurate calculations, and then the electromagnetic valve at the corresponding position is controlled to act, and the foreign body movement trajectory is changed with compressed air, thereby realizing the rejection function.
[0003] The detection algorithm used by the current mainstream foreign body rejection equipment is usually to pre-mark all colors in the digital color space as materials or foreign bodies to form a color lookup table; the detection process is to find the color mark of the debris in the lookup table based on the color value of each pixel in the image to obtain the pixel position of the debris in the image; the position of the debris in the image is mapped to the corresponding solenoid valve position; the foreign body can be rejected by controlling the action of the solenoid valve at this position. This method can achieve high-speed real-time detection through reasonable software and hardware design. Usually, debris detection can be performed by collecting images scanned within a solenoid valve rejection control cycle through a line scanning camera. The rejection control only needs to consider the mapping relationship between the cross-sectional direction of the conveying device (i.e., the image width direction) and the position of the solenoid valve. The entire column of image areas covering debris collected within a rejection control cycle is rejected in the material running direction (i.e., the image height direction). The rejection control cycle is fixed. The schematic diagram of the rejection area is shown as follows. Figure 1 shown.
[0004] However, due to the wide variety of foreign matter in tobacco materials, and their different shapes and sizes, as the tobacco industry places increasingly higher demands on material purity, the need to integrate various efficient and intelligent visual inspection algorithms in foreign matter removal equipment is becoming more and more urgent. For example, applying algorithms such as texture, shape and other multi-feature recognition and AI-based deep learning target detection to foreign matter removal equipment can effectively improve the recognition rate of foreign matter.
[0005] The integration of various efficient and intelligent visual detection algorithms requires solving the following two problems: First, the debris information output by the efficient and intelligent visual detection algorithm is different from the debris information output by the current mainstream detection algorithm. For example, the debris position information detected by the color lookup table is represented by the pixel points of the image area; the debris position information detected by the region segmentation algorithm is the region outline; the debris position information detected by the deep learning target is the target rectangle. How to unify the debris information output by multiple detection algorithms? Another problem is how to accurately remove the detected debris and minimize the false rejection rate, that is, accurately locate the position of the debris in the rejection unit and the timing of the rejection unit action. If a few lines of images are collected according to the traditional method, the debris may be segmented or the debris with a large area cannot be detected by the deep learning algorithm. If enough lines of images are collected, when using deep learning debris detection, the traditional fixed rejection cycle method is used to remove the debris, which will cause a large amount of tobacco to be removed along with the debris.
[0006] Therefore, it is necessary to invent a tobacco foreign body rejection control method that integrates multiple algorithms. This method can realize precise rejection control at the corresponding position and time period of the rejection unit according to the position of the foreign body in a frame of image, so as to improve the rejection rate and reduce the false rejection rate. Summary of the invention
[0007] The technical problem to be solved by the present invention is to improve the foreign matter recognition rate by integrating multiple detection algorithms, achieve accurate removal of tobacco debris, and reduce the false rejection rate.
[0008] To achieve the above object, the present invention provides a tobacco debris removal control method integrating multiple algorithms, comprising:
[0009] S1 constructs the elimination control matrix
[0010] According to the preset material speed, effective conveying width, line scan frequency of the linear array camera, pixel width and pixel height of a frame of image collected, number of rejection units, rejection control period and other information, each frame of image is equally spaced into the number of columns of the matrix according to the number of rejection units in the width direction of the conveying device, and each frame of image height pixels is equally spaced into the number of rows of the matrix according to the pixels collected in the rejection control period as the step length. A matrix is constructed with the above number of rows and columns, and the matrix is used to control the position and time period of the rejection unit action. The matrix is defined as the rejection control matrix, and the position where the matrix element value is 1 indicates that the rejection unit performs the rejection action at this position and this time period. On the contrary, the position where the matrix element value is 0 indicates that the rejection unit does not perform the rejection action at this position and this time period.
[0011] The culling control matrix can be represented by the following two-dimensional table:
[0012] <![CDATA[A (0,0) ]]> <![CDATA[A (0,1) ]]> <![CDATA[A (0,2 )]]> ... <![CDATA[A (0,Hctrl-2) ]]> <![CDATA[A (0,Hctrl-1) ]]> <![CDATA[A (0,Hctrl) ]]> <![CDATA[A (1,0) ]]> <![CDATA[A (1,1) ]]> <![CDATA[A (1,2) ]]> ... <![CDATA[A (1,Hctrl-2) ]]> <![CDATA[A (1,Hctrl-1) ]]> <![CDATA[A (1,Hctrl) ]]> <![CDATA[A (2,0) ]]> <![CDATA[A (2,1) ]]> <![CDATA[A (2,2) ]]> ... <![CDATA[A (2,Hctrl-2) ]]> <![CDATA[A (2,Hctrl-1) ]]> <![CDATA[A (2,Hctrl) ]]> <![CDATA[A (3,0) ]]> <![CDATA[A (3,1) ]]> <![CDATA[A (3,2) ]]> ... <![CDATA[A (3,Hctrl-2) ]]> <![CDATA[A (3,Hctrl-1) ]]> <![CDATA[A (3,Hctrl) ]]> ... ... ... ... ... ... ... <![CDATA[A (Wctrl-3,0) ]]> <![CDATA[A (Wctrl-3,1) ]]> <![CDATA[A (Wctrl-3,2) ]]> ... <![CDATA[A (Wctrl-3,Hctrl-2) ]]> <![CDATA[A (Wctrl-3,Hctrl-1 ]]> <![CDATA[A (Wctrl-3,Hctrl) ]]> <![CDATA[A (Wctrl-2,0) ]]> <![CDATA[A (Wctrl-2,1) ]]> <![CDATA[A (Wctrl-2,2) ]]> ... <![CDATA[A (Wctrl-2,Hctrl-2) ]]> <![CDATA[A (Wctrl-2,Hctrl-1 ]]> <![CDATA[A (Wctrl-2,Hctrl) ]]> <![CDATA[A (Wctrl-1,0) ]]> <![CDATA[A (Wctrl-1,1) ]]> <![CDATA[A (Wctrl-1,2) ]]> ... <![CDATA[A (Wctrl-1,Hctrl-2) ]]> <![CDATA[A (Wctrl-1,Hctrl-1 ]]> <![CDATA[A (Wctrl-1,Hctrl) ]]> <![CDATA[A (Wctrl,0) ]]> <![CDATA[A (Wctrl,1) ]]> <![CDATA[A (Wctrl,2) ]]> ... <![CDATA[A (Wctrl,Hctrl-2) ]]> <![CDATA[A (Wctrl-,Hctrl-1) ]]> <![CDATA[A (Wctrl,Hctrl) ]]>
[0013] The number of columns of the matrix corresponds to the number of culling units, and the number of rows corresponds to the action period of the culling units.
[0014] The pixel width of a frame of image captured by the line scan camera is W pix , pixel height is H pix , the elimination control matrix is M Ctrl Indicates that the number of columns is W ctrl , the number of rows is H ctrl ; Each column of the elimination control matrix element corresponds to the pixel width w pix , each row of the elimination control matrix element corresponds to the pixel height h pix , their calculation formulas are as follows:
[0015] W ctrl =n ctrl (1)
[0016] H ctrl =H pix / (Tf) (2)
[0017] w pix =W pix / W ctrl (3)
[0018] h pix = H pix / H ctr1 (4)
[0019] Where: n ctrl is the number of rejection device units, f is the camera line scanning frequency, and T is the rejection control period.
[0020] S2 detection and elimination control matrix generation
[0021] After completing the acquisition of a frame of image, the foreign body targets in the image can be detected through a variety of algorithms to obtain a variety of detection results. The detection results obtained by different algorithms are mapped to the rejection control matrix corresponding to the output information of this type of algorithm. The rejection matrices of different algorithms are added together to obtain the rejection matrix of the fusion algorithm.
[0022] The foreign object location information representation output by different visual detection algorithms can be divided into three categories: the first category is the pixel coordinate set representation of the area where the foreign object is located, such as color lookup table, texture feature detection, deep learning target segmentation, etc.; the second category is the contour pixel set representation of the area where the foreign object is located, such as shape feature detection, contour feature detection, etc.; the third category is the target rectangular coordinate set representation that contains the area where the foreign object is located, such as deep learning target detection, etc.
[0023] S2.1 Foreign body area pixel set mapping method
[0024] The first type of foreign body position information mapping method. The pixel coordinates of the detected foreign body area are a binary set R, and any pixel point is represented by p(x, y); the corresponding elimination control matrix binary set is S, and any elimination control matrix unit is represented by coordinates as t(u, v); the corresponding mathematical expressions are formulas (5) and (6), respectively. The mapping relationship between the elements of the sets R and S is shown in formulas (7) and (8).
[0025] R={(x,y)|x <W pix ,y< H pix},p∈R (5)
[0026] S={(u,v)|u <W ctrl ,v< H ctrl},t∈S (6)
[0027]
[0028]
[0029] Mathematical symbols in formula (7) and (8) Indicates rounding down to an integer.
[0030] According to formulas (1) and (2), construct a W ctrl ×H ctrl The zero matrix of Assign 1 to the element value at the corresponding position in the set S to generate the elimination control matrix M c1 .
[0031] S2.2 Foreign body area contour pixel set mapping method
[0032] The second type of foreign body position information mapping method. The contour information of the area where the foreign body is detected is a binary number set C, and any pixel point is represented by q (x, y); using the image processing algorithm, a closed contour area is formed, and the area inside the contour is filled to form the debris area information. The elimination control matrix generation method is consistent with the first type of foreign body position information mapping method, and the generated elimination control matrix M c2 .
[0033] S2.3 Target rectangular coordinate set mapping method for the area where the foreign body is located
[0034] The third type of foreign body position information mapping method. The number of target rectangles in the area where the foreign body is detected is n, and all target rectangles form a set Q. Each element in the set represents a target rectangle. A target rectangle can be represented by a quaternion set element r. The binary set of the rejection control matrix corresponding to all target rectangular areas is S, and any pixel point is represented by t(u, v). The mapping relationship between the set Q and S is shown in formulas (9) and (10).
[0035] Q={[(x ul ,y ul ),(x br ,y br )] m |x <W pix ,y< H pix ,m <n},r∈Q (9)
[0036] S={(u,v) m |u <W ctrl ,v <H ctrl ,m <n},t∈S (10)
[0038] Among them, the point (x ul ,y ul ) is the coordinate point of the upper left corner of the target rectangle, point (x br ,y br ) is the coordinate point of the lower right corner of the target rectangle.
[0039] For any target rectangle, the coordinates of the upper left corner of the target rectangle are mapped to the coordinates in the culling control matrix as follows:
[0040]
[0041]
[0042] For any target rectangle, the length and width of the target rectangle are mapped to the length k and width h in the elimination control matrix as follows:
[0043]
[0044]
[0045] The calculation formula for eliminating the set S in the control matrix is as follows:
[0046]
[0047] Where i = 0 ~ k, j = 0 ~ h;
[0048] According to formulas (1) and (2), construct a W ctrl×H ctrl The zero matrix of Assign 1 to the element value at the corresponding position in the set S to generate the final elimination control matrix M c3 .
[0049] S2.4 Elimination control matrix generation
[0050] The three types of foreign body output information rejection control matrices are added and combined to obtain a unified rejection control matrix M. The positions of the non-zero elements in the matrix M are the positions and time periods where the rejection units perform the rejection actions, as shown in formula (16).
[0051] M=M c1 +M c2 +M c3 (16)
[0052] The final elimination control matrix M is not necessarily the sum of the above three types of control matrices, but may also be the sum of one or several combinations of the above three types of control matrices.
[0053] S3 foreign body rejection control
[0054] When the material corresponding to the detection result reaches the rejection position, the rejection control unit actions are controlled according to the rejection control matrix with the rejection cycle as the beat, so that the foreign matter can be accurately rejected.
[0055] A computer-readable storage medium stores a computer program, which, when executed by a processor, implements the steps of the tobacco debris rejection control method of the multi-algorithm fusion of the present invention.
[0056] A tobacco foreign body rejection system integrating multiple algorithms, the system comprising a computer, a line scanning camera and a plurality of rejection units evenly arranged along the cross section of a conveying device, wherein the computer is provided with the computer-readable storage medium of the present invention.
[0057] The beneficial effects of the present invention include:
[0058] The present invention uses multiple parallel detection algorithms to improve the recognition rate of foreign matter in tobacco, and maps the positions of tobacco debris in image pixels to corresponding positions of a rejection control matrix using different efficient and fast mapping algorithms, thereby achieving accurate rejection of debris in tobacco by controlling the rejection position and time, reducing the number of false rejections of tobacco, improving the rejection rate of foreign matter, ensuring the purity of tobacco materials, reducing the false rejection rate of tobacco, and reducing the workload of manually picking out foreign matter from a large amount of rejected tobacco. BRIEF DESCRIPTION OF THE DRAWINGS
[0059] Figure 1 : Schematic diagram of traditional debris removal method.
[0060] Figure 2 : Schematic diagram of output information of three types of debris detection.
[0061] Figure 3 : Schematic diagram of regional pixels representing foreign matter (output information of the first type of debris detection).
[0062] Figure 4 : Schematic diagram of the culling control matrix generated by mapping debris 1 and debris 2.
[0063] Figure 5 : Schematic diagram of contour pixels representing foreign matter (output information of the second type of debris detection).
[0064] Figure 6 : Schematic diagram of the culling control matrix generated by mapping debris 3 and debris 4.
[0065] Figure 7 : Schematic diagram of the target rectangle representing foreign matter (output information of the third type of debris detection).
[0066] Figure 8 : Schematic diagram of the culling control matrix generated by mapping debris 5 and debris 6.
[0067] Fig. 9 : Schematic diagram of the rejection control matrix generated by mapping the output information of three types of debris detection.
[0068] Fig.10 : Flow chart of the control method of the present invention. DETAILED DESCRIPTION
[0069] In order to make the purpose, technical scheme and advantages of the present invention clearer, the present invention is further described in detail below in conjunction with specific embodiments and with reference to the accompanying drawings. It should be understood that these descriptions are only exemplary and are not intended to limit the scope of the present invention. In addition, in the following description, the description of well-known structures and technologies is omitted to avoid unnecessary confusion of the concept of the present invention.
[0070] The following embodiments are implemented based on the technical solutions in the inventive content of the present invention.
[0071] Example 1
[0072] See also Fig.10 This embodiment further describes the present invention in detail in conjunction with a frame of image collected by a tobacco foreign matter detection device.
[0073] The line scan camera of the tobacco foreign body detection equipment collects a frame of image, the pixel size of which is 4096×2048; assuming that there are actually 6 target debris in this frame of image, debris 1 and debris 2 are the debris of the first type of detection output information, debris 3 and debris 4 are the debris of the second type of detection output information, and debris 5 and debris 6 are the debris of the third type of detection output information;
[0074] Assume that the pixel width of a frame image is W pix =4096pix, pixel height is H pix =2048pix; there are n devices to be eliminated ctrl = 64 rejection units; camera line scanning frequency f = 1000 Hz, rejection control period T = 64 ms; from formula (1), the rejection control matrix M can be obtained Ctrl The number of rows is W ctrl =64, from formula (2) we can get the number of columns to be H ctrl =32;
[0075] Eliminate the number of control matrix columns: W ctrl =n ctrl =64
[0076] Eliminate the number of control matrix rows: H ctrl =H pix / (Tf)=2048 / (0.064×1000)=32
[0077] Each column corresponds to the pixel width:
[0078] Each row corresponds to pixel width:
[0079] like Figure 3 As shown, debris 1 and debris 2 are the first type of debris detection output information. The output information is the pixel area covered by the debris. The set of pixel point coordinates in the debris 2 area is R, and the corresponding elimination control matrix coordinate set is S.
[0080] R={(2634,1011),(2704,1016),(2806,1021),(2847,1025)…}
[0081] S={(41,15),(42,15),(43,15),(44,15)…}
[0082] The calculation process of the coordinates t(u,v) in set S: For example, the point (2634,1011) in set R is mapped to the point (41,15) in set R.
[0083]
[0084]
[0085] By analogy, all the pixels in set R are mapped to set S, and the points in set S are the row and column positions in the elimination matrix.
[0086] Construct a 64×32 array Assign 1 to the element value at the corresponding position in the set S, and generate the elimination control matrix M c1 .like Figure 4 The following is the control matrix diagram for the removal of debris 1 and debris 2.
[0087] like Figure 5 As shown, debris 3 and debris 4 are the second type of debris detected and output information, and the output information is the contour pixel points of the debris. Using the image processing algorithm, a closed contour area is formed, and the area inside the contour is filled to form the debris area information. The elimination control matrix generation method is the same as the first type of foreign body position information mapping method, and a 64×32 matrix is constructed. Assign 1 to the element value at the corresponding position in the set S, and generate the elimination control matrix M c2 .like Figure 6 Shown is the rejection control matrix diagram of debris 3 and debris 4.
[0088] like Figure 7 As shown, debris 5 and debris 6 are the debris of the third category of foreign body detection output information, and the output information is the target rectangle of the area where the foreign body is located. The number of detected debris n=2; taking debris 6 as an example, the calculation process of mapping the third category of debris output information to the elimination matrix is explained;
[0089] For example, the target rectangle coordinates of debris 6 are [(2761,726),(3214,995)], and the corresponding elimination control matrix coordinate set is S. The calculation process of the coordinates t(u,v) in set S is:
[0090] Calculate the culling control matrix corresponding to the coordinates of the upper left corner of the target rectangle. The coordinate mapping of the target rectangle is as follows:
[0091]
[0092] Calculate the length of the target rectangle of the culling control matrix as k and the width as h. The calculation formula is as follows:
[0093]
[0094] Then: i = 0 ~ 7, j = 0 ~ 4;
[0095] When i=0,j=0:
[0096]
[0097] At this time, the coordinate value corresponding to the coordinate t(u,v) in the point set S is (43,11).
[0098] When i=0,j=1:
[0099]
[0100] At this time, the coordinate value corresponding to the coordinate t(u,v) in the point set S is (43,10).
[0101] By analogy, the element set S of the elimination control matrix can be calculated.
[0102] S={(43,11),(43,10),(43,9),(43,8),(43,7);
[0103] (44,11),(44,10),(44,9),(44,8),(44,7);
[0104] (45,11),(45,10),(45,9),(45,8),(45,7);
[0105] (46,11),(46,10),(46,9),(46,8),(46,7);
[0106] (47,11),(47,10),(47,9),(47,8),(47,7);
[0107] (48,11),(48,10),(48,9),(48,8),(48,7);
[0108] (49,11),(49,10),(49,9),(49,8),(49,7);
[0109] (50,11),(50,10),(50,9),(50,8),(50,7);}
[0110] Construct a 64×32 matrix Assign 1 to the element value at the corresponding position in the set S, and generate the elimination control matrix M c3 .like Figure 8 Shown is the rejection control matrix diagram of debris 5 and debris 6.
[0111] Matrix M c1 、M c2 、M c3 The control matrix M is obtained by addition operation and is represented by a two-dimensional coordinate diagram as follows: Fig. 9 As shown, the black squares in the figure are the coordinates of the elements in the elimination control matrix with non-zero values.
[0112] M=M c1 +M c2 +M c3
[0113] The coordinate values marked on the two-dimensional coordinate diagram of the elimination control matrix are the elimination unit position number and the elimination time period number. For example, the point (43,11) represents the elimination unit action numbered 43 in the time period 11.
Claims
1. A tobacco debris removal control method based on multi-algorithm fusion, characterized in that: include: Step 1: Construct the elimination control matrix Divide each frame of image in the width direction of the conveying device by the number of culling device units at equal intervals as the number of columns of the matrix, and use the matrix to control the position and time period of the culling unit action. The position where the element value of the matrix is 1 indicates that the culling unit performs the culling action at this position and in this time period; Step 2: Generation of detection and elimination control matrix After completing the acquisition of a frame of image, the foreign body targets in the image are detected by multiple algorithms to obtain multiple detection results. The detection results obtained by different algorithms are respectively mapped to the rejection control matrix corresponding to the output information of the algorithm, and the rejection matrix of the fusion algorithm is obtained by adding the rejection matrices of different algorithms. The representation of foreign object location information output by different visual detection algorithms can be divided into three categories: the first category is the pixel coordinate set representation of the area where the foreign object is located, the second category is the outline pixel set representation of the area where the foreign object is located, and the third category is the target rectangle coordinate set representation that contains the area where the foreign object is located; Add and combine the three types of foreign body output information rejection control matrices to obtain a unified rejection control matrix; Step 3: Foreign matter removal control When the material reaches the rejection position, the rejection control matrix is used to control the rejection cycle to accurately reject the foreign matter.
2. The tobacco debris removal control method of multi-algorithm fusion according to claim 1 is characterized in that: The step 1 also includes: The elimination control matrix is denoted by M Ctrl Indicates that the number of columns is W ctrl , the number of rows is H ctrl ; Each column of the elimination control matrix element corresponds to the pixel width w pix , each row of the elimination control matrix element corresponds to the pixel height h pix , the calculation formula is as follows: W ctrl =n ctrl (1) H ctrl =H pix / (Tf) (2) In pix =In pix / IN ctrl (3) h pix =H pix / HW ctrl (4) Where: W pix and H pix are the pixel width and height of a frame of image captured by the line scan camera, n ctrl is the number of rejection device units, f is the camera line scanning frequency, and T is the rejection control period.
3. The tobacco debris removal control method of multi-algorithm fusion according to claim 2 is characterized in that: The first type of foreign body position information mapping method in step 2 further includes: The pixel coordinates of the detected foreign body area are a binary set R, and any pixel point is represented by p(x, y); the corresponding binary set of the rejection control matrix is S, and any unit of the rejection control matrix is represented by coordinates as t(u, v); the corresponding mathematical expressions are equations (5) and (6), and the mapping relationship between the elements of the sets R and S is equations (7) and (8): R={(s,y)|x<W pix ,y< H pix },p∈R (5) S={(u,v)|u<W ctrl ,v< H ctrl },t∈S (6) The symbols in (7) and (8) are Indicates rounding down to an integer; According to formulas (1) and (2), construct a W ctrl ×H ctrl The zero matrix of Assign 1 to the element value at the corresponding position in the set S to generate the elimination control matrix M c1 .
4. The tobacco debris removal control method of multi-algorithm fusion according to claim 3 is characterized in that: The second type of foreign body position information mapping method in step 2 further includes: The contour information of the area where the foreign body is detected is a binary number set C, and any pixel point is represented by q(x, y). The image processing algorithm is used to form a closed contour area, fill the area inside the contour, and form the debris area information. The elimination control matrix generation method is consistent with the first type of foreign body position information mapping method. The generated elimination control matrix M c2 .
5. The tobacco debris removal control method of multi-algorithm fusion according to claim 4 is characterized in that: The method for mapping the location information of the third type of foreign matter in step 2 further includes: The number of target rectangles in the area where the foreign object is detected is n, and all target rectangles form a set Q. Each element in the set represents a target rectangle, and a target rectangle is represented by a quaternion set element r. The binary set of the rejection control matrix corresponding to all target rectangular areas is S, and any pixel point is represented by t(u, v). The mapping relationship between the set Q and S is respectively expressed as equations (9) and (10): Q={[(x ul ,y ul ),(x br ,y br )] m |x<W pix ,y< H pix ,m<n},r∈Q (9) S={(u,v) m |u<W ctrl ,v< H ctrl ,m<n},t∈S (10) Among them, the point (x ul ,y ul ) is the coordinate point of the upper left corner of the target rectangle, point (x br ,y br ) is the coordinate point of the lower right corner of the target rectangle; For any target rectangle, the coordinates of the upper left corner of the target rectangle are mapped to the coordinates in the culling control matrix as follows: For any target rectangle, the length and width of the target rectangle are mapped to the length k and width h in the elimination control matrix as follows: The calculation formula for eliminating the set S in the control matrix is as follows: Where i = 0 ~ k, j = 0 ~ h; According to formulas (1) and (2), construct a W ctrl ×H ctrl The zero matrix of Assign 1 to the element value at the corresponding position in the set S to generate the final elimination control matrix M c3 .
6. The tobacco debris removal control method of multi-algorithm fusion according to claim 5 is characterized in that: The step 2 also includes: The three types of foreign body output information rejection control matrices are added and combined to obtain a unified rejection control matrix M: M=M c1 +M c2 +M c3 (16) The positions of the non-zero elements in the matrix M are the positions and time periods where the culling unit performs culling actions.
7. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the tobacco debris removal control method of multi-algorithm fusion as described in any one of claims 1-6 are implemented.
8. A tobacco foreign body rejection system with multi-algorithm fusion, the system comprising a computer, a line scan camera and a plurality of rejection units evenly arranged along the cross section of a conveying device, characterized in that: The computer is provided with a computer-readable storage medium as claimed in claim 7.
