A rubber thread surface defect segmentation method based on image processing

CN122989663APending Publication Date: 2026-10-27HUNAN XING RUBBER DRAGON TECH DEV CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611203826.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-08-10
Publication Date
2026-10-27

AI Technical Summary

Technical Problem

[0004]有鉴于此,本发明实施例提供了一种基于图像处理的橡胶线表面缺陷分割方法,以解决橡胶表面凹坑与其表面污染覆盖区域在阈值分割后的区域表征较为相似,通过阈值分割较难直接区分的问题

Benefits of technology

[0035]本发明中,通过多角度环形光照采集待检测橡胶线的表面图像(一个第一表面图像和多个第二表面图像),利用真实凹坑的立体形貌在不同光照角度下产生环绕式明暗阴影特征,通过分析第二表面图像中的高亮连通域与阴影连通域的距离关系及多角度邻近分布特征,量化获取第一表面图像中每个连通域的立体特征程度,以能够精准筛选出真正具有立体结构的连通域,避免将平面污染区域误判为立体目标区域;进而在立体目标区域内进一步分析像素点的微小面法向变化程度与多角度光照响应序列,筛选存在较大微小面法向变化的像素点,也即是目标像素点,进一步利用LOESS曲线拟合评估相邻相似目标像素点的走势规律差异,得到表征所有目标像素点之间的相邻走势规律的拟合曲线,巧妙区分了液态附着物(表面光滑弧形、点沿曲线集中分布)与橡胶凹坑(内部翻卷断裂、点离散分布)的本质区别,最后,根据根据每个目标像素点与拟合曲线之间的最短直线距离,分析每个立体目标区域的表面凹坑缺陷程度,实现了对表面凹坑缺陷程度的精确量化与精准分割,为运维人员快速定位缺陷位置、高效评估橡胶线寿命提供了可靠依据。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122989663A_ABST
    Figure CN122989663A_ABST
Patent Text Reader

Abstract

The present application relates to the technical field of image processing, and more particularly to a rubber thread surface defect segmentation method based on image processing, wherein if the number of connected domains of the first surface image of the rubber thread to be detected under multi-angle ring light is greater than 1, the distance relationship between the highlight connected domain and the shadow connected domain in the second surface image of the rubber thread to be detected under each light angle and the multi-angle adjacent distribution characteristics are analyzed, and the stereoscopic target region is screened out among all the connected domains; the target pixel points with larger micro-face normal changes in the stereoscopic target region are screened out, a fitting curve representing the adjacent trend rule between all the target pixel points is constructed, the shortest straight line distance between each target pixel point and the fitting curve is obtained, the surface pit defect degree of the stereoscopic target region is obtained, the first surface image is regionally segmented, the surface defect region is obtained, and reliable basis is provided for the operation and maintenance personnel to quickly locate the defect position and efficiently evaluate the service life of the rubber thread.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of image processing technology, and in particular to a method for segmenting surface defects of rubber wires based on image processing. Background Technology

[0002] Rubber cords are columnar or strip-shaped elastic products made primarily of natural or synthetic rubber. They possess excellent elasticity, wear resistance, sealing properties, shock absorption, and insulation, and are widely used in various industrial fields. Since rubber cords primarily perform critical functions such as sealing, insulation, buffering, or force transmission, their surface quality significantly impacts their actual performance. When surface defects such as pits (cracks, notches, peeling, etc.) exist on the rubber cord surface, they can lead to localized stress concentration, making the material more susceptible to fatigue cracking under long-term pressure, tension, or bending. This also reduces the adhesion between the rubber cord and mating surfaces, resulting in water, air, and dust leaks, as well as decreased sound insulation performance. Therefore, detecting surface defects in rubber cords is of great importance.

[0003] Because manual inspection is labor-intensive and its accuracy is affected by human subjectivity, existing methods for detecting surface defects in rubber threads typically involve acquiring surface images of the rubber thread and using threshold segmentation techniques to extract pit defects from these images. However, during extrusion, vulcanization, cooling, traction, and winding, the surface of the rubber thread is easily affected by the external environment and production processes, resulting in the adhesion of various contaminants. For example, a small amount of free carbon black may precipitate or transfer to the surface during the mixing and extrusion processes of the rubber formulation; mold release agents, lubricants, or mold oils used in the production process to reduce demolding resistance and prevent rubber from adhering to the mold may remain on the surface of the rubber thread; and residual cooling water, condensate, or incompletely evaporated moisture may form watermarks during cooling, cleaning, or when the ambient humidity is high. These surface deposits often alter local color, gloss, and reflectivity, and in machine vision inspection, they can easily produce similar grayscale or texture features to real pit defects, thus increasing the difficulty of defect identification and segmentation. Therefore, it is difficult to directly obtain pit defects on the surface of the rubber thread through threshold segmentation. Summary of the Invention

[0004] In view of this, embodiments of the present invention provide a rubber line surface defect segmentation method based on image processing to solve the problem that the surface pits and the surface contamination covered areas of rubber are similar in regional characterization after threshold segmentation, making it difficult to directly distinguish them through threshold segmentation.

[0005] This invention provides a method for segmenting surface defects of rubber lines based on image processing, the method comprising the following steps:

[0006] A first surface image of the rubber line to be detected under multi-angle ring illumination is obtained. The connected components in the first surface image are obtained through binarization. If the number of connected components is greater than 1, the second surface image of the rubber line to be detected under each illumination angle is obtained sequentially. The bright connected components and shadow connected components in each second surface image are obtained through binarization.

[0007] Mark the location region corresponding to each connected component in the first surface image in each second surface image, and filter at least one stereo target region from all connected components based on the distance between each location region and the bright and shadow connected components in the corresponding second surface image;

[0008] For any three-dimensional target region, based on the gray value change of each pixel in each second surface image, pixels with large and small surface normal changes are selected and recorded as target pixels; illumination response difference analysis is performed on every two target pixels, and a fitting curve characterizing the adjacent trend pattern between all target pixels is obtained through smooth fitting.

[0009] The surface pit defect degree of any three-dimensional target region is obtained based on the shortest straight-line distance between each target pixel and the fitted curve; the first surface image is segmented based on the surface pit defect degree of each three-dimensional target region to obtain the surface defect region of the rubber line to be detected.

[0010] Preferably, the step of filtering at least one stereo target region from all connected regions based on the distance between each location region and the corresponding highlight connected region and shadow connected region in the second surface image includes:

[0011] For any connected component in the first surface image, the nearest bright connected component and the nearest shadow connected component of the corresponding location region are obtained in each second surface image. Based on the distance between the location region and the nearest bright connected component and the nearest shadow connected component, the overall proximity distribution degree of the connected component is obtained.

[0012] The overall proximity difference of any connected region is obtained based on the distance between the nearest neighbor highlighted connected regions and the distance between the nearest neighbor shaded connected regions between any two adjacent second surface images.

[0013] The reciprocal of the overall proximity distribution degree is normalized to obtain a first normalized value, and the reciprocal of the overall proximity difference degree is normalized to obtain a second normalized value. The 3D feature degree of any connected domain is obtained by multiplying the first normalized value and the second normalized value.

[0014] If the stereoscopic feature degree of any connected region is greater than or equal to a preset stereoscopic feature degree threshold, then the connected region is confirmed as a stereoscopic target region.

[0015] Preferably, obtaining the overall proximity distribution degree of any connected region based on the distances between the location region and the nearest bright connected region and the nearest shadow connected region includes:

[0016] In any second surface image, calculate the first Euclidean distance and the second Euclidean distance between the location region corresponding to any connected region and the nearest bright connected region and the nearest shadow connected region, respectively, and calculate the third Euclidean distance between the nearest bright connected region and the nearest shadow connected region.

[0017] Calculate the sum of the first Euclidean distance and the second Euclidean distance, and multiply the sum by the third Euclidean distance to obtain the proximity distribution degree corresponding to any second surface image; obtain the proximity distribution degrees corresponding to all second surface images and sum them to obtain the overall proximity distribution degree of any connected domain.

[0018] Preferably, obtaining the overall proximity difference degree of any connected component based on the distance between the nearest neighbor highlighted connected components and the distance between the nearest neighbor shaded connected components between any two adjacent second surface images includes:

[0019] ;

[0020] in, This represents the overall proximity difference of the q-th connected component. This represents the location region of the q-th connected component in the i-th second surface image and its nearest neighbor highlighted connected component. The Euclidean distance between them This represents the location region of the q-th connected component in the (i+1)-th second surface image and its nearest neighbor highlighted connected component. The Euclidean distance between them The location region of the q-th connected component in the i-th second surface image and its nearest neighbor shaded connected component are shown. The Euclidean distance between them The location region of the q-th connected component in the (i+1)-th second surface image and its nearest neighbor shaded connected component are shown. The Euclidean distance between them, where | represents the absolute value symbol.

[0021] Preferably, the step of filtering pixels with large micro-facet normal variations based on the grayscale value changes of each pixel in each second surface image within any three-dimensional target region includes:

[0022] For any pixel in any three-dimensional target region, the gray values ​​of the corresponding pixels in each second surface image are arranged in ascending order of illumination angle to obtain the initial gray value sequence of the pixel. If the pixel in the corresponding position of the pixel in the second surface image belongs to the shadow connected region, the corresponding gray value in the initial gray value sequence is deleted to obtain the target gray value sequence of the pixel.

[0023] Calculate the absolute value of the difference between any gray value in the target gray value sequence and each other gray value, and obtain the cumulative value of the absolute difference as the degree of gray value difference of the given gray value; obtain the degree of gray value difference of each gray value in the target gray value sequence, and normalize the cumulative value of all gray value difference degrees to obtain the degree of micro-face normal change of the given pixel; if the degree of micro-face normal change of the given pixel is greater than or equal to a preset threshold for the degree of micro-face normal change, then the given pixel is determined to be a pixel with a large micro-face normal change.

[0024] Preferably, the step of performing illumination response difference analysis on every two target pixels and obtaining a fitting curve characterizing the adjacent trend pattern between all target pixels through smooth fitting includes:

[0025] Take the target pixel located at the top and leftmost side of any three-dimensional target region as the first analysis starting point, calculate the degree of adjacency similarity between the first analysis starting point and each non-analysis starting point, and take the non-analysis starting point corresponding to the maximum degree of adjacency similarity as the nearest similar pixel of the first analysis starting point.

[0026] Using the nearest neighbor similar pixel as the second analysis starting point, among the remaining target pixels excluding the first analysis starting point, the nearest neighbor similar pixel of the second analysis starting point is obtained according to the method for obtaining the nearest neighbor similar pixel of the first analysis starting point, and so on, connecting all target pixels into a chain;

[0027] Based on the positional order of the target pixels on the chain, the positions of all target pixels are smoothly fitted to obtain the corresponding fitting curve, which is used to characterize the adjacent trend pattern between all target pixels.

[0028] Preferably, calculating the adjacency similarity between the first analysis starting point and each non-analysis starting point includes:

[0029] The non-analysis starting point refers to the target pixel point excluding the first analysis starting point; for any non-analysis starting point, calculate the Euclidean distance between the first analysis starting point and any non-analysis starting point, and normalize the reciprocal of the Euclidean distance to obtain the positional adjacency.

[0030] Calculate the absolute value of grayscale values ​​between the first analysis starting point and the corresponding pixel points of any non-analysis starting point in each second surface image to obtain the cumulative value of the absolute grayscale values. Normalize the reciprocal of the cumulative value of the absolute grayscale values ​​to obtain the illumination response similarity.

[0031] The degree of proximity between the first analysis starting point and any non-analysis starting point is obtained by summing the positional proximity and the illumination response similarity.

[0032] Preferably, obtaining the surface pit defect degree of any three-dimensional target region based on the shortest straight-line distance between each target pixel and the fitted curve includes:

[0033] Based on the shortest straight-line distance between each target pixel and the fitted curve, the mean of the shortest straight-line distance is calculated, and the mean is normalized to obtain the surface pit defect degree of any three-dimensional target region.

[0034] The beneficial effects of the embodiments of the present invention compared with the prior art are as follows:

[0035] In this invention, surface images (one first surface image and multiple second surface images) of the rubber line to be detected are acquired through multi-angle ring illumination. The three-dimensional morphology of the actual pits generates surrounding light and shadow features under different illumination angles. By analyzing the distance relationship and multi-angle proximity distribution characteristics between bright and shadow connected regions in the second surface images, the degree of three-dimensional feature of each connected region in the first surface image is quantified. This allows for accurate screening of truly three-dimensional connected regions, avoiding misclassification of planar contamination areas as three-dimensional target areas. Furthermore, within the three-dimensional target area, the degree of variation of the micro-facet normals of pixels and the multi-angle illumination response sequence are further analyzed to screen for regions with large micro-facet normals. The changing pixels, i.e., the target pixels, are further evaluated using LOESS curve fitting to assess the differences in the trend patterns of adjacent similar target pixels. This yields a fitted curve characterizing the adjacent trend patterns among all target pixels, cleverly distinguishing the essential difference between liquid deposits (smooth, arc-shaped surfaces with points concentrated along the curve) and rubber pits (internal curling and breakage with discrete point distribution). Finally, based on the shortest straight-line distance between each target pixel and the fitted curve, the degree of surface pit defects in each three-dimensional target area is analyzed. This achieves precise quantification and accurate segmentation of the degree of surface pit defects, providing a reliable basis for maintenance personnel to quickly locate defects and efficiently assess the lifespan of rubber lines. Attached Figure Description

[0036] To more clearly illustrate the technical solutions in the embodiments of the present invention, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0037] Figure 1 This is a flowchart of a method for segmenting surface defects of rubber lines based on image processing, provided in Embodiment 1 of the present invention.

[0038] Figure 2 This is a schematic diagram of rubber line surface defect detection provided in an embodiment of the present invention;

[0039] Figure 3 This is a schematic diagram of a ring lamp provided in an embodiment of the present invention. Detailed Implementation

[0040] Embodiments of this disclosure are described in detail below, with examples of these embodiments illustrated in the accompanying drawings. The embodiments described below with reference to the accompanying drawings are exemplary and intended to explain this disclosure, and should not be construed as limiting it.

[0041] It should be noted that the terms "first," "second," etc., used in this disclosure and the accompanying drawings are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments of this disclosure described herein can be implemented in orders other than those illustrated or described herein. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with this disclosure. Rather, they are merely examples of apparatuses and methods consistent with some aspects of this disclosure.

[0042] To illustrate the technical solution of the present invention, specific embodiments are described below.

[0043] See Figure 1 This is a flowchart of a method for segmenting surface defects of rubber lines based on image processing, as provided in Embodiment 1 of the present invention. Figure 1 As shown, the method may include:

[0044] Step S101: Obtain the first surface image of the rubber line to be detected under multi-angle ring illumination, and obtain the connected components in the first surface image through binarization. If the number of connected components is greater than 1, then obtain the second surface image of the rubber line to be detected under each illumination angle in sequence, and obtain the bright connected components and shadow connected components in each second surface image through binarization.

[0045] After industrial production, rubber requires timely defect detection and segmentation of its surface. When detecting pit defects on the surface of rubber lines based on image segmentation, the surface is easily affected by external environment and production processes during extrusion, vulcanization, cooling, traction, and winding, resulting in various contaminants adhering to the rubber and creating blocky coverage areas resembling pits. This makes it difficult to distinguish directly using threshold segmentation and pixel analysis, leading to inaccurate segmentation results where the detected pit defect could be either a rubber pit or contaminant adhesion. Therefore, this invention reduces the inaccuracy of segmentation results obtained using conventional threshold segmentation for rubber line surface pit defects by combining the pixel distribution differences between rubber pits and contaminant areas under multi-angle lighting conditions.

[0046] Reference Figure 2 A schematic diagram of surface defect detection for rubber thread. Figure 2 The rubber conveyor belt at the production line exit is placed on a conveyor belt and conveyed to a defect detection checkpoint. An industrial camera is installed at the top of the checkpoint to take a downward view and photograph the rubber conveyor belt below. A ring light source is also installed at the top of the defect detection checkpoint. Figure 3 As shown, Figure 3 The ring light strip has light sources arranged in rows every 10 degrees, and each light source at each angle can be switched on and off independently.

[0047] After the rubber line to be inspected is conveyed to the defect detection checkpoint, the conveyor belt is stopped, and all light sources of the ring light are turned on to photograph the rubber line under full illumination, resulting in a surface image of the rubber line under full illumination, denoted as the first surface image. This first surface image is then converted to grayscale and subjected to Otsu's thresholding algorithm to obtain a binarized image (grayscale values ​​are only 0 and 255). In the binarized image, scattered points may form in areas with frequent grayscale changes. Further closing operations (i.e., dilation followed by erosion) are performed to connect neighboring scattered points into complete regions, preventing the scattered points from creating too many small connected components. This yields the surface thresholding image of the rubber line to be inspected. Since there are no shadow areas under full illumination, the normal rubber line surface after thresholding only has one connected component between the background area and the rubber line itself. If the number of connected components in the surface thresholding image is greater than 1, it indicates that there may be defects or contamination on the rubber line surface. Conversely, if only a single connected component exists in the surface thresholding image, it indicates that the currently inspected rubber line is not defective, and the conveyor belt is restarted to inspect the next segment of the rubber line surface.

[0048] Therefore, based on the connected components in the surface threshold segmentation image, the number of connected components in the first surface image is counted. When the number of connected components in the first surface image is greater than 1, the ring light is adjusted to a single-angle illumination mode, and the surface image of the rubber line to be detected is acquired one by one under each illumination angle, which is recorded as the second surface image. Then, using the Otsu threshold segmentation algorithm, each second surface image is binarized (with grayscale values ​​of only 0 and 255) to obtain the bright connected components (regions composed of pixels with a grayscale value of 255) and the shadow connected components (regions composed of pixels with a grayscale value of 0) in each second surface image.

[0049] It should be noted that when acquiring surface images of the rubber line to be tested, only the illumination angle was changed, not the position of the rubber line to be tested. Therefore, the pixel positions in the first surface image and the second surface image can be matched one-to-one.

[0050] Thus, we have obtained multiple connected components in the first surface image and the highlighted and shaded connected components in each of the second surface images.

[0051] Step S102: Mark the position region corresponding to each connected component in the first surface image in each second surface image, and filter at least one stereo target region from all connected components based on the distance between each position region and the highlighted connected component and the shaded connected component in the corresponding second surface image.

[0052] Since defects such as pits and cracks are caused by the loss of surface structure of the rubber thread, pit defects have obvious three-dimensional features. Furthermore, under different lighting angles, due to the occlusion effect caused by the geometric shape, a bright and dark area will form around the center of the pit, with the shadow area being the part obscured by the three-dimensional shape of the pit. On the other hand, carbon black, ink stains, etc., adhering to the rubber surface do not have three-dimensional features. Therefore, under multiple lighting angles, they will form a reflective area of ​​a certain size along the direction of the illumination angle, without forming a change in the bright and dark area feature around the center of the pit. Thus, in this embodiment of the invention, by observing the local dark and dark area changes at corresponding positions of each connected region in the first surface image in the multi-angle lighting images, connected regions with three-dimensional features in the first surface image are selected and recorded as three-dimensional target regions.

[0053] First, for the q-th connected component in the first surface image, mark the position region corresponding to the q-th connected component in each second surface image. For any second surface image, calculate the Euclidean distance between the centroid of the position region in the second surface image and the centroid of each highlighted connected component in the image, and obtain the highlighted connected component corresponding to the minimum Euclidean distance. Similarly, calculate the Euclidean distance between the centroid of the position region in the second surface image and the centroid of each shadow connected component in the image, and obtain the shadow connected component corresponding to the minimum Euclidean distance. Record the highlighted connected component and the shadow connected component corresponding to the minimum Euclidean distance as the nearest neighbor highlighted connected component and the nearest neighbor shadow connected component of the position region corresponding to the q-th connected component in the second surface image, respectively. Similarly, obtain the nearest neighbor highlighted connected component and the nearest neighbor shadow connected component of the position region corresponding to the q-th connected component in each second surface image.

[0054] When the nearest neighbor highlight and nearest neighbor shadow connected regions of the q-th connected region are closer to the corresponding location region of the q-th connected region at any illumination angle, and the distance between these two regions (nearest neighbor highlight and nearest neighbor shadow connected regions) is also closer, it indicates that highlights and shadows are simultaneously distributed around the location region corresponding to the q-th connected region at any illumination angle. Therefore, the q-th connected region exhibits stronger stereoscopic features at any illumination angle. Thus, based on the distances between the location region of the q-th connected region in each second surface image and its nearest neighbor highlight and nearest neighbor shadow connected regions, the overall proximity distribution degree of the q-th connected region is obtained.

[0055] In any second surface image, calculate the first Euclidean distance and the second Euclidean distance between the location region corresponding to the q-th connected component and the nearest neighbor bright connected component and the nearest neighbor shadow connected component, respectively, and calculate the third Euclidean distance between the nearest neighbor bright connected component and the nearest neighbor shadow connected component; calculate the sum of the first Euclidean distance and the second Euclidean distance, and obtain the product of the sum and the third Euclidean distance as the proximity distribution degree corresponding to any second surface image; obtain the proximity distribution degrees corresponding to all second surface images and accumulate them to obtain the overall proximity distribution degree of the q-th connected component.

[0056] In one embodiment, the formula for calculating the overall proximity distribution degree of the q-th connected component is:

[0057]

[0058] in, This represents the overall proximity distribution of the q-th connected component. Indicates the number of images on the second surface. This represents the nearest neighbor highlighted connected component of the region corresponding to the q-th connected component in the i-th second surface image. Nearest Neighbor Shaded Connected Component The Euclidean distance between them is also known as the third Euclidean distance; This represents the location region of the q-th connected component in the i-th second surface image and its nearest neighbor highlighted connected component. The Euclidean distance between them is also known as the first Euclidean distance; The location region of the q-th connected component in the i-th second surface image and its nearest neighbor shaded connected component are shown. The Euclidean distance between them is also known as the second Euclidean distance.

[0059] It should be noted that in the embodiments of the present invention, the distance between each pair of connected components is obtained by calculating the Euclidean distance between the centroids of the corresponding two connected components. Furthermore, the position of each pixel in the first surface image and the second surface image is determined by an image two-dimensional coordinate system constructed with the lower left corner of the surface image as the origin. Thus, the centroid is also obtained based on the image two-dimensional coordinate system.

[0060] Then, for any two adjacent illumination angles of the second surface image, if the distance between the corresponding location region of the q-th connected component in these two second surface images and its nearest neighbor bright connected component (or nearest neighbor shadow connected component) is closer, it indicates that the highlights and shadows are distributed around the q-th connected component with varying angles, and the three-dimensional features of the q-th connected component are stronger. However, if the q-th connected component is a contaminated block, the nearest neighbor bright connected component and the nearest neighbor shadow connected component may index the bright and shadow blocks generated by reflections from the rubber line surface at a fixed illumination angle. These two parts span the entire rubber line surface, with their centers of gravity far apart, and the changes in the bright and shadow areas under different illumination angles are also greater. Therefore, in this embodiment of the invention, the overall proximity difference degree of the q-th connected component is obtained based on the distance between the nearest neighbor bright connected components and the distance between the nearest neighbor shadow connected components between any two adjacent second surface images.

[0061]

[0062] in, This represents the overall proximity difference of the q-th connected component. This represents the location region of the q-th connected component in the i-th second surface image and its nearest neighbor highlighted connected component. The Euclidean distance between them This represents the location region of the q-th connected component in the (i+1)-th second surface image and its nearest neighbor highlighted connected component. The Euclidean distance between them The location region of the q-th connected component in the i-th second surface image and its nearest neighbor shaded connected component are shown. The Euclidean distance between them The location region of the q-th connected component in the (i+1)-th second surface image and its nearest neighbor shaded connected component are shown. The Euclidean distance between them, where | represents the absolute value symbol.

[0063] Finally, due to This involves considering the proximity of the nearest neighbor highlight and nearest neighbor shadow connected regions to the q-th connected region under all illumination angles. The closer the nearest neighbor highlight and nearest neighbor shadow connected regions are to the q-th connected region, and simultaneously, the closer these two regions (nearest neighbor highlight and nearest neighbor shadow connected regions) are to each other, indicating that highlights and shadows are simultaneously distributed around the area corresponding to the q-th connected region under the current illumination angle. This means the q-th connected region exhibits stronger stereoscopic features under the current illumination angle. The larger the value, the better; at the same time, This integrates the proximity differences between all adjacent illumination angles. The smaller the proximity difference, the closer the positions of the nearest neighbor highlight connected region and the nearest neighbor shadow connected region between two adjacent second surface images. This indicates that highlights and shadows are distributed around the q-th connected region with varying illumination angles, and the q-th connected region has stronger regional stereo features. Therefore, an inverse proportional form is used. and To obtain the 3D feature degree of the q-th connected component: normalize the inverse of the overall proximity distribution degree to obtain a first normalized value, normalize the inverse of the overall proximity difference degree to obtain a second normalized value, and obtain the 3D feature degree of the q-th connected component based on the product of the first normalized value and the second normalized value.

[0064] In one embodiment, the formula for calculating the 3D feature degree of the q-th connected component is:

[0065]

[0066] in, This indicates the degree of 3D feature of the q-th connected component. The maximum and minimum value normalization function is used to unify the magnitudes of the two parts in the formula. In this embodiment of the invention, the maximum and minimum value normalization of the formula is performed based on an image sample set. The image sample set consists of multiple sets of multi-angle illumination surface images (second surface images) of rubber lines with pit defects and rubber lines with contamination coverage, prepared in advance before defect detection.

[0067] Similarly, the stereo feature degree of each connected region in the first surface image is obtained. Since the stereo feature degree is a normalized value with a range of 0-1, it can divide the connected regions with stereo feature distribution into one end of the range of maximum values ​​and the connected regions of planar pollutants into one end of the range of minimum values. Therefore, the median value is taken as the preset stereo feature degree threshold to distinguish the connected regions with stereo features from those without stereo features. Thus, if the stereo feature degree of any connected region is greater than or equal to the preset stereo feature degree threshold, then the connected region is confirmed as a stereo target region.

[0068] Step S103: For any three-dimensional target region, based on the gray value change of each pixel in each second surface image, filter out pixels with large micro-surface normal changes and record them as target pixels; perform illumination response difference analysis on every two target pixels, and obtain a fitting curve characterizing the adjacent trend pattern between all target pixels through smooth fitting.

[0069] Solid deposits such as carbon black and ink stains are difficult to form raised deposits on the surface of a column. However, liquid deposits such as residual lubricating oil and water stains generated during rubber processing may adhere to the surface of the rubber thread due to surface tension, forming raised deposits and thus creating three-dimensional regions. These regions also exhibit highlights and shadows under multiple lighting angles. Therefore, after obtaining the three-dimensional target regions in the first surface image, it is necessary to further analyze the three-dimensional region characteristics of each region, obtain the characterization characteristics of rubber pits within the three-dimensional regions under multiple lighting angles, and evaluate the defect regions based on the differences between the characterization characteristics of liquid three-dimensional deposits and rubber pits under multiple lighting angles.

[0070] Taking the y-th stereoscopic target region in the first surface image as an example, the first surface image is grayscaled to obtain the grayscale value of each pixel in the y-th stereoscopic target region. Similarly, each second surface image is grayscaled to obtain the grayscale value of the pixel at the corresponding position in each second surface image for each pixel in the y-th stereoscopic target region.

[0071] Because rubber has the characteristic of elastic domain extensibility, when dents or cracks are formed due to factors such as scratches and impacts, the interior of the dent will undergo rolling, stretching, and uneven fracture due to impact friction and the pulling of material. Therefore, these tiny surfaces with rolling, stretching, and fracture inside the rubber dent will form random and different normals. By analyzing the differences in pixels with normal changes, we can obtain the characteristics of different pixels in the dent area that exhibit rolling, stretching, and fracture. Here, we first analyze the grayscale changes of each pixel in the y-th stereoscopic target region under multiple illumination angles. Based on the grayscale value changes of each pixel in the y-th stereoscopic target region in each second surface image, we select pixels in the y-th stereoscopic target region with large changes in the normals of the tiny surfaces and record them as target pixels.

[0072] For the t-th pixel in the y-th stereoscopic target region, the gray values ​​of the corresponding pixels in each second surface image are arranged in ascending order of illumination angle to obtain the initial gray value sequence of the t-th pixel. A small surface may exhibit significant gray value variations due to alternating dark and bright areas under different illumination angles. If the t-th pixel's location is in a shadow area at some illumination angles, its normal variation may be reduced. Furthermore, shadow areas differ significantly from bright areas. If all gray values ​​in the initial gray value sequence are included in subsequent analysis, they may be mistakenly identified as differences in normal variation. Therefore, in this embodiment of the invention, the bright areas are analyzed uniformly. The grayscale change in the domain refers to the subsequent analysis of the grayscale value of the pixel corresponding to the t-th pixel in the highlighted region. Therefore, if the pixel at the corresponding position of the t-th pixel in the second surface image belongs to the shadow connected region, the corresponding grayscale value in the initial grayscale value sequence is deleted, resulting in the target grayscale value sequence of the t-th pixel. The absolute value of the difference between any grayscale value in the target grayscale value sequence and each other grayscale value is calculated, and the cumulative value of the absolute value of the difference is used as the degree of grayscale difference of any grayscale value. The degree of grayscale difference of each grayscale value in the target grayscale value sequence is obtained, and the cumulative value of all grayscale difference degrees is normalized to obtain the degree of change of the micro-face normal of the t-th pixel.

[0073] In one embodiment, the formula for calculating the degree of change in the micro-face normal of the t-th pixel is:

[0074]

[0075] in, This represents the degree of change in the face normal of the t-th pixel. This represents the maximum and minimum value normalization function based on the image sample set. This represents the length of the target grayscale value sequence for the t-th pixel. This represents the i-th gray value in the target gray value sequence of the t-th pixel. Let || represent the j-th gray value in the target gray value sequence of the t-th pixel, where || represents the absolute value sign.

[0076] It should be noted that areas with smooth or gently curved surfaces containing liquid deposits exhibit smaller normal deflections, resulting in smaller grayscale variations under different lighting angles. When a pixel shows significant grayscale variations under different lighting angles, it indicates that the pixel possesses characteristics of minute surface normal variations. The larger the value, the more accurate the result is, as obtained by combining the differences of all grayscale values. The larger the value, the stronger the grayscale change of the t-th pixel under various lighting angles, corresponding to a stronger degree of micro-face normal change.

[0077] Similarly, the degree of minute facet normal change of each pixel in the y-th 3D target region is obtained. The value range of the minute facet normal change is 0-1. Pixels with larger minute facet normal changes are divided into the range of maximum values, and pixels with smaller minute facet normal changes are divided into the range of minimum values. Therefore, a preset threshold for the degree of minute facet normal change is set as the middle value of the range, 0.5. If the degree of minute facet normal change of any pixel is greater than or equal to the preset threshold, then that pixel is determined to have a large minute facet normal change. This process is then used to filter out all pixels in the y-th 3D target region that have large minute facet normal changes, which are the target pixels.

[0078] Furthermore, although the top arc of the liquid deposit is relatively gentle, and the normal changes of each pixel with a large micro-facet normal change are relatively small in all directions, the normal changes of its side edges on the slope are large. Since liquid deposits (such as lubricating oil or water stains) may also form irregular deposit areas, the normal changes of some pixels with large micro-facet normal changes in different areas of the liquid deposit edge on the slope may also be different. Directly counting the grayscale differences of pixels with large micro-facet normal changes has limitations and poses a risk of misjudgment. Therefore, in this embodiment of the invention, considering that liquid deposits such as lubricating oil and condensate are constrained by surface tension due to their liquid properties, resulting in a relatively smooth arc shape, the normals of adjacent pixels are close, and the grayscale response of adjacent pixels under different illumination angles is similar. Therefore, the target pixels in the y-th 3D target region often form an approximate smooth arc shape constrained by liquid surface tension along adjacent similar patterns. The rolling, stretching, and breaking of adjacent positions within the rubber pit are uncertain, and the normal of the micro-facets is also random. Therefore, the grayscale performance of some target pixels in the y-th three-dimensional target region is different under different lighting angles. Although some micro-facets with the same normal may be located in the same cross-section, they will also have different trends from other cross-sections in the region, making it difficult to maintain a similar trend pattern.

[0079] Therefore, illumination response difference analysis is performed on every two target pixels in the y-th stereoscopic target region, and a fitting curve representing the adjacent trend pattern between all target pixels is obtained through smooth fitting. Specifically, for each target pixel in the y-th stereoscopic target region, the gray values ​​of the corresponding pixels in each second surface image are arranged in ascending order of illumination angle to form a multi-angle gray value sequence, thereby obtaining the multi-angle gray value sequence of each target pixel in the y-th stereoscopic target region.

[0080] Taking the topmost and leftmost target pixel in the y-th 3D target region as the first analysis starting point, calculate the adjacency similarity between the first analysis starting point and each non-analysis starting point. The non-analysis starting point corresponding to the maximum adjacency similarity is taken as the nearest neighbor similar pixel of the first analysis starting point. This nearest neighbor similar pixel is then taken as the second analysis starting point. From the remaining target pixels excluding the first analysis starting point, the nearest neighbor similar pixel of the second analysis starting point is obtained using the same method as for the first analysis starting point. This process is repeated to connect all target pixels into a chain. For example, starting from point a, point b is found to be the nearest neighbor similar pixel of point a through adjacency similarity. Points a and b are connected. Then, starting from point b, point c is found to be the nearest neighbor similar pixel of point b among the other points excluding point a. Points b and c are then connected. Points a, b, and c are then connected sequentially, and so on, to obtain a chain.

[0081] The LOESS fitting algorithm is suitable for scatter point fitting scenarios where there is no obvious mathematical model, that is, the distribution of target pixels in the y-th 3D target region. Therefore, in this embodiment of the invention, the LOESS fitting algorithm is used to smoothly fit the positions of all target pixels according to the position order of the target pixels on the chain, and the corresponding fitting curve is obtained. This curve is used to characterize the adjacent trend pattern between all target pixels.

[0082] Wherein, the non-analysis starting point refers to the target pixel point excluding the first analysis starting point. The calculation of the adjacency similarity between the first analysis starting point and each non-analysis starting point includes:

[0083] For any non-analysis starting point, calculate the Euclidean distance between the first analysis starting point and the non-analysis starting point, and normalize the reciprocal of the Euclidean distance to obtain the positional adjacency. Calculate the absolute grayscale values ​​between the corresponding pixels of the first analysis starting point and the non-analysis starting point in each second surface image, and obtain the cumulative value of the absolute grayscale values. Normalize the reciprocal of the cumulative value of the absolute grayscale values ​​to obtain the illumination response similarity. Based on the sum of the positional adjacency and the illumination response similarity, obtain the adjacency similarity between the first analysis starting point and the non-analysis starting point.

[0084] In one embodiment, taking the c-th target pixel and the p-th target pixel in the y-th stereoscopic target region as examples, the lengths of the multi-angle grayscale value sequences of the c-th target pixel and the p-th target pixel are the same. Therefore, the formula for calculating the degree of adjacency similarity between the c-th target pixel and the p-th target pixel is:

[0085]

[0086] in, This represents the degree of similarity between the c-th target pixel and the p-th target pixel. This represents the maximum and minimum value normalization function based on the image sample set. Let represent the Euclidean distance between the c-th target pixel and the p-th target pixel in the first surface image. This represents the grayscale value of the c-th target pixel at the corresponding position in the i-th second surface image. This represents the grayscale value of the pixel at the corresponding position of the p-th target pixel in the i-th second surface image. This represents the absolute value of the difference between the grayscale values ​​of the c-th target pixel and the p-th target pixel at their corresponding positions in the i-th second surface image. This indicates the number of images of the second surface.

[0087] It should be noted that, The smaller the value, the closer the c-th target pixel and the p-th target pixel are in the first surface image, and thus an inverse proportional form is used. The closer the locations are, the higher the degree of similarity between adjacent elements. This represents the grayscale difference between the multi-angle grayscale value sequences of the c-th target pixel and the p-th target pixel, which is the difference in their responses under multiple illumination angles. The smaller this difference, the more similar the illumination responses of the c-th and p-th target pixels under multiple illumination angles, and the higher the degree of adjacent similarity. It's worth noting that when analyzing the grayscale difference between the multi-angle grayscale value sequences of the c-th and p-th target pixels, the c-th and p-th target pixels may be affected by bright and dark regions (i.e., the bright connected regions and shadow connected regions in the second surface image) under different illumination angles. However, the influence of bright and dark regions also indicates a greater distance between these two pixels. A larger grayscale difference also represents a more distant location, corresponding to a lower degree of adjacent similarity. Therefore, the influence of bright and dark regions is not considered here.

[0088] Step S104: Obtain the surface pit defect degree of any three-dimensional target region based on the shortest straight-line distance between each target pixel and the fitted curve; perform region segmentation on the first surface image based on the surface pit defect degree of each three-dimensional target region to obtain the surface defect region of the rubber line to be detected.

[0089] After obtaining the fitted curve of the y-th 3D target region, since LOESS fitting does not force its way through every target pixel, but instead obtains a smooth trend curve, based on this characteristic, the smooth curve obtained after fitting the larger and smaller surface normal change pixels (target pixels) of the liquid attachment edge will be relatively close to the fitted curve because the liquid attachment edge points themselves can form a smooth arc under the constraint of liquid surface tension along adjacent similar patterns. The trend of adjacent similar points of the larger and smaller surface normal change pixels in the rubber pit is relatively complex. Therefore, in order to maintain a certain degree of smoothness, the curve obtained after fitting will be relatively far away from each point, and most points may be discretely distributed near the fitted curve.

[0090] Based on the above characteristics, the shortest straight-line distance D between each target pixel in the y-th 3D target region and its corresponding fitted line is obtained. The smaller the distance between each target pixel and the fitted curve, the more likely the larger micro-facet normal change pixels in the y-th 3D target region have the characteristic of forming a smooth arc under the constraint of liquid surface tension along adjacent similar patterns. Conversely, the larger the distance, the more likely most adjacent larger micro-facet normal change pixels in the y-th 3D target region have different illumination grayscale performances under different illumination angles and are less likely to maintain adjacent similar trends, which conforms to the characteristics of pit defects. Therefore, in this embodiment of the invention, the surface pit defect degree of the y-th 3D target region is obtained based on the shortest straight-line distance between each target pixel and the fitted curve: the mean of the shortest straight-line distance is calculated based on the shortest straight-line distance between each target pixel and the fitted curve, and the mean is normalized to obtain the surface pit defect degree of the y-th 3D target region.

[0091] In one embodiment, the formula for calculating the degree of surface pit defects in the y-th three-dimensional target region is:

[0092]

[0093] in, This indicates the degree of surface pitting defects in the y-th 3D target region. This represents the maximum and minimum value normalization function based on the image sample set. This represents the shortest straight-line distance between the i-th target pixel within the y-th 3D target region and the fitted curve. This represents the number of target pixels within the y-th 3D target region.

[0094] It should be noted that, The average of the shortest straight-line distances of all target pixels to the fitted curve is combined. The larger the average value, the farther the target pixels in the y-th 3D target region are from the fitted curve. It is also more difficult for adjacent similar pixels to maintain the trend of similarity in grayscale performance under different lighting angles. The degree of pitting defects on the surface of the rubber line in the y-th 3D target region is stronger.

[0095] Similarly, following the method for obtaining the surface pit defect degree of the y-th 3D target region, the surface pit defect degree of each 3D target region in the first surface image is obtained respectively. Then, based on the surface pit defect degree of each 3D target region, the first surface image is segmented to obtain the surface defect region of the rubber line to be detected.

[0096] Since the image sample set includes multi-angle illuminated surface images (second surface images) of rubber lines with pit defects and multi-angle illuminated surface images (second surface images) of rubber lines covered with contamination, the degree of surface pit defects in the three-dimensional target region can be calculated by... Function normalization divides the surface pit defect degree E of the region with pit defects into one end of the range of maximum values, and the surface pit defect degree E of the region without pit defects into one end of the range of minimum values. Therefore, the middle value of 0.5 is taken as the threshold of surface pit defect degree, which can be adjusted according to the actual application scenario.

[0097] If the surface pit defect degree of the y-th three-dimensional target region If the y-th 3D target region is considered to be a pit defect region, then each 3D target region in the first surface image is traversed to obtain all pit defect regions in the first surface image. Then, the pixels in the pit defect regions in the first surface image are marked with red pixel values, while keeping the pixel values ​​of other pixels unchanged. In this way, the marking and segmentation of pit defect regions in the first surface image are completed. Maintenance and repair personnel can use the segmented first surface image to more quickly and accurately locate the position of pit defects on the surface of the rubber line, or complete the efficient assessment of the life of the rubber line.

[0098] The above embodiments are only used to illustrate the technical solutions of the present invention, and are not intended to limit it. Although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present invention, and should all be included within the protection scope of the present invention.

Claims

1. A method for segmenting surface defects of rubber lines based on image processing, characterized in that, The method includes: A first surface image of the rubber line to be detected under multi-angle ring illumination is obtained. The connected components in the first surface image are obtained through binarization. If the number of connected components is greater than 1, the second surface image of the rubber line to be detected under each illumination angle is obtained sequentially. The bright connected components and shadow connected components in each second surface image are obtained through binarization. Mark the location region corresponding to each connected component in the first surface image in each second surface image, and filter at least one stereo target region from all connected components based on the distance between each location region and the bright and shadow connected components in the corresponding second surface image; For any three-dimensional target region, based on the gray value change of each pixel in each second surface image, pixels with large and small surface normal changes are selected and recorded as target pixels; illumination response difference analysis is performed on every two target pixels, and a fitting curve characterizing the adjacent trend pattern between all target pixels is obtained through smooth fitting. The surface pit defect degree of any three-dimensional target region is obtained based on the shortest straight-line distance between each target pixel and the fitted curve; the first surface image is segmented based on the surface pit defect degree of each three-dimensional target region to obtain the surface defect region of the rubber line to be detected.

2. The method for segmenting surface defects of rubber lines based on image processing according to claim 1, characterized in that, The step of filtering at least one stereo target region from all connected regions based on the distance between each location region and the corresponding bright connected regions and shadow connected regions in the second surface image includes: For any connected component in the first surface image, the nearest bright connected component and the nearest shadow connected component of the corresponding location region are obtained in each second surface image. Based on the distance between the location region and the nearest bright connected component and the nearest shadow connected component, the overall proximity distribution degree of the connected component is obtained. The overall proximity difference of any connected region is obtained based on the distance between the nearest neighbor highlighted connected regions and the distance between the nearest neighbor shaded connected regions between any two adjacent second surface images. The reciprocal of the overall proximity distribution degree is normalized to obtain a first normalized value, and the reciprocal of the overall proximity difference degree is normalized to obtain a second normalized value. The 3D feature degree of any connected domain is obtained by multiplying the first normalized value and the second normalized value. If the stereoscopic feature degree of any connected region is greater than or equal to a preset stereoscopic feature degree threshold, then the connected region is confirmed as a stereoscopic target region.

3. The method for segmenting surface defects of rubber lines based on image processing according to claim 2, characterized in that, The step of obtaining the overall proximity distribution degree of any connected region based on the distance between the location region and the nearest bright connected region and the nearest shadow connected region respectively includes: In any second surface image, calculate the first Euclidean distance and the second Euclidean distance between the location region corresponding to any connected region and the nearest bright connected region and the nearest shadow connected region, respectively, and calculate the third Euclidean distance between the nearest bright connected region and the nearest shadow connected region. Calculate the sum of the first Euclidean distance and the second Euclidean distance, and multiply the sum by the third Euclidean distance to obtain the proximity distribution degree corresponding to any second surface image; obtain the proximity distribution degrees corresponding to all second surface images and sum them to obtain the overall proximity distribution degree of any connected domain.

4. The method for segmenting surface defects of rubber lines based on image processing according to claim 2, characterized in that, The step of obtaining the overall proximity difference degree of any connected component based on the distance between the nearest neighbor highlighted connected components and the distance between the nearest neighbor shaded connected components between any two adjacent second surface images includes: ; in, This represents the overall proximity difference of the q-th connected component. This represents the location region of the q-th connected component in the i-th second surface image and its nearest neighbor highlighted connected component. The Euclidean distance between them This represents the location region of the q-th connected component in the (i+1)-th second surface image and its nearest neighbor highlighted connected component. The Euclidean distance between them The location region of the q-th connected component in the i-th second surface image and its nearest neighbor shaded connected component are shown. The Euclidean distance between them The location region of the q-th connected component in the (i+1)-th second surface image and its nearest neighbor shaded connected component are shown. The Euclidean distance between them, where | represents the absolute value symbol.

5. The method for segmenting surface defects of rubber lines based on image processing according to claim 1, characterized in that, The step of filtering pixels with significant micro-face normal variations based on the grayscale value changes of each pixel in each second surface image within any three-dimensional target region includes: For any pixel in any three-dimensional target region, the gray values ​​of the corresponding pixels in each second surface image are arranged in ascending order of illumination angle to obtain the initial gray value sequence of the pixel. If the pixel in the corresponding position of the pixel in the second surface image belongs to the shadow connected region, the corresponding gray value in the initial gray value sequence is deleted to obtain the target gray value sequence of the pixel. Calculate the absolute value of the difference between any gray value in the target gray value sequence and each other gray value, and obtain the cumulative value of the absolute difference as the degree of gray value difference of the given gray value; obtain the degree of gray value difference of each gray value in the target gray value sequence, and normalize the cumulative value of all gray value difference degrees to obtain the degree of micro-face normal change of the given pixel; if the degree of micro-face normal change of the given pixel is greater than or equal to a preset threshold for the degree of micro-face normal change, then the given pixel is determined to be a pixel with a large micro-face normal change.

6. The method for segmenting surface defects of rubber lines based on image processing according to claim 1, characterized in that, The step of performing illumination response difference analysis on every two target pixels and obtaining a fitting curve characterizing the adjacent trend pattern between all target pixels through smooth fitting includes: Take the target pixel located at the top and leftmost side of any three-dimensional target region as the first analysis starting point, calculate the degree of adjacency similarity between the first analysis starting point and each non-analysis starting point, and take the non-analysis starting point corresponding to the maximum degree of adjacency similarity as the nearest similar pixel of the first analysis starting point. Using the nearest neighbor similar pixel as the second analysis starting point, among the remaining target pixels excluding the first analysis starting point, the nearest neighbor similar pixel of the second analysis starting point is obtained according to the method for obtaining the nearest neighbor similar pixel of the first analysis starting point, and so on, connecting all target pixels into a chain; Based on the positional order of the target pixels on the chain, the positions of all target pixels are smoothly fitted to obtain the corresponding fitting curve, which is used to characterize the adjacent trend pattern between all target pixels.

7. The method for segmenting surface defects of rubber lines based on image processing according to claim 6, characterized in that, The calculation of the adjacency similarity between the first analysis starting point and each non-analysis starting point includes: The non-analysis starting point refers to the target pixel point excluding the first analysis starting point; for any non-analysis starting point, calculate the Euclidean distance between the first analysis starting point and any non-analysis starting point, and normalize the reciprocal of the Euclidean distance to obtain the positional adjacency. Calculate the absolute value of grayscale values ​​between the first analysis starting point and the corresponding pixel points of any non-analysis starting point in each second surface image to obtain the cumulative value of the absolute grayscale values. Normalize the reciprocal of the cumulative value of the absolute grayscale values ​​to obtain the illumination response similarity. The degree of proximity between the first analysis starting point and any non-analysis starting point is obtained by summing the positional proximity and the illumination response similarity.

8. The method for segmenting surface defects of rubber lines based on image processing according to claim 1, characterized in that, The step of obtaining the surface pit defect degree of any three-dimensional target region based on the shortest straight-line distance between each target pixel and the fitted curve includes: Based on the shortest straight-line distance between each target pixel and the fitted curve, the mean of the shortest straight-line distance is calculated, and the mean is normalized to obtain the surface pit defect degree of any three-dimensional target region.