PIN defect detection method, device, electronic device and storage medium

By using N-line laser cameras to acquire point cloud data on the circuit board to generate depth maps, the problem of PIN pin defect detection is solved, accurate detection and position indication of PIN pin defects is achieved, and the installation and communication reliability of electronic devices is improved.

CN115035031BActive Publication Date: 2025-04-29ZHEJIANG HUARAY TECH CO LTD

Patent Information

Application Number
CN202210492875.2
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-05-07
Publication Date
2025-04-29
Estimated Expiration
2042-05-07

AI Technical Summary

Technical Problem

The prior art is difficult to effectively detect defects of PIN pins, especially in cases where installation failure or communication failure is caused by installation position deviation.

Method used

An N-line laser camera is used to collect point cloud data of the circuit board, generate a depth map of the PIN pin, and compare it with the depth map of the reference circuit board to determine whether the PIN pin is missing, and output missing position indication information.

Benefits of technology

It realizes high-precision defect detection of PIN pins, can accurately determine whether the PIN pin is missing, and provides position indication information, improving the installation reliability and communication success rate of electronic equipment.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115035031B_ABST
    Figure CN115035031B_ABST
Patent Text Reader

Abstract

The present application discloses a defect detection method, device, electronic device and storage medium for PIN needles, belonging to the field of defect detection technology. The method comprises: acquiring point cloud data of a circuit board to be detected acquired by N line laser cameras, generating a first depth map of the PIN needles on the circuit board to be detected based on the point cloud data acquired by each line laser camera, judging whether the PIN needles on the circuit board to be detected are missing based on the first depth map and the second depth map of the PIN needles on the reference circuit board, and then outputting a defect detection result including at least position indication information of the missing PIN needles on the circuit board to be detected, wherein N is determined based on the size of the circuit board to be detected and the acquisition range of a single line laser camera, and the PIN needles on the reference circuit board do not have defects, thereby providing a solution for defect detection of PIN needles with the aid of line laser cameras.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of defect detection technology, and in particular to a PIN needle defect detection method, device, electronic device and storage medium. Background Art

[0002] PIN pin is a common electronic device connector, which has the advantages of reliable communication connection and convenient disassembly and assembly. These advantages make it widely used in the microelectronics and automotive electronics industries.

[0003] Generally, there are strict requirements for the installation position of PIN pins on circuit boards. If the installation position of PIN pins deviates, they will not be installed or communication will fail. Therefore, it is particularly important to detect defects in PIN pins. However, how to detect defects in PIN pins is a technical problem that needs to be solved urgently. Summary of the invention

[0004] The embodiments of the present application provide a PIN pin defect detection method, device, electronic device and storage medium, so as to provide a reasonable PIN pin defect detection solution.

[0005] In a first aspect, an embodiment of the present application provides a PIN defect detection method, comprising:

[0006] Acquire point cloud data of the circuit board to be inspected collected by N line laser cameras, wherein N is determined based on the size of the circuit board to be inspected, the PIN needle setting method, and the collection range of a single line laser camera;

[0007] Based on the point cloud data collected by each line laser camera, a first depth map of the PIN needles on the circuit board to be inspected is generated;

[0008] Based on the first depth map and the second depth map of the PIN pins on the reference circuit board, determining whether the PIN pins on the circuit board to be tested are missing, and the PIN pins on the reference circuit board are not defective;

[0009] Outputting a defect detection result, wherein the defect detection result at least includes position indication information of missing PIN needles on the circuit board to be detected.

[0010] In some embodiments, the N line laser cameras include a master camera and N-1 slave cameras, and based on the point cloud data collected by each line laser camera, a first depth map of the PIN needles on the circuit board to be inspected is generated, including:

[0011] Based on the conversion relationship between the coordinate system of each slave camera and the coordinate system of the master camera, converting the point cloud data collected by the slave camera into the coordinate system of the master camera;

[0012] The point cloud data converted by each slave camera is fused with the point cloud data of the master camera to obtain complete point cloud data of the circuit board to be inspected;

[0013] Based on the complete point cloud data, the first depth map is generated.

[0014] In some embodiments, generating the first depth map based on the complete point cloud data includes:

[0015] Selecting target point cloud data of the PIN needle on the circuit board to be detected from the complete point cloud data;

[0016] Projection processing is performed on the target point cloud data to obtain the first depth map.

[0017] In some embodiments, when at least two line laser cameras are arranged side by side, there is a common viewing area and a data collection delay between adjacent line laser cameras arranged side by side, and the data collection delay satisfies that the adjacent cameras do not repeatedly collect data in the common viewing area.

[0018] In some embodiments, the conversion relationship between each slave camera and the coordinate system of the main camera is obtained by calibrating a special-shaped calibration block, the top surface of the special-shaped calibration block has at least one polygonal block, and two non-adjacent side surfaces of the special-shaped calibration block are symmetrically provided with rectangular blocks.

[0019] In some embodiments, judging whether the PIN pin on the circuit board to be detected is missing based on the first depth map and the second depth map of the PIN pin on the reference circuit board includes:

[0020] Acquire the outline of the PIN needle on the circuit board to be detected from the first depth map;

[0021] Comparing the outline of each PIN needle marked in the second depth map with the outline of the PIN needle on the circuit board to be detected;

[0022] If there is no successfully matched contour on the circuit board to be detected, it is determined that the PIN needle at the corresponding position on the circuit board to be detected is missing.

[0023] In some embodiments, obtaining the outline of the PIN needle on the circuit board to be detected from the first depth map includes:

[0024] Performing contour extraction on the first depth map to obtain a plurality of stitch contours;

[0025] According to the rule that two pin outlines belonging to the same PIN are closest to each other, the pin outlines are grouped;

[0026] Each group of pin outlines is determined as the outline of a PIN on the circuit board to be detected.

[0027] In some embodiments, it also includes:

[0028] Based on the point cloud data corresponding to each non-missing PIN pin on the circuit board to be detected, detecting whether the non-missing PIN pin is skewed and / or has abnormal height; and

[0029] The defect detection result also includes a skew detection result and / or a height abnormality detection result of each non-missing PIN needle on the circuit board to be detected.

[0030] In some embodiments, based on the point cloud data corresponding to each non-missing PIN pin on the circuit board to be detected, detecting whether the non-missing PIN pin is skewed includes:

[0031] Determine the three-dimensional coordinates of the two pins in each non-missing PIN pin based on the point cloud data in the two pin outlines of each non-missing PIN pin and the three-dimensional scaling ratio of the first depth map;

[0032] Determine the distance between the two pins of the non-missing PIN pin based on the three-dimensional coordinates of the two pins;

[0033] If the spacing is not within the marking spacing range at the corresponding position on the reference circuit board, it is determined that the non-missing PIN needles are skewed.

[0034] In some embodiments, based on the point cloud data corresponding to each non-missing PIN pin on the circuit board to be detected, detecting whether the non-missing PIN pin is highly abnormal includes:

[0035] Determine the three-dimensional coordinates of the two pins in each non-missing PIN pin based on the point cloud data in the two pin outlines of each non-missing PIN pin and the three-dimensional scaling ratio of the first depth map;

[0036] Determine the height of each pin in the non-missing PIN pin based on the three-dimensional coordinates of the pin;

[0037] If the height difference between the height of any pin of the non-missing PIN pin and the height of the mark at the corresponding position on the reference circuit board exceeds the set height range, it is determined that the height of the non-missing PIN pin is abnormal.

[0038] In a second aspect, an embodiment of the present application provides a PIN defect detection device, comprising:

[0039] An acquisition module, used to acquire point cloud data of the circuit board to be inspected acquired by N line laser cameras, wherein N is determined based on the size of the circuit board to be inspected and the acquisition range of a single line laser camera;

[0040] A generating module, used for generating a first depth map of the PIN needles on the circuit board to be detected based on the point cloud data collected by each line laser camera;

[0041] A detection module, configured to determine whether the PIN pins on the circuit board to be detected are missing based on the first depth map and the second depth map of the PIN pins on the reference circuit board, and whether the PIN pins on the reference circuit board are not defective;

[0042] The output module is used to output the defect detection result, wherein the defect detection result at least includes the position indication information of the missing PIN needle on the circuit board to be detected.

[0043] In some embodiments, the N line laser cameras include a master camera and N-1 slave cameras, and based on the point cloud data collected by each line laser camera, a first depth map of the PIN needles on the circuit board to be inspected is generated, including:

[0044] Based on the conversion relationship between the coordinate system of each slave camera and the coordinate system of the master camera, converting the point cloud data collected by the slave camera into the coordinate system of the master camera;

[0045] The point cloud data converted by each slave camera is fused with the point cloud data of the master camera to obtain complete point cloud data of the circuit board to be inspected;

[0046] Based on the complete point cloud data, the first depth map is generated.

[0047] In some embodiments, generating the first depth map based on the complete point cloud data includes:

[0048] Selecting target point cloud data of the PIN needle on the circuit board to be detected from the complete point cloud data;

[0049] Projection processing is performed on the target point cloud data to obtain the first depth map.

[0050] In some embodiments, when at least two line laser cameras are arranged side by side, there is a common viewing area and a data collection delay between adjacent line laser cameras arranged side by side, and the data collection delay satisfies that the adjacent cameras do not repeatedly collect data in the common viewing area.

[0051] In some embodiments, the conversion relationship between each slave camera and the coordinate system of the main camera is obtained by calibrating a special-shaped calibration block, the top surface of the special-shaped calibration block has at least one polygonal block, and two non-adjacent side surfaces of the special-shaped calibration block are symmetrically provided with rectangular blocks.

[0052] In some embodiments, judging whether the PIN pin on the circuit board to be detected is missing based on the first depth map and the second depth map of the PIN pin on the reference circuit board includes:

[0053] Acquire the outline of the PIN needle on the circuit board to be detected from the first depth map;

[0054] Comparing the outline of each PIN needle marked in the second depth map with the outline of the PIN needle on the circuit board to be detected;

[0055] If there is no successfully matched contour on the circuit board to be detected, it is determined that the PIN needle at the corresponding position on the circuit board to be detected is missing.

[0056] In some embodiments, obtaining the outline of the PIN needle on the circuit board to be detected from the first depth map includes:

[0057] Performing contour extraction on the first depth map to obtain a plurality of stitch contours;

[0058] According to the rule that two pin outlines belonging to the same PIN are closest to each other, the pin outlines are grouped;

[0059] Each group of pin outlines is determined as the outline of a PIN on the circuit board to be detected.

[0060] In some embodiments, it also includes:

[0061] Based on the point cloud data corresponding to each non-missing PIN pin on the circuit board to be detected, detecting whether the non-missing PIN pin is skewed and / or has abnormal height; and

[0062] The defect detection result also includes a skew detection result and / or a height abnormality detection result of each non-missing PIN needle on the circuit board to be detected.

[0063] In some embodiments, based on the point cloud data corresponding to each non-missing PIN pin on the circuit board to be detected, detecting whether the non-missing PIN pin is skewed includes:

[0064] Determine the three-dimensional coordinates of the two pins in each non-missing PIN pin based on the point cloud data in the two pin outlines of each non-missing PIN pin and the three-dimensional scaling ratio of the first depth map;

[0065] Determine the distance between the two pins of the non-missing PIN pin based on the three-dimensional coordinates of the two pins;

[0066] If the spacing is not within the marking spacing range at the corresponding position on the reference circuit board, it is determined that the non-missing PIN needles are skewed.

[0067] In some embodiments, based on the point cloud data corresponding to each non-missing PIN pin on the circuit board to be detected, detecting whether the non-missing PIN pin is highly abnormal includes:

[0068] Determine the three-dimensional coordinates of the two pins in each non-missing PIN pin based on the point cloud data in the two pin outlines of each non-missing PIN pin and the three-dimensional scaling ratio of the first depth map;

[0069] Determine the height of each pin in the non-missing PIN pin based on the three-dimensional coordinates of the pin;

[0070] If the height difference between the height of any pin of the non-missing PIN pin and the height of the mark at the corresponding position on the reference circuit board exceeds the set height range, it is determined that the height of the non-missing PIN pin is abnormal.

[0071] In a third aspect, an embodiment of the present application provides an electronic device, comprising: at least one processor, and a memory communicatively connected to the at least one processor, wherein:

[0072] The memory stores a computer program executable by at least one processor. The computer program is executed by the at least one processor so that the at least one processor can perform the above-mentioned PIN pin defect detection method.

[0073] In a fourth aspect, an embodiment of the present application provides a storage medium. When a computer program in the storage medium is executed by a processor of an electronic device, the electronic device can execute the above-mentioned PIN pin defect detection method.

[0074] In an embodiment of the present application, point cloud data of a circuit board to be inspected acquired by N line laser cameras is obtained, and a first depth map of PIN needles on the circuit board to be inspected is generated based on the point cloud data acquired by each line laser camera. Based on the first depth map and the second depth map of the PIN needles on the reference circuit board, it is determined whether the PIN needles on the circuit board to be inspected are missing, and then a defect detection result including at least position indication information of the missing PIN needles on the circuit board to be inspected is output, wherein N is determined based on the size of the circuit board to be inspected and the acquisition range of a single line laser camera, and the PIN needles on the reference circuit board do not have defects, thereby providing a solution for defect detection of PIN needles with the aid of a line laser camera. BRIEF DESCRIPTION OF THE DRAWINGS

[0075] The drawings described herein are used to provide a further understanding of the present application and constitute a part of the present application. The illustrative embodiments of the present application and their descriptions are used to explain the present application and do not constitute an improper limitation on the present application. In the drawings:

[0076] Figure 1A schematic diagram of the structure of a PIN needle provided in an embodiment of the present application;

[0077] Figure 2 A schematic diagram of a detection system provided in an embodiment of the present application;

[0078] Figure 3 Three views of a special-shaped calibration block provided in an embodiment of the present application;

[0079] Figure 4 A depth map of a PIN needle on a circuit board provided in an embodiment of the present application;

[0080] Figure 5 A schematic diagram of marking missing PIN needles and non-missing PIN needles in a depth map provided in an embodiment of the present application;

[0081] Figure 6 A schematic diagram of marking skewed PIN needles and non-skewed PIN needles in a depth map provided by an embodiment of the present application;

[0082] Figure 7 A flowchart of a PIN defect detection method provided in an embodiment of the present application;

[0083] Figure 8 A flowchart for generating a first depth map of PIN needles on a circuit board to be detected provided in an embodiment of the present application;

[0084] Fig. 9 A flowchart for determining whether a PIN on a circuit board to be tested is missing is provided in an embodiment of the present application;

[0085] Fig.10 A flowchart for detecting whether a non-missing PIN needle is skewed is provided in an embodiment of the present application;

[0086] Fig.11 A flowchart for detecting whether a non-missing PIN needle is highly abnormal is provided in an embodiment of the present application;

[0087] Fig.12 A schematic diagram of the structure of a PIN defect detection device provided in an embodiment of the present application;

[0088] Fig.13 A schematic diagram of the hardware structure of an electronic device for implementing a PIN needle defect detection method provided in an embodiment of the present application. DETAILED DESCRIPTION

[0089] In order to provide a reasonable PIN needle defect detection solution, the embodiments of the present application provide a PIN needle defect detection method, device, electronic device and storage medium.

[0090] The preferred embodiments of the present application are described below in conjunction with the drawings in the specification. It should be understood that the preferred embodiments described herein are only used to illustrate and explain the present application, and are not used to limit the present application. In addition, the embodiments and features in the embodiments of the present application may be combined with each other if there is no conflict.

[0091] In order to facilitate the understanding of this application, the technical terms involved in this application are:

[0092] Line laser camera generally refers to 3D line laser high-precision camera. The principle of line laser camera is laser triangulation ranging method, which is: a line of laser is used to illuminate the object to be measured at a certain incident angle, and the laser is reflected and refracted at the object to be measured. At another angle, the reflected laser is focused by lens to form an image, and the light spot is imaged on the charge-couple device (CCD) position sensor. When the object to be measured moves along the laser direction, the light spot on the position sensor moves, and its displacement corresponds to the moving distance of the object to be measured, so the moving distance of the object to be measured can be calculated.

[0093] Point cloud data generally includes multiple laser points, each of which contains rich measurement information such as coordinates, brightness, reflection intensity, etc.

[0094] The scheme of the embodiment of the present application is introduced below in conjunction with specific embodiments.

[0095] 1. PIN needle.

[0096] Generally, a circuit board may have PIN pins on one side or on both sides. The size of the circuit board is 10cm to 30cm wide and 20cm to 50cm long, and the height of the PIN pin is 1cm to 5cm. The PIN pin generally includes two pins. Figure 1 This is a schematic diagram of the structure of a PIN needle provided in an embodiment of the present application, where B represents the distance between two pins of the PIN needle.

[0097] PIN defect types generally include the following three categories:

[0098] 1. Missing PIN pins: The number and position of PIN pins on a circuit board with fixed specifications are fixed. If the PIN pins are not installed, the PIN pins will be missing, resulting in communication failure during use.

[0099] 2. PIN pins are skewed: The PIN pins on the circuit board are installed vertically, and a PIN pin contains two pins. If any pin is skewed, it will cause the connection of electronic components to fail.

[0100] 3. Abnormal PIN height: The height of the PIN at a fixed position on a circuit board with fixed specifications is fixed. If the PIN height is too high or too low (that is, the height difference between the PIN height and the marked height at the fixed position exceeds the set height range), it will cause failure to connect electronic components.

[0101] 2. Detection system.

[0102] Since the width of the circuit board can reach 30cm, and the measurement range of a single line laser camera is generally 20cm, two line laser cameras can be used to collect circuit boards to detect the PIN needles on the widest circuit board, and the common viewing area of ​​adjacent line laser cameras can be 3-4cm to reduce the difficulty of installing the line laser camera. In addition, blue line laser can be used for data collection, because blue line laser has a strong ability to resist ambient light interference and can capture the top of a very small area of ​​PIN needles.

[0103] Take the inspection of the PIN pins on one side of the circuit board as an example. Figure 2 A schematic diagram of a detection system provided in an embodiment of the present application includes a motion platform 1, two line laser cameras 2, a circuit board 3 and a mounting bracket 4. The installation method is: the two line laser cameras 2 are fixed side by side directly above the motion platform 1, and the two line laser cameras 2 have an overlapping field of view of 3 to 4 cm.

[0104] Assume that the two line laser cameras are L1 and L2. When the line laser cameras L1 and L2 are installed in parallel, the laser line generated by the line laser camera L1 during scanning will enter the field of view of the line laser camera L2, thereby generating overlapping point clouds. To this end, a trigger delay can be set, that is, when the line laser camera L1 emits a blue laser line, the line laser camera L2 does not trigger shooting. The setting method is: the trigger delay of the line laser camera L1 is 0, and the trigger delay of the line laser camera L2 is greater than the exposure value. It should be noted that if more line laser cameras are required for splicing, the trigger delay setting method is the same.

[0105] When the motion platform is started, the motion platform can drive the circuit board to move. When the line laser cameras L1 and L2 are turned on, the line laser cameras L1 and L2 respectively detect the circuit boards in the field of view to obtain multi-frame point cloud data. After the detection is completed, the line laser cameras L1 and L2 respectively fuse the multi-frame point cloud data collected by themselves to obtain the point cloud data of the circuit board collected by themselves. After that, the line laser camera L1 (assuming it is the main camera) can fuse the point cloud data collected by itself and the line laser camera L2 (assuming it is the slave camera) to obtain the complete point cloud data of the circuit board.

[0106] In this way, defect measurement of PIN needles on the motion platform helps to realize factory automated assembly and facilitates linkage with robotic arms.

[0107] 3. Calibration of line laser camera.

[0108] When calibrating line laser cameras L1 and L2, the special-shaped calibration block can be placed in the common viewing area of ​​line laser cameras L1 and L2 on the motion platform, so that both line laser cameras L1 and L2 can collect the special-shaped calibration block. After obtaining the point cloud data collected by line laser cameras L1 and L2, the Fast Robust-ICP algorithm can be used to calculate the rotation matrix (R) and translation matrix (T) between the point cloud data collected by line laser camera L2 and the point cloud data collected by line laser camera L1. R and T are the calibration results of line laser cameras L1 and L2. In subsequent measurements, the point cloud data collected by line laser camera L2 can be converted to the coordinate system of line laser camera L1 through rigid transformation (R, T). After that, the point cloud data of the two can be spliced ​​to obtain the complete point cloud data of the circuit board.

[0109] Figure 3 A three-view drawing of a special-shaped calibration block provided in an embodiment of the present application, wherein three polygonal blocks (i.e., a triangular block, a circular block, and a square block) are dispersedly arranged on the top of the special-shaped calibration block, and rectangular blocks are symmetrically arranged on two opposite sides of the special-shaped calibration block.

[0110] exist Figure 2 In the detection system shown, the common viewing area of ​​the two parallel installed line laser cameras is the top surface of the special-shaped calibration block. In this way, the two line laser cameras can jointly capture images with rich geometric features, which is conducive to more accurate point cloud matching between the two and more accurate calibration of the conversion relationship between the two, that is, more accurate determination of R and T between the two.

[0111] In addition, it should be noted that in some scenarios, such as when inspecting whether the PIN pins on both sides of a circuit board are defective, two line laser cameras are installed opposite to each other (i.e., two line laser cameras shoot at each other). At this time, both line laser cameras can capture the bottom plate of the circuit board but there is no overlapping field of view. In this case, the protruding rectangular blocks on both sides of the special-shaped calibration block can be used to complete the calibration of the two line laser cameras. In other words, Figure 3 The special-shaped calibration block shown can complete dual-camera calibration work in various installation forms.

[0112] 4. Mark the PIN.

[0113] Since the height and position of the PIN pins on different batches of circuit boards are inconsistent, in order to complete the automated measurement, one or more reference circuit boards can be selected from the current batch of circuit boards. The selection criteria for the reference circuit boards are: the height of the PIN pins on the circuit board is normal, the position of the PIN pins is correct, and the PIN pins are not skewed. Then, the point cloud data of the top of the PIN pins on the reference circuit board can be scanned and obtained, and the depth map of the PIN pins on the reference circuit board can be generated based on these point cloud data. The positions of all PIN pins are located on the depth map, and the two pins of each PIN pin are numbered, and the height of each pin and the spacing between the pins are recorded.

[0114] 5. Defect detection.

[0115] 1. Point cloud filtering.

[0116] Since the placement heights of PIN pins on circuit boards of different specifications are different, the height cannot be used to directly filter the point cloud data of the top of the PIN pins on the circuit board. Therefore, the circuit board plane can be located based on the complete point cloud data, and the circuit board plane can be used as the reference height. The point cloud data above the plane is the point cloud data of the PIN pins on the circuit board.

[0117] 2. PIN missing detection.

[0118] Step 1: Project the point cloud data of the PIN into a depth map along the direction of the normal vector of the circuit board plane.

[0119] Generally, the point cloud data of a PIN needle includes multiple laser points, each of which has three-dimensional coordinates (x, y, z). First, the maximum and minimum values ​​of the x, y, and z coordinate values ​​in these point cloud data relative to the plane of the circuit board can be calculated. The difference between the maximum and minimum values ​​of the x coordinate divided by the preset x-direction scaling factor is used as the width of the depth map, the difference between the maximum and minimum values ​​of the y coordinate divided by the preset y-direction scaling factor is used as the height of the depth map, and the difference between the maximum and minimum values ​​of the z coordinate divided by 255 is used as the height represented by the unit grayscale value of a single pixel on the depth map. Then, each laser point in the PIN needle point cloud data can be traversed, and the laser point can be projected into the depth map according to the scaling ratio to obtain Figure 4 The depth map shown in Figure 4 In the diagram, each white dot represents a pin of the PIN. The brighter the white dot, the higher the height of the corresponding pin.

[0120] Step 2: Locate the top of the PIN.

[0121] The point cloud data at the top of the PIN needle is at a higher height, and the grayscale value on the depth map is larger, showing as a bright spot ( Figure 4The white origin in the image indicates that the bright spot is the position of the top of the PIN pin, and the bright spot is close to a circle. Therefore, the LOG algorithm can be used to locate the bright spot in the depth map to obtain the pixel position of the top of each PIN pin. Then, the located PIN pin position can be matched with the PIN pin position marked in the depth map of the reference circuit board to determine whether the PIN pin at the corresponding position on the current circuit board is missing. The positions of the missing PIN pins and the non-missing PIN pins can also be marked on the depth map of the current circuit board, as shown in FIG. Figure 5 As shown, in Figure 5 In the figure, the light grey box marks the position of the non-missing PIN, and the dark grey box marks the position where the missing PIN should be.

[0122] In this way, using the entire circuit board plane as the reference plane can make the measurement value more accurate, and only projecting the point cloud data of the PIN needle into a depth map can reduce the algorithm time consumption and improve the detection speed.

[0123] 3. PIN needle height detection.

[0124] According to the two bright spots at the top of each PIN located on the depth map of the current circuit board, the center coordinates and average grayscale value of each bright spot can be obtained. Based on the center coordinates, average grayscale value, and the scaling factors in the x and y directions and the maximum and minimum values ​​of the point cloud z value, the three-dimensional coordinates corresponding to the top of the corresponding pin can be calculated. The distance from this three-dimensional coordinate to the plane of the circuit board can be calculated to obtain the height of the corresponding pin. The height of each pin is compared with the height marked at the corresponding position on the reference circuit board to determine whether the height of the PIN is abnormal. If so, the abnormal position can also be marked on the depth map.

[0125] 4. PIN needle spacing detection.

[0126] A PIN has two pins, and the tops of the two pins appear as two bright spots on the depth map. The distance between the two pins of a PIN on the circuit board is smaller than the distance between any two PINs. Therefore, the bright spots closest to a bright spot are the two pins of the same PIN. Bright spot matching can be performed based on the position of the bright spot center, that is, pin matching of the PIN.

[0127] Specifically, all bright spots are traversed, and all bright spots closest to the bright spots are matched to form a one-way bright spot pair. Then, a secondary match is performed in the one-way bright spot pair, that is, whether the matched points are closest to each other. If the matched bright spot pairs are closest to each other, the match is completed, otherwise, the bright spots that failed to match are recorded. In this way, two closest matches are used, the first one is to find the closest bright spot, and the second one is to check whether the bright spot pairs are closest to each other. The two bright spot matches can effectively reduce the mismatch rate and improve the accuracy of PIN needle positioning.

[0128] For the successfully matched bright spot pairs, the three-dimensional coordinates of the center position of each bright spot can be calculated based on the center coordinates, grayscale value, and scaling factor of each bright spot on the depth map. The distance between the three-dimensional coordinates of the center positions of the two bright spots in the bright spot pair is the spacing between the two pins of the PIN. By comparing this spacing with the spacing marked at the corresponding position on the reference circuit board, it can be determined whether the PIN pin is skewed. If there is a skew, the skewed position is marked on the depth map, such as Figure 6 As shown, in Figure 6 In the figure, the dark gray marks are the skewed PIN pins, and the other colors are the non-skewed PIN pins. The number on the left side of each PIN pin in the figure indicates the PIN pin number, and the number on the right side of each PIN pin indicates the distance between the two pins in the PIN pin.

[0129] 6. Output of test results.

[0130] For the PIN pins on a circuit board, if there are no defects such as missing PIN pins, skewed PIN pins, abnormal PIN pin height, etc., it will display OK, otherwise, it will display NG, and the depth map can be output, and the defect location and defect category can be marked in the depth map. Table 1 is a measurement result in a tabular form, as follows:

[0131] Table 1 Measurement results

[0132]

[0133] The solution provided in the embodiment of the present application has the following advantages:

[0134] 1. High measurement accuracy.

[0135] In this proposal, the 3D line laser used can scan the surface of the object to obtain three-dimensional point cloud data. The plane obtained by fitting the circuit board is used as the reference plane, and the point cloud data of the PIN needle is projected onto the plane where the circuit board is located. The projection accuracy can reach 0.01mm. The top of the PIN needle is located on the depth map and mapped into three-dimensional coordinates. The distance from the three-dimensional point corresponding to the top of the PIN needle to the circuit board is calculated to obtain the height of the PIN needle at the corresponding position. The measurement accuracy can reach 0.02mm.

[0136] 2. High versatility.

[0137] In this proposal, if the size of the circuit board is large, more 3D line lasers can be set up and the inspection can be completed using a similar method. If the height or position of the PIN pins on the circuit board is inconsistent, the reference circuit board can be replaced during the PIN pin marking stage to change the height and position of the PIN pins for comparison, thereby achieving defect detection of PIN pins on circuit boards of any specifications.

[0138] 3. Strong scalability.

[0139] This proposal includes the camera calibration stage, PIN needle calibration stage, PIN needle defect detection stage and result output stage. Each stage can be developed modularly. In this way, when encountering similar detections, similar modules can be borrowed to save development cycles, so the project has good portability.

[0140] The defect detection of the PIN needle proposed in this application is explained below with reference to a flow chart.

[0141] Figure 7 A flow chart of a PIN needle defect detection method provided in an embodiment of the present application, the method can be applied to a line laser camera or to a device independent of the line laser camera, and the method includes the following steps.

[0142] In step 701, point cloud data of the circuit board to be inspected collected by N line laser cameras is obtained, wherein N is determined based on the size of the circuit board to be inspected, the PIN needle setting method and the collection range of a single line laser camera.

[0143] Among them, the PIN needle setting method includes single-sided setting and double-sided setting.

[0144] When the PCB to be inspected has PIN pins on one side, if the size of the PCB to be inspected exceeds the acquisition range of a single line laser camera, at least two line laser cameras can be set side by side to collect data of the PCB to be inspected. For the installation method of the line laser camera, please refer to Figure 2 At this time, there is a common viewing area between the adjacent line laser cameras, and there is a data acquisition delay between the pair of adjacent line laser cameras. The data acquisition delay can satisfy the requirement that the pair of adjacent line laser cameras do not repeatedly collect data in the common viewing area. In this way, the installation requirements of the line laser cameras can be reduced and the adjacent line laser cameras can be ensured not to repeatedly collect data in the common viewing area.

[0145] When PIN needles are set on both sides of the circuit board to be inspected, two groups of line laser cameras are set opposite to each other, and one group of line laser cameras is used to scan the PIN needles on one side. There is no common viewing area between the two groups of line laser cameras. However, for any group of line laser cameras, if the size of the circuit board to be inspected exceeds the acquisition range of a single line laser camera, then the group of line laser cameras may include at least two line laser cameras, which is similar to setting PIN needles on one side. At this time, adjacent line laser cameras arranged side by side may have a common viewing area and data acquisition delay, and the data acquisition delay can satisfy the requirement that the pair of adjacent line laser cameras does not repeat data acquisition in the common viewing area.

[0146] In step 702, a first depth map of PIN needles on the circuit board to be inspected is generated based on the point cloud data collected by each line laser camera.

[0147] Take N line laser cameras including one master camera and N-1 slave cameras as an example, Figure 8 The process shown generates a first depth map of PIN needles on a circuit board to be inspected, and the process includes the following steps.

[0148] In step 7021, based on the conversion relationship between the coordinate systems of each slave camera and the master camera, the point cloud data collected by the slave camera is converted into the coordinate system of the master camera.

[0149] The conversion relationship between the coordinate system of each slave camera and the main camera can be expressed as R and T between the point cloud data collected by the slave camera and the point cloud data collected by the main camera, and the conversion relationship between the coordinate system of each slave camera and the main camera is obtained by calibrating the special-shaped calibration block. The top surface of the special-shaped calibration block has at least one polygonal block, and two non-adjacent sides of the special-shaped calibration block are symmetrically provided with rectangular blocks. The shape of the special-shaped calibration block can be seen in Figure 3 .

[0150] In step 7022, the point cloud data converted by each slave camera and the point cloud data of the master camera are fused to obtain complete point cloud data of the circuit board to be inspected.

[0151] The fusion processing includes splicing the point cloud data according to the coordinates of the laser points in the point cloud data.

[0152] In step 7023, a first depth map is generated based on the complete point cloud data.

[0153] For example, the target point cloud data of the PIN needle on the circuit board to be detected is selected from the complete point cloud data, and then the target point cloud data is projected to obtain the first depth map. In this way, the algorithm time consumption can be reduced and the detection speed can be improved.

[0154] In step 703, based on the first depth map and the second depth map of the PIN pins on the reference circuit board, it is determined whether the PIN pins on the circuit board to be inspected are missing.

[0155] The reference circuit board and the circuit board to be tested are from the same batch of circuit boards, and there are no defects in the PIN pins on the reference circuit board.

[0156] For example, according to Fig. 9 The process shown determines whether the PIN needle on the circuit board to be tested is missing, and the process includes the following steps.

[0157] In step 7031, the outline of the PIN needle on the circuit board to be inspected is obtained from the first depth map.

[0158] In specific implementation, the first depth map can be subjected to contour extraction to obtain multiple pin contours, and then the pin contours are grouped according to the rule that two pin contours belonging to the same PIN pin are closest to each other, and each group of pin contours is determined as the contour of a PIN pin on the circuit board to be detected.

[0159] In step 7032, the outline of each PIN needle marked in the second depth map is compared with the outline of the PIN needle on the circuit board to be inspected.

[0160] In step 7033, it is determined whether there is a successfully matched contour on the circuit board to be inspected. If so, the process proceeds to step 7034; if not, the process proceeds to step 7035.

[0161] In step 7034, it is determined that the PIN pins at the corresponding positions on the circuit board to be tested are not missing.

[0162] In step 7035, it is determined that the PIN pin at the corresponding position on the circuit board to be tested is missing.

[0163] In step 704, based on the point cloud data corresponding to each non-missing PIN pin on the circuit board to be inspected, it is detected whether the non-missing PIN pin is skewed and / or has abnormal height.

[0164] In some embodiments, the Fig.10 The process shown detects whether the non-missing PIN needle is skewed, and the process includes the following steps.

[0165] In step 7041a, the three-dimensional coordinates of the two stitches in each non-missing PIN needle are determined based on the point cloud data in the two stitch outlines of each non-missing PIN needle and the three-dimensional scaling ratio of the first depth map.

[0166] For example, for each pin contour i (shown as a bright spot) of a non-missing PIN, calculate the average value of the three-dimensional coordinates (xi, yi, zi) of each laser point contained in the point cloud data of the pin contour i. Will As the three-dimensional coordinates of the corresponding stitch, kx, ky, kz are the scaling ratios of the first depth map on the x-axis, y-axis and z-axis respectively, and i=1, 2.

[0167] In step 7042a, based on the three-dimensional coordinates of the two pins, the distance between the two pins of the non-missing PIN pin is determined.

[0168] For example, the distance d between two pins without missing PIN pins is determined according to the following formula:

[0169]

[0170] in, is the three-dimensional coordinate of the first pin of the non-missing PIN. It is the 3D coordinate of the second pin of the non-missing PIN.

[0171] In step 7043a, determine whether the spacing is within the marking spacing range at the corresponding position on the reference circuit board. If so, proceed to step 7044a; if not, proceed to step 7045a.

[0172] In step 7044a, determine that the non-missing PIN pins are not skewed.

[0173] In step 7045a, determine that there is no missing PIN pin skew.

[0174] In some embodiments, the Fig.11 The process shown detects whether the missing PIN needle is highly abnormal, and the process includes the following steps.

[0175] In step 7041b, the three-dimensional coordinates of the two stitches in each non-missing PIN needle are determined based on the point cloud data in the two stitch outlines of each non-missing PIN needle and the three-dimensional scaling ratio of the first depth map.

[0176] The implementation of this step can refer to step 7041a, which will not be repeated here.

[0177] In step 7042b, the height of each pin in the non-missing PIN pins is determined based on the three-dimensional coordinates of the pin.

[0178] Specifically, the height of each pin can be obtained by calculating the distance from the three-dimensional coordinates of each pin in the non-missing PIN pins to the plane of the circuit board to be detected.

[0179] In step 7043b, determine whether the height difference between the height of each pin in the non-missing PIN pin and the mark height at the corresponding position on the reference circuit board does not exceed the set height range. If so, enter 7044b; if so, enter 7045b.

[0180] In step 7044b, determine that there is no abnormality in the height of the missing PIN needles.

[0181] In step 7045b, determine whether the height of the missing PIN needle is abnormal.

[0182] In step 705, a defect detection result is output, where the defect detection result includes position indication information of missing PIN pins on the circuit board to be detected, and a skew detection result and / or height abnormality detection result of each non-missing PIN pin.

[0183] In the embodiment of the present application, multiple line laser cameras can be used to collect point cloud data of circuit boards to be inspected of any specifications. With the help of the point cloud data, it can be determined whether the PIN needles on the circuit board to be inspected are missing, and it can also be determined whether the PIN needles on the circuit board to be inspected are skewed and / or abnormally high. The types of defect detection are also relatively comprehensive.

[0184] Based on the same technical concept, an embodiment of the present application also provides a PIN needle defect detection device. The principle of solving the problem by the PIN needle defect detection device is similar to the above-mentioned PIN needle defect detection method. Therefore, the implementation of the PIN needle defect detection device can refer to the implementation of the PIN needle defect detection method, and the repeated parts will not be repeated.

[0185] Fig.12 A structural schematic diagram of a PIN needle defect detection device provided in an embodiment of the present application includes an acquisition module 1201, a generation module 1202, a detection module 1203, and an output module 1204.

[0186] An acquisition module 1201 is used to acquire point cloud data of a circuit board to be inspected acquired by N line laser cameras, wherein N is determined based on the size of the circuit board to be inspected and the acquisition range of a single line laser camera;

[0187] A generating module 1202 is used to generate a first depth map of the PIN needles on the circuit board to be detected based on the point cloud data collected by each line laser camera;

[0188] A detection module 1203 is used to determine whether the PIN pins on the circuit board to be detected are missing based on the first depth map and the second depth map of the PIN pins on the reference circuit board, and the PIN pins on the reference circuit board are not defective;

[0189] The output module 1204 is used to output the defect detection result, where the defect detection result at least includes the position indication information of the missing PIN needles on the circuit board to be detected.

[0190] In some embodiments, the N line laser cameras include a master camera and N-1 slave cameras, and the generating module 1202 is specifically used for:

[0191] Based on the conversion relationship between the coordinate system of each slave camera and the coordinate system of the master camera, converting the point cloud data collected by the slave camera into the coordinate system of the master camera;

[0192] The point cloud data converted by each slave camera is fused with the point cloud data of the master camera to obtain complete point cloud data of the circuit board to be inspected;

[0193] Based on the complete point cloud data, the first depth map is generated.

[0194] In some embodiments, the generating module 1202 is specifically used to:

[0195] Selecting target point cloud data of the PIN needle on the circuit board to be detected from the complete point cloud data;

[0196] Projection processing is performed on the target point cloud data to obtain the first depth map.

[0197] In some embodiments, when at least two line laser cameras are arranged side by side, there is a common view area and a data collection delay between adjacent line laser cameras arranged side by side, and the data collection delay satisfies that the adjacent cameras do not repeatedly collect data in the common view area.

[0198] In some embodiments, the conversion relationship between each slave camera and the coordinate system of the main camera is obtained by calibrating a special-shaped calibration block, the top surface of the special-shaped calibration block has at least one polygonal block, and two non-adjacent side surfaces of the special-shaped calibration block are symmetrically provided with rectangular blocks.

[0199] In some embodiments, the detection module 1203 is specifically used to:

[0200] Acquire the outline of the PIN needle on the circuit board to be detected from the first depth map;

[0201] Comparing the outline of each PIN needle marked in the second depth map with the outline of the PIN needle on the circuit board to be detected;

[0202] If there is no successfully matched contour on the circuit board to be detected, it is determined that the PIN needle at the corresponding position on the circuit board to be detected is missing.

[0203] In some embodiments, the detection module 1203 is specifically used to:

[0204] Performing contour extraction on the first depth map to obtain a plurality of stitch contours;

[0205] According to the rule that two pin outlines belonging to the same PIN are closest to each other, the pin outlines are grouped;

[0206] Each group of pin outlines is determined as the outline of a PIN on the circuit board to be detected.

[0207] In some embodiments, the detection module 1203 is further configured to:

[0208] Based on the point cloud data corresponding to each non-missing PIN pin on the circuit board to be detected, detecting whether the non-missing PIN pin is skewed and / or has abnormal height; and

[0209] The defect detection result also includes a skew detection result and / or a height abnormality detection result of each non-missing PIN needle on the circuit board to be detected.

[0210] In some embodiments, the detection module 1203 is specifically configured to detect whether the non-missing PIN pin is skewed according to the following steps:

[0211] Determine the three-dimensional coordinates of the two pins in each non-missing PIN pin based on the point cloud data in the two pin outlines of each non-missing PIN pin and the three-dimensional scaling ratio of the first depth map;

[0212] Determine the distance between the two pins of the non-missing PIN pin based on the three-dimensional coordinates of the two pins;

[0213] If the spacing is not within the marking spacing range at the corresponding position on the reference circuit board, it is determined that the non-missing PIN needles are skewed.

[0214] In some embodiments, the detection module 1203 is specifically configured to detect whether the non-missing PIN needle is highly abnormal according to the following steps:

[0215] Determine the three-dimensional coordinates of the two pins in each non-missing PIN pin based on the point cloud data in the two pin outlines of each non-missing PIN pin and the three-dimensional scaling ratio of the first depth map;

[0216] Determine the height of each pin in the non-missing PIN pin based on the three-dimensional coordinates of the pin;

[0217] If the height difference between the height of any pin of the non-missing PIN pin and the height of the mark at the corresponding position on the reference circuit board exceeds the set height range, it is determined that the height of the non-missing PIN pin is abnormal.

[0218] The division of modules in the embodiments of the present application is schematic and is only a logical function division. There may be other division methods in actual implementation. In addition, the functional modules in the embodiments of the present application may be integrated in a processor, or may exist physically separately, or two or more modules may be integrated in one module. The coupling between the modules may be achieved through some interfaces, which are usually electrical communication interfaces, but it is not excluded that they may be mechanical interfaces or other forms of interfaces. Therefore, the modules described as separate components may or may not be physically separated, and may be located in one place or distributed to different locations of the same or different devices. The above-mentioned integrated modules may be implemented in the form of hardware or in the form of software functional modules.

[0219] After introducing the PIN pin defect detection method and device according to the exemplary embodiment of the present application, next, an electronic device according to another exemplary embodiment of the present application is introduced.

[0220] Refer to the following Fig.13 The electronic device 130 implemented according to this embodiment of the present application is described. Fig.13 The electronic device 130 shown is merely an example and should not bring any limitation to the functions and scope of use of the embodiments of the present application.

[0221] like Fig.13 As shown, the electronic device 130 is in the form of a general electronic device. The components of the electronic device 130 may include but are not limited to: the at least one processor 131, the at least one memory 132, and a bus 133 connecting different system components (including the memory 132 and the processor 131).

[0222] Bus 133 represents one or more of several types of bus structures, including a memory bus or memory controller, a peripheral bus, a processor, or a local bus using any of a variety of bus architectures.

[0223] The memory 132 may include a readable medium in the form of a volatile memory, such as a random access memory (RAM) 1321 and / or a cache memory 1322 , and may further include a read-only memory (ROM) 1323 .

[0224] The memory 132 may also include a program / utility 1325 having a set (at least one) of program modules 1324, such program modules 1324 including but not limited to: an operating system, one or more application programs, other program modules, and program data, each of which or some combination may include an implementation of a network environment.

[0225] The electronic device 130 may also communicate with one or more external devices 134 (e.g., keyboards, pointing devices, etc.), may also communicate with one or more devices that enable a user to interact with the electronic device 130, and / or communicate with any device that enables the electronic device 130 to communicate with one or more other electronic devices (e.g., routers, modems, etc.). Such communication may be performed via an input / output (I / O) interface 135. Furthermore, the electronic device 130 may also communicate with one or more networks (e.g., a local area network (LAN), a wide area network (WAN), and / or a public network, such as the Internet) via a network adapter 136. As shown, the network adapter 136 communicates with other modules for the electronic device 130 via a bus 133. It should be understood that, although not shown in the figure, other hardware and / or software modules may be used in conjunction with the electronic device 130, including but not limited to: microcode, device drivers, redundant processors, external disk drive arrays, RAID systems, tape drives, and data backup storage systems.

[0226] In an exemplary embodiment, a storage medium is also provided, and when a computer program in the storage medium is executed by a processor of an electronic device, the electronic device can perform the above-mentioned PIN pin defect detection method. Optionally, the storage medium can be a non-temporary computer-readable storage medium, for example, the non-temporary computer-readable storage medium can be a ROM, a random access memory (RAM), a CD-ROM, a magnetic tape, a floppy disk, an optical data storage device, etc.

[0227] In an exemplary embodiment, the electronic device of the present application may include at least one processor and a memory communicatively connected to the at least one processor, wherein the memory stores a computer program executable by the at least one processor, and when the computer program is executed by the at least one processor, the at least one processor may execute the steps of any PIN needle defect detection method provided in the embodiments of the present application.

[0228] In an exemplary embodiment, a computer program product is also provided. When the computer program product is executed by an electronic device, the electronic device can implement any exemplary method provided in the present application.

[0229] Furthermore, the computer program product may use any combination of one or more readable media. The readable medium may be a readable signal medium or a readable storage medium. The readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination of the above. More specific examples (non-exhaustive list) of readable storage media include: an electrical connection with one or more wires, a portable disk, a hard disk, a RAM, a ROM, an erasable programmable read-only memory (EPROM), a flash memory, an optical fiber, a compact disk read only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above.

[0230] The program product for PIN pin defect detection in the embodiment of the present application may adopt a CD-ROM and include program code, and may be run on a computing device. However, the program product of the present application is not limited thereto, and in this document, a readable storage medium may be any tangible medium containing or storing a program, which may be used by or in combination with an instruction execution system, apparatus, or device.

[0231] The readable signal medium may include a data signal propagated in baseband or as part of a carrier wave, wherein the readable program code is carried. Such propagated data signals may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. The readable signal medium may also be any readable medium other than a readable storage medium, which may send, propagate, or transmit a program for use by or in conjunction with an instruction execution system, apparatus, or device.

[0232] The program code contained on the readable medium may be transmitted using any appropriate medium, including but not limited to wireless, wired, optical cable, radio frequency (RF), etc., or any suitable combination of the foregoing.

[0233] Program code for performing the operations of the present application may be written in any combination of one or more programming languages, including object-oriented programming languages ​​such as Java, C++, etc., and conventional procedural programming languages ​​such as "C" or similar programming languages. The program code may be executed entirely on the user computing device, partially on the user device, as a separate software package, partially on the user computing device and partially on a remote computing device, or entirely on a remote computing device or server. In the case of a remote computing device, the remote computing device may be connected to the user computing device via any type of network such as a local area network (LAN) or a wide area network (WAN), or may be connected to an external computing device (e.g., via the Internet using an Internet service provider).

[0234] It should be noted that, although several units or subunits of the device are mentioned in the above detailed description, this division is merely exemplary and not mandatory. In fact, according to the embodiments of the present application, the features and functions of two or more units described above can be embodied in one unit. Conversely, the features and functions of one unit described above can be further divided into multiple units to be embodied.

[0235] In addition, although the operations of the method of the present application are described in a specific order in the drawings, this does not require or imply that the operations must be performed in this specific order, or that all the operations shown must be performed to achieve the desired results. Additionally or alternatively, some steps may be omitted, multiple steps may be combined into one step, and / or one step may be decomposed into multiple steps.

[0236] Those skilled in the art will appreciate that the embodiments of the present application may be provided as methods, systems, or computer program products. Therefore, the present application may adopt the form of a complete hardware embodiment, a complete software embodiment, or an embodiment in combination with software and hardware. Moreover, the present application may adopt the form of a computer program product implemented in one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) that include computer-usable program code.

[0237] The present application is described with reference to the flowcharts and / or block diagrams of the methods, apparatus (systems), and computer program products according to the embodiments of the present application. It should be understood that each process and / or block in the flowchart and / or block diagram, as well as the combination of the processes and / or blocks in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.

[0238] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.

[0239] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.

[0240] Although the preferred embodiments of the present application have been described, those skilled in the art may make additional changes and modifications to these embodiments once they have learned the basic creative concept. Therefore, the appended claims are intended to be interpreted as including the preferred embodiments and all changes and modifications falling within the scope of the present application.

[0241] Obviously, those skilled in the art can make various changes and modifications to the present application without departing from the spirit and scope of the present application. Thus, if these modifications and variations of the present application fall within the scope of the claims of the present application and their equivalents, the present application is also intended to include these modifications and variations.

Claims

1. A PIN defect detection method, characterized in that: include: Acquire point cloud data of the circuit board to be inspected collected by N line laser cameras, wherein N is determined based on the size of the circuit board to be inspected, the PIN needle setting method, and the collection range of a single line laser camera; Based on the point cloud data collected by each line laser camera, a first depth map of the PIN needles on the circuit board to be inspected is generated; Based on the first depth map and the second depth map of the PIN pins on the reference circuit board, determining whether the PIN pins on the circuit board to be tested are missing, and the PIN pins on the reference circuit board are not defective; Outputting a defect detection result, wherein the defect detection result at least includes location indication information of missing PIN needles on the circuit board to be detected; The N line laser cameras include a master camera and N-1 slave cameras, and based on the point cloud data collected by each line laser camera, a first depth map of the PIN needles on the circuit board to be inspected is generated, including: Based on the conversion relationship between the coordinate system of each slave camera and the coordinate system of the master camera, converting the point cloud data collected by the slave camera into the coordinate system of the master camera; The point cloud data converted by each slave camera is fused with the point cloud data of the master camera to obtain complete point cloud data of the circuit board to be inspected; Based on the complete point cloud data, the first depth map is generated.

2. The method according to claim 1, characterized in that Generating the first depth map based on the complete point cloud data includes: Selecting target point cloud data of the PIN needle on the circuit board to be detected from the complete point cloud data; Projection processing is performed on the target point cloud data to obtain the first depth map.

3. The method according to claim 1, characterized in that When at least two line laser cameras are arranged side by side, there is a common viewing area and a data collection delay between adjacent line laser cameras arranged side by side, and the data collection delay satisfies that the adjacent line laser cameras do not repeatedly collect data in the common viewing area.

4. The method according to claim 1, characterized in that The conversion relationship between each slave camera and the coordinate system of the main camera is obtained by calibrating a special-shaped calibration block, wherein the top surface of the special-shaped calibration block has at least one polygonal block, and two non-adjacent side surfaces of the special-shaped calibration block are symmetrically provided with rectangular blocks.

5. The method according to claim 1, characterized in that Based on the first depth map and the second depth map of the PIN pins on the reference circuit board, determining whether the PIN pins on the circuit board to be detected are missing includes: Acquire the outline of the PIN needle on the circuit board to be detected from the first depth map; Comparing the outline of each PIN needle marked in the second depth map with the outline of the PIN needle on the circuit board to be detected; If there is no successfully matched contour on the circuit board to be detected, it is determined that the PIN needle at the corresponding position on the circuit board to be detected is missing.

6. The method according to claim 5, characterized in that Acquiring the outline of the PIN needle on the circuit board to be detected from the first depth map includes: Performing contour extraction on the first depth map to obtain a plurality of stitch contours; According to the rule that two pin outlines belonging to the same PIN are closest to each other, the pin outlines are grouped; Each group of pin outlines is determined as the outline of a PIN on the circuit board to be detected.

7. The method according to any one of claims 1 to 6, characterized in that: Also includes: Based on the point cloud data corresponding to each non-missing PIN pin on the circuit board to be detected, detect whether the non-missing PIN pin is skewed and / or has abnormal height; as well as The defect detection result also includes a skew detection result and / or a height abnormality detection result of each non-missing PIN needle on the circuit board to be detected.

8. The method according to claim 7, characterized in that Based on the point cloud data corresponding to each non-missing PIN pin on the circuit board to be detected, detecting whether the non-missing PIN pin is skewed includes: Determine the three-dimensional coordinates of the two pins in each non-missing PIN pin based on the point cloud data in the two pin outlines of each non-missing PIN pin and the three-dimensional scaling ratio of the first depth map; Determine the distance between the two pins of the non-missing PIN pin based on the three-dimensional coordinates of the two pins; If the spacing is not within the marking spacing range at the corresponding position on the reference circuit board, it is determined that the non-missing PIN needles are skewed.

9. The method according to claim 7, characterized in that Based on the point cloud data corresponding to each non-missing PIN pin on the circuit board to be detected, detecting whether the non-missing PIN pin is highly abnormal includes: Determine the three-dimensional coordinates of the two pins in each non-missing PIN pin based on the point cloud data in the two pin outlines of each non-missing PIN pin and the three-dimensional scaling ratio of the first depth map; Determine the height of each pin in the non-missing PIN pin based on the three-dimensional coordinates of the pin; If the height difference between the height of any pin of the non-missing PIN pin and the height of the mark at the corresponding position on the reference circuit board exceeds the set height range, it is determined that the height of the non-missing PIN pin is abnormal.

10. A PIN defect detection device, characterized in that: include: An acquisition module, used to acquire point cloud data of the circuit board to be inspected acquired by N line laser cameras, wherein N is determined based on the size of the circuit board to be inspected and the acquisition range of a single line laser camera; A generating module, used for generating a first depth map of the PIN needles on the circuit board to be detected based on the point cloud data collected by each line laser camera; A detection module, configured to determine whether the PIN pins on the circuit board to be detected are missing based on the first depth map and the second depth map of the PIN pins on the reference circuit board, and whether the PIN pins on the reference circuit board are not defective; An output module, used to output defect detection results, wherein the defect detection results at least include location indication information of missing PIN needles on the circuit board to be detected; The N line laser cameras include a main camera and N-1 slave cameras, and a generation module is specifically used to convert the point cloud data collected by the slave cameras into the coordinate system of the main camera based on the conversion relationship between the coordinate system of each slave camera and the main camera; fuse the point cloud data converted by each slave camera with the point cloud data of the main camera to obtain the complete point cloud data of the circuit board to be inspected; and generate the first depth map based on the complete point cloud data.

11. An electronic device, characterized in that: include: at least one processor, and a memory communicatively connected to the at least one processor, wherein: The memory stores a computer program executable by the at least one processor, and the computer program is executed by the at least one processor so that the at least one processor can perform the method according to any one of claims 1 to 9.

12. A storage medium, characterized in that: When the computer program in the storage medium is executed by a processor of an electronic device, the electronic device can execute the method according to any one of claims 1 to 9.

Citation Information

Patent Citations

  • High-precision method for detecting three-dimensional connector pin defects based on line laser scanning

    CN108982513A

  • Circuit board defect detection method and device, terminal equipment and storage medium

    CN111982911A

Cited By

  • Information processing apparatus, information processing program, and information processing method

    US20250044122A1