LED chip defect detection method and system
By extracting the direction and brightness changes of the wiring area from LED chip images, crack paths can be identified and expanded, solving the problem of misjudgment in existing technologies and achieving higher precision and adaptability in defect detection.
Patent Information
- Application Number
- CN202511105104.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-08-07
- Publication Date
- 2025-11-14
AI Technical Summary
Existing LED chip defect detection methods are prone to misjudgment in scenarios with sparse wiring, blurred edges, and image noise interference. They cannot effectively identify the crack trend and the light reflection at the electrode boundary, resulting in the inclusion of false defect areas in the detection results and reducing the adaptability and accuracy of the detection.
By acquiring the main wiring area layer in the LED chip image, defining the boundary according to the continuity of the wiring direction, locating the pixel pairs with varying wiring spacing, extending the path along the image grid, extracting the crack direction path line segment group, expanding the wiring morphology structure layer, filtering out areas of brightness discontinuity, and identifying defects by combining mirror differences.
It enhances the continuity of crack trend and structural extension information, improves the tracking integrity and stability of defect areas, and enhances the accuracy and adaptability of detection.
Smart Images

Figure CN120953235A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of optical inspection technology, and in particular to a method and system for detecting defects in LED chips. Background Technology
[0002] The field of optical inspection technology encompasses techniques for material characterization and defect identification based on the propagation characteristics of light. The core of this technology lies in using optical systems to perform non-contact inspection of the object under test, acquiring optical characteristic parameters such as reflection, transmission, scattering, and absorption, thereby identifying structural anomalies, process defects, or functional deviations on the object's surface or within its structure. This field is widely used in semiconductor device manufacturing, optoelectronic component testing, material characterization, and industrial quality control, involving techniques such as laser scanning imaging, interferometry, spectral analysis, fluorescence imaging, and imaging photometric measurement. Optical inspection technology features high detection speed, high resolution, and adaptability to complex inspection environments, making it one of the key process control methods in the electronics manufacturing industry.
[0003] The LED chip defect detection method refers to a method that uses specific optical means to detect the structural integrity, electrode connection status, and material consistency of light-emitting diode chips. This detection method targets typical defects generated during LED chip manufacturing, such as fractures, cracks, foreign object inclusions, abnormal morphology, and electrode misalignment. It constructs an optical acquisition path with multi-angle high-resolution imaging capabilities and combines image feature extraction rules to sequentially capture and recognize patterns in images of the chip surface structure. In this process, a specific wavelength-response illumination source is typically used to directionally illuminate the chip, and an imaging device with a specific focal length and resolution is used to acquire a two-dimensional image sequence. Then, image segmentation and feature comparison rules are used to classify and determine the defect type in the images. The entire detection scheme establishes recognition criteria based on changes in optical features such as spatial resolution, brightness differences, and abrupt geometric edge changes, enabling effective identification of LED chip defect samples.
[0004] Recognition logic based primarily on brightness or edge contrast lacks a comprehensive consideration of the continuity of paths, easily leading to misjudgments in scenarios with sparse wiring, blurred edges, and image noise interference. Crack trajectory recognition often remains at the static edge segment detection stage, lacking a mechanism to determine the continuity between paths, causing crack direction breaks and misleading subsequent image matching. Light reflection or grayscale abrupt changes at electrode boundaries are often treated as abnormal signals, misleading the identification of brightness fluctuations. It lacks the ability to distinguish between symmetrical perturbations and random interference, resulting in the inclusion of false defect areas in the detection results. Spatial relationship recognition lacks an associated extension logic for wiring layers, failing to extract the structural coordination relationships between image blocks from the image coordinate system, leading to range deviations or omissions in crack propagation path determination. Image boundary fluctuation processing often employs threshold truncation, failing to dynamically adapt to the optical response characteristics of different blocks, reducing detection adaptability and accuracy. These problems all lead to decreased recognition efficiency in the detection of microcracks, early-stage fractures, and areas with complex optical reflections, limiting its application in high-density wiring chip scenarios. Summary of the Invention
[0005] To address the technical problems existing in the prior art, this invention provides a method for detecting defects in LED chips, comprising the following steps: To achieve the above objectives, the present invention adopts the following technical solution: a method for detecting defects in LED chips, comprising the following steps: S1: Obtain the main wiring region layer in the LED chip image, define the boundary according to the continuity of the direction, locate the pixel pairs with varying wiring spacing, and classify them into image block regions according to their adjacent connection relationships to obtain the crack anomaly image block set. S2: Based on the edge granularity points of the crack anomaly image block set, extend the path along the arrangement direction in the image grid, extract the point series with the same direction as the crack trend, and connect the path segments in the extension order to obtain the crack trend path segment group. S3: Based on the crack path segment group, extract the wiring neighborhood boundaries on both sides of the path, fill in the wiring shape outline between the boundaries, and expand the coverage area outward to obtain the wiring extended shape structure layer. S4: Based on the wiring extension morphological structure layer, obtain the boundary segment at the end of the electrode in the LED chip image, extract the brightness sequence in the tangential direction and compare the mirror difference, screen out the lines of the brightness discontinuous area, and obtain the boundary perturbation contour line set. S5: Based on the path segments of the boundary disturbance contour lines, and referring to the location coverage of the wiring extension structure, the image area covered by the continuous extension area is included in the defect detection range to obtain the crack-type defect identification result data item.
[0006] As a further embodiment of the present invention, the crack anomaly image block set includes wiring direction offset segments, spacing abrupt change regions, and path discontinuity areas; the crack direction path segment group includes a consistent direction path column, continuous edge connection segments, and crack extension main lines; the wiring extension morphological structure layer includes wiring boundary extension frames, wiring internal image blocks, and path extension coverage areas; the boundary disturbance contour line set includes brightness trend jump lines, continuous fluctuation edge segments, and boundary direction break lines; and the crack-type defect identification result data items include the crack coverage image range, defect path layer number, and image defect response area identifier.
[0007] As a further aspect of the present invention, the specific steps of S1 are as follows: S101: Obtain the layer content of the main wiring area in the LED chip image, identify wiring segments with directional grayscale arrangement in the layer, use the wiring arrangement direction as a path extension reference, check the grayscale continuity of the path along the direction, and mark the wiring paths with the same direction according to the area number to obtain a set of continuous wiring paths. S102: Based on the arrangement of paths in the horizontal direction in the set of continuous paths in the wiring direction, monitor the horizontal pixel distribution density between paths, compare the arrangement trend in the current layer, identify the areas where the spacing state and wiring continuity change between paths, and obtain a set of abnormal spacing state path areas. S103: Based on the arrangement relationship between the paths in the abnormal path region of the spacing state, track the extension state of the surrounding paths in the lateral direction, locate the location area where the connection between the paths changes during the extension process, and mark the area as a structural offset segment according to the image coordinates to obtain a crack abnormal image block set.
[0008] As a further aspect of the present invention, the specific steps of S2 are as follows: S201: Based on the edge granularity points in the crack anomaly image block set, extend outward along the horizontal or vertical point column direction in the image grid, and continue in the same direction in the same direction following the connection relationship between consecutive pixels. Mark the path segments that have not shifted direction during the connection process in sequence according to the original image position to obtain a set of path segments with consistent crack direction. S202: Based on each path segment in the region of path segments with consistent crack direction, align the connection relationship between the path segments, and sequentially advance the path segments with continuous position and unchanged direction to the crack trend region, and connect the line edges in the contact area to obtain a group of crack direction extension line segments. S203: Based on the line segment order in the crack direction extension line segment group, connect each line segment according to the extension direction on the image, and linearly splice the path without breaks at the connection positions before and after the extension process to obtain the crack direction path line segment group.
[0009] As a further aspect of the present invention, the specific steps of S3 are as follows: S301: Based on the continuous path segments in the crack path segment group, detect the wiring area boundary lines on both sides of the path, sequentially find the starting point and ending point of the boundary line along the extension direction of the path, and associate the left and right boundaries with the corresponding path segments in the image coordinates to obtain the wiring area boundary correspondence set. S302: Call the left and right boundary paths in the wiring area boundary correspondence set, mark the region pixel blocks between the left and right boundaries in the image range, calculate the path spacing change value between the horizontal pixels in the region, and divide the region whose change value reaches the wiring density offset reference value into the wiring extension area to obtain the region coverage map set within the wiring boundary. S303: Based on the boundary point position of each image block in the area coverage tile set within the wiring boundary, extend a complete border along the edge of the original wiring path, and close the entire wiring image area according to the path edge connection direction to obtain the wiring extended morphological structure layer.
[0010] As a further aspect of the present invention, the formula for calculating the change in path spacing between horizontal pixels within the region is as follows: ; in, This represents the change in path spacing between horizontal pixels within the region. Representing the The lateral path curvature radius of each sampling point Representing the Dynamic density gradient of each sampling point Represents the median baseline wiring density. Represents the pixel resolution scaling factor. Represents the total number of valid sampling points. Represents the stress distribution coefficient along the path. Representative material elongation compensation factor, Represents the factors affecting environmental temperature. This represents the coefficient of thermal expansion of the substrate.
[0011] As a further aspect of the present invention, the specific steps of S4 are as follows: S401: Based on the wiring extension morphological structure layer, obtain the boundary image of the electrode end connection area in the LED chip image, locate multiple pixel paths sequentially at fixed intervals in the edge tangent direction, and use the brightness value in each path as the basic sequence of boundary brightness change to obtain the boundary tangent brightness change path set. S402: Call the paths in the set of brightness change paths of the boundary tangent, compare the brightness values at the corresponding symmetrical positions on each path, calculate the change amplitude between continuous point segments during the brightness change process, locate the path segments where brightness fluctuations are continuously distributed according to the change trend, and obtain the set of segments with strong brightness fluctuations. S403: Based on the continuous regions in the set of strong brightness fluctuation segments, the starting and ending boundaries of the fluctuation segments are extended along the tangent direction at the image edge. The continuous pixels between adjacent fluctuation paths are connected sequentially according to the edge direction to form line segment paths, thereby obtaining a set of boundary disturbance contour lines.
[0012] As a further specific step of the present invention, the formula for calculating the change amplitude between continuous point segments during the brightness change process is as follows: ; in, This represents the range of change between consecutive point segments during a change in brightness. Representing the The average brightness of the left half of the path, Representing the The average brightness of the right half of the path, This represents the distance between sampling points in the left and right halves of the path. Representative region comparison weighting factor, Represents multi-scale superposition coefficients. Representing the The starting brightness value of the m-th sampling interval of the path. Representing the Path number Brightness value at the end of the sampling interval. Representing the Level sampling interval length, Representing the Level-interval dynamic weights, This represents the total number of multi-scale sampling levels.
[0013] As a further aspect of the present invention, the specific steps of S5 are as follows: S501: Based on the path segments of the boundary disturbance contour lines, connect the wiring areas in the wiring extension morphology structure layer in sequence according to the image coordinate direction, and spatially match the extension direction of the boundary path with the layer orientation of the wiring edge to obtain the pairing result set of boundary path and wiring area. S502: Call the boundary path segment in the matching result set of the boundary path and wiring area, continue the boundary path in the image along the direction of the crack path segment, and include the extended area that keeps the direction consistent between the path and the wiring trajectory into the tracking segment to obtain a set of extended areas with consistent path direction. S503: Based on the image coverage range in the set of extended regions with consistent path direction, the pixel distribution between the extended trajectory in the image area is followed, and the continuously covered pixel areas are closed and connected along the edge direction. The corresponding areas correspond to the crack direction and boundary fluctuation characteristics, and the crack-type defect identification result data items are obtained.
[0014] An LED chip defect detection system, comprising: The layer extraction module obtains the layer content of the main wiring area in the LED chip image. In the layer, the boundary trend is judged according to the continuous direction of the wiring grayscale. The grayscale arrangement direction is compared according to the change of path spacing. The pixel pairs showing the change of spacing are divided into a unified area according to the path connection relationship to obtain the crack abnormal image block set. The crack tracking module, based on the edge granularity points within the crack anomaly image block set, advances adjacent path points along the horizontal and vertical directions within the image grid. Points with consistent connection directions continue to the crack trend area according to the image arrangement order. In the edge path, the preceding and following path segments are sequentially connected and sorted according to direction to obtain a crack trend path segment group. The structural extension module, based on the continuous path segments in the crack path segment group, captures the start and end points of the wiring area boundary line along both sides of the path, advances the boundary line in combination with the image coordinates corresponding to the path extension direction, and sequentially closes the wiring image area around both sides of the path to obtain the wiring extension morphology structure layer. The brightness disturbance module, based on the wiring extension morphology structure layer, locates the boundary image area in the electrode end connection area of the LED chip image, arranges pixel paths with fixed spacing in sequence in the boundary tangent direction, reads the brightness value sequence along the path and compares the brightness sequence change trend on the mirror path, tracks the continuous segments of abrupt changes in brightness amplitude and connects the boundary path to obtain the boundary disturbance contour line set. The defect discrimination module, based on the path segments of the boundary disturbance contour lines, compares them with the wiring area in the wiring extension morphology structure layer, continues the boundary path direction according to the direction of the crack direction path line segment group, analyzes the connectivity distribution of the boundary path and wiring edge in the image, and classifies the image patches in the continuous trajectory area into the judgment range according to the coverage position, thus obtaining the crack-type defect identification result data item.
[0015] Compared with the prior art, the advantages and positive effects of the present invention are as follows: In this invention, the crack trend is screened by the path extension direction and connected to form directional line segments, which enhances the coherence of structural extension information. The wiring boundary is simultaneously expanded to cover the area by layer completion, which enhances the accuracy of spatial correspondence discrimination. Boundary brightness detection combined with mirror comparison removes interference and retains symmetrical disturbance areas as the basis for judgment. The path extension trend is spatially matched with the wiring area direction to construct a crack propagation path identification chain, thereby improving the integrity and stability of defect area tracking. Attached Figure Description
[0016] To more clearly illustrate the technical solutions in the embodiments of the present invention, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying 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.
[0017] Figure 1 This is a schematic diagram of the steps of the present invention; Figure 2 This is a system module diagram of the present invention. Detailed Implementation
[0018] The technical solution of the present invention will now be described with reference to the accompanying drawings.
[0019] In embodiments of the present invention, words such as "exemplarily," "for example," etc., are used to indicate that something is an example, illustration, or description. Any embodiment or design described as "exemplary" in the present invention should not be construed as being more preferred or advantageous than other embodiments or designs. Specifically, the use of the word "exemplary" is intended to present the concept in a concrete manner. Furthermore, in embodiments of the present invention, the meaning expressed by "and / or" can be both, or either one.
[0020] In the embodiments of this invention, the terms "image" and "picture" may sometimes be used interchangeably. It should be noted that, without emphasizing the distinction between them, their intended meanings are consistent. Similarly, the terms "of," "corresponding (relevant)," and "corresponding" may sometimes be used interchangeably. It should be noted that, without emphasizing the distinction between them, their intended meanings are consistent.
[0021] In this embodiment of the invention, sometimes a subscript such as W1 may be written in a non-subscript form such as W1. When the difference is not emphasized, the meaning they express is the same.
[0022] To make the technical problems, technical solutions and advantages of the present invention clearer, a detailed description will be given below in conjunction with the accompanying drawings and specific embodiments.
[0023] Please see Figure 1 This invention provides a method for detecting defects in LED chips, comprising the following steps: S1: Obtain the layer content of the main wiring area in the LED chip image, extract the boundary range based on the continuity of the wiring direction in the image, locate the pixel pairs with different wiring spacing, and classify the pixel pairs into a unified area according to the continuity of adjacent paths to obtain the crack anomaly image block set. S2: Based on the edge granularity points in the crack anomaly image block set, extend adjacent paths along the arrangement direction between points in the image grid, incorporate continuous point sequences with consistent directions into the crack trend region, and sequentially connect path segments along the extension direction of the crack edge to obtain a crack trend path segment group. S3: Based on the continuous path segments in the crack path segment group, extract the wiring area boundary along the left and right of the path, connect the area edges between the boundaries, extend the path area outward according to the extension trend and close the wiring area to obtain the wiring extension morphology structure layer. S4: Based on the wiring extension morphological structure layer, extract the boundary image content of the electrode end connection area in the LED chip image, extract the brightness value change sequence according to the boundary tangent direction, compare the brightness difference of the points with the mirror brightness sequence, mark the edge lines where the brightness change shows a discontinuous trend, and obtain the boundary disturbance contour line set. S5: Based on the path segments where the boundary perturbation contour lines are concentrated, and in contrast to the wiring area in the wiring extension morphology structure layer, track the continuous distribution of the two paths along the crack direction path segment group, and classify the image area covered by the continuous extension area into the defect detection range to obtain the crack-type defect identification result data item.
[0024] The crack anomaly image block set includes wiring direction offset segments, spacing abrupt change regions, and path discontinuity areas. The crack direction path segment group includes consistent path columns, continuous edge connection segments, and main crack extension lines. The wiring extension morphological structure layer includes wiring boundary extension boxes, wiring internal image blocks, and path extension coverage areas. The boundary disturbance contour line set includes brightness trend jump lines, continuous fluctuation edge segments, and boundary direction break lines. The crack-type defect identification result data items include the crack coverage image range, defect path layer number, and image defect response area identifier.
[0025] The specific steps of S1 are as follows: S101: Obtain the layer content of the main wiring area in the LED chip image, identify wiring segments with directional grayscale arrangement in the layer, use the wiring arrangement direction as a path extension reference, check the grayscale continuity of the path along the direction, and mark the wiring paths with the same direction according to the area number to obtain a set of continuous wiring paths. First, the complete grayscale layer of the chip image needs to be accessed. Within this layer, regions with wiring characteristics are identified based on the continuous change in pixel grayscale values horizontally or vertically. To achieve this, the grayscale values of each row or column in the image are accumulated to form a preliminary wiring path density map. Then, candidate wiring start blocks are marked in areas with a density higher than the average. For example, in practical operation, if the image resolution is 512×512 pixels, and the average grayscale value of each row in a continuous region is greater than 180 and appears consecutively for more than 20 rows, then this region can be initially marked as a wiring region. Next, for this candidate wiring region, its grayscale arrangement direction is checked. That is, the grayscale value change gradient is calculated separately in the row and column directions within each 10×10 sub-region sliding window. The direction with the smaller gradient is determined. If the gradient change in the horizontal direction is less than that in the vertical direction, the wiring direction of this region is determined to be horizontal; otherwise, it is vertical. Based on this, the continuity of grayscale values of path points in the same direction is judged, i.e., adjacent pixels are set... The grayscale difference threshold is Δg=25. When the grayscale difference between consecutive pixels is less than this value, it is judged as grayscale continuity. The setting of Δg here needs to be selected according to the grayscale fluctuation range of noise in the sample image. For example, if the standard deviation of grayscale fluctuation in the test image is 18, then Δg=25 can be taken as the tolerance value. By performing this grayscale continuity judgment on the continuous paths in the image, continuous grayscale path groups are filtered out. Then, according to the arrangement direction of the continuous paths, all path groups that meet the conditions are numbered. That is, horizontally arranged paths are numbered as P1, P2...Pn, and vertically arranged paths are numbered as Q1, Q2...Qn. The start and end points of each numbered path are used as the basic coordinates of the area to which the path belongs. Then, according to the distribution relationship of the wiring paths in the image coordinates, the consistency of direction between the numbered paths is screened. The judgment criterion is that the angle between the numbered paths does not exceed 15°. Paths with the same direction are grouped into the same direction group. Finally, all paths that meet the continuity, directionality and numbering grouping rules are obtained as the set of continuous wiring direction paths.
[0026] S102: Based on the arrangement of paths in the horizontal direction in the continuous path set of the wiring direction, monitor the horizontal pixel distribution density between paths, compare the arrangement trend in the current layer, identify the areas where the spacing status and wiring continuity between paths change, and obtain the set of path areas with abnormal spacing status. First, all path segments should be numbered horizontally along the horizontal axis of the image, and the horizontal coordinate range of the start and end points of each path should be calculated. Then, a list of relative positions between paths should be created in order of path number. Next, the horizontal interval value of the starting coordinates of any two adjacent paths should be obtained to construct a horizontal spacing sequence. During this process, a baseline value for the spacing between paths can be set. When the spacing between paths is When the deviation exceeds the set tolerance, it is judged as a spacing fluctuation zone. For example, if the image width is 1024 pixels, the set path spacing baseline value... The tolerance is set to ±8 pixels and the initial distance between the starting points of a path and its adjacent paths is 32 pixels. If the distance is 12 pixels, the offset exceeds the tolerance range and should be considered an abnormal path pair. Next, horizontally consecutive path pairs are merged. The merging criterion is that the distance between adjacent paths deviates from the baseline range twice consecutively and in the same direction. For example, if paths P5 and P6, and P6 and P7 continuously widen and shift, then P5 to P7 are considered a group of abnormal path segments and classified into the same region. Then, the path density within the coverage area of each group of path segments is calculated, i.e., the number of paths within a horizontal unit pixel length is counted. If the density is less than 60% of the average path density of the image... If the path spacing changes in a consistent direction, the region is marked as a density shift region. Assuming the average path density in the image is 0.05 paths / pixel, if a region has 0.028 paths / pixel, it meets the screening criteria. During processing, isolated path abrupt change points also need to be excluded. This is done by filtering out point pairs that form an abnormal spacing with only one adjacent path. For example, if P9 and P10 suddenly increase, but the spacing between P8 and P9 is normal, then P9-P10 will not be included in the continuous shift group. Finally, all path combinations that meet the criteria of abnormal horizontal arrangement, continuous path spacing shift, and abnormal density will be marked on the image according to the corresponding position range of the path group, resulting in a set of path regions with abnormal spacing status.
[0027] S103: Based on the arrangement relationship between the paths in the abnormal path region of the spacing state, track the extension state of the surrounding paths in the lateral direction, locate the location area where the connection between the paths changes during the extension process, and mark the area as a structural offset segment according to the image coordinates to obtain the crack abnormal image block set. First, sort each group of paths in lateral pixel coordinate order, and establish a position mapping list between the path index and its corresponding lateral starting coordinate. Then, group each pair of adjacent paths and sequentially read the wiring extension trend in each path's extension direction. Track whether the path spacing shifts further or the path density decreases locally during the extension process according to the lateral pixel change direction of the image. In specific operations, assuming the image resolution is 800×800 pixels, path groups P1 to P10 are a set of abnormal paths. Paths P1 to P3 initially have a spacing of 15 pixels, but from P3 to P4 the spacing abruptly changes to 38 pixels, and subsequently P4 to P6 gradually expands to 45 pixels, and the number of paths in the image decreases from 10 to 6, reflecting a sparse connection in the lateral direction. Then, establish boundary lines with P4, P5, and P6 as key nodes, and set their lateral coordinates as follows: , , Within this horizontal region, the continuity of the wiring extension in the vertical direction is determined based on the pixel value change gradient. If the continuous path has a break or interlacing change in this region, then this region is identified as an image segment where the connection relationship has changed. In addition, the direction of the gray-level gradient change along the Y-axis at the start and end positions of the path is determined. If the gray-level change direction between paths changes from convergence to divergence in the extension direction, or if the pixel value in the overlapping area of adjacent paths drops significantly, it can also be determined that the connection state between the paths has changed. Further, within this changed region, the path index of its left and right boundaries is used as the region index range. The image coordinates corresponding to the path coverage area are extracted and marked as the offset region. For example, the coordinate range between P4 and P6 is x=280 to x=370, y=150 to y=300. Then this rectangular region can be used as a candidate block for crack location. Finally, the extension trajectory of the path group is traced horizontally in the image space. For the regions where the connection mode changes, their corresponding image ranges are marked according to their horizontal coordinate range and vertical continuity to obtain a set of crack anomaly image blocks.
[0028] The specific steps of S2 are as follows: S201: Based on the edge granularity points in the crack anomaly image block set, extend outward along the horizontal or vertical point column direction in the image raster, and continue in the same direction in the connection relationship between consecutive pixels. Mark the path segments that have not shifted direction during the connection process according to the original image position to obtain the crack direction consistent path segment region set. First, it is necessary to locate all pixels with abrupt changes in grayscale value at the edges of crack regions in the image raster. These pixels with significant grayscale gradients are used as the starting set of crack edge granular points. At each granular point, a scanning direction is set: the horizontal scanning direction corresponds to the image row direction, and the vertical scanning direction corresponds to the image column direction. For each granular point, scanning is performed pixel by pixel along the horizontal direction, comparing the grayscale difference Δg between the current point and the next pixel. If the grayscale difference is less than the grayscale continuity threshold... If the two points are connected, then extend the connection direction until the grayscale difference is greater than 1. Or encounter image boundaries, set When the value is 25, if the grayscale value of a certain pixel is 188, and the grayscale value of the next pixel is 175, then Δg is 13, which is less than... If two points are continuous, continue connecting to the next point until a break occurs. The break point is taken as the end point of the path extension. If the length of the continuous grayscale segment within the scanning direction is greater than 5 pixels and the direction does not change abruptly, then the path is recorded as a candidate crack direction path segment. Repeat this process to traverse all granular points, establishing connection path sets in both the horizontal and vertical directions. In each connection path, record the coordinates of the starting and ending points, and calculate the included angle θ based on their arrangement direction in the image. When the difference in included angle between two adjacent paths is less than 15°, their directions are defined to remain consistent. If an angle jump is greater than 30°, the path segment is excluded. As a consistent-direction path, by sorting all path segments in coordinate order and filtering out segments with abrupt angle changes, a set of continuous crack paths with consistent direction can be obtained. Combining the eight crack paths in a certain block in the image example, six of them have an angle variation range of ±10° in the horizontal direction, and the other two are ±45° and ±60° respectively. The first six paths are included in the consistent path segment region, with coordinate positions from x=100 to x=240 and y=320 to y=350. This region is numbered and marked as a path segment region, and finally the region of consistent-direction crack paths is confirmed, resulting in the set of crack direction consistent path segment regions.
[0029] S202: Based on each path segment in the region of path segments with consistent crack direction, align the connection relationship between the path segments, and sequentially advance the path segments with continuous position and unchanged direction to the crack trend region. Connect the line edges in the contact area to obtain the crack direction extension line segment group. First, the start and end pixel coordinates and arrangement direction angle of each path segment need to be extracted. The path segments are then sorted sequentially in the image raster according to their horizontal or vertical directions. A path sequence is constructed by reading the relationship between the path number and its start and end coordinates. Next, the horizontal or vertical spacing between the end and start points of adjacent path segments is compared sequentially to see if it falls within a set continuity threshold. If the difference between the end point of a path and the start point of the subsequent path is no more than 5 pixels horizontally and no more than 3 pixels vertically, and the angle between the two path segments is less than 15 degrees, then the connection is considered established. For example, the end point of path P3 is... The starting point of path P4 is If the horizontal difference is 3 pixels, the vertical difference is 2 pixels, and the directional angle difference is 12 degrees, it meets the connection standard and can be advanced to the same trend area. Based on this judgment, the path segments that meet the conditions are extended and connected sequentially. The continuously connected path groups are linked in sequence to construct continuous crack trend line segments in the image. Each extended line segment uses the pixel points between the original path segments as the connection reference. The coordinates of each point in the line are obtained by advancing sequentially without smoothing in the middle to preserve the original crack trend behavior. If a sudden change in path direction occurs during the connection process, If the coordinate jump or the interrupted area exceeds the set threshold (such as three consecutive broken points), it is considered that the connection is broken and the process is divided into two sets of path segments. In addition, in order to improve the connection accuracy of the edge lines, the pixel values of the path edge points and the adjacent path edge points need to be compared. If the difference in gray value is within 20, the edge connection is performed. For example, if the gray values of the connection points are 165 and 150 respectively, the difference is 15, and the edge connection is determined to be valid. Finally, the continuous advancement, edge docking and sequence integration between crack path segments are completed to obtain the crack direction extension line segment group.
[0030] S203: Based on the line segment order in the crack direction extension line segment group, connect each line segment according to the extension direction on the image, and linearly splice the path without breaks at the connection positions before and after the extension process to obtain the crack direction path line segment group. First, extract the image coordinates of the starting and ending points of each line segment, and record their arrangement direction vector. Number them sequentially according to the left-to-right or right-to-left logic in the image arrangement. Then, perform a continuity judgment on any two adjacent line segments. The continuity judgment criteria include two aspects: positional continuity and directional consistency. Positional continuity requires that the coordinate differences between the end point of the preceding line segment and the starting point of the following line segment in the horizontal and vertical directions do not exceed a set range. The set range can be determined by referring to the average point spacing of the preceding line segment. For example, if the end point of line segment A is (x=100, y=250) and the starting point of line segment B is (x=102, y=251), then the horizontal difference is 2 pixels and the vertical difference is 1 pixel. If the average spacing between any two consecutive points of line segment A is 3 pixels, and the above differences do not exceed the average spacing, then the positional continuity is met. The directional consistency judgment requires that the angle between the directions of line segment A and line segment B is not greater than 10 degrees. Here, the angle can be determined by... The vectors of the first and last points of two line segments are calculated, such as vector a = (x2−x1, y2−y1) and vector b = (x4−x3, y4−y3). The cosine values of the two vectors are calculated, and the angle θ is obtained through inverse trigonometric functions. If θ is between 0 and 10 degrees, it is determined that the directions are consistent and the linear splicing condition is met. Line segment pairs that meet the above two conditions will be identified as contiguous path segments. Linear splicing is performed in the order from the start point to the end point of the line segments. No additional interpolation points are introduced during the splicing process. Instead, the continuous path of the line segments is directly constructed using the connection points. After each successful splicing, the coordinates of the current path end point are updated, and the next line segment is matched with this end point. If the matching fails three times in a row, that is, the distance between the end point positions is greater than the reference range or the direction offset angle is greater than the set angle limit, the current path splicing is ended and a new path recognition sequence is started. Finally, the continuous combination of crack direction line segments is completed in the image coordinates in sequence to obtain the crack direction path line segment group.
[0031] The specific steps for S3 are as follows: S301: Based on the continuous path segments in the crack path segment group, detect the boundary lines of the wiring area on both sides of the path, find the starting point and ending point of the boundary line in sequence along the extension direction of the path, and associate the left and right boundaries with the corresponding path segments in the image coordinates to obtain the wiring area boundary correspondence set. First, each path segment needs to be located horizontally and vertically in the image coordinate system to obtain the extension direction vector of the path and determine its left and right sides. Based on this extension direction, the wiring area range on both sides of the path is established. Each path segment is set as the central axis in the image, and a certain pixel range is extended outwards to the left and right as the boundary detection area. For example, if the path length is 80 pixels, 10 pixels can be extended to the left and right sides for boundary scanning. Within the boundary scanning area, a sliding window method is used to find locations with significant brightness changes as the edge lines of the wiring area. A brightness change threshold of ΔL=30 is set. When the brightness change between two adjacent pixels exceeds this threshold, that point is determined as the boundary start point. The entire path segment edge is scanned from the start point to the end point, and each path is recorded on both the left and right sides. The coordinates of the starting and ending points of the corresponding boundaries of each segment are determined. For example, if the starting point of a path is (150, 200) and the ending point is (230, 200), scanning within 10 pixels to the left of the path yields the boundary starting point (140, 200) and the ending point (140, 210). The starting point of the right boundary is (240, 200) and the ending point is (240, 210), and so on. A set of coordinates corresponding to the left and right boundaries is established for each path segment. Then, each pair of boundary lines is bound to the original path number to form a one-to-one association record between the path segment and the boundary line. The boundary line pair is numbered and organized in the path extension direction, and the range of the pixel segment it covers and the image coordinate position of the corresponding path segment are recorded. Finally, the left and right boundary information corresponding to all path segments in the extension direction is summarized to obtain the set of correspondences of the wiring area boundaries.
[0032] S302: Call the left and right boundary paths in the wiring area boundary correspondence set, mark the region pixel blocks between the left and right boundaries in the image range, calculate the path spacing change value between the horizontal pixels in the region, and divide the region whose change value reaches the wiring density offset reference value into the wiring extension area to obtain the region coverage map set within the wiring boundary. The specific formula for calculating the change in path spacing between horizontal pixels within a region is as follows: ; in, This represents the change in path spacing between horizontal pixels within the region. Representing the The lateral path curvature radius of each sampling point Representing the Dynamic density gradient of each sampling point Represents the median baseline wiring density. Represents the pixel resolution scaling factor. Represents the total number of valid sampling points. Represents the stress distribution coefficient along the path. Representative material elongation compensation factor, Represents the factors affecting environmental temperature. Represents the coefficient of thermal expansion of the substrate; After extracting the pixel density distribution through image grayscale analysis, the gradient value was calculated, and the measured value was 0.85. The median baseline wiring density is set to 0.75 according to design specifications. Determined by the parameters of the image acquisition device, 300 dpi corresponds to 0.085 mm / px; After identifying the effective regions using an image segmentation algorithm, select 50. The stress distribution curve was obtained through material mechanics experiments, and the average value was taken as 0.45. The value was set to 0.6 based on the tensile test data of the wiring material; The production environment temperature is monitored in real time by a temperature sensor; when the temperature is 25℃, the value is taken as 25℃. The parameter was set to 2.5 ppm / ℃ according to the substrate material handbook. Calculate the path curvature and density deviation terms: ; Sum the squared terms and calculate the mean: ; Calculate the standard deviation term: ; Computational environment and materials coupling terms: ; Overall calculation results: ; The results indicate that the lateral path comprehensive distortion eigenvalue When the value exceeds the preset threshold of 0.25, the corresponding area is marked as a wiring extension area. For every 0.1 unit increase in the feature value, the area expands by 3%-5%. The feature value is negatively correlated with the path curvature radius and positively correlated with the temperature influence factor. When the material extension compensation factor... A 10% increase results in a decrease of eigenvalues of 8%-12%.
[0033] S303: Based on the boundary point position of each image block in the area coverage tile set within the wiring boundary, extend a complete border along the edge of the original wiring path, and close the entire wiring image area according to the path edge connection direction to obtain the wiring extended morphological structure layer. First, the coordinates of the edge pixels of the identified blocks within the wiring area need to be scanned block by block in the image. Pixels with significant grayscale jumps on the boundary of each image block are extracted as the start and end points of the boundary. For example, within a block, the start point on the left side of the boundary is (x=120, y=240), and the end point on the right side is (x=180, y=240). Then, the start and end line segments of the block's boundary in the horizontal direction can be established. Simultaneously, the upstream and downstream wiring segments of the block are queried sequentially forward or backward according to the path extension direction. Within these segments, the boundary direction is traced, and line segment connections are established according to the coordinate extension trend of the current segment along the edge direction of the original wiring path. For the boundary end point of adjacent blocks in consecutive segments and the start point of the next block, it is necessary to determine whether the difference between their horizontal and vertical coordinates falls within the connection tolerance range. The tolerance is set between 3 and 6 pixels based on the path extension direction of the previous segment. If the end point of block A... Given (x=180, y=240), the starting point of tile B is (x=183, y=242), with coordinate differences of 3 and 2 respectively. If the tolerance range is met, the connection is valid. During the connection operation, the coordinate points are stored in the border trajectory sequence in pixel order. After each valid connection, the extended coordinate set of the current border is updated. After the extension is completed, the outer edge of the continuous wiring area is obtained. Then, the entire wiring border needs to be closed. The closure condition is that the starting point and the ending point of the border sequence are close in coordinates. The difference between the two in the horizontal and vertical directions is set to no more than 5 pixels as the closure judgment criterion. After successful closure, all tile numbers, edge line coordinate ranges, and start and end path information within the coverage area of the path segment are uniformly summarized into the wiring layer management table. The complete closed layer path area is drawn according to the image coordinates. Finally, a continuous covering wiring edge graphic expression is formed in the image space, resulting in the wiring extended morphological structure layer.
[0034] The specific steps of S4 are as follows: S401: Based on the wiring extension morphological structure layer, obtain the boundary image of the electrode end connection area in the LED chip image, locate multiple pixel paths sequentially at fixed intervals in the edge tangent direction, and use the brightness value in each path as the basic sequence of boundary brightness change to obtain the boundary tangent brightness change path set. First, the geometric region corresponding to the electrode connection area needs to be identified in the image. This region is usually located at the bottom or four corners of the image. The window is set according to the termination point of the wiring end in the layer, and the size is set to 10% × 10% of the original image size. For example, when the image resolution is 512 × 512 pixels, the area scanning window size is about 50 × 50 pixels. The grayscale image is extracted in this region, and its boundary contour is identified. By setting the edge brightness gradient change threshold ΔL to 20, the edge point series with brightness changes from light to dark is captured as the initial boundary trajectory. Then, a tangent direction is established according to the boundary direction, and sampling is performed at fixed intervals on the boundary according to the tangent direction. The sampling interval is set to once every 5 to 8 pixels according to the image resolution, so that the scanning path is expanded along the tangent direction on the entire boundary contour. For example, if the starting point is selected as (100, 60) on the upper boundary, sampling is performed downwards along the tangent direction with a step of 6 pixels. This process is repeated 10 times, generating path segments P1 to P10, each 15 pixels long. Each path is determined by its starting coordinates, direction vector, and step count. Then, the grayscale values of all pixels traversed by the path are read sequentially along each path, and a brightness base sequence is constructed based on this sequence. The brightness base sequence is an array of grayscale values for each pixel in the current path, which describes the transition between light and dark along the path direction. If the initial brightness of a path is 180, and the continuously sampled values are 176, 168, 155, 144, 138, and 131, then this sequence indicates that the brightness in the path direction is steadily decreasing, belonging to a normal edge transition path. This process is repeated to set path sampling lines for all directions of the boundary contour in the image. The grayscale array of each line constitutes the boundary brightness change curve of the path. Finally, the complete sequence group of all sampled paths is obtained, resulting in the boundary tangent brightness change path set.
[0035] S402: Call the paths in the set of brightness change paths of the boundary tangent, compare the brightness values at the corresponding symmetrical positions on each path, calculate the change amplitude between continuous point segments during the brightness change process, locate the path segments where brightness fluctuations are continuously distributed according to the change trend, and obtain the set of segments with strong brightness fluctuations. The specific formula for calculating the variation amplitude between consecutive point segments during the brightness change process is as follows: ; in, This represents the range of change between consecutive point segments during a change in brightness. Representing the The average brightness of the left half of the path, Representing the The average brightness of the right half of the path, This represents the distance between sampling points in the left and right halves of the path. Representative region comparison weighting factor, Represents multi-scale superposition coefficients. Representing the Path number The starting brightness value of the sampling interval. Representing the Path number Brightness value at the end of the sampling interval. Representing the Level sampling interval length, Representing the Level-interval dynamic weights, Represents the total number of multi-scale sampling levels; Assumption: Between 0.4 and 0.6, Between 0.3 and 0.5; The brightness values of 10 sampling points in the left half of the region were measured by CCD sensor at a wavelength of 500nm and the arithmetic mean was taken. The measured data are as follows: Pixel; ; The level interval is divided according to 20% of the total path length. Pixels , ; Regional comparison item calculation: ; Multi-scale stacking term calculation (taking m=1 as an example): ; when At that time, actual measurement , , Pixels ; The calculation yields: ; when At that time, the actual measurement , , Pixels ; The calculation yields: ; Total value of the summation terms: ; Composite parameter calculation: ; This result indicates that This indicates that path 1 is in The composite parameter of the brightness gradient of the point segment, when When the value exceeds the preset threshold of 1.2, the section is determined to be a section with strong fluctuations in brightness. The calculation of the square root of 2.3079 verifies the nonlinear characteristics of the brightness gradient in spatial distribution. The final result of 1.519 is consistent with the brightness transition phenomenon actually measured in the path section.
[0036] S403: Based on the continuous region in the set of strong brightness fluctuation segments, the start and end boundaries of the fluctuation segments are continued along the tangent direction at the image edge. The continuous pixels between adjacent fluctuation paths are connected sequentially according to the edge direction to form line segment paths, thus obtaining the boundary perturbation contour line set. First, extract the coordinates of the start and end points of each strongly fluctuating path segment on the image boundary. These coordinates are usually derived from the sequence marked in the brightness change path set, and their arrangement order on the image edge is indicated by a number, such as the number of a continuous path segment. For The starting coordinates are (140, 220), (145, 221), (150, 222), (155, 223), and (160, 224), respectively, and the ending coordinates are (140, 230), (145, 231), (150, 232), (155, 233), and (160, 234), respectively. This indicates that the path segment is continuously arranged in the tangent direction of the boundary. In the edge of the image, its trajectory can be regarded as a set of adjacent vertical line segments. Then, starting from the beginning of each path segment, the system advances along the tangent direction of the path, i.e., the direction vector set during brightness change detection, tracking the continuity between adjacent path segments with a fixed pixel step size. The judgment criterion is whether the horizontal or vertical difference between the starting points of adjacent paths is within a set range. If the difference is within 3 pixels and the angle between the direction vectors of the preceding and following paths is less than 10 degrees, the path is considered continuous. At this point, the two path segments are connected by the shortest distance pixel line segment. No interpolation is performed during the connection process; instead, the line segment is directly drawn according to the coordinates from the end point of the path to the next starting point. If there is a path interruption or the direction deviation exceeds the above threshold, the system will continue to investigate. If the value is not specified, a new line segment connection sequence is established and not merged into the current group. In addition, to prevent interference from false edge fluctuation intervals, the brightness change trend of the pixels contained in each connection segment should be checked again to determine whether its brightness change meets the characteristics of continuous decrease or increase. If a brightness reversal phenomenon or a narrow area oscillation with a fluctuation value of less than 5 occurs in the middle, the connection segment is removed or segmented. Finally, all path segments with continuous fluctuation characteristics and complete connection in the image edge are organized into a line segment set and connected sequentially according to the starting path number to form an edge disturbance line image arranged according to the tangent direction, thus obtaining the boundary disturbance contour line set.
[0037] The specific steps of S5 are as follows: S501: Based on the path segments of the boundary perturbation contour lines, the wiring regions in the wiring extension morphology structure layer are sequentially connected according to the image coordinate direction. The extension direction of the boundary path is spatially matched with the layer orientation of the wiring edge to obtain the pairing result set of boundary path and wiring region. First, the start and end positions of each path segment are sequentially read from the image coordinates. The path direction vector is then labeled with its direction, defining the horizontal direction as the X-axis and the vertical direction as the Y-axis in the image. The path extension direction is determined based on the coordinate difference between the two endpoints of the path. For example, if the path starts at... The destination is If the path extends in the lower right direction, its direction vector V is calculated as (15, 5). Then, in the wiring extension morphology structure layer, the wiring regions within the layer edge range are searched, and the boundary coordinate box of each region is extracted. The center position and direction vector of each region are marked in space. If the boundary center point of a wiring region is (x=158, y=228), and the wiring direction of the boundary is horizontal to the right, then the wiring region has a spatial direction similar to the disturbance path. Next, taking the path segment as the center, a certain tolerance range is set, such as the neighboring region within 30 pixels, as the wiring matching candidate set. The relative position and direction of the center point of the matching candidate region of each path segment are judged. If the angle between the path direction and the wiring region direction is less than 15 degrees, and the two have the same spatial extension trend direction, then it is determined that the path segment and the current wiring region have a directional consistency pairing condition. The edge contact points of the two are further compared in the image coordinates to confirm whether there are intersecting or overlapping pixel segments at their boundaries. If there are at least 5 consecutive overlapping pixel positions or the difference between adjacent pixel values is less than the set brightness tolerance ΔL=10, it is considered that the path segment and the wiring edge have established a spatial pairing relationship. The pairing of all path segments and wiring areas is numbered and recorded. The coordinate relationship, direction relationship and contact pixel information of each pair of path segments and paired wiring areas are integrated into a pairing comparison table, and finally the pairing result set of boundary path and wiring area is obtained.
[0038] S502: Call the boundary path segment in the result set of the boundary path and wiring area pairing, continue the boundary path in the image along the direction of the crack path segment, and include the extended area that keeps the direction consistent between the path and the wiring trajectory into the tracking segment to obtain a set of extended areas with consistent path direction. First, the direction vector of the boundary path and the boundary direction vector of the corresponding wiring area are extracted from each paired unit. By determining whether the angle between the two vectors is less than 15 degrees, it is confirmed that the path meets the direction matching condition. Then, starting from the end point of the current boundary path segment, the path is advanced along the crack direction path segment in the image coordinates. During the advancement, the original path segment is used as the starting point, and the path segment is extended at fixed intervals. The direction of the path extension is referenced to the direction of the crack direction path segment. Each advancement generates a candidate extension segment with a length of 10 pixels, and the coordinate coverage of the current segment in the image is recorded. Then, it is checked whether the area crossed by the current extension segment is still within the wiring boundary range. Spatial intersection judgment is performed by calling the marked wiring boundary area in the wiring extension morphology structure layer. If the number of overlapping coordinate points between the coverage coordinate range of the current extension segment and the boundary of the wiring area in the wiring layer is not less than 80% of the path length, the current extension segment is considered to meet the trajectory connectivity condition and is included in the path extension sequence. During the extension process, each newly generated path segment must undergo directional continuity verification with the previous segment. If the path direction offset angle exceeds the set tolerance range of 20 degrees, the extension will not continue in that direction, and a new path will be started instead. Throughout the path extension process, the brightness changes of the path segments must be monitored simultaneously to determine whether the path is on a recognizable boundary. The brightness change trend must remain stable, either decreasing or increasing, and there should be no oscillations exceeding 5 gray levels. Otherwise, the segment is considered a boundary discontinuity area and is skipped and not included in the path set. By processing all boundary path segments in this way, a set of extended path segments consistent with the wiring boundary direction is finally constructed in the image space. Each segment records its start and end coordinates, path direction, coverage area, and paired wiring number, resulting in a set of extended regions with consistent path direction.
[0039] S503: Based on the image coverage range in the set of extended regions with consistent path direction, the pixel distribution between the extended trajectory in the image area is followed, and the continuously covered pixel areas are closed and connected along the edge direction. The corresponding areas correspond to the crack direction and boundary fluctuation characteristics, and the crack-type defect identification result data items are obtained. First, taking each extended path segment as the center, extract all pixels within the covered image area and establish a coordinate sequence. Track the connection directions between pixels. If the brightness difference between two consecutive pixels in a certain direction is no more than three gray levels, the connection in that direction is considered sustainable, and the pixel trajectory continues to expand outward. When three or more branch paths appear during the expansion process, the extension length of each branch is compared, and the path with the longest extension length is selected as the main connection direction. Its path number is also retained for subsequent path merging. After forming several main extended paths, traverse the adjacent pixels of each path endpoint on the image boundary to determine if it has a directional proximity relationship with other main paths. If the angle between the endpoint direction vectors is less than 20 degrees, the path segment is considered to belong to the same closed path candidate group, and the path closure process continues. Based on this, using edge pixels as a reference, the boundary connection relationships between pixels along the path are sequentially organized. Continuous path segments with unbroken connections are identified, and their outer edge points are stitched together sequentially using image coordinates. When the coordinates of the two ends of a closed path differ by no more than 5 pixels, the path connection is closed, and the closed segment is retained as the crack response area contour. Subsequently, the direction vectors of the crack path segment group and the boundary disturbance contour lines are paired and verified with the overall edge contour direction of the closed segment. If the angle difference between the two direction vectors does not exceed 25 degrees and the overlap rate between the path centerline and the disturbance lines exceeds 65% of the total length of the line segments within the area, then the closed image area is confirmed to have crack characteristics. Pixels within the area are identified in reverse according to the path number, and the image coordinates and path extension length are recorded, ultimately yielding the crack-type defect identification result data item.
[0040] Please see Figure 2 An LED chip defect detection system, comprising: The layer extraction module obtains the layer content of the main wiring area in the LED chip image. In the layer, the boundary trend is judged according to the continuous direction of the wiring grayscale. The grayscale arrangement direction is compared according to the change of path spacing. The pixel pairs showing the change of spacing are divided into a unified area according to the path connection relationship to obtain the crack abnormal image block set. The crack tracking module is based on the edge granularity points in the crack anomaly image block set. It advances adjacent path points along the horizontal and vertical directions in the image grid. The point series with the same connection direction continues to the crack trend area according to the image arrangement order. The preceding and following path segments are connected in sequence in the edge path and sorted according to the direction to obtain the crack trend path segment group. The structural extension module is based on the continuous path segments in the crack path segment group. It captures the start and end points of the wiring area boundary line along both sides of the path, and advances the boundary line by combining the image coordinates corresponding to the path extension direction. It then closes the wiring image area around the edges of both sides of the path in sequence to obtain the wiring extension morphology structure layer. The brightness disturbance module is based on the wiring extension morphological structure layer. It locates the boundary image area in the electrode end connection area of the LED chip image, and arranges pixel paths with fixed spacing in sequence in the boundary tangent direction. It reads the brightness value sequence along the path and compares the brightness sequence change trend on the mirror path. It tracks the continuous segments with abrupt changes in brightness amplitude and connects the boundary path to obtain the boundary disturbance contour line set. The defect discrimination module is based on the path segments of the boundary disturbance contour lines. It compares the wiring area in the wiring extension morphology structure layer, continues the boundary path direction according to the direction of the crack direction path line segment group, analyzes the connectivity distribution of the boundary path and wiring edge in the image, and classifies the image area in the continuous trajectory area into the judgment range according to the coverage position to obtain the crack-type defect identification result data item.
[0041] The above description is merely a specific embodiment of the present invention, but the scope of protection of the present invention is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the technical scope disclosed in the present invention should be included within the scope of protection of the present invention. Therefore, the scope of protection of the present invention should be determined by the scope of the claims.
Claims
1. A method for detecting defects in LED chips, characterized in that, Includes the following steps: S1: Obtain the main wiring region layer in the LED chip image, define the boundary according to the continuity of the direction, locate the pixel pairs with varying wiring spacing, and classify them into image block regions according to their adjacent connection relationships to obtain the crack anomaly image block set. S2: Based on the edge granularity points of the crack anomaly image block set, extend the path along the arrangement direction in the image grid, extract the point series with the same direction as the crack trend, and connect the path segments in the extension order to obtain the crack trend path segment group. S3: Based on the crack path segment group, extract the wiring neighborhood boundaries on both sides of the path, fill in the wiring shape outline between the boundaries, and expand the coverage area outward to obtain the wiring extended shape structure layer. S4: Based on the wiring extension morphological structure layer, obtain the boundary segment at the end of the electrode in the LED chip image, extract the brightness sequence in the tangential direction and compare the mirror difference, screen out the lines of the brightness discontinuous area, and obtain the boundary perturbation contour line set. S5: Based on the path segments of the boundary disturbance contour lines, and referring to the location coverage of the wiring extension structure, the image area covered by the continuous extension area is included in the defect detection range to obtain the crack-type defect identification result data item.
2. The LED chip defect detection method according to claim 1, characterized in that, The set of crack-related image blocks includes wiring direction offset segments, spacing abrupt change regions, and path discontinuity areas. The set of crack direction path segments includes a consistent path column, continuous edge connection segments, and main crack extension lines. The wiring extension morphological structure layer includes wiring boundary extension frames, wiring internal image blocks, and path extension coverage areas. The set of boundary disturbance contour lines includes brightness trend jump lines, continuous fluctuation edge segments, and boundary direction break lines. The data items of the crack-type defect identification result include the crack coverage image range, defect path layer number, and image defect response area identifier.
3. The LED chip defect detection method according to claim 1, characterized in that, The specific steps of S1 are as follows: S101: Obtain the layer content of the main wiring area in the LED chip image, identify wiring segments with directional grayscale arrangement in the layer, use the wiring arrangement direction as a path extension reference, check the grayscale continuity of the path along the direction, and mark the wiring paths with the same direction according to the area number to obtain a set of continuous wiring paths. S102: Based on the arrangement of paths in the horizontal direction in the set of continuous paths in the wiring direction, monitor the horizontal pixel distribution density between paths, compare the arrangement trend in the current layer, identify the areas where the spacing state and wiring continuity change between paths, and obtain a set of abnormal spacing state path areas. S103: Based on the arrangement relationship between the paths in the abnormal path region of the spacing state, track the extension state of the surrounding paths in the lateral direction, locate the location area where the connection between the paths changes during the extension process, and mark the area as a structural offset segment according to the image coordinates to obtain a crack abnormal image block set.
4. The LED chip defect detection method according to claim 1, characterized in that, The specific steps of S2 are as follows: S201: Based on the edge granularity points in the crack anomaly image block set, extend outward along the horizontal or vertical point column direction in the image grid, and continue in the same direction in the same direction following the connection relationship between consecutive pixels. Mark the path segments that have not shifted direction during the connection process in sequence according to the original image position to obtain a set of path segments with consistent crack direction. S202: Based on each path segment in the region of path segments with consistent crack direction, align the connection relationship between the path segments, and sequentially advance the path segments with continuous position and unchanged direction to the crack trend region, and connect the line edges in the contact area to obtain a group of crack direction extension line segments. S203: Based on the line segment order in the crack direction extension line segment group, connect each line segment according to the extension direction on the image, and linearly splice the path without breaks at the connection positions before and after the extension process to obtain the crack direction path line segment group.
5. The LED chip defect detection method according to claim 1, characterized in that, The specific steps for S3 are as follows: S301: Based on the continuous path segments in the crack path segment group, detect the wiring area boundary lines on both sides of the path, sequentially find the starting point and ending point of the boundary line along the extension direction of the path, and associate the left and right boundaries with the corresponding path segments in the image coordinates to obtain the wiring area boundary correspondence set. S302: Call the left and right boundary paths in the wiring area boundary correspondence set, mark the region pixel blocks between the left and right boundaries in the image range, calculate the path spacing change value between the horizontal pixels in the region, and divide the region whose change value reaches the wiring density offset reference value into the wiring extension area to obtain the region coverage map set within the wiring boundary. S303: Based on the boundary point position of each image block in the area coverage tile set within the wiring boundary, extend a complete border along the edge of the original wiring path, and close the entire wiring image area according to the path edge connection direction to obtain the wiring extended morphological structure layer.
6. The LED chip defect detection method according to claim 5, characterized in that, The specific formula for calculating the change in path spacing between horizontal pixels within the region is as follows: ; in, This represents the change in path spacing between horizontal pixels within the region. Representing the The lateral path curvature radius of each sampling point Representing the Dynamic density gradient of each sampling point Represents the median baseline wiring density. Represents the pixel resolution scaling factor. Represents the total number of valid sampling points. Represents the stress distribution coefficient along the path. Representative material elongation compensation factor, Represents the factors affecting environmental temperature. This represents the coefficient of thermal expansion of the substrate.
7. The LED chip defect detection method according to claim 1, characterized in that, The specific steps of S4 are as follows: S401: Based on the wiring extension morphological structure layer, obtain the boundary image of the electrode end connection area in the LED chip image, locate multiple pixel paths sequentially at fixed intervals in the edge tangent direction, and use the brightness value in each path as the basic sequence of boundary brightness change to obtain the boundary tangent brightness change path set. S402: Call the paths in the set of brightness change paths of the boundary tangent, compare the brightness values at the corresponding symmetrical positions on each path, calculate the change amplitude between continuous point segments during the brightness change process, locate the path segments where brightness fluctuations are continuously distributed according to the change trend, and obtain the set of segments with strong brightness fluctuations. S403: Based on the continuous regions in the set of strong brightness fluctuation segments, the starting and ending boundaries of the fluctuation segments are extended along the tangent direction at the image edge. The continuous pixels between adjacent fluctuation paths are connected sequentially according to the edge direction to form line segment paths, thereby obtaining a set of boundary disturbance contour lines.
8. The LED chip defect detection method according to claim 7, characterized in that, The formula for calculating the variation amplitude between consecutive point segments during the brightness change process is as follows: ; in, This represents the range of change between consecutive point segments during a change in brightness. Representing the The average brightness of the left half of the path, Representing the The average brightness of the right half of the path, This represents the distance between sampling points in the left and right halves of the path. Representative region comparison weighting factor, Represents multi-scale superposition coefficients. Representing the The starting brightness value of the m-th sampling interval of the path. Representing the The brightness value at the end of the m-th sampling interval of the path. This represents the sampling interval length of the m-th level. This represents the dynamic weight of the m-th interval. This represents the total number of multi-scale sampling levels.
9. The LED chip defect detection method according to claim 1, characterized in that, The specific steps of S5 are as follows: S501: Based on the path segments of the boundary disturbance contour lines, connect the wiring areas in the wiring extension morphology structure layer in sequence according to the image coordinate direction, and spatially match the extension direction of the boundary path with the layer orientation of the wiring edge to obtain the pairing result set of boundary path and wiring area. S502: Call the boundary path segment in the matching result set of the boundary path and wiring area, continue the boundary path in the image along the direction of the crack path segment, and include the extended area that keeps the direction consistent between the path and the wiring trajectory into the tracking segment to obtain a set of extended areas with consistent path direction. S503: Based on the image coverage range in the set of extended regions with consistent path direction, the pixel distribution between the extended trajectory in the image area is followed, and the continuously covered pixel areas are closed and connected along the edge direction. The corresponding areas correspond to the crack direction and boundary fluctuation characteristics, and the crack-type defect identification result data items are obtained.
10. An LED chip defect detection system, characterized in that, The system is used to implement the LED chip defect detection method according to any one of claims 1-9, the system comprising: The layer extraction module obtains the layer content of the main wiring area in the LED chip image. In the layer, the boundary trend is judged according to the continuous direction of the wiring grayscale. The grayscale arrangement direction is compared according to the change of path spacing. The pixel pairs showing the change of spacing are divided into a unified area according to the path connection relationship to obtain the crack abnormal image block set. The crack tracking module, based on the edge granularity points within the crack anomaly image block set, advances adjacent path points along the horizontal and vertical directions within the image grid. Points with consistent connection directions continue to the crack trend area according to the image arrangement order. In the edge path, the preceding and following path segments are sequentially connected and sorted according to direction to obtain a crack trend path segment group. The structural extension module, based on the continuous path segments in the crack path segment group, captures the start and end points of the wiring area boundary line along both sides of the path, advances the boundary line in combination with the image coordinates corresponding to the path extension direction, and sequentially closes the wiring image area around both sides of the path to obtain the wiring extension morphology structure layer. The brightness disturbance module, based on the wiring extension morphology structure layer, locates the boundary image area in the electrode end connection area of the LED chip image, arranges pixel paths with fixed spacing in sequence in the boundary tangent direction, reads the brightness value sequence along the path and compares the brightness sequence change trend on the mirror path, tracks the continuous segments of abrupt changes in brightness amplitude and connects the boundary path to obtain the boundary disturbance contour line set. The defect discrimination module, based on the path segments of the boundary disturbance contour lines, compares them with the wiring area in the wiring extension morphology structure layer, continues the boundary path direction according to the direction of the crack direction path line segment group, analyzes the connectivity distribution of the boundary path and wiring edge in the image, and classifies the image patches in the continuous trajectory area into the judgment range according to the coverage position, thus obtaining the crack-type defect identification result data item.
Citation Information
Cited By
Chip nondestructive testing system based on embedded current scanning
CN121500073A