Chip three-dimensional imaging method and device based on monocular vision
Through monocular vision technology, SFM and MVS algorithms are used to generate a three-dimensional dense point cloud of the chip, which solves the problem of difficulty in detecting three-dimensional feature defects of the chip with existing technology, and achieves low-cost, high-precision three-dimensional imaging of the chip.
Patent Information
- Application Number
- CN202410476169.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-04-19
- Publication Date
- 2024-09-10
AI Technical Summary
Existing chip surface defect detection methods are mainly based on two-dimensional images, and it is difficult to detect three-dimensional characteristic defects of the chip, such as the curvature problem of the metal bonding wire of the LED chip, and the accuracy and resolution of the three-dimensional sensor are high and expensive.
The three-dimensional chip imaging method based on monocular vision is used to obtain the chip image sequence for image preprocessing. The SFM algorithm is used to achieve sparse reconstruction and the MVS algorithm is used to achieve dense reconstruction. The three-dimensional dense point cloud of the chip is generated to complete the three-dimensional chip imaging.
It achieves low-cost acquisition of three-dimensional data of the chip, improves detection speed and accuracy, reduces equipment costs, and meets the needs for high-precision three-dimensional feature detection.
Smart Images

Figure CN118628644A
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of three-dimensional imaging, and in particular to a chip three-dimensional imaging method and device based on monocular vision. Background Art
[0002] The production quality of chips determines whether various smart devices can operate normally. The chip production process is complex, and chip defect detection is an indispensable link. At present, in the field of chip surface defect detection, detection methods can be roughly divided into two categories: surface defect detection methods based on traditional image processing and surface defect detection methods based on deep learning.
[0003] Most of the existing chip surface defect detection methods are based on two-dimensional images. Two-dimensional image acquisition is low-cost, but two-dimensional images lack the size and shape information that is easily obtained in three-dimensional data, making it difficult to detect defects in the three-dimensional features of the chip, such as defect detection of metal bonding wires of LED chips: bonding wire curvature is too high, bonding wire curvature is too low, bonding wire depression, etc. Three-dimensional imaging of the chip is the key to three-dimensional defect detection, and the LED chip structure size is very small, with a bonding wire diameter of about 0.02mm. Therefore, the accuracy and resolution of the three-dimensional sensor required to collect the chip are too high and expensive. Summary of the invention
[0004] The purpose of the present invention is to solve at least one of the deficiencies of the prior art and to provide a chip three-dimensional imaging method and device based on monocular vision.
[0005] In order to achieve the above object, the present invention adopts the following technical solutions:
[0006] Specifically, a chip three-dimensional imaging method based on monocular vision is proposed, including the following:
[0007] Acquire a chip image sequence, wherein the chip image sequence is a plurality of frames of images arranged in a moving order when the chip moves along a preset direction with a preset step length;
[0008] Performing image preprocessing on each frame of the chip image sequence to obtain each frame of the chip image arranged in the acquisition order under mask constraints, that is, the preprocessed chip image sequence;
[0009] Based on the SFM algorithm, the pre-processed chip image sequence is processed in sequence to achieve chip sparse reconstruction to obtain the camera pose and sparse point cloud;
[0010] Taking the preprocessed chip image sequence, the camera pose and the sparse point cloud as input, the MVS algorithm is used to process the chip dense reconstruction to obtain the depth of the pixel points of each frame of the chip image in the preprocessed chip image sequence, that is, the depth map;
[0011] The depth map corresponding to each frame of the chip image in the preprocessed chip image sequence is fused to generate a three-dimensional dense point cloud of the chip to complete the three-dimensional imaging of the chip.
[0012] Further, specifically, the chip image sequence is obtained by the following method:
[0013] The image acquisition module is controlled to drive the chip to move along a preset direction according to a preset step length. An image is acquired every time a step length is moved to obtain a frame of chip image. The multiple frames of images arranged in chronological order of acquisition time are the chip image sequence.
[0014] Further, specifically, the image preprocessing operation includes the following:
[0015] Performing global threshold segmentation on each frame of the chip image sequence, filtering the image area below a first threshold, and outputting a binary image;
[0016] Performing contour detection on the binary image to extract contours in the binary image;
[0017] The contours are screened by an area threshold to remove contours below the area threshold to obtain the remaining contours, i.e., the chip contours;
[0018] The pixel points in the chip contour area are subjected to mask operation to obtain each frame of chip image arranged in the acquisition order under the mask constraint, that is, the preprocessed chip image sequence.
[0019] Further, specifically, the process of sequentially processing the pre-processed chip image sequence based on the SFM algorithm includes the following:
[0020] Extract feature points from the preprocessed chip image sequence in sequence;
[0021] Solve the basic matrix based on the relationship between the feature points matched between adjacent images in the preprocessed chip image sequence;
[0022] Estimate the camera pose according to the basic matrix, wherein the camera pose includes the rotation and translation relationship of the camera;
[0023] The correctly matched feature points between the images are restored into three-dimensional points in space through triangulation method;
[0024] The three-dimensional points in space and the estimated camera pose are optimized by using a bundle adjustment method, and after optimization, the camera pose and sparse point cloud after sparse reconstruction of the chip are obtained.
[0025] The present invention also proposes a chip three-dimensional imaging device based on monocular vision, comprising:
[0026] An image acquisition module, used to acquire a chip image sequence, wherein the chip image sequence is a plurality of frames of images arranged in a moving order when the chip moves along a preset direction with a preset step length;
[0027] Image processing module for,
[0028] Performing image preprocessing on each frame of the chip image sequence to obtain each frame of the chip image arranged in the acquisition order under mask constraints, that is, the preprocessed chip image sequence;
[0029] Based on the SFM algorithm, the pre-processed chip image sequence is processed in sequence to achieve chip sparse reconstruction to obtain the camera pose and sparse point cloud;
[0030] Taking the preprocessed chip image sequence, the camera pose and the sparse point cloud as input, the MVS algorithm is used to process the chip dense reconstruction to obtain the depth of the pixel points of each frame of the chip image in the preprocessed chip image sequence, that is, the depth map;
[0031] The depth map corresponding to each frame of the chip image in the preprocessed chip image sequence is fused to generate a three-dimensional dense point cloud of the chip to complete the three-dimensional imaging of the chip.
[0032] Further, specifically, the image acquisition module includes:
[0033] The workbench has two degrees of freedom and is used to carry the chip and move the chip in a horizontal plane;
[0034] The camera module includes an industrial camera and a microscope lens, which collect chip images through the cooperation of the industrial camera and the microscope lens;
[0035] The camera moving module is used to adjust the position of the camera module.
[0036] The present invention also proposes a computer-readable storage medium, which stores a computer program. When the computer program is executed by a processor, the steps of a chip three-dimensional imaging method based on monocular vision as described in any one of the above items are implemented.
[0037] The beneficial effects of the present invention are:
[0038] The present invention proposes a chip three-dimensional imaging method based on monocular vision, which obtains a chip two-dimensional image by means of monocular vision, and processes the chip two-dimensional image based on the SFM algorithm and the MVS algorithm to obtain the chip three-dimensional data, and through the image preprocessing operation, feature extraction and matching can be constrained to be performed only in the target area of the chip, which greatly speeds up the reconstruction speed; the chip image input to the image processing module of the present invention is an ordered input, which can reduce the calculation amount of feature matching and improve the matching accuracy. BRIEF DESCRIPTION OF THE DRAWINGS
[0039] The above and other features of the present disclosure will become more apparent by describing in detail the embodiments shown in the accompanying drawings. The same reference numerals in the accompanying drawings of the present disclosure represent the same or similar elements. Obviously, the accompanying drawings described below are only some embodiments of the present disclosure. For those skilled in the art, other accompanying drawings can be obtained based on these accompanying drawings without creative work. In the accompanying drawings:
[0040] Figure 1 Shown is a flow chart of a chip three-dimensional imaging method based on monocular vision of the present invention;
[0041] Figure 2 Shown is a structural schematic diagram of an image acquisition module of a chip three-dimensional imaging device based on monocular vision according to the present invention. DETAILED DESCRIPTION
[0042] The following will be combined with the embodiments and drawings to clearly and completely describe the concept, specific structure and technical effects of the present invention, so as to fully understand the purpose, scheme and effect of the present invention. It should be noted that the embodiments in this application and the features in the embodiments can be combined with each other without conflict. The same reference numerals used throughout the drawings indicate the same or similar parts.
[0043] Reference Figure 1 , Embodiment 1, the present invention proposes a chip three-dimensional imaging method based on monocular vision, comprising the following:
[0044] Acquire a chip image sequence, wherein the chip image sequence is a plurality of frames of images arranged in a moving order when the chip moves along a preset direction with a preset step length;
[0045] Performing image preprocessing on each frame of the chip image sequence to obtain each frame of the chip image arranged in the acquisition order under mask constraints, that is, the preprocessed chip image sequence;
[0046] Based on the SFM algorithm, the pre-processed chip image sequence is processed in sequence to achieve chip sparse reconstruction to obtain the camera pose and sparse point cloud;
[0047] Taking the preprocessed chip image sequence, the camera pose and the sparse point cloud as input, the MVS algorithm is used to process the chip dense reconstruction to obtain the depth of the pixel points of each frame of the chip image in the preprocessed chip image sequence, that is, the depth map;
[0048] The depth map corresponding to each frame of the chip image in the preprocessed chip image sequence is fused to generate a three-dimensional dense point cloud of the chip to complete the three-dimensional imaging of the chip.
[0049] In this embodiment 1, in view of the problems involved in the background technology, combined with the characteristics of low cost of two-dimensional image acquisition and easy acquisition of chip size and shape information from three-dimensional data, the present invention proposes an image-based chip three-dimensional imaging method. First, the chip sparse point cloud is reconstructed based on the Structure From Motion (SFM) algorithm, and then the chip dense point cloud is reconstructed based on multi-view stereo geometry (Multiple View Stereo, MVS). SFM is an algorithm that estimates the position and posture of the camera and reconstructs the shape of the three-dimensional object by extracting and matching feature points in multiple frames of images. MVS is an algorithm that estimates the depth map of each image based on a series of images with their own calibrated camera parameters, and then reconstructs the dense point cloud of the object. The present invention uses multiple frames of two-dimensional images to reconstruct the three-dimensional point cloud data of the chip, which is lower in cost than using a three-dimensional sensor to obtain three-dimensional data of the chip.
[0050] As a preferred embodiment of the present invention, specifically, the chip image sequence is obtained by the following method:
[0051] The image acquisition module is controlled to drive the chip to move along a preset direction according to a preset step length. An image is acquired every time a step length is moved to obtain a frame of chip image. The multiple frames of images arranged in chronological order of acquisition time are the chip image sequence.
[0052] As a preferred embodiment of the present invention, specifically, the image preprocessing operation includes the following:
[0053] Performing global threshold segmentation on each frame of the chip image sequence, filtering the image area below a first threshold, and outputting a binary image;
[0054] Performing contour detection on the binary image to extract contours in the binary image;
[0055] The contours are screened by an area threshold to remove contours below the area threshold to obtain the remaining contours, i.e., the chip contours;
[0056] The pixel points in the chip contour area are subjected to mask operation to obtain each frame of chip image arranged in the acquisition order under the mask constraint, that is, the preprocessed chip image sequence.
[0057] As a preferred embodiment of the present invention, specifically, the process of sequentially processing the pre-processed chip image sequence based on the SFM algorithm includes the following:
[0058] Extract feature points from the preprocessed chip image sequence in sequence;
[0059] Solve the basic matrix based on the relationship between the feature points matched between adjacent images in the preprocessed chip image sequence;
[0060] Estimate the camera pose according to the basic matrix, wherein the camera pose includes the rotation and translation relationship of the camera;
[0061] The correctly matched feature points between the images are restored into three-dimensional points in space through triangulation method;
[0062] The three-dimensional points in space and the estimated camera pose are optimized by using a bundle adjustment method, and after optimization, the camera pose and sparse point cloud after sparse reconstruction of the chip are obtained.
[0063] Combination Figure 1 In the actual application process of the present invention, the main implementation process includes:
[0064] (i) The chip sample is placed on the movable workbench of the image acquisition module, and the workbench is controlled to move in one direction. Each time the workbench moves slightly, the camera captures a frame of the chip image, and finally an ordered image of the chip is acquired.
[0065] The chip image sequence is collected using the image acquisition module. The chip sample is placed in Figure 2 The camera collects one frame of chip image when the workbench moves slightly in a fixed direction once, and finally collects multi-view ordered images of the chip. This image sequence is used as the input of the image processing module.
[0066] (ii) Due to the microscope lens used in the present invention, the image taken will be affected by the background texture and reflection of the workbench, and the chip image needs to be preprocessed. The preprocessing operation extracts the target area where the chip is located.
[0067] Image preprocessing. Due to the influence of the background texture and reflection of the movable workbench, (i) the collected image contains many noise points, so the image needs to be filtered and processed:
[0068] 1. Global threshold segmentation: Perform global threshold segmentation on the chip image and output a binary image. The output image filters the background area with a lower threshold.
[0069] 2. Contour detection: Perform contour detection on the binary image obtained in step 1 to obtain the contour boundaries of multiple connected areas.
[0070] 3. Filter the contour based on the maximum contour area: Affected by the reflection of the workbench, the extracted contour includes the contour of the reflective area and the contour of the chip target area. Since the contour area of the reflective area is much smaller than the contour area of the target area, the contour extracted in step 2 is filtered according to the contour area to obtain the contour of the chip, and then the pixel points in the chip contour area are masked. Subsequent reconstruction work is performed under the mask constraint.
[0071] (3) The preprocessed ordered images of the chip are input into the sparse reconstruction system, and feature extraction and matching are performed on all images in turn, the relative position and posture of the camera are estimated, and the correctly matched feature points between the image scenes are restored to three-dimensional points in space through the triangulation method, thereby obtaining the sparse point cloud of the chip.
[0072] SFM-based chip sparse reconstruction:
[0073] 1. Extract and match feature points of chip images under mask constraints.
[0074] 2. Add images according to the order in which they were taken, and solve the basic matrix based on the relationship between the matching feature points between the images.
[0075] 3. Estimate the camera pose based on the basic matrix, including the rotation and translation relationship of the camera.
[0076] 4. Triangulate and calculate the three-dimensional coordinates of the feature points. The correctly matched feature points of the image are restored to three-dimensional points in space through triangulation methods.
[0077] 5. Apply bundle adjustment to optimize the generated 3D points and estimated camera poses.
[0078] 6. Determine whether the image has been added. If not, repeat steps 2-5 above until the image has been added.
[0079] (iv) Input the chip image, the camera pose estimated in step (iii) and the sparse point cloud into the dense reconstruction system, and then fuse the depth map of the image to obtain the dense point cloud of the chip.
[0080] 1. Take the chip image sequence preprocessed in step (ii), the camera pose and sparse point cloud solved in step (iii) as input, and calculate the depth of each chip image pixel according to the camera pose relationship. Since step (ii) performs preprocessing operations, the amount of calculation in this step can be greatly reduced, speeding up the dense reconstruction.
[0081] 2. Based on the calculated depth map, the three-dimensional dense point cloud of the chip is generated by fusion.
[0082] The present invention also proposes a chip three-dimensional imaging device based on monocular vision, comprising:
[0083] An image acquisition module, used to acquire a chip image sequence, wherein the chip image sequence is a plurality of frames of images arranged in a moving order when the chip moves along a preset direction with a preset step length;
[0084] Image processing module for,
[0085] Performing image preprocessing on each frame of the chip image sequence to obtain each frame of the chip image arranged in the acquisition order under mask constraints, that is, the preprocessed chip image sequence;
[0086] Based on the SFM algorithm, the pre-processed chip image sequence is processed in sequence to achieve chip sparse reconstruction to obtain the camera pose and sparse point cloud;
[0087] Taking the preprocessed chip image sequence, the camera pose and the sparse point cloud as input, the MVS algorithm is used to process the chip dense reconstruction to obtain the depth of the pixel points of each frame of the chip image in the preprocessed chip image sequence, that is, the depth map;
[0088] The depth map corresponding to each frame of the chip image in the preprocessed chip image sequence is fused to generate a three-dimensional dense point cloud of the chip to complete the three-dimensional imaging of the chip.
[0089] As a preferred embodiment of the present invention, specifically, the image acquisition module includes:
[0090] The workbench has two degrees of freedom and is used to carry the chip and move the chip in a horizontal plane;
[0091] The camera module includes an industrial camera and a microscope lens, which collect chip images through the cooperation of the industrial camera and the microscope lens;
[0092] The camera moving module is used to adjust the position of the camera module.
[0093] In this preferred embodiment, see Figure 2 , 1 is a high-resolution industrial camera; 2 is a microscope lens; 3 is a movable workbench with two degrees of freedom, on which the chip is placed. By moving the workbench, the orderly image of the chip can be collected; 4 is a camera moving module, by moving the module, the working distance of the camera can be adjusted. The platform has the characteristics of high resolution, high magnification and low cost.
[0094] The present invention also proposes a computer-readable storage medium, which stores a computer program. When the computer program is executed by a processor, the steps of a chip three-dimensional imaging method based on monocular vision as described in any one of the above items are implemented.
[0095] The modules described as separate components may or may not be physically separated, and the components shown as modules may or may not be physical modules, that is, they may be located in one place or distributed on multiple network modules. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution in this embodiment.
[0096] In addition, each functional module in each embodiment of the present invention may be integrated into one processing module, or each module may exist physically separately, or two or more modules may be integrated into one module. The above integrated modules may be implemented in the form of hardware or in the form of software functional modules.
[0097] If the integrated module is implemented in the form of a software function module and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the present invention implements all or part of the processes in the above-mentioned embodiment method, and can also be completed by instructing the relevant hardware through a computer program. The computer program can be stored in a computer-readable storage medium, and the computer program can implement the steps of the above-mentioned various method embodiments when executed by the processor. Among them, the computer program includes computer program code, and the computer program code can be in source code form, object code form, executable file or some intermediate form. The computer-readable medium may include: any entity or system that can carry the computer program code, recording medium, U disk, mobile hard disk, disk, optical disk, computer memory, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), electric carrier signal, telecommunication signal and software distribution medium. It should be noted that the content included in the computer-readable medium can be appropriately increased or decreased according to the requirements of legislation and patent practice in the jurisdiction. For example, in some jurisdictions, according to legislation and patent practice, computer-readable media do not include electric carrier signals and telecommunication signals.
[0098] Although the description of the present invention has been quite detailed and specifically describes several described embodiments, it is not intended to be limited to any of these details or embodiments or any particular embodiment, but should be regarded as providing a broad possible interpretation of these claims in view of the prior art by reference to the appended claims, thereby effectively covering the intended scope of the present invention. In addition, the above description of the present invention is based on the embodiments foreseeable by the inventor, and its purpose is to provide a useful description, and those non-substantial changes to the present invention that have not yet been foreseen may still represent equivalent changes to the present invention.
[0099] The above is only a preferred embodiment of the present invention. The present invention is not limited to the above implementation. As long as the technical effect of the present invention is achieved by the same means, it should belong to the protection scope of the present invention. Within the protection scope of the present invention, its technical scheme and / or implementation method can have various modifications and changes.
Claims
1. A chip three-dimensional imaging method based on monocular vision, characterized in that: Includes the following: Acquire a chip image sequence, wherein the chip image sequence is a plurality of frames of images arranged in a moving order when the chip moves along a preset direction with a preset step length; Performing image preprocessing on each frame of the chip image sequence to obtain each frame of the chip image arranged in the acquisition order under mask constraints, that is, the preprocessed chip image sequence; Based on the SFM algorithm, the pre-processed chip image sequence is processed in sequence to achieve chip sparse reconstruction to obtain the camera pose and sparse point cloud; Taking the preprocessed chip image sequence, the camera pose and the sparse point cloud as input, the MVS algorithm is used to process the chip dense reconstruction to obtain the depth of the pixel points of each frame of the chip image in the preprocessed chip image sequence, that is, the depth map; The depth map corresponding to each frame of the chip image in the preprocessed chip image sequence is fused to generate a three-dimensional dense point cloud of the chip to complete the three-dimensional imaging of the chip.
2. The chip three-dimensional imaging method based on monocular vision according to claim 1, characterized in that: Specifically, the chip image sequence is obtained in the following manner: The image acquisition module is controlled to drive the chip to move along a preset direction according to a preset step length. An image is acquired every time a step length is moved to obtain a frame of chip image. The multiple frames of images arranged in chronological order of acquisition time are the chip image sequence.
3. The chip three-dimensional imaging method based on monocular vision according to claim 1, characterized in that: Specifically, the image preprocessing operation includes the following: Performing global threshold segmentation on each frame of the chip image sequence, filtering the image area below a first threshold, and outputting a binary image; Performing contour detection on the binary image to extract contours in the binary image; The contours are screened by an area threshold to remove contours below the area threshold to obtain the remaining contours, i.e., the chip contours; The pixel points in the chip contour area are subjected to mask operation to obtain each frame of chip image arranged in the acquisition order under the mask constraint, that is, the preprocessed chip image sequence.
4. The chip three-dimensional imaging method based on monocular vision according to claim 1, characterized in that: Specifically, the process of sequentially processing the preprocessed chip image sequence based on the SFM algorithm includes the following: Extract feature points from the preprocessed chip image sequence in sequence; Solve the basic matrix based on the relationship between the feature points matched between adjacent images in the preprocessed chip image sequence; Estimate the camera pose according to the basic matrix, wherein the camera pose includes the rotation and translation relationship of the camera; The correctly matched feature points between the images are restored into three-dimensional points in space through triangulation method; The three-dimensional points in space and the estimated camera pose are optimized by using a bundle adjustment method, and after optimization, the camera pose and sparse point cloud after sparse reconstruction of the chip are obtained.
5. A chip three-dimensional imaging device based on monocular vision, characterized in that: include: An image acquisition module, used to acquire a chip image sequence, wherein the chip image sequence is a plurality of frames of images arranged in a moving order when the chip moves along a preset direction with a preset step length; Image processing module for, Performing image preprocessing on each frame of the chip image sequence to obtain each frame of the chip image arranged in the acquisition order under mask constraints, that is, the preprocessed chip image sequence; Based on the SFM algorithm, the pre-processed chip image sequence is processed in sequence to achieve chip sparse reconstruction to obtain the camera pose and sparse point cloud; Taking the preprocessed chip image sequence, the camera pose and the sparse point cloud as input, the MVS algorithm is used to process the chip dense reconstruction to obtain the depth of the pixel points of each frame of the chip image in the preprocessed chip image sequence, that is, the depth map; The depth map corresponding to each frame of the chip image in the preprocessed chip image sequence is fused to generate a three-dimensional dense point cloud of the chip to complete the three-dimensional imaging of the chip.
6. A chip three-dimensional imaging device based on monocular vision according to claim 5, characterized in that: Specifically, the image acquisition module includes: The workbench has two degrees of freedom and is used to carry the chip and move the chip in a horizontal plane; The camera module includes an industrial camera and a microscope lens, which collect chip images through the cooperation of the industrial camera and the microscope lens; The camera moving module is used to adjust the position of the camera module.
7. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 4 are implemented.
