Three-dimensional imaging device and method
By using a synchronously triggered camera and light source components in a three-dimensional imaging device, combined with a grating scale and a high-precision telecentric lens, the problem of depth of field limitation during imaging of small products is solved, and high-precision 3D image acquisition and recovery is achieved.
Patent Information
- Application Number
- CN202411037815.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-31
- Publication Date
- 2025-02-28
- Estimated Expiration
- 2044-07-31
AI Technical Summary
When imaging products with smaller sizes, they are limited by conditions such as optical properties. Only the parts within the depth of field are clearly visible, while the rest are relatively blurred, affecting the subsequent image processing and visual detection application.
A three-dimensional imaging device is adopted, including an industrial control machine, control component, motion component, light source component and camera component. The synchronous triggering of the camera and light source is achieved through a grating scale and a high-precision telecentric lens, and sequence images at different positions are collected, and a two-dimensional height map and a panoramic depth color map are generated by calculating the clarity and imaging distance.
It realizes panoramic depth image acquisition for small products, ensures the accuracy of the acquisition position of the camera component, improves the 3D recovery accuracy, and solves the problem that the product cannot be fully focused in one image.
Smart Images

Figure HDA0004971575530000011 
Figure HDA0004971575530000012 
Figure HDA0004971575530000021
Abstract
Description
Technical Field
[0001] The present invention relates to the field of image acquisition technology, and in particular to a three-dimensional imaging device and method. Background Art
[0002] Visual inspection refers to converting the captured target into an image signal through machine vision, transmitting it to a dedicated image processing system to extract the target features, and then controlling the operation of the equipment based on the judgment results. It is widely used in product defect detection.
[0003] However, when imaging smaller products such as chips, due to limitations such as optical properties, only the portion within the depth of field is clearly visible, while the rest is blurry, making it impossible to fully focus on the product in one image, which in turn affects subsequent image processing and restricts the application of visual inspection.
[0004] Based on the above technical problems, the present application proposes a three-dimensional imaging device and method. Summary of the invention
[0005] The purpose of the present invention is to provide a three-dimensional imaging device and method to solve the technical problems mentioned in the background technology. The purpose of the present invention is achieved through the following technical solutions:
[0006] A three-dimensional imaging device includes an industrial computer, a control component, a motion component, a light source component and a camera component. The motion component is electrically connected to the industrial computer, and a grating ruler is installed on the motion component; the control component includes a power supply module, a control module, a grating ruler IO module and a communication module. The power supply module is electrically connected to the control module, the grating ruler IO module and the communication module respectively, the grating ruler is electrically connected to the control module through the grating ruler IO module, and the control module is electrically connected to the communication module, the camera component and the light source component respectively.
[0007] Furthermore, the control module includes a control unit, a storage unit, a camera driving unit and a light source driving unit. The storage unit, the camera driving unit and the light source driving unit are all electrically connected to the control unit, the communication module is electrically connected to the storage unit, the grating scale IO module is electrically connected to the control unit, the camera assembly is electrically connected to the camera driving unit, and the light source assembly is electrically connected to the light source driving unit.
[0008] Furthermore, the motion component includes a Z-axis linear module, and the camera component is vertically mounted on the slide of the Z-axis linear module; the grating ruler includes a ruler and a reading head slidably mounted on the ruler, the ruler is vertically mounted on one side of the Z-axis linear module, and the reading head is fixed on the slide.
[0009] Furthermore, the camera assembly includes a high-speed area array camera and a high-precision telecentric lens. The high-precision telecentric lens is installed at the lens of the high-speed area array camera. The high-precision telecentric lens has its own light source, and the light source is a coaxial light source.
[0010] Furthermore, the light source assembly is installed above the product to be inspected, and the light source assembly includes a low-angle light source, a medium-angle light source and a high-angle light source. The low-angle light source, the medium-angle light source and the high-angle light source are stacked in a pyramid shape from top to bottom, and the low-angle light source, the medium-angle light source and the high-angle light source all include an R light source, a G light source and a B light source.
[0011] Furthermore, the light source driving unit is provided with a plurality of output channels, which are respectively electrically connected to the light source, the low-angle light source, the medium-angle light source, and the high-angle light source, and the R light source, the G light source, and the B light source are respectively connected to independent output channels.
[0012] Furthermore, the low-angle light source is 30°, the medium-angle light source is 45°, and the high-angle light source is 60°.
[0013] Furthermore, the communication module is a serial port communication module.
[0014] A three-dimensional imaging method, using any of the above three-dimensional imaging devices, comprises the following steps:
[0015] Step S1, setting the camera trigger position: determining the starting height and the ending height of the camera assembly according to the height difference of the measured product, and writing the camera trigger position to the control module through the communication module by the industrial computer according to the measurement accuracy;
[0016] Step S2, setting the light source combination: according to the trigger position obtained in step S1, the industrial computer writes the light source trigger output channel to the control module through the communication module to evenly illuminate the product under test;
[0017] Step S3, obtaining sequence images: the industrial computer controls the movement of the motion component, the grating ruler feeds back the position signal to the control module through the grating ruler IO module, the control module triggers the camera component according to the position signal, and synchronously triggers the light source combination set in step S2 to obtain sequence images at different positions;
[0018] Step S4, obtaining a two-dimensional height map: calculating the clarity of images at different positions, obtaining the true height of the object being measured, and combining the position information of the sequence images to obtain a two-dimensional height map of the product being measured;
[0019] Step S5, acquiring RGB sequence images: the industrial computer drives the motion component to move in the opposite direction, and acquires RGB sequence images at different positions according to the camera trigger position set in step S1 and the light source combination set in step S2, wherein the light source combination at each position only lights up the R light source, the G light source or the B light source at one time;
[0020] Step S6, obtaining a full-view depth color map: Based on the two-dimensional height map obtained in step S4, the clear positions in the RGB sequence image are integrated into a color image to obtain a full-view depth color map.
[0021] Furthermore, step S4 specifically includes:
[0022] Step S41, calculating the clarity of the pixel points by using the Laplace energy and function, and finding the position with the highest clarity in the image;
[0023] Step S42, subtract the imaging distance of the high-precision telecentric lens from the clearest position to obtain the true height of the object being measured;
[0024] Step S43: combining the position information of the sequence images to obtain a two-dimensional height map of the product under test.
[0025] The technical solution provided in the embodiments of the present application has at least the following technical effects or advantages:
[0026] By controlling the components to achieve synchronous triggering of the camera component and the light source component, any light source combination and any distance combination can be set to acquire images of equal and unequal distances, ensure the accuracy of the camera component acquisition position, and improve the 3D restoration accuracy. BRIEF DESCRIPTION OF THE DRAWINGS
[0027] The drawings in the specification, which constitute a part of this application, are used to provide a further understanding of the present invention. The illustrative embodiments of the present invention and their descriptions are used to explain the present invention and do not constitute improper limitations on the present invention.
[0028] Figure 1 This is a schematic diagram of the structure of a three-dimensional imaging device according to an embodiment of the present application;
[0029] Figure 2 This is a schematic diagram of the structure of a light source assembly according to an embodiment of the present application;
[0030] Figure 3 This is a flowchart of the embodiment of the present application;
[0031] Figure 4 Pictures of different measurement heights collected for the embodiments of the present application;
[0032] Figure 5 Reconstructing a two-dimensional height map of the output material for the embodiment of the present application;
[0033] Figure 6 This is a panoramic depth map reconstructed by an embodiment of the present application.
[0034] Markings in the attached figure: 1. Industrial computer; 2. Control component; 21. Power supply module; 22. Control module; 221. Control unit; 222. Storage unit; 223. Camera drive unit; 224. Light source drive unit; 23. Communication module; 24. Grating ruler IO module; 3. Motion component; 4. Camera component; 5. Light source component; 51. Low-angle light source; 52. Medium-angle light source; 53. High-angle light source; 6. Grating ruler. DETAILED DESCRIPTION
[0035] In order to better understand the above technical solution, the above technical solution will be described in detail below in conjunction with the drawings and specific implementation methods of the specification. Obviously, the described embodiments are only part of the embodiments of the present invention, rather than all the embodiments. The following description of at least one exemplary embodiment is actually only illustrative and is by no means intended to limit the present invention and its application or use. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0036] like Figure 1 A three-dimensional imaging device is shown, comprising an industrial computer 1, a control component 2, a motion component 3, a camera component 4 and a light source component 5. The motion component 3 comprises a Z-axis linear module, which is electrically connected to the industrial computer 1. The camera component 4 is mounted on the slide of the Z-axis linear module. The industrial computer 1 sends a control instruction to the Z-axis linear module, thereby driving the camera component 4 to move back and forth up and down. A grating ruler 6 is installed on one side of the Z-axis linear module. The grating ruler 6 comprises a ruler and a reading head, and the reading head can slide back and forth along the ruler. The ruler is vertically mounted on one side of the Z-axis linear module, and the reading head is fixed on the slide of the Z-axis linear module to realize real-time feedback on the position of the camera component 4. The motion component 3 also comprises an X-axis linear module and a Y-axis linear module, and large-format image acquisition of the measured product is realized by controlling the movement of the camera component 4 forward, backward, left and right.
[0037] like Figure 1 As shown, the control assembly 2 includes a power supply module 21, a control module 22, a communication module 23 and a grating ruler IO module 24. The power supply module 21 is electrically connected to the control module 22, the communication module 23 and the grating ruler IO module 24. The power supply module 21 receives the 24V DC power provided by the electromechanical control part, eliminates the high-frequency noise and interference in the input voltage, and provides a stable voltage to the power module.
[0038] Among them, the control module 22 includes a control unit 221, a storage unit 222, a camera driving unit 223 and a light source driving unit 224, the storage unit 222, the camera driving unit 223 and the light source driving unit 224 are electrically connected to the control unit 221 respectively, the camera assembly 4 is electrically connected to the camera driving unit 223, and the light source assembly 5 is electrically connected to the light source driving unit 224. The industrial computer 1 is electrically connected to the storage unit 222 through the communication module 23, and is used to write the camera trigger position information and the light source combination information of the corresponding position into the control module 22. The grating ruler 6 is electrically connected to the control unit 221 through the grating ruler IO module, and is used to feed back the position information to the control unit 221. The control unit 221 synchronously triggers the camera assembly 4 and the light source assembly 5 through the camera driving unit 223 and the light source driving unit 224 according to the camera trigger position information, the light source combination information and the position information fed back by the grating ruler 6 in the storage unit, so as to collect pictures with stable brightness and color. The communication module 23 is a serial communication module, which receives data from the industrial computer 1 to set various parameters of the camera driving unit 223 and the light source driving unit 224 .
[0039] like Figure 2 As shown, the light source assembly 5 is installed above the product to be inspected, and the light source assembly 5 includes a low-angle light source 51 of 30°, a medium-angle light source 52 of 45° and a high-angle light source 53 of 60°. The low-angle light source 51, the medium-angle light source 52 and the high-angle light source 53 are all annular coaxial light sources. The low-angle light source 51, the medium-angle light source 52 and the high-angle light source 53 are stacked in sequence from top to bottom, and the diameters of the low-angle light source 51, the medium-angle light source 52 and the high-angle light source 53 increase gradually, so that the light source assembly 5 is pyramid-shaped.
[0040] The low-angle light source 51, the medium-angle light source 52 and the high-angle light source 53 all include an R light source, a G light source and a B light source. The light source driving unit 224 is designed with multiple output channels. The R light source, the G light source and the B light source of the low-angle light source 51, the medium-angle light source 52 and the high-angle light source 53 are respectively connected to independent output channels. The industrial computer 1 writes the light source combination information of different trigger positions into the control module 22 through the communication module 23, thereby triggering different light source combinations at different trigger positions to achieve uniform lighting of the product under test.
[0041] The camera assembly 4 includes a high-speed array camera and a high-precision telecentric lens. The high-precision telecentric lens is installed at the lens of the high-speed array camera. The high-precision telecentric lens has an RGB coaxial light source, which is connected to different output channels of the light source driving unit 224. The high-speed array camera uses a black and white camera to improve the signal-to-noise ratio of the acquisition.
[0042] Example 2
[0043] A method for implementing three-dimensional imaging using the above three-dimensional imaging device comprises the following steps:
[0044] Step S1, setting the camera trigger position: determine the starting height and ending height of the camera assembly according to the height difference of the product being measured, determine the trigger spacing of the camera assembly according to the measurement accuracy required by the customer, and write the camera trigger position to the control module through the communication module by the industrial computer. The higher the measurement accuracy, the smaller the trigger spacing, and the more camera trigger positions.
[0045] Step S2, setting the light source combination: according to the trigger position determined in step S1, the industrial computer writes the light source trigger output channel to the control module through the communication module, and the product under test is evenly illuminated by the combination of different light sources.
[0046] Step S3, obtaining sequence images: the motion component is controlled by the industrial computer, and the grating ruler feeds back the position signal to the control component through the grating ruler IO module. The control component triggers the camera component according to the position signal, and synchronously triggers the light source combination set in step S2 to obtain sequence images at different positions; due to the small depth of field of the high-precision telecentric lens, only the product under test within the depth of field can be clearly imaged, such as Figure 4 As shown, by photographing the tested product at different heights, a sequence of images with different clarity levels can be obtained and saved in the industrial computer.
[0047] Step S4, obtaining a two-dimensional height map: the clearer the image, the richer the detail information, which is manifested as a large grayscale gradient in the airspace and as more Gaussian components in the frequency domain.
[0048] Step S4 specifically includes:
[0049] Step S41, calculating the clarity of the pixel points by using the Laplace energy and function, and finding the position with the highest clarity in the image;
[0050] Step S42, subtracting the imaging distance of the high-precision telecentric lens from the position information of the corresponding image to obtain the true height of the measured object at the position with the highest clarity in the image;
[0051] Step S43: Figure 5 As shown, the two-dimensional height map of the tested product is obtained by combining the position information of the sequence images.
[0052] Step S5, obtaining RGB sequence images: the industrial computer drives the motion component to move in the opposite direction, and collects RGB sequence images at different positions according to the camera trigger position set in step S1 and the light source combination set in step S2, and saves them in the industrial computer. Among them, the light source combination at each position only lights up the R light source, the G light source or the B light source at a time.
[0053] Step S6, obtaining a full-view depth color image: Based on the two-dimensional height image obtained in step S4, the clear positions in the RGB sequence image are integrated into a color image to obtain a full-view depth color image, providing color image data for subsequent defect detection.
[0054] The technical solution provided in the embodiments of the present application has at least the following technical effects or advantages:
[0055] By controlling the components to achieve synchronous triggering of the camera component and the light source component, any light source combination and any distance combination can be set to acquire images of equal and unequal distances, ensure the accuracy of the camera component acquisition position, and improve the 3D restoration accuracy.
[0056] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. For those skilled in the art, the present invention may have various modifications and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present invention shall be included in the protection scope of the present invention.
Claims
1. A three-dimensional imaging method, characterized in that: The following steps are involved: Step S1, setting the camera trigger position: determining the starting height and ending height of the camera assembly according to the height difference of the product to be measured, and writing the camera trigger position to the control module through the communication module by the industrial computer according to the measurement accuracy; Step S2, setting the light source combination: according to the trigger position obtained in step S1, the industrial computer writes the light source trigger output channel to the control module through the communication module to evenly illuminate the product under test; Step S3, obtaining sequence images: the industrial computer controls the movement of the motion component, the grating ruler feeds back the position signal to the control module through the grating ruler IO module, the control module triggers the camera component according to the position signal, and synchronously triggers the light source combination set in step S2 to obtain sequence images at different positions; Step S4, obtaining a two-dimensional height map: calculating the clarity of images at different positions, obtaining the true height of the object being measured, and combining the position information of the sequence images to obtain a two-dimensional height map of the product being measured; Step S4 specifically includes: Step S41, calculating the clarity of the pixel points by using the Laplace energy and function, and finding the position with the highest clarity in the image; Step S42, subtract the imaging distance of the high-precision telecentric lens from the clearest position to obtain the true height of the object being measured; Step S43, combining the position information of the sequence images to obtain a two-dimensional height map of the product under test; Step S5, obtaining RGB sequence images: the industrial computer drives the motion component to move in the opposite direction, and collects RGB sequence images at different positions according to the camera trigger position set in step S1 and the light source combination set in step S2, wherein the light source combination at each position only lights up the R light source, the G light source or the B light source at one time; Step S6, obtaining a full-view depth color map: Based on the two-dimensional height map obtained in step S4, the clear positions in the RGB sequence image are integrated into a color image to obtain a full-view depth color map.
2. A three-dimensional imaging device for implementing the three-dimensional imaging method according to claim 1, characterized in that: It includes an industrial computer, a control component, a motion component, a light source component and a camera component. The motion component is electrically connected to the industrial computer, and a grating ruler is installed on the motion component; the control component includes a power supply module, a control module, a grating ruler IO module and a communication module. The power supply module is electrically connected to the control module, the grating ruler IO module and the communication module respectively, the grating ruler is electrically connected to the control module through the grating ruler IO module, and the control module is electrically connected to the communication module, the camera component and the light source component respectively.
3. A three-dimensional imaging device according to claim 2, characterized in that: The control module includes a control unit, a storage unit, a camera driving unit and a light source driving unit. The storage unit, the camera driving unit and the light source driving unit are all electrically connected to the control unit, the communication module is electrically connected to the storage unit, the grating scale IO module is electrically connected to the control unit, the camera assembly is electrically connected to the camera driving unit, and the light source assembly is electrically connected to the light source driving unit.
4. A three-dimensional imaging device according to claim 2, characterized in that: The motion assembly includes a Z-axis linear module, and the camera assembly is vertically mounted on a slide of the Z-axis linear module; the grating ruler includes a ruler and a reading head slidably mounted on the ruler, the ruler is vertically mounted on one side of the Z-axis linear module, and the reading head is fixed on the slide.
5. A three-dimensional imaging device according to claim 3, characterized in that: The camera assembly includes a high-speed area array camera and a high-precision telecentric lens. The high-precision telecentric lens is installed at the lens of the high-speed area array camera. The high-precision telecentric lens has its own light source, and the light source is a coaxial light source.
6. A three-dimensional imaging device according to claim 5, characterized in that: The light source assembly is installed above the product to be inspected, and the light source assembly includes a low-angle light source, a medium-angle light source and a high-angle light source. The low-angle light source, the medium-angle light source and the high-angle light source are stacked in a pyramid shape from top to bottom, and the low-angle light source, the medium-angle light source and the high-angle light source all include an R light source, a G light source and a B light source.
7. A three-dimensional imaging device according to claim 6, characterized in that: The light source driving unit is provided with a plurality of output channels, and the plurality of output channels are electrically connected to the light source, the low-angle light source, the medium-angle light source, and the high-angle light source, respectively, and the R light source, the G light source, and the B light source are respectively connected to independent output channels.
8. A three-dimensional imaging device according to claim 6, characterized in that: The low-angle light source is 30°, the medium-angle light source is 45°, and the high-angle light source is 60°.
9. A three-dimensional imaging device according to claim 2, characterized in that: The communication module is a serial communication module.
Citation Information
Patent Citations
Machine vision system for arc-shaped surface appearance detection and detection method
CN109682826A
Optical detection device and method thereof
CN110609039A