Phase adjustment method, device, equipment and medium for composite filter rod production equipment
Patent Information
- Application Number
- CN202311570962.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-11-22
- Publication Date
- 2026-10-27
- Estimated Expiration
- 2043-11-22
Smart Images

Figure CN117582029B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of tobacco manufacturing technology, and in particular to a phase adjustment method, device, equipment and medium for composite filter rod production equipment. Background Technology
[0002] Currently, with the diversification of filter rod products, composite filter rods such as empty tube filter rods, feed filter rods, and scented filter rods have become the main products in the filter rod market. The production process of these composite filter rods requires combining special filter rods with ordinary filter rods on composite equipment to form the aforementioned composite filter rods.
[0003] However, due to issues such as the mechanical gain of the composite filter rod production equipment itself, the repeatability of the servo control zero-point position, and the synchronization of the cutting blade position in the die head, the produced composite filter rods may have quality problems. Among these, ensuring that the lengths of the first and last base rods in the composite filter rod are equal is one of the most critical technical indicators and plays a very important role in product quality control.
[0004] Therefore, composite filter rods are often evaluated for product quality through sampling measurements before leaving the factory. Currently, the main methods used are manual measurement after cutting and laser measurement after cutting. Manual measurement has drawbacks such as large errors and low efficiency, while laser measurement has drawbacks such as destructive measurement. Furthermore, neither of these methods can accurately detect whether the lengths of the first and last base rods in the composite filter rod are equal. Summary of the Invention
[0005] This invention provides a phase adjustment method, device, equipment, and medium for a composite filter rod production equipment. Based on visual inspection, it efficiently, accurately, and conveniently measures the lengths of the first and second base rods in the composite filter rod, facilitating subsequent automatic adjustment of the relative position between the slitting head in the composite filter rod production equipment and the cutting point of the composite filter rod.
[0006] In a first aspect, embodiments of the present invention provide a phase adjustment method for a composite filter rod production equipment, comprising:
[0007] Acquire the original image of the composite filter rod and perform grayscale processing on the original image to obtain an initial grayscale image;
[0008] Based on the initial grayscale image, the relationship between the lengths of the first base rod and the second base rod is determined; wherein the first base rod and the second base rod are located at opposite ends of the composite filter rod.
[0009] When the difference between the length of the first base rod and the length of the second base rod does not meet the preset error range, the relative position of the slitting head in the composite filter rod production equipment and the cutting point of the composite filter rod is adjusted until the difference between the length of the first base rod and the length of the second base rod meets the preset error range.
[0010] Secondly, embodiments of the present invention also provide a phase adjustment device for a composite filter rod production equipment, comprising:
[0011] The image acquisition module is used to acquire the original image of the composite filter rod and perform grayscale processing on the original image to obtain an initial grayscale image;
[0012] The length comparison module is used to determine the relationship between the lengths of the first base rod and the second base rod based on the initial grayscale image; wherein the first base rod and the second base rod are located at opposite ends of the composite filter rod;
[0013] The feedback adjustment module is used to adjust the relative position of the slitting head in the composite filter rod production equipment and the cutting point of the composite filter rod when the difference between the length of the first base rod and the length of the second base rod does not meet the preset error range, until the difference between the length of the first base rod and the length of the second base rod meets the preset error range.
[0014] Thirdly, embodiments of the present invention also provide a terminal device, including:
[0015] One or more processors;
[0016] Storage device for storing one or more programs;
[0017] When the one or more programs are executed by the one or more processors, the one or more processors implement the phase adjustment method for the composite filter rod production equipment as described in any of the first aspects.
[0018] Fourthly, embodiments of the present invention also provide a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the phase adjustment method of the composite filter rod production equipment as described in any of the first aspects.
[0019] This invention provides a phase adjustment method, device, equipment, and medium for a composite filter rod production equipment. The phase adjustment method first acquires the original image of the composite filter rod and performs grayscale processing on the original image to obtain an initial grayscale image. Then, based on the initial grayscale image, the relationship between the lengths of the first base rod and the second base rod is determined. The first base rod and the second base rod are located at opposite ends of the composite filter rod. Finally, when the difference between the lengths of the first base rod and the second base rod does not meet a preset error range, feedback adjustment is made to the relative position of the slitting head in the composite filter rod production equipment and the cutting point of the composite filter rod until the difference between the lengths of the first base rod and the second base rod meets the preset error range. Using the above method, based on visual inspection, the lengths of the first and second base rods in the composite filter rod are measured efficiently, accurately, and conveniently. Based on the comparison of the lengths of the first and second base rods, the relative position of the slitting head in the composite filter rod production equipment and the cutting point of the composite filter rod is automatically adjusted. This solves the phase drift problem in the production process of the composite filter rod production equipment and avoids the lag problem of manual adjustment. It realizes real-time monitoring of the composite filter rod production process, which facilitates the stable control of the product quality of the composite filter rod and improves the production quality level and yield of the composite filter rod. Attached Figure Description
[0020] Figure 1 This is a schematic flowchart of a phase adjustment method for a composite filter rod production equipment provided in an embodiment of the present invention;
[0021] Figure 2 This is a schematic flowchart of a phase adjustment method for another composite filter rod production equipment provided in an embodiment of the present invention;
[0022] Figure 3 This is a schematic flowchart of a phase adjustment method for another composite filter rod production equipment provided in an embodiment of the present invention;
[0023] Figure 4 This is a schematic flowchart of a phase adjustment method for another composite filter rod production equipment provided in an embodiment of the present invention;
[0024] Figure 5 This is a schematic flowchart of a phase adjustment method for another composite filter rod production equipment provided in an embodiment of the present invention;
[0025] Figure 6 This is a schematic diagram of the phase adjustment device of a composite filter rod production equipment provided in an embodiment of the present invention;
[0026] Figure 7 This is a schematic diagram of the structure of a terminal device provided in an embodiment of the present invention. Detailed Implementation
[0027] The present invention will now be described in further detail with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative of the invention and not intended to limit it. Furthermore, it should be noted that, for ease of description, the accompanying drawings show only the parts relevant to the present invention, and not all of the structures.
[0028] Figure 1 This is a schematic flowchart of a phase adjustment method for a composite filter rod production equipment according to an embodiment of the present invention. This phase adjustment method is applicable to the production of composite filter rods on a composite equipment. The phase adjustment method can be executed by a phase adjustment device of the composite filter rod production equipment. This phase adjustment device can be implemented in hardware and / or software, and can be configured in a control board. Figure 1 As shown, the phase adjustment method includes:
[0029] S110. Acquire the original image of the composite filter rod and perform grayscale processing on the original image to obtain the initial grayscale image.
[0030] Specifically, during the production process of the composite filter rod or before it leaves the factory, the original image of the composite filter rod (the original image is an unprocessed image; for example, the original image can be a color image) can be acquired by installing a probe or camera. Subsequent analysis and processing can then be performed on the original image of each composite filter rod. For example, the original image of the composite filter rod can be grayscaled using the formula Gray = 0.3R + 0.6G + 0.1B, where Gray is the grayscale value of the original image after grayscale processing, R is the red component of the original image, G is the green component, and B is the blue component. For example, the grayscale range of each of the three color components R, G, and B can be 0-255. The image obtained after grayscale processing is the initial grayscale image.
[0031] S120. Based on the initial grayscale image, determine the relationship between the lengths of the first base rod and the second base rod; wherein the first base rod and the second base rod are located at opposite ends of the composite filter rod.
[0032] Specifically, in the initial grayscale image, based on the grayscale values corresponding to each pixel, a grayscale value with a significant difference can be identified. The pixel corresponding to this significantly different grayscale value is likely located at the boundary line between the base rods in the composite filter rod. In the initial grayscale image, the distance between two adjacent boundary lines is the imaging length of the base rod between those two boundary lines. Subsequently, the imaging length of each base rod in the composite filter rod can be accurately determined based on the distance between two adjacent boundary lines. Furthermore, the actual length of each base rod in the composite filter rod can also be determined based on the imaging length of each base rod. It should be noted that the composite filter rod includes multiple base rods. Two base rods at opposite ends can be defined as the first base rod and the second base rod. For composite filters with special applications or effects, the lengths of the first and second base rods at both ends are generally required to be equal. Therefore, the production quality and yield of the composite filter rod can be reasonably judged based on the relationship between the lengths of the first and second base rods.
[0033] S130. When the difference between the length of the first base rod and the length of the second base rod does not meet the preset error range, the relative position of the slitting head and the cutting point of the composite filter rod in the composite filter rod production equipment is adjusted until the difference between the length of the first base rod and the length of the second base rod meets the preset error range.
[0034] The preset error range can be determined based on the production requirements of the composite filter rods and the slitting accuracy of the composite filter rod production equipment. Specifically, based on the relationship between the lengths of the first and second base rods, the judgment results include whether the lengths of the first and second base rods are equal or unequal. It can be understood that if the lengths of the first and second base rods are equal, the relative position of the slitting head in the composite filter rod production equipment and the point to be cut on the composite filter rod is error-free. Alternatively, if the difference between the lengths of the first and second base rods meets the preset error range (which can be understood as the allowable error range), the relative position error between the slitting head in the composite filter rod production equipment and the point to be cut on the composite filter rod is small, meaning there is no phase drift problem, and no adjustment is needed. However, if the difference between the lengths of the first and second base rods does not meet the preset error range, the relative position of the slitting head in the composite filter rod production equipment and the point to be cut on the composite filter rod needs to be adjusted until the difference between the lengths of the first and second base rods meets the preset error range. For example, the adjustment of the relative position between the slitting head and the cutting point of the composite filter rod in the composite filter rod production equipment can be achieved by adjusting the rotation speed of the conveyor motor to speed up or slow down the conveying speed of the composite filter rod on the conveyor belt, thereby changing the relative position between the slitting head and the cutting point of the composite filter rod in the composite filter rod production equipment; alternatively, the spatial position of the slitting head can be moved towards the cutting point of the composite filter rod, thereby reducing the relative position between the slitting head and the cutting point of the composite filter rod in the composite filter rod production equipment; or the positions of the slitting head and the cutting point of the composite filter rod can be moved simultaneously to accelerate the reduction of the positional difference between the two; thus effectively realizing real-time monitoring and adjustment of the composite filter rod production process.
[0035] In the technical solution of this invention embodiment, the phase adjustment method first acquires the original image of the composite filter rod and performs grayscale processing on the original image to obtain an initial grayscale image. Then, based on the initial grayscale image, the relationship between the lengths of the first base rod and the second base rod is determined. The first base rod and the second base rod are located at opposite ends of the composite filter rod. Finally, when the difference between the lengths of the first base rod and the second base rod does not meet the preset error range, the relative position of the slitting head in the composite filter rod production equipment and the cutting point of the composite filter rod is adjusted until the difference between the lengths of the first base rod and the second base rod meets the preset error range. Using the above method, based on visual inspection, the lengths of the first and second base rods in the composite filter rod are measured efficiently, accurately, and conveniently. Based on the comparison of the lengths of the first and second base rods, the relative position of the slitting head in the composite filter rod production equipment and the cutting point of the composite filter rod is automatically adjusted. This solves the phase drift problem in the production process of the composite filter rod production equipment and avoids the lag problem of manual adjustment. It realizes real-time monitoring of the composite filter rod production process, which facilitates the stable control of the product quality of the composite filter rod and improves the production quality level and yield of the composite filter rod.
[0036] Optionally, before binarizing the initial grayscale image to obtain an intermediate grayscale image, and determining the pixels in the initial grayscale image that belong to the composite filter based on the intermediate grayscale image, the method further includes performing bilateral filtering on the initial grayscale image. This allows the use of a bilateral filtering algorithm to eliminate noise in the initial grayscale image, making the features of the composite filter in the initial grayscale image more prominent.
[0037] Optionally, before binarizing the initial grayscale image to obtain an intermediate grayscale image, and determining the pixels belonging to the composite filter in the initial grayscale image based on the intermediate grayscale image, the method further includes performing a grayscale linear transformation on the initial grayscale image. This allows the use of a grayscale linear transformation formula to improve the image contrast of the initial grayscale image and increase the grayscale linear stretching to expand the dynamic range of grayscale values. This effectively solves the problem of the influence of ambient light during the acquisition of the original image of the composite filter. For example, if the pixel coordinates in the initial grayscale image of the composite filter are (x, y), then the grayscale linear transformation formula can be used... The initial grayscale image of the composite filter is subjected to grayscale linear transformation, where f(x,y) is the grayscale value of a pixel in the initial grayscale image of the composite filter, and the dynamic range of the grayscale value of f(x,y) is [a, b], and g(x,y) is the grayscale value of a pixel in the initial grayscale image of the composite filter after grayscale linear transformation, and the dynamic range of the grayscale value of g(x,y) is [c, d].
[0038] Figure 2 This is a schematic flowchart of a phase adjustment method for a composite filter rod production equipment provided in an embodiment of the present invention. This embodiment is an optimization based on the above embodiment. Optionally, determining the relationship between the lengths of the first base rod and the second base rod based on the initial grayscale image includes:
[0039] The initial grayscale image is binarized to obtain an intermediate grayscale image, and the pixels in the initial grayscale image that belong to the composite filter are determined based on the intermediate grayscale image.
[0040] Determine the gray values corresponding to the pixels belonging to the composite filter in the initial grayscale image, and determine the first gradient value and the second gradient value according to the gray values; wherein, the first gradient value is the gradient value of the gray value in the first direction and the second direction, and the second gradient value is the gradient value of the gray value in the third direction and the fourth direction. The first direction and the second direction are perpendicular to each other, the third direction and the fourth direction are perpendicular to each other, and the first direction, the second direction, the third direction and the fourth direction are not parallel to each other.
[0041] Based on the first gradient value and the second gradient value, the positions of the first boundary line and the second boundary line in the composite filter rod are determined; wherein, the first boundary line is the boundary line between the first base rod and the adjacent base rod, and the second boundary line is the boundary line between the second base rod and the adjacent base rod, and the extension direction of the first boundary line and the extension direction of the second boundary line are both parallel to the end face of the composite filter rod.
[0042] Based on the positions of the first and second dividing lines, determine the lengths of the first and second base rods, as well as the relationship between their lengths.
[0043] For details not covered in this embodiment, please refer to the above embodiments. Figure 2 As shown, the phase adjustment method includes:
[0044] S210. Acquire the original image of the composite filter rod and perform grayscale processing on the original image to obtain the initial grayscale image.
[0045] S220. Binarize the initial grayscale image to obtain an intermediate grayscale image, and determine the pixels in the initial grayscale image that belong to the composite filter rod based on the intermediate grayscale image.
[0046] Specifically, the initial grayscale image is binarized, that is, converted from a grayscale image to a binary image, so that the initial grayscale image exhibits a clear visual effect of color distinction. The image obtained after binarization is the intermediate grayscale image. In the intermediate grayscale image, the region corresponding to one color is the region containing the composite filter, and the region corresponding to the other color is the background region. This allows for accurate and rapid location of the composite filter region in the binary image. For example, this can be represented by drawing a bounding box around the edge of the composite filter region; the area within the box is the composite filter region. It is understood that the bounding box is only for visual and concrete representation of the composite filter region. Therefore, by analyzing the intermediate grayscale image and determining the region containing the composite filter, the bounding box is used to represent the region containing the composite filter in the initial grayscale image. All pixels within the bounding box in the initial grayscale image belong to the composite filter.
[0047] Optionally, the initial grayscale image is binarized to obtain an intermediate grayscale image, and the pixels in the initial grayscale image belonging to the composite filter are determined based on the intermediate grayscale image, including:
[0048] S2201. When the gray value of a pixel in the initial grayscale image meets the first preset grayscale range, the gray value of the pixel is modified to the first grayscale value.
[0049] S2202. When the gray value of a pixel in the initial grayscale image meets the second preset grayscale range, the gray value of the pixel is modified to the second grayscale value, and an intermediate grayscale image is obtained; wherein the first preset grayscale range and the second preset grayscale range do not intersect, and the first grayscale value is less than the second grayscale value.
[0050] The first grayscale value and the second grayscale value can be any value within the grayscale range of 0-255. The first grayscale value is less than the second grayscale value. For example, the first grayscale value can be 0 (displaying black in the image), and the second grayscale value can be 255 (displaying white in the image). In the initial grayscale image, it can be understood that the image color of the composite filter is darker than the image color of the background image, and the grayscale value of the composite filter image is smaller than the grayscale value of the background image. In order to increase the contrast between the image of the composite filter and the image of the background image, so that the image of the composite filter is clearly distinguished from the image of the background image, for example, the first preset grayscale range can be 190-220, and the second preset grayscale range can be 240-255. Specifically, the initial grayscale image is binarized. If the grayscale value of a pixel in the initial grayscale image meets a first preset grayscale range, the pixel's grayscale value is modified to the first grayscale value. If the grayscale value of a pixel in the initial grayscale image meets a second preset grayscale range, the pixel's grayscale value is modified to the second grayscale value. The resulting intermediate grayscale image will then exhibit a clear visual effect of only black and white. Furthermore, a frame can be drawn at the boundary between the black and white image regions; the area within the frame is the region where the composite filter is located, and the pixels within the frame are the pixels belonging to the composite filter.
[0051] S2203. In the intermediate grayscale image, the pixels with the first grayscale value are determined to be the pixels in the initial grayscale image that belong to the composite filter.
[0052] Specifically, the intermediate grayscale image can present a clear visual effect of only black and white. The black image area is the image area of the composite filter, and the white image area is the image area of the background. Then, the pixels with a grayscale value of the first grayscale value (for example, the first grayscale value can be 0 (black is displayed in the image)) can be identified as the pixels belonging to the composite filter in the initial grayscale image.
[0053] S230. Determine the gray values corresponding to the pixels belonging to the composite filter rod in the initial grayscale image, and determine the first gradient value and the second gradient value according to the gray values; wherein, the first gradient value is the gradient value of the gray value in the first direction and the second direction, and the second gradient value is the gradient value of the gray value in the third direction and the fourth direction. The first direction and the second direction are perpendicular to each other, the third direction and the fourth direction are perpendicular to each other, and the first direction, the second direction, the third direction and the fourth direction are not parallel to each other.
[0054] Understandably, because the materials of the substrates in a composite filter may differ, under high-brightness backlight transmission illumination from a white light source, the grayscale values of the substrates in the composite filter will vary, exhibiting different grayscale variation characteristics throughout the entire composite filter area. That is, the grayscale values corresponding to pixels within each substrate are uniformly distributed with minimal gradient changes, while the grayscale values of pixels near the boundaries between substrates are prone to abrupt changes and larger gradient changes. Therefore, the location of the boundaries between the substrates can be determined based on the gradient changes of the grayscale values corresponding to pixels in each substrate of the composite filter.
[0055] Optionally, determine the grayscale value corresponding to the pixel point belonging to the composite filter in the initial grayscale image, and determine the first gradient value and the second gradient value according to the grayscale value, including: according to the first gradient calculation formula. Calculate the first gradient value G1(f(x, y)); calculate the second gradient according to the formula. Calculate the second gradient value G2(f(x, y)); where x is the coordinate value of the pixel belonging to the composite filter in the initial grayscale image in the first direction, y is the coordinate value of the pixel belonging to the composite filter in the initial grayscale image in the second direction, f(x, y) is the grayscale value corresponding to the pixel belonging to the composite filter in the initial grayscale image, G1(f(x, y)) is the gradient value of the grayscale value corresponding to the pixel belonging to the composite filter in the initial grayscale image in the first and second directions; G2(f(x, y)) is the gradient value of the grayscale value corresponding to the pixel belonging to the composite filter in the initial grayscale image in the third and fourth directions.
[0056] Specifically, in the initial grayscale image, for pixels belonging to the composite filter rod, the grayscale gradient value of each pixel can be calculated. This calculation includes a first gradient calculation formula and a second gradient calculation formula. These two formulas address the gradient of the grayscale value corresponding to the pixel in different directions, and both formulas are used together to calculate the grayscale gradient value, effectively enhancing the efficiency and accuracy of determining the boundary lines between the base rods in the composite filter rod. Further, where x is the coordinate value of the pixel belonging to the composite filter rod in the initial grayscale image in the first direction, y is the coordinate value of the pixel belonging to the composite filter rod in the initial grayscale image in the second direction, and f(x, y) is the grayscale value corresponding to the pixel belonging to the composite filter rod in the initial grayscale image, then according to the gradient definition... and the definition of differential Therefore, the formula for calculating the first gradient can be derived. Calculate the gradient values of the gray values corresponding to the pixels belonging to the composite filter in the initial grayscale image along the first and second directions, i.e., the first gradient value G1(f(x, y)). Similarly, this can be done according to the gradient definition. and the definition of differential This leads to the formula for calculating the second gradient. Calculate the gradient values of the gray values corresponding to the pixels belonging to the composite filter in the initial grayscale image in the third and fourth directions, which are also known as the second gradient value G2(f(x, y)). For example, the first direction can be understood as the horizontal direction, the second direction as the vertical direction, the third direction as the 135° direction, and the fourth direction as the 45° direction. This embodiment of the invention is merely an example and is not intended to limit the scope; other directions are also applicable.
[0057] S240. Determine the positions of the first and second boundary lines in the composite filter rod based on the first gradient value and the second gradient value; wherein, the first boundary line is the boundary line between the first base rod and the adjacent base rod, the second boundary line is the boundary line between the second base rod and the adjacent base rod, and the extension direction of the first boundary line and the extension direction of the second boundary line are both parallel to the end face of the composite filter rod.
[0058] Specifically, based on the magnitudes of the first gradient value G1(f(x, y)) and the second gradient value G2(f(x, y)), the grayscale changes of the pixels belonging to the composite filter rods in the initial grayscale image can be determined, thereby determining the positions of the boundary lines between the base rods in the composite filter rod. That is, it mainly determines the positions of the first boundary line between the first base rod and its adjacent base rod, and the positions of the second boundary line between the second base rod and its adjacent base rod.
[0059] S250. Based on the positions of the first dividing line and the second dividing line, determine the length of the first base rod and the length of the second base rod, as well as the relationship between the lengths of the first base rod and the length of the second base rod.
[0060] Specifically, the positions of the first and second dividing lines can be coordinate positions. Based on the coordinate position of the first dividing line and the number of pixels between it and the end face of the composite filter rod (the side closer to the first base rod), the number of pixels occupied by the first base rod is determined. Similarly, based on the coordinate position of the second dividing line and the number of pixels between it and the end face of the composite filter rod (the side closer to the second base rod), the number of pixels occupied by the second base rod is determined. Then, the number of pixels occupied by the first and second base rods can be directly compared to provide feedback for adjusting the relative position of the slitting head and the cutting point of the composite filter rod in the composite filter rod production equipment. Alternatively, the imaging length of the first base rod can be determined based on the coordinate position of the first dividing line and the distance between it and the end face of the composite filter rod (the side closer to the first base rod). Similarly, based on the coordinates of the second dividing line and the distance between the coordinates of the second dividing line and the end face of the composite filter rod (the end face closer to the second base rod), the imaging length of the second base rod is determined. Then, the imaging lengths of the first and second base rods can be directly compared to provide feedback for adjusting the relative positions of the slitting head and the cutting points on the composite filter rod in the composite filter rod production equipment.
[0061] S260. When the difference between the length of the first base rod and the length of the second base rod does not meet the preset error range, the relative position of the slitting head and the point to be cut of the composite filter rod in the composite filter rod production equipment is adjusted until the difference between the length of the first base rod and the length of the second base rod meets the preset error range.
[0062] Figure 3 This is a schematic flowchart of a phase adjustment method for a composite filter rod production equipment provided in an embodiment of the present invention. This embodiment is an optimization based on the above embodiment. Optionally, determining the relationship between the lengths of the first base rod and the second base rod based on the initial grayscale image includes:
[0063] The initial grayscale image is binarized to obtain an intermediate grayscale image, and the pixels in the initial grayscale image that belong to the composite filter are determined based on the intermediate grayscale image.
[0064] Determine the gray values corresponding to the pixels belonging to the composite filter in the initial grayscale image, and determine the first gradient value and the second gradient value according to the gray values; wherein, the first gradient value is the gradient value of the gray value in the first direction and the second direction, and the second gradient value is the gradient value of the gray value in the third direction and the fourth direction. The first direction and the second direction are perpendicular to each other, the third direction and the fourth direction are perpendicular to each other, and the first direction, the second direction, the third direction and the fourth direction are not parallel to each other.
[0065] Based on the first gradient value and the second gradient value, the positions of the first boundary line and the second boundary line in the composite filter rod are determined; wherein, the first boundary line is the boundary line between the first base rod and the adjacent base rod, and the second boundary line is the boundary line between the second base rod and the adjacent base rod, and the extension direction of the first boundary line and the extension direction of the second boundary line are both parallel to the end face of the composite filter rod.
[0066] Based on the positions of the first and second dividing lines, determine the lengths of the first and second base rods, as well as the relationship between their lengths.
[0067] Furthermore, the composite filter rod includes a first end face and a second end face that are opposite to each other;
[0068] Based on the first gradient value and the second gradient value, determine the positions of the first boundary line and the second boundary line in the composite filter rod, including:
[0069] Determine the maximum value between the first gradient value and the second gradient value, and define it as the maximum gradient value;
[0070] Identify pixels whose maximum gradient value is greater than a preset gradient threshold;
[0071] Among the pixels whose maximum gradient value is greater than a preset gradient threshold, determine the first pixel that is closest to the first end face and the second pixel that is closest to the second end face;
[0072] A first target region is determined based on the first pixel; wherein the first target region includes the first pixel.
[0073] Within the first target area, a first straight line passing through the centroid of the first target area is defined as the first boundary line; wherein, the first straight line is parallel to the first end face;
[0074] A second target region is determined based on the second pixel; wherein the second target region includes the second pixel.
[0075] Within the second target area, a second straight line passing through the centroid of the second target area is defined as the second boundary line; wherein, the second straight line is parallel to the second end face.
[0076] For details not covered in this embodiment, please refer to the above embodiments. Figure 3 As shown, the phase adjustment method includes:
[0077] S301. Acquire the original image of the composite filter rod and perform grayscale processing on the original image to obtain the initial grayscale image.
[0078] S302. Binarize the initial grayscale image to obtain an intermediate grayscale image, and determine the pixels in the initial grayscale image that belong to the composite filter rod based on the intermediate grayscale image.
[0079] S303. Determine the gray values corresponding to the pixels belonging to the composite filter rod in the initial grayscale image, and determine the first gradient value and the second gradient value according to the gray values; wherein, the first gradient value is the gradient value of the gray value in the first direction and the second direction, and the second gradient value is the gradient value of the gray value in the third direction and the fourth direction. The first direction and the second direction are perpendicular to each other, the third direction and the fourth direction are perpendicular to each other, and the first direction, the second direction, the third direction and the fourth direction are not parallel to each other.
[0080] S304. Determine the maximum value between the first gradient value and the second gradient value, and define it as the maximum gradient value.
[0081] Specifically, for any pixel in the initial grayscale image that belongs to the composite filter rod, the grayscale value corresponding to that pixel is calculated through gradient, resulting in a first gradient value and a second gradient value. The first gradient value is the gradient of the grayscale value in the first and second directions, and the second gradient value is the gradient of the grayscale value in the third and fourth directions. It is understandable that near the boundary lines between the base rods in the composite filter rod, the gradient is prone to abrupt changes and significant variations. Therefore, based on the maximum value between the first and second gradient values, the regions of the base rods of different materials in the composite filter rod can be divided, thus determining the boundary lines between the base rods in the composite filter rod.
[0082] S305. Determine the pixels whose maximum gradient value is greater than the preset gradient threshold.
[0083] The preset gradient threshold can be determined based on the distribution of the base bars in the composite filter and the location of the boundaries between them. Specifically, the maximum gradient value corresponding to the grayscale value of each pixel belonging to the composite filter in the initial grayscale image is analyzed sequentially. If the maximum gradient value is greater than the preset gradient threshold, it can be preliminarily determined that the pixel corresponding to the maximum gradient value is located near the boundary between the base bars in the composite filter. If the maximum gradient value is less than or equal to the preset gradient threshold, it can be preliminarily determined that the pixel corresponding to the maximum gradient value is located inside the base bars in the composite filter and not near the boundary between them.
[0084] S306. Among the pixels whose maximum gradient value is greater than a preset gradient threshold, determine the first pixel closest to the first end face and determine the second pixel closest to the second end face.
[0085] Specifically, the composite filter rod includes a first base rod and a second base rod. The composite filter rod also includes a first end face and a second end face that are opposite each other. For example, the base rod closer to the first end face can be defined as the first base rod, and the base rod closer to the second end face can be defined as the second base rod. Among pixels whose maximum gradient value is greater than a preset gradient threshold, that is, among pixels initially identified as being near the boundary lines between the base rods in the composite filter rod, the pixel closest to the first end face is determined and defined as the first pixel, and the pixel closest to the second end face is determined and defined as the second pixel. The first pixel may be located on the boundary line between the first base rod and an adjacent base rod, and the second pixel may be located on the boundary line between the second base rod and an adjacent base rod.
[0086] S307. Determine a first target region based on the first pixel; wherein the first target region includes the first pixel.
[0087] Specifically, the first pixel may be located on the boundary line between the first base rod and the adjacent base rod. Then, based on this first pixel, a region including the first pixel can be determined and defined as the first target region. It is understood that the first target region includes the boundary line between the first base rod and the adjacent base rod. For example, the first target region can be a rectangular region, with its first side parallel to a first direction and its second side parallel to a second direction.
[0088] S308. Within the first target area, a first straight line passing through the centroid of the first target area is defined as the first boundary line; wherein, the first straight line is parallel to the first end face.
[0089] Specifically, within the first target area, a first straight line passing through the centroid of the first target area and parallel to the first end face can be defined as the first boundary line. That is, the specific location of the first boundary line is indirectly determined based on the first target area. It should be noted that the shape of the first target area can be selected based on the actual shape of the composite filter rod and the actual shape of the boundary line. The shape of the first target area can be the same as the actual shape of the boundary line. The first target area can be a regular shape or an irregular shape. It can be understood that the boundary line between the first base rod and the adjacent base rod in the composite filter rod may pass through the centroid of the first target area; therefore, the location of the first boundary line is indirectly determined based on the centroid of the first target area.
[0090] S309. Determine the second target region based on the second pixel point; wherein the second target region includes the second pixel point.
[0091] Specifically, the second pixel may be located on the boundary line between the second base rod and the adjacent base rod. Then, based on this second pixel, a region including the second pixel can be determined and defined as the second target region. It is understood that the second target region includes the boundary line between the second base rod and the adjacent base rod. For example, the second target region can be a rectangular region, with its first side parallel to a first direction and its second side parallel to a second direction.
[0092] S310. Within the second target area, a second straight line passing through the centroid of the second target area is defined as the second boundary line; wherein, the second straight line is parallel to the second end face.
[0093] Specifically, within the second target area, a second straight line passing through the centroid of the second target area and parallel to the second end face can be defined as the second boundary line. That is, the specific location of the second boundary line is indirectly determined based on the second target area. It should be noted that the shape of the second target area can be selected based on the actual shape of the composite filter rod and the actual shape of the boundary line. The shape of the second target area can be the same as the actual shape of the boundary line. The second target area can be a regular shape or an irregular shape. It can be understood that the boundary line between the second base rod and the adjacent base rod in the composite filter rod may pass through the centroid of the second target area; therefore, the location of the second boundary line is indirectly determined based on the centroid of the second target area.
[0094] S311. Based on the positions of the first dividing line and the second dividing line, determine the length of the first base rod and the length of the second base rod, as well as the relationship between the lengths of the first base rod and the length of the second base rod.
[0095] S312. When the difference between the length of the first base rod and the length of the second base rod does not meet the preset error range, the relative position of the slitting head and the cutting point of the composite filter rod in the composite filter rod production equipment is adjusted until the difference between the length of the first base rod and the length of the second base rod meets the preset error range.
[0096] Figure 4 This is a schematic flowchart of a phase adjustment method for a composite filter rod production equipment provided in an embodiment of the present invention. This embodiment is an optimization based on the above embodiment. Optionally, determining the relationship between the lengths of the first base rod and the second base rod based on the initial grayscale image includes:
[0097] The initial grayscale image is binarized to obtain an intermediate grayscale image, and the pixels in the initial grayscale image that belong to the composite filter are determined based on the intermediate grayscale image.
[0098] Determine the gray values corresponding to the pixels belonging to the composite filter in the initial grayscale image, and determine the first gradient value and the second gradient value according to the gray values; wherein, the first gradient value is the gradient value of the gray value in the first direction and the second direction, and the second gradient value is the gradient value of the gray value in the third direction and the fourth direction. The first direction and the second direction are perpendicular to each other, the third direction and the fourth direction are perpendicular to each other, and the first direction, the second direction, the third direction and the fourth direction are not parallel to each other.
[0099] Based on the first gradient value and the second gradient value, the positions of the first boundary line and the second boundary line in the composite filter rod are determined; wherein, the first boundary line is the boundary line between the first base rod and the adjacent base rod, and the second boundary line is the boundary line between the second base rod and the adjacent base rod, and the extension direction of the first boundary line and the extension direction of the second boundary line are both parallel to the end face of the composite filter rod.
[0100] Based on the positions of the first and second dividing lines, determine the lengths of the first and second base rods, as well as the relationship between their lengths.
[0101] Furthermore, based on the positions of the first and second boundary lines, the lengths of the first and second base rods, as well as the relationship between their lengths, are determined, including:
[0102] Based on the positions of the first and second boundary lines, determine the imaging length of the first base rod and the imaging length of the second base rod, as well as the relationship between the imaging lengths of the first and second base rods.
[0103] When the difference between the lengths of the first and second base rods does not meet the preset error range, feedback adjustment is made to the relative position of the slitting head and the cutting point of the composite filter rod in the composite filter rod production equipment until the difference between the lengths of the first and second base rods meets the preset error range, including:
[0104] When the difference between the imaging length of the first base rod and the imaging length of the second base rod does not meet the preset error range, the relative position of the slitting head and the cutting point of the composite filter rod in the composite filter rod production equipment is adjusted until the difference between the length of the first base rod and the length of the second base rod meets the preset error range.
[0105] For details not covered in this embodiment, please refer to the above embodiments. Figure 4 As shown, the phase adjustment method includes:
[0106] S410. Acquire the original image of the composite filter rod and perform grayscale processing on the original image to obtain the initial grayscale image.
[0107] S420. Binarize the initial grayscale image to obtain an intermediate grayscale image, and determine the pixels in the initial grayscale image that belong to the composite filter rod based on the intermediate grayscale image.
[0108] S430. Determine the gray values corresponding to the pixels belonging to the composite filter rod in the initial grayscale image, and determine the first gradient value and the second gradient value according to the gray values; wherein, the first gradient value is the gradient value of the gray value in the first direction and the second direction, and the second gradient value is the gradient value of the gray value in the third direction and the fourth direction. The first direction and the second direction are perpendicular to each other, the third direction and the fourth direction are perpendicular to each other, and the first direction, the second direction, the third direction and the fourth direction are not parallel to each other.
[0109] S440. Determine the positions of the first and second boundary lines in the composite filter rod based on the first and second gradient values; wherein the first boundary line is the boundary line between the first base rod and the adjacent base rod, the second boundary line is the boundary line between the second base rod and the adjacent base rod, and the extension directions of the first and second boundary lines are both parallel to the end face of the composite filter rod.
[0110] S450. Based on the positions of the first boundary line and the second boundary line, determine the imaging length of the first base rod and the imaging length of the second base rod, as well as the relationship between the size of the imaging length of the first base rod and the imaging length of the second base rod.
[0111] Specifically, the positions of the first and second dividing lines include their coordinate positions. Based on the coordinate positions of the first dividing line and the distance between its coordinate position and the end face of the composite filter rod (the end face closer to the first base rod), the imaging length of the first base rod can be determined in the initial grayscale image. Similarly, based on the coordinate positions of the second dividing line and the distance between its coordinate position and the end face of the composite filter rod (the end face closer to the second base rod), the imaging length of the second base rod can be determined in the initial grayscale image. Then, the imaging lengths of the first and second base rods can be directly compared to provide feedback for adjusting the relative positions of the slitting head and the cutting points on the composite filter rod in the composite filter rod production equipment.
[0112] S460. When the difference between the imaging length of the first base rod and the imaging length of the second base rod does not meet the preset error range, the relative position of the slitting head and the cutting point of the composite filter rod in the composite filter rod production equipment is adjusted until the difference between the length of the first base rod and the length of the second base rod meets the preset error range.
[0113] Specifically, in one embodiment, the imaging length of the first base rod can be m1, the imaging length of the second base rod can be m2, and the preset error range can be [-b, b]. When the difference between the imaging length of the first base rod and the imaging length of the second base rod meets the preset error range, that is, when -b≤m1-m2≤b, or when |m1-m2|≤b, it is not necessary to adjust the slitting head in the composite filter rod production equipment (this adjustment includes moving the position of the slitting head, replacing the slitting head, etc.), nor is it necessary to adjust the conveying speed of the composite filter rod to be cut on the conveyor belt (this adjustment includes increasing, decreasing, pausing, etc.). When the difference between the imaging length of the first base rod and the imaging length of the second base rod does not meet the preset error range (i.e., m1-m2>b or m1-m2<-b, i.e., |m1-m2|>b), the relative position of the slitting head and the cutting point of the composite filter rod in the composite filter rod production equipment needs to be adjusted so that the difference between the lengths of the first and second base rods meets the preset error range, i.e., |m1-m2|≤b. No further adjustment is needed after this. Furthermore, if m1-m2>2b or m1-m2<-2b (i.e., |m1-m2|>2b), it indicates a large error in the production process of the composite filter rod, with a serious phase drift problem. The composite filter rod should be immediately rejected by the rejection wheel, and an alarm sound should be emitted to alert relevant personnel.
[0114] Figure 5 This is a schematic flowchart of a phase adjustment method for a composite filter rod production equipment provided in an embodiment of the present invention. This embodiment is an optimization based on the above embodiment. Optionally, determining the relationship between the lengths of the first base rod and the second base rod based on the initial grayscale image includes:
[0115] The initial grayscale image is binarized to obtain an intermediate grayscale image, and the pixels in the initial grayscale image that belong to the composite filter are determined based on the intermediate grayscale image.
[0116] Determine the gray values corresponding to the pixels belonging to the composite filter in the initial grayscale image, and determine the first gradient value and the second gradient value according to the gray values; wherein, the first gradient value is the gradient value of the gray value in the first direction and the second direction, and the second gradient value is the gradient value of the gray value in the third direction and the fourth direction. The first direction and the second direction are perpendicular to each other, the third direction and the fourth direction are perpendicular to each other, and the first direction, the second direction, the third direction and the fourth direction are not parallel to each other.
[0117] Based on the first gradient value and the second gradient value, the positions of the first boundary line and the second boundary line in the composite filter rod are determined; wherein, the first boundary line is the boundary line between the first base rod and the adjacent base rod, and the second boundary line is the boundary line between the second base rod and the adjacent base rod, and the extension direction of the first boundary line and the extension direction of the second boundary line are both parallel to the end face of the composite filter rod.
[0118] Based on the positions of the first and second dividing lines, determine the lengths of the first and second base rods, as well as the relationship between their lengths.
[0119] Furthermore, based on the positions of the first and second boundary lines, the lengths of the first and second base rods, as well as the relationship between their lengths, are determined, including:
[0120] Based on the positions of the first and second boundary lines, determine the imaging length of the first base rod and the imaging length of the second base rod.
[0121] Based on the imaging length of the first base rod and the imaging length of the second base rod, as well as the preset ratio between the imaging length of the calibration block and the actual length, the actual length of the first base rod and the actual length of the second base rod, and the size relationship between the actual length of the first base rod and the actual length of the second base rod are determined.
[0122] When the difference between the lengths of the first and second base rods does not meet the preset error range, feedback adjustment is made to the relative position of the slitting head and the cutting point of the composite filter rod in the composite filter rod production equipment until the difference between the lengths of the first and second base rods meets the preset error range, including:
[0123] When the difference between the actual length of the first base rod and the actual length of the second base rod does not meet the preset error range, the relative position of the slitting head and the cutting point of the composite filter rod in the composite filter rod production equipment is adjusted until the difference between the length of the first base rod and the length of the second base rod meets the preset error range.
[0124] For details not covered in this embodiment, please refer to the above embodiments. Figure 5 As shown, the phase adjustment method includes:
[0125] S510. Acquire the original image of the composite filter rod and perform grayscale processing on the original image to obtain the initial grayscale image.
[0126] S520. Binarize the initial grayscale image to obtain an intermediate grayscale image, and determine the pixels in the initial grayscale image that belong to the composite filter rod based on the intermediate grayscale image.
[0127] S530. Determine the gray values corresponding to the pixels belonging to the composite filter rod in the initial grayscale image, and determine the first gradient value and the second gradient value according to the gray values; wherein, the first gradient value is the gradient value of the gray value in the first direction and the second direction, and the second gradient value is the gradient value of the gray value in the third direction and the fourth direction. The first direction and the second direction are perpendicular to each other, the third direction and the fourth direction are perpendicular to each other, and the first direction, the second direction, the third direction and the fourth direction are not parallel to each other.
[0128] S540. Determine the positions of the first and second boundary lines in the composite filter rod based on the first gradient value and the second gradient value; wherein, the first boundary line is the boundary line between the first base rod and the adjacent base rod, the second boundary line is the boundary line between the second base rod and the adjacent base rod, and the extension direction of the first boundary line and the extension direction of the second boundary line are both parallel to the end face of the composite filter rod.
[0129] S550. Based on the positions of the first boundary line and the second boundary line, determine the imaging length of the first base rod and the imaging length of the second base rod.
[0130] Specifically, the positions of the first and second boundary lines include their coordinate positions. Based on the coordinate positions of the first boundary line and the distance between its coordinate position and the end face of the composite filter rod (the end face closer to the first base rod), the imaging length of the first base rod can be determined in the initial grayscale image. Similarly, based on the coordinate positions of the second boundary line and the distance between its coordinate position and the end face of the composite filter rod (the end face closer to the second base rod), the imaging length of the second base rod can be determined in the initial grayscale image.
[0131] S560. Based on the imaging length of the first base rod and the imaging length of the second base rod, as well as the preset ratio between the imaging length of the calibration block and the actual length, determine the actual length of the first base rod and the actual length of the second base rod, and the size relationship between the actual length of the first base rod and the actual length of the second base rod.
[0132] Specifically, a calibration block can be used to calibrate camera parameters, analyze the relationship between the image size and actual size of the object, and determine a preset ratio between the image length and actual length of the calibration block. For example, the actual length of the calibration block can be 10mm, the number of pixels it occupies in the camera image can be 3, and the image length of the calibration block can be 2mm; then the preset ratio between the image length and actual length of the calibration block is 1 / 5. Furthermore, it can be understood that this preset ratio can also be determined based on the ratio of the camera's horizontal resolution to its horizontal field of view. For example, the image length of the first base rod can be L1, the actual length of the first base rod can be L2, the image length of the calibration block can be A1, and the actual length of the calibration block can be A2; then, according to the formula... The actual length L2 of the first base rod can be determined. Similarly, the imaging length of the second base rod can be L3, the actual length of the second base rod can be L4, the actual length of the first base rod can be L2, the imaging length of the calibration block can be A1, and the actual length of the calibration block can be A2. Then, according to the formula... The actual length L4 of the second base rod can be determined. Then, the actual lengths of the first and second base rods can be directly compared to adjust the relative positions of the slitting head and the cutting point of the composite filter rod in the composite filter rod production equipment.
[0133] S570 When the difference between the actual length of the first base rod and the actual length of the second base rod does not meet the preset error range, the relative position of the slitting head and the cutting point of the composite filter rod in the composite filter rod production equipment is adjusted until the difference between the length of the first base rod and the length of the second base rod meets the preset error range.
[0134] Specifically, in one embodiment, the actual length of the first base rod can be n1, the actual imaging length of the second base rod can be n2, and the preset error range can be [-c, c]. When the difference between the actual lengths of the first and second base rods satisfies the preset error range, that is, -c≤n1-n2≤c, or |n1-n2|≤c, it is not necessary to adjust the slitting head in the composite filter rod production equipment (this adjustment includes moving the position of the slitting head, replacing the slitting head, etc.), nor is it necessary to adjust the conveying speed of the composite filter rod to be cut points on the conveyor belt (this adjustment includes increasing, decreasing, or pausing the conveying speed, etc.). When the difference between the actual length of the first base rod and the actual length of the second base rod does not meet the preset error range (i.e., n1-n2>c or n1-n2<-c, i.e., |n1-n2|>c), the relative position of the slitting head and the cutting point of the composite filter rod in the composite filter rod production equipment needs to be adjusted so that the difference between the lengths of the first and second base rods meets the preset error range, i.e., |n1-n2|≤c. No further adjustment is needed after this. Furthermore, if n1-n2>2c or n1-n2<-2c (i.e., |n1-n2|>2c), it indicates a large error in the production process of the composite filter rod, with a serious phase drift problem. The composite filter rod should be immediately rejected by the rejection wheel, and an alarm sound should be emitted to alert relevant personnel.
[0135] Figure 6 This is a schematic diagram of the phase adjustment device of a composite filter rod production equipment according to an embodiment of the present invention. This phase adjustment device is applicable to the production of composite filter rods on composite equipment. The phase adjustment device can be implemented in hardware and / or software and is generally configured in a control board. Figure 6 As shown, the phase adjustment device includes:
[0136] Image acquisition module 61 is used to acquire the original image of the composite filter rod and perform grayscale processing on the original image to obtain an initial grayscale image; length comparison module 62 is used to determine the relationship between the lengths of the first base rod and the second base rod based on the initial grayscale image; wherein the first base rod and the second base rod are located at opposite ends of the composite filter rod; feedback adjustment module 63 is used to adjust the relative position of the slitting head in the composite filter rod production equipment and the cutting point of the composite filter rod when the difference between the lengths of the first base rod and the second base rod does not meet the preset error range, until the difference between the lengths of the first base rod and the second base rod meets the preset error range.
[0137] In the technical solution of this invention embodiment, the phase adjustment method first acquires the original image of the composite filter rod and performs grayscale processing on the original image to obtain an initial grayscale image. Then, based on the initial grayscale image, the relationship between the lengths of the first base rod and the second base rod is determined. The first base rod and the second base rod are located at opposite ends of the composite filter rod. Finally, when the difference between the lengths of the first base rod and the second base rod does not meet the preset error range, the relative position of the slitting head in the composite filter rod production equipment and the cutting point of the composite filter rod is adjusted until the difference between the lengths of the first base rod and the second base rod meets the preset error range. Using the above method, based on visual inspection, the lengths of the first and second base rods in the composite filter rod are measured efficiently, accurately, and conveniently. Based on the comparison of the lengths of the first and second base rods, the relative position of the slitting head in the composite filter rod production equipment and the cutting point of the composite filter rod is automatically adjusted. This solves the phase drift problem in the production process of the composite filter rod production equipment and avoids the lag problem of manual adjustment. It realizes real-time monitoring of the composite filter rod production process, which facilitates the stable control of the product quality of the composite filter rod and improves the production quality level and yield of the composite filter rod.
[0138] Based on the above technical solution, optionally, the length comparison module may specifically include a pixel point determination unit, a gradient value determination unit, a boundary line determination unit, and a length comparison unit. The pixel point determination unit is used to perform binarization processing on the initial grayscale image to obtain an intermediate grayscale image, and determine the pixels in the initial grayscale image that belong to the composite filter based on the intermediate grayscale image. The gradient value determination unit is used to determine the grayscale value corresponding to the pixels in the initial grayscale image that belong to the composite filter, and determine the first gradient value and the second gradient value based on the grayscale value. The first gradient value is the gradient value of the grayscale value in the first and second directions, and the second gradient value is the gradient value of the grayscale value in the third and fourth directions. The first, second, third, and fourth directions are perpendicular to each other, and are not parallel to each other. The boundary line determination unit is used to determine the positions of the first and second boundary lines in the composite filter rod based on the first and second gradient values. The first boundary line is the boundary line between the first base rod and the adjacent base rod, and the second boundary line is the boundary line between the second base rod and the adjacent base rod. The extension directions of the first and second boundary lines are both parallel to the end face of the composite filter rod. The length comparison unit is used to determine the length of the first base rod and the length of the second base rod, as well as the relationship between the lengths of the first and second base rods, based on the positions of the first and second boundary lines.
[0139] Optionally, the pixel determination unit may specifically include a grayscale value modification subunit and a pixel determination subunit. The grayscale value modification subunit is used to modify the grayscale value of a pixel to a first grayscale value when the grayscale value of a pixel in the initial grayscale image meets a first preset grayscale range; it is also used to modify the grayscale value of a pixel to a second grayscale value when the grayscale value of a pixel in the initial grayscale image meets a second preset grayscale range, and obtain an intermediate grayscale image; wherein the first preset grayscale range and the second preset grayscale range do not intersect, and the first grayscale value is less than the second grayscale value; the pixel determination subunit is used to determine, in the intermediate grayscale image, that a pixel with a grayscale value of the first grayscale value is a pixel belonging to the composite filter in the initial grayscale image.
[0140] Optionally, the gradient value determination unit may specifically include a first gradient value determination subunit and a second gradient value determination subunit, wherein the first gradient value determination subunit is used to calculate the gradient value according to the first gradient formula. Calculate the first gradient value G1(f(x, y)); the second gradient value determination sub-unit is used to calculate the second gradient value according to the formula. Calculate the second gradient value G2(f(x, y)); where x is the coordinate value of the pixel belonging to the composite filter in the initial grayscale image in the first direction, y is the coordinate value of the pixel belonging to the composite filter in the initial grayscale image in the second direction, f(x, y) is the grayscale value corresponding to the pixel belonging to the composite filter in the initial grayscale image, G1(f(x, y)) is the gradient value of the grayscale value corresponding to the pixel belonging to the composite filter in the initial grayscale image in the first and second directions; G2(f(x, y)) is the gradient value of the grayscale value corresponding to the pixel belonging to the composite filter in the initial grayscale image in the third and fourth directions.
[0141] Optionally, the composite filter rod includes a first end face and a second end face that are opposite each other;
[0142] The boundary line determination unit may specifically include a maximum gradient value determination subunit, a gradient pixel point determination subunit, a distance pixel point determination subunit, a first region determination subunit, a first boundary line determination subunit, a second region determination subunit, and a second boundary line determination subunit.
[0143] The maximum gradient value determination subunit is used to determine the maximum value among the first gradient value and the second gradient value, and defines it as the maximum gradient value; the gradient pixel point determination subunit is used to determine the pixel point whose maximum gradient value is greater than a preset gradient threshold; the distance pixel point determination subunit is used to determine the first pixel point closest to the first end face and the second pixel point closest to the second end face among the pixels whose maximum gradient value is greater than the preset gradient threshold; the first region determination subunit is used to determine a first target region based on the first pixel point; wherein the first target region includes the first pixel point; the first boundary line determination subunit is used to define a first straight line passing through the centroid of the first target region as a first boundary line within the first target region; wherein the first straight line is parallel to the first end face; the second region determination subunit is used to determine a second target region based on the second pixel point; wherein the second target region includes the second pixel point; the second boundary line determination subunit is used to define a second straight line passing through the centroid of the second target region as a second boundary line within the second target region; wherein the second straight line is parallel to the second end face.
[0144] Optionally, the length comparison unit may specifically include an imaging length comparison subunit, which is used to determine the imaging length of the first base rod and the imaging length of the second base rod, as well as the size relationship between the imaging lengths of the first base rod and the second base rod, based on the positions of the first boundary line and the second boundary line. The feedback adjustment module may specifically include a first feedback adjustment unit, which is used to adjust the relative position of the slitting head in the composite filter rod production equipment and the cutting point of the composite filter rod when the difference between the imaging length of the first base rod and the imaging length of the second base rod does not meet the preset error range, until the difference between the lengths of the first base rod and the second base rod meets the preset error range.
[0145] Optionally, the length comparison unit may specifically include an imaging length determination subunit and an actual length comparison subunit. The imaging length determination subunit is used to determine the imaging length of the first base rod and the imaging length of the second base rod based on the positions of the first boundary line and the second boundary line. The actual length comparison subunit is used to determine the actual length of the first base rod and the actual length of the second base rod, as well as the size relationship between the actual length of the first base rod and the actual length of the second base rod, based on the imaging length of the first base rod and the imaging length of the second base rod, and a preset proportional relationship between the imaging length of the calibration block and the actual length. The feedback adjustment module may specifically include a second feedback adjustment unit. The second feedback adjustment unit is used to adjust the relative position of the slitting head in the composite filter rod production equipment and the cutting point of the composite filter rod when the difference between the actual length of the first base rod and the actual length of the second base rod does not meet the preset error range, until the difference between the length of the first base rod and the length of the second base rod meets the preset error range.
[0146] The phase adjustment device of the composite filter rod production equipment provided in the embodiments of the present invention can execute the phase adjustment method of the composite filter rod production equipment provided in any embodiment of the present invention, and has the corresponding functional modules and beneficial effects of the method.
[0147] Figure 7 This is a schematic diagram of the structure of a terminal device provided in an embodiment of the present invention. The terminal 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 terminal device can also represent various forms of mobile devices, such as personal digital processors, cellular phones, smartphones, 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 illustrative and are not intended to limit the implementation of the invention described and / or claimed herein.
[0148] like Figure 7 As shown, the terminal device 10 includes one or more processors 11 and a storage device communicatively connected to the processors 11. The storage device may be a read-only memory (ROM) 12, a random access memory (RAM) 13, etc. The storage device stores computer programs executable by one or more processors. The processors 11 can perform various appropriate actions and processes based on the computer programs stored in the ROM 12 or loaded from storage unit 18 into the RAM 13. The RAM 13 may also store various programs and data required for the operation of the terminal device 10. The processors 11, ROM 12, and RAM 13 are interconnected via a bus 14. An input / output (I / O) interface 15 is also connected to the bus 14.
[0149] Multiple components in terminal device 10 are connected to I / O interface 15, including: input unit 16, such as keyboard, mouse, etc.; output unit 17, such as various types of displays, speakers, etc.; storage unit 18, such as disk, optical disk, etc.; and communication unit 19, such as network card, modem, wireless transceiver, etc. Communication unit 19 allows electronic device 10 to exchange information / data with other devices through computer networks such as the Internet and / or various telecommunications networks.
[0150] Processor 11 can be a variety of general-purpose and / or special-purpose processing components with processing and computing capabilities. Some examples of processor 11 include, but are not limited to, central processing unit (CPU), graphics processing unit (GPU), various special-purpose artificial intelligence (AI) computing chips, various processors running machine learning model algorithms, digital signal processors (DSPs), and any suitable processor, controller, microcontroller, etc. Processor 11 performs the various methods and processes described above, such as the phase adjustment method in a composite filter rod production apparatus.
[0151] In some embodiments, the phase adjustment method of the composite filter rod production apparatus can be implemented as a computer program tangibly contained in a computer-readable storage medium, such as storage unit 18. In some embodiments, part or all of the computer program can be loaded and / or installed on terminal device 10 via ROM 12 and / or communication unit 19. When the computer program is loaded into RAM 13 and executed by processor 11, one or more steps of the phase adjustment method of the composite filter rod production apparatus described above can be performed. Alternatively, in other embodiments, processor 11 can be configured to perform the phase adjustment method of the composite filter rod production apparatus by any other suitable means (e.g., by means of firmware).
[0152] Various embodiments 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-a-chip (SoCs), payload-programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various embodiments may include implementations in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which may be a dedicated or general-purpose programmable processor, capable of receiving data and instructions from a storage system, at least one input device, and at least one output device, and transmitting data and instructions to the storage system, the at least one input device, and the at least one output device.
[0153] Computer programs used to implement 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, such that when executed by the processor, the computer programs cause the functions / operations specified in the flowcharts and / or block diagrams to be performed. The computer programs may be executed entirely on a machine, partially on a machine, or as a standalone software package, partially on a machine and partially on a remote machine, or entirely on a remote machine or server.
[0154] In the context of this invention, a computer-readable storage medium can be a tangible medium that may contain or store a computer program for use by or in conjunction with an instruction execution system, apparatus, or device. A computer-readable storage medium may include, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, apparatus, or devices, or any suitable combination thereof. Alternatively, a computer-readable storage medium may be a machine-readable signal medium. More specific examples of machine-readable storage media include electrical connections based on one or more wires, portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fibers, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination thereof.
[0155] To provide interaction with a user, the systems and techniques described herein can be implemented on a terminal device having: a display device for displaying information to the user (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor); and a keyboard and pointing device (e.g., a mouse or trackball) through which the user provides input to the terminal device. Other types of devices can also be used to provide interaction with the user; for example, feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form (including sound input, voice input, or tactile input).
[0156] The systems and technologies described herein can be implemented in computing systems that include backend components (e.g., as data servers), or computing systems that include middleware components (e.g., application servers), or computing systems that include frontend components (e.g., user computers with graphical user interfaces or web browsers through which users can interact with implementations of the systems and technologies described herein), or any combination of such backend, middleware, or frontend components. The components of the system can be interconnected via digital data communication of any form or medium (e.g., communication networks). Examples of communication networks include local area networks (LANs), wide area networks (WANs), blockchain networks, and the Internet.
[0157] A computing system can include clients and servers. Clients and servers are generally located far apart and typically interact through communication networks. The client-server relationship is created by computer programs running on the respective computers and having a client-server relationship with each other. The server can be a cloud server, also known as a cloud computing server or cloud host, which is a hosting product within the cloud computing service system to address the shortcomings of traditional physical hosts and VPS services, such as high management difficulty and weak business scalability.
[0158] It should be understood that the various forms of processes shown above can be used, with steps reordered, added, or deleted. For example, the steps described in this invention can be executed in parallel, sequentially, or in different orders, as long as the desired result of the technical solution of this invention can be achieved, and this is not limited herein.
[0159] Note that the above description is merely a preferred embodiment of the present invention and the technical principles employed. Those skilled in the art will understand that the present invention is not limited to the specific embodiments described herein, and various obvious changes, readjustments, combinations, and substitutions can be made without departing from the scope of protection of the present invention. Therefore, although the present invention has been described in detail through the above embodiments, the present invention is not limited to the above embodiments, and may include many other equivalent embodiments without departing from the concept of the present invention, the scope of which is determined by the scope of the appended claims.
Claims
1. A phase adjustment method for a composite filter rod production equipment, characterized in that, include: Acquire the original image of the composite filter rod and perform grayscale processing on the original image to obtain an initial grayscale image; Based on the initial grayscale image, the relationship between the lengths of the first base rod and the second base rod is determined; wherein the first base rod and the second base rod are located at opposite ends of the composite filter rod. When the difference between the length of the first base rod and the length of the second base rod does not meet the preset error range, the relative position of the slitting head in the composite filter rod production equipment and the cutting point of the composite filter rod is adjusted until the difference between the length of the first base rod and the length of the second base rod meets the preset error range. Based on the initial grayscale image, the relationship between the lengths of the first base rod and the second base rod is determined, including: The initial grayscale image is binarized to obtain an intermediate grayscale image, and the pixels in the initial grayscale image belonging to the composite filter are determined based on the intermediate grayscale image. The grayscale values corresponding to the pixels belonging to the composite filter rod in the initial grayscale image are determined, and a first gradient value and a second gradient value are determined accordingly based on the grayscale values; wherein, the first gradient value is the gradient value of the grayscale value in a first direction and a second direction, and the second gradient value is the gradient value of the grayscale value in a third direction and a fourth direction, the first direction and the second direction are perpendicular to each other, the third direction and the fourth direction are perpendicular to each other, and the first direction, the second direction, the third direction and the fourth direction are not parallel to each other; Based on the first gradient value and the second gradient value, the positions of the first boundary line and the second boundary line in the composite filter rod are determined; wherein, the first boundary line is the boundary line between the first base rod and the adjacent base rod, the second boundary line is the boundary line between the second base rod and the adjacent base rod, and the extension directions of the first boundary line and the second boundary line are both parallel to the end face of the composite filter rod. Based on the positions of the first and second dividing lines, determine the lengths of the first and second base rods, as well as the relationship between their lengths.
2. The phase adjustment method according to claim 1, characterized in that, The initial grayscale image is binarized to obtain an intermediate grayscale image, and the pixels in the initial grayscale image belonging to the composite filter are determined based on the intermediate grayscale image, including: When the grayscale value of a pixel in the initial grayscale image meets the first preset grayscale range, the grayscale value of the pixel is modified to the first grayscale value. When the grayscale value of a pixel in the initial grayscale image satisfies the second preset grayscale range, the grayscale value of the pixel is modified to the second grayscale value, and the intermediate grayscale image is obtained; wherein the first preset grayscale range and the second preset grayscale range do not intersect, and the first grayscale value is less than the second grayscale value; In the intermediate grayscale image, the pixel whose grayscale value is determined to be the first grayscale value is the pixel in the initial grayscale image that belongs to the composite filter.
3. The phase adjustment method according to claim 1, characterized in that, Determine the grayscale value corresponding to the pixel point belonging to the composite filter rod in the initial grayscale image, and determine the first gradient value and the second gradient value according to the grayscale value, including: According to the formula for calculating the first gradient Calculate the first gradient value ; According to the second gradient calculation formula Calculate the second gradient value Where x is the coordinate value of the pixel belonging to the composite filter in the initial grayscale image in the first direction, y is the coordinate value of the pixel belonging to the composite filter in the initial grayscale image in the second direction, and f(x, y) is the grayscale value corresponding to the pixel belonging to the composite filter in the initial grayscale image. The gradient values of the gray values corresponding to the pixels belonging to the composite filter rod in the initial grayscale image in the first direction and the second direction; The gradient values of the gray values corresponding to the pixels belonging to the composite filter rod in the initial grayscale image are the gradient values in the third and fourth directions.
4. The phase adjustment method according to claim 1, characterized in that, The composite filter rod includes a first end face and a second end face that are opposite to each other; Determining the positions of the first and second boundary lines in the composite filter rod based on the first gradient value and the second gradient value includes: Determine the maximum value between the first gradient value and the second gradient value, and define it as the maximum gradient value; Identify the pixels whose maximum gradient value is greater than a preset gradient threshold; Among the pixels whose maximum gradient value is greater than a preset gradient threshold, a first pixel that is closest to the first end face is determined, and a second pixel that is closest to the second end face is determined. A first target region is determined based on the first pixel; wherein the first target region includes the first pixel; Within the first target area, a first straight line passing through the centroid of the first target area is defined as the first boundary line; wherein, the first straight line is parallel to the first end face; A second target region is determined based on the second pixel; wherein the second target region includes the second pixel; Within the second target area, a second straight line passing through the centroid of the second target area is defined as the second boundary line; wherein, the second straight line is parallel to the second end face.
5. The phase adjustment method according to claim 1, characterized in that, Based on the positions of the first and second boundary lines, the lengths of the first and second base rods are determined, along with their relative lengths, including: Based on the positions of the first boundary line and the second boundary line, determine the imaging length of the first base rod and the imaging length of the second base rod, as well as the relationship between the size of the imaging length of the first base rod and the imaging length of the second base rod. When the difference between the lengths of the first base rod and the second base rod does not meet the preset error range, feedback adjustment is made to the relative position of the slitting head in the composite filter rod production equipment and the cutting point of the composite filter rod until the difference between the lengths of the first base rod and the second base rod meets the preset error range, including: When the difference between the imaging length of the first base rod and the imaging length of the second base rod does not meet the preset error range, the relative position of the slitting head in the composite filter rod production equipment and the cutting point of the composite filter rod is adjusted until the difference between the length of the first base rod and the length of the second base rod meets the preset error range.
6. The phase adjustment method according to claim 1, characterized in that, Based on the positions of the first and second boundary lines, the lengths of the first and second base rods are determined, along with their relative lengths, including: Based on the positions of the first boundary line and the second boundary line, determine the imaging length of the first base rod and the imaging length of the second base rod; Based on the imaging length of the first base rod and the imaging length of the second base rod, as well as the preset ratio between the imaging length of the calibration block and the actual length, the actual length of the first base rod and the actual length of the second base rod, and the size relationship between the actual length of the first base rod and the actual length of the second base rod are determined. When the difference between the lengths of the first base rod and the second base rod does not meet the preset error range, feedback adjustment is made to the relative position of the slitting head in the composite filter rod production equipment and the cutting point of the composite filter rod until the difference between the lengths of the first base rod and the second base rod meets the preset error range, including: When the difference between the actual length of the first base rod and the actual length of the second base rod does not meet the preset error range, the relative position of the slitting head in the composite filter rod production equipment and the cutting point of the composite filter rod is adjusted until the difference between the length of the first base rod and the length of the second base rod meets the preset error range.
7. A phase adjustment device for a composite filter rod production equipment, characterized in that, For performing the phase adjustment method of the composite filter rod production equipment as described in any one of claims 1-6, the phase adjustment device comprises: The image acquisition module is used to acquire the original image of the composite filter rod and perform grayscale processing on the original image to obtain an initial grayscale image; The length comparison module is used to determine the relationship between the lengths of the first base rod and the second base rod based on the initial grayscale image; wherein the first base rod and the second base rod are located at opposite ends of the composite filter rod; The feedback adjustment module is used to adjust the relative position of the slitting head in the composite filter rod production equipment and the cutting point of the composite filter rod when the difference between the length of the first base rod and the length of the second base rod does not meet the preset error range, until the difference between the length of the first base rod and the length of the second base rod meets the preset error range.
8. A terminal device, characterized in that, include: One or more processors; Storage device 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 phase adjustment method of the composite filter rod production equipment as described in any one of claims 1-6.
9. A computer-readable storage medium having a computer program stored thereon, characterized in that, When executed by the processor, the program implements the phase adjustment method for the composite filter rod production equipment as described in any one of claims 1-6.
Citation Information
Patent Citations
Filter stick measuring table and nondestructive measurement device and method for length of segmented rods of filter stick
CN103162630A
Hollow tube composite filter rod segment length measuring method based on visual detection
CN106887005A
Composite filter rod quality detecting device and system
CN107063343A