Defect detection equipment and defect detection method
Patent Information
- Application Number
- TW114110633
- Authority / Receiving Office
- TW · TW
- Patent Type
- Applications
- Current Assignee / Owner
- Filing Date
- 2025-03-21
- Publication Date
- 2026-10-01
- Estimated Expiration
- 2045-03-20
AI Technical Summary
Existing defect detection methods for circuit boards and electronic components are prone to false positives or false negatives due to large shape variations, leading to inaccurate defect identification.
A defect detection device and method that involves binarizing images of objects using multiple grayscale values to establish closed contour lines, integrating these lines into a defect detection image, and comparing detection areas with standard product images to determine defects.
Improves defect detection accuracy by reducing false positives and negatives, ensuring reliable identification of defective products.
Smart Images

Figure TWG2TA001077685_001 
Figure TWG2TA001077685_002 
Figure TWG2TA001077685_003
Abstract
Description
Defect detection equipment and defect detection methods This invention relates to a testing device and a testing method, and more particularly to a defect testing device and a defect testing method. In existing technologies, the methods for defect detection of circuit boards and electronic components on circuit boards mostly involve first capturing images of the object to be inspected, and then analyzing the captured images to determine whether the object to be inspected is a defective object. In most existing common image inspection methods, one image is first selected as a standard image. Then, in subsequent procedures, other images to be inspected are compared with the standard image to determine whether the current image contains defects. This inspection method is prone to false positives or false negatives when inspecting objects with large shape variations. This invention discloses a defect detection device and a defect detection method, which are mainly used to improve the existing common defect image detection methods, which are prone to false detection or missed detection. One embodiment of the present invention discloses a defect detection device, comprising a processing unit, an image capturing unit, and a stage. The stage is used to carry an object to be detected. The image capturing unit is used to capture the object to be detected placed on the stage to generate an image of the object to be detected. The processing unit is electrically connected to the image capturing unit and can receive the image of the object to be detected and execute a defect detection method. The defect detection method includes: a closed contour line establishment step: performing N binarization processing on the image of the object to be detected based on N different preset grayscale values to generate N binarized images, and establishing a closed contour line in each binarized image; wherein N is a positive integer greater than or equal to 1 and N is a positive integer not greater than 256; an integration step: integrating the closed contour lines in the N binarized images into a defect detection... In the image testing step, the defect detection image is divided into at least one detection area, and the detection area is compared with a standard product detection area in a corresponding standard product defect detection image to determine whether the closed contour line contained in the detection area meets at least one defect condition. If the closed contour line contained in the detection area meets the defect condition, the product to be tested is determined to be defective. If the closed contour line contained in the detection area does not meet the defect condition, the product to be tested is determined to be non-defective. Among them, one of the non-defective products to be tested is defined as a standard product. The defect detection image corresponding to the standard product in the integration step is defined as the standard product defect detection image, and each detection area corresponding to the standard product in the defect detection step is defined as the standard product detection area. One embodiment of the present invention discloses a defect detection method applicable to a processing device of a defect detection apparatus. The defect detection apparatus further includes an image capturing device and a stage. The stage is used to hold an object to be inspected. The image capturing device is used to capture the object to be inspected placed on the stage to generate an image of the object. The processing device is electrically connected to the image capturing device and is capable of receiving the image of the object. The defect detection method includes: a closed contour line establishment step: based on N different preset grayscale values, the image of the object is binarized N times to generate N binarized images, and the image is then processed in each binarized image. A closed contour line is established; where N is a positive integer greater than or equal to 1 and N is a positive integer not greater than 256; an integration step: the closed contour lines in N binarized images are integrated into a defect detection image; a defect detection step: the defect detection image is divided into at least one detection region, and each detection region is compared with a standard product detection region in a corresponding standard product defect detection image to determine whether the closed contour lines contained in the detection region meet at least one defect condition; if the closed contour lines contained in the detection region are determined to meet the defect condition, the object to be detected is determined to be a defective product; If the closed outline contained in the detection area does not meet the defect conditions, the item to be detected is determined to be a non-defective item. Among them, the defect detection image of one of the items to be detected that is determined to be a non-defective item in the closed outline establishment step is defined as the standard defect detection image, and each detection area in the defect detection step is defined as the respective standard detection area. In summary, the defect detection equipment and method of the present invention, through the design of the closed contour line establishment step, the integration step, and the defect detection step, can effectively improve the problems of false detection or missed detection in the prior art. To further understand the features and technical content of this invention, please refer to the following detailed description and accompanying drawings. However, these descriptions and drawings are only for illustrating the invention and are not intended to limit the scope of protection of the invention in any way. In the following description, if it is indicated that a specific diagram is referred to or as shown in a specific diagram, it is only to emphasize that most of the relevant content mentioned in the following description appears in that specific diagram, but does not limit the following description to refer only to that specific diagram. Please refer to Figures 1 to 4 together. Figure 1 is a schematic diagram of the defect detection device of the present invention, Figure 2 is a block diagram of the defect detection device of the present invention, Figure 3 is a schematic diagram of the image of the object to be detected captured by the image capturing device of the defect detection device of the present invention, and Figure 4 is a flowchart of the defect detection method of the present invention. It should be noted that, in the drawings of this invention, the object to be tested, A, is an example of a solder filler on a circuit board, but the object to be tested, A, is not limited to the aforementioned solder filler. The solder filler can be, for example, a solder pad on a circuit board. The object to be tested, A, can also be various colloids on a circuit board, such as adhesives used in SMT (Surface Mount Technology) coating, potting, or dispensing operations for specific electronic components. The defect detection device 100 of the present invention includes a processing device 1, an image capturing device 2, a stage 3, and a display device 4. The stage 3 is used to support an object A to be inspected. Of course, the defect detection device 100 may also include a housing or other main support structure to support the processing device 1, the image capturing device 2, the stage 3, and the display device 4. In different embodiments, the defect detection device 100 may not include a display device 4, but may only include an image output interface. Personnel may use the image output interface to connect to an external display device via an image transmission line. The processing device 1 is electrically connected to the image capturing device 2 and the display device 4. The processing device 1 can be a computer, server, or other device. The image capturing device 2 is used to capture the object to be tested A disposed on the stage 3 to generate an image 212 of the object to be tested. In this embodiment, the object to be tested is a solder filler disposed on a circuit board, as shown in FIG3. In the captured image 21 of this embodiment, there is a circuit board image 211 and an image 212 of the object to be tested. In practice, the image capturing device 2 may include, for example, an image capture unit and an auxiliary light source (e.g., a coaxial light source). The auxiliary light source is used to emit a light beam towards the object A to be tested, which is mounted on the stage 3. This is not limited to any particular type of light source. Of course, in different embodiments, the image capturing device 2 may only include an image capture unit without an auxiliary light source. The display device 4 is electrically connected to the processing device 1 and can display the image transmitted by the processing device 1. The display device 4 may also be electrically connected to the image capturing device 2, and the display device 4 can display the image captured by the image capturing device 2. In practical applications, the object to be detected, A, can be placed flat on the stage 3, and the image capturing device 2 can be positioned directly above the object to be detected, and the image 212 of the detected object is roughly a top-down image of the object to be detected, A. Please refer to Figures 4 to 10 together. Figure 4 is a flowchart of the defect detection method of the present invention. Figures 5 to 7 are schematic diagrams of different binarized images in the closed contour line establishment step of the defect detection method of the present invention. Figure 8 is a schematic diagram of a defect detection image including a closed contour line and an image of the object to be detected in the defect detection method of the present invention. Figure 9 is a schematic diagram of a defect detection image including only a closed contour line in the defect detection method of the present invention. Figure 10 is a partially enlarged schematic diagram of Figure 9. After receiving the image 212 of the object to be detected (or the captured image 21), the processing device 1 can execute the defect detection method of the present invention. The defect detection method of the present invention includes: Step S10: Based on N different preset grayscale values, the detection object image 212 is binarized N times to generate N binarized images 11 (as shown in Figures 5 to 7), and a closed contour line 111 is established in each binarized image 11; where N is an integer greater than or equal to 1 and N is a positive integer not greater than 256; Integration step S11: Integrate the closed contour lines 111 in N binarized images 11 into a defect detection image 12 (as shown in Figures 8 and 9); A defect detection step S12: Divide the defect detection image 12 into multiple detection areas 121, and compare each detection area 121 with a standard product detection area in a corresponding standard product defect detection image 13 to determine whether the closed contour line 111 contained in each detection area 121 meets at least one defect condition. If any closed outline 111 contained in any detection area 121 is determined to meet the defect conditions, then the object to be detected A is determined to be a defective product. If it is determined that the closed contour lines 111 contained in all the detection areas 121 do not meet the defect conditions, then the object to be tested A is determined to be a non-defective product (or a good product). In embodiments where the image capturing device 2 includes a color image capturer, the processing device 1 may first use the color image capturer to capture an image of the object to be detected A during or before performing the closed contour line establishment step S10, thereby generating a color image. Then, the processing device 1 may first convert the color image into a grayscale image, and then use this grayscale image as the object image 212 in the closed contour line establishment step S10. Alternatively, in embodiments where the image capturing device 2 includes a black and white image capturer, the black and white image captured by the black and white image capturer can be used as the object image 212 in the closed contour line establishment step S10. In practice, after the processing device 1 performs the closed contour line establishment step S10, the processing device 1 can transmit the defect detection image 12 to the display device 4 so that the display device 4 can display the defect detection image 12, and relevant personnel can view the defect detection image 12 through the display device 4. In practical applications, personnel can place the items A to be inspected one by one onto the stage 3 and have the processing device 1 execute the defect detection method sequentially. During this process, when one of the items A to be inspected is determined to be a non-defective product (or a good product), the personnel can, for example, use this item A as a standard product. The defect detection image 12 corresponding to this standard product in the closed contour line establishment step S10 will be defined as the standard product defect detection image 13, and each detection area 121 corresponding to this standard product in the defect detection step S12 will be defined as the standard product detection area 121. In practical applications, when personnel determine that the item A to be inspected is a non-defective product, the personnel can, for example, use an input device (such as a keyboard, mouse, touch screen, etc.) included in the defect detection device 100 to store the standard product defect detection image 13 corresponding to the standard product in the processing device 1 through an operation interface displayed on the display device 4 of the defect detection device 100. Of course, in different embodiments, the standard defect detection image 13 may be pre-stored in the processing device 1 by other means. It should be noted that, before the closed contour line establishment step S10, an image capturing step may be included: capturing an image of the object to be inspected A placed on the stage 3 to obtain the object image 212; that is, after each object to be inspected A is placed on the stage 3, the processing device 1 will sequentially execute the above-mentioned image capturing step, closed contour line establishment step S10, integration step S11, and defect detection step S12. In different embodiments, the defect detection method may also not include the above-mentioned image capturing step, and the processing device 1 only needs to obtain the object image 212 and the standard defect detection image 13 before executing the closed contour line establishment step S10. In practical applications, in the closed contour line establishment step S10, the N preset grayscale values arranged in sequence can be an arithmetic sequence, and the difference between any two adjacent preset grayscale values is the same. For example, assuming N is 21, in the closed contour line establishment step S10, the 21 preset grayscale values can be, for example, an arithmetic sequence of 0, 5, 10, 15, 20, 25, 30, 35, 40, 45…100. In the example where the object to be detected A is solder filler (e.g., solder pads) on a circuit board, N can be, for example, between 5 and 15, and the difference between any two adjacent preset grayscale values can be, for example, between 10 and 30. For example, in one embodiment, N can be 11, and the difference between any two adjacent preset grayscale values can be 25. It should be noted that the larger the N value, the more closed contour lines 111 there will be, and the longer it will take for the processing device 1 to perform the defect detection method. Therefore, in practice, the N value can be determined based on the type of object A to be detected, the intensity of the auxiliary light source of the image capturing device and its illumination method, and the sensitivity of defect detection. In the example where the object to be tested, A, is a solder filler, N can be a positive integer greater than or equal to 5, which allows for more accurate defect detection. It should be noted that, in different embodiments, in the defect detection step S12, the defect detection image 12 may be divided into only a single detection area. In one practical application, in the defect detection step S12, if the defect detection image 12 is divided into multiple detection areas, the minimum size of each detection area is 2 pixels * 2 pixels. Of course, the size of each detection area can be designed according to actual needs. For example, in the case where the object to be detected is solder filler, the size of each detection area can be 10 pixels * 10 pixels. Please refer to Figures 3, 5 to 8. Figures 5 to 8 show the binarized image 11 after the processing device 1 performs three binarization processes on the captured image 21 containing the object image 212 shown in Figure 3 using three different preset grayscale values. Figure 8 shows a schematic diagram of the defect detection image 12 formed by the processing device 1 combining multiple binarized images with the captured image 21. That is, in one specific embodiment, in the integration step S11, the processing device 1 can also directly superimpose N closed contour lines 111 onto the object image 212. In other words, the defect detection image 12 is composed of N closed contour lines 111 and the object image 212. As shown in Figures 5 to 8, the binarized image 11 after binarization is mainly displayed in black and white, and the boundary between black and white constitutes the closed contour line 111. In practice, for example, the findContours() function in OpenCV (Open Source Computer Vision Library) can be used to obtain the closed contour line 111 in the binarized image 11. It should be noted that in practice, a single binarized image 11 may contain two (or more) closed contour lines 111. In one preferred embodiment, in the closed contour line establishment step S10, after the processing device 1 establishes the closed contour line 111 in the binary image 11, it can also perform contour smoothing on the closed contour line 111. For example, the smoothing of the closed contour line 111 can be performed using functions such as ApproxPolyDP(), GaussianBlur(), medianBlur(), bilateralFilter(), dilate(), and erode() in OpenCV (Open Source Computer Vision Library). As shown in Figures 9 and 10, in one embodiment, in the integration step S11, the defect detection image 12A can be an image independent of the detection object image 212 (or the captured image 21), that is, the processing device 1 establishes N closed contour lines 111 obtained from N binarized images 11 in the new image. As described above, the defect detection image 12A and the N closed contour lines 111 contained therein can be regarded as a contour map and contour lines of the object to be inspected A. That is, the relevant inspection personnel can understand the changes in height of different positions of the object to be inspected A by observing the distribution and density of the N closed contour lines 111 in the defect detection image 12A. In this way, the relevant inspection personnel can design appropriate defect conditions based on the type of object to be inspected A and the type of defect to be detected. As shown in Figure 9, in the defect detection step S12, the defect detection image 12A can be divided into 12 detection areas 121. Each detection area 121 can have approximately the same size, but is not limited thereto. In different embodiments, in the defect detection step S12, multiple detection areas 121 of different sizes can also be established in the defect detection image 12A. The number, size, and cutting method of the detection areas 121 can be designed according to actual needs and are not limited here. Figure 10 is shown as a partially enlarged schematic diagram of Figure 9. Figure 10 shows one of the detection areas 121 in the defect detection image 12A of Figure 9. In one specific application, in the defect detection step S12, one defect condition may be: whether the difference between the total number of closed contour lines 111 contained in the detection area 121 and the total number of closed contour lines 111 contained in the corresponding standard product detection area 121 exceeds a preset quantity difference threshold. For example, in the detection area 121 shown in Figure 10, the number of closed contour lines 111 is 8. Assuming that the total number of closed contour lines 111 contained in the standard product detection area 121 is 5, and the preset quantity difference threshold is 2, then in the defect detection step S12, the current product A to be detected will be determined as a defective product. More specifically, assuming that the number of closed contour lines 111 contained in the detection area 121 is much greater than the number of closed contour lines 111 contained in the standard product detection area 121, it may mean that the height of the product A to be detected changes drastically at the position corresponding to the detection area 121, but the height of the standard product at the same position does not change drastically. That is, the product A to be detected may have a defect at that position. As described above, under the aforementioned defect conditions, by calculating the difference in the total number of closed contour lines 111 contained in each detection area 121 and its corresponding standard product detection area 121, it is possible to effectively detect whether the object to be tested A has defects. Moreover, the inspector can, based on the actual application requirements such as the type of object to be tested A, defect tolerance, and detection speed, simply modify the preset quantity difference threshold to change the defect judgment standard, and indirectly change the detection speed. Specifically, lowering the preset quantity difference threshold will raise the defect judgment standard, which may lead to an increase in the defect rate and may indirectly reduce the detection speed; conversely, raising the preset quantity difference threshold will lower the defect judgment standard, which may lead to a decrease in the defect rate and may indirectly increase the detection speed. In different embodiments, the processing device 1 may make judgments for different detection areas 121 using different preset quantity difference thresholds. That is, the processing device 1 stores a list of preset quantities corresponding to each detection area 121 in advance. When the processing device 1 performs quantity comparison for different detection areas 121, it will first look up the corresponding preset quantity difference threshold from the list to continue the quantity comparison. In different embodiments, in the defect detection step S12, one defect condition may be: whether the difference between the total area of the detection areas 121 and the total area of the standard product detection areas 121 exceeds a preset total area threshold. The total area of each detection area 121 is the sum of the areas surrounded by all closed contour lines 111 located in the detection areas 121. The total area of each standard product is the sum of the areas surrounded by all closed contour lines 111 located in the standard product detection areas 121. In one embodiment, the processing device 1 may, for example, use the contourArea() function in OpenCV (Open Source Computer Vision Library) to obtain the area surrounded by one of the closed contour lines 111 of the detection areas 121 of the defect detection image 12. As described above, from another perspective, in the defect detection step S12, the processing device 1 calculates the total area of the detection area 121. This total area can also represent the volume of the object to be detected A in the detection area 121. That is, in the above description of the defect conditions, it can also be regarded as the processing device 1 comparing the volume of the object to be detected A in the detection area 121 with the volume of the standard product in the standard product detection area 121. It should be noted that each of the aforementioned defect conditions can be applied individually to one embodiment of the defect detection method of the present invention, but is not limited thereto. In other variations of the present invention, at least two of the aforementioned defect conditions can also be applied simultaneously to the same defect detection method; that is, the object to be tested must not meet two or more defect conditions to be determined as a non-defective product. It is worth mentioning that, in one variant embodiment, in the defect detection step S12, the processing device 1 can also set different defect conditions for different detection areas 121. For example, in the case where the object to be inspected A is solder filler on a circuit board, assuming the inspector is very concerned about the defect status of the four corners of the solder filler, then in the defect detection step S12, the processing device 1 can judge the detection areas 121 corresponding to the four corners of the solder filler with relatively strict defect conditions. Conversely, if the inspector is relatively indifferent to the defect status of the top of the solder filler, then in the defect detection step S12, the processing device 1 can judge the detection area 121 corresponding to the top of the solder filler with relatively lenient defect conditions. It should be noted that the defect conditions in the defect detection step can be designed according to actual needs and are not limited to the above description. For example, in another embodiment, the defect condition can be: determining whether the difference (or maximum difference) between the minimum spacing (or maximum spacing) of multiple closed contour lines in each detection area and the minimum spacing (or maximum spacing) of the corresponding standard product detection area exceeds a preset difference; if it exceeds, the product to be detected is determined to be defective; otherwise, it is determined to be non-defective. In another embodiment, the defect condition can also be: determining whether the difference between the average spacing of multiple closed contour lines in each detection area and the average spacing of the corresponding standard product detection area exceeds a preset spacing; if it exceeds, the product to be detected is determined to be defective; otherwise, it is determined to be non-defective. For example, in one embodiment, one (or more) horizontal lines can be established at specific locations in the detection area, and multiple closed contour lines of the detection area can be calculated. The corresponding spacings on these horizontal lines are then compared with the corresponding spacings in the standard product's detection area. Finally, based on the comparison results, it is determined whether the object to be tested is defective. The method for determining whether the object to be tested is defective using the multiple spacings of the detection area and the standard product's detection area can be designed according to actual needs. For example, the difference between each spacing in the detection area and the corresponding spacing in the standard product's detection area can be calculated. If all differences do not exceed a preset difference, the object to be tested is determined to be non-defective; conversely, if any difference exceeds the preset difference, the object to be tested is determined to be defective. In summary, the defect detection equipment and method of the present invention, through the design of the closed contour line establishment step, the integration step, and the defect detection step, can improve upon the conventional technology, which is prone to missed detection and false detection. Moreover, the defect detection equipment and method of the present invention can effectively improve the defect detection quality. The above description is only a preferred embodiment of the present invention and does not limit the patent scope of the present invention. Therefore, all equivalent technical changes made based on the description and drawings of the present invention are included within the protection scope of the present invention. 100: Defect Detection Equipment 1: Processing Device 11: Binarized Image 111: Closed Contour Line 12: Defect Detection Image 12A: Defect Detection Image 121: Detection Area 13: Standard Product Defect Detection Image 2: Image Acquisition Device 21: Acquired Image 211: Circuit Board Image 212: Detected Object Image 3: Stage 4: Display Device A: Object to be Detected S10: Closed Contour Line Establishment Step S11: Integration Step S12: Defect Detection Step Figure 1 is a schematic diagram of the defect detection device of the present invention. Figure 2 is a block diagram of the defect detection device of the present invention. Figure 3 is a schematic diagram of the captured image by the image capturing device of the defect detection equipment of the present invention. Figure 4 is a flowchart illustrating the defect detection method of the present invention. Figures 5 to 7 are schematic diagrams of different binarized images in the closed contour line establishment step of the defect detection method of the present invention. Figure 8 is a schematic diagram of a defect detection image including a closed contour line and an image of the object to be detected in the defect detection method of the present invention. Figure 9 is a schematic diagram of a defect detection image containing only a closed outline in the defect detection method of the present invention. Figure 10 is a partially enlarged schematic diagram of Figure 9. S10: Steps for creating a closed contour line S11: Integration Steps S12: Defect Detection Procedures
Claims
1. A defect detection device includes a processing unit, an image capturing unit, and a stage. The stage carries an object to be inspected. The image capturing unit captures the object to be inspected, which is placed on the stage, to generate an image of the object. The processing unit is electrically connected to the image capturing unit and can receive the image of the object and execute a defect detection method. The defect detection method includes: a closed contour line establishment step: performing N binarization processes on the image of the object based on N different preset grayscale values to generate N binarized images, and establishing a closed contour line in each of the binarized images; wherein... N is a positive integer greater than or equal to 1, and N is a positive integer not greater than 256; An integration step: Integrating the closed contour lines in N binarized images into a defect detection image; A defect detection step: Dividing the defect detection image into at least one detection region, and comparing the detection region with a standard product detection region in a corresponding standard product defect detection image to determine whether the closed contour lines contained in the detection region meet at least one defect condition; If the closed contour lines contained in the detection region meet the defect condition, the object to be detected is determined to be a defective product; If the closed contour lines contained in the detection region do not meet the defect condition, the object to be detected is determined to be a non-defective product; Wherein, one of the non-defective objects to be detected is defined as a standard product, the defect detection image corresponding to the standard product in the integration step is defined as the standard product defect detection image, and the detection region corresponding to the standard product in the defect detection step is defined as the standard product detection region. The defect detection equipment as described in claim 1, wherein... In the defect detection step, one of the defect conditions is: whether the difference between the total number of closed contour lines contained in the detection area and the total number of closed contour lines contained in the corresponding standard product detection area exceeds a preset quantity difference threshold; if it exceeds the preset quantity difference threshold, the product to be detected is determined to be a defective product. The defect detection equipment as described in claim 1, wherein... The defect detection image is an image independent of the image of the object being detected, or the defect detection image is N closed contour lines superimposed on the image of the object being detected. The defect detection equipment as described in claim 1, wherein... In the closed contour line establishment step, the N preset grayscale values arranged in sequence are an arithmetic sequence, and the difference between any two adjacent preset grayscale values is the same. The defect detection equipment as described in claim 4, wherein... N is a positive integer greater than or equal to 5. The defect detection equipment as described in claim 1, wherein... In the defect detection step, one of the defect conditions is: whether the difference between the total area of the detection area and the total area of the standard product detection area exceeds a preset total area threshold; if it exceeds the preset total area threshold, the product to be detected is determined to be a defective product; each total area is the sum of the areas surrounded by all the closed contour lines in the detection area; each total area is the sum of the areas surrounded by all the closed contour lines in the standard product detection area. The defect detection equipment as described in claim 1, wherein... The object to be tested is a solder filler or a colloid on a circuit board. The defect detection equipment as described in claim 1, wherein... The defect detection device further includes a display device electrically connected to the processing device. After the processing device performs the closed contour line establishment step, the processing device can transmit the defect detection image to the display device so that the display device displays the defect detection image. The defect detection equipment as described in claim 1, wherein... In the defect detection step, one of the defect conditions is: determining whether the difference between the minimum spacing of multiple closed contour lines in each detection area and the minimum spacing of multiple closed contour lines in the standard product detection area exceeds a preset difference. If the difference exceeds the preset value, the item to be tested is determined to be defective. The defect detection equipment as described in claim 1, wherein... In the defect detection step, one of the defect conditions is: determining whether the difference between the maximum spacing of multiple closed contour lines in each detection area and the maximum spacing of multiple closed contour lines in the standard product detection area exceeds a preset difference. If the difference exceeds the preset value, the item to be tested is determined to be defective. The defect detection equipment as described in claim 1, wherein... In the defect detection step, one of the defect conditions is: determining whether the difference between the average spacing of multiple closed contour lines in each detection area and the average spacing of multiple closed contour lines in the standard product detection area exceeds a preset difference. If the difference exceeds the preset value, the item to be tested is determined to be defective. A defect detection method is applicable to a processing device of a defect detection equipment, the defect detection equipment further comprising an image capturing device and a stage, the stage for carrying an object to be inspected, the image capturing device for capturing the object to be inspected placed on the stage to generate an image of the object to be inspected, the processing device being electrically connected to the image capturing device and capable of receiving the image of the object to be inspected; the defect detection method comprises: a closed contour line establishment step: binarizing the image of the object to be inspected N times according to N different preset grayscale values to generate N binarized images, and establishing a closed contour line in each of the binarized images; wherein N is a positive integer greater than or equal to 1 and N is a positive integer not greater than 256; an integration step: integrating the closed contour lines in the N binarized images into a defect detection image. A defect detection step: The defect detection image is divided into at least one detection area, and each detection area is compared with a corresponding standard product defect detection area in a standard product defect detection image to determine whether the closed contour line contained in the detection area meets at least one defect condition; if the closed contour line contained in the detection area meets the defect condition, the product to be detected is determined to be defective; if the closed contour line contained in the detection area does not meet the defect condition, the product to be detected is determined to be non-defective; wherein... One of the test objects determined to be non-defective is defined as the standard product defect detection image in the defect detection image during the closed contour line establishment step, and each of the detection areas in the defect detection step is defined as the standard product detection area. The defect detection method as described in claim 12, wherein... In the defect detection step, one of the defect conditions is whether the difference between the total number of closed contour lines contained in the detection area and the total number of closed contour lines contained in the corresponding standard product detection area exceeds a preset quantity difference threshold. The defect detection method as described in claim 12, wherein... The defect detection image is an image independent of the image of the object being detected, or the defect detection image is N closed contour lines superimposed on the image of the object being detected. The defect detection method as described in claim 12, wherein... In the closed contour line establishment step, the N preset grayscale values arranged in sequence are an arithmetic sequence, and the difference between any two adjacent preset grayscale values is the same. The defect detection method as described in claim 15, wherein... N is a positive integer greater than or equal to 5. The defect detection method as described in claim 12, wherein... In the defect detection step, one of the defect conditions is: whether the difference between the total area of the detection area and the total area of the standard product detection area exceeds a preset total area threshold; each total area is the sum of the areas surrounded by all the closed contour lines in the detection area; each total area is the sum of the areas surrounded by all the closed contour lines in the standard product detection area. The defect detection method as described in claim 12, wherein... The object to be tested is a solder filler or a colloid on a circuit board. The defect detection method as described in claim 12, wherein... In the defect detection step, one of the defect conditions is: determining whether the difference between the minimum spacing of multiple closed contour lines in each detection area and the minimum spacing of multiple closed contour lines in the standard product detection area exceeds a preset difference. If the difference exceeds the preset value, the item to be tested is determined to be defective. The defect detection method as described in claim 12, wherein... In the defect detection step, one of the defect conditions is: determining whether the difference between the maximum spacing of multiple closed contour lines in each detection area and the maximum spacing of multiple closed contour lines in the standard product detection area exceeds a preset difference. If the difference exceeds the preset value, the item to be tested is determined to be defective. The defect detection method as described in claim 12, wherein... In the defect detection step, one of the defect conditions is: determining whether the difference between the average spacing of multiple closed contour lines in each detection area and the average spacing of multiple closed contour lines in the standard product detection area exceeds a preset difference. If the difference exceeds the preset value, the item to be tested is determined to be defective.
