A stain detection method for linen washing
By partitioning and correcting the image to be detected, the initial threshold is adaptively obtained and weighted summed, the problem of inaccurate initial threshold value in the iterative threshold segmentation algorithm is solved, and the accuracy of stain detection and algorithm efficiency are improved.
Patent Information
- Application Number
- CN202510293240.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-03-13
- Publication Date
- 2025-06-24
- Estimated Expiration
- 2045-03-13
AI Technical Summary
When detecting textile stains, the initial threshold value is inaccurate, resulting in incomplete or over-segment of stain segmentation, affecting accurate identification, and requiring more iterations, resulting in inefficiency of the algorithm.
By dividing the image to be detected into several areas, obtaining the characteristic value and the regularity of the connection domain of each area, correcting the characteristic value to obtain the probability of stain defects, eliminating the influence of the shadowed area, adaptively obtaining the initial threshold of each target area, and obtaining the initial threshold of the image to be detected by weight summing.
It improves the accuracy of stain defect detection, reduces the number of iterations, improves the algorithm efficiency, and ensures the integrity and continuity of stained areas.
Smart Images

Figure CN119810101B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of image processing. More specifically, the present invention relates to a stain detection method for linen washing. Background Art
[0002] Linen washing refers to the process of cleaning various textiles used in places such as hotels and restaurants to keep them clean, hygienic, and in good condition for use. However, the pollution status of textiles is unknown, so it is necessary to detect stains in textiles.
[0003] When using the iterative threshold segmentation algorithm to detect the stain area in the image to be detected, the average value of the maximum gray value and the minimum gray value in the image to be detected is used as the initial threshold to detect the stain area in the image to be detected. However, due to the various stains on the textiles, the gray values of different stain areas are different, and when the textiles are uneven, there will also be shadow areas in the collected image to be detected. The gray value of this shadow area is similar to that of the stain area. Therefore, directly using the average value of the maximum gray value and the minimum gray value in the image to be detected as the initial threshold to segment the stain area in the image to be detected is very likely to misjudge some stain areas with unclear gray values as normal textile areas, resulting in incomplete stain segmentation, or misjudging the shadow area as a stain area, causing over-segmentation, interfering with the accurate identification of stains, and inaccurate initial thresholds will make the iterative threshold segmentation algorithm require more iterations to converge to a better threshold, resulting in low algorithm efficiency. Summary of the Invention
[0004] In order to solve the problem that when using the initial threshold of the iterative threshold segmentation algorithm to segment the stain area in the image to be detected, it is very likely to misjudge some stain areas with unclear gray values as normal textile areas, resulting in incomplete stain segmentation, the present invention proposes a stain detection method for linen washing, which includes the following steps:
[0005] Collect a standard image and the image to be detected, and divide the image to be detected into several regions according to the size of the standard image;
[0006] Obtain the probability of containing stain defects in each region , represents the probability of containing stain defects in the i-th region; represents the eigenvalue of the i-th region; represents the sum of the number of corner points of all connected domains in the i-th region; represents the number of connected domains in the i-th region; represents the regularity of the k-th connected domain in the i-th region; According to the probability of containing stain defects, obtain each target region;
[0007] Obtain the initial threshold of the image to be detected ; represents the number of target regions of the image to be detected; represents the initial threshold of the u-th target region of the image to be detected; represents the weight of the initial threshold of the u-th target region of the image to be detected; Based on the initial threshold of the image to be detected, the stain region is segmented.
[0008] The innovation of the present invention lies in dividing the image to be detected into several regions, obtaining the feature values of each region according to the gray value characteristics of the stains, then obtaining the regularity of each connected domain in each region according to the difference characteristics between stain defects and shadows, correcting the feature values of each region to obtain the probability of containing stain defects in each region, and then obtaining the target regions, avoiding the influence of the shadow region on the selection of the initial threshold. Finally, according to the gray value characteristics in each target region, the weights of the initial thresholds of each target region are obtained, and the initial thresholds of each target region are weighted and summed to obtain the initial threshold of the image to be detected, so that subsequent stain defects with different gray values can be segmented to obtain accurate stain defects.
[0009] Preferably, the obtaining of the feature value of the i-th region includes:
[0010] Obtain the gray value set of the i-th region;
[0011] ;
[0012] In the formula, represents the feature value of the i-th region; represents the standard deviation of the gray values of all pixel points in the i-th region; represents the number of pixel points of the j-th type of gray value in the standard image in the gray value set of the i-th region; represents the number of pixel points of the j-th type of gray value in the i-th region in the gray value set of the i-th region; || represents the absolute value symbol; represents the number of types of gray values in the gray value set of the i-th region; represents the difference between the gray mean value of the standard image and the i-th region.
[0013] The greater the feature value of a region, the more likely it contains stain defects, which is convenient for subsequent calculation of the probability of containing stain defects in each region.
[0014] Preferably, the obtaining of the gray value set of the i-th region includes:
[0015] Take the union of the types of gray values in the i-th region and the types of gray values in the standard image as the gray value set of the i-th region.
[0016] Preferably, obtaining the regularity of the k-th connected component in the i-th region includes:
[0017] Obtaining the edge segments of each connected component in the i-th region and the corresponding straight lines of the edge segments of each connected component;
[0018] ;
[0019] In the formula, represents the regularity of the k-th connected component in the i-th region; represents the number of edge segments of the k-th connected component in the i-th region; represents the average value of the deviations between all the pixel points on the h-th edge segment of the k-th connected component in the i-th region and its corresponding straight line; exp() represents the exponential function with the natural constant as the base.
[0020] According to the regularity, the shadow and stain defects can be distinguished.
[0021] Preferably, obtaining the edge segments of each connected component in the i-th region and the corresponding straight lines of the edge segments of each connected component includes:
[0022] Subtracting the i-th region from the standard image to obtain the i-th difference image, and performing connected component analysis on the pixel points with non-zero gray values in the i-th difference image to obtain several connected components in the i-th region;
[0023] Using the Harris corner detection algorithm, obtaining the corners of the connected components in the i-th region, dividing the edges of the connected components in the i-th region into several edge segments according to the corners of the connected components in the i-th region to obtain the edge segments of the connected components in the i-th region, and connecting the endpoints of the edge segments of the connected components in the i-th region to obtain the corresponding straight lines of the edge segments of each connected component in the i-th region.
[0024] Preferably, obtaining each target region includes:
[0025] Presetting a feature value threshold T, and if the corrected feature value of any region is greater than or equal to the feature value threshold, marking this region as a target region.
[0026] It is convenient to subsequently analyze only the target regions that are more likely to contain stain defects to obtain the initial threshold of the image to be detected, and avoid the influence of the shadow region on the acquisition of the initial threshold.
[0027] Preferably, obtaining the initial threshold of the u-th target region of the image to be detected includes:
[0028] Obtaining the average value of the maximum gray value and the minimum gray value in each target region as the initial threshold of each target region.
[0029] Preferably, obtaining the weight of the initial threshold of the u-th target region in the image to be detected includes:
[0030] ;
[0031] In the formula, represents the degree of attention to the initial threshold of the u-th target region; represents the gray-scale mean value of all connected regions of the u-th target region; represents the maximum value among the gray-scale mean values of all connected regions of all target regions; represents a hyperparameter;
[0032] Perform Softmax normalization on the degrees of attention to the initial thresholds of all target regions to obtain the weights of the initial thresholds of each target region.
[0033] Preferably, segmenting the stain region according to the initial threshold of the image to be detected includes:
[0034] Segment the stain region in the image to be detected using the iterative threshold segmentation method according to the initial threshold of the image to be detected to obtain the stain region.
[0035] Improve the accuracy of stain defect detection.
[0036] Preferably, collecting the standard image and the image to be detected includes:
[0037] Use a camera to take a picture of an uncontaminated textile area to obtain a standard RGB image. After graying the standard RGB image, it is recorded as the standard image;
[0038] Use a camera to take a picture of a used textile to obtain a to-be-detected RGB image. After graying the to-be-detected RGB image, it is recorded as the image to be detected.
[0039] The present invention has the following beneficial effects: The purpose of the present invention is to divide the image to be detected into several regions, obtain the eigenvalue of each region according to the gray-scale value characteristics of the stain, then obtain the regularity of each connected region in each region according to the difference characteristics between the stain defect and the shadow, correct the eigenvalue of each region to obtain the probability of containing the stain defect in each region, and further obtain the target region, avoiding the influence of the shadow region on the selection of the initial threshold. Finally, according to the gray-scale value characteristics in each target region, obtain the weights of the initial thresholds of each target region, perform weighted summation on the initial thresholds of each target region to obtain the initial threshold of the image to be detected, so that subsequent stain defects with different gray-scale values can be segmented to obtain accurate stain defects. Description of the Drawings
[0040] 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 understandable. In the drawings, several embodiments of the present invention are shown in an exemplary rather than restrictive manner, and the same or corresponding reference numerals represent the same or corresponding parts, where:
[0041] Figure 1 is a flowchart of the steps of a stain detection method for linen washing according to an embodiment of the present invention. Detailed implementation manners
[0042] The following will clearly and completely describe the technical solutions in the embodiments of the present invention with reference to the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are some, but not all, of the embodiments of the present invention. All other embodiments obtained by those skilled in the art based on the embodiments of the present invention without creative efforts fall within the protection scope of the present invention.
[0043] The following will describe in detail the specific implementation manners of the present invention with reference to the accompanying drawings.
[0044] Please refer to Figure 1 , which shows a flowchart of the steps of a stain detection method for linen washing provided by an embodiment of the present invention. The method includes the following steps:
[0045] S001. Collect a standard image and an image to be detected.
[0046] In the embodiment of the present invention, a camera is used to take a picture of an uncontaminated textile area to obtain a standard RGB image. After graying the standard RGB image, it is denoted as the standard image; a camera is used to take a picture of a used textile to obtain an image to be detected RGB image. After graying the image to be detected RGB image, it is denoted as the image to be detected.
[0047] S002. Divide the image to be detected into several regions according to the size of the standard image, and obtain the feature value of each region; obtain the connected domain of each region, and then obtain the regularity of each connected domain of each region. Based on the regularity, correct the feature value of each region to obtain the probability that each region contains a stain defect. According to the probability that each region contains a stain defect, obtain the target region.
[0048] It should be noted that when using the iterative threshold segmentation algorithm to detect the stain area in the image to be detected, the average value of the maximum gray value and the minimum gray value in the image to be detected is used as the initial threshold to detect the stain area in the image to be detected. However, since the stains on textiles are various, the gray values of different stain areas are different, and when the textile is uneven, there will also be shadow areas in the collected image to be detected. The gray values of these shadow areas are similar to those of the stain areas. Therefore, directly using the average value of the maximum gray value and the minimum gray value in the image to be detected as the initial threshold to segment the stain area in the image to be detected is very likely to misjudge some stain areas with unclear gray values as normal textile areas, resulting in incomplete stain segmentation, or misjudging the shadow areas as stain areas, causing over-segmentation and interfering with the accurate identification of stains. Moreover, inaccurate initial thresholds will cause the iterative threshold segmentation algorithm to require more iterations to converge to a better threshold, resulting in low algorithm efficiency.
[0049] Therefore, in the embodiments of the present invention, first, the image to be detected is divided into several regions, the characteristic values of each region are analyzed, and then the shadow areas caused by the unevenness of the textile are excluded according to the characteristic values, and the target regions more likely to contain stain areas are obtained. Subsequently, each target region is analyzed separately, and the segmentation threshold of each target region is adaptively obtained, so that all stain areas with different gray levels can be accurately segmented.
[0050] In the embodiments of the present invention, the image to be detected is divided into several regions according to the size of the standard image.
[0051] It should be further noted that there is a certain gray difference between the gray values of the known stain areas and the normal areas. Therefore, if the gray value distribution in any region is relatively chaotic and the gray value is low, then it is more likely that the stain area is contained in this region; and since the standard image collected in step S001 is an uncontaminated textile, and the regions are based on the size of the standard image, the difference in the number of pixel points corresponding to the gray values of the standard image and each region can be compared to determine whether each region contains a stain area, and then the characteristic value of each region is obtained according to the above characteristics.
[0052] In the embodiments of the present invention, the union of the gray value types in the i-th region and the gray value types in the standard image is used as the gray value set of the i-th region;
[0053] Obtain the characteristic value of each region:
[0054] ;
[0055] In the formula, represents the characteristic value of the i-th region; represents the standard deviation of the grayscale values of all pixel points in the \(i\)-th region; represents the number of pixel points of the \(j\)-th grayscale value in the grayscale value set of the \(i\)-th region in the standard image; represents the number of pixel points of the \(j\)-th grayscale value in the grayscale value set of the \(i\)-th region in the \(i\)-th region; || represents the absolute value symbol; represents the number of grayscale value types in the grayscale value set of the \(i\)-th region; represents the difference between the grayscale mean of the standard image and the \(i\)-th region;
[0056] The larger the value of \(\cdots\), it indicates that the grayscale in the \(i\)-th region is lower than that in the standard image, and the larger the eigenvalue of the \(i\)-th region; The larger the value of \(\cdots\), it indicates that the grayscale distribution of the pixel points in the \(i\)-th region is more complex, that is, the larger the eigenvalue of the \(i\)-th region; The larger the value of \(\cdots\), it indicates that the grayscale value distribution of the \(i\)-th region is less similar to that of the standard image, then the larger the eigenvalue of the \(i\)-th region.
[0057] It should be noted that when obtaining the image to be detected, shadows may appear due to the unevenness of the textile. The grayscale characteristics of the shadow are similar to those of the stain defect. For the regions containing shadows and the regions containing stain defects, their eigenvalues are relatively similar. Therefore, the present invention needs to analyze the distinguishing features between the shadows caused by the unevenness of the textile and the stain defects, and then combine the eigenvalues of each region to obtain the probability of containing stain defects in each region;
[0058] Also, when there is a shadow or a stain in any region, after subtracting the region from the standard image, the connected domain formed by the pixel points with non-zero grayscale values in the obtained difference image is denoted as the connected domain of the region. The connected domain may be a shadow or a stain region, and then the shape complexity and edge morphology of the connected domain of each region are analyzed;
[0059] Since the shape of the shadow region generated by the protrusion of the textile when shooting the image to be detected is relatively regular, and the edge is relatively smooth and closer to a straight line segment, the number of corner points on the edge of the shadow is relatively small. And according to the corner points, the edge of the connected domain of the shadow is divided into several edge segments, and the deviation between the straight lines formed by connecting the endpoints of the edge segments is relatively small;
[0060] When stains on textiles are forming and spreading, the edges of the stain defects are not smooth and do not conform to a straight line, and the shapes of some stains are also relatively complex. Therefore, when the stain edges are not smooth and the shapes are complex, there will be a large number of positions with sudden changes in edge direction and large curvature changes on the edges of the stain defects. These positions are easily detected as corner points. Therefore, the more corner points there are in the connected region of any area, it indicates that the edge of the connected region in that area is uneven and the shape of the connected region is more complex. And according to the corner points, the edge of the connected region in that area is divided into several edge segments, and the deviation between the straight lines formed by connecting the endpoints of the edge segments will also be greater;
[0061] In the embodiment of the present invention, the i-th region is subtracted from the standard image to obtain the i-th difference image, and connected region analysis is performed on the pixel points with non-zero gray values in the i-th difference image to obtain several connected regions of the i-th region;
[0062] Using the Harris corner detection algorithm, the corner points of the connected region of the i-th region are obtained. According to the corner points of the connected region of the i-th region, the edge of the connected region of the i-th region is divided into several edge segments to obtain the edge segments of the connected region of the i-th region. The endpoints of the edge segments of the connected region of the i-th region are connected to obtain the corresponding straight lines of the edge segments of each connected region of the i-th region;
[0063] Obtain the regularity of the k-th connected region of the i-th region:
[0064] ;
[0065] In the formula, represents the regularity of the k-th connected region of the i-th region; represents the number of edge segments of the k-th connected region of the i-th region; represents the mean value of the deviations of all pixel points on the h-th edge segment of the k-th connected region of the i-th region from its corresponding straight line; exp() represents the exponential function with the natural constant as the base; The larger the value of, it indicates that the edge of the k-th connected region of the i-th region is not smooth and the deviation between the edge and the straight line is large, then the regularity of the k-th connected region of the i-th region is smaller.
[0066] It should be noted that the method for obtaining the deviation of a pixel point from a straight line, that is, the shortest distance from the pixel point to the straight line, is a well-known technology. In the embodiment of the present invention, it will not be elaborated too much.
[0067] Obtain the probability of containing stain defects in each region:
[0068] ;
[0069] wherein, represents the probability of having a stain defect in the i-th region; represents the eigenvalue of the i-th region; represents the sum of the number of corner points of all connected regions in the i-th region; represents the number of connected regions in the i-th region; represents the regularity of the k-th connected region in the i-th region; The larger the value of , the less smooth the edge of the i-th region and the more irregular its shape; the smaller the value of , the smaller the regularity of the connected regions in the i-th region, then the edges of the connected regions in the i-th region are less smooth and the deviation between the edges and the straight line is larger, and then the probability of having a stain defect in the i-th region is greater; the larger the value of
[0070] , the greater the probability of having a stain defect in the i-th region.
[0071] S003. Obtain the initial threshold of each target region. According to the grayscale mean value of all connected regions of each target region, obtain the weight of the initial threshold of each target region, and perform weighted summation on the initial threshold of each target region according to the weight of the initial threshold of each target region to obtain the initial threshold of the image to be detected.
[0072] It should be noted that it is known that the obtained target regions are more likely to contain stain regions. Since the types of stains are different, the grayscale values of the stains are different. Therefore, in the present invention, after performing weighted summation on the initial thresholds of each target region and obtaining the initial threshold of the image to be detected, the overall segmentation of the image to be detected can comprehensively consider the grayscale value situations of different types of stains that may exist in different target regions, making the finally determined initial threshold of the image to be detected more representative and adaptable. Subsequently, all stains can be completely segmented. And when separately segmenting the stain regions of each target region, it may be because the selection of the initial threshold of each target region is relatively independent, and the continuity and relevance of the stains between the target regions are ignored, resulting in a split phenomenon of the stains after segmentation. However, the overall segmentation can start from a global perspective, better maintain the integrity and continuity of the stains, and make the segmentation result more in line with the actual situation;
[0073] The initial threshold of the known iterative threshold segmentation algorithm is the mean of the maximum gray value and the minimum gray value in the image. Therefore, first, according to the method for obtaining the initial threshold, the initial threshold of each target region is obtained. It is known that if the gray value of the connected domain of any target region is larger, it indicates that the contrast between the connected domain in this target region and the normal region is not large. At this time, the initial threshold of this target region can segment out the stains with deeper imprints, but may not be able to segment out the stains with lighter imprints. Therefore, the weight of the initial threshold of this target region should be smaller;
[0074] However, if the gray value of the connected domain of any target region is smaller than that of the connected domains of other target regions, it indicates that the contrast between the connected domain in this target region and the normal region is obvious. The stain region that this target region may contain is the stain with a lighter imprint. Therefore, in order to detect the stain defects in this target region subsequently, more attention should be paid to the initial threshold of this target region, and the weight of the initial threshold of this target region should be larger.
[0075] In the embodiment of the present invention, the mean of the maximum gray value and the minimum gray value in each target region is obtained as the initial threshold of each target region;
[0076] Obtain the attention degree of the initial threshold of each target region:
[0077] ;
[0078] In the formula, represents the attention degree of the initial threshold of the u-th target region; represents the gray mean value of all connected domains of the u-th target region; represents the maximum value among the gray mean values of all connected domains of all target regions; represents a hyperparameter. In the embodiment of the present invention, it is preset To avoid the value of being 0, The larger the value of, the larger the gray value of the possible stain defects in the u-th target region compared to the deepest gray value of the stain defects. Then, in order to more accurately segment out the possible stain defects in the u-th target region, more attention needs to be paid to the initial threshold of this target region.
[0079] Perform Softmax normalization processing on the attention degrees of the initial thresholds of all target regions to obtain the weights of the initial thresholds of each target region. It should be noted that the Softmax normalization processing method is a prior art, and in the embodiment of the present invention, it will not be elaborated too much here.
[0080] Obtain the initial threshold of the image to be detected:
[0081] ;
[0082] In the formula, W represents the initial threshold of the image to be detected; represents the number of target regions of the image to be detected; represents the initial threshold of the u-th target region of the image to be detected; represents the weight of the initial threshold of the u-th target region of the image to be detected. The larger its value, the more attention should be paid to the initial threshold of the u-th target region of the image to be detected. represents the weighted sum of the initial thresholds of each target region of the image to be detected to obtain the initial threshold of the image to be detected.
[0083] S004. Segment the stain region according to the initial threshold of the image to be detected.
[0084] In the embodiment of the present invention, according to the initial threshold of the image to be detected, the iterative threshold segmentation method is used to segment the stain region in the image to be detected to obtain the stain region.
[0085] The above are only the preferred embodiments of the present invention and are not intended to limit the present invention. Any modifications, equivalent replacements, improvements, etc. made within the principle of the present invention shall be included in the protection scope of the present invention.
Claims
1. A stain detection method for linen washing, characterized in that: include: Collecting a standard image and an image to be detected, and dividing the image to be detected into several areas according to the size of the standard image; Get the probability of each area containing stain defects , represents the probability of containing stain defects in the i-th region; represents the eigenvalue of the i-th region; Represents the sum of the number of corner points of all connected domains in the i-th region; Represents the number of connected domains in the i-th region; represents the regularity of the kth connected domain of the ith region; Acquire each target area according to the probability of containing the stain defect; Acquiring the characteristic value of the ith region includes: acquiring a grayscale value set of the ith region by taking a union of the grayscale value types in the ith region and the grayscale value types in the standard image as the grayscale value set of the ith region; , Represents the standard deviation of the grayscale values of all pixels in the i-th region, Represents the number of pixels in the standard image of the j-th gray value in the gray value set of the i-th region, represents the number of pixels in the i-th region with the j-th grayscale value in the i-th region, || represents the absolute value symbol, Represents the number of grayscale value types in the grayscale value set of the i-th region, Represents the difference between the grayscale mean of the standard image and the i-th region; The acquisition of the regularity of the kth connected domain of the i-th region includes: acquiring the edge segment of each connected domain of the i-th region and the corresponding straight line of the edge segment of each connected domain; , represents the number of edge segments of the kth connected domain of the ith region, represents the mean deviation of all pixels on the hth edge segment of the kth connected domain of the ith region from their corresponding straight line, and exp() represents an exponential function with a natural constant as the base; Get the initial threshold of the image to be detected ; Represents the number of target areas of the image to be detected; Represents the initial threshold of the u-th target area of the image to be detected; Represents the weight of the initial threshold of the u-th target area of the image to be detected; according to the initial threshold of the image to be detected, the stain area is segmented.
2. A stain detection method for linen washing according to claim 1, characterized in that: The step of obtaining the edge segment of each connected domain of the i-th region and the corresponding straight line of the edge segment of each connected domain comprises: Subtract the i-th region from the standard image to obtain the i-th difference image, and perform connected domain analysis on the pixels whose grayscale values in the i-th difference image are not 0 to obtain several connected domains in the i-th region; Use the Harris corner detection algorithm to obtain the corner points of the connected domain of the ith region. According to the corner points of the connected domain of the ith region, divide the edge of the connected domain of the ith region into several edge segments to obtain the edge segments of the connected domain of the ith region. Connect the endpoints of the edge segments of the connected domain of the ith region to obtain the corresponding straight lines of each edge segment of the connected domain of the ith region.
3. A stain detection method for linen washing according to claim 1, characterized in that: The obtaining of each target area comprises: A characteristic value threshold T is preset, and if the corrected characteristic value of any area is greater than or equal to the characteristic value threshold, the area is recorded as a target area.
4. A stain detection method for linen washing according to claim 1, characterized in that: The acquisition of the initial threshold value of the u-th target area of the image to be detected includes: The average of the maximum grayscale value and the minimum grayscale value in each target area is obtained as the initial threshold of each target area.
5. A stain detection method for linen washing according to claim 1, characterized in that: The acquisition of the weight of the initial threshold of the u-th target area of the image to be detected includes: ; In the formula, Represents the initial threshold attention level of the u-th target area; Represents the grayscale mean of all connected domains of the u-th target area; Represents the maximum value of the grayscale mean of all connected domains in all target areas; represents a hyperparameter; The attention levels of the initial thresholds of all target regions are subjected to Softmax normalization to obtain the weight of the initial threshold of each target region.
6. A stain detection method for linen washing according to claim 1, characterized in that: The step of segmenting the stain area according to the initial threshold of the image to be detected includes: According to the initial threshold of the image to be detected, the stain area in the image to be detected is segmented using the iterative threshold segmentation method to obtain the stain area.
7. A stain detection method for linen washing according to claim 1, characterized in that: The collecting of the standard image and the image to be detected includes: Use a camera to take a picture of an uncontaminated textile area to obtain a standard RGB image, and then grayscale the standard RGB image to record it as a standard image; A camera is used to take a picture of the used textile to obtain an RGB image to be detected. The RGB image to be detected is gray-scaled and recorded as the image to be detected.
Citation Information
Patent Citations
Intelligent defect identification method for photoetching mask
CN117173414A
Stain detection method, system and equipment based on image enhancement and medium
CN118135548A
Cited By
Article stain positioning and video monitoring method and system based on computer vision
CN122415978A