A circuit board surface component visual inspection method and device and system
By controlling motors to drive multiple cameras in the MiniLED backlight panel production process and planning paths to capture the entire field of view of the IC, the problem of high false detection rate and low detection efficiency caused by IC image acquisition and segmentation in the MiniLED backlight panel production process is solved, achieving high-precision, large-format detection with completeness and efficiency.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- 合肥欣奕华智能机器股份有限公司
- Filing Date
- 2021-12-17
- Publication Date
- 2026-07-24
Smart Images

Figure CN116342458B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of visual inspection technology, and in particular to a method, device and system for visual inspection of components on the surface of a circuit board. Background Technology
[0002] Compared to traditional LCD (Liquid Crystal Display) technology, the improvements in image quality brought about by MiniLED, an iterative technological advancement, are obvious. The higher density of light-emitting devices allows MiniLED panels to achieve a backlight effect closer to pixelation, resulting in significant improvements in brightness and contrast. Compared to OLED (Organic Light-Emitting Diode), MiniLED's advantages lie in its ability to achieve comparable display quality and a slim profile at a lower cost. Furthermore, because MiniLED is inorganic, it boasts a longer lifespan and lower power consumption.
[0003] During the production of MiniLED backlight panels, components are prone to damage, foreign objects, and misalignment. Therefore, the appearance inspection of MiniLEDs incorporates traditional surface mount technology methods. This method involves path planning by uniformly cutting the inspection area and fixing overlapping areas. After image acquisition, the overlapping areas are used to stitch the images together, and finally, the stitched image is inspected.
[0004] The above-mentioned visual inspection method for components on the circuit board surface has the following problems:
[0005] 1) The method of uniform cutting and fixed overlapping area may result in some ICs being segmented during acquisition (the ICs cannot be fully displayed in the field of view of each camera). As a result, only the synthesized IC images can be detected. Due to the distortion of the synthesized IC images, these ICs have a very high false detection probability.
[0006] 2) Because complete data collection and stitching are required before detection, large-format (decimeter-level) detection at high precision (micrometer or nanometer level) will fail due to excessive memory usage.
[0007] 3) Since the equipment needs to be assembled before it can be tested, the testing and assembly times cannot be calculated in parallel, which will significantly increase the production cycle of the testing equipment. Summary of the Invention
[0008] The purpose of this application is to provide a method, device and system for visual inspection of components on the surface of circuit boards, in order to solve the problems of high false detection rate, inability to meet the inspection needs of large boards and low inspection efficiency when visually inspecting components on the surface by taking images with uniformly cut inspection areas and fixed overlapping areas.
[0009] In a first aspect, embodiments of this application provide a visual inspection method for components on the surface of a circuit board, the method comprising:
[0010] The control motor drives multiple cameras to move simultaneously, and the starting point and ending point of the motor position are determined so that each camera traverses the corresponding field of view. The multiple cameras are located above the base and arranged longitudinally at intervals. The movement of the motor is in the same direction as the movement of the multiple cameras. A circuit board including multiple ICs is placed on the base.
[0011] Control the motor to move to the starting point and record the position of the first motor. Trigger a horizontal traversal to control the motor to move laterally to the end horizontal coordinate. During the horizontal traversal, when it is determined that the IC distribution within the FOV of the multiple cameras meets the conditions for capturing the complete IC, record the position of the first motor.
[0012] After each horizontal traversal, the motor is controlled to return horizontally to the starting point's horizontal coordinate. Within the range of the ending point's vertical coordinate, the motor is triggered to move vertically towards the ending point once. If the IC distribution within the FOV of the multiple cameras meets the conditions for capturing a complete IC, the position of the second motor is recorded. Otherwise, the motor is adjusted vertically to find and record the position of the second motor where the IC distribution within the FOV of the multiple cameras meets the conditions for capturing a complete IC.
[0013] After each vertical movement, the position of the first motor is recorded. Then, the horizontal traversal is triggered to control the motor to move laterally to the end horizontal coordinate. During the horizontal traversal, when it is determined that the IC distribution within the FOV of the multiple cameras meets the condition for capturing the complete IC, the position of the first motor is recorded.
[0014] When the motor moves to the endpoint, the recorded positions of the first motor and the second motor are obtained. When the motor moves to the corresponding first motor position and the second motor position, the image is triggered to detect the circuit board based on the IC information in the captured image.
[0015] As an optional implementation, determining the start and end points of the motor positions when each camera traverses the corresponding field of view includes:
[0016] Based on the field of view of the multiple cameras, determine the starting x-coordinate, starting y-coordinate, ending x-coordinate, and ending y-coordinate of the motor position when controlling the movement of the multiple cameras so that any one of the cameras traverses the corresponding field of view;
[0017] The minimum starting point x-coordinate and minimum starting point y-coordinate are determined as the starting point of the motor position, and the maximum ending point x-coordinate and maximum ending point y-coordinate are determined as the ending point of the motor position.
[0018] As an optional implementation, the center of the largest outer rectangle of all ICs in the circuit board is aligned with the center of the base. The method further includes:
[0019] Taking the upper left corner of the base as the origin, the pixel points of the drawn image are sampled from the circuit board. The image coordinates of each pixel point are obtained by dividing the coordinates of the sampling point on the base by the physical length of the unit pixel mapping and rounding. The gray value of the pixel point located on the outer rectangle of the IC is obtained by dividing the coordinates of the corresponding sampling point on the base by the physical length of the unit pixel mapping and rounding. The gray value of the remaining pixels is zero.
[0020] Specifically, each time the motor moves to a motor position, the alignment area of the image to be drawn corresponding to each camera's FOV is determined based on the relationship between the motor position and each camera's FOV, and it is determined whether the IC distribution within the alignment area meets the conditions for capturing a complete IC.
[0021] As an optional implementation, a lateral traversal is triggered, controlling the motor to move laterally to the endpoint horizontal coordinate. During the lateral traversal, it is determined that the IC distribution within the multiple camera FOVs all meet the conditions for capturing a complete IC, including:
[0022] The motor is controlled to move laterally from the starting point horizontal coordinate, using the smallest FOV width among the multiple cameras in the aligned area as the first unit of movement, to the ending horizontal coordinate.
[0023] Each time the horizontal movement is completed by the first movement unit, it is determined whether the mean gray value of the left-side pixel of the alignment area of the drawn image corresponding to each camera FOV is zero.
[0024] If so, move laterally towards the endpoint by moving one pixel in the alignment area as the second moving unit. When the mean gray value of the left-side pixel of the alignment area of any camera FOV is non-zero, it is determined that the IC distribution within the multiple camera FOVs meets the condition for capturing a complete IC, and the next movement with the first moving unit is triggered.
[0025] Otherwise, move laterally towards the starting point by moving one pixel in the alignment area as the second moving unit, and retain the minimum gray value of each pixel corresponding to the left line of each camera's FOV. When the minimum gray value of all pixels on the left line of each camera's FOV is zero, it is determined that the IC distribution within the multiple camera FOVs meets the conditions for capturing a complete IC, and the next movement with the first moving unit is triggered.
[0026] As an optional implementation, the motor is controlled to move longitudinally towards the endpoint once. If the IC distribution within the FOVs of all the multiple cameras meets the conditions for capturing a complete IC, the position of the second motor is recorded. Otherwise, the motor is longitudinally adjusted to locate and record the position of the second motor when the IC distribution within the FOVs of all the multiple cameras meets the conditions for capturing a complete IC. This includes:
[0027] Using the minimum FOV height among the multiple cameras moving in the alignment area as the third movement unit, the motor is controlled to move longitudinally one step towards the endpoint.
[0028] Determine whether the mean grayscale value of the pixels on the upper edge of the alignment area of the drawn image corresponding to each camera's FOV is zero;
[0029] If so, move longitudinally towards the endpoint by moving one pixel in the alignment area as the second moving unit. When the mean gray value of the pixels on the upper edge of the alignment area of any camera FOV is non-zero, it is determined that the condition for capturing a complete IC is met, and the position of the second motor is recorded.
[0030] Otherwise, move longitudinally towards the starting point by moving one pixel in the alignment area as the second moving unit, and retain the minimum gray value of each pixel corresponding to the upper edge of each FOV. When the minimum gray value of all pixels on the left edge of each FOV is zero, it is determined that the IC distribution within the multiple camera FOVs meets the conditions for shooting a complete IC, and the position of the second motor is recorded.
[0031] As an optional implementation, the grayscale value of a pixel located on the outer rectangle of the IC is obtained by dividing the coordinates of the corresponding sampling point on the base by the integer part of the physical length of the unit pixel mapping, including:
[0032] The grayscale value of the pixel on the horizontal edge of the outer rectangle of the IC is obtained by dividing the vertical coordinate of the corresponding sampling point on the base by the physical length of the unit pixel mapping and taking the remainder.
[0033] The grayscale value of a pixel on the vertical edge of the outer rectangle of the IC is obtained by dividing the horizontal coordinate of the corresponding sampling point on the base by the physical length of the unit pixel mapping and taking the remainder.
[0034] As an optional implementation, recording the position of the first motor includes:
[0035] Determine the coordinates of the current motor and the maximum grayscale value of the left-side line pixel within the alignment area corresponding to the current multiple camera FOVs, and determine the first physical length corresponding to the maximum grayscale value;
[0036] Determine the horizontal coordinate adjustment value corresponding to the first physical length that the alignment area of the FOV of the multiple cameras driven by the motor is moved laterally towards the starting point.
[0037] The coordinates of the current motor are adjusted according to the horizontal coordinate adjustment value to obtain the position of the first motor.
[0038] As an optional implementation, recording the position of the second motor includes:
[0039] Determine the coordinates of the current motor and the maximum grayscale value of the upper edge pixel in the alignment area corresponding to the current multiple camera FOVs, and determine the second physical length corresponding to the maximum grayscale value;
[0040] Determine the vertical coordinate adjustment value corresponding to the second physical length that the alignment area of the FOV of the multiple cameras driven by the motor is moved longitudinally towards the starting point.
[0041] The coordinates of the current motor are adjusted according to the vertical coordinate adjustment value to obtain the position of the second motor.
[0042] As an optional implementation, before each lateral traversal that controls the motor to move laterally to the endpoint horizontal coordinate, the current horizontal coordinate of the motor is reduced by a set redundancy value.
[0043] Each time the control is triggered, the motor moves longitudinally towards the endpoint once, and the current longitudinal coordinate of the motor is reduced by a set redundancy value.
[0044] As an optional implementation, the grayscale value of the pixels located at the four corners of the outer rectangle of each IC in the drawn image is 1.
[0045] As an optional implementation, the grayscale value of a pixel located on the outer rectangle of the IC is obtained by dividing the coordinates of the corresponding sampling point on the base by the integer part of the physical length of the unit pixel mapping, including:
[0046] The remainder is obtained by dividing the coordinates of the sampling points on the outer rectangle of the IC on the base by the physical length of the unit pixel mapping and rounding it down.
[0047] Divide the remainder by the physical length and multiply by the total number of gray levels to obtain the gray value of the pixel located on the outer rectangle of the IC.
[0048] Secondly, embodiments of this application provide a visual inspection device for components on the surface of a circuit board, comprising:
[0049] The starting point determination module is used to control the motor to drive multiple cameras to move simultaneously, and to determine the starting point and ending point of the motor position when each camera traverses the corresponding field of view. The multiple cameras are located above the base and arranged longitudinally at intervals. The movement of the motor is in the same direction as the movement of the multiple cameras. A circuit board including multiple ICs is placed on the base.
[0050] The first lateral motion control module is used to control the motor to move to the starting point and record the position of the first motor. It triggers a lateral traversal to control the motor to move laterally to the end point. During the lateral traversal, when it is determined that the IC distribution within the FOV of the multiple cameras meets the conditions for capturing the complete IC, the position of the first motor is recorded.
[0051] The longitudinal motion control module is used to control the motor to return to the starting point horizontal coordinate after each horizontal traversal. Within the range of the ending point vertical coordinate, it triggers the motor to move longitudinally towards the ending point once. When it is determined that the IC distribution within the FOV of the multiple cameras meets the condition for capturing a complete IC, the position of the second motor is recorded. Otherwise, the motor is adjusted longitudinally to find and record the position of the second motor when the IC distribution within the FOV of the multiple cameras meets the condition for capturing a complete IC.
[0052] The second lateral motion control module is used to record the position of the first motor after each longitudinal movement, and then trigger the lateral traversal to control the motor to move laterally to the end horizontal coordinate. During the lateral traversal, when it is determined that the IC distribution within the FOV of the multiple cameras meets the condition for capturing the complete IC, the position of the first motor is recorded.
[0053] The imaging and detection module is used to control the motor to move to the end point, acquire the recorded position of the first motor and the position of the second motor, and control the motor to move to the corresponding position of the first motor and the position of the second motor to trigger imaging, so as to perform circuit board detection based on the IC information in the captured image.
[0054] Thirdly, embodiments of this application provide a visual inspection device for components on the surface of a circuit board, comprising:
[0055] A controller and a memory communicatively connected to the controller; wherein the memory stores instructions executable by the controller, the instructions being executed by the controller to enable the controller to perform the method provided in the first aspect above.
[0056] Fourthly, embodiments of this application provide a visual inspection system for components on the surface of a circuit board, comprising:
[0057] A base and a circuit board located on the base, wherein the center of the largest outer rectangle of all ICs on the circuit board is aligned with the center of the base;
[0058] Multiple cameras arranged longitudinally at intervals above the base and moving simultaneously, the total field of view of the multiple cameras being larger than the maximum circumscribed rectangle;
[0059] A controller is used to control motors to drive multiple cameras to move simultaneously, determining the start and end points of the motor positions when each camera traverses its corresponding field of view. The multiple cameras are located above a base and arranged longitudinally at intervals. The motor movement is in the same direction as the movement of the multiple cameras. A circuit board containing multiple ICs is placed on the base. The controller moves the motor to the start point and records the first motor position. It then triggers a lateral traversal, controlling the motor to move laterally to the end point's horizontal coordinate. During this lateral traversal, if the IC distribution within the FOV of all the multiple cameras satisfies the condition for capturing a complete IC, the first motor position is recorded. After each lateral traversal, the controller controls the motor to return laterally to the start point's horizontal coordinate. Within the range of the end point's vertical coordinate, it triggers a longitudinal movement of the motor towards the end point, determining the position of the multiple cameras within the FOV. When the IC distribution within the FOV of all cameras meets the condition for capturing a complete IC, the position of the second motor is recorded. Otherwise, the motor is adjusted vertically to find and record the position of the second motor when the IC distribution within the FOV of all cameras meets the condition for capturing a complete IC. After each vertical movement, the position of the first motor is recorded, and then the horizontal traversal is triggered to control the motor to move horizontally to the endpoint horizontal coordinate. During the horizontal traversal, when it is determined that the IC distribution within the FOV of all cameras meets the condition for capturing a complete IC, the position of the first motor is recorded. When the motor moves to the endpoint, the recorded positions of the first and second motors are obtained. The motors are then controlled to move one by one to the corresponding positions of the first and second motors to trigger the capture, so as to perform circuit board detection based on the IC information in the captured image.
[0060] Fifthly, embodiments of this application provide a computer storage medium storing a computer program for causing a computer to execute the visual inspection method for circuit board surface components provided in the first aspect.
[0061] The visual inspection method, equipment, and system for circuit board surface components provided in this application determine the appropriate motor position for capturing a complete IC by performing path planning. Therefore, there is no IC segmentation during subsequent acquisition, which greatly reduces the probability of false detection in the later inspection process. Since image stitching is not required after circuit planning, a complete one-time inspection can be completed for high-precision (sub-micron level) large-format (110-inch LCD panel size) items without the need for separate segmentation of the inspection area. Since specific IC data after circuit planning can be provided, image stitching is not required after acquisition, which greatly reduces the production cycle of the inspection equipment.
[0062] Other features and advantages of this application will be set forth in the description which follows, and will be apparent in part from the description, or may be learned by practicing the application. The objectives and other advantages of this application may be realized and obtained by means of the structures particularly pointed out in the written description, claims, and drawings. Attached Figure Description
[0063] To more clearly illustrate the technical solutions of the embodiments of this application, the drawings used in the embodiments of this application will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0064] Figure 1 This is a schematic diagram of a visual inspection system for components on the surface of a circuit board according to an embodiment of this application;
[0065] Figure 2 This is a schematic flowchart of a visual inspection method for components on the surface of a circuit board according to an embodiment of this application;
[0066] Figure 3 This is a detailed flowchart illustrating path planning during visual inspection of components on the surface of a circuit board according to one embodiment of this application.
[0067] Figure 4 This is a detailed flowchart illustrating the longitudinal movement during visual inspection of components on the surface of a circuit board according to an embodiment of this application.
[0068] Figure 5 This is a schematic diagram of a visual inspection structure for components on the surface of a circuit board according to an embodiment of this application;
[0069] Figure 6 This is a schematic diagram of another visual inspection structure for surface components on a circuit board according to an embodiment of this application. Detailed Implementation
[0070] To further illustrate the technical solutions provided in the embodiments of this application, a detailed description is provided below in conjunction with the accompanying drawings and specific implementation methods. Although the embodiments of this application provide method operation steps as shown in the following embodiments or drawings, more or fewer operation steps may be included in the method based on conventional or non-inventive effort. For steps that do not logically have a necessary causal relationship, the execution order of these steps is not limited to the execution order provided in the embodiments of this application. In actual processing or when the control device executes the method, it may be executed sequentially or in parallel according to the method shown in the embodiments or drawings.
[0071] Given the problems of high false positive rates, inability to meet the inspection needs of large-format surfaces, and excessively long inspection times associated with the method of uniformly cutting the detection area and fixing the overlap area for visual inspection of surface parts in related technologies, the inventive concept of this application is to plan the camera's running trajectory and trigger position based on the distribution of ICs or LEDs using horizontal and vertical searching methods, and to generate independent image data for each FOV for visual inspection of surface parts on circuit boards after planning.
[0072] Other features and advantages of this application will be set forth in the description which follows, and will be apparent in part from the description, or may be learned by practicing the application. The objectives and other advantages of this application may be realized and obtained by means of the structures particularly pointed out in the written description, claims, and drawings.
[0073] The visual inspection method, equipment, and system for components on the circuit board surface in this application will be described in detail below with reference to the accompanying drawings.
[0074] See Figure 1 According to the schematic diagram of the visual inspection system for components on the circuit board surface provided in this application, the system includes:
[0075] Abutment 10;
[0076] The circuit board 20 is located on the base, and the center of the largest outer rectangle 201 of all ICs on the circuit board is aligned with the center of the base.
[0077] Multiple cameras 30 that move simultaneously are arranged longitudinally at intervals above the base, and the total field of view of the multiple cameras is greater than the maximum circumscribed rectangle.
[0078] A controller (not shown in the figure) controls the motors to drive multiple cameras to move simultaneously, determining the start and end points of the motor positions when each camera traverses its corresponding field of view. The multiple cameras are located above a base and arranged longitudinally at intervals. The motor movement is in the same direction as the movement of the multiple cameras. A circuit board containing multiple ICs is placed on the base. The controller moves the motor to the start point and records the first motor position. It then triggers a lateral traversal, controlling the motor to move laterally to the end point's horizontal coordinate. During this lateral traversal, if the IC distribution within the FOV of all cameras satisfies the condition for capturing a complete IC, the first motor position is recorded. After each lateral traversal, the controller returns the motor laterally to the start point's horizontal coordinate and records the second motor position. Within the range of the end point's vertical coordinate, the controller is triggered to move the motor longitudinally towards the end point. Once the camera moves once and confirms that the IC distribution within the FOVs of multiple cameras meets the conditions for capturing a complete IC, the position of the second motor is recorded. Otherwise, the motor is adjusted vertically to find and record the position of the second motor that meets the conditions for capturing a complete IC within the FOVs of multiple cameras. After each vertical movement, the position of the first motor is recorded. Then, a horizontal traversal is triggered to control the motor to move horizontally to the endpoint horizontal coordinate. During the horizontal traversal, if the IC distribution within the FOVs of multiple cameras meets the conditions for capturing a complete IC, the position of the first motor is recorded. When the motor moves to the endpoint, the recorded positions of the first and second motors are obtained. The motors are then controlled to move to the corresponding positions of the first and second motors to trigger the capture, so as to perform circuit board detection based on the IC information in the captured image.
[0079] The circuit board surface component visual inspection system provided in this application can be used to inspect ICs on circuit boards (substrates of various materials such as glass substrates, silicon substrates, and PCBs), in order to solve the problems of high false detection probability of ICs in the fusion area, inability to handle large inspection areas and high precision conditions, and excessively long inspection processing time in existing splicing technologies.
[0080] The visual inspection system for circuit board surface components provided in this application has the following technical advantages:
[0081] By planning the path to determine all suitable motor positions for shooting, the camera moves to the corresponding motor position to take pictures. The images obtained by each camera can be independently detected by IC. There is no IC segmentation during the later acquisition process (if it is cut in a certain FOV, a complete IC can be found in a nearby FOV). There is no need to stitch the images together, so the probability of false detection in the later detection process will be greatly reduced.
[0082] Since image stitching is not required after circuit planning, high-precision (sub-micron level) large-format (110-inch LCD panel size) items can be inspected in one complete operation without the need for separate inspection area segmentation. In the PCB industry, boards are relatively small, typically tens of centimeters by tens of centimeters. Current technologies, due to uniform photography, require converting all small images into one large image, which is then combined in computer memory, not on the hard drive. When the board is small, one pixel represents 0.1 millimeters, resulting in an image size of tens of megabytes. Existing solutions can meet this requirement. However, for large-format items like two meters by two meters with high image precision requirements, a single image might require 1TB of memory, which is insufficient. This application, by eliminating the need for image compositing, can meet the inspection needs of large-format items.
[0083] Since it can provide specific IC data after circuit planning, image stitching is not required after acquisition, which greatly reduces the production cycle of the testing equipment.
[0084] This application also provides a visual inspection method for components on the surface of a circuit board. This method is applied to a control device, which can be considered to include a controller that controls the movement of a motor. The controller also has processor capabilities, such as image detection, or the controller and processor may be separate components. Figure 2 As shown, the method includes:
[0085] Step 201: Control the motor to drive multiple cameras to move simultaneously, determine the start and end points of the motor position when each camera traverses the corresponding field of view, the multiple cameras are located above the base and arranged longitudinally at intervals, the movement of the motor is consistent with the movement direction of the multiple cameras, and a circuit board including multiple ICs is placed on the base.
[0086] This application's technical solution utilizes camera acquisition path planning technology under conditions of multi-camera collaboration, irregular IC arrangement, large detection area, and high-precision acquisition. For example... Figure 1 As shown, the total field of view of multiple cameras is greater than the area of the circuit board. The horizontal length of each camera's field of view is greater than the horizontal length of the circuit board, while the vertical length of each camera's field of view is less than the vertical length of the circuit board. However, the total vertical length of the field of view of multiple cameras is greater than the vertical length of the circuit board. The fields of view of the cameras overlap to some extent. Each camera has its own field of view. To ensure that each camera can traverse its own field of view, this application first determines the start and end points of the motor positions. After determining the start and end points, route planning is performed. During the movement, motor positions that meet the conditions for capturing a complete IC are found and recorded.
[0087] In this application, the upper left corner of the base is used as the origin of the coordinate system. The X-axis (horizontal) extends to the right, and the Y-axis (vertical) extends outwards. Theoretically, multiple cameras on the base are arranged at equal intervals along the Y-axis and are collinear. However, in reality, the intervals between cameras may vary slightly and are not strictly collinear. To determine the motor positions of each camera, this application first determines the difference between the distance between adjacent cameras on the Y-axis and the horizontal distance on the X-axis based on equipment parameter information, thus obtaining the positional relationship between the multiple cameras. For the multiple cameras on the base, the camera closest to the upper left corner of the base is used as the reference camera. The coordinates of a reference point on the reference camera in the base coordinate system are used to determine the camera's coordinates. Based on the aforementioned positional relationship between the multiple cameras, the coordinates of each camera are obtained. Since the positional relationship between the cameras and the positional relationship between the multiple cameras and the motors is fixed, the motor positions can be obtained from the camera positions. Furthermore, the physical coordinates of the camera's field of view (FOV) on the base can be determined based on the coordinates of each camera. Since the positions of the motors and cameras are fixed, and the camera positions can determine the FOV area, the alignment area of each camera's FOV on the base can be determined based on the motor positions.
[0088] Based on the above relationships, the alignment area of each FOV on the base can be determined when the motor moves to a certain position. Since the field of view of each camera FOV is fixed on the base, the motor movement can be controlled so that each camera traverses the corresponding field of view, thereby determining the start and end points of the motor.
[0089] Step 202: Control the motor to move to the starting point and record the position of the first motor. Trigger a horizontal traversal to control the motor to move laterally to the end horizontal coordinate. During the horizontal traversal, when it is determined that the IC distribution within the FOV of multiple cameras meets the conditions for capturing the complete IC, record the position of the first motor.
[0090] In this embodiment, the IC distribution within the multiple camera FOVs all meet the condition for capturing a complete IC, meaning that the multiple camera FOVs can include at least one complete IC. Furthermore, by using the left edge of each FOV as a reference edge, when the coordinate line is located at the edge of the IC, it can be considered that a complete IC is distributed within the FOV.
[0091] In this application, each time the motor moves to the horizontal coordinate of the starting point, it means that a horizontal traversal and a vertical movement are performed, and the motor position is recorded once.
[0092] As an optional implementation, the lateral traversal can be performed in stages, with each movement covering a distance such that the change in the alignment area does not exceed the minimum FOV width. After each lateral movement, if it is determined that the IC distribution within the FOVs of multiple cameras meets the conditions for capturing a complete IC, the position of the first motor is recorded; otherwise, the lateral adjustment motor is used to locate and record the position of the first motor that meets the conditions for capturing a complete IC within the FOVs of multiple cameras. The lateral adjustment motor can be adjusted to the right or to the left.
[0093] Step 203: After each horizontal traversal, the control motor returns horizontally to the starting point's horizontal coordinate. Within the range of the ending point's vertical coordinate, the control motor is triggered to move vertically towards the ending point once. When it is determined that the IC distribution within the FOV of multiple cameras meets the conditions for capturing a complete IC, the position of the second motor is recorded. Otherwise, the motor is adjusted vertically to find and record the position of the second motor that meets the conditions for capturing a complete IC within the FOV of multiple cameras. After recording the position of the second motor that meets the conditions for capturing a complete IC, the vertical movement ends.
[0094] During the process of controlling the motor to return to the starting point horizontal coordinate, the motor's vertical coordinate remains unchanged. After returning, it first moves vertically a large distance, which does not exceed the minimum FOV height. The vertical adjustment of the motor can be either upward or downward.
[0095] Step 204: After each vertical movement, record the position of the first motor, and then trigger a horizontal traversal to control the motor to move horizontally to the end horizontal coordinate. During the horizontal traversal, when it is determined that the IC distribution within the FOV of multiple cameras meets the conditions for capturing the complete IC, record the position of the first motor.
[0096] Since a vertical movement has occurred, the control motor drives multiple cameras to perform a horizontal traversal again. During the horizontal traversal, the corresponding motor positions are recorded in the same way as above, which will not be described in detail here.
[0097] Step 205: When the motor moves to the endpoint, the recorded first motor position and second motor position are obtained. When the motor moves to the corresponding first motor position and second motor position, the image is triggered to detect the circuit board based on the IC information in the captured image.
[0098] Using the above path planning scheme, a suitable location for taking pictures can be obtained. All the obtained motor positions are recorded. Subsequently, the motors are controlled to move to their corresponding positions one by one and trigger the taking of pictures, thereby obtaining images that can be independently processed by IC intervals.
[0099] To determine the area on the circuit board that each camera's field of view (FOV) is aligned with, this application requires pre-drawing an image of the circuit board. After the circuit board is manufactured, data on the distribution of each IC on the circuit board can be obtained, specifically including the size of the circuit board, the distribution position of the ICs on the circuit, etc. Based on the data of each IC distribution, an image of the circuit board is drawn. The following are specific implementation methods for drawing the image of the IC distribution, the motor start and end points, and specific implementation methods for motor motion control:
[0100] 1) Drawing the IC distribution image
[0101] Based on the data of the distribution of each IC on the circuit board, the physical area of the outer rectangle of each IC on the circuit board can be determined. Based on the physical area of the outer rectangle of each IC on the circuit board, or the extreme values of the four directions (up, down, left, and right) of the area where each IC is located, the physical area of the maximum outer rectangle of all ICs on the circuit board can be obtained through the physical area of each IC on the circuit board or the extreme values of the four directions. Based on the center of the physical area of the maximum outer rectangle of all ICs on the circuit board and the center of the circuit board, the required offset between the center of the maximum outer rectangle of the IC and the center of the base can be determined. Based on the obtained offset, the physical coordinates of each sampling point on the circuit board when the circuit board is placed on the base can be determined.
[0102] Based on this, in this embodiment, the upper left corner of the base is taken as the origin, and the pixels of the drawn image are sampled from the circuit board. The image coordinates of each pixel are obtained by dividing the coordinates of the sampling point on the base by the physical length of the unit pixel mapping and rounding. The gray value of the pixel located on the outer rectangle of the IC is obtained by dividing the coordinates of the corresponding sampling point on the base by the physical length of the unit pixel mapping and rounding. The gray value of the remaining pixels is zero.
[0103] Each time the control motor moves to a motor position, the alignment area of the image to be drawn corresponding to each camera's FOV is determined based on the relationship between the motor position and each camera's FOV. It is then determined whether the IC distribution within the alignment area meets the conditions for capturing a complete IC image.
[0104] The coordinates of the sampling point on the base include the X-axis coordinates and the Y-axis coordinates. For each pixel in the drawn image, there are both coarse-grained and fine-grained positions. The coarse-grained position is the image coordinate, and the fine-grained position is the pixel's gray value. The gray value of pixels located on the outer rectangle of the IC is obtained in the above way, while the gray value of pixels located outside the outer rectangle of the IC is zero.
[0105] As an optional implementation, the grayscale value of a pixel located on the outer rectangle of the IC is obtained by dividing the coordinates of the corresponding sampling point on the base by the integer part of the physical length mapped per unit pixel, including:
[0106] The grayscale value of the pixel on the horizontal edge of the outer rectangle of the IC is obtained by dividing the vertical coordinate of the corresponding sampling point on the base by the physical length of the unit pixel mapping and taking the remainder.
[0107] The grayscale value of a pixel on the vertical edge of the outer rectangle of the IC is obtained by dividing the horizontal coordinate of the corresponding sampling point on the base by the physical length of the unit pixel mapping and rounding down.
[0108] Each pixel has a horizontal and a vertical coordinate, and a grayscale value. For pixels on the horizontal line, the grayscale value is determined by the pixel's Y-axis coordinate to ensure more accurate recording of the motor position and prevent the upper and lower boundaries of the IC from being missed. For pixels on the vertical line, the grayscale value is determined by the pixel's X-axis coordinate to ensure more accurate recording of the motor position and prevent the left and right boundaries of the IC from being missed.
[0109] As an optional implementation, the grayscale value of a pixel located on the outer rectangle of the IC is obtained by dividing the coordinates of the corresponding sampling point on the base by the integer part of the physical length mapped per unit pixel, including:
[0110] The remainder is obtained by dividing the coordinates of the sampling points on the base plate on the outer rectangle of the IC by the physical length of the unit pixel mapping and rounding down.
[0111] Divide the remainder by the physical length and multiply by the total number of gray levels to obtain the gray value of the pixel located on the outer rectangle of the IC.
[0112] As an example, in this embodiment, the physical length of the unit pixel mapping is 100 micrometers, and the image type of the drawn image is a single-channel image with a depth of 8. That is, the grayscale value range is 0 to 255. The specific way to convert the remainder after division into the corresponding grayscale value is: divide the remainder after division by 0.39 (that is, divide the remainder by 100 multiplied by 256).
[0113] As an optional implementation, the grayscale value of the pixels located at the four corners of the outer rectangle of each IC in the drawn image is 1. The pixels at the four corners of the outer rectangle of each IC belong to both the pixels on the horizontal and vertical sides. Since each pixel has a grayscale value, in order to prevent interference when recording the motor position, this application sets the grayscale value of the pixels located at the four corners of the outer rectangle of each IC in the drawn image to 1.
[0114] Based on the completed image drawing, and considering the relationship between the image coordinates of each pixel on the image drawing and the corresponding point coordinates on the base, after determining the base coordinates of the alignment area of each camera FOV on the base according to the motor position, the alignment area of the image drawing corresponding to each camera FOV can be determined. Then, the corresponding alignment area can be obtained from the image drawing to determine the IC distribution.
[0115] 2) Determine the start and end points of the motor.
[0116] The embodiments of this application determine the start and end points of the motor position when each camera traverses the corresponding field of view in the following manner:
[0117] Based on the field of view of multiple cameras, determine the starting x-coordinate, starting y-coordinate, ending x-coordinate, and ending y-coordinate of the motor position when controlling the movement of multiple cameras so that any one of the cameras traverses the corresponding field of view;
[0118] The minimum starting point x-coordinate and minimum starting point y-coordinate are determined as the starting point of the motor position, and the maximum ending point x-coordinate and maximum ending point y-coordinate are determined as the ending point of the motor position.
[0119] Taking the upper left corner of the base as the origin, this can be understood as the starting point of the motor position for each camera when the FOV of the controlled motor is located at the upper left corner of the corresponding field of view. The starting point's x-coordinate and y-coordinate are then obtained. The ending point of the motor position for each camera is when its FOV is located at the lower right corner of the corresponding field of view. Finally, the smallest starting point x-coordinate and smallest starting point y-coordinate are determined as the starting point of the motor position, and the largest ending point x-coordinate and largest ending point y-coordinate are determined as the ending point of the motor position.
[0120] Innovations include circuit planning for multi-camera collaborative shooting and irregular IC layout, as well as innovations in processing the massive amounts of data brought about by large detection areas and high precision.
[0121] 3) Motor motion control
[0122] Based on the determined starting and ending points of the motor positions, motor path planning begins, which includes multiple lateral traversals and multiple longitudinal movements.
[0123] As an optional implementation, this application embodiment triggers a lateral traversal of the control motor to the endpoint horizontal coordinate. During the lateral traversal, it is determined that the IC distribution within multiple camera FOVs meets the conditions for capturing a complete IC image, including:
[0124] The motor is controlled to move laterally from the starting point horizontal coordinate, using the minimum FOV width among the multiple cameras in the alignment area as the first unit of movement, to the ending horizontal coordinate. The FOV width of each camera can be determined according to the camera parameters. The offset value of the motor's horizontal coordinate can be determined based on the minimum FOV width. The motor is controlled to offset from the starting point to the ending point by the above offset value, so that the alignment area moves by the minimum FOV width.
[0125] Each time the horizontal movement is completed by the first movement unit, it is determined whether the average gray value of the left edge pixel of the alignment area of the image corresponding to each camera FOV is zero. As mentioned above, if the average gray value of the left edge pixel of the alignment area is zero, it means that the left edge of the FOV does not overlap the outer rectangle of the IC. Otherwise, it means that the left edge of the FOV overlaps the outer rectangle of the IC.
[0126] If so, move laterally towards the endpoint by moving the alignment area by one pixel as the second movement unit. When the mean gray value of the left edge pixel of the alignment area of any camera FOV is non-zero, it is determined that the IC distribution in multiple camera FOVs meets the condition for capturing a complete IC, and the next movement by the first movement unit is triggered. When it is determined that the left edge of all FOVs has not pressed the outer rectangle of the IC, the motor needs to be controlled to move towards the endpoint to move the alignment area by one pixel. For example, if the alignment area is moved by 100 micrometers, if it still has not pressed the outer rectangle of the IC, continue to move until the left edge of any FOV presses the outer rectangle of the IC, and record the motor coordinates at this time.
[0127] Otherwise, move laterally towards the starting point, using the movement of one pixel in the alignment area as the second movement unit, and retain the minimum grayscale value of each pixel corresponding to the left line of each FOV. When the minimum grayscale value of all pixels on the left line of all FOVs is zero, it is determined that the IC distribution within multiple camera FOVs meets the condition for capturing a complete IC, and the next movement with the first movement unit is triggered. When it is determined that the left line of any FOV presses against the outer rectangle of the IC, the motor needs to be controlled to move towards the starting point to move the alignment area by one pixel, such as moving the alignment area by 100 micrometers. After the alignment area moves laterally to the smallest FOV, the grayscale values of pixels at different positions on the corresponding left line are retained. After that, each time one pixel is moved, if the grayscale value of the retained pixel at the same position is smaller than the grayscale value of the pixel after the movement, no processing is done; otherwise, the smaller pixel grayscale value is used to replace it, and the smaller pixel grayscale value is retained. When the grayscale values of the retained pixels at different positions on the left line of all FOVs are zero, the motor position at this time is recorded.
[0128] By using the above-described movement method and the method of recording the motor position, it can be ensured that the left line of the IC's outer rectangle can be captured for each FOV, without pressing on the left line of the IC's outer rectangle and causing the IC to be captured incompletely. For the right line part, an incomplete IC may be captured. However, after each movement, the right line of the FOV becomes the left line, and the corresponding complete IC can be found in the image taken by the camera after the movement.
[0129] As an optional implementation, in this embodiment, the control motor moves longitudinally one step towards the endpoint. When the IC distribution within the FOVs of multiple cameras meets the conditions for capturing a complete IC image, the position of the second motor is recorded. Otherwise, the motor is longitudinally adjusted to locate and record the position of the second motor when the IC distribution within the FOVs of multiple cameras meets the conditions for capturing a complete IC image. This includes:
[0130] Using the minimum FOV height among multiple cameras moving in the alignment area as the third movement unit, the motor is controlled to move longitudinally one step towards the endpoint. The FOV height of each camera can be determined according to the camera parameters. The offset value of the motor's longitudinal coordinate can be determined according to the minimum FOV height. The motor is controlled to move longitudinally towards the endpoint by the above offset value, so that the alignment area moves longitudinally by the minimum FOV height.
[0131] Determine if the mean grayscale value of the pixels on the upper edge of the alignment area of the image corresponding to each camera's FOV is zero. As mentioned earlier, if the mean grayscale value of the pixels on the upper edge of the alignment area is zero, it means that the upper edge of the FOV is not overlapping the outer rectangle of the IC. Otherwise, it means that the upper edge of the FOV is overlapping the outer rectangle of the IC, and the position needs to be adjusted.
[0132] If so, move the alignment area one pixel as the second movement unit and move it longitudinally towards the endpoint until the average gray value of the pixels on the upper edge of the alignment area of any camera FOV is non-zero. This confirms that the conditions for capturing a complete IC are met, and the position of the second motor is recorded. When it is confirmed that the upper edge of all FOVs has not pressed against the outer rectangle of the IC, the motor needs to be controlled to move longitudinally towards the endpoint to move the alignment area one pixel. For example, move the alignment area 100 micrometers. If it still has not pressed against the upper edge of the outer rectangle of the IC, continue moving until the upper edge of any FOV presses against the outer rectangle of the IC, and record the motor position at this time.
[0133] Otherwise, move the alignment area one pixel at a time as the second unit of movement, moving longitudinally towards the starting point while retaining the minimum grayscale value of each pixel corresponding to the top edge of each FOV. Continue until the minimum grayscale value of all pixels on the left edge of all FOVs is zero. This confirms that the IC distribution within multiple camera FOVs meets the conditions for capturing a complete IC, and records the position of the second motor. When the top edge of any FOV is pressed against the outer rectangle of the IC, the motor needs to be controlled to move longitudinally towards the starting point, moving the alignment area one pixel (e.g., moving the alignment area 100 micrometers). After moving the alignment area longitudinally to the smallest FOV, retain the grayscale values of pixels at different positions on the corresponding top edge. Then, move one pixel at a time, checking if the grayscale value of the retained pixel at the same position is smaller than the grayscale value of the moved pixel. If so, no processing is done; otherwise, replace it with the smaller pixel's grayscale value, retaining the smaller pixel's grayscale value. When the grayscale values of the retained pixels at different positions on the top edge of all FOVs are zero, record the motor position at this point.
[0134] By using the above-described movement method and the method of recording the motor position, it can be ensured that the top edge of the IC's outer rectangle can be captured for each FOV, without pressing on the top edge of the IC's outer rectangle and causing the IC to be captured incompletely. For the bottom edge, the IC may be captured incompletely. However, after each movement, the bottom edge of the FOV becomes the top edge, and the corresponding complete IC can be found in the image taken by the camera after the movement.
[0135] As an optional implementation, before each horizontal traversal of the control motor to the endpoint horizontal coordinate, the horizontal coordinate of the current control motor is reduced by a set redundancy value; each time the control motor moves vertically towards the endpoint, the vertical coordinate of the current control motor is reduced by a set redundancy value, thereby performing mechanical avoidance to prevent camera shake from affecting the shooting effect.
[0136] As an optional implementation, when the IC distribution within the FOV of multiple cameras meets the conditions for capturing a complete IC, the embodiments of this application record the position of the first motor in the following manner:
[0137] Record the current coordinates of the motor and the maximum grayscale value of the left-side line pixel within the alignment area corresponding to the current multiple camera FOVs, and determine the first physical length corresponding to the maximum grayscale value;
[0138] Determine the horizontal coordinate adjustment value corresponding to the first physical length that the alignment area of the FOV of multiple cameras driven by the motor is moved laterally towards the starting point.
[0139] The coordinates of the current motor are adjusted according to the horizontal coordinate adjustment value. Specifically, the vertical coordinate of the current motor is kept unchanged, and the horizontal coordinate is subtracted from the horizontal coordinate adjustment value to obtain the position of the first motor.
[0140] As an optional implementation, when the IC distribution within the FOV of multiple cameras meets the conditions for capturing a complete IC, this embodiment of the application records the position of the second motor in the following manner:
[0141] Determine the coordinates of the current motor and the maximum grayscale value of the upper edge pixel in the alignment area corresponding to the current multiple camera FOVs, and determine the second physical length corresponding to the maximum grayscale value;
[0142] Determine the vertical coordinate adjustment value corresponding to the second physical length corresponding to the alignment area of the FOV of multiple cameras driven by the motor moving longitudinally towards the starting point.
[0143] The coordinates of the current motor are adjusted according to the vertical coordinate adjustment value. Specifically, the horizontal coordinate of the current motor remains unchanged, and the vertical coordinate is subtracted from the vertical coordinate adjustment value to obtain the position of the second motor.
[0144] This application replaces the single-precision method (where only pixels represent distance) with a coarse-fine double-precision motor position determination method (pixels represent coarse precision, and grayscale values represent fine precision values). The maximum precision of path planning is approximately 390 nanometers, effectively reducing the size of the processed image, thereby improving the device's computing power and reducing hardware configuration requirements. It can be applied to scenarios involving large-format (below 110-inch LCD panels) and high-precision (0.4 micrometers) circuit planning.
[0145] The following is a detailed flowchart of the process for controlling the movement of the motor to drive the camera's motion path planning, such as... Figure 3 As shown, it includes:
[0146] Step 300: Control the motor to move to the starting point, triggering a horizontal traversal process;
[0147] Step 301: Record the coordinates of the current motor and the maximum gray value of the left-side pixel in the corresponding alignment area within the current FOV of multiple cameras. Determine and record the position of the first motor in the above manner.
[0148] Step 302: Control the motor to move laterally towards the endpoint, and move the alignment area of each camera's FOV to the smallest FOV width among the multiple cameras.
[0149] Step 303: Determine whether the mean gray value of the left-side pixel of the alignment area of the drawn image corresponding to each camera FOV is zero. If yes, proceed to step 3041; otherwise, proceed to step 3043.
[0150] Step 3041: Control the motor to move laterally towards the endpoint, and move the FOV alignment area of each camera laterally by one pixel.
[0151] Step 3042: Determine whether the mean gray value of the left-side pixel of the alignment area of the drawn image corresponding to each camera FOV is zero. If yes, return to step 3041; otherwise, proceed to step 305.
[0152] Step 3043: Record the grayscale values of each pixel at different positions on the left side line of each FOV.
[0153] Step 3044: Control the motor to move laterally towards the starting point, moving the FOV alignment area of each camera by one pixel.
[0154] Step 3045: For each pixel corresponding to a different position on the left side line of each FOV, if the gray value of the pixel corresponding to the same position currently recorded is less than the gray value of the pixel corresponding to the same position after the move, the gray value of the pixel corresponding to the same position remains unchanged; otherwise, the gray value of the pixel corresponding to the same position after the move is used to replace the recorded gray value of the pixel at the same position. That is, for each pixel corresponding to a different position on the left side line of each FOV, the minimum gray value of the pixel corresponding to the same position detected during the process of moving one pixel is retained. In this embodiment, the minimum gray value of each pixel corresponding to a different position on the left side line of each FOV is the composite gray value of the pixels corresponding to a different position on the left side line of each FOV.
[0155] Step 3046: Determine whether the composite grayscale values of the pixels corresponding to different positions on the left side line of all cameras' FOVs are all zero. If yes, proceed to step 306; otherwise, return to step 3054.
[0156] Step 305: Determine whether the horizontal coordinate of the motor has reached the horizontal coordinate of the endpoint. If yes, proceed to step 306; otherwise, return to step 301.
[0157] Step 306: Determine the end of this horizontal traversal and check if the ordinate of the endpoint has been reached. If yes, end; otherwise, proceed to step 307.
[0158] Step 307: Control the motor to return horizontally to the starting point's horizontal coordinate. Within the range of the ending point's vertical coordinate, trigger the motor to move vertically towards the ending point.
[0159] Step 308: After this vertical movement is completed, return to step 301.
[0160] In this embodiment, the trigger control motor moves longitudinally towards the endpoint once. The specific longitudinal movement method is as follows: Figure 4 As shown, it includes:
[0161] Step 401: Control the motor to move longitudinally towards the endpoint, and move the alignment area of each camera's FOV to the minimum FOV height among the multiple cameras.
[0162] Step 402: Record the current position of the second motor. Specifically, record the coordinates of the current motor and the maximum gray value of the upper edge pixel in the corresponding alignment area within the current FOV of multiple cameras. Determine and record the position of the second motor in the above manner.
[0163] Step 403: Determine whether the mean gray value of the pixels on the upper edge of the alignment area of the drawn image corresponding to each camera FOV is zero. If yes, proceed to step 404; otherwise, proceed to step 407.
[0164] Step 404: Control the motor to move horizontally and vertically towards the endpoint, and align the FOV of each camera by one pixel vertically.
[0165] Step 405: Determine whether the mean gray value of the pixels on the upper edge of the alignment area of the drawn image corresponding to each camera FOV is zero. If yes, return to step 404; otherwise, proceed to step 410.
[0166] Step 406: Record the grayscale values of each pixel at different positions on the upper edge of each FOV.
[0167] Step 407: Control the motor to move longitudinally towards the starting point, and move the FOV alignment area of each camera longitudinally by one pixel.
[0168] Step 408: For each pixel corresponding to a different position on the upper edge of each FOV, if the gray value of the pixel corresponding to the same position currently recorded is less than the gray value of the pixel corresponding to the same position after the move, the gray value of the pixel corresponding to the same position remains unchanged; otherwise, the gray value of the pixel corresponding to the same position after the move is used to replace the recorded gray value of the pixel at that position. That is, for each pixel corresponding to a different position on the upper edge of each FOV, the minimum gray value of the pixel corresponding to the same position detected during the process of moving one pixel is retained. In this embodiment, the minimum gray value of each pixel corresponding to a different position on the upper edge of each FOV is the composite gray value of the pixels corresponding to a different position on the upper edge of each FOV.
[0169] Step 409: Determine whether the composite grayscale values of the pixels corresponding to different positions on the upper edge of the FOV of all cameras are all zero. If yes, proceed to step 410; otherwise, return to step 406.
[0170] Step 410: This longitudinal movement is now complete.
[0171] Example 2
[0172] Based on the same inventive concept, this application also provides a visual inspection device for components on the surface of a circuit board, such as... Figure 5 As shown, it includes:
[0173] The starting point determination module 501 is used to control the motor to drive multiple cameras to move simultaneously, and to determine the starting point and ending point of the motor position when each camera traverses the corresponding field of view. The multiple cameras are located above the base and are arranged longitudinally at intervals. The movement of the motor is consistent with the movement direction of the multiple cameras. A circuit board including multiple ICs is placed on the base.
[0174] The first lateral motion control module 502 is used to control the motor to move to the starting point and record the position of the first motor, trigger a lateral traversal to control the motor to move laterally to the end point horizontal coordinate, and record the position of the first motor when it is determined during the lateral traversal that the IC distribution within the FOV of the multiple cameras meets the condition for capturing the complete IC.
[0175] The longitudinal motion control module 503 is used to control the motor to return to the starting point horizontal coordinate after each horizontal traversal, and to trigger the motor to move longitudinally towards the end point once within the range of the ending point vertical coordinate. When it is determined that the IC distribution within the FOV of the multiple cameras meets the condition for shooting a complete IC, the position of the second motor is recorded. Otherwise, the motor is adjusted longitudinally to find and record the position of the second motor when the IC distribution within the FOV of the multiple cameras meets the condition for shooting a complete IC.
[0176] The second lateral motion control module 504 is used to record the position of the first motor after each longitudinal movement, and then trigger the lateral traversal to control the motor to move laterally to the end horizontal coordinate. During the lateral traversal, when it is determined that the IC distribution within the FOV of the multiple cameras meets the condition for capturing the complete IC, the position of the first motor is recorded.
[0177] The shooting detection module 505 is used to control the motor to move to the end point, acquire the recorded position of the first motor and the position of the second motor, and control the motor to move to the corresponding position of the first motor and the position of the second motor to trigger shooting, so as to perform circuit board detection based on the IC information in the captured image.
[0178] As an optional implementation, the starting point determination module determines the starting and ending points of the motor positions when each camera traverses the corresponding field of view, including:
[0179] Based on the field of view of the multiple cameras, determine the starting x-coordinate, starting y-coordinate, ending x-coordinate, and ending y-coordinate of the motor position when controlling the movement of the multiple cameras so that any one of the cameras traverses the corresponding field of view;
[0180] The minimum starting point x-coordinate and minimum starting point y-coordinate are determined as the starting point of the motor position, and the maximum ending point x-coordinate and maximum ending point y-coordinate are determined as the ending point of the motor position.
[0181] As an optional implementation, the center of the largest outer rectangle of all ICs in the circuit board is aligned with the center of the base. The device also includes:
[0182] The image modeling module is used to sample the circuit board to obtain the pixels of the drawn image with the upper left corner of the base as the origin. The image coordinates of each pixel are obtained by dividing the coordinates of the sampling point on the base by the physical length of the unit pixel mapping and taking the integer part. The gray value of the pixel located on the outer rectangle of the IC is obtained by dividing the coordinates of the corresponding sampling point on the base by the physical length of the unit pixel mapping and taking the integer part. The gray value of the remaining pixels is zero.
[0183] Specifically, each time the motor moves to a motor position, the alignment area of the image to be drawn corresponding to each camera's FOV is determined based on the relationship between the motor position and each camera's FOV, and it is determined whether the IC distribution within the alignment area meets the conditions for capturing a complete IC.
[0184] As an optional implementation, the first lateral motion control module / second lateral motion control module triggers a lateral traversal to control the motor to move laterally to the endpoint horizontal coordinate. During the lateral traversal, it is determined that the IC distribution within the multiple camera FOVs all meet the conditions for capturing a complete IC, including:
[0185] The motor is controlled to move laterally from the starting point horizontal coordinate, using the smallest FOV width among the multiple cameras in the aligned area as the first unit of movement, to the ending horizontal coordinate.
[0186] Each time the horizontal movement is completed by the first movement unit, it is determined whether the mean gray value of the left-side pixel of the alignment area of the drawn image corresponding to each camera FOV is zero.
[0187] If so, move laterally towards the endpoint by moving one pixel in the alignment area as the second moving unit. When the mean gray value of the left-side pixel of the alignment area of any camera FOV is non-zero, it is determined that the IC distribution within the multiple camera FOVs meets the condition for capturing a complete IC, and the next movement with the first moving unit is triggered.
[0188] Otherwise, move laterally towards the starting point by moving one pixel in the alignment area as the second moving unit, and retain the minimum gray value of each pixel corresponding to the left line of each camera's FOV. When the minimum gray value of all pixels on the left line of each camera's FOV is zero, it is determined that the IC distribution within the multiple camera FOVs meets the conditions for capturing a complete IC, and the next movement with the first moving unit is triggered.
[0189] As an optional implementation, the longitudinal motion control module controls the motor to move longitudinally towards the endpoint once. If the IC distribution within the FOVs of all the cameras satisfies the conditions for capturing a complete IC, the position of the second motor is recorded. Otherwise, the longitudinal motion control module adjusts the motor to locate and record the second motor position when the IC distribution within the FOVs of all the cameras satisfies the conditions for capturing a complete IC. This includes:
[0190] Using the minimum FOV height among the multiple cameras moving in the alignment area as the third movement unit, the motor is controlled to move longitudinally one step towards the endpoint;
[0191] Determine whether the mean grayscale value of the pixels on the upper edge of the alignment area of the drawn image corresponding to each camera's FOV is zero;
[0192] If so, move longitudinally towards the endpoint by moving one pixel in the alignment area as the second moving unit. When the mean gray value of the pixels on the upper edge of the alignment area of any camera FOV is non-zero, it is determined that the condition for capturing a complete IC is met, and the position of the second motor is recorded.
[0193] Otherwise, move longitudinally towards the starting point by moving one pixel in the alignment area as the second moving unit, and retain the minimum gray value of each pixel corresponding to the upper edge of each FOV. When the minimum gray value of all pixels on the left edge of each FOV is zero, it is determined that the IC distribution within the multiple camera FOVs meets the conditions for shooting a complete IC, and the position of the second motor is recorded.
[0194] As an optional implementation, the grayscale value of a pixel located on the outer rectangle of the IC is obtained by dividing the coordinates of the corresponding sampling point on the base by the integer part of the physical length of the unit pixel mapping, including:
[0195] The grayscale value of the pixel on the horizontal edge of the outer rectangle of the IC is obtained by dividing the vertical coordinate of the corresponding sampling point on the base by the physical length of the unit pixel mapping and taking the remainder.
[0196] The grayscale value of a pixel on the vertical edge of the outer rectangle of the IC is obtained by dividing the horizontal coordinate of the corresponding sampling point on the base by the physical length of the unit pixel mapping and taking the remainder.
[0197] As an optional implementation, the first lateral motion control module / second lateral motion control module records the position of the first motor, including:
[0198] Determine the coordinates of the current motor and the maximum grayscale value of the left-side line pixel within the alignment area corresponding to the current multiple camera FOVs, and determine the first physical length corresponding to the maximum grayscale value;
[0199] Determine the horizontal coordinate adjustment value corresponding to the first physical length that the alignment area of the FOV of the multiple cameras driven by the motor is moved laterally towards the starting point.
[0200] The coordinates of the current motor are adjusted according to the horizontal coordinate adjustment value to obtain the position of the first motor.
[0201] As an optional implementation, the longitudinal motion control module records the position of the second motor, including:
[0202] Determine the coordinates of the current motor and the maximum grayscale value of the upper edge pixel in the alignment area corresponding to the current multiple camera FOVs, and determine the second physical length corresponding to the maximum grayscale value;
[0203] Determine the vertical coordinate adjustment value corresponding to the second physical length that the alignment area of the FOV of the multiple cameras driven by the motor is moved longitudinally towards the starting point.
[0204] The coordinates of the current motor are adjusted according to the vertical coordinate adjustment value to obtain the position of the second motor.
[0205] As an optional implementation, before each lateral movement control module / second lateral movement control module triggers the lateral movement of the motor to the endpoint lateral coordinate, the current lateral coordinate of the motor is reduced by a set redundancy value.
[0206] Each time the longitudinal motion control module is triggered, it controls the motor to move longitudinally towards the endpoint once, reducing the current longitudinal coordinate of the motor by a set redundancy value.
[0207] As an optional implementation, the grayscale value of the pixels located at the four corners of the outer rectangle of each IC in the drawn image is 1.
[0208] As an optional implementation, the grayscale value of a pixel located on the outer rectangle of the IC is obtained by dividing the coordinates of the corresponding sampling point on the base by the integer part of the physical length of the unit pixel mapping, including:
[0209] The remainder is obtained by dividing the coordinates of the sampling points on the outer rectangle of the IC on the base by the physical length of the unit pixel mapping and rounding it down.
[0210] Divide the remainder by the physical length and multiply by the total number of gray levels to obtain the gray value of the pixel located on the outer rectangle of the IC.
[0211] Based on the same inventive concept, this application also provides a visual inspection device for components on the surface of a circuit board, such as... Figure 6As shown, the visual inspection device 130 for components on the circuit board surface includes: a controller 131, a memory 132, and a bus 133 connecting different system components (including the memory 132 and the controller 131).
[0212] The memory stores instructions executable by the controller, which, when executed, enables the controller to perform the visual inspection method for circuit board surface components provided in the above embodiments. In this embodiment, the controller is connected to a motor for controlling the motor's movement.
[0213] Bus 133 represents one or more of several bus structures, including a memory bus or memory controller, peripheral bus, controller, or local bus using any of the various bus structures.
[0214] The memory 132 may include a readable medium in the form of volatile memory, such as random access memory (RAM) 1321 and / or cache memory 1322, and may further include read-only memory (ROM) 1323.
[0215] The memory 132 may also include a program / utility 1325 having a set (at least one) of program modules 1324, including but not limited to: an operating system, one or more application programs, other program modules, and program data, each or some combination of these examples may include an implementation of a network environment.
[0216] The PCB surface component visual inspection device 130 can also communicate with one or more external devices 134 (e.g., keyboard, pointing device, etc.), one or more devices that enable a user to interact with the PCB surface component visual inspection device 130, and / or any device that enables the PCB surface component visual inspection device 130 to communicate with one or more other electronic devices (e.g., router, modem, etc.). This communication can be performed via input / output (I / O) interface 135. Furthermore, the PCB surface component visual inspection device 130 can also communicate with one or more networks (e.g., local area network (LAN), wide area network (WAN), and / or public networks, such as the Internet) via network adapter 136. As shown, network adapter 136 communicates with other modules used for the PCB surface component visual inspection device 130 via bus 133. It should be understood that, although not shown in the figures, other hardware and / or software modules can be used in conjunction with the PCB surface component visual inspection device 130, including but not limited to: microcode, device drivers, redundant controllers, external disk drive arrays, RAID systems, tape drives, and data backup storage systems.
[0217] Obviously, those skilled in the art can make various modifications and variations to this application without departing from the spirit and scope of this application. Therefore, if such modifications and variations fall within the scope of the claims of this application and their equivalents, this application also intends to include such modifications and variations.
Claims
1. A method for visual inspection of components on the surface of a circuit board, characterized in that, include: The control motor drives multiple cameras to move simultaneously, and the starting point and ending point of the motor position are determined so that each camera traverses the corresponding field of view. The multiple cameras are located above the base and arranged longitudinally at intervals. The movement of the motor is in the same direction as the movement of the multiple cameras. A circuit board including multiple ICs is placed on the base. Control the motor to move to the starting point and record the position of the first motor. Trigger a horizontal traversal to control the motor to move laterally to the end horizontal coordinate. During the horizontal traversal, record the motor position when the IC distribution within the FOV of the multiple cameras meets the conditions for capturing the complete IC. After each horizontal traversal, the motor is controlled to return horizontally to the starting point's horizontal coordinate. Within the range of the ending point's vertical coordinate, the motor is triggered to move vertically towards the ending point once. If the IC distribution within the FOV of the multiple cameras meets the conditions for capturing a complete IC, the position of the second motor is recorded. Otherwise, the motor is adjusted vertically to find and record the position of the second motor where the IC distribution within the FOV of the multiple cameras meets the conditions for capturing a complete IC. Record the motor position after each vertical movement, and then trigger the horizontal traversal to control the motor to move horizontally to the end horizontal coordinate. During the horizontal traversal, record the motor position when the IC distribution within the multiple camera FOVs meets the conditions for capturing a complete IC. When the motor moves to the endpoint, the recorded motor position is obtained. When the motor moves to the recorded motor position one by one, the image is triggered to detect the circuit board based on the IC information in the captured image.
2. The method according to claim 1, characterized in that, Determine the start and end points of the motor positions so that each camera traverses its corresponding field of view, including: Based on the field of view of the multiple cameras, determine the starting x-coordinate, starting y-coordinate, ending x-coordinate, and ending y-coordinate of the motor position when controlling the movement of the multiple cameras so that any one of the cameras traverses the corresponding field of view; The minimum starting point x-coordinate and minimum starting point y-coordinate are determined as the starting point of the motor position, and the maximum ending point x-coordinate and maximum ending point y-coordinate are determined as the ending point of the motor position.
3. The method according to claim 1, characterized in that, The method further includes aligning the center of the largest outer rectangle of all ICs in the circuit board with the center of the base. Taking the upper left corner of the base as the origin, the pixel points of the drawn image are sampled from the circuit board. The image coordinates of each pixel point are obtained by dividing the coordinates of the sampling point on the base by the physical length of the unit pixel mapping and rounding. The gray value of the pixel point located on the outer rectangle of the IC is obtained by dividing the coordinates of the corresponding sampling point on the base by the physical length of the unit pixel mapping and rounding. The gray value of the remaining pixels is zero. Specifically, each time the motor moves to a motor position, the alignment area of the image to be drawn corresponding to each camera's FOV is determined based on the relationship between the motor position and each camera's FOV, and it is determined whether the IC distribution within the alignment area meets the conditions for capturing a complete IC.
4. The method according to claim 3, characterized in that, Triggering a lateral traversal that controls the motor to move laterally to the endpoint horizontal coordinate, during the lateral traversal, it is determined that the IC distribution within the multiple camera FOVs all meet the conditions for capturing a complete IC, including: The motor is controlled to move laterally from the starting point horizontal coordinate, using the smallest FOV width among the multiple cameras in the aligned area as the first unit of movement, to the ending horizontal coordinate. Each time the horizontal movement is completed by the first movement unit, it is determined whether the mean gray value of the left-side pixel of the alignment area of the drawn image corresponding to each camera FOV is zero. If so, move laterally towards the endpoint by moving one pixel in the alignment area as the second moving unit. When the mean gray value of the left-side pixel of the alignment area of any camera FOV is non-zero, it is determined that the IC distribution within the multiple camera FOVs meets the condition for capturing a complete IC, and the next movement with the first moving unit is triggered. Otherwise, move laterally towards the starting point by moving one pixel in the alignment area as the second moving unit, and retain the minimum gray value of each pixel corresponding to the left line of each camera's FOV. When the minimum gray value of all pixels on the left line of each camera's FOV is zero, it is determined that the IC distribution within the multiple camera FOVs meets the conditions for capturing a complete IC, and the next movement with the first moving unit is triggered.
5. The method according to claim 3, characterized in that, The motor is controlled to move longitudinally towards the endpoint once. If the IC distribution within the FOVs of all the cameras satisfies the condition for capturing a complete IC, the position of the second motor is recorded. Otherwise, the motor is adjusted longitudinally to locate and record the position of the second motor when the IC distribution within the FOVs of all the cameras satisfies the condition for capturing a complete IC. This includes: Using the minimum FOV height among the multiple cameras moving in the alignment area as the third movement unit, the motor is controlled to move longitudinally one step towards the endpoint; Determine whether the mean grayscale value of the pixels on the upper edge of the alignment area of the drawn image corresponding to each camera's FOV is zero; If so, move longitudinally towards the endpoint by moving one pixel in the alignment area as the second moving unit. When the mean gray value of the pixels on the upper edge of the alignment area of any camera FOV is non-zero, it is determined that the condition for capturing a complete IC is met, and the position of the second motor is recorded. Otherwise, move longitudinally towards the starting point by moving one pixel in the alignment area as the second moving unit, and retain the minimum gray value of each pixel corresponding to the upper edge of each FOV. When the minimum gray value of all pixels on the upper edge of each FOV is zero, it is determined that the IC distribution within the multiple camera FOVs meets the conditions for shooting a complete IC, and the position of the second motor is recorded.
6. The method according to claim 4 or 5, characterized in that, The grayscale value of a pixel located on the outer rectangle of the IC is obtained by dividing the coordinates of the corresponding sampling point on the base by the physical length of the unit pixel mapping and rounding down, including: The grayscale value of the pixel on the horizontal edge of the outer rectangle of the IC is obtained by dividing the vertical coordinate of the corresponding sampling point on the base by the physical length of the unit pixel mapping and taking the remainder. The grayscale value of a pixel on the vertical edge of the outer rectangle of the IC is obtained by dividing the horizontal coordinate of the corresponding sampling point on the base by the physical length of the unit pixel mapping and taking the remainder.
7. The method according to claim 6, characterized in that, Record the position of the first motor, including: Determine the coordinates of the current motor and the maximum grayscale value of the left-side line pixel within the alignment area corresponding to the current multiple camera FOVs, and determine the first physical length corresponding to the maximum grayscale value; Determine the horizontal coordinate adjustment value corresponding to the first physical length that the alignment area of the FOV of the multiple cameras driven by the motor is moved laterally towards the starting point. The coordinates of the current motor are adjusted according to the horizontal coordinate adjustment value to obtain the position of the first motor.
8. The method according to claim 6, characterized in that, Record the position of the second motor, including: Determine the coordinates of the current motor and the maximum grayscale value of the upper edge pixel in the alignment area corresponding to the current multiple camera FOVs, and determine the second physical length corresponding to the maximum grayscale value; Determine the vertical coordinate adjustment value corresponding to the second physical length that the alignment area of the FOV of the multiple cameras driven by the motor is moved longitudinally towards the starting point. The coordinates of the current motor are adjusted according to the vertical coordinate adjustment value to obtain the position of the second motor.
9. The method according to claim 1, characterized in that, Before each lateral traversal that controls the motor to move laterally to the endpoint horizontal coordinate, the current horizontal coordinate of the motor is reduced by a set redundancy value. Each time the control is triggered, the motor moves longitudinally towards the endpoint once, and the current longitudinal coordinate of the motor is reduced by a set redundancy value.
10. The method according to claim 3, characterized in that, The grayscale value of the pixels located at the four corners of the outer rectangle of each IC in the drawn image is 1.
11. The method according to claim 3, characterized in that, The grayscale value of a pixel located on the outer rectangle of the IC is obtained by dividing the coordinates of the corresponding sampling point on the base by the integer part of the physical length of the unit pixel mapping, including: The remainder is obtained by dividing the coordinates of the sampling points on the outer rectangle of the IC on the base by the physical length of the unit pixel mapping and rounding it down. Divide the remainder by the physical length and multiply by the total number of gray levels to obtain the gray value of the pixel located on the outer rectangle of the IC.
12. A visual inspection device for components on the surface of a circuit board, characterized in that, include: The starting point determination module is used to control the motor to drive multiple cameras to move simultaneously, and to determine the starting point and ending point of the motor position when each camera traverses the corresponding field of view. The multiple cameras are located above the base and arranged longitudinally at intervals. The movement of the motor is in the same direction as the movement of the multiple cameras. A circuit board including multiple ICs is placed on the base. The first lateral motion control module is used to control the motor to move to the starting point and record the position of the first motor, trigger a lateral traversal to control the motor to move laterally to the end point horizontal coordinate, and record the motor position when it is determined that the IC distribution within the multiple camera FOVs meets the conditions for shooting the complete IC. The longitudinal motion control module is used to control the motor to return to the starting point horizontal coordinate after each horizontal traversal. Within the range of the ending point vertical coordinate, it triggers the motor to move longitudinally towards the ending point once. When it is determined that the IC distribution within the FOV of the multiple cameras meets the condition for capturing a complete IC, the position of the second motor is recorded. Otherwise, the motor is adjusted longitudinally to find and record the position of the second motor when the IC distribution within the FOV of the multiple cameras meets the condition for capturing a complete IC. The second lateral motion control module is used to record the motor position after each longitudinal movement ends, and then trigger the lateral traversal to control the motor to move laterally to the end horizontal coordinate. During the lateral traversal, the motor position is recorded when the IC distribution within the multiple camera FOVs meets the conditions for capturing complete ICs. The imaging and detection module is used to control the motor to move to the end point, acquire and record the motor position, and control the motor to move to the recorded motor position one by one to trigger imaging, so as to perform circuit board detection based on the IC information in the captured image.
13. A visual inspection device for components on the surface of a circuit board, characterized in that, include: A controller and a memory communicatively connected to the controller; wherein the memory stores instructions executable by the controller to enable the controller to perform the method as described in any one of claims 1-11.
14. A visual inspection system for components on the surface of a circuit board, characterized in that, include: A base and a circuit board located on the base, wherein the center of the largest outer rectangle of all ICs on the circuit board is aligned with the center of the base; Multiple cameras arranged longitudinally at intervals above the base and moving simultaneously, the total field of view of the multiple cameras being larger than the maximum circumscribed rectangle; The controller controls the simultaneous movement of multiple cameras driven by motors, determining the start and end points of the motor positions when each camera traverses its corresponding field of view. The multiple cameras are located above a base and arranged longitudinally at intervals. The motor movement is in the same direction as the movement of the multiple cameras. A circuit board containing multiple ICs is placed on the base. The controller moves the motor to the start point and records the first motor position. It then triggers a lateral traversal, controlling the motor to move laterally to the end point's horizontal coordinate. During this lateral traversal, the controller records the first motor position, ensuring that the IC distribution within the FOV of all cameras satisfies the condition for capturing a complete IC image. After each lateral traversal, the controller controls the motor to return laterally to the start point's horizontal coordinate. Within the range of the end point's vertical coordinate, the controller triggers a longitudinal movement of the motor towards the end point. Once the camera moves once and confirms that the IC distribution within the FOVs of all cameras meets the conditions for capturing a complete IC, the position of the second motor is recorded. Otherwise, the motor is adjusted vertically to find and record the position of the second motor that meets the conditions for capturing a complete IC within the FOVs of all cameras. After each vertical movement, the motor position is recorded, and then the horizontal traversal is triggered to control the motor to move horizontally to the endpoint horizontal coordinate. During the horizontal traversal, the motor position where the conditions for capturing a complete IC within the FOVs of all cameras are confirmed is recorded. When the motor moves to the endpoint, the recorded motor position is obtained. When the motor moves to the recorded motor position one by one, the shooting is triggered to perform circuit board detection based on the IC information in the captured image.