Composite filter stick state detection method and device, electronic equipment and storage medium

The image processing technology of the composite filter rod is obtained by obtaining the base rod image and abnormal status information, and automatically detecting the status of the composite filter rod, solving the problem of inaccurate manual detection in the existing technology, improving detection efficiency and accuracy, and ensuring product quality .

CN118941535APending Publication Date: 2024-11-12NANTONG CIGARETTE FILTER
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411010724.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-07-26
Publication Date
2024-11-12

Smart Images

  • Figure CN118941535A_ABST
    Figure CN118941535A_ABST
Patent Text Reader

Abstract

The embodiment of the invention discloses a composite filter stick state detection method and device, electronic equipment and a storage medium. The method comprises the following steps: acquiring a target base rod image corresponding to each type of base rod in a target composite filter rod to be detected and a gray interval and a segmentation threshold corresponding to each type of base rod in each abnormal state; determining a to-be-selected abnormal region corresponding to each type of base rod based on the target base rod image corresponding to each type of base rod and each gray interval; and determining a target composite filter stick state corresponding to the target composite filter stick based on the to-be-selected abnormal region corresponding to each base stick and each segmentation threshold value. According to the technical scheme of the embodiment of the invention, the state of the composite filter stick can be accurately and conveniently determined, so that the determination efficiency and accuracy of the state of the composite filter stick are improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The embodiments of the present invention relate to the field of image technology, and in particular to a composite filter rod state detection method, device, electronic equipment and storage medium. Background Art

[0002] With the development of technology and the diversification of filter rod products, composite filter rods such as empty tube filter rods, added filter rods, and scented line filter rods have become the main products in the market. In the production process of these composite filter rods, it is necessary to use composite forming paper and ordinary filter rods (base rods) for composite operation on a composite machine. However, in the process of using the composite machine to composite the base rod, due to improper position adjustment of some parts, the composite filter rods produced will have abnormal conditions such as base rod deformation or forming paper damage.

[0003] At present, manual inspection is usually used to observe whether the composite filter rod has abnormal conditions such as base rod deformation or forming paper damage. However, this manual inspection method is time-consuming and labor-intensive, and it is also impossible to accurately determine whether the composite filter rod has abnormal conditions. Summary of the invention

[0004] The embodiments of the present invention provide a composite filter rod state detection method, device, electronic device and storage medium to accurately and conveniently determine the composite filter rod state of a composite filter rod, thereby improving the efficiency and accuracy of determining the composite filter rod state.

[0005] In a first aspect, an embodiment of the present invention provides a method for detecting a state of a composite filter rod, comprising:

[0006] Obtaining a target base rod image corresponding to each base rod in the target composite filter rod to be detected and a grayscale interval and a segmentation threshold corresponding to each base rod in each abnormal state;

[0007] Based on the target base rod image and each grayscale interval corresponding to each base rod, determining the abnormal area to be selected corresponding to each base rod;

[0008] Based on the to-be-selected abnormal regions corresponding to each base rod and each segmentation threshold, the target composite filter rod state corresponding to the target composite filter rod is determined.

[0009] Optionally, the method further includes: the target composite filter rod includes at least two base rods; each base rod corresponds to a different color; each base rod in each abnormal state corresponds to a different grayscale interval and a different segmentation threshold.

[0010] Optionally, the method further comprises: acquiring a target base rod image corresponding to each base rod captured based on a capturing parameter corresponding to each base rod in the target composite filter rod.

[0011] Optionally, the method further includes: performing grayscale processing based on each target base rod image to obtain a target base rod grayscale image corresponding to each base rod; and determining each candidate abnormal area for each base rod in the target base rod image based on the pixel value of each pixel point in the target base rod grayscale image corresponding to each base rod and the grayscale interval corresponding to each abnormal state.

[0012] Optionally, the method also includes: performing region segmentation based on the pixel value of each pixel point in the selected abnormal region corresponding to each base rod and the segmentation threshold corresponding to each abnormal state, so as to obtain a candidate abnormal region for each base rod in the selected abnormal region; and determining a target composite filter rod state corresponding to the target composite filter rod based on the number of pixels in the candidate abnormal region corresponding to each base rod and a preset pixel number threshold corresponding to each abnormal state.

[0013] Optionally, the method further includes: acquiring an abnormal base rod image corresponding to each base rod in each abnormal state, and performing grayscale processing on each abnormal base rod image to obtain an abnormal base rod grayscale image corresponding to each base rod in each abnormal state; determining a grayscale interval corresponding to each base rod in each abnormal state based on a maximum pixel value and a minimum pixel value in an abnormal area of ​​the abnormal base rod grayscale image; determining a column pixel value corresponding to each column of pixels based on a total pixel value, a number of pixels and a preset weight of each column of pixels in the abnormal area of ​​the abnormal base rod grayscale image; and determining a segmentation threshold corresponding to each base rod in each abnormal state based on a column pixel difference between column pixel values ​​corresponding to adjacent columns of pixels.

[0014] Optionally, the method further comprises: if the target composite filter rod state is an abnormal state, removing the target composite filter rod corresponding to the target composite filter rod state from the conveying drum; the abnormal state comprises: at least one of base rod deformation and forming paper damage.

[0015] In a second aspect, an embodiment of the present invention further provides a composite filter rod state detection device, the device comprising:

[0016] A target base rod image acquisition module is used to acquire the target base rod image corresponding to each base rod in the target composite filter rod to be detected and the grayscale interval and segmentation threshold corresponding to each base rod in each abnormal state;

[0017] A module for determining an abnormal region to be selected, used for determining an abnormal region to be selected corresponding to each base rod based on a target base rod image and each grayscale interval corresponding to each base rod;

[0018] The target composite filter rod state determination module is used to determine the target composite filter rod state corresponding to the target composite filter rod based on the selected abnormal area corresponding to each base rod and each segmentation threshold.

[0019] In a third aspect, an embodiment of the present invention further provides an electronic device, the electronic device comprising:

[0020] one or more processors;

[0021] A memory for storing one or more programs;

[0022] When the one or more programs are executed by the one or more processors, the one or more processors implement the composite filter rod state detection method provided by any embodiment of the present invention.

[0023] In a fourth aspect, an embodiment of the present invention provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements a composite filter rod state detection method as provided in any embodiment of the present invention.

[0024] In a fifth aspect, an embodiment of the present invention provides a computer program product, including a computer program, which, when executed by a processor, implements a composite filter rod state detection method as provided in any embodiment of the present invention.

[0025] The technical solution of the embodiment of the present invention obtains the target base rod image corresponding to each base rod in the target composite filter rod to be detected and the grayscale interval and segmentation threshold corresponding to each base rod in each abnormal state; based on the target base rod image corresponding to each base rod and each grayscale interval, the selected abnormal area corresponding to each base rod is determined, thereby determining the area where the abnormality may exist, and based on the selected abnormal area corresponding to each base rod and each segmentation threshold, the target composite filter rod state corresponding to the target composite filter rod is determined, thereby accurately and conveniently determining the target composite filter rod state corresponding to the target composite filter rod, thereby improving the efficiency and accuracy of determining the target composite filter rod state.

[0026] It should be understood that the contents described in this section are not intended to identify the key or important features of the embodiments of the present invention, nor are they intended to limit the scope of the present invention. Other features of the present invention will become easily understood through the following description. BRIEF DESCRIPTION OF THE DRAWINGS

[0027] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the following briefly introduces the drawings required for use in the description of the embodiments. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.

[0028] Figure 1 is a flow chart of a composite filter rod state detection method provided in Embodiment 1 of the present invention;

[0029] Figure 2 This is an example diagram of an abnormal base rod image involved in the first embodiment of the present invention;

[0030] Figure 3 is an example diagram of another abnormal base rod image involved in the first embodiment of the present invention;

[0031] Figure 4 This is an example diagram of an abnormal base rod grayscale image involved in the first embodiment of the present invention;

[0032] Figure 5 is an example diagram of another abnormal base rod grayscale image involved in the first embodiment of the present invention;

[0033] Figure 6 is a flow chart of a composite filter rod state detection method provided by Embodiment 2 of the present invention;

[0034] Figure 7 It is a structural schematic diagram of a composite filter rod state detection device provided in Embodiment 3 of the present invention;

[0035] Figure 8 It is a structural schematic diagram of an electronic device for implementing the composite filter rod state detection method according to an embodiment of the present invention. DETAILED DESCRIPTION

[0036] In order to enable those skilled in the art to better understand the scheme of the present invention, the technical scheme in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of the present invention.

[0037] It should be noted that the terms "first", "second", etc. in the specification and claims of the present invention and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchanged where appropriate, so that the embodiments of the present invention described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device that includes a series of steps or units is not necessarily limited to those steps or units that are clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.

[0038] Embodiment 1

[0039] Figure 1A flow chart of a composite filter rod state detection method is provided for the first embodiment of the present invention. This embodiment can be applied to the case of determining the target composite filter rod state corresponding to the target composite filter rod. The method can be executed by a composite filter rod state detection device. The composite filter rod state detection device can be implemented in the form of hardware and / or software. The composite filter rod state detection device can be configured in an electronic device. Figure 1 As shown, the method includes:

[0040] S110, obtaining a target base rod image corresponding to each base rod in the target composite filter rod to be detected and a grayscale interval and a segmentation threshold corresponding to each base rod in each abnormal state.

[0041] Among them, the composite filter rod can be a special filter rod produced by compounding at least two base rods. The composite filter rod can take into account the advantages of multiple base rods. The target base rod image can refer to the target composite filter rod to be detected. There are at least two target base rod images of the target composite filter rod. The number of target base rod images is the same as or an integer multiple of the number of base rod types in the target composite filter rod. The grayscale interval corresponding to each type of base rod when in different abnormal states is different. The segmentation threshold corresponding to each type of base rod when in different abnormal states is different. The grayscale interval can refer to a preset grayscale value range. The grayscale interval can be used to screen areas in the image where abnormalities may exist. The segmentation threshold can refer to a preset grayscale threshold. The segmentation threshold can be used to segment areas where abnormalities may exist.

[0042] Specifically, the target base rod type information of the target composite filter rod to be detected is obtained from the memory storing the composite filter rod related information, and the target base rod image corresponding to each base rod is obtained based on the target base rod type information, and the grayscale interval and segmentation threshold corresponding to each base rod in each abnormal state are obtained from the preset standard library based on the target base rod type information. The preset standard library can be used to store the pre-set grayscale threshold and segmentation threshold corresponding to each base rod. The advantage of such a setting is that targeted image selection can be performed for each base rod in the composite filter rod, and the state of the composite filter rod can be determined using the targeted image, thereby improving the accuracy of determining the state of the composite filter rod.

[0043] On the basis of the above technical solution, the target composite filter rod includes at least two base rods; each base rod corresponds to a different color; each base rod in each abnormal state corresponds to a different grayscale interval and a different segmentation threshold.

[0044] Among them, for base rods of different colors, it is necessary to predetermine the grayscale interval and segmentation threshold corresponding to each color of base rod (i.e., each base rod) when it is in each abnormal state. The advantage of this setting is that a targeted grayscale interval and segmentation threshold can be selected for each base rod in the composite filter rod, and the image can be processed using the targeted grayscale interval and segmentation threshold, thereby improving the accuracy of image processing and further improving the accuracy of determining the state of the composite filter rod.

[0045] On the basis of the above technical scheme, "determining the grayscale interval and segmentation threshold corresponding to each base rod in each abnormal state" may include: obtaining an abnormal base rod image corresponding to each base rod in each abnormal state, and performing grayscale processing on each abnormal base rod image to obtain an abnormal base rod grayscale image corresponding to each base rod in each abnormal state; determining the grayscale interval corresponding to each base rod in each abnormal state based on the maximum pixel value and the minimum pixel value in the abnormal area of ​​the abnormal base rod grayscale image; determining the column pixel value corresponding to each column of pixels based on the total pixel value, the number of pixels and the preset weight of each column of pixels in the abnormal area of ​​the abnormal base rod grayscale image; and determining the segmentation threshold corresponding to each base rod in each abnormal state based on the column pixel difference between the column pixel values ​​corresponding to each adjacent column of pixels.

[0046] Among them, the abnormal base rod image may refer to the base rod image corresponding to the abnormal base rod. The abnormal base rod grayscale image may be a grayscale image obtained after the abnormal base rod image is grayscale processed. The total pixel value may refer to the sum of the pixel values ​​of all pixels in each column of pixels. The number of pixels may refer to the number of all pixels in each column of pixels. The preset weight may refer to a weight value pre-set based on the base rod type. The column pixel value may be used to characterize the comprehensive pixel value of all pixels in each column.

[0047] For example, Figure 2 An example of an abnormal base rod image is given, see Figure 2 , the forming paper of the fourth base rod from left to right in the abnormal base rod image is damaged. The first, fifth, and ninth base rods are base rods of the same color and the same type. The second, fourth, sixth, and eighth base rods are base rods of the same color and the same type. The third and seventh base rods are base rods of the same color and the same type. Figure 3 Another example of an abnormal base-bar image is given, see Figure 3 , the fourth base rod from left to right in the abnormal base rod image is deformed.

[0048] Specifically, an abnormal base rod image corresponding to each base rod in each abnormal state is obtained, and grayscale processing is performed on each abnormal base rod image to obtain an abnormal base rod grayscale image corresponding to each base rod in each abnormal state. Figure 4An example of an abnormal base rod grayscale image is given. Figure 4 , Figure 4 This is the grayscale image of abnormal base rods with damaged forming paper for the second and sixth base rods. The area in the white frame is the abnormal area. Figure 5 Another example of an abnormal base rod grayscale image is given. Figure 5 , Figure 5 It is an abnormal base rod grayscale image of base rod deformation for the second and sixth base rods. Among them, the area in the white box is the abnormal area. Based on the maximum pixel value and the minimum pixel value in the abnormal area of ​​the abnormal base rod grayscale image, the maximum pixel value and the minimum pixel value are used as the interval boundary to determine the boundary of the grayscale interval corresponding to each abnormal state of each base rod. The total pixel value M of each column of pixels in the abnormal area of ​​the abnormal base rod grayscale image is divided by the number of pixels N to obtain the column pixel mean S (S=M / N) of each column of pixels. Determine the variance U between the pixel value of each pixel in each column of pixels and the column pixel mean S of the column. Multiply the preset weight α with the variance U to obtain the weighted variance αU, and subtract the column pixel mean S of each column of pixels from the weighted variance αU to obtain the column pixel value T (T=S-αU). Determine the column pixel difference between the column pixel values ​​corresponding to each adjacent column of pixels, and group each column of pixels based on each column pixel difference and a preset difference threshold (such as 5) to obtain multiple sets. The column pixel difference values ​​less than the preset difference threshold and the adjacent column pixel points are placed in the same set. The average value of all column pixel values ​​in each set is determined, and the average value is determined as the segmentation threshold value of all column pixel points in the set, so as to determine the segmentation threshold value corresponding to each abnormal state of each base rod.

[0049] S120, determining a candidate abnormal region corresponding to each base rod based on the target base rod image and each grayscale interval corresponding to each base rod.

[0050] The abnormal region to be selected may refer to a region that may have abnormalities after preliminary screening.

[0051] Specifically, if the target composite filter rod is a three-color composite filter rod, there are three types of base rods (base rod A, base rod B and base rod C) in the target composite filter rod, and the three base rods correspond to their respective target base rod images (target base rod image A, target base rod image B and target base rod image C). The target base rod image A and the grayscale intervals (grayscale interval A1 and grayscale interval A2) corresponding to the base rod A in various abnormal states (such as base rod deformation and forming paper damage) are used to screen out pixel points with pixel values ​​within the grayscale interval, thereby determining the target base rod image A where the base rod A may have base rod deformation and the target base rod image A where the base rod A may have forming paper damage. By analogy, the selected abnormal area corresponding to each base rod is determined.

[0052] S130, determining a target composite filter rod state corresponding to the target composite filter rod based on the to-be-selected abnormal regions corresponding to each base rod and each segmentation threshold.

[0053] The composite filter rod state may include a normal state and an abnormal state. The normal state indicates that the composite filter rod is qualified in the current process and can enter the next process. The abnormal state indicates that the composite filter rod is unqualified in the current process and does not enter the next process. The abnormal state may include but is not limited to base rod deformation and forming paper damage.

[0054] Specifically, following the above example, the segmentation thresholds (segmentation threshold a1 and segmentation threshold a2) corresponding to the target base rod image A and the base rod A in various abnormal states (such as base rod deformation and forming paper damage) are used to perform regional segmentation, thereby determining the segmented area in the selected abnormal area where the base rod A in the target base rod image A may have base rod deformation and determining the segmented area in the selected abnormal area where the forming paper of the base rod A in the target base rod image A may have damage to the forming paper, and based on the determined segmented area and the preset mapping table, the base rod state corresponding to each selected abnormal area of ​​each base rod is determined, thereby determining the target composite filter rod state corresponding to the target composite filter rod using each base rod state.

[0055] Exemplarily, if all base rod states corresponding to all base rods in the target composite filter rod are in normal state, the target composite filter rod state corresponding to the target composite filter rod is determined as normal state. If any base rod state corresponding to any base rod in the target composite filter rod is in abnormal state, the target composite filter rod state corresponding to the target composite filter rod is determined as abnormal state. The abnormal state of the target composite filter rod is the same as the abnormal state of the base rod state.

[0056] The technical solution of the embodiment of the present invention obtains the target base rod image corresponding to each base rod in the target composite filter rod to be detected and the grayscale interval and segmentation threshold corresponding to each base rod in each abnormal state; based on the target base rod image corresponding to each base rod and each grayscale interval, the selected abnormal area corresponding to each base rod is determined, thereby determining the area where the abnormality may exist, and based on the selected abnormal area corresponding to each base rod and each segmentation threshold, the target composite filter rod state corresponding to the target composite filter rod is determined, thereby accurately and conveniently determining the target composite filter rod state corresponding to the target composite filter rod, thereby improving the efficiency and accuracy of determining the target composite filter rod state.

[0057] On the basis of the above technical solution, after determining the target composite filter rod state corresponding to the target composite filter rod, the method also includes: if the target composite filter rod state is an abnormal state, the target composite filter rod corresponding to the target composite filter rod state is removed from the conveying drum; the abnormal state includes: at least one of base rod deformation and forming paper damage.

[0058] The conveying drum is provided with a slot for placing the composite filter rod. An air hole can be provided under the slot for adsorbing the composite filter rod or blowing out the composite filter rod. The advantage of such a setting is that when the target composite filter rod is detected to be in an abnormal state, the target composite filter rod can be quickly removed, thereby improving the processing speed of unqualified target composite filter rods.

[0059] Specifically, if the conveying drum is conveying at a uniform speed, the position of the target composite filter rod can be calculated and the removal operation can be performed by using the acquisition time of the target base rod image and the determination time of the target composite filter rod state.

[0060] Embodiment 2

[0061] Figure 6 This is a flow chart of a composite filter rod state detection method provided in the second embodiment of the present invention. Based on the above embodiments, this embodiment describes in detail the process of determining the target composite filter rod state corresponding to the target composite filter rod. The explanations of the terms that are the same or corresponding to the above embodiments are not repeated here. Figure 6 As shown, the method includes:

[0062] S610, obtaining a target base rod image corresponding to each base rod in the target composite filter rod to be detected and a grayscale interval and a segmentation threshold corresponding to each base rod in each abnormal state.

[0063] On the basis of the above technical solution, "obtaining a target base rod image corresponding to each base rod in the target composite filter rod to be detected" may include: obtaining a target base rod image corresponding to each base rod shot based on shooting parameters corresponding to each base rod in the target composite filter rod.

[0064] The shooting parameters may include but are not limited to exposure parameters and gain parameters. The advantage of such setting is that a base rod can be highlighted in one image, making a base rod in the image clearer, and further improving the accuracy of determining the state of the composite filter rod.

[0065] Specifically, a camera is installed above the transfer drum, and the camera's shooting parameters are adjusted so that the camera can shoot the target composite filter rod based on the shooting parameters corresponding to each base rod in the target composite filter rod to obtain the target base rod image corresponding to each base rod.

[0066] S620: Determine the abnormal region to be selected corresponding to each base rod based on the target base rod image and each grayscale interval corresponding to each base rod.

[0067] On the basis of the above technical solution, "determining the candidate abnormal region corresponding to each base rod based on the target base rod image corresponding to each base rod and each grayscale interval" may include: performing grayscale processing based on each target base rod image to obtain the target base rod grayscale image corresponding to each base rod; determining each candidate abnormal region for each base rod in the target base rod image based on the pixel value of each pixel point in the target base rod grayscale image corresponding to each base rod and the grayscale interval corresponding to each abnormal state.

[0068] Among them, since the color image has a large amount of information and the speed of calculating features is slow, it does not meet the online detection speed requirements. Therefore, after the embodiment of the present invention grays the color image, it not only eliminates the noise in the image but also further improves the efficiency and accuracy of determining the state of the composite filter rod.

[0069] Specifically, grayscale processing is performed based on each target base rod image to obtain a target base rod grayscale image corresponding to each base rod. Pixel points whose pixel values ​​in the target base rod grayscale image corresponding to each base rod are within the grayscale interval corresponding to each abnormal state are used to form each selected abnormal area of ​​each base rod in the target base rod image.

[0070] S630, performing region segmentation based on the pixel value of each pixel point in the candidate abnormal region corresponding to each base rod and the segmentation threshold corresponding to each abnormal state, to obtain a candidate abnormal region for each base rod in the candidate abnormal region.

[0071] The candidate abnormal region may refer to a region that is segmented from the abnormal region to be selected and has a greater possibility of having an abnormality.

[0072] Specifically, the grayscale values ​​of the pixels whose pixel values ​​in the selected abnormal area corresponding to each base rod are less than or equal to the segmentation threshold corresponding to each abnormal state are changed to 0, and the grayscale values ​​of the pixels whose pixel values ​​in the selected abnormal area corresponding to each base rod are greater than the segmentation threshold corresponding to each abnormal state are changed to 255, thereby realizing regional segmentation, and the area where the pixels with a grayscale value of 0 are located is determined as the candidate abnormal area of ​​each base rod in the selected abnormal area.

[0073] S640: Determine a target composite filter rod state corresponding to the target composite filter rod based on the number of pixels in the candidate abnormal region corresponding to each base rod and a preset pixel number threshold corresponding to each abnormal state.

[0074] The preset pixel number threshold may refer to a preset minimum value of the number of pixels in the abnormal area belonging to each abnormal state. The preset pixel number threshold may be used to filter out pixel number thresholds with small area ranges.

[0075] Specifically, the number of pixels in the candidate abnormal area corresponding to each base rod is determined, and the candidate abnormal area whose number of pixels corresponding to each base rod is less than or equal to the preset pixel number threshold corresponding to each abnormal state is eliminated, and the candidate abnormal area whose number of pixels corresponding to each base rod is greater than the preset pixel number threshold corresponding to each abnormal state is determined as the abnormal area. Based on the abnormal state corresponding to each abnormal area, the target composite filter rod state corresponding to the target composite filter rod composed of multiple base rods is comprehensively determined.

[0076] The technical solution of the embodiment of the present invention performs region segmentation based on the pixel value of each pixel point in the selected abnormal region corresponding to each base rod and the segmentation threshold corresponding to each abnormal state, thereby obtaining a candidate abnormal region for each base rod in the selected abnormal region, thereby further narrowing the area where the abnormality may exist, and determining the target composite filter rod state corresponding to the target composite filter rod based on the number of pixels in the candidate abnormal region corresponding to each base rod and the preset pixel number threshold corresponding to each abnormal state, thereby further improving the accuracy of determining the composite filter rod state.

[0077] The following is an embodiment of a composite filter rod state detection device provided in an embodiment of the present invention. The device and the composite filter rod state detection methods of the above-mentioned embodiments belong to the same inventive concept. For details not described in detail in the embodiment of the composite filter rod state detection device, reference can be made to the embodiment of the above-mentioned composite filter rod state detection method.

[0078] Embodiment 3

[0079] Figure 7 This is a schematic diagram of the structure of a composite filter rod state detection device provided in Embodiment 3 of the present invention. Figure 7 As shown, the device includes: a target base rod image acquisition module 710, a to-be-selected abnormal region determination module 720 and a target composite filter rod state determination module 730.

[0080] Among them, the target base rod image acquisition module 710 is used to obtain the target base rod image corresponding to each base rod in the target composite filter rod to be detected and the grayscale interval and segmentation threshold corresponding to each base rod in each abnormal state; the selected abnormal area determination module 720 is used to determine the selected abnormal area corresponding to each base rod based on the target base rod image corresponding to each base rod and each grayscale interval; the target composite filter rod state determination module 730 is used to determine the target composite filter rod state corresponding to the target composite filter rod based on the selected abnormal area corresponding to each base rod and each segmentation threshold.

[0081] The technical solution of the embodiment of the present invention obtains the target base rod image corresponding to each base rod in the target composite filter rod to be detected and the grayscale interval and segmentation threshold corresponding to each base rod in each abnormal state; based on the target base rod image corresponding to each base rod and each grayscale interval, the selected abnormal area corresponding to each base rod is determined, thereby determining the area where the abnormality may exist, and based on the selected abnormal area corresponding to each base rod and each segmentation threshold, the target composite filter rod state corresponding to the target composite filter rod is determined, thereby accurately and conveniently determining the target composite filter rod state corresponding to the target composite filter rod, thereby improving the efficiency and accuracy of determining the target composite filter rod state.

[0082] On the basis of the above technical solution, the target composite filter rod includes at least two base rods; each base rod corresponds to a different color; each base rod in each abnormal state corresponds to a different grayscale interval and a different segmentation threshold.

[0083] On the basis of the above technical solution, the target base rod image acquisition module 710 is specifically used to: acquire the target base rod image corresponding to each base rod captured based on the capturing parameters corresponding to each base rod in the target composite filter rod.

[0084] On the basis of the above technical solution, the module 720 for determining the abnormal region to be selected is specifically used for: performing grayscale processing based on each target base rod image to obtain a target base rod grayscale image corresponding to each base rod; and determining each abnormal region to be selected for each base rod in the target base rod image based on the pixel value of each pixel point in the target base rod grayscale image corresponding to each base rod and the grayscale interval corresponding to each abnormal state.

[0085] On the basis of the above technical solution, the target composite filter rod state determination module 730 is specifically used to: perform region segmentation based on the pixel value of each pixel point in the selected abnormal area corresponding to each base rod and the segmentation threshold corresponding to each abnormal state, to obtain the candidate abnormal area for each base rod in the selected abnormal area; determine the target composite filter rod state corresponding to the target composite filter rod based on the number of pixels in the candidate abnormal area corresponding to each base rod and the preset pixel number threshold corresponding to each abnormal state.

[0086] On the basis of the above technical solution, the device also includes:

[0087] A threshold determination module, used to determine the grayscale interval and segmentation threshold corresponding to each abnormal state of each base rod;

[0088] The threshold determination module is specifically used for: obtaining an abnormal base rod image corresponding to each base rod in each abnormal state, and performing grayscale processing on each abnormal base rod image to obtain an abnormal base rod grayscale image corresponding to each base rod in each abnormal state; determining the grayscale interval corresponding to each base rod in each abnormal state based on the maximum pixel value and the minimum pixel value in the abnormal area of ​​the abnormal base rod grayscale image; determining the column pixel value corresponding to each column of pixels based on the total pixel value, the number of pixels and the preset weight of each column of pixels in the abnormal area of ​​the abnormal base rod grayscale image; and determining the segmentation threshold corresponding to each base rod in each abnormal state based on the column pixel difference between the column pixel values ​​corresponding to each adjacent column of pixels.

[0089] On the basis of the above technical solution, the device also includes:

[0090] The filter rod rejection module is used to reject the target composite filter rod corresponding to the target composite filter rod from the conveying drum wheel after determining the target composite filter rod state corresponding to the target composite filter rod, if the target composite filter rod state is an abnormal state; the abnormal state includes: at least one of base rod deformation and forming paper damage.

[0091] The composite filter rod state detection device provided in the embodiment of the present invention can execute the composite filter rod state detection method provided in any embodiment of the present invention, and has the corresponding functional modules and beneficial effects for executing the composite filter rod state detection method.

[0092] It is worth noting that in the above-mentioned embodiment of composite filter rod status detection, the various units and modules included are only divided according to functional logic, but are not limited to the above-mentioned division, as long as the corresponding functions can be achieved; in addition, the specific names of the functional units are only for the convenience of distinguishing each other, and are not used to limit the scope of protection of the present invention.

[0093] Embodiment 4

[0094] Figure 8 A schematic diagram of the structure of an electronic device 10 that can be used to implement an embodiment of the present invention is shown. The electronic device is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device can also represent various forms of mobile devices, such as personal digital processing, cellular phones, smart phones, wearable devices (such as helmets, glasses, watches, etc.) and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely examples and are not intended to limit the implementation of the present invention described and / or required herein.

[0095] like Figure 8As shown, the electronic device 10 includes at least one processor 11, and a memory connected to the at least one processor 11, such as a read-only memory (ROM) 12, a random access memory (RAM) 13, etc., wherein the memory stores a computer program that can be executed by at least one processor, and the processor 11 can perform various appropriate actions and processes according to the computer program stored in the read-only memory (ROM) 12 or the computer program loaded from the storage unit 18 to the random access memory (RAM) 13. In the RAM 13, various programs and data required for the operation of the electronic device 10 can also be stored. The processor 11, the ROM 12, and the RAM 13 are connected to each other through a bus 14. An input / output (I / O) interface 15 is also connected to the bus 14.

[0096] A number of components in the electronic device 10 are connected to the I / O interface 15, including: an input unit 16, such as a keyboard, a mouse, etc.; an output unit 17, such as various types of displays, speakers, etc.; a storage unit 18, such as a disk, an optical disk, etc.; and a communication unit 19, such as a network card, a modem, a wireless communication transceiver, etc. The communication unit 19 allows the electronic device 10 to exchange information / data with other devices through a computer network such as the Internet and / or various telecommunication networks.

[0097] The processor 11 can be various general and / or special processing components with processing and computing capabilities. Some examples of the processor 11 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various dedicated artificial intelligence (AI) computing chips, various processors running machine learning model algorithms, digital signal processors (DSPs), and any appropriate processors, controllers, microcontrollers, etc. The processor 11 executes the various methods and processes described above, such as a composite filter rod state detection method.

[0098] In some embodiments, the composite filter rod state detection method can be implemented as a computer program, which is tangibly contained in a computer-readable storage medium, such as a storage unit 18. In some embodiments, part or all of the computer program can be loaded and / or installed on the electronic device 10 via the ROM 12 and / or the communication unit 19. When the computer program is loaded into the RAM 13 and executed by the processor 11, one or more steps of the composite filter rod state detection method described above can be performed. Alternatively, in other embodiments, the processor 11 can be configured to perform the composite filter rod state detection method by any other appropriate means (for example, by means of firmware).

[0099] Various implementations of the systems and techniques described above herein can be implemented in digital electronic circuit systems, integrated circuit systems, field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on chips (SOCs), load programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various implementations can include: being implemented in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which can be a special purpose or general purpose programmable processor that can receive data and instructions from a storage system, at least one input device, and at least one output device, and transmit data and instructions to the storage system, the at least one input device, and the at least one output device.

[0100] Computer programs for implementing the methods of the present invention may be written in any combination of one or more programming languages. These computer programs may be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing device, so that when the computer program is executed by the processor, the functions / operations specified in the flow chart and / or block diagram are implemented. The computer program may be executed entirely on the machine, partially on the machine, partially on the machine and partially on a remote machine as a stand-alone software package, or entirely on a remote machine or server.

[0101] In the context of the present invention, a computer-readable storage medium may be a tangible medium that may contain or store a computer program for use by or in combination with an instruction execution system, device or equipment. A computer-readable storage medium may include, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, devices or equipment, or any suitable combination of the foregoing. Alternatively, a computer-readable storage medium may be a machine-readable signal medium. A more specific example of a machine-readable storage medium may include an electrical connection based on one or more lines, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.

[0102] To provide interaction with a user, the systems and techniques described herein may be implemented on an electronic device having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user; and a keyboard and a pointing device (e.g., a mouse or trackball) through which the user can provide input to the electronic device. Other types of devices may also be used to provide interaction with the user; for example, the feedback provided to the user may be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user may be received in any form (including acoustic input, voice input, or tactile input).

[0103] The systems and techniques described herein may be implemented in a computing system that includes backend components (e.g., as a data server), or a computing system that includes middleware components (e.g., an application server), or a computing system that includes frontend components (e.g., a user computer with a graphical user interface or a web browser through which a user can interact with implementations of the systems and techniques described herein), or a computing system that includes any combination of such backend components, middleware components, or frontend components. The components of the system may be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: a local area network (LAN), a wide area network (WAN), a blockchain network, and the Internet.

[0104] A computing system may include a client and a server. The client and the server are generally remote from each other and usually interact through a communication network. The client and server relationship is generated by computer programs running on the corresponding computers and having a client-server relationship with each other. The server may be a cloud server, also known as a cloud computing server or cloud host, which is a host product in the cloud computing service system to solve the defects of difficult management and weak business scalability in traditional physical hosts and VPS services.

[0105] An embodiment of the present invention further provides a computer program product, including a computer program, which, when executed by a processor, implements the composite filter rod state detection method provided in any embodiment of the present application.

[0106] In the process of implementation, the computer program product can be written in one or more programming languages ​​or their combination to perform the computer program code of the present invention, and the programming language includes object-oriented programming language, such as Java, Smalltalk, C++, and also includes conventional procedural programming language, such as "C" language or similar programming language. The program code can be executed completely on the user's computer, partially on the user's computer, as an independent software package, partially on the user's computer, partially on the remote computer, or completely on the remote computer or server. In the case of involving a remote computer, the remote computer can be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or can be connected to an external computer (for example, using an Internet service provider to connect through the Internet). The program product belongs to the same inventive concept as the composite filter rod state detection method disclosed in each embodiment of the present application, so it is not repeated here.

[0107] It should be understood that the various forms of processes shown above can be used to reorder, add or delete steps. For example, the steps described in the present invention can be executed in parallel, sequentially or in different orders, as long as the desired results of the technical solution of the present invention can be achieved, and this document does not limit this.

[0108] The above specific implementations do not constitute a limitation on the protection scope of the present invention. It should be understood by those skilled in the art that various modifications, combinations, sub-combinations and substitutions can be made according to design requirements and other factors. Any modification, equivalent substitution and improvement made within the spirit and principle of the present invention should be included in the protection scope of the present invention.

Claims

1. A method for detecting the state of a composite filter rod, characterized in that: include: Obtaining a target base rod image corresponding to each base rod in the target composite filter rod to be detected and a grayscale interval and a segmentation threshold corresponding to each base rod in each abnormal state; Based on the target base rod image and each grayscale interval corresponding to each base rod, determining the abnormal area to be selected corresponding to each base rod; Based on the to-be-selected abnormal regions corresponding to each base rod and each segmentation threshold, the target composite filter rod state corresponding to the target composite filter rod is determined.

2. The method according to claim 1, characterized in that The target composite filter rod comprises at least two base rods; each base rod corresponds to a different color; each base rod in each abnormal state corresponds to a different grayscale interval and a different segmentation threshold.

3. The method according to claim 1, characterized in that The step of obtaining a target base rod image corresponding to each base rod in the target composite filter rod to be detected comprises: A target base rod image corresponding to each base rod in the target composite filter rod is acquired based on the shooting parameters corresponding to each base rod in the target composite filter rod.

4. The method according to claim 1, characterized in that: The step of determining the abnormal region to be selected corresponding to each base rod based on the target base rod image and each grayscale interval corresponding to each base rod comprises: Grayscale processing is performed based on each target base rod image to obtain a target base rod grayscale image corresponding to each base rod; Based on the pixel value of each pixel point in the target base rod grayscale image corresponding to each base rod and the grayscale interval corresponding to each abnormal state, each abnormal area to be selected for each base rod in the target base rod image is determined.

5. The method according to claim 1, characterized in that The step of determining the target composite filter rod state corresponding to the target composite filter rod based on the selected abnormal region corresponding to each base rod and each segmentation threshold value includes: Performing region segmentation based on the pixel value of each pixel point in the candidate abnormal region corresponding to each base rod and the segmentation threshold corresponding to each abnormal state to obtain a candidate abnormal region for each base rod in the candidate abnormal region; Based on the number of pixels in the candidate abnormal area corresponding to each base rod and a preset pixel number threshold corresponding to each abnormal state, the target composite filter rod state corresponding to the target composite filter rod is determined.

6. The method according to claim 1, characterized in that Determine the grayscale interval and segmentation threshold corresponding to each abnormal state of each base rod, including: Acquire an abnormal base rod image corresponding to each base rod being in each abnormal state, and perform grayscale processing on each abnormal base rod image to obtain an abnormal base rod grayscale image corresponding to each base rod being in each abnormal state; Determine the grayscale interval corresponding to each abnormal state of each base rod based on the maximum pixel value and the minimum pixel value in the abnormal area of ​​the abnormal base rod grayscale image; Determine the column pixel value corresponding to each column of pixels based on the total pixel value, the number of pixels and a preset weight of each column of pixels in the abnormal area of ​​the abnormal base rod grayscale image; Based on the column pixel difference between the column pixel values ​​corresponding to each adjacent column of pixel points, the segmentation threshold corresponding to each base rod in each abnormal state is determined.

7. The method according to claim 1, characterized in that After determining the target composite filter rod state corresponding to the target composite filter rod, the method further includes: If the target composite filter rod state is an abnormal state, the target composite filter rod corresponding to the target composite filter rod state is removed from the conveying drum; the abnormal state includes: at least one of base rod deformation and forming paper damage.

8. A composite filter rod state detection device, characterized in that: The device comprises: A target base rod image acquisition module is used to acquire the target base rod image corresponding to each base rod in the target composite filter rod to be detected and the grayscale interval and segmentation threshold corresponding to each base rod in each abnormal state; A module for determining an abnormal region to be selected, used for determining an abnormal region to be selected corresponding to each base rod based on a target base rod image and each grayscale interval corresponding to each base rod; The target composite filter rod state determination module is used to determine the target composite filter rod state corresponding to the target composite filter rod based on the selected abnormal area corresponding to each base rod and each segmentation threshold.

9. An electronic device, characterized in that: The electronic device comprises: one or more processors; A memory for storing one or more programs; When the one or more programs are executed by the one or more processors, the one or more processors implement the composite filter rod state detection method as described in any one of claims 1-7.

10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the program is executed by a processor, the composite filter rod state detection method as described in any one of claims 1 to 7 is implemented.