A multi-patch component detection system and method
By utilizing image acquisition, segmentation, and detection modules, the multi-chip component inspection system overcomes the limitations of image processing in domestic chip mounter vision inspection technology, achieving high-precision chip mount coordinate and angle detection, and improving the inspection efficiency and accuracy of the chip mounter.
Patent Information
- Application Number
- CN202211743352.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-12-28
- Publication Date
- 2026-02-24
- Estimated Expiration
- 2042-12-28
AI Technical Summary
The lack of independent technology brands for domestic pick-and-place machines has led to reliance on imports, resulting in high costs and limiting the development of the electronics industry. Existing visual inspection technology for pick-and-place machines has limitations in image processing methods, affecting positioning accuracy and efficiency.
A multi-patch component detection system is adopted, including an image acquisition module, an image segmentation module, and an image detection module. Through image preprocessing, an improved polygon approximation method, and a progressive linear Hough transform algorithm, the coordinate information and rotation angle of the patch are accurately detected.
It achieves high-precision detection of chip placement coordinates and angles, meets the actual working requirements of chip placement machines, improves detection efficiency and accuracy, and reduces reliance on traditional manual inspection.
Smart Images

Figure CN116030008B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of intelligent testing technology, and in particular to a testing system and method for multi-surface-mount components. Background Technology
[0002] In recent years, with the development of China's domestic electronics industry, my country has become the world's largest electronics producer. Users have increasingly higher demands for the quality of electronic products, while domestic labor costs continue to rise, prompting more and more electronics companies to introduce fully automated surface mount technology (SMT) production lines. With the explosive growth in demand, domestic companies and research institutions are striving to domestically produce SMT production lines. Research and development of placement machines began in China in the 1980s. However, although most surface mount equipment has been domestically produced, domestically made placement machines that meet market requirements have not yet been developed. Currently, domestic manufacturers still need to import placement machines from companies in Europe, America, and Japan, with each machine costing millions or even tens of millions of US dollars. This not only raises the costs for my country's electronics manufacturing companies and restricts the development of my country's electronics industry, but also causes a significant outflow of foreign exchange.
[0003] With the development of technology and the demand for automated production lines, the global demand for electronic information products is constantly increasing, leading to a rapid surge in the export volume of surface mount technology (SMT) equipment. Simultaneously, China's demand for related SMT equipment has also increased, resulting in a large-scale import of equipment from overseas. According to export data, 8,992 SMT automated equipment units were imported in 2000, and China's total SMT inventory exceeded 30,000 units, with approximately 15,000 SMT production lines in operation. my country's demand for SMT equipment has made it the world's largest and most important market for pick-and-place machines. Currently, the Chinese pick-and-place machine market lacks independent technology brands, resulting in a near-total reliance on imports for domestic supply. Against this challenging backdrop, my country should enhance its research and development of related technologies for placement equipment. Automatic pick-and-place machines, as a crucial component of SMT production lines, are high-tech automated machines integrating mechanical technology, laser technology, and microelectronics. Therefore, accelerating the upgrading and technological development of SMT equipment is of profound significance for achieving production line automation.
[0004] In my country's electronic product manufacturing process, SMT (Surface Mount Technology) is a key component of production line automation, and its application is also widely used in the manufacturing of products in other industries. Due to its advantages such as high precision and high speed, SMT technology has undergone significant changes in electronic assembly technology after years of research. Traditional manual assembly has been replaced by automated precision assembly, low-quality assembly techniques are constantly being iterated and optimized, and automated assembly technology will continue to upgrade in the future.
[0005] Pick-and-place machines, characterized by high speed and high precision, are advanced automated equipment integrating mechanical technology, laser technology, and microelectronics. Their high speed and precision impose stringent technical requirements and necessitate sophisticated hardware configurations. Furthermore, the vision system of a pick-and-place machine requires corresponding digital image algorithms to solve the corresponding visual inspection tasks. Therefore, the research and development of key technologies for pick-and-place machine vision is an extremely challenging task.
[0006] High-speed, high-precision pick-and-place machines commonly employ vision inspection technology. This technology consists of two parts: component pose estimation and PCB reference point positioning. Component pose estimation involves accurately and quickly locating the component's position, including its center and rotation angle. PCB reference point positioning requires precise positioning of the PCB.
[0007] The reference point center on the substrate, by transmitting positioning information to the motion control system, compensates for existing pose errors, completing the correction of component misalignment and reference point center offset. Its positioning accuracy and speed directly affect the placement accuracy and efficiency of the pick-and-place machine. Therefore, positional vision inspection technology for pick-and-place machines is one of the key technological breakthroughs for improving their placement accuracy and efficiency. In actual industrial product manufacturing, manual assembly and inspection are inefficient and prone to errors. The introduction of machine vision technology, with its precise and rapid measurement, positioning, and detection capabilities, has enabled automated assembly lines to replace traditional manual inspection, greatly improving production efficiency and product quality. However, currently, domestic pick-and-place machines do not incorporate advanced high-precision vision-assisted positioning technology, resulting in relatively low placement accuracy and speed. This is mainly reflected in the limitations of the image processing methods, affecting solution efficiency, and the need for further improvement and refinement of positioning accuracy. Although more than 30 years of development have passed, the gap between China's SMT equipment level and the world's advanced level remains significant. Therefore, researching image processing and position detection technologies for pick-and-place machines, as key technologies in pick-and-place machines, and achieving the localization of pick-and-place machine production is an urgent task.
[0008] Therefore, the present invention proposes a multi-surface component detection system and method for accurately detecting the coordinate information and rotation angle of the surface mount components, and has high precision, which can meet the actual working requirements of the surface mount machine. Summary of the Invention
[0009] To address the shortcomings of existing technologies, this invention provides a multi-surface component detection system and method for accurately detecting the coordinate information and rotation angle of surface mount components. It also has high precision and can meet the actual working requirements of surface mount machines.
[0010] A multi-surface component inspection system includes: an image acquisition module for automatically acquiring original images of the multi-surface components;
[0011] The image segmentation module is used to segment the original image to obtain several single-patch images containing only single patches;
[0012] The image detection module is used to calculate the coordinate information and rotation angle of a single patch contained in a single image.
[0013] As one embodiment of the present invention, the image acquisition module includes:
[0014] The placement unit is used to place and fix multiple surface-mount components and to emit a first signal;
[0015] The light source setting unit is used to set the corresponding light source according to the type and orientation of the multi-surface components after receiving the first signal, and to emit a second signal;
[0016] The camera unit is used to acquire raw images of the multi-surface-mount components after receiving the second signal.
[0017] As an embodiment of the present invention, the light source setting unit performs the following operations:
[0018] Based on the feature information, each surface mount component in the multi-surface mount component is classified to obtain multiple category information;
[0019] Obtain the orientation information of each surface-mount component on the placement unit to obtain multiple orientation information;
[0020] Based on multiple categories of information and multiple locations of information, a correlation judgment is made to obtain the degree of correlation; whereby the degree of correlation represents the degree to which different categories of information are affected by the light source at different locations.
[0021] Based on the degree of correlation, the state of light to be supplemented for each patch component is determined;
[0022] The category information, orientation information and the state of light to be supplemented for each patch component are matched one by one to form a light supplementation requirement instruction;
[0023] Complete the light source settings according to the supplementary lighting requirements.
[0024] As one embodiment of the present invention, the light source setting is completed according to the supplementary lighting requirement command, including:
[0025] The expected satisfaction of supplementary lighting for each patch component is generated based on each supplementary lighting demand command. Under the initial conditions, the expected satisfaction of supplementary lighting for each patch component is empty. When the supplementary lighting demand command of any patch component is perfectly executed, its corresponding expected satisfaction of supplementary lighting is full.
[0026] Based on the total amount of light source scheduling and all supplementary lighting requirements from the light source setting unit, an initial light source setting scheme is adaptively generated.
[0027] Under the initial light source setting scheme, obtain the expected satisfaction of supplemental lighting for each patch component;
[0028] Based on the preset minimum expected satisfaction threshold for supplementary lighting, the initial light source setting scheme is adjusted until the expected satisfaction of supplementary lighting for each patch component is not lower than the minimum expected satisfaction threshold for supplementary lighting, and the adjustment ends to obtain the target light source setting scheme.
[0029] Complete the light source setup according to the target light source setup plan.
[0030] As an embodiment of the present invention, a multi-surface component inspection system further includes:
[0031] If a target light source setup solution cannot be obtained within the preset time, a warning message will be issued.
[0032] Simultaneously, based on the preset minimum supplementary lighting expectation satisfaction threshold and the supplementary lighting maximum rectangle strategy, the initial light source setting scheme is adjusted until the maximum rectangle composed of patch components that can satisfy the supplementary lighting expectation satisfaction of each patch component is not lower than the minimum supplementary lighting expectation satisfaction threshold is obtained, and the second light source setting scheme is generated.
[0033] Complete the light source setup according to the second light source setup scheme;
[0034] The supplementary lighting requirement instruction ignored in the second light source setting scheme is obtained as an ignore instruction and sent to the image segmentation module.
[0035] As one embodiment of the present invention, the image segmentation module includes:
[0036] The original image preprocessing unit is used to perform image preprocessing operations on the original image to obtain the first image;
[0037] The image segmentation unit is used to process the first image based on the improved polygon approximation method, calculate the contour distance centroid of the processed first image, and segment the first image based on the contour distance centroid to obtain several single-piece images containing only single patches.
[0038] As one embodiment of the present invention, the image detection module includes:
[0039] The patch angle detection unit is used to determine the rotation angle of a single patch contained in a single image;
[0040] The patch position information detection unit is used to determine the coordinate information of a single patch contained in a single image.
[0041] As one embodiment of the present invention, the patch angle detection unit includes:
[0042] The image processing subunit is used to perform grayscale processing, filtering processing, binarization processing, Harris corner detection processing, morphological pin removal processing and contour extraction processing on a single image to obtain the main contour of the single patch.
[0043] The line extraction sub-unit is used to perform a progressive line Hough transform on the main contour to obtain the rotation angle of the single patch contained in the single image.
[0044] As an embodiment of the present invention, the patch position information detection unit performs the following operations:
[0045] Based on the edge tracking algorithm, the minimum bounding rectangle of a single image is extracted;
[0046] By positioning any corner point as the origin of the coordinate system, the center coordinates of the smallest bounding rectangle can be calculated.
[0047] Based on the center coordinates, rotation angle, and preset patch information, the coordinate information of a single patch contained in a single image is calculated.
[0048] A method for detecting multiple surface mount components includes: automatically acquiring original images of the multiple surface mount components;
[0049] The original image is segmented to obtain several single-patch images containing only single patches;
[0050] The coordinate information and rotation angle of each patch contained in a single image are calculated.
[0051] The beneficial effects of this invention are as follows:
[0052] The present invention provides a multi-surface component detection system and method for accurately detecting the coordinate information and rotation angle of the surface mount components, and has high precision, which can meet the actual working requirements of the surface mount machine.
[0053] Other features and advantages of the invention will be set forth in the following description, and will be apparent in part from the description, or may be learned by practicing the invention. The objects and other advantages of the invention may be realized and obtained by means of the structures particularly pointed out in the written description and the accompanying drawings.
[0054] The technical solution of the present invention will be further described in detail below with reference to the accompanying drawings and embodiments. Attached Figure Description
[0055] The accompanying drawings are provided to further illustrate the invention and form part of the specification. They are used in conjunction with embodiments of the invention to explain the invention and do not constitute a limitation thereof. In the drawings:
[0056] Figure 1 This is a schematic diagram of the system modules of a multi-surface component detection system and method according to an embodiment of the present invention;
[0057] Figure 2 This is a schematic diagram of an image acquisition module in a multi-surface component detection system and method according to an embodiment of the present invention;
[0058] Figure 3 This is a flowchart of a multi-surface component testing system and method according to an embodiment of the present invention. Detailed Implementation
[0059] The preferred embodiments of the present invention will be described below with reference to the accompanying drawings. It should be understood that the preferred embodiments described herein are for illustration and explanation only and are not intended to limit the present invention.
[0060] Please see Figure 1 This invention provides a multi-surface component inspection system, including: an image acquisition module 1, used to automatically acquire original images of multi-surface components;
[0061] Image segmentation module 2 is used to segment the original image to obtain several single-patch images containing only single patches;
[0062] Image detection module 3 is used to calculate the coordinate information and rotation angle of a single patch contained in a single image;
[0063] The working principle and beneficial effects of the above technical solution are as follows: The multi-surface component detection system mainly consists of two parts. The first part is the hardware part, which is mainly the image acquisition module 1, responsible for acquiring images of the semiconductor chips to be detected within the field of view. The second part is the software part, which mainly includes the image segmentation module 2 and the image detection module 3. The main process of this system during implementation is as follows: First, the image acquisition module 1 is used to acquire images of the chip surfaces on the platform PCB, and an automatic image acquisition process is established to acquire high-quality images of multiple chips. After image preprocessing of the acquired rectangular component images, pin interference is removed to obtain the main outline. Then, the progressive straight line Hough transform algorithm is used to extract the outline straight line. Finally, the component angle is obtained through the straight line information. An edge tracking algorithm is used to find the edge starting point and track and mark it. Then, the minimum bounding rectangle is extracted. Finally, by defining a coordinate system, the center coordinates of the chip surface are calculated, and the coordinates of the chip edge points are deduced based on the component angle.
[0064] Among them, the method of extracting the straight line of the patch contour by using the progressive straight line Hough transform algorithm to obtain the component angle has the advantages of fast processing speed and high efficiency compared with direct Hough transform straight line detection. It can be applied to other high-precision angle detection occasions.
[0065] A multi-surface component inspection system was built. By using image preprocessing algorithms to remove image background, noise, and pin interference to obtain the main body contour, compared with the traditional pin centroid straight line detection method, this method can eliminate the detection deviation caused by pin incomplete asymmetry or slight deformation through pre-image processing.
[0066] Edge tracking algorithms can extract the enclosing relationships of connected regions in a binary image and obtain the topological structure of the image edges. Compared with general image processing methods, they can eliminate connected regions or holes in the image based on geometric or topological characteristics, reduce background interference, and improve the accuracy of patch position detection.
[0067] Please see Figure 2 In one embodiment, the image acquisition module 1 includes:
[0068] Placement unit 11 is used to place and fix multiple surface mount components and to emit a first signal;
[0069] The light source setting unit 12 is used to set the corresponding light source according to the type and orientation of the multi-surface components after receiving the first signal, and to emit a second signal;
[0070] The camera unit 13 is used to acquire the original image of the multi-surface component after receiving the second signal;
[0071] The working principle and beneficial effects of the above technical solution are as follows: The image acquisition module is an important component of the detection system. The quality of the acquired images of the surface mount components directly affects subsequent image processing and position detection. Therefore, it is necessary to use a suitable industrial camera and a suitable light source. Traditional manual visual inspection of the surface mount angle and character area has significant limitations. Not only is the inspection speed slow and inefficient, but long inspection times can also lead to fatigue and inaccurate results. The image acquisition module of this detection system replaces the traditional manual visual inspection method to perform high-quality and high-efficiency positioning and detection of surface mount angle and chip character area information. During actual data acquisition, the chip is placed in the corresponding model tray, and the tray is fixed and placed horizontally on the placement unit 11. The image acquisition is completed by the light source setting unit 12 and the camera unit 13. The camera unit 13 includes, but is not limited to, industrial cameras, lenses and other hardware. The parameters set internally include, but are not limited to, camera frame rate, camera exposure value, camera trigger mode and other parameters. The light source setting unit 12 is responsible for the light source and its initialization. After the image is acquired through the camera SDK function, the original image is imported into the image segmentation module through the first sending unit, and an efficient image storage and retrieval mechanism is established to reduce unnecessary memory occupation and improve software efficiency.
[0072] In one embodiment, the light source setting unit performs the following operations:
[0073] Based on the feature information, each surface mount component in the multi-surface mount component is classified to obtain multiple category information;
[0074] Obtain the orientation information of each surface-mount component on the placement unit to obtain multiple orientation information;
[0075] Based on multiple categories of information and multiple locations of information, a correlation judgment is made to obtain the degree of correlation; whereby the degree of correlation represents the degree to which different categories of information are affected by the light source at different locations.
[0076] Based on the degree of correlation, the state of light to be supplemented for each patch component is determined;
[0077] The category information, orientation information and the state of light to be supplemented for each patch component are matched one by one to form a light supplementation requirement instruction;
[0078] Complete the light source settings according to the supplementary lighting requirements;
[0079] The beneficial effects of the above technical solution are as follows: Through the above technical solution, the light source settings for each surface mount component in the multi-surface mount components can be better configured, ensuring that the image acquisition unit can acquire the original image of each surface mount component with high quality.
[0080] In one embodiment, setting up the light source according to the supplementary lighting requirement instruction includes:
[0081] The expected satisfaction of supplementary lighting for each patch component is generated based on each supplementary lighting demand command. Under the initial conditions, the expected satisfaction of supplementary lighting for each patch component is empty. When the supplementary lighting demand command of any patch component is perfectly executed, its corresponding expected satisfaction of supplementary lighting is full.
[0082] Based on the total amount of light source scheduling and all supplementary lighting requirements from the light source setting unit, an initial light source setting scheme is adaptively generated.
[0083] Under the initial light source setting scheme, obtain the expected satisfaction of supplemental lighting for each patch component;
[0084] Based on the preset minimum expected satisfaction threshold for supplementary lighting, the initial light source setting scheme is adjusted until the expected satisfaction of supplementary lighting for each patch component is not lower than the minimum expected satisfaction threshold for supplementary lighting, and the adjustment ends to obtain the target light source setting scheme.
[0085] Complete the light source setup according to the target light source setup plan;
[0086] The beneficial effects of the above technical solution are as follows: By rationally scheduling the configuration of light sources, it is possible to prevent insufficient light source resources from causing the patch components that first complete the supplementary lighting requirements to occupy too many resources, which would prevent subsequent patch components from completing the supplementary lighting requirements and affect the high-quality acquisition of images.
[0087] In one embodiment, a multi-surface component inspection system further includes:
[0088] If a target light source setup solution cannot be obtained within the preset time, a warning message will be issued.
[0089] Simultaneously, based on the preset minimum supplementary lighting expectation satisfaction threshold and the supplementary lighting maximum rectangle strategy, the initial light source setting scheme is adjusted until the maximum rectangle composed of patch components that can satisfy the supplementary lighting expectation satisfaction of each patch component is not lower than the minimum supplementary lighting expectation satisfaction threshold is obtained, and the second light source setting scheme is generated.
[0090] Among them, the maximum rectangle strategy for supplementary lighting is to obtain the maximum rectangle formed by the patch components that can satisfy the supplementary lighting expectation satisfaction of each patch component not lower than the minimum supplementary lighting expectation satisfaction threshold. Other patch components outside the maximum rectangle are not supplemented with lighting, and all light source resources are used to supplement the lighting of other patch components within the maximum rectangle.
[0091] Complete the light source setup according to the second light source setup scheme;
[0092] The supplementary lighting requirement instruction ignored in the second light source setting scheme is obtained as an ignore instruction and sent to the image segmentation module;
[0093] Furthermore, ignore the surface-mount components mentioned in the instruction and pass them to the processing workshop for further processing;
[0094] The beneficial effects of the above technical solution are as follows: the continuity of detection is improved, and the fault tolerance of the system is enhanced. When there is a problem with the light source, the acquisition range is automatically narrowed and acquisition continues without waiting for user response and repair before it can continue to work. At the same time, an ignore instruction is sent to the image segmentation module to prevent the subsequent image segmentation module from performing invalid processing on this part of the component, thereby improving processing efficiency.
[0095] In one embodiment, the image segmentation module includes:
[0096] The original image preprocessing unit is used to perform image preprocessing operations on the original image to obtain the first image;
[0097] The image segmentation unit is used to process the first image based on the improved polygon approximation method, calculate the contour distance centroid of the processed first image, and segment the first image based on the contour distance centroid to obtain several single-piece images containing only single patches.
[0098] The working principle and beneficial effects of the above technical solution are as follows: The original image preprocessing unit is used to perform image preprocessing operations on the original image, including but not limited to enhancement, smoothing, and denoising operations on the original image to obtain a first image. At the same time, the image segmentation unit is used to process the first image based on the improved polygon approximation method. Simultaneously, the contour distance centroid of the processed first image is calculated, and the first image is segmented based on the contour distance centroid to obtain several single-piece images containing only single patches, thereby improving the accuracy of subsequent detection of each patch.
[0099] In one embodiment, the image detection module includes:
[0100] The patch angle detection unit is used to determine the rotation angle of a single patch contained in a single image;
[0101] The patch position information detection unit is used to determine the coordinate information of a single patch contained in a single image;
[0102] The working principle and beneficial effects of the above technical solution are as follows: by using the placement angle detection unit and the placement position information detection unit, the coordinate information and rotation angle of the placement are accurately detected, so that the system can meet the actual working requirements of the placement machine.
[0103] In one embodiment, the patch angle detection unit includes:
[0104] The image processing subunit is used to perform grayscale processing, filtering processing, binarization processing, Harris corner detection processing, morphological pin removal processing and contour extraction processing on a single image to obtain the main contour of the single patch.
[0105] The line extraction sub-unit is used to perform a progressive line Hough transform on the main contour to obtain the rotation angle of the single patch contained in the single image.
[0106] The working principle and beneficial effects of the above technical solution are as follows: Patch angle detection mainly includes two parts: image preprocessing and line extraction. Image preprocessing includes grayscale conversion, filtering, binarization, morphological pin removal, Harris corner detection processing, and contour extraction. Line extraction performs a progressive Hough transform on the main body contour to obtain the rotation angle value of the component. The image processing subunit performs the following operations:
[0107] Grayscale processing: Images acquired by vision systems are usually color images, which cannot reflect the morphological features of the image. Therefore, it is necessary to convert the image to grayscale for later processing. In order to improve the clarity of the image, a weighted average method is used to convert the element image to grayscale. The color image is weighted and averaged according to the three components R, G, and B with different weights to obtain the grayscale image of the element.
[0108] Filtering is necessary because images may contain noise during the acquisition process due to the influence of the working environment. To remove the impact of noise on image processing, filtering is required. Gaussian filtering is commonly used to process images. Adaptive Gaussian filtering can apply different thresholds to different regions based on the local features of the image, thus removing noise while preserving information in detailed regions.
[0109] Based on Harris corner detection, corner detection methods are mainly divided into two types: those based on image edge features and those based on image grayscale. Corner detection methods based on image edge features have relatively stable detection performance, but they are sensitive to local changes in edge contours and cannot provide accurate thresholds for corner extraction. Corner detection methods based on image grayscale are computationally simple and have low time complexity, but they are more sensitive to noise and isolated points.
[0110] There are five common corner types: L-shaped, T-shaped, Y-shaped, X-shaped, and T-shaped. In this embodiment, all corners in the target contour are L-shaped. Therefore, in the process of correcting chip pin / molded package images, the L-shaped corners are processed directly, which can greatly reduce the amount of computation for corner detection and image correction.
[0111] Compared to other corner detection methods, the Harris corner detection algorithm is computationally simple and easy to implement, which helps reduce costs.
[0112] After image binarization, there may be some discrete points. This invention uses morphological processing to accurately extract the main outline of the component; it uses opening operation to process the image, which is erosion followed by dilation, and has the characteristics of smoothing the target outline, removing isolated points, and keeping the overall position and shape unchanged; morphological processing cannot remove all the pins, so in order to obtain the main outline of the rectangular component, pin removal and outline extraction are still required.
[0113] Pin removal includes: scanning and counting the area of each closed region in the image, setting the area of the main body region as parameter S, and removing closed regions with an area smaller than parameter S to remove pins and obtain the main body of the component;
[0114] Contour extraction includes: extracting the main contour of the component using an eight-neighbor contour tracing method. The basic idea is that if a point in the image is white and its eight adjacent points are also white, then it is removed to obtain the main contour.
[0115] The line extraction subunit is used to perform a progressive Hough transform on the main contour to obtain the rotation angle of each patch contained in a single image. The traditional Hough transform utilizes the duality of points and lines, mapping a given point in the image space to a point in the parameter space through a curve representation, transforming the problem of line detection in an image into finding a peak value in the parameter space. In the image space, the grayscale value of M×N image pixels is set as I(x... i ,y i In the parameter space, H(ρ) q ,θ k ) is the pixel grayscale value accumulator unit for all points, ρ has q samples, and straight line detection with a step size of Δ is performed on θ in the interval [0,π), where the step size Δ is inversely proportional to the detection accuracy; in order to solve the problem that the traditional Hough transform algorithm cannot meet the fast processing under high accuracy, a progressive method of step size from large to small is adopted for straight line detection, and finally the angle of the patch element is obtained through the straight line information.
[0116] The steps of the progressive Hough transform are as follows:
[0117] (1) Perform coarse detection of straight lines with a step size of Δ1 on θ in the interval [0,π).
[0118] (2) Select the optimal line from the detected lines and take the angle θ between it and the x-axis. α ;
[0119] (3) At θ α of Within the range, perform precise linear detection with a step size of Δ2, taking Δ1 >> Δ2 (a difference of one to two orders of magnitude);
[0120] Among them, the method of extracting the straight line of the patch contour by using the progressive straight line Hough transform algorithm to obtain the component angle has the advantages of fast processing speed and high efficiency compared with direct Hough transform straight line detection. It can be applied to other high-precision angle detection occasions.
[0121] A multi-surface component inspection system was built. By using image preprocessing algorithms to remove image background, noise, and pin interference to obtain the main body contour, this method can eliminate detection deviations caused by pin asymmetry or slight deformation through pre-image processing, compared with the traditional pin centroid straight line detection method.
[0122] In one embodiment, the patch position information detection unit performs the following operations:
[0123] Based on the edge tracking algorithm, the minimum bounding rectangle of a single image is extracted;
[0124] By positioning any corner point as the origin of the coordinate system, the center coordinates of the smallest bounding rectangle can be calculated.
[0125] Based on the center coordinates, rotation angle, and preset patch information, the coordinate information of a single patch contained in a single image is calculated.
[0126] The working principle and beneficial effects of the above technical solution are as follows: Based on the edge tracking algorithm, the preferred steps for extracting the minimum bounding rectangle of a single image are: 1. Find the edge starting point, scan the single image, find the pixels that match the edge starting point and represent them with vectors; 2. Calculate the parent edge of the newly discovered edge; during the image scanning stage, make the edge serial numbers as close as possible; 3. Track the edge starting from the starting point; starting from the starting point, assign values to each pixel on each edge according to two strategies; 4. Extract the minimum bounding rectangle. The above process yields a sequence of edge points of objects in the image, and the points in the sequence are arranged clockwise. Extract the minimum rectangle containing all edge points in the sequence.
[0127] By positioning any corner point as the origin of the coordinate system and calculating the center coordinates of the smallest bounding rectangle, it is preferable to position the top left corner of a single image as the origin of the coordinate system to determine the orientation of objects in the image, and calculate the center coordinates of the object through the smallest rectangle in which the object is located.
[0128] Finally, based on the center coordinates, rotation angle, and preset patch information, the coordinate information of the single patch contained in the single image is calculated.
[0129] Among them, the edge tracking algorithm can extract the enclosing relationship of connected regions in a binary image and obtain the topological structure of the image edge. Compared with general image processing methods, it can eliminate connected regions or holes in the image based on geometric or topological characteristics, reduce background interference, and improve the accuracy of patch position detection.
[0130] Please see Figure 3 A method for detecting multiple surface mount components, comprising: S101, automatically acquiring original images of multiple surface mount components;
[0131] S102. Segment the original image to obtain several single-patch images containing only single patches;
[0132] S103. Calculate the coordinate information and rotation angle of the single patch contained in the single image.
[0133] The working principle and beneficial effects of this multi-surface component testing method can be found in the sections on the working principle and beneficial effects of each functional module of the multi-surface component testing system mentioned above, and will not be repeated here.
[0134] Obviously, those skilled in the art can make various modifications and variations to this invention without departing from its spirit and scope. Therefore, if these modifications and variations fall within the scope of the claims of this invention and their equivalents, this invention also intends to include these modifications and variations.
Claims
1. A multi-surface component testing system, characterized in that, include: An image acquisition module, used to automatically acquire raw images of multiple surface-mount components, includes: a placement unit for placing and fixing the multiple surface-mount components and emitting a first signal; a light source setting unit for setting corresponding light sources according to the category and orientation of the multiple surface-mount components after receiving the first signal and emitting a second signal; and a camera unit for acquiring raw images of the multiple surface-mount components after receiving the second signal. The light source setting unit performs the following operations: classifying each surface-mount component according to feature information to obtain multiple category information; acquiring the orientation information of each surface-mount component on the placement unit to obtain multiple orientation information; performing correlation judgment based on the multiple category information and multiple orientation information to obtain the correlation degree; wherein the correlation degree represents the degree of influence of the light source on different categories of information at different orientations; determining the supplementary lighting state of each surface-mount component based on the correlation degree; matching the category information, orientation information, and supplementary lighting state of each surface-mount component one-to-one to form a supplementary lighting demand command; and completing the light source setting according to the supplementary lighting demand command. The image segmentation module is used to segment the original image to obtain several single-piece images containing only single patches. It includes: an original image preprocessing unit, used to perform image preprocessing operations on the original image to obtain a first image; and an image segmentation unit, used to process the first image based on an improved polygon approximation method, calculate the contour distance centroid of the processed first image, and segment the first image based on the contour distance centroid to obtain several single-piece images containing only single patches. The image detection module is used to calculate the coordinate information and rotation angle of a single patch contained in a single image.
2. The multi-surface component testing system according to claim 1, characterized in that, Complete the light source setup according to the supplementary lighting requirements, including: The expected satisfaction of supplementary lighting for each patch component is generated based on each supplementary lighting demand command. Under the initial conditions, the expected satisfaction of supplementary lighting for each patch component is empty. When the supplementary lighting demand command of any patch component is perfectly executed, its corresponding expected satisfaction of supplementary lighting is full. Based on the total amount of light source scheduling and all supplementary lighting requirements from the light source setting unit, an initial light source setting scheme is adaptively generated. Under the initial light source setting scheme, obtain the expected satisfaction of supplemental lighting for each patch component; Based on the preset minimum expected satisfaction threshold for supplementary lighting, the initial light source setting scheme is adjusted until the expected satisfaction of supplementary lighting for each patch component is not lower than the minimum expected satisfaction threshold for supplementary lighting, and the adjustment ends to obtain the target light source setting scheme. Complete the light source setup according to the target light source setup plan.
3. The multi-surface component testing system according to claim 2, characterized in that, Also includes: If a target light source setup solution cannot be obtained within the preset time, a warning message will be issued. Simultaneously, based on the preset minimum supplementary lighting expectation satisfaction threshold and the supplementary lighting maximum rectangle strategy, the initial light source setting scheme is adjusted until the maximum rectangle composed of patch components that can satisfy the supplementary lighting expectation satisfaction of each patch component is not lower than the minimum supplementary lighting expectation satisfaction threshold is obtained, and the second light source setting scheme is generated. Complete the light source setup according to the second light source setup scheme; The supplementary lighting requirement instruction ignored in the second light source setting scheme is obtained as an ignore instruction and sent to the image segmentation module.
4. The multi-surface component testing system according to claim 1, characterized in that, The image detection module includes: The patch angle detection unit is used to determine the rotation angle of a single patch contained in a single image; The patch position information detection unit is used to determine the coordinate information of a single patch contained in a single image.
5. The multi-surface component testing system according to claim 4, characterized in that, The patch angle detection unit includes: The image processing subunit is used to perform grayscale processing, filtering processing, binarization processing, Harris corner detection processing, morphological pin removal processing and contour extraction processing on a single image to obtain the main contour of the single patch. The line extraction sub-unit is used to perform a progressive line Hough transform on the main contour to obtain the rotation angle of the single patch contained in the single image.
6. The multi-surface component testing system according to claim 4, characterized in that, The patch position information detection unit performs the following operations: Based on the edge tracking algorithm, the minimum bounding rectangle of a single image is extracted; By positioning any corner point as the origin of the coordinate system, the center coordinates of the smallest bounding rectangle can be calculated. Based on the center coordinates, rotation angle, and preset patch information, the coordinate information of a single patch contained in a single image is calculated.
7. A method for testing multi-surface-mount components, characterized in that, include: Automatically acquire original images of multi-surface-mount components; The original image is segmented to obtain several single-patch images containing only single patches; The coordinate information and rotation angle of each patch contained in a single image are calculated. The process involves automatically acquiring raw images of multiple surface-mount components (SMDs), classifying each SMD component based on its feature information to obtain multiple category information; acquiring the orientation information of each SMD component on the placement unit to obtain multiple orientation information; performing correlation judgment based on the multiple category information and multiple orientation information to obtain the correlation degree; where the correlation degree represents the degree of influence of the light source on different categories of information at different orientations; determining the supplementary lighting state for each SMD component based on the correlation degree; matching the category information, orientation information, and supplementary lighting state of each SMD component one-to-one to form a supplementary lighting demand command; and completing the light source setting according to the supplementary lighting demand command. When segmenting the original image, image preprocessing is performed on the original image to obtain the first image; the first image is processed based on the improved polygon approximation method, and the contour distance centroid of the processed first image is calculated. The first image is then segmented based on the contour distance centroid to obtain several single-piece images containing only single patches.
Citation Information
Patent Citations
Method and a device for correcting position of patch component
CN111369505A
Apparatus and method of processing super-resolutionenhancement
KR1020070016909A