Cotton sliver thickness detection method for carding machine
By analyzing the grayscale value changes and bilateral filtering technology at adjacent moments in the grayscale image, the possibility and weight of pixel points at the edge of the tampon are calculated, and the image blurring caused by the card machine tampon jitter is solved, and the cotton is improved Accuracy and stability of strip thickness detection.
Patent Information
- Application Number
- CN202411782887.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-06
- Publication Date
- 2025-01-07
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
In the prior art, the tampon output by the card machine is blurred due to jitter, which affects the accuracy of the tampon thickness detection.
By obtaining the grayscale image of the tampon at the card output, analyzing the change in the grayscale value at adjacent moments, calculating the possibility that the pixel point is at the edge of the tampon, and combining bilateral filtering technology, the correction value of the pixel value weight is calculated. Perform image detection to obtain the tampon thickness.
Improves the accuracy of tampon thickness measurement, reduces the impact of image blur caused by jitter, enhances the stability of the image under dynamic conditions, and provides clearer image data.
Smart Images

Figure CN119273735A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of image processing, and more specifically, to a cotton strip thickness detection method for a cotton carding machine. Background Art
[0002] The carding machine is a textile machine used to process cotton fiber and chemical fiber. Its main function is to open, comb and remove impurities from the cotton rolls sent from the previous process or the oily cotton layer supplied by the cotton thread, so that all the curled cotton loops become basically straight single fibers; the quality of the cloth is inseparable from the quality of the cotton thread. The production of cotton thread is processed from raw cotton through processes such as cotton grabbing, impurity removal and blending, cotton combing, pre-combining, strip rolling and combing. The carding process is a key step in the production of cotton thread and the first step in cotton forming. The success of this step affects the quality of the cotton thread. However, due to the influence of unclean impurity removal of raw cotton, wear of the carding machine or residual impurities in the carding machine, the thickness of the cotton strips output by the carding machine may sometimes exceed the allowable range, which will affect the subsequent steps of cotton thread production. Therefore, it is necessary to detect the thickness of the cotton strips output by the carding machine.
[0003] The existing Chinese patent application document with publication number CN116164683A discloses a novel cotton strip thickness detection system, wherein the driving board is connected to an ultrasonic transmitting probe, the ultrasonic receiving probe is connected to a signal detection board, the ultrasonic transmitting probe and the ultrasonic receiving probe are symmetrically arranged on both sides of the cotton strip, the driving board is connected to the ultrasonic transmitting probe through an ultrasonic transmitting circuit, the ultrasonic receiving probe is connected to the signal detection board through an ultrasonic receiving circuit, the ultrasonic transmitting probe and the ultrasonic receiving probe are arranged directly below the first pressing roller and the second pressing roller, and a cotton strip is arranged between the first pressing roller and the second pressing roller. The patent application document does not require high installation accuracy, reduces dependence on mechanical accuracy; at the same time, simplifies the mechanical structure of this part; cancels the gap adjustment when the user samples the mechanical structure on site; can detect and judge the presence or absence of cotton strips; and can measure cotton strips of different thicknesses.
[0004] The application document analyzes the method of detecting cotton slivers of different thicknesses. Currently, the image of the cotton sliver is usually used to detect the thickness of the cotton sliver. However, the cotton slivers on the carding machine are continuously transported. Due to the loose nature of the cotton slivers, there is a certain jitter on the cotton slivers when the image of the cotton sliver is collected, causing the cotton sliver part in the collected image to appear blurred, resulting in inaccurate detection of the cotton sliver thickness. Summary of the invention
[0005] In order to solve the problem that there is a certain jitter on the tampon when collecting the tampon image, which makes the tampon part in the collected image blurred, resulting in inaccurate detection of the tampon thickness, the present invention provides solutions in the following aspects.
[0006] A cotton sliver thickness detection method for a carding machine comprises: obtaining a grayscale image of the cotton sliver at the output of the carding machine, and calculating the possibility that each pixel point of the grayscale image is at the edge of the cotton sliver according to the change of grayscale values in the grayscale image at adjacent moments; determining the possibility that the pixel point is at the background area near the edge of the cotton sliver based on the possibility that the pixel point in the grayscale image is at the edge of the cotton sliver; calculating the correction value of the pixel value weight of each pixel point according to the possibility that the pixel point is at the background area near the edge of the cotton sliver, and performing bilateral filtering to obtain a significant image, and performing image detection on the significant image to obtain the thickness of the cotton sliver; wherein the correction value of the pixel value weight satisfies the following relationship: , where Indicates The grayscale image at the moment The correction value of the pixel value weight of the pixel point relative to the central pixel point in the window, Indicates The grayscale image at the moment The pixel value weight of each pixel relative to the center pixel in the window, Indicates The grayscale image at the moment The probability that a pixel is in the background area near the edge of the sliver, Indicates The grayscale image at the moment The gray value of a pixel, Indicated by natural constant The exponential function of base .
[0007] By analyzing the change of grayscale values in the grayscale image at adjacent moments, this method can accurately calculate the possibility of each pixel being at the edge of the sliver, thereby effectively identifying the edge of the sliver. This method reduces the impact of image blur caused by sliver jitter on edge detection and improves the accuracy of sliver thickness measurement. The bilateral filtering technology is used to calculate the correction value of the pixel value weight in combination with the possibility of the pixel point being in the background area near the edge of the sliver. This method can reduce noise while maintaining edge clarity and enhance the stability of the image under dynamic conditions. Especially when the sliver is continuously transported and jittery, the introduction of the correction value of the pixel value weight is conducive to adjusting the pixel value weight in the bilateral filtering process, so that the filtered grayscale image highlights the edge features of the sliver and reduces the impact of background noise. This optimized filtering effect provides clearer image data for subsequent grayscale image detection and sliver thickness measurement.
[0008] Preferably, the calculating the possibility that each pixel of the grayscale image is at the edge of the sliver includes: Taking any moment as the target moment, calculate the absolute value of the grayscale difference between the pixel at the same position in the grayscale image at the target moment and the grayscale image at the previous moment, and perform normalization to obtain the grayscale change; Calculate the absolute value of the difference between the variance of the grayscale values of the pixels in the eight neighborhoods of the same position of the grayscale image at the target moment and the grayscale image at the previous moment, and perform normalization to obtain the variance change; The product of the grayscale change and the variance change is used as the possibility that the pixel point at the same position in the grayscale image at the target moment is near the edge of the sliver.
[0009] By calculating the absolute value of the difference between the grayscale difference and the variance of the pixel at the same position in the grayscale image at adjacent moments, the image changes caused by the shaking of the sliver can be captured, thereby more accurately identifying the edge of the sliver.
[0010] Preferably, the calculating the possibility that each pixel of the grayscale image is at the edge of the sliver further includes: Use eight-point sampling to obtain local binary patterns value, After the value is converted into decimal, the eigenvalue of the central pixel is obtained. The number of pixels corresponding to the eigenvalue is counted and normalized to obtain the possibility that all pixels in the grayscale image corresponding to the target moment are at the edge of the sliver.
[0011] By converting the LBP value into decimal, a unique eigenvalue can be assigned to each pixel, which helps to accurately identify and locate the edge of the cotton strip. By counting the number of pixels corresponding to each eigenvalue and normalizing it, the frequency of occurrence of each eigenvalue can be quantified, thereby evaluating its reliability as an edge indicator.
[0012] Preferably, the determining the possibility that the pixel point is in the background area near the edge of the sliver includes: Taking any moment as the target moment, calculate the number of times the grayscale value of the pixel point in the grayscale image at the target moment appears in the grayscale image to obtain the grayscale value frequency; The ratio of the gray value frequency to the number of all pixels in the gray image is subjected to a negative exponential function operation and is used as the power of the possibility that the pixel is at the edge of the sliver at the target moment, thereby obtaining the possibility that the pixel in the gray image corresponding to the target moment is in the background area of the sliver edge.
[0013] By calculating the gray value frequency, the background area and edge area in the gray image can be effectively distinguished. The background area usually has more frequently occurring gray values, while the edge area has relatively fewer gray values; by applying the negative exponential function, the contribution of pixels with higher gray value frequencies (more likely to be background) to the edge possibility is reduced, thereby more accurately identifying the edge area.
[0014] Preferably, the determining the possibility that the pixel point is in the background area near the edge of the sliver further includes: Take any moment as the target moment, take any pixel point in the grayscale image at the target moment as the target point, calculate the number of times the grayscale value of the target point appears in the grayscale image, and obtain the grayscale value frequency; A negative exponential function is performed on the ratio between the gray value frequency and the number of all pixels in the gray image, and the ratio is used as the power of the possibility that the pixel is at the edge of the sliver at the target moment, thereby obtaining an edge possibility index; The complement of the ratio between the gray value of the target point and the maximum gray value in the gray image is calculated, and the product of the complement and the edge possibility index is calculated to obtain the possibility that the target point in the gray image corresponding to the target time is in the background area of the sliver edge.
[0015] By calculating the complement of the ratio of the gray value to the maximum gray value, it is possible to distinguish between pixels close to the background (lower gray value) and edge areas (higher gray value). Combined with the edge possibility index, the ability to distinguish between background and edges is further enhanced.
[0016] Preferably, the pixel value weight includes: Take any pixel point in the grayscale image as the target point, preset a window, obtain a window set with the target point as the neighborhood pixel point, take any window in the window set as the annotation window, and calculate the pixel value weight of the center point of the annotation window corresponding to the target point; The pixel value weight satisfies the following relationship: ; In the formula, Indicates The grayscale image at the moment The pixel value weight of each pixel relative to the center pixel in the window, Indicates the grayscale value of the center pixel in the preset window. Indicates The gray value of a pixel, The standard deviation of the Gaussian kernel representing the pixel value weights, Represented by natural numbers An exponential function with base .
[0017] Preferably, the bilateral filtering comprises: Slide the preset window on the grayscale image and calculate the spatial distance weight between the central pixel point and other pixels in the preset window; Calculate the pixel value difference between the central pixel and each other pixel in the preset window, and use the Gaussian function to calculate the pixel value weight; The pixel value weight is corrected according to the possibility that the pixel point is in the background area at the edge of the sliver, and the product of the spatial distance weight and the corrected weight is used as the comprehensive weight of each pixel point in the filter; based on the comprehensive weight, the pixel points in the preset window are weighted averaged to complete the bilateral filtering of the grayscale image.
[0018] Preferably, performing image detection on the significant image to obtain the thickness of the sliver includes: The edge of the sliver in the salient image is extracted, and the outer contour of the sliver is obtained using the minimum enclosing rectangle method. The width of the outer contour is used as the thickness of the sliver.
[0019] The present invention has the following effects: 1. The present invention calculates the possibility of each pixel being at the edge of a sliver by analyzing the change in grayscale values in a grayscale image at adjacent moments, thereby effectively identifying the edge of a sliver. Combined with bilateral filtering technology, by considering the spatial distance weight and pixel value weight of the pixel points, the influence of image blur caused by sliver shaking on thickness detection is reduced, thereby improving the accuracy of sliver thickness detection.
[0020] 2. The present invention calculates the possibility that a pixel point is in the background area near the edge of the sliver and corrects the pixel value weight accordingly, which is conducive to better distinguishing the sliver from the background, especially in the edge area of the sliver. It is helpful to avoid the jitter of the sliver and the noise in the image acquisition process, has good robustness, and can stably perform thickness detection under different conditions. BRIEF DESCRIPTION OF THE DRAWINGS
[0021] By reading the following detailed description with reference to the accompanying drawings, the above and other objects, features and advantages of the exemplary embodiments of the present invention will become readily understood. In the accompanying drawings, several embodiments of the present invention are shown in an exemplary and non-limiting manner, and the same or corresponding reference numerals represent the same or corresponding parts, wherein: Figure 1 It is a method flow chart of steps S1 to S3 in a cotton sliver thickness detection method for a cotton carding machine according to an embodiment of the present invention.
[0022] Figure 2 It is a schematic diagram of the same position of the grayscale image of the cotton sliver corresponding to adjacent moments in a cotton sliver thickness detection method for a cotton carding machine according to an embodiment of the present invention.
[0023] Figure 3 It is a window set based on preset windows of neighborhood pixels in a cotton strip thickness detection method for a cotton carding machine in an embodiment of the present invention. DETAILED DESCRIPTION
[0024] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative work are within the scope of protection of the present invention.
[0025] The specific embodiments of the present invention are described in detail below with reference to the accompanying drawings.
[0026] Reference Figure 1 A method for detecting the thickness of cotton strips in a carding machine includes steps S1 to S3, which are specifically as follows: The specific implementation scenario is: arrange the camera at a position where a section of cotton sliver can be completely captured, and collect the grayscale image of the cotton sliver at the cotton sliver output of the carding machine in real time. At the same time, in order to avoid the influence of environmental changes on the detection of cotton sliver thickness, the lighting conditions of the environment where the cotton sliver is located must be maintained unchanged when collecting the image.
[0027] It should be noted that not all positions in the grayscale image are of reference significance for the thickness detection of the cotton slivers. The cotton slivers at the cotton sliver output of the carding machine are in a more complex scene, and it may be difficult to detect the position of the cotton slivers through edge detection. Therefore, the present invention calculates the possibility that each pixel point in the grayscale image is near the edge of the cotton sliver based on the grayscale value of the grayscale image of the cotton slivers at adjacent moments.
[0028] S1: Obtain a grayscale image of the cotton strips at the output of the carding machine, and calculate the possibility that each pixel of the grayscale image is at the edge of the cotton strips according to the change of grayscale values in the grayscale image at adjacent moments.
[0029] Taking any moment as the target moment, calculate the absolute value of the grayscale difference between the pixel at the same position in the grayscale image at the target moment and the grayscale image at the previous moment, and perform normalization to obtain the grayscale change; It should be noted that, refer to Figure 2 In the grayscale images at adjacent moments, the same position corresponds to two pixels. In this embodiment, the possibility of being at the edge of the sliver is calculated using pixels within the eight-neighborhood range. The implementer may also use pixels within a larger range according to actual conditions.
[0030] Calculate the absolute value of the difference between the variance of the grayscale values of the pixels in the eight neighborhoods of the same position of the grayscale image at the target moment and the grayscale image at the previous moment, and perform normalization to obtain the variance change; The product of grayscale change and variance change is taken as the possibility that the pixel at the same position in the grayscale image at the target moment is near the edge of the sliver.
[0031] Specifically, the probability that the pixel point at the same position in the grayscale image at the target time is at the edge of the sliver satisfies the following relationship: ; In the formula, Indicates The grayscale image at the moment The probability that a pixel is near the edge of the sliver, Indicates The grayscale image at the moment The gray value of a pixel, Indicates The grayscale image at the moment The gray value of a pixel, Indicates The grayscale image at the moment The variance of the grayscale value of the pixel in the eight neighborhoods of a pixel, Indicates The grayscale image at the moment The variance of the grayscale values of pixels in the eight neighborhoods of a pixel.
[0032] That is to say, It represents the gray value difference between the pixels at the same position in two gray images at adjacent moments. Since most objects in gray images are stationary except for cotton strips, the gray value difference between the pixels at the same position in two gray images is used to measure whether the object at that position is moving. The larger the value, the greater the grayscale image. The more likely the grayscale change of the pixel is caused by the movement of the sliver, the The grayscale image at the moment The more likely a pixel is near the edge of the sliver, The smaller the grayscale image is, the The more likely a pixel is on a stationary object, the The grayscale image at the moment The smaller the probability that a pixel point is near the edge of the sliver, the smaller the probability that a pixel point is near the edge of the sliver. The division by 255 is to facilitate the normalization method adopted in subsequent calculations.
[0033] It represents the difference in the grayscale value variance between the pixel at the same position in two grayscale images at adjacent moments and its surrounding pixels. Because the grayscale value of the pixel at a certain position in the grayscale image may not change before and after the object moves, such as Figure 2As shown, the pixel points at the same position A in the grayscale image corresponding to adjacent moments are all in the sliver area before and after the sliver moves, resulting in the grayscale values of some pixel points at the edge of the sliver not changing or changing very little before and after the sliver shakes.
[0034] In order to make more pixels near the sliver be identified, A further adjustment is made to the probability that a pixel is near the edge of the sliver. The larger the value, the greater the grayscale image. The more likely a pixel is to be near the edge of the sliver, the greater the probability that the pixel is near the edge of the sliver. The smaller the grayscale image is, the The more likely a pixel point is to be located inside the range of the sliver or in the background area outside the sliver, the less likely the pixel point is to be located near the edge of the sliver.
[0035] In addition, in another embodiment: it also includes: Use eight-point sampling to obtain local binary patterns value, After the value is converted into decimal, the eigenvalue of the central pixel is obtained. The number of pixels corresponding to the eigenvalue is counted and normalized to obtain the possibility that all pixels in the grayscale image corresponding to the target moment are at the edge of the sliver.
[0036] Specifically, the probability that the target point at the target time is at the edge of the sliver satisfies the following relationship: ; In the formula, Indicates The grayscale image at the moment The probability that a pixel is near the edge of the sliver, Indicates The grayscale image at the moment The local binary pattern feature value of a pixel corresponds to the number of times the pixel appears in the grayscale image. Represents the number of all pixels in a grayscale image.
[0037] That is to say, since the edge of the sliver is a minority part in the grayscale image, its corresponding eigenvalue should appear less frequently; therefore, the fewer times a pixel's eigenvalue appears, the more likely it is to be part of the edge, and the larger the normalized probability value, the more likely the pixel is to be the edge of the sliver.
[0038] Further analysis shows that the blurring phenomenon caused by the jitter of the tampon near the edge of the tampon in the grayscale image will affect the detection of the thickness of the tampon, and the blurred area in the grayscale image needs to be compensated by the pixels near the blurred area in the grayscale image. Therefore, the present invention calculates the possibility of each pixel point in the grayscale image being near the edge of the tampon based on the possibility of the pixel point being near the edge of the tampon and the grayscale value of the pixel point.
[0039] S2: Based on the possibility that the pixel point in the grayscale image is at the edge of the sliver, determine the possibility that the pixel point is in the background area near the edge of the sliver.
[0040] Taking any moment as the target moment, calculate the number of times the grayscale value of the pixel point in the grayscale image at the target moment appears in the grayscale image to obtain the grayscale value frequency; The ratio of the gray value frequency to the number of all pixels in the gray image is subjected to a negative exponential function operation and is used as the power of the possibility that the pixel is at the edge of the sliver at the target moment, thereby obtaining the possibility that the pixel in the gray image corresponding to the target moment is in the background area at the edge of the sliver.
[0041] Specifically, the probability of being in the background area at the edge of the sliver satisfies the following relationship: ; In the formula, Indicates The grayscale image at the moment The probability that a pixel is in the background area near the edge of the sliver, Indicates The grayscale image at the moment The probability that a pixel is at the edge of the sliver, Indicates The grayscale image at the moment The number of times the gray value of a pixel appears in the grayscale image, Represents the number of all pixels in the grayscale image. Indicated by natural constant The exponential function of base .
[0042] That is to say, Indicates The grayscale image at the moment The proportion of the number of occurrences of the gray value of a pixel in all the pixels in the gray image. Since most of the areas in the gray image are the background areas composed of the carding machine, only a small part of the area is the sliver area composed of the sliver, The larger the value is, the more likely the pixel is to be in the background area, and the more likely the pixel is to be in the background area near the edge of the sliver; conversely, The smaller it is, the more likely that the pixel is in the sliver area, and the smaller the possibility that the pixel is in the background area near the edge of the sliver.
[0043] Therefore, through right Make corrections, The bigger it is, The smaller, right The stronger the upward correction, the more likely it is that the pixel will be in the background area near the edge of the sliver, and the more prominent it will be. The more hours, The bigger, right The weaker the upward correction, the less likely it is that the pixel is in the background area near the edge of the sliver.
[0044] In addition, another embodiment further includes: Take any moment as the target moment, take any pixel point in the grayscale image at the target moment as the target point, calculate the number of times the grayscale value of the target point appears in the grayscale image, and obtain the grayscale value frequency; The ratio between the gray value frequency and the number of all pixels in the gray image is subjected to a negative exponential function operation and is used as the power of the possibility that the pixel is at the edge of the sliver at the target moment to obtain the edge possibility index; The complement of the ratio between the gray value of the target point and the maximum gray value in the gray image is calculated, and the product of the complement and the edge possibility index is calculated to obtain the possibility that the target point in the gray image corresponding to the target time is in the background area of the sliver edge.
[0045] Specifically, the probability of being in the background area at the edge of the sliver satisfies the following relationship: ; In the formula, Indicates The grayscale image at the moment The probability that a pixel is in the background area near the edge of the sliver, Indicates The grayscale image at the moment The probability that a pixel is at the edge of the sliver, Indicates The grayscale image at the moment The number of times the gray value of a pixel appears in the grayscale image, Represents the number of all pixels in the grayscale image. Indicated by natural constant is the exponential function of the base, Indicates The grayscale image at the moment The gray value of a pixel.
[0046] In other words, the grayscale value of the pixel is generally large, so It will be close to 0, which reduces the possibility of the pixel being at the edge; Represents the difference between the grayscale value of a pixel and the maximum possible grayscale value (255). The larger the value, the closer the grayscale value of the pixel is to 0, indicating that the pixel is more likely to be part of the background.
[0047] Further analysis shows that the motion blur phenomenon caused by the shaking of the tampon will affect the detection of the thickness of the tampon. In order to reduce the impact of this phenomenon on the detection of the thickness of the tampon, the present invention calculates the correction value of the pixel value weight of each pixel point based on the possibility that the pixel point is in the background area near the edge of the tampon.
[0048] S3: According to the possibility that the pixel point is in the background area near the edge of the sliver, the correction value of the pixel value weight of each pixel point is calculated, and bilateral filtering is performed to obtain a significant image, and the significant image is subjected to image detection to obtain the thickness of the sliver.
[0049] The steps of bilateral filtering include: Slide the preset window on the grayscale image, and use the Gaussian function to calculate the spatial distance weight between the central pixel and other pixels in the preset window; Exemplarily, the preset window is , which can be adjusted according to actual conditions.
[0050] Specifically, the spatial distance weight satisfies the following relationship: ; In the formula, Indicates The grayscale image at the moment The spatial distance value weight of each pixel point, Indicates the center pixel in the preset window. Indicates pixels, The standard deviation of the Gaussian kernel representing the spatial weights, Represented by natural numbers An exponential function with base .
[0051] Use the Gaussian function to calculate the pixel value difference between the central pixel and each other pixel in the preset window to obtain the pixel value weight; Specifically, the pixel value weight includes: Take any pixel point in the grayscale image as the target point, preset a window, obtain a window set with the target point as the neighborhood pixel point, take any window in the window set as the annotation window, and calculate the pixel value weight of the center point of the annotation window corresponding to the target point; The pixel value weight satisfies the following relationship: ; In the formula, Indicates The grayscale image at the moment The pixel value weight of each pixel relative to the center pixel in the window, Indicates the grayscale value of the center pixel in the preset window. Indicates The gray value of a pixel, The standard deviation of the Gaussian kernel representing the pixel value weights, Represented by natural numbers An exponential function with base .
[0052] Reference Figure 3 For example, the pixel number 13 in the grayscale image is set as the neighborhood pixel, and the preset window is , then the window set for obtaining the neighborhood pixel points is 8, and the pixel differences between the neighborhood pixel points and the central pixel points in the corresponding window are calculated respectively to obtain the pixel value weights of the neighborhood pixel points relative to the central pixel points in the window.
[0053] It should be noted that bilateral filtering is a technology well known to those skilled in the art. When performing bilateral filtering, it is necessary to obtain the spatial distance weight and pixel value weight of the center pixel in a preset window, and the spatial distance weight and pixel value weight are well known technologies in the art. In this embodiment, only the pixel value weight is corrected, and the spatial distance weight is not adjusted. Therefore, the following steps are for correcting the pixel value weight.
[0054] The pixel value weight is corrected according to the possibility that the pixel is in the background area at the edge of the sliver, and the product of the spatial distance weight and the corrected weight is used as the comprehensive weight of each pixel in the filter; based on the comprehensive weight, the pixel points in the preset window are weighted averaged to complete the bilateral filtering of the grayscale image.
[0055] Specifically, the correction value of the pixel value weight satisfies the following relationship: ; In the formula, Indicates The grayscale image at the moment The correction value of the pixel value weight of the pixel point relative to the central pixel point in the window, Indicates The grayscale image at the moment The pixel value weight of each pixel relative to the center pixel in the window, Indicates The grayscale image at the moment The probability that a pixel is in the background area near the edge of the sliver, Indicates The grayscale image at the moment The gray value of a pixel, Indicated by natural constant The exponential function of base .
[0056] That is to say, The larger the value, the greater the grayscale image. The more likely a pixel is to be in the background area near the edge of the cotton strip, the more likely it is that the background area will have a greater impact on the filtering result when filtering in order to eliminate the blurred area near the cotton strip. The larger the value, the more Pixels should have a larger pixel value weight, otherwise, The smaller the value, the higher the grayscale image The more likely the pixel is to be in other areas outside the background area near the edge of the sliver, in order to avoid the expansion of the blurred area in the grayscale image after filtering, the first pixel in the grayscale image is filtered. Pixels should have relatively smaller pixel value weights.
[0057] It is further explained that since the cotton strip has the characteristic of high gray value in the grayscale image, The larger the value, the higher the probability that the pixel is on the cotton strip. The smaller the value is, the lower the possibility that the pixel is on the sliver. In order to reduce the sliver area in the grayscale image, the blurriness of the blurred area near the sliver is increased to interfere with the detection of the sliver thickness. The smaller the value, the more The pixel point should have a larger pixel value weight to relatively increase the influence of the background area on the filtering result. The larger the value, the more Each pixel point should have a smaller pixel value weight to reduce the situation where the sliver area aggravates the blurriness of the blurred area near the sliver.
[0058] Therefore, through right Make corrections, The more hours, right The greater the degree of correction, the greater the The larger the correction value of the pixel value weight of the pixel point, the larger the correction value of the pixel value weight of the pixel point. The larger the weight of a pixel, The bigger it is, right The smaller the correction degree is, the smaller the grayscale image The smaller the correction value of the pixel value weight of the pixel point is, the smaller the correction value of the pixel value weight of the pixel point is. The smaller the weight of a pixel.
[0059] The edge of the sliver in the salient image is extracted, and the outer contour of the sliver is obtained using the minimum enclosing rectangle method. The width of the outer contour is used as the thickness of the sliver.
[0060] In addition, the sliver can be projected vertically or horizontally in the image, the distribution of the projection value can be calculated, and the thickness of the sliver can be determined by analyzing the peak value of the distribution. Specifically, the implementer can use different methods according to the actual situation.
[0061] The thickness of the output slivers of the carding machine is detected by the above method, which reduces the influence of image blur caused by sliver shaking on the sliver thickness detection and improves the accuracy of sliver thickness detection to a certain extent.
[0062] In the description of this specification, "plurality" or "several" means at least two, such as two, three or more, etc., unless otherwise clearly and specifically defined.
[0063] Although this specification has shown and described a number of embodiments of the present invention, it will be apparent to those skilled in the art that such embodiments are provided by way of example only. Those skilled in the art will conceive of many modifications, changes and alternatives without departing from the ideas and spirit of the present invention. It should be understood that in the practice of the present invention, various alternatives to the embodiments of the present invention described herein may be employed.
Claims
1. A method for detecting sliver thickness of a carding machine, characterized in that: include: Obtain a grayscale image of the cotton strips at the output of the carding machine, and calculate the possibility that each pixel of the grayscale image is at the edge of the cotton strips according to the change of grayscale values in the grayscale image at adjacent moments; Based on the possibility that the pixel point in the grayscale image is at the edge of the sliver, the possibility that the pixel point is at the background area near the edge of the sliver is determined; According to the possibility that the pixel point is in the background area near the edge of the sliver, the correction value of the pixel value weight of each pixel point is calculated, and bilateral filtering is performed to obtain a significant image, and the significant image is subjected to image detection to obtain the thickness of the sliver; The correction value of the pixel value weight satisfies the following relationship: , where Indicates The grayscale image at the moment The correction value of the pixel value weight of the pixel point relative to the central pixel point in the window, Indicates The grayscale image at the moment The pixel value weight of each pixel relative to the center pixel in the window, Indicates The grayscale image at the moment The probability that a pixel is in the background area near the edge of the sliver, Indicates The grayscale image at the moment The gray value of a pixel, Indicated by natural constant The exponential function of base .
2. A cotton sliver thickness detection method for a carding machine according to claim 1, characterized in that: The calculating the possibility that each pixel of the grayscale image is at the edge of the sliver includes: Taking any moment as the target moment, calculate the absolute value of the grayscale difference between the pixel at the same position in the grayscale image at the target moment and the grayscale image at the previous moment, and perform normalization to obtain the grayscale change; Calculate the absolute value of the difference between the variance of the grayscale values of the pixels in the eight neighborhoods of the same position of the grayscale image at the target moment and the grayscale image at the previous moment, and perform normalization to obtain the variance change; The product of the grayscale change and the variance change is used as the possibility that the pixel point at the same position in the grayscale image at the target moment is near the edge of the sliver.
3. A cotton strip thickness detection method for a carding machine according to claim 1, characterized in that: The calculating the possibility that each pixel of the grayscale image is at the edge of the sliver also includes: Use eight-point sampling to obtain local binary patterns value, After the value is converted into decimal, the eigenvalue of the central pixel is obtained. The number of pixels corresponding to the eigenvalue is counted and normalized to obtain the possibility that all pixels in the grayscale image corresponding to the target moment are at the edge of the sliver.
4. A cotton sliver thickness detection method for a carding machine according to claim 1, characterized in that: The possibility of determining that the pixel point is in the background area near the edge of the sliver includes: Taking any moment as the target moment, calculate the number of times the grayscale value of the pixel point in the grayscale image at the target moment appears in the grayscale image to obtain the grayscale value frequency; The ratio of the gray value frequency to the number of all pixels in the gray image is subjected to a negative exponential function operation and is used as the power of the possibility that the pixel is at the edge of the sliver at the target moment, thereby obtaining the possibility that the pixel in the gray image corresponding to the target moment is in the background area of the sliver edge.
5. A cotton sliver thickness detection method for a carding machine according to claim 1, characterized in that: The possibility of determining that the pixel point is in the background area near the edge of the sliver also includes: Take any moment as the target moment, take any pixel point in the grayscale image at the target moment as the target point, calculate the number of times the grayscale value of the target point appears in the grayscale image, and obtain the grayscale value frequency; A negative exponential function is performed on the ratio between the gray value frequency and the number of all pixels in the gray image, and the ratio is used as the power of the possibility that the pixel is at the edge of the sliver at the target moment, thereby obtaining an edge possibility index; The complement of the ratio between the gray value of the target point and the maximum gray value in the gray image is calculated, and the product of the complement and the edge possibility index is calculated to obtain the possibility that the target point in the gray image corresponding to the target time is in the background area of the sliver edge.
6. A method for detecting sliver thickness of a carding machine according to claim 1, characterized in that: The pixel value weight includes: Take any pixel point in the grayscale image as the target point, preset a window, obtain a window set with the target point as the neighborhood pixel point, take any window in the window set as the annotation window, and calculate the pixel value weight of the center point of the annotation window corresponding to the target point; The pixel value weight satisfies the following relationship: ; In the formula, Indicates The grayscale image at the moment The pixel value weight of each pixel relative to the center pixel in the window, Indicates the grayscale value of the center pixel in the preset window. Indicates The gray value of a pixel, The standard deviation of the Gaussian kernel representing the pixel value weights, Represented by natural numbers An exponential function with base .
7. A cotton strip thickness detection method for a carding machine according to claim 1, characterized in that: The bilateral filtering comprises: Slide the preset window on the grayscale image and calculate the spatial distance weight between the central pixel point and other pixels in the preset window; Calculate the pixel value difference between the central pixel and each other pixel in the preset window, and use the Gaussian function to calculate the pixel value weight; The pixel value weight is corrected according to the possibility that the pixel point is in the background area at the edge of the sliver, and the product of the spatial distance weight and the corrected weight is used as the comprehensive weight of each pixel point in the filter; based on the comprehensive weight, the pixel points in the preset window are weighted averaged to complete the bilateral filtering of the grayscale image.
8. A method for detecting sliver thickness of a carding machine according to claim 1, characterized in that: The method of performing image detection on the significant image to obtain the thickness of the sliver includes: The edge of the sliver in the salient image is extracted, and the outer contour of the sliver is obtained using the minimum enclosing rectangle method. The width of the outer contour is used as the thickness of the sliver.
Citation Information
Patent Citations
Novel cotton sliver thickness detection system and detection method thereof
CN116164683A
Visual technology-based clock spare and accessory part quality detection method
CN117132506A
Transmission shaft part defect detection method and system based on image processing
CN118552549A
Reliability acquiring apparatus, reliability acquiring method, and reliability acquiring program
US20150023606A1