Coated surface hair foreign matter detection method based on rapid local threshold segmentation

Through the fast local threshold segmentation method, combined with Gaussian filtering and subtraction processing, the identification of foreign matter on the coated surface hair is solved, and the problems of limited detection types and slow speed in the prior art are achieved, and the rapid and accurate detection of small defects and background interference are achieved. Effective filtering is suitable for online detection.

CN118982525AActive Publication Date: 2024-11-19ZHEJIANG GUOCHEN INTELLIGENT INSPECTION TECHNOLOGY CO LTD

Patent Information

Application Number
CN202411069957.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-08-06
Publication Date
2024-11-19
Estimated Expiration
2044-08-06

AI Technical Summary

Technical Problem

In the prior art, when detecting foreign matters on coated surfaces, there are problems such as limited detection types, complex calculation methods and slow speed, which are difficult to be used for online detection, especially when small defects are easily compressed and lost or when background interference is large.

Method used

Using a method based on fast local threshold segmentation, the grayscale image of the coated surface is obtained through the camera, combined with Gaussian filtering and subtraction processing, the variance and segmentation threshold of the grayscale difference image are calculated, and the binarization process and contour recognition are performed, and the contour is used. The length and roundness determine whether it is a hair strand, filter background interference, and achieve fast and accurate detection.

Benefits of technology

It realizes rapid and accurate detection of foreign matter on the coated surface, can effectively filter background interference similar to hair, fast processing speed, is suitable for online detection, has high detection accuracy, and has great application value.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118982525A_ABST
    Figure CN118982525A_ABST
Patent Text Reader

Abstract

The invention discloses a coating surface hair foreign matter detection method based on rapid local threshold segmentation. The method comprises the following steps: carrying out image shooting on a coated surface to obtain a surface gray level image, carrying out Gaussian filtering and subtraction operation processing on the surface gray level image to obtain a gray level difference image, segmenting the gray level difference image by using a large threshold value to obtain a contour of suspected obvious hair, and carrying out preliminary judgment; and further fine image analysis processing is carried out according to the gray difference image to judge whether hair defects exist or not. The method is accurate and practical in detection, and background interference similar to hair can be effectively filtered. The method is high in image calculation speed, can be widely applied to similar scenes, and has high application value.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The invention relates to a computer vision image processing method, and in particular to a hair foreign body detection method on a coating surface based on fast local threshold segmentation. Background Art

[0002] With the rapid development of the industrial field, the coating quality requirements are getting higher and higher. The traditional method of using manual inspection for coating surface defects not only affects the production speed, but also easily misses small defects. In recent years, with the gradual improvement of computer vision in the industrial field, image algorithms are gradually replacing manual inspection as the main means of coating surface defect detection.

[0003] Computer vision can be divided into two main types in coating detection:

[0004] 1) Defect detection method based on deep learning. The common method is to manually calibrate the image with defects, train it through the neural network, and use the trained weights to process the image to obtain the defects. This technology can accurately detect obvious and larger defects, but in order to increase the training and detection speed, the image needs to be compressed before the neural network is processed, which makes it easy to lose small defects such as hair after compression. If the compression ratio is reduced, it will lead to too long processing time or the need to stack graphics cards, resulting in a large increase in costs.

[0005] 2) Defect detection method using traditional image algorithms. The common method is to obtain defects by the difference with the background. This method can detect defects well when the background is uniform, but it is difficult to extract defects when the background changes significantly, especially when the defect is similar to the background.

[0006] Existing methods have the problems of limited types of surface defects that can be detected, complex and slow calculation methods that make them difficult to use for online detection, or they rely on expensive and complex hardware imaging technology. Therefore, a new method for detecting hair foreign objects on coated surfaces is needed. Summary of the invention

[0007] In order to solve the problem that defects such as hair on the coating surface that are slender and close to the background are difficult to solve, the purpose of the present invention is to provide a method for detecting hair foreign matter on the coating surface based on fast local threshold segmentation. Compared with the background technology, the recognition method is simple, can quickly and accurately detect hair foreign matter, and is suitable for online detection occasions.

[0008] like Figure 1 As shown, the steps of the technical solution adopted by the present invention to solve its technical problem are as follows:

[0009] 1) Using a camera or a video camera to capture the coated surface and obtain a surface grayscale image P(i, j);

[0010] 2) The surface grayscale image P(i,j) is processed by Gaussian filtering and subtraction to obtain the grayscale difference image D(i,j);

[0011] 3) Use a large threshold to segment the grayscale difference image D(i,j), traverse each pixel point of the segmented binary image to obtain the connected domain and use it as the outline of the suspected obvious hair, and calculate the length and circularity of the outline to determine whether it is a hair:

[0012] If it is a hair, it is determined that there is a hair foreign body, and the hair data is returned and the process is exited to save calculations. Otherwise, it jumps to the next step.

[0013] 4) Further image analysis and processing is performed on the grayscale difference image D(i,j) to determine whether there is a hair defect, and then determine whether there is a hair foreign body.

[0014] The step 2) is specifically as follows:

[0015] 2.1) Perform Gaussian filtering on the surface grayscale image P(i,j) to form a blurred image;

[0016] 2.2) Use the blurred image to subtract the surface grayscale image P(i,j) to obtain the grayscale difference image D(i,j).

[0017] In the step 2.1), the original surface grayscale image is filtered according to the formula:

[0018]

[0019] Where f(x,y) is the signal value after filtering, x and y represent the horizontal and vertical coordinates of the image, σ represents the standard deviation of the Gaussian distribution, and e represents a natural constant.

[0020] The step 4) is specifically as follows:

[0021] 4.1) Calculate the variance of the pixel values ​​of all pixels in each column of the grayscale difference image D(i,j) and save it as the variance of each pixel column, and obtain the maximum and minimum values ​​of the variance of all pixel columns;

[0022] 4.2) Calculate the high segmentation threshold according to the variance of each pixel column and the maximum and minimum values ​​of the variance of each pixel column, and segment the grayscale difference image D(i, j) using the high segmentation threshold to obtain the darker area binary image B(i, j);

[0023] 4.3) Dilate the darker area binary image B(i,j) to obtain the suspected area template image M(i,j);

[0024] 4.4) Calculate the low segmentation threshold according to the variance of each pixel column and the maximum and minimum values ​​of the variance of each pixel column, and segment the grayscale difference image D(i,j) using the low segmentation threshold to obtain a binary image of the dark area;

[0025] 4.5) Perform an AND operation on the dark area binary image and the suspected area template image M(i,j) to obtain a binary contour image C(i,j);

[0026] 4.6) All connected domains in the binary contour image C(i,j) are obtained as contours through connected domain recognition, one connected domain is regarded as a contour, and all contours are filtered according to the circularity and length of each contour to obtain all the slender contours suspected to be hair;

[0027] 4.7) All the slender contours in step 4.6) are connected to adjacent contours, and non-hair defects are filtered out according to the actual hair length to determine whether there are hair defects.

[0028] In step 3) or step 4.6), the circularity of the contour is calculated using the following formula:

[0029]

[0030] Where degree is the circularity of the contour, area is the area enclosed by the contour, and r is the minimum radius of the circle enclosing the contour.

[0031] In step 4.1), the variance of the pixel values ​​of all the pixels in every five columns is used as the variance of each pixel column in the five columns, so as to calculate the variance of the compressed image and compress the image to save calculation and prevent deviation.

[0032] In step 4.1), the variance of each pixel column is calculated using the following formula:

[0033]

[0034] In the formula, S 2 is the variance of the m*n size image, is the average value of all pixels in the area where each pixel column is located, and p(i,j) is the pixel value of the pixel at coordinate (i,j).

[0035] In step 4.2) and step 4.4), the high segmentation threshold and the low segmentation threshold used for image segmentation are calculated using the following formula:

[0036] thresh=thresh max *θ+thresh min *(1-θ)

[0037] In the formula, thresh is the actual segmentation threshold, thresh max and thresh min are the preset upper and lower limits of the segmentation threshold, respectively, and θ is the proportional coefficient;

[0038] The high segmentation threshold and the low segmentation threshold are set according to the above formula based on their own preset segmentation threshold upper and lower limits. Both use the same formula, but due to different positions, light fields or other purposes, the threshmax and threshmin setting experience values ​​are different.

[0039] And the proportionality coefficient θ is set according to the following formula:

[0040]

[0041] d=Mm

[0042] Wherein, v is the variance of each pixel column, m and M are the minimum and maximum values ​​of the variances of each pixel column of the image, respectively, and d represents the maximum difference of the variances of each pixel column of the image.

[0043] In step 4.2) and step 4.4), the image is segmented using the following formula using the segmentation threshold:

[0044]

[0045] In the formula, v i,j is the pixel value after the pixel point segmentation at coordinate (i, j), p i,j is the original pixel value of the pixel at coordinate (i, j), thresh is the segmentation threshold, which is the high segmentation threshold or the low segmentation threshold.

[0046] The step 4.7) is specifically as follows:

[0047] 4.7.1) Judge each slender contour:

[0048] If the length of the thin and long contour is greater than or equal to the preset hair length, the thin and long contour is a hair defect and is considered to contain a hair foreign body, and the next step is not performed;

[0049] If the length of the slender contour is less than the preset hair length, the slender contour is taken as a suspected contour and the next step is performed;

[0050] 4.7.2) The suspected contour is preliminarily connected with other suspected contours within the surrounding actual adjacent distance to form a connected contour. Specifically, the actual adjacent distance between the contours is first calculated using the outer enclosing rectangle between the contours, and the preliminary connection is performed within the actual adjacent distance and saved to save calculation. The actual adjacent distance is determined according to the following formula:

[0051] dis=min(dis i,j )

[0052]

[0053] In the formula, dis is the actual adjacent distance, dis i,j is the distance between the i-th pixel of the first contour and the j-th pixel of the second contour, p i and p j are the pixel values ​​of the pixels on the two contours respectively;

[0054] 4.7.3) For all connected contours obtained in 4.7.2), calculate the length of the minimum enclosing rectangle of the connected contours and make a judgment:

[0055] If the length is shorter than the preset hair length, it will be discarded;

[0056] If the length is greater than or equal to the preset hair length, the connected contour is a hair defect and it is considered that there is a hair foreign body.

[0057] The coated surface described in the present invention refers to a surface formed by coating an object or a ground or a wall with a certain material, which is usually a polymer material.

[0058] The present invention has the following beneficial effects:

[0059] The present invention utilizes the characteristic that the image brightness is uneven due to illumination or process reasons on the coating surface, and processes the image in segments through an adaptive threshold, uses a high threshold to eliminate most of the coating interference, and uses a low threshold to connect the hairs.

[0060] The present invention is accurate and practical in detection, and can effectively filter out background interference similar to hair. The method is simple, not only conducive to engineering implementation, but also fast in processing speed, high in accuracy, and fast in image calculation speed. In terms of hair detection, it can be widely used in similar scenes and has great application value. BRIEF DESCRIPTION OF THE DRAWINGS

[0061] Figure 1 is a flow chart of the method of the present invention.

[0062] Figure 2 It is the original image in Example 1 of the present invention.

[0063] Figure 3 is the blurred image after Gaussian filtering.

[0064] Figure 4 yes Figure 3 The difference image from the original image.

[0065] Figure 5It is the binary image after the difference image is segmented using a high threshold.

[0066] Figure 6 yes Figure 5 Binarized image after dilation.

[0067] Figure 7 It is the binary image after the difference image is segmented using a low threshold.

[0068] Figure 8 yes Figure 5 and Figure 6 Binarized image after AND operation.

[0069] Fig. 9 yes Figure 2 Figure 1. Detection results of hair foreign bodies.

[0070] Fig.10 Here is the original image with the hair strands.

[0071] Fig.11 yes Fig.10 Figure 1. Detection results of hair foreign bodies.

[0072] Fig.12 Here is the original image with the hair strands.

[0073] Fig.13 yes Fig.12 Figure 1. Detection results of hair foreign bodies. DETAILED DESCRIPTION

[0074] The present invention will be further described below in conjunction with the accompanying drawings and specific embodiments.

[0075] like Figure 1 As shown, the embodiments of the present invention and their implementation process are as follows:

[0076] 1) Take a picture of the coated surface with a camera or a video camera to obtain a surface grayscale image P(i, j); take a grayscale image of the coated surface, such as Figure 2 As shown, for ease of presentation, only the hair and surrounding areas are shown.

[0077] 2) According to the following formula, use a 31×31 window size to perform Gaussian filtering on the original surface grayscale image P(i,j) to form Figure 3 Blurred image shown;

[0078]

[0079] Where f(x,y) is the signal value after filtering, x and y represent the horizontal and vertical coordinates of the image, σ represents the standard deviation of the Gaussian distribution, and e represents a natural constant.

[0080] 3) Subtract the original image from the filtered image, that is, use the blurred image to subtract the surface grayscale image P(i, j), and get Figure 4 The grayscale difference image D(i,j) shown contains only the darker areas.

[0081] 4) Use a large threshold to segment the grayscale difference image D(i,j) to obtain a binary image. The segmentation threshold is shown in formula (2). max is the upper limit of the threshold used subsequently. The segmentation method is shown in formula (3).

[0082] Traverse each pixel point of the segmented binary image to obtain the connected domain and use it as the outline of the suspected obvious hair. Then calculate the length and circularity of the outline to determine whether it is a hair:

[0083] The circularity of the contour is calculated above using the following formula:

[0084] thresh=1.5*thresh max (2)

[0085]

[0086] Where degree is the circularity of the contour, area is the area enclosed by the contour, and r is the minimum radius of the circle enclosing the contour.

[0087] If it is a hair, it is determined that there is a hair foreign body, and the hair data is returned and the process is exited to save calculations. Otherwise, it jumps to the next step.

[0088] 5) Further image analysis and processing is performed on the grayscale difference image D(i,j) to determine whether there is a hair defect, and then determine whether there is a hair foreign body.

[0089] 5.1) Calculate the variance of the pixel values ​​of all pixels in each column of the grayscale difference image D(i,j) and save it as the variance of each pixel column, and obtain the maximum and minimum values ​​of the variance of all pixel columns;

[0090] In a specific implementation, the variance of the pixel values ​​of all the pixels in every five columns is used as the variance of each pixel column in the five columns, so as to calculate the variance of the compressed image and compress the image to save calculation and prevent deviation.

[0091] The variance of each pixel column is calculated using the following formula:

[0092]

[0093] In the formula, S 2 is the variance of the m*n size image, is the average value of all pixels in the area where each pixel column is located, and p(i,j) is the pixel value of the pixel at coordinate (i,j).

[0094] 5.2) Calculate the high segmentation threshold and the low segmentation threshold according to the variance of each pixel column and the maximum and minimum values ​​of the variance of each pixel column, and segment the grayscale difference image D(i, j) using the high segmentation threshold to obtain the following: Figure 5 The darker area is shown as the binarized image B(i,j).

[0095] The following formula is used in the above process to calculate the high segmentation threshold and low segmentation threshold used for image segmentation:

[0096] thresh=thresh max *θ+thresh min *(1-θ) (6)

[0097] In the formula, thresh is the actual segmentation threshold, thresh max and thresh min are the upper and lower limits of the preset segmentation threshold, respectively, and θ is the proportional coefficient;

[0098] And the proportional coefficient θ is set according to the following formula:

[0099]

[0100] d=Mm (7)

[0101] Wherein, v is the variance of each pixel column, m and M are the minimum and maximum values ​​of the variances of each pixel column of the image, respectively, and d represents the maximum difference of the variances of each pixel column of the image.

[0102] Then use the segmentation threshold to segment the image using the following formula:

[0103]

[0104] In the formula, v i,j is the pixel value after the pixel point segmentation at coordinate (i, j), p i,j is the original pixel value of the pixel at coordinate (i, j), thresh is the segmentation threshold, which is the high segmentation threshold or the low segmentation threshold.

[0105] 5.3) Use a 5×5 window dilation process on the darker area binary image B(i,j) to obtain Figure 6 The suspected area template image M(i,j) shown;

[0106] 5.4) Use a low segmentation threshold to segment the grayscale difference image D(i,j) and obtain Figure 7 The binarized image of the dark area shown;

[0107] 5.5) Perform AND operation on the binary image of the dark area and the template image M(i,j) of the suspected area to obtain Figure 8 The binary contour image C(i,j) shown;

[0108] 5.6) All connected domains in the binary contour image C(i,j) are obtained as contours through connected domain recognition, one connected domain is regarded as a contour, and all contours are filtered according to the circularity and length of each contour to obtain all the slender contours suspected to be hair;

[0109] The circularity of the contour is calculated above using the following formula:

[0110]

[0111] Where degree is the circularity of the contour, area is the area enclosed by the contour, and r is the minimum radius of the circle enclosing the contour.

[0112] 5.7) All the slender contours in step 5.6) are connected to adjacent contours, and the result is as follows Fig. 9 As shown, non-hair defects are filtered out according to the actual hair length to determine whether there are hair defects.

[0113] 5.7.1) Judge each slender contour:

[0114] If the length of the thin and long contour is greater than or equal to the preset hair length, the thin and long contour is a hair defect and is considered to contain a hair foreign body, and the next step is not performed;

[0115] If the length of the slender contour is less than the preset hair length, the slender contour is taken as a suspected contour and the next step is performed;

[0116] 5.7.2) The suspected contour is preliminarily connected with other suspected contours within the surrounding actual adjacent distance to form a connected contour. Specifically, the actual adjacent distance between the contours is first calculated using the outer enclosing rectangle between the contours, and the preliminary connection is performed within the actual adjacent distance and saved to save calculation. The actual adjacent distance is determined according to the following formula:

[0117] dis=min(dis i,j )

[0118]

[0119] In the formula, dis is the actual adjacent distance, dis i,j is the distance between the i-th pixel of the first contour and the j-th pixel of the second contour, p i and pj are the pixel values ​​of the pixels on the two contours respectively;

[0120] 5.7.3) For all connected contours obtained in 5.7.2), calculate the length of the minimum enclosing rectangle of the connected contours and make a judgment:

[0121] If the length is shorter than the preset hair length, it will be discarded;

[0122] If the length is greater than or equal to the preset hair length, the connected contour is a hair defect and it is considered that there is a hair foreign body.

[0123] Example 2

[0124] The original image with hair is as follows Fig.10 The results after treatment in the same manner as in Example 1 are shown in Fig.11 shown.

[0125] Example 3

[0126] The original image with hair is as follows Fig.12 The results after treatment in the same manner as in Example 1 are shown in Fig.13 shown.

[0127] After multiple implementations of the present invention, the accuracy of the method of the present invention reached 93%.

[0128] From the comparison between the original images and the detection result images of the above-mentioned embodiments, it can be seen that the present invention can accurately locate and detect hair foreign bodies on the coating surface. In addition, the image processing speed is fast. On a desktop computer with an i7-12700 CPU, the time to detect a frame of 8192×3000 size coating grayscale image is no more than 150ms. If there are obvious hairs, the time can be controlled within 80ms. It has great application value in the detection of hair foreign bodies on the coating surface.

[0129] The above specific implementation modes are used to explain the present invention rather than to limit the present invention. Any modification and change made to the present invention within the spirit of the present invention and the protection scope of the claims shall fall within the protection scope of the present invention.

Claims

1. A method for detecting hair foreign bodies on coated surfaces based on fast local threshold segmentation, characterized in that The method comprises the following steps: 1) Taking a photo of the coated surface to obtain a surface grayscale image P(i, j); 2) The surface grayscale image P(i,j) is processed by Gaussian filtering and subtraction to obtain the grayscale difference image D(i,j); 3) Use a large threshold to segment the grayscale difference image D(i,j), traverse each pixel point of the segmented binary image to obtain the connected domain and use it as the outline of the suspected obvious hair, and calculate the length and circularity of the outline to determine whether it is a hair: If it is a hair, it is judged that there is a hair foreign body, otherwise jump to the next step; 4) Further image analysis and processing is performed on the grayscale difference image D(i,j) to determine whether there is a hair defect, and then determine whether there is a hair foreign body.

2. The method for detecting hair foreign bodies on a coating surface based on fast local threshold segmentation according to claim 1, characterized in that: The step 2) is specifically as follows: 2.1) Perform Gaussian filtering on the surface grayscale image P(i,j) to form a blurred image; 2.2) Use the blurred image to subtract the surface grayscale image P(i,j) to obtain the grayscale difference image D(i,j).

3. The method for detecting hair foreign bodies on a coating surface based on fast local threshold segmentation according to claim 1, characterized in that: In the step 2.1), the original surface grayscale image is filtered according to the formula: Where f(x,y) is the signal value after filtering, x and y represent the horizontal and vertical coordinates of the image, σ represents the standard deviation of the Gaussian distribution, and e represents a natural constant.

4. The method for detecting hair foreign bodies on a coating surface based on fast local threshold segmentation according to claim 1, characterized in that: The step 4) is specifically as follows: 4.1) Calculate the variance of the pixel values ​​of all pixels in each column of the grayscale difference image D(i,j) as the variance of each pixel column, and obtain the maximum and minimum values ​​of the variances of all pixel columns; 4.2) Calculate the high segmentation threshold according to the variance of each pixel column and the maximum and minimum values ​​of the variance of each pixel column, and segment the grayscale difference image D(i, j) using the high segmentation threshold to obtain the darker area binary image B(i, j); 4.3) Dilate the darker area binary image B(i,j) to obtain the suspected area template image M(i,j); 4.4) Calculate the low segmentation threshold according to the variance of each pixel column and the maximum and minimum values ​​of the variance of each pixel column, and segment the grayscale difference image D(i,j) using the low segmentation threshold to obtain a binary image of the dark area; 4.5) Perform an AND operation on the dark area binary image and the suspected area template image M(i,j) to obtain a binary contour image C(i,j); 4.6) Obtain all contours in the binary contour image C(i,j), and filter all contours according to circularity and length to obtain all slender contours suspected to be hair; 4.7) All the slender contours in step 4.6) are connected to adjacent contours, and non-hair defects are filtered out according to the actual hair length to determine whether there are hair defects.

5. The method for detecting hair foreign matter on a coating surface based on fast local threshold segmentation according to claim 1 or 4, characterized in that: In step 3) or step 4.6), the circularity of the contour is calculated using the following formula: Where degree is the circularity of the contour, area is the area enclosed by the contour, and r is the minimum radius of the circle enclosing the contour.

6. The method for detecting hair foreign bodies on a coating surface based on fast local threshold segmentation according to claim 1 or 4, characterized in that: In the step 4.1), the variance of the pixel values ​​of all the pixel points in every five columns is used as the variance of each pixel column in the five columns of pixel points.

7. The method for detecting hair foreign bodies on a coating surface based on fast local threshold segmentation according to claim 4, characterized in that: In step 4.1), the variance of each pixel column is calculated using the following formula: In the formula, S 2 is the variance of the m*n size image, is the average value of all pixels in the area where each pixel column is located, and p(i,j) is the pixel value of the pixel at coordinate (i,j).

8. The method for detecting hair foreign bodies on a coating surface based on fast local threshold segmentation according to claim 4, characterized in that: In step 4.2) and step 4.4), the high segmentation threshold and the low segmentation threshold used for image segmentation are calculated using the following formula: thresh=thresh max *θ+thresh min *(1-θ) In the formula, thresh is the actual segmentation threshold, thresh max and thresh min are the preset upper and lower limits of the segmentation threshold, respectively, and θ is the proportional coefficient; And the proportionality coefficient θ is set according to the following formula: d=Mm Wherein, v is the variance of each pixel column, m and M are the minimum and maximum values ​​of the variances of each pixel column of the image, respectively, and d represents the maximum difference of the variances of each pixel column of the image.

9. The method for detecting hair foreign bodies on a coating surface based on fast local threshold segmentation according to claim 4, characterized in that: In step 4.2) and step 4.4), the image is segmented using the following formula using the segmentation threshold: In the formula, v i,j is the pixel value after the pixel point segmentation at coordinate (i, j), p i,j is the original pixel value of the pixel at coordinate (i, j), and thresh is the segmentation threshold.

10. The method for detecting hair foreign bodies on a coating surface based on fast local threshold segmentation according to claim 4, characterized in that: The step 4.7) is specifically as follows: 4.7.1) Judge each slender contour: If the length of the thin and long contour is greater than or equal to the preset hair length, the thin and long contour is a hair defect and is considered to contain a hair foreign body, and the next step is not performed; If the length of the slender contour is less than the preset hair length, the slender contour is taken as a suspected contour and the next step is performed; 4.7.2) The suspected contour is preliminarily connected with other suspected contours around it to form a connected contour. Specifically, the actual adjacent distance between the contours is calculated using the outer enclosing rectangle between the contours, and the preliminary connection is performed and saved within the actual adjacent distance. The actual adjacent distance is determined by the following formula: dis=min(dis i,j ) In the formula, dis is the actual adjacent distance, dis i,j is the distance between the i-th pixel of the first contour and the j-th pixel of the second contour, p i and p j are the pixel values ​​of the pixels on the two contours respectively; 4.7.3) For all connected contours obtained in 4.7.2), calculate the length of the minimum enclosing rectangle of the connected contours and make a judgment: If the length is shorter than the preset hair length, it will be discarded; If the length is greater than or equal to the preset hair length, the connected contour is a hair defect and it is considered that there is a hair foreign body.

Citation Information

Patent Citations

  • Control method and system of sweeping robot for sweeping hair

    CN112515542A

  • Hair density measurement method, electronic equipment and storage medium

    CN114677702A

  • Building hanging basket welding quality detection method based on machine vision

    CN115457035A

  • Method for detecting hair region

    KR1020110090764A

  • Automatic inspection method for belt-type conveying device

    WO2023134789A1

Cited By

  • Vision-based method and system for retrieving lost property along railway

    CN119540873A