A FCOB circuit board defect detection method and system
By analyzing the gray distribution and marginal characteristics of pixel points in the grayscale image of the FCOB line load, determine the suspected pixel dot and fit the curved curve to solve the problem of low defect detection in the existing technology, realize Higher detection accuracy and reliability.
Patent Information
- Application Number
- CN202410787562.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-06-18
- Publication Date
- 2025-01-28
- Estimated Expiration
- 2044-06-18
AI Technical Summary
The prior art has a low accuracy in extracting the waist-reducing defect area based on the grayscale value in the grayscale image of the FCOB line carrier plate, resulting in inaccurate defect detection results.
By obtaining the grayscale image of the FCOB line carrier board, determine the line area based on the gray distribution of pixels, obtain the edge line of the line area, analyze the edge of the edge of the edge pixels and the effect of gray. Pixels and screen the waist -shrinking area curve through the fit curve, and finally determine the defective area.
Improve the accuracy of the FCOB line carrier board defect detection, reduce the interference of the reflective area and line design on the carrier board, and ensure the reliability of the defect detection results.
Smart Images

Figure CN118674703B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of image recognition, and in particular to a method and system for detecting defects of an FCOB circuit substrate. Background Art
[0002] In the electronics manufacturing industry, FCOB circuit boards are key electronic component carriers, and their quality is directly related to the performance and stability of the entire electronic equipment. Since this type of board has densely arranged lines and few holes, the developer is not easy to drain out during dry film development, and oily substances are easily attached to the edge of the circuit, resulting in unclean development. After electrolithography, waist shrinkage will occur, so waist shrinkage defects are a common quality problem in FCOB circuit boards.
[0003] Since the waist shrinkage area is caused by the adhesion of oily substances, the grayscale performance of the waist shrinkage area will be significantly different from that of the normal area. Therefore, when the prior art detects waist shrinkage defects on the FCOB circuit substrate, the waist shrinkage defect area is usually extracted based on the grayscale value. However, since the circuit itself may be designed to be curved, or there may be a reflective area in the circuit board, the grayscale performance of the reflective area may also be different from that of the normal area. Therefore, the accuracy of extracting the waist shrinkage defect area from the grayscale image of the FCOB circuit substrate based only on the grayscale information is low, which will cause the problem of low accuracy of the defect detection result. Summary of the invention
[0004] In order to solve the technical problem that the accuracy of extracting the waist-shrink defect area in the grayscale image of the FCOB circuit substrate based on grayscale information is low, which will lead to low accuracy of the defect detection result, the purpose of the present invention is to provide a FCOB circuit substrate defect detection method and system, and the technical solution adopted is as follows:
[0005] Get the grayscale image of the FCOB circuit carrier board;
[0006] In the grayscale image, based on the grayscale distribution of pixels, a line area is determined;
[0007] For any line area, the edge line of the line area is obtained; based on the positional relationship between the edge pixels in the line area, the edge shrinkage tendency of each edge pixel is determined; within the preset neighborhood corresponding to each edge pixel in the line area, the gray shrinkage influence of each edge pixel is determined based on the grayscale distribution characteristics of the pixel; the suspected waist shrinkage pixel is determined by combining the edge shrinkage tendency and the gray shrinkage influence between the edge pixels on each edge line;
[0008] In each circuit area, an arc curve obtained by fitting adjacent suspected waist-shrinking pixel points is obtained; based on the shape similarity and position relationship between the arc curves in different circuit areas, the waist-shrinking area curve is screened out from all the arc curves; in the grayscale image, the defective area of the FCOB circuit carrier is determined based on the position of the waist-shrinking area curve.
[0009] Furthermore, the method for obtaining the line area includes:
[0010] In the grayscale image, connected domain analysis is performed to obtain all connected domains;
[0011] In any connected domain, if the ratio of the number of pixels having grayscale values greater than a preset grayscale threshold to the total number of pixels is greater than a preset ratio, the connected domain is determined to be a line region.
[0012] Furthermore, the method for obtaining the edge shrinkage tendency includes:
[0013] In any line area, select any edge line as the line to be tested;
[0014] The minimum distance between each edge pixel point on the line to be tested and all edge pixel points on other edge lines is obtained as a distance factor; the distance factors of all edge pixel points on the line to be tested are averaged to obtain the distance parameter corresponding to the line to be tested;
[0015] Based on the difference between the distance factor of each edge pixel point on the line to be tested and the distance parameters corresponding to all edge lines in the line area, the edge shrinkage tendency of each edge pixel point on the line to be tested is determined.
[0016] Furthermore, the method for obtaining the gray shrinkage effect includes:
[0017] Calculate the mean grayscale value of all edge pixels on each edge line;
[0018] In the preset neighborhood corresponding to each edge pixel point, the number of pixel points whose grayscale values are greater than the grayscale value mean of the corresponding edge line is counted as the quantity factor of each edge pixel point;
[0019] On each edge line, the difference between the quantitative factor of each edge pixel and the mean quantitative factor of all edge pixels on the edge line and the quantitative factor of each edge pixel are fused to determine the gray shrinkage effect of each edge pixel.
[0020] Furthermore, the method for obtaining the suspected waist-shrinking pixel point includes:
[0021] For any line area, on each edge line of the line area, a first shrinkage probability of each edge pixel is obtained according to the proximity between the edge shrinkage tendency of each edge pixel and the edge shrinkage tendencies of all edge pixels on the corresponding edge line; a second shrinkage probability of each edge pixel is determined based on the difference between the gray shrinkage effects of each edge pixel and the nearest preset number of edge pixels;
[0022] Combining the first waist shrinkage probability and the second waist shrinkage probability of each edge pixel point to obtain a waist shrinkage degree value of each edge pixel point, and both the first waist shrinkage probability and the second waist shrinkage probability are positively correlated with the waist shrinkage degree value;
[0023] Based on the waist shrinkage degree values of all edge pixels, suspected waist shrinkage pixels are screened out from all edge pixels.
[0024] Furthermore, the method for obtaining the waist shrinkage area curve includes:
[0025] On each arc curve, obtain the normal corresponding to each pixel point, and obtain the intersection point of the normals corresponding to all the pixels. Among all the intersection points, take the intersection point with the largest number of normal intersections as the reference point, take the reference point as the center of the circle, and the average distance between all the pixels on the arc curve and the reference point as the radius, and obtain the circular area corresponding to each arc curve;
[0026] In different line areas, similar arc curve pairs are determined based on the distances between the arc curves;
[0027] The distance between the reference points of the two arc curves in each similar arc curve pair is taken as the first factor; the distance between the centroids of the two arc curves in each similar arc curve pair is taken as the second factor; based on the positional relationship between the circular areas corresponding to the two arc curves in each similar arc curve pair, the third factor is determined;
[0028] According to the first factor, the second factor and the third factor between the two arc curves in each pair of similar arc curves, the waist shrinkage characteristic values of the two arc curves are obtained, and the first factor and the second factor both change in the opposite direction to the waist shrinkage characteristic value, and the third factor changes in the same direction as the waist shrinkage characteristic value;
[0029] The waist shrinkage region curves are screened out from all the arc curves based on the waist shrinkage characteristic values of all the arc curves.
[0030] Further, in different line areas, determining similar arc curve pairs based on distances between arc curves includes:
[0031] For any arc curve in any line area, the distance between the center of gravity of the arc curve and the center of gravity of each arc curve in other line areas is calculated as a judgment factor, and the arc curve and the arc curve corresponding to the minimum judgment factor form the similar arc curve pair.
[0032] Furthermore, the method for obtaining the third factor includes:
[0033] For any pair of similar arc curves, the third factor is determined based on the proportion of the area of the intersection of the two circular areas corresponding to the similar arc curve pair in the sum of the areas of the two circular areas.
[0034] Furthermore, in the grayscale image, based on the position of the waist-shrinking area curve, determining the defective area of the FCOB circuit substrate includes:
[0035] In the grayscale image, the minimum circumscribed rectangle of each waisted area curve is determined to obtain the defective area of the FCOB circuit carrier board.
[0036] The present invention also proposes a FCOB circuit board defect detection system, the system comprising:
[0037] A memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the steps of any one of the methods can be implemented when the processor executes the computer program.
[0038] The present invention has the following beneficial effects:
[0039] The present invention first obtains the grayscale image of the FCOB circuit carrier, reduces the interference of color information in the image, and preliminarily determines the circuit area in the grayscale image based on the grayscale distribution information of the pixel points, so as to provide the regional range for the subsequent analysis process. In view of the presence of the potion, the original relatively consistent edge width of the circuit will cause a sudden change, thereby causing the waist shrinkage phenomenon. Therefore, the edge shrinkage tendency of each edge pixel point can be determined based on the positional relationship between the edge pixels in the circuit area, so as to judge whether the position of each edge pixel point has changed. Further, because the potion can make the edge area of the circuit brighter, which is reflected in the grayscale information, that is, the grayscale value of the edge area will be larger, the grayscale distribution characteristics of the edge pixels in the circuit area within the preset neighborhood can be combined to determine the grayscale shrinkage influence of each edge pixel point, so as to evaluate the grayscale information of the area where each pixel point is located. At this point, the edge shrinkage tendency and grayscale shrinkage influence of each edge pixel point can be combined to screen out the suspected waist shrinkage pixels from all edge pixels. Because the bending of the circuit and the metal reflection on the circuit board will also cause the edge of the circuit area to show a performance that is relatively consistent with the waist shrinking phenomenon, it is necessary to further judge the suspected waist shrinking pixel points. Since the wiring of the FCOB circuit board is relatively dense, the waist shrinking phenomenon between adjacent circuit areas may be caused by the same oily substance droplets. Then the arc curves formed by the suspected waist shrinking pixel points between adjacent circuit areas will have relatively similar characteristics in shape. Therefore, based on the shape similarity and position relationship between the arc curves of different circuit areas, the waist shrinking area curve can be accurately screened out from all the arc curves to avoid interference from the reflective area on the circuit board and the bending phenomenon of the circuit design. At this time, the waist shrinking area curve combines the position between the pixels, the grayscale and the shape similarity of the arc curve formed by the pixels, so the position of the waist shrinking area curve extracted in the grayscale image can accurately represent the waist shrinking defect area of the FCOB circuit board. BRIEF DESCRIPTION OF THE DRAWINGS
[0040] In order to more clearly illustrate the technical solutions and advantages in the embodiments of the present invention or the prior art, the drawings required for use in the embodiments or the prior art descriptions are briefly introduced below. 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 creative work.
[0041] Figure 1 A method flow chart of a defect detection method for an FCOB circuit substrate provided by an embodiment of the present invention;
[0042] Figure 2 A schematic diagram of an FCOB circuit carrier image acquisition scenario provided by an embodiment of the present invention;
[0043] Figure 3 A local grayscale image of a FCOB circuit carrier provided by an embodiment of the present invention;
[0044] Figure 4 A local binary image of a FCOB circuit carrier provided by an embodiment of the present invention;
[0045] Figure 5 A method flow chart of a method for obtaining suspected waist-shrinking pixel points provided by an embodiment of the present invention;
[0046] Figure 6 A method flow chart of a method for obtaining a waist shrinkage area curve provided by an embodiment of the present invention;
[0047] Figure 7 A system block diagram of a FCOB circuit substrate defect detection system provided by an embodiment of the present invention;
[0048] Figure 8 A schematic diagram of the system structure of a FCOB circuit substrate defect detection system provided by an embodiment of the present invention;
[0049] Fig. 9 A schematic diagram of a computer-readable storage medium provided for one embodiment of the present invention. DETAILED DESCRIPTION
[0050] In order to further explain the technical means and effects adopted by the present invention to achieve the predetermined invention purpose, the following is a detailed description of a FCOB circuit substrate defect detection method and system proposed by the present invention, its specific implementation, structure, features and effects, in conjunction with the accompanying drawings and preferred embodiments. In the following description, different "one embodiment" or "another embodiment" does not necessarily refer to the same embodiment. In addition, specific features, structures or characteristics in one or more embodiments may be combined in any suitable form.
[0051] 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.
[0052] The specific scheme of a FCOB circuit substrate defect detection method and system provided by the present invention is described in detail below with reference to the accompanying drawings.
[0053] See also Figure 1 , which shows a method flow chart of a FCOB circuit substrate defect detection method provided by an embodiment of the present invention, the method comprising the following steps:
[0054] Step S1: Acquire a grayscale image of the FCOB circuit carrier board.
[0055] In the electronics manufacturing industry, the quality of FCOB circuit boards plays a vital role in the overall performance and stability of electronic equipment. Due to the design characteristics of FCOB circuit boards, their dense wiring and fewer holes make it difficult for the developer to be fully discharged during the dry film development process, and oily substances are easily attached to the edge of the circuit, resulting in incomplete development. This problem of incomplete development often manifests as a shrinking waist after electrolithography, which has become a common and critical quality problem in the production of FCOB circuit boards. Therefore, it is necessary to perform defect detection on FCOB circuit boards to extract defective areas.
[0056] When performing defect detection, it is necessary to obtain an image of the FCOB circuit substrate, and then analyze and process the image to extract the waist-shrinking defect area. The specific image acquisition scenario in the embodiment of the present invention can be, for example: Figure 2 As shown, Figure 2 A schematic diagram of an FCOB circuit board image acquisition scenario is provided, including a high-resolution image acquisition device for photographing the FCOB circuit board on a conveyor belt. The specific image acquisition device can be an industrial CCD camera. The brightness of the surrounding environment is ensured during shooting, and a fixed light source can be installed above the conveyor belt.
[0057] At this point, the RGB image of the FCOB circuit substrate can be obtained. Since the grayscale image is a monochrome image containing only brightness information, the color component in the color image is removed. At the same time, the grayscale image can more clearly highlight key features, such as edge information, which is very important for extracting the waist shrinkage defect area of the FCOB circuit substrate. Therefore, the RGB image of the FCOB circuit substrate can be grayed to obtain the grayscale image of the FCOB circuit substrate, such as Figure 3 As shown, it shows a local grayscale image of the FCOB circuit carrier provided by an embodiment of the present invention.
[0058] It should be noted that when graying an RGB image, the maximum value method, weighted graying or average graying method can be used, and these are all technical means well known to those skilled in the art, and are not limited or elaborated here; at the same time, the image acquisition equipment and devices can also be adjusted according to the implementation scenario, which is not limited here.
[0059] At this point, a grayscale image of the FCOB circuit board can be obtained, and the subsequent analysis process can be continued.
[0060] Step S2: In the grayscale image, determine the line area based on the grayscale distribution of the pixels.
[0061] Generally speaking, the surface of the FCOB circuit board can be divided into the circuit area and the non-circuit area. The circuit area is the key part of the FCOB circuit board for connecting and transmitting signals, usually composed of metal circuits, with a specific layout and direction, and the non-circuit area includes other parts such as background, markings, and logos. The shrinking phenomenon that affects the quality of the FCOB circuit board usually occurs in the circuit area. At the same time, since the circuit area is composed of metal circuits, the grayscale value of the pixel points in the circuit area is usually higher than that in the non-circuit area in the grayscale image of the FCOB circuit board. Therefore, the circuit area can be determined based on the grayscale distribution of the pixel points in the grayscale image, thereby providing a reference for the subsequent analysis process.
[0062] Preferably, in one embodiment of the present invention, the method for obtaining the line area includes:
[0063] In the grayscale image, connected domain analysis is performed to obtain all connected domains.
[0064] Next, in view of the characteristic that the pixels in the line area have a higher grayscale value in the grayscale image, for any connected domain, if the ratio of the number of pixels whose grayscale values are greater than the preset grayscale threshold to the total number of pixels in the connected domain is greater than the preset ratio, the connected domain is judged to be a line area.
[0065] It should be noted that the process of connected domain analysis is a technical means well known to those skilled in the art and will not be elaborated here; at the same time, the preset grayscale threshold is set to 106, and the preset ratio is set to 0.5. The specific values can be adjusted according to the implementation scenario and are not limited here.
[0066] In other embodiments of the present invention, the line area may also be obtained by the following method.
[0067] (1) At a preset grayscale value, here 106, the grayscale image is segmented by Otsu threshold to obtain a binary image, such as Figure 4 As shown, it shows a local binary image of a FCOB circuit carrier in one embodiment of the present invention, taking the direction perpendicular to the general direction of the circuit as the target direction. Figure 4In the target direction, the target direction is the vertical direction. Then, in the binary image, with each pixel as the center, in the target direction, the grayscale values of the pixels on both sides of each pixel are analyzed. With each pixel as the center, a preset window is constructed in the target direction with a window size of 1×11. At this time, if there are 5 consecutive pixels with a grayscale value of 0 on one side of the central pixel and 5 consecutive pixels with a grayscale value of 255 on the other side, the central pixel is considered to be an edge pixel. Connect the adjacent edge pixels. At this time, the binary image can be roughly divided into several regions. Then, for any region, if the ratio of the number of pixels with a grayscale value of 255 to the total number of pixels in the region is greater than 0.4, the region corresponding to the region in the grayscale image is regarded as the line region.
[0068] (2) A pre-trained neural network can be used to segment the grayscale image to obtain the line region. It should be noted that the training process of the neural network is a process well known to those skilled in the art and will not be described in detail here.
[0069] Step S3: For any line area, obtain the edge line of the line area; based on the positional relationship between the edge pixels in the line area, determine the edge shrinkage tendency of each edge pixel; within the preset neighborhood corresponding to each edge pixel in the line area, determine the gray shrinkage influence of each edge pixel based on the grayscale distribution characteristics of the pixel; determine the suspected waist shrinkage pixel points by combining the edge shrinkage tendency and gray shrinkage influence between the edge pixels on each edge line.
[0070] In the FCOB circuit board, the edge line of the circuit directly reflects the direction and layout of the circuit, so by extracting the edge line of the circuit area, the specific shape and boundary of the circuit can be clearly defined. Under normal circumstances, on the FCOB circuit board, the width of each circuit at each position is consistent, but the waist shrinking area will be narrower than the width of other positions due to the presence of potion, so according to this characteristic, based on the positional relationship between the edge pixels, the edge shrinkage tendency of each edge pixel is determined. At the same time, the presence of potion will also cause the edge of the waist shrinking area to be bright, that is, the grayscale value of the pixel at the edge of the waist shrinking area will be larger, so in the preset neighborhood corresponding to each edge pixel, the gray shrinkage effect is determined according to the grayscale distribution characteristics of the pixel. Then, combined with the edge shrinkage tendency and gray shrinkage effect of the edge pixel on each edge line, the suspected waist shrinking pixel can be determined. These suspected waist shrinking pixels are key locations where waist shrinking may occur.
[0071] The edge line is the area in the image where the grayscale changes most dramatically, and usually corresponds to the actual boundary of the object, so the edge line of each line area can be obtained based on the Sobel operator, so as to more accurately identify the edge of the line area, which is convenient for subsequent analysis of the deformation and grayscale of the edge line. It should be noted that in other embodiments of the present invention, the edge line of each line area can also be obtained by the Canny operator, and the Sobel operator and the Canny operator are both technical means well known to those skilled in the art, and will not be described in detail here.
[0072] On the FCOB circuit board, under normal circumstances, the width of each position on the edge line of each line is consistent, while the edge line corresponding to the area where the waist shrinkage phenomenon occurs will be deformed. Specifically, in the same line area, the distance between the pixel points of the edge line in the waist shrinkage area is closer than the distance between the pixel points on the edge of the normal line. This distance relationship can be determined by the positional relationship between the edge pixels. Therefore, the edge shrinkage tendency of each edge pixel can be determined based on the positional relationship between the edge pixels in the same line area.
[0073] It should be noted that, in the embodiment of the present invention, the edge line of the line area specifically refers to the edge line where the length of the line is located, and the edge line where the width of the line is located is not considered. Therefore, each line area has two edge lines, that is, by analyzing the positional relationship between the pixels on the two edge lines, it is determined whether the edge line of each line area has been deformed. In order to more clearly represent the positional relationship, a two-dimensional coordinate system can be constructed with the lower left corner of the grayscale image as the origin, the horizontal right direction as the horizontal axis, and the vertical upward direction as the vertical axis. At this time, each pixel in the grayscale image has a two-dimensional coordinate.
[0074] Preferably, in one embodiment of the present invention, the method for obtaining edge shrinkage tendency includes:
[0075] In any circuit area, select any edge line as the line to be tested.
[0076] For any edge pixel point on the line to be tested, the distance between the edge pixel point and each edge pixel point on the other edge line is calculated, and then the minimum value of the distance obtained is used as the distance factor of the edge pixel point; at this time, each edge pixel point on the line to be tested corresponds to a distance factor, and the distance factors of all edge pixels on the line to be tested can be averaged to obtain the distance parameter corresponding to the line to be tested. The distance parameter represents the average level of the minimum distance value from all edge pixels on the line to be tested to the other edge line.
[0077] The above method can be used to obtain the distance parameters corresponding to the two edge lines in the line area, and then based on the difference between the distance factor of each edge pixel point on the line to be tested in the line area and the distance parameters corresponding to all edge lines, the edge shrinkage tendency of each edge pixel point on the line to be tested can be determined. The edge shrinkage tendency can be quantified by the edge shrinkage tendency characteristic value, and the formula model of the edge shrinkage tendency characteristic value includes:
[0078]
[0079] Among them, BQ i represents the edge shrinkage tendency characteristic value of the i-th edge pixel point in each line area; l 1 Indicates the distance parameter corresponding to edge line 1 in each line area; l 2 Indicates the distance parameter corresponding to the edge line 2 in each line area; dy i Represents the distance factor of the i-th edge pixel in each line area.
[0080] In the formula model of the edge shrinkage tendency eigenvalue, for any line area, the mean value of the distance parameter corresponding to the two edge lines of the line area is calculated. The mean represents the mean of the distance between the two edge lines of the line area, that is, it reflects the average width of the line in the line area. At this time, if the difference between the distance factor corresponding to a certain edge pixel point and the mean is The larger the difference is, the more likely it is that the waist shrinkage phenomenon has occurred at the edge pixel point, and the larger the edge shrinkage tendency eigenvalue of the edge pixel point will be; conversely, the difference The smaller it is, the more consistent the corresponding distance factor is with the average width of the line at the edge pixel point. Then the probability of waist shrinkage at the edge pixel point is relatively low, and the edge shrinkage tendency characteristic value of the edge pixel point will be smaller.
[0081] It should be noted that since circuit etching will cause a certain floating difference in the circuit width in the FCOB circuit carrier, in this embodiment of the present invention, when judging the shrinkage tendency of edge pixels, it is based on local characteristics, that is, only judging in the circuit area to which each edge pixel belongs, so as to avoid interference caused by width floating.
[0082] At this point, by analyzing the deformation of the edge line of each line area, the edge shrinkage tendency of each edge pixel can be obtained, which can be used as a reference indicator for subsequent judgment of whether the edge pixel is a pixel in the waist shrinking area.
[0083] The grayscale distribution characteristics reflect the brightness changes in the local area of the image and can reflect the residual potion on the line. Therefore, by analyzing the grayscale changes of pixels in the neighborhood, we can further evaluate the degree to which the edge pixels are affected by the waist shrinkage phenomenon, thereby obtaining the gray shrinkage effect of each edge pixel.
[0084] Preferably, in one embodiment of the present invention, a method for obtaining the gray shrinkage effect includes:
[0085] First, the mean grayscale value of all edge pixels on each edge line is calculated. The mean grayscale value represents the overall grayscale characteristics of each edge line.
[0086] Then, in the preset neighborhood corresponding to each edge pixel, the number of pixels whose grayscale values are greater than the grayscale mean of the edge line to which they belong is counted as the quantity factor of each edge pixel. This process can quantify the distribution of pixels with higher grayscale values in the preset neighborhood of the edge pixel, reflecting the degree to which the edge pixel is affected by the grayscale change. The calculation of the quantity factor helps to accurately evaluate the gray shrinkage effect in the subsequent process. It should be noted that the preset neighborhood size is set to build a 5×5 window centered on each edge pixel. The specific size can be adjusted according to the implementation scenario and is not limited here.
[0087] Next, the comprehensive characteristic value of the quantity factors of all edge pixels on each edge line is calculated. In this embodiment of the present invention, the comprehensive characteristic value is represented by the mean value of the quantity factors of all edge pixels, which is recorded as sz.
[0088] Finally, the difference between the quantitative factor of each edge pixel on each edge line and the comprehensive characteristic value of the quantitative factor of all edge pixels on the edge line, as well as the quantitative factor of each edge pixel, is combined to determine the gray shrinkage effect of each edge pixel. The gray shrinkage effect can be quantified by the gray shrinkage degree value, and the formula model of the gray shrinkage degree value includes:
[0089] HS i =s i ×|s i -sz|
[0090] Among them, HS i Indicates the gray shrinkage value of the i-th edge pixel on each edge line; s i represents the quantitative factor of the i-th edge pixel on each edge line; sz represents the mean of the quantitative factors of all edge pixels on each edge line, that is, the comprehensive eigenvalue.
[0091] In the formula model of the gray shrinkage value, the mean value of the quantity factor of all edge pixels on each edge line is counted as the comprehensive characteristic value. This value represents the overall gray level on each edge and can be used as a benchmark value. Because more potions will remain at the waist position of the line, resulting in more pixels with larger gray values, if the difference between the quantity factor corresponding to a certain edge pixel and the comprehensive characteristic value|s i The larger the -sz| is, the more likely it is that the edge pixel point belongs to the line waisting area. At the same time, when the number factor of the edge pixel point is larger, it is more likely that the edge pixel point is in the line waisting area. Therefore, the number factor of each edge pixel point is combined with the |sz| obtained above. i -sz|, multiply the two together, and use the product as the gray shrinkage value of each edge pixel.
[0092] In other embodiments of the present invention, the comprehensive characteristic value may also be the mode, median, etc. of the quantity factors of all edge pixels on each edge line, which is not limited here.
[0093] At this point, by analyzing the grayscale characteristics of the edge pixels on the edge line of each line area within the preset neighborhood, the gray shrinkage effect of each edge pixel can be obtained, which can be used as a reference indicator for subsequent judgment of whether the edge pixel is a pixel in the waist shrinkage area.
[0094] Since the edge shrinkage tendency and gray shrinkage effect of edge pixels can be used as indicators to determine whether they are pixels in the waist shrinkage area, the two are comprehensively analyzed here to determine the suspected waist shrinkage pixels among all edge pixels.
[0095] Preferably, in one embodiment of the present invention, a method for obtaining suspected waist-shrinking pixel points includes:
[0096] See also Figure 5 , which shows a method flow chart of a method for obtaining suspected waist-shrinking pixel points in one embodiment of the present invention, the method comprising the following steps:
[0097] Step S501: For any line area, on each edge line of the line area, the first shrinkage probability of each edge pixel is obtained according to the proximity between the shrinkage tendency of each edge pixel and the shrinkage tendencies of all edge pixels on the corresponding edge line.
[0098] The edge shrinkage tendency of edge pixels can be quantified by the edge shrinkage tendency eigenvalue. When the edge shrinkage tendency eigenvalue of edge pixels is larger, it means that the shrinkage phenomenon is very likely to occur at the edge pixel. Therefore, the degree of proximity between the edge shrinkage tendency eigenvalue of each edge pixel and the maximum edge shrinkage tendency eigenvalue is calculated, which is specifically expressed as the proportion of the edge shrinkage tendency eigenvalue of each edge pixel in the maximum edge shrinkage tendency eigenvalue, thereby obtaining the first shrinkage probability of each edge pixel. The formula model of the first shrinkage probability includes:
[0099]
[0100] Among them, P 1,i represents the first waisting probability of the i-th edge pixel on each edge line; BQ i Indicates the edge shrinkage tendency characteristic value of the i-th edge pixel point on each edge line; BQ max Represents the maximum edge shrinkage tendency eigenvalue of the edge pixel points on each edge line; γ 1 Indicates the preset first parameter.
[0101] In the formula model of the first waist shrinkage probability, among all the edge pixels on each edge line, the one with the largest edge shrinkage tendency eigenvalue is more likely to represent the center of the waist shrinkage area. Therefore, the edge shrinkage tendency eigenvalue of each edge pixel is used as the numerator and the maximum edge shrinkage tendency eigenvalue is used as the denominator. The larger the ratio, the more likely the edge pixel is to be a pixel in the waist shrinkage area.
[0102] It should be noted that the first parameter γ is preset 1 The function of is to prevent the denominator from being 0. Here, the value can be 0.001. The specific value can be adjusted according to the implementation scenario and is not limited here.
[0103] In other embodiments of the present invention, the difference between the edge shrinkage tendency characteristic value of each edge pixel point and the maximum edge shrinkage tendency characteristic value of all edge pixels on the corresponding edge line can be negatively correlated and normalized to obtain the value as the first shrinkage probability of each edge pixel point. The formula model of the first shrinkage probability includes:
[0104] P 1,i =exp(-|BQ i -BQ max |)
[0105] Among them, P 1,i represents the first waisting probability of the i-th edge pixel on each edge line; BQ i Indicates the edge shrinkage tendency characteristic value of the i-th edge pixel point on each edge line; BQ maxIt represents the maximum edge shrinkage tendency eigenvalue of edge pixels on each edge line; exp() represents an exponential function with the natural constant e as the base.
[0106] In the above formula model, since the largest edge shrinkage tendency eigenvalue among all edge pixels on each edge line is more likely to represent the center of the waist shrinkage area, the edge shrinkage tendency eigenvalue of each edge pixel point is calculated to be different from the maximum edge shrinkage tendency eigenvalue of all edge pixels on the corresponding edge line. i -BQ max The smaller | is, the closer the edge pixel is to the center of the waist-shrinking area, and the more likely it is that it is a pixel in the waist-shrinking area. Therefore, the difference is negatively correlated and normalized to achieve logical relationship correction, thereby obtaining the first waist-shrinking probability of each edge pixel.
[0107] Step S502: for any line region, on each edge line of the line region, based on the difference between the gray shrinkage effects of each edge pixel and a preset number of edge pixels closest to it, determine the second shrinkage probability of each edge pixel.
[0108] The gray shrinkage effect of edge pixels can be quantified by the gray shrinkage degree value. Similarly, when the gray shrinkage degree value of edge pixels is larger, it means that waist shrinkage is very likely to occur at the edge pixel, and the edge pixel is more likely to be in the center of the gray shrinkage area. Therefore, the difference between the gray shrinkage degree value of each edge pixel and the gray shrinkage degree values of the nearest preset number of edge pixels is analyzed to obtain the second waist shrinkage probability of each edge pixel. In this embodiment of the present invention, the preset number is 2, and the formula model of the second waist shrinkage probability includes:
[0109]
[0110] Among them, P 2,i represents the second waisting probability of the i-th edge pixel on each edge line; HS i Indicates the gray shrinkage value of the i-th edge pixel on each edge line; HS i,1 Indicates the gray shrinkage value of the first edge pixel closest to the i-th edge pixel on each edge line; HS i,2 Indicates the gray shrinkage value of the second closest edge pixel to the i-th edge pixel on each edge line.
[0111] In the formula model of the second waist shrinkage probability, among all the edge pixels on each edge line, the larger the gray shrinkage degree value of the edge pixel point, the more it indicates that the edge pixel point is the center of the waist shrinkage area. Therefore, the gray shrinkage degree value of each edge pixel point is compared with the gray shrinkage degree value of the nearest edge pixel point. The larger the difference, the more likely it is that the edge pixel point is a pixel point in the waist shrinkage area.
[0112] Step S503: combining the first waist shrinkage probability and the second waist shrinkage probability of each edge pixel point to obtain the waist shrinkage degree value of each edge pixel point.
[0113] Based on the analysis in steps S501 and S502, it can be seen that the larger the first waist shrinkage probability and the second waist shrinkage probability are, the more it indicates that the edge pixel point is a waist shrinkage area pixel point. Therefore, here, the product of the first waist shrinkage probability and the second waist shrinkage probability of each edge pixel point is normalized and used as the waist shrinkage degree value of each edge pixel point. The formula model of the waist shrinkage degree value includes:
[0114] SC i =norm(P 1,i ×P 2,i )
[0115] Among them, SC i represents the waist shrinkage value of the i-th edge pixel point on each edge line; P 1,i represents the first waisting probability of the i-th edge pixel on each edge line; P 2,i represents the second waisting probability of the i-th edge pixel on each edge line; norm() represents the normalization function.
[0116] In the formula model of the waist shrinkage degree value, since the first waist shrinkage probability and the second waist shrinkage probability of the edge pixel point are positively correlated with the possibility that the edge pixel point is a pixel point in the waist shrinkage area, the product of the first waist shrinkage probability and the second waist shrinkage probability is normalized and used as the waist shrinkage degree value of each edge pixel point. The larger the waist shrinkage degree value, the more likely the edge pixel point is a pixel point in the waist shrinkage area.
[0117] Since a positive correlation indicates that the dependent variable will increase as the independent variable increases, and the dependent variable will decrease as the independent variable decreases, the specific relationship may be a multiplication relationship, an addition relationship, or the power of an exponential function. Therefore, in other embodiments of the present invention, the sum of the first waist shrinkage probability and the second waist shrinkage probability of each edge pixel point may be normalized and used as the waist shrinkage degree value of each edge pixel point.
[0118] Step S504: based on the waist shrinkage possibilities of all edge pixels, select suspected waist shrinkage pixels from all edge pixels.
[0119] Based on the analysis in step S503, it can be seen that the greater the waist shrinkage value of the edge pixel point, the more likely the edge pixel point is a waist shrinkage area pixel point, so here, the edge pixel point with a waist shrinkage value greater than the preset degree threshold is regarded as a suspected waist shrinkage pixel point. It should be noted that the preset degree threshold is set to 0.6, and the specific value can be adjusted according to the implementation scenario and is not limited here.
[0120] In other embodiments of the present invention, the waist shrinkage degree values of all edge pixels on each edge line may be sorted in descending order to obtain a sorted sequence, and then the edge pixels corresponding to the first quarter of the waist shrinkage degree values in the sorted sequence are taken as suspected waist shrinkage pixels.
[0121] At this point, all suspected waist shrinkage pixel points on each edge line can be obtained in each line area. In the subsequent process, the suspected waist shrinkage pixel points can be further analyzed to accurately obtain the waist shrinkage defect area.
[0122] Step S4: in each circuit area, obtain an arc curve obtained by fitting adjacent suspected waist-shrinking pixel points; based on the shape similarity and position relationship between the arc curves in different circuit areas, screen out the waist-shrinking area curve from all the arc curves; in the grayscale image, determine the defective area of the FCOB circuit substrate based on the position of the waist-shrinking area curve.
[0123] Since the circuit board itself will have curved lines when it is being routed, and there will be metal reflective materials in the circuit board, which will also cause the grayscale value to be high, it is necessary to further distinguish the suspected waist shrinkage phenomenon caused by the high grayscale value caused by the design priori line bending and metal reflection on the basis of step S3, and the real waist shrinkage phenomenon can be further analyzed by the characteristic that the real waist shrinkage phenomenon is caused by the unclean removal of oily substance droplets. After the oily substance droplets drip between the two lines, they appear quasi-circular, and the two waist shrinkage edges caused by one droplet will be related in shape. Therefore, the suspected waist shrinkage pixel points can be fitted to obtain an arc curve, and then the accurate waist shrinkage area curve can be obtained through the shape similarity and position relationship between different arc curves. Finally, the position of the waist shrinkage area curve can be located in the grayscale image to extract the defective area of the FCOB circuit board.
[0124] First, it is necessary to obtain the arc curve obtained by fitting the suspected waist-shrinking pixel points in each line area. The adjacent suspected waist-shrinking pixel points can be curve-fitted using the least squares method to obtain all the arc curves on each edge line. It should be noted that the method of curve fitting using the least squares method is a technical means well known to those skilled in the art and will not be described in detail here.
[0125] Since the circuits on the FCOB circuit carrier are arranged closely, the same oily substance droplet will appear circular after dripping between two circuits. Therefore, there will be arc curves with similar shapes between different circuit areas. Based on this feature, the shape similarity and position relationship between the arc curves in different circuit areas can be analyzed, so as to eliminate the arc curves formed by the bending of the circuit from all the arc curves and obtain the waist shrinking area curve.
[0126] Preferably, in one embodiment of the present invention, the method for obtaining the waist shrinkage area curve includes:
[0127] See also Figure 6 , which shows a method flow chart of a method for obtaining a waist shrinking area curve in one embodiment of the present invention, the method comprising the following steps:
[0128] Step S601: Obtain the circular area corresponding to each arc curve.
[0129] On each arc curve, obtain the normal corresponding to each pixel point position, and obtain the intersection of the normals corresponding to all the pixel points. Among all the intersection points, take the intersection point with the largest number of normal intersections as the reference point, and take the reference point as the center of the circle. The average of the distances between all the pixels on the arc curve and the reference point is the radius, and the circular area corresponding to each arc curve is obtained. At this time, each arc curve corresponds to a circular area. In the subsequent process, by comparing the similarities of the circular areas between different arc curves, it can be determined whether the arc curve belongs to the waisted area curve.
[0130] Step S602: in different line regions, based on the distances between the arc curves, determine similar arc curve pairs.
[0131] Since the waisted areas caused by the same oily substance droplet in different line areas are close in distance, for any arc curve in any line area, the distance between the center of gravity of the arc curve and the center of gravity of each arc curve in other line areas is calculated as a judgment factor, and then the arc curve and the arc curve corresponding to the minimum judgment factor are combined into a similar arc curve pair. At this time, the two arc curves that form the similar arc curve pair are more likely to be caused by the same oily substance droplet, so the analysis accuracy can be further improved in the subsequent analysis process.
[0132] It should be noted that the method for obtaining the center of gravity is a well-known technology and will not be described in detail here.
[0133] Step S603: based on the positional relationship between two arc curves in the similar arc curve pair and the similarity between the corresponding circular regions, the waist-shrinking region curve is screened out.
[0134] The distance between the reference points of the two arc curves in each pair of similar arc curves is taken as the first factor; the distance between the centroids of the two arc curves in each pair of similar arc curves is taken as the second factor.
[0135] The third factor is determined based on the positional relationship between the circular areas corresponding to the two arc curves in each similar arc curve pair: for any similar arc curve pair, the third factor is determined based on the proportion of the area of the intersection of the two circular areas corresponding to the similar arc curve pair in the area sum of the two circular areas. The third factor can characterize the similarity between the circular areas corresponding to the two arc curves, thereby helping to determine whether the arc curve is a waisted area curve.
[0136] Then, according to the first factor, the second factor and the third factor between the two arc curves in each pair of similar arc curves, the waist shrinkage degree values of the two arc curves are determined, and the first factor and the second factor both change in the opposite direction to the waist shrinkage characteristic value, and the third factor changes in the same direction as the waist shrinkage characteristic value. The formula model of the waist shrinkage characteristic value can be, for example:
[0137]
[0138] Among them; ST k represents the waist-shrinking eigenvalues of the two arc curves in the kth similar arc curve pair; dc k Represents the distance between the reference points of the two arc curves in the kth similar arc curve pair, which is also the first factor; dz k represents the distance between the centroids of the two arc curves in the kth similar arc curve pair, which is also the second factor; S k S represents the area of the intersection of the two circular regions corresponding to the two arc curves in the kth similar arc curve pair; k ′ represents the sum of the areas of the two circular regions corresponding to the two arc curves in the kth similar arc curve pair; γ 2 Indicates the preset second parameter; γ 3 Indicates the preset third parameter.
[0139] In the formula model of waist shrinkage characteristic value, for any pair of similar arc curves, when the distance between the reference points of two arc curves, that is, the smaller the first factor, the more likely the two arc curves are caused by the same oily substance droplet; similarly, when the distance between the centers of gravity of the two arc curves, that is, the smaller the second factor, it also means that the closer the distance between the two arc curves is, the more likely the waist shrinkage is caused by the same oily substance droplet. Therefore, when calculating the waist shrinkage characteristic value of the arc curve, it is necessary to negatively correlate the first factor and the second factor to achieve logical relationship correction, that is, both the first factor and the second factor change in the negative opposite direction to the waist shrinkage characteristic value. When the two arc curves are more likely to be caused by the same oily substance droplet, the circular areas corresponding to the two arc curves should have greater similarity, which is specifically manifested as a large overlap in area, so the ratio of the intersection and the sum of the circular areas corresponding to the two arc curves is calculated to obtain the third factor. The larger the third factor is, the more likely the two arc curves are waist-shrinking curves, so the third factor and waist-shrinking characteristic value change in the same direction. Therefore, the product of the value after negative correlation mapping of the first factor, the value after negative correlation mapping of the second factor, and the third factor is used as the waist-shrinking characteristic value of the two arc curves in the similar arc curve pair.
[0140] In other embodiments of the present invention, when calculating the waist shrinkage characteristic value, the first factor may also be calculated by the following method.
[0141] For any arc curve pair, the first factor is obtained by comparing the distance between the reference points of the two arc curves in the arc curve pair with the minimum distance between the reference points of the two arc curves in all arc curve pairs. The formula model of the first factor is as follows:
[0142] YZ 1,k =|dc k -dc min |
[0143] Among them, YZ 1,k represents the first factor between the two arc curves in the kth similar arc curve pair; dc k represents the distance between the reference points of the two arc curves in the kth similar arc curve pair; dc min Indicates the minimum value of the distance between the reference points of two arc curves in all similar arc curve pairs.
[0144] In the first factor formula model, dc minIt represents the minimum distance between the reference points of two arc curves in all similar arc curve pairs, so this value can be used as a benchmark for characterizing the waisted area curve. Therefore, the distance between the reference points of the two arc curves in each similar arc curve pair is compared with this value. When the distance is closer, the difference between the two is |dc k -dc min The smaller | is, the more likely the two arc curves in the pair of similar arc curves are waist-constricted area curves.
[0145] Since the larger the waist shrinking characteristic value of the arc curve is, the more likely the arc curve is a waist shrinking region curve, so here, after the waist shrinking characteristic value is normalized, the arc curve that is still greater than the preset waist shrinking threshold is taken as the waist shrinking region curve. It should be noted that the preset waist shrinking threshold is set to 0.6, and the specific value can be adjusted according to the implementation scenario and is not limited here; the second parameter γ is preset 2 And the preset third parameter γ 3 The role of is to prevent the denominator from being 0, and the value here can be 0.001. The specific value can be adjusted according to the implementation scenario and is not limited here. The normalization processing can be specific, for example, maximum and minimum value normalization processing and the use of normalization functions such as the norm() function, etc., which are not limited here.
[0146] In other embodiments of the present invention, the waist shrinkage characteristic values of the arc curves of all line areas may be arranged in descending order to obtain an arrangement sequence, and then the arc curves corresponding to the first one-third of the waist shrinkage characteristic values in the arrangement sequence are used as the waist shrinkage area curves.
[0147] It should be noted that, in the process of matching similar arc curve pairs, the same arc curve and different arc curves may form similar arc curve pairs. Therefore, when judging whether an arc curve is a waist-shrinking region curve, as long as there is a case where the arc curve is considered to be a waist-shrinking region curve, it will be regarded as a waist-shrinking region curve. For example, arc curve 1 forms similar arc curve pairs (1, a) and (1, b) with arc curves a and b respectively. At this time, when calculating the waist-shrinking feature value and judging whether the arc curve is a waist-shrinking region curve, the value calculated by (1, a) meets the waist-shrinking region curve feature, while the value calculated by (1, b) does not meet the waist-shrinking region curve feature, then arc curve 1 and arc curve a are still considered to be waist-shrinking region curves.
[0148] At this point, all the waist shrinkage area curves can be obtained, and then the positions of the waist shrinkage area curves can be determined in the grayscale image, thereby obtaining the defective area of the FCOB circuit substrate.
[0149] Preferably, in one embodiment of the present invention, the method for obtaining the defect area includes:
[0150] In the grayscale image, the pixel points on the waisted area curve are marked red by using a mask operation, and the remaining pixel points are marked black. Then, the minimum circumscribed rectangle of each waisted area curve is drawn as the display bounding box of the waisted area curve. The display bounding box is also marked red. Finally, the processed grayscale image is displayed through a visual display device such as a monitor, so as to obtain the defective area of the FCOB circuit substrate.
[0151] In other embodiments of the present invention, since the defective area is small and may be interfered by noise points, the number of pixels may be added as a judgment indicator, specifically: when the number of pixels in the waist-shrinking area curve is greater than the preset number threshold, in the grayscale image, the pixel points on the waist-shrinking area curve are marked as red using a mask operation, and the remaining pixel points are marked as black, and then the minimum circumscribed rectangle of the waist-shrinking area curve is drawn as a display bounding box, and the display bounding box is also marked as red. Finally, the processed grayscale image is displayed through a visual display device such as a display, so as to obtain the defective area of the FCOB circuit substrate; it should be noted that the preset number threshold is set to 5, and the specific value can be adjusted according to the actual scenario, and is not limited here.
[0152] It should be noted that, in order to facilitate calculation, all indicator data involved in the calculation in the embodiment of the present invention are preprocessed to eliminate the dimension effect. The specific means of eliminating the dimension effect are technical means well known to those skilled in the art and are not limited here.
[0153] In summary, the embodiment of the present invention first obtains the grayscale image of the FCOB circuit carrier, reduces the interference of color information in the image, and preliminarily determines the circuit area in the grayscale image based on the grayscale distribution information of the pixel points, so as to provide the regional range for the subsequent analysis process. In view of the presence of the potion, the original relatively consistent edge width of the circuit will cause a sudden change, thereby causing the waist shrinking phenomenon. Therefore, the edge shrinking tendency of each edge pixel point can be determined based on the positional relationship between the edge pixels in the circuit area, so as to determine whether the position of each edge pixel point has changed. Further, because the potion will make the edge area of the circuit brighter, which is reflected in the grayscale information, that is, the grayscale value of the edge area will be larger, so the grayscale distribution characteristics of the edge pixels in the circuit area within the preset neighborhood can be combined to determine the grayscale shrinkage influence of each edge pixel point, so as to evaluate the grayscale information of the area where each pixel point is located. At this point, the edge shrinkage tendency and grayscale shrinkage influence of each edge pixel point can be combined to screen out the suspected waist shrinking pixels from all edge pixels. Because the bending of the circuit and the reflection of metal can also cause the edge of the circuit area to show a performance that is more consistent with the waist shrinkage phenomenon, it is necessary to further judge the suspected waist shrinkage pixel points. Since the wiring of the FCOB circuit board is relatively dense, the waist shrinkage phenomenon between adjacent circuit areas may be caused by the same droplet. In this case, the arc curve formed by the suspected waist shrinkage pixel points between adjacent circuit areas will have similar characteristics in shape. Therefore, based on the shape similarity and position relationship between the arc curves of different circuit areas, the waist shrinkage area curve can be accurately screened out from all the arc curves. At this time, the waist shrinkage area curve combines the position between the pixels, the grayscale and the shape similarity of the arc curve formed by the pixels. Therefore, the position of the waist shrinkage area curve obtained in the grayscale image can accurately represent the waist shrinkage defect area of the FCOB circuit carrier.
[0154] This embodiment also provides a FCOB circuit substrate defect detection system, which includes a processor, a memory and a computer program, wherein the memory is used to store the corresponding computer program, and the processor is used to run the corresponding computer program. When the computer program runs on the processor, it can implement any one of the steps of the FCOB circuit substrate defect detection method.
[0155] See also Figure 7 , which shows a system block diagram of a FCOB circuit substrate defect detection system provided by an embodiment of the present invention, including: an image acquisition module 701: used to implement step S1 in the above method, a circuit area determination module 702: used to implement step S2 in the above method, a suspected waist-shrinking pixel point determination module 703: used to implement step S3 in the above method, and a defect area detection module 704: used to implement step S4 in the above method.
[0156] See also Figure 8 , which shows a system structure diagram of a FCOB circuit substrate defect detection system provided by an embodiment of the present invention, including a processor 800, a memory 801, a bus 802 and a communication interface 803, wherein the processor 800, the communication interface 803 and the memory 801 are connected via the bus 802; wherein the memory 801 may include a high-speed random access memory, the bus 802 may be an ISA bus, a PCI bus or an EISA bus, etc., and the processor 800 may be an integrated circuit chip having signal processing capabilities.
[0157] The present invention also provides a computer-readable storage medium corresponding to the method provided in the above-mentioned embodiment. Fig. 9 , the storage medium shown is a CD, on which a computer program (ie, a program product) is stored. When the computer program is run by a processor, it will execute the method provided by any of the aforementioned embodiments.
[0158] It should be noted that examples of the computer-readable storage medium may also include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), read-only memory (ROM), and other optical and magnetic storage media, which are not listed here one by one.
[0159] It should be noted that the sequence of the above embodiments of the present invention is only for description and does not represent the advantages and disadvantages of the embodiments. The processes depicted in the accompanying drawings do not necessarily require the specific order or continuous order shown to achieve the desired results. In some embodiments, multitasking and parallel processing are also possible or may be advantageous.
[0160] The various embodiments in this specification are described in a progressive manner, and the same or similar parts between the various embodiments can be referenced to each other, and each embodiment focuses on the differences from other embodiments.
Claims
1. A method for detecting defects in a FCOB circuit substrate, characterized in that: The method comprises: Get the grayscale image of the FCOB circuit carrier board; In the grayscale image, based on the grayscale distribution of pixels, a line area is determined; For any line area, the edge line of the line area is obtained; based on the positional relationship between the edge pixels in the line area, the edge shrinkage tendency of each edge pixel is determined; within the preset neighborhood corresponding to each edge pixel in the line area, the gray shrinkage influence of each edge pixel is determined based on the grayscale distribution characteristics of the pixel; the suspected waist shrinkage pixel is determined by combining the edge shrinkage tendency and the gray shrinkage influence between the edge pixels on each edge line; In each circuit area, an arc curve obtained by fitting adjacent suspected waist-shrinking pixel points is obtained; based on the shape similarity and position relationship between the arc curves in different circuit areas, the waist-shrinking area curve is screened out from all the arc curves; in the grayscale image, based on the position of the waist-shrinking area curve, the defective area of the FCOB circuit carrier is determined; The method for obtaining the edge shrinkage tendency includes: In any line area, select any edge line as the line to be tested; The minimum distance between each edge pixel point on the line to be tested and all edge pixel points on other edge lines is obtained as a distance factor; the distance factors of all edge pixel points on the line to be tested are averaged to obtain the distance parameter corresponding to the line to be tested; Based on the difference between the distance factor of each edge pixel point on the line to be tested and the distance parameters corresponding to all edge lines in the line area, the edge shrinkage tendency of each edge pixel point on the line to be tested is determined; The method for obtaining the gray shrinkage effect includes: Calculate the mean grayscale value of all edge pixels on each edge line; In the preset neighborhood corresponding to each edge pixel point, the number of pixel points whose grayscale values are greater than the grayscale value mean of the corresponding edge line is counted as the quantity factor of each edge pixel point; On each edge line, the difference between the quantitative factor of each edge pixel and the mean quantitative factor of all edge pixels on the edge line and the quantitative factor of each edge pixel are fused to determine the gray shrinkage effect of each edge pixel; The method for obtaining the suspected waist-shrinking pixel point comprises: For any line area, on each edge line of the line area, a first shrinkage probability of each edge pixel is obtained according to the proximity between the edge shrinkage tendency of each edge pixel and the edge shrinkage tendencies of all edge pixels on the corresponding edge line; a second shrinkage probability of each edge pixel is determined based on the difference between the gray shrinkage effects of each edge pixel and the nearest preset number of edge pixels; Combining the first waist shrinkage probability and the second waist shrinkage probability of each edge pixel point to obtain a waist shrinkage degree value of each edge pixel point, and both the first waist shrinkage probability and the second waist shrinkage probability are positively correlated with the waist shrinkage degree value; Based on the waist shrinkage degree values of all edge pixels, suspected waist shrinkage pixels are screened out from all edge pixels; The method for obtaining the waist shrinkage area curve includes: On each arc curve, obtain the normal corresponding to each pixel point, and obtain the intersection point of the normals corresponding to all the pixels. Among all the intersection points, take the intersection point with the largest number of normal intersections as the reference point, take the reference point as the center of the circle, and the average distance between all the pixels on the arc curve and the reference point as the radius, and obtain the circular area corresponding to each arc curve; In different line areas, similar arc curve pairs are determined based on the distances between the arc curves; The distance between the reference points of the two arc curves in each similar arc curve pair is taken as the first factor; the distance between the centroids of the two arc curves in each similar arc curve pair is taken as the second factor; based on the positional relationship between the circular areas corresponding to the two arc curves in each similar arc curve pair, the third factor is determined; According to the first factor, the second factor and the third factor between the two arc curves in each pair of similar arc curves, the waist shrinkage characteristic values of the two arc curves are obtained, and the first factor and the second factor both change in the opposite direction to the waist shrinkage characteristic value, and the third factor changes in the same direction as the waist shrinkage characteristic value; The waist shrinkage region curves are screened out from all the arc curves based on the waist shrinkage characteristic values of all the arc curves.
2. The FCOB circuit board defect detection method according to claim 1, characterized in that: The method for obtaining the line area includes: In the grayscale image, connected domain analysis is performed to obtain all connected domains; In any connected domain, if the ratio of the number of pixels having grayscale values greater than a preset grayscale threshold to the total number of pixels is greater than a preset ratio, the connected domain is determined to be a line region.
3. The FCOB circuit board defect detection method according to claim 1, characterized in that: The method of determining similar arc curve pairs in different line areas based on distances between arc curves includes: For any arc curve in any line area, the distance between the center of gravity of the arc curve and the center of gravity of each arc curve in other line areas is calculated as a judgment factor, and the arc curve and the arc curve corresponding to the minimum judgment factor form the similar arc curve pair.
4. The FCOB circuit board defect detection method according to claim 1, characterized in that: The method for obtaining the third factor includes: For any pair of similar arc curves, the third factor is determined based on the proportion of the area of the intersection of the two circular areas corresponding to the similar arc curve pair in the sum of the areas of the two circular areas.
5. The FCOB circuit board defect detection method according to claim 1, characterized in that: Determining the defective area of the FCOB circuit substrate based on the position of the waist shrinkage area curve in the grayscale image includes: In the grayscale image, the minimum circumscribed rectangle of each waisted area curve is determined to obtain the defective area of the FCOB circuit carrier board.
6. A FCOB circuit board defect detection system, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 5 are implemented.
Citation Information
Patent Citations
Window glass lifter, window glass lifting mechanism and vehicle
CN103015827A
Defect detection method based on magnetooptical imaging
CN105372324A