Surface defect detection method of semiconductor ceramic composite materials based on image processing
By obtaining edge intersection points and local gradient difference values, combining K-mean value and watershed segmentation algorithm, the problem of inaccurate seed point selection under the influence of light is solved, and high accuracy of surface defect detection of semiconductor ceramic composite materials is achieved.
Patent Information
- Application Number
- CN202510580427.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-05-07
- Publication Date
- 2025-08-19
- Estimated Expiration
- 2045-05-07
AI Technical Summary
When the existing watershed segmentation algorithm detects surface defects of semiconductor ceramic composite materials, the seed point selection is inaccurate due to the influence of light, which affects the accuracy of defect detection.
By obtaining edge intersection points, calculating local gradient difference values and smooth eigenvalues, clustering edges using the K-mean algorithm, combining the watershed segmentation algorithm to obtain defect areas, and select accurate seed points for defect detection.
It improves the accuracy of defect detection, avoids seed point selection errors under the influence of light, and enhances the segmentation accuracy of defect areas.
Smart Images

Figure CN120088264B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of defect detection, and in particular to a method for detecting surface defects of semiconductor ceramic composite materials based on image processing. Background Art
[0002] Semiconductor ceramic composites are composite materials composed of a ceramic matrix and semiconductor materials. Due to their excellent properties, they are widely used in electronic packaging, sensors, power devices, and other fields. Due to the brittle nature of these materials, surface defects such as peeling and cracking are prone to occur during their preparation, affecting product quality. Therefore, surface defect detection is necessary. Existing machine vision technology enables automated detection. The existing watershed segmentation algorithm can segment and extract defective regions on the material surface. The accuracy of this algorithm in segmenting defective regions depends on the selection of seed points, which in turn depends on the grayscale distribution characteristics of the image. However, due to the three-dimensional structure of ceramic composites, the color at different locations on the surface varies due to the shooting light, resulting in the color of the defective surface being close to that of some normal areas, which affects the selection of seed points. Ultimately, the watershed segmentation algorithm has low segmentation accuracy for surface defect regions, ultimately affecting the accuracy of defect detection. Summary of the Invention
[0003] In order to solve the technical problem that the color of the defect surface is close to the color of some normal areas due to the shooting light, resulting in low segmentation accuracy of the watershed segmentation algorithm for the surface defect area, thereby affecting the accuracy of defect detection, the purpose of the present invention is to provide a method for detecting surface defects of semiconductor ceramic composite materials based on image processing. The technical solution adopted is as follows:
[0004] Acquire appearance images of semiconductor ceramic composite materials;
[0005] Obtaining edge intersections based on the number characteristics of other edge pixels in the neighborhood of the edge pixel on the edge line in the appearance image; obtaining different target edges in the edge line based on the edge intersections; and obtaining local gradient magnitude difference values and local gradient direction difference values based on the gradient difference characteristics of adjacent edge pixels in the target edge;
[0006] Obtaining edge smoothing feature values based on the distribution characteristics of local gradient magnitude differences and local gradient direction differences of edge pixels in the target edge; obtaining a smoothing difference based on the difference characteristics of the edge smoothing feature values of any two target edges; obtaining a defect probability value based on the discrete characteristics of the smoothing difference and determining whether a defect exists; if a defect exists, clustering the target edges based on the smoothing difference and selecting a defect edge cluster from the clustering results based on the edge smoothing feature values;
[0007] The seed point of the watershed segmentation algorithm is obtained according to the grayscale difference characteristics of the areas on both sides of any defect edge in the defect edge cluster; the defect area of the composite material appearance is obtained by the watershed segmentation algorithm according to the seed point; and the defect degree is obtained according to the area characteristics of the defect area.
[0008] Furthermore, the step of obtaining edge intersections according to the quantity characteristics of other edge pixels in the neighborhood of the edge pixel on the edge line in the appearance image includes:
[0009] If there are no less than three other edge pixels in the eight neighborhoods of any edge pixel point, the arbitrary edge pixel point is an edge intersection point.
[0010] Furthermore, the step of obtaining different target edges in the edge line according to the edge intersections includes:
[0011] Taking any edge intersection as a starting point, a local edge line from the arbitrary edge intersection to other directly connected edge intersections is taken as the target edge.
[0012] Furthermore, the step of obtaining a local gradient magnitude difference value and a local gradient direction difference value according to the gradient difference characteristics of adjacent edge pixels in the target edge includes:
[0013] , the gradient amplitude and gradient direction of the edge pixel points in the target edge are respectively used as gradient eigenvalues; where, Represents the gradient eigenvalue of the i-th edge pixel in the target edge, Indicates the The gradient eigenvalue of the edge pixel point, Indicates the The gradient eigenvalue of edge pixels; Indicates the and The difference of the gradient eigenvalues of edge pixels, Indicates the i-th and The difference of the gradient eigenvalues of edge pixels, Indicates the i-th and The difference between the gradient eigenvalues of edge pixels; when the gradient eigenvalue represents the gradient amplitude, Represents the local gradient difference value of the i-th edge pixel point. When the gradient eigenvalue represents the gradient direction, Represents the local gradient direction difference value of the i-th edge pixel.
[0014] Furthermore, the step of obtaining edge smoothing feature values according to the distribution characteristics of local gradient magnitude difference values and local gradient direction difference values of edge pixels in the target edge includes:
[0015] Calculate the standard deviation of the local gradient magnitude difference values of the edge pixels in the target edge to obtain a first distribution disorder; calculate the standard deviation of the local gradient direction difference values of the edge pixels in the target edge to obtain a second distribution disorder; calculate the sum of the first distribution disorder and the second distribution disorder and negatively correlate them to obtain the edge smoothing feature value of the target edge.
[0016] Furthermore, the step of obtaining the smoothing difference according to the difference characteristics of the edge smoothing feature values of any two target edges includes:
[0017] The absolute value of the difference between the edge smoothing feature values of any two target edges is calculated to obtain the smoothing difference between the any two target edges.
[0018] Furthermore, the step of obtaining a defect probability value based on the discrete characteristics of the smoothed difference and determining whether a defect exists includes:
[0019] The difference between the maximum value and the minimum value of the smooth difference is calculated and normalized to obtain a defect probability value of the composite material appearance; when the defect probability value does not exceed a preset normal threshold, the composite material appearance has a defect.
[0020] Furthermore, the steps of clustering target edges according to the smoothing difference and selecting defect edge clusters from the clustering results according to the edge smoothing feature values include:
[0021] Clustering is performed using a K-means algorithm according to the smoothing differences between target edges to obtain two target edge clusters; and the target edge cluster containing the minimum value of the edge smoothing eigenvalue is used as the defect edge cluster.
[0022] Furthermore, the step of obtaining a seed point of a watershed segmentation algorithm according to the grayscale difference characteristics of the areas on both sides of any defect edge in the defect edge cluster includes:
[0023] Taking the middle edge pixel point of any defect edge as the starting point, taking a preset number of connected pixel points along the gradient direction of the middle edge pixel point and constructing a pixel point sequence; taking a preset number of connected pixel points along the opposite direction of the gradient direction of the middle edge pixel point and constructing another pixel point sequence; differentiating the grayscale values of the pixel point sequence and calculating the standard deviation to obtain the grayscale chaos degree; and taking any pixel point in the pixel point sequence corresponding to the maximum value of the grayscale chaos degree as the seed point.
[0024] Furthermore, the step of obtaining the defect degree according to the area characteristics of the defect area includes:
[0025] The ratio of the number of pixels in the defect area to the number of pixels in the appearance image is calculated to obtain the degree of the defect.
[0026] The present invention has the following beneficial effects:
[0027] In an embodiment of the present invention, obtaining edge intersections can split the edge lines initially obtained so that each target edge only represents a separate feature on the surface of the composite material, thereby improving the accuracy of subsequent defect segmentation. Obtaining the local gradient magnitude difference value and the local gradient direction difference value of the edge pixel point can characterize the gradient difference characteristics at the edge pixel point; since there is a difference in the smoothness regularity of the gradient characteristics of the edge line of the defect area and the normal area, obtaining the edge smoothness characteristic value can characterize the possibility that the target edge is a defect area. Obtaining the smoothness difference can characterize the difference in edge smoothness between different target edges, and then obtaining the defect probability value based on the smoothness difference can determine the probability of the presence of a defect area on the surface of the composite material. Obtaining a defect edge cluster can determine the target edge position of the defect area; obtaining the seed point of the watershed segmentation algorithm based on the grayscale difference characteristics of the areas on both sides of any defect edge in the defect edge cluster can accurately segment the defect area, avoiding errors in defect area segmentation caused by determining the seed point based on the grayscale value, thereby improving the accuracy of composite surface defect detection. BRIEF DESCRIPTION OF THE DRAWINGS
[0028] In order to more clearly illustrate the technical solutions and advantages of the embodiments of the present invention or the prior art, the following briefly introduces the drawings required for use in the embodiments or the prior art descriptions. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.
[0029] Figure 1 A flow chart of a method for detecting surface defects of semiconductor ceramic composite materials based on image processing provided by one embodiment of the present invention;
[0030] Figure 2 This is an appearance image of a semiconductor ceramic composite material provided by one embodiment of the present invention;
[0031] Figure 3 An edge line image of a semiconductor ceramic composite material provided by one embodiment of the present invention;
[0032] Figure 4 An image of a defective region of a semiconductor ceramic composite material provided by one embodiment of the present invention. DETAILED DESCRIPTION
[0033] To further illustrate the technical means and effectiveness of the present invention in achieving its intended objectives, the following, in conjunction with the accompanying drawings and preferred embodiments, details the specific implementation, structure, features, and effectiveness of a surface defect detection method for semiconductor ceramic composite materials based on image processing proposed by the present invention. In the following description, references to different "one embodiment" or "another embodiment" do not necessarily refer to the same embodiment. Furthermore, specific features, structures, or characteristics of one or more embodiments may be combined in any suitable manner.
[0034] Unless defined otherwise, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this invention belongs.
[0035] The following describes in detail a method for detecting surface defects of semiconductor ceramic composite materials based on image processing provided by the present invention with reference to the accompanying drawings.
[0036] See also Figure 1 , which shows a flow chart of a method for detecting surface defects of semiconductor ceramic composite materials based on image processing according to an embodiment of the present invention, the method comprising the following steps:
[0037] Step S1, obtaining an appearance image of the semiconductor ceramic composite material.
[0038] In the embodiment of the present invention, the implementation scenario is to detect defects on the surface of semiconductor ceramic composite materials by image processing technology to improve the accuracy of defect detection. First, the appearance image of the semiconductor ceramic composite material is obtained. The semiconductor ceramic composite material in the embodiment of the present invention is a silicon nitride ceramic composite material. Figure 2 An image showing the appearance of a semiconductor ceramic composite material is shown.
[0039] Step S2: obtaining edge intersections based on the number characteristics of other edge pixels in the neighborhood of the edge pixel on the edge line in the appearance image; obtaining different target edges in the edge line based on the edge intersections; and obtaining local gradient magnitude difference values and local gradient direction difference values based on the gradient difference characteristics of adjacent edge pixels in the target edge.
[0040] Under normal circumstances, defect segmentation can be performed on the acquired appearance image using the existing watershed segmentation algorithm. This algorithm selects appropriate seed point locations based on the grayscale features in the image. The algorithm then uses the principle of rising and falling water to segment and extract the defect area. For example, if the defect area is darker and has a lower grayscale value, the pixel with the smallest grayscale value can be selected as the seed point for segmentation and extraction. However, in the current scene, ceramic composite materials have a three-dimensional structure with a complex surface structure. During the capture process, the influence of lighting can easily cause the color features of the defect area and some normal areas to be close, thus affecting the accuracy of seed point selection and defect area segmentation. Therefore, to improve the accuracy of defect detection, it is necessary to improve the seed point selection method.
[0041] First, the edge intersection is obtained based on the number characteristics of other edge pixels in the neighborhood of the edge pixel point on the edge line in the appearance image; the edge line of the appearance image is obtained by the existing edge detection algorithm, and the specific steps are not repeated here. Figure 3 The edge line image of a semiconductor ceramic composite material is shown; different areas of the surface can be segmented by the edge line. Figure 3 It can be seen that a long edge line may represent the edges of multiple planes in a composite material, so the edge line needs to be split to improve the accuracy of subsequent defect area identification. Then, the edge intersection point is obtained based on the number characteristics of other edge pixels within the neighborhood of the edge pixel point on the edge line in the appearance image; preferably, in an embodiment of the present invention, the step of obtaining the edge intersection point includes: if there are no fewer than three other edge pixels within the eight neighborhoods of any edge pixel point, it means that at least two edge lines intersect at the arbitrary edge pixel point, and the arbitrary edge pixel point is an edge intersection point.
[0042] Furthermore, after obtaining the edge line intersection, different target edges in the edge line can be obtained based on the edge intersection; preferably, in an embodiment of the present invention, the step of obtaining the target edge includes: taking any edge intersection as the starting point, and taking the local edge line between the arbitrary edge intersection and other directly connected edge intersections as the target edge. Each target edge can characterize a separate feature of the composite surface, making the determination of the defect range more accurate; it should be noted that if a certain edge line forms a closed connected domain and no edge intersection occurs, then the edge line is taken as a target edge. When a defect occurs on the surface of a composite material, the shape of its defect edge is relatively random and not smooth, while the edge line of the normal area has strong smoothness and regularity; this is further reflected in the gradient characteristics of the edge pixel points. The regularity of the gradient characteristics of the defect edge pixel points is poor, while the gradient characteristics of the edge pixel points in the normal area are relatively regular. Therefore, the local gradient magnitude difference value and the local gradient direction difference value can be obtained based on the gradient difference characteristics of adjacent edge pixels in the target edge. Preferably, in an embodiment of the present invention, the steps and formulas for obtaining the local gradient magnitude difference value and the local gradient direction difference value include:
[0043]
[0044] The gradient amplitude and gradient direction of the edge pixel points in the target edge are respectively used as gradient eigenvalues; where, Represents the gradient eigenvalue of the i-th edge pixel in the target edge, Indicates the The gradient eigenvalue of the edge pixel point, Indicates the The gradient eigenvalue of edge pixels; Indicates the and The difference of the gradient eigenvalues of edge pixels, Indicates the i-th and The difference of the gradient eigenvalues of edge pixels, Indicates the i-th and The difference between the gradient eigenvalues of edge pixels; when the gradient eigenvalue represents the gradient amplitude, Represents the local gradient difference value of the i-th edge pixel point. When the gradient eigenvalue represents the gradient direction, Represents the local gradient direction difference value of the i-th edge pixel point. When the gradient feature value difference of adjacent edge pixels in the target edge is larger, and The larger the value of On the contrary, when the difference of gradient eigenvalues is smaller, The smaller the value of .
[0045] Step S3, obtaining edge smoothing eigenvalues based on the distribution characteristics of the local gradient magnitude difference values and local gradient direction difference values of edge pixels in the target edge; obtaining smoothing difference based on the difference characteristics of the edge smoothing eigenvalues of any two target edges; obtaining a defect probability value based on the discrete characteristics of the smoothing difference and judging whether there is a defect; if there is a defect, clustering the target edges according to the smoothing difference and selecting a defect edge cluster from the clustering results according to the edge smoothing eigenvalues.
[0046] The local gradient magnitude difference and local gradient direction difference of edge pixels reflect the local gradient difference characteristics of those edge pixels. If the target edge is the edge line of a normal region, the gradient characteristics of the edge pixels are highly regular, and the local magnitude difference and local gradient direction difference values of each edge pixel in the target edge are relatively similar. If the target edge is the edge line of a defect region, the gradient characteristics of the edge pixels are relatively random, and the distribution of the local magnitude difference and local gradient direction difference values of each edge pixel in the target edge is relatively discrete. Therefore, the edge smoothing feature value can be obtained based on the distribution characteristics of the local gradient magnitude difference and local gradient direction difference values of the edge pixels in the target edge.
[0047] Preferably, in an embodiment of the present invention, the step of obtaining an edge smoothing eigenvalue includes: calculating the standard deviation of the local gradient magnitude difference values of the edge pixels in the target edge to obtain a first distribution disorder; calculating the standard deviation of the local gradient direction difference values of the edge pixels in the target edge to obtain a second distribution disorder; calculating the sum of the first distribution disorder and the second distribution disorder and performing negative correlation mapping to obtain the edge smoothing eigenvalue of the target edge. When the first distribution disorder and the second distribution disorder are smaller, it means that the local gradient magnitude difference values and the local gradient direction difference values of the edge pixels in the target edge are closer, then the possibility that the target edge is the edge line of a normal area is greater, and the value of the edge smoothing eigenvalue is greater. When the first distribution disorder and the second distribution disorder are larger, it means that the numerical distribution of the local gradient magnitude difference values and the local gradient direction difference values of the edge pixels in the target edge are more discrete, then the possibility that the target edge is the edge line of a defect area is greater, and the value of the edge smoothing eigenvalue is smaller.
[0048] Furthermore, if a defective region exists on the composite surface, the difference in edge smoothing characteristic values between the edge lines of the normal region and the defective region is significant. Therefore, a smoothing difference can be obtained based on the difference in edge smoothing characteristic values between any two target edges. Preferably, in an embodiment of the present invention, obtaining the smoothing difference includes calculating the absolute value of the difference between the edge smoothing characteristic values of any two target edges to obtain the smoothing difference between the two target edges. A greater smoothing difference indicates a higher probability that one of the two target edges contains a normal region edge line and a defect region edge line. After obtaining the smoothing difference, a defect probability value can be obtained based on the discrete characteristics of the smoothing difference to determine whether a defect exists. Preferably, in an embodiment of the present invention, obtaining the defect probability value and determining whether a defect exists includes calculating the difference between the maximum and minimum values of the smoothing difference and normalizing the difference to obtain a defect probability value for the composite surface. When the defect probability value does not exceed a preset normal threshold, the composite surface is defective. When there are no defective regions in the composite, the smoothing difference is relatively small, and thus the defect probability value is relatively small. A greater defect probability value indicates a greater probability that a defective region exists in the composite surface. In the embodiment of the present invention, the preset normal threshold is the average value of the defect probability values of 10 identical normal composite materials, and the implementer can determine it according to the implementation scenario.
[0049] When there are defects, it is necessary to detect the defective area and analyze the degree of the defect. The smoothing difference between the target edges of the defective area is small, and the smoothing difference between the target edges of the defective area and the normal area is large. Therefore, the target edges can be clustered according to the smoothing difference, and the defect edge cluster can be selected from the clustering results according to the edge smoothing eigenvalue. Preferably, in an embodiment of the present invention, clustering is performed using the K-means algorithm based on the smoothing difference between the target edges to obtain two target edge clusters. It should be noted that the K-means algorithm belongs to the existing clustering technology, and the specific steps will not be repeated. The smoothing difference is used as the metric distance between the target edges in the clustering process. There are a target edge of a normal area and a target edge of a defective area in the two target edge clusters. The edge smoothing eigenvalue of the target edge of the defective area is small, so the target edge cluster containing the minimum value of the edge smoothing eigenvalue is used as the defect edge cluster.
[0050] Step S4, obtaining a seed point of a watershed segmentation algorithm based on the grayscale difference characteristics of the areas on both sides of any defect edge in the defect edge cluster; obtaining a defect area of the composite material appearance through the watershed segmentation algorithm based on the seed point; and obtaining a defect degree based on the area characteristics of the defect area.
[0051] After obtaining the defect edge cluster, one side of the defect edge is the defect area. Due to the shedding of the coating in the defect area, the grayscale changes are less regular, while the grayscale characteristics of the normal area are more regular. The seed point of the watershed segmentation algorithm can then be obtained based on the grayscale difference characteristics of the areas on both sides of any defect edge in the defect edge cluster. Preferably, in an embodiment of the present invention, the step of obtaining the seed point includes: starting from the middle edge pixel of any defect edge, taking a preset number of connected pixels along the gradient direction of the middle edge pixel and constructing a pixel sequence; taking a preset number of connected pixels along the opposite direction of the gradient direction of the middle edge pixel and constructing another pixel sequence. In this embodiment of the present invention, the preset number is 5, which can be determined by the implementer according to the implementation scenario. The grayscale values of the pixel sequence are differentiated and the standard deviation is calculated to obtain the grayscale chaos. When the grayscale values of the pixel sequence are relatively similar or change regularly, the standard deviation after grayscale differentiation is small, and the grayscale chaos is small. When the grayscale values of the pixel sequence change and the change is irregular, the standard deviation after grayscale differentiation is large, and the grayscale chaos is large. Therefore, the side where the pixel sequence with a larger grayscale disorder is located is the defect area, and then any pixel in the pixel sequence corresponding to the maximum grayscale disorder is used as a seed point.
[0052] Furthermore, after obtaining the seed point, the defect area of the composite material surface can be obtained based on the seed point through the watershed segmentation algorithm; starting from the seed point and ending with the closed edge line around the seed point, a complete defect area is obtained. It should be noted that the watershed segmentation algorithm belongs to the existing technology, and the specific steps are not repeated here. Figure 4 An image of a defective region of a semiconductor ceramic composite material is shown. By using this method to determine seed points and obtain defective regions, it is possible to avoid the influence of the shooting light on the grayscale values of the pixels on the surface of the composite material, which may lead to inaccurate seed point selection, thereby improving the accuracy of segmentation and extraction of defective regions. After all defective regions are obtained, the degree of defect can be obtained based on the area characteristics of the defective regions. Preferably, in an embodiment of the present invention, the step of obtaining the degree of defect includes calculating the ratio of the number of pixels in the defective region to the number of pixels in the appearance image to obtain the degree of defect. The larger the area of the defective region and the greater the number of pixels, the greater the degree of defect. Composite materials can then be selected based on the degree of defect.
[0053] In summary, the embodiments of the present invention provide a method for detecting surface defects in semiconductor ceramic composite materials based on image processing; obtaining a local gradient magnitude difference value and a local gradient direction difference value based on the gradient difference characteristics of adjacent edge pixels in the target edge; obtaining an edge smoothing feature value based on the distribution characteristics of the local gradient magnitude difference value and the local gradient direction difference value; obtaining a smoothing difference based on the edge smoothing feature values of any two target edges; obtaining a defect probability value based on the smoothing difference and determining whether a defect exists; clustering the target edges based on the smoothing difference and selecting a defect edge cluster based on the edge smoothing feature value. The present invention obtains the seed point and defect area of the watershed segmentation algorithm based on the grayscale difference characteristics of the areas on both sides of the defect edge in the defect edge cluster; and obtaining the defect degree based on the area characteristics of the defect area, thereby improving the accuracy of seed point selection and defect detection.
[0054] It should be noted that the order in which the embodiments of the present invention are described above is for illustrative purposes only and does not necessarily represent the superiority or inferiority of the embodiments. The processes depicted in the accompanying drawings do not necessarily require the specific order or sequential order shown to achieve the desired results. In certain embodiments, multitasking and parallel processing are also possible or may be advantageous.
[0055] The various embodiments in this specification are described in a progressive manner, and the same or similar parts between the various embodiments can be referred to each other. Each embodiment focuses on the differences from other embodiments.
Claims
1. A method for detecting surface defects of semiconductor ceramic composite materials based on image processing, characterized in that: The method comprises the following steps: Acquire appearance images of semiconductor ceramic composite materials; Obtaining edge intersections based on the number characteristics of other edge pixels in the neighborhood of the edge pixel on the edge line in the appearance image; obtaining different target edges in the edge line based on the edge intersections; and obtaining local gradient magnitude difference values and local gradient direction difference values based on the gradient difference characteristics of adjacent edge pixels in the target edge; Obtaining edge smoothing feature values based on the distribution characteristics of local gradient magnitude differences and local gradient direction differences of edge pixels in the target edge; obtaining a smoothing difference based on the difference characteristics of the edge smoothing feature values of any two target edges; obtaining a defect probability value based on the discrete characteristics of the smoothing difference and determining whether a defect exists; if a defect exists, clustering the target edges based on the smoothing difference and selecting a defect edge cluster from the clustering results based on the edge smoothing feature values; The seed point of the watershed segmentation algorithm is obtained according to the grayscale difference characteristics of the areas on both sides of any defect edge in the defect edge cluster; the defect area of the composite material appearance is obtained by the watershed segmentation algorithm according to the seed point; and the defect degree is obtained according to the area characteristics of the defect area.
2. The method for detecting surface defects of semiconductor ceramic composite materials based on image processing according to claim 1, characterized in that: The step of obtaining edge intersections based on the quantity characteristics of other edge pixels within the neighborhood of the edge pixel on the edge line in the appearance image comprises: If there are no less than three other edge pixels in the eight neighborhoods of any edge pixel point, the arbitrary edge pixel point is an edge intersection point.
3. The method for detecting surface defects of semiconductor ceramic composite materials based on image processing according to claim 1, characterized in that: The step of obtaining different target edges in the edge line according to the edge intersections includes: Taking any edge intersection as a starting point, a local edge line from the arbitrary edge intersection to other directly connected edge intersections is taken as the target edge.
4. The method for detecting surface defects of semiconductor ceramic composite materials based on image processing according to claim 1, characterized in that: The step of obtaining a local gradient magnitude difference value and a local gradient direction difference value according to the gradient difference characteristics of adjacent edge pixels in the target edge comprises: , the gradient amplitude and gradient direction of the edge pixel points in the target edge are respectively used as gradient eigenvalues; where, Represents the gradient eigenvalue of the i-th edge pixel in the target edge, Indicates the The gradient eigenvalue of the edge pixel point, Indicates the The gradient eigenvalue of edge pixels; Indicates the and The difference of the gradient eigenvalues of edge pixels, Indicates the i-th and The difference of the gradient eigenvalues of edge pixels, Indicates the i-th and The difference between the gradient eigenvalues of edge pixels; when the gradient eigenvalue represents the gradient amplitude, Represents the local gradient difference value of the i-th edge pixel point. When the gradient eigenvalue represents the gradient direction, Represents the local gradient direction difference value of the i-th edge pixel.
5. The method for detecting surface defects of semiconductor ceramic composite materials based on image processing according to claim 1, characterized in that: The step of obtaining edge smoothing feature values according to the distribution characteristics of local gradient magnitude difference values and local gradient direction difference values of edge pixels in the target edge comprises: Calculate the standard deviation of the local gradient magnitude difference values of the edge pixels in the target edge to obtain a first distribution disorder; calculate the standard deviation of the local gradient direction difference values of the edge pixels in the target edge to obtain a second distribution disorder; calculate the sum of the first distribution disorder and the second distribution disorder and negatively correlate them to obtain the edge smoothing feature value of the target edge.
6. The method for detecting surface defects of semiconductor ceramic composite materials based on image processing according to claim 1, characterized in that: The step of obtaining the smoothing difference according to the difference characteristics of the edge smoothing feature values of any two target edges comprises: The absolute value of the difference between the edge smoothing feature values of any two target edges is calculated to obtain the smoothing difference between the any two target edges.
7. The method for detecting surface defects of semiconductor ceramic composite materials based on image processing according to claim 1, characterized in that: The step of obtaining a defect probability value based on the discrete characteristics of the smooth difference and determining whether a defect exists includes: The difference between the maximum value and the minimum value of the smooth difference is calculated and normalized to obtain a defect probability value of the composite material appearance; when the defect probability value does not exceed a preset normal threshold, the composite material appearance has a defect.
8. The method for detecting surface defects of semiconductor ceramic composite materials based on image processing according to claim 1, characterized in that: The steps of clustering target edges according to the smoothing difference and selecting defect edge clusters from the clustering results according to the edge smoothing eigenvalues include: Clustering is performed using a K-means algorithm according to the smoothing differences between target edges to obtain two target edge clusters; and the target edge cluster containing the minimum value of the edge smoothing eigenvalue is used as the defect edge cluster.
9. The method for detecting surface defects of semiconductor ceramic composite materials based on image processing according to claim 1, characterized in that: The step of obtaining the seed point of the watershed segmentation algorithm according to the grayscale difference characteristics of the areas on both sides of any defect edge in the defect edge cluster comprises: Taking the middle edge pixel point of any defect edge as the starting point, taking a preset number of connected pixel points along the gradient direction of the middle edge pixel point and constructing a pixel point sequence; taking a preset number of connected pixel points along the opposite direction of the gradient direction of the middle edge pixel point and constructing another pixel point sequence; differentiating the grayscale values of the pixel point sequence and calculating the standard deviation to obtain the grayscale chaos degree; and taking any pixel point in the pixel point sequence corresponding to the maximum value of the grayscale chaos degree as the seed point.
10. The method for detecting surface defects of semiconductor ceramic composite materials based on image processing according to claim 1, characterized in that: The step of obtaining the defect degree according to the area characteristics of the defect area comprises: The ratio of the number of pixels in the defect area to the number of pixels in the appearance image is calculated to obtain the degree of the defect.
Citation Information
Patent Citations
Visual inspection system for polishing effect of aluminum alloy surface
CN117173189A
Visual inspection method for defects of three-axis turntable
CN118196094A