A three-dimensional measurement method and system based on imaging

By using a combination of spatial light modulation reticle and adjustable light source in industrial measurement, the imaging and focusing process is optimized, the error and complexity problems in traditional measurement methods are solved, and efficient and accurate three-dimensional measurement is achieved, which is suitable for complex environments. and surface.

CN118392037BActive Publication Date: 2024-10-01XIAMEN WEIYA INTELLIGENT TECHNOLOGY CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410843268.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-06-27
Publication Date
2024-10-01
Estimated Expiration
2044-06-27

AI Technical Summary

Technical Problem

Traditional two-dimensional and three-dimensional measurement methods have detection errors and complexity, especially when different detection stations and tools are inconsistent, and structured light sources and motion units lead to measurement dead ends and errors due to the shape of the object to be measured and the influence of the environment.

Method used

A three-dimensional measurement method based on imaging is adopted to optimize the focusing and imaging process through spatial light modulation masks and adjustable light sources. It combines the camera adjustment mechanism and the focus-adjustable lens to achieve image acquisition and optical characteristic calibration, reduce measurement errors and improve accuracy.

Benefits of technology

It significantly improves the measurement accuracy and detection reliability, is suitable for complex environments and surfaces, reduces measurement dead ends and errors, and enhances the stability and accuracy of the system.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118392037B_ABST
    Figure CN118392037B_ABST
Patent Text Reader

Abstract

The present invention discloses a three-dimensional measurement method and system based on imaging, including an image acquisition module composed of a camera adjustment mechanism, a camera unit, a focus adjustable lens and a spatial light modulation mask, an illumination module composed of an adjustable light source and a stage, and a control and data processing system. The method includes: S1 establishing a calibration background; S2 setting a spatial light modulation mask to modulate the image; S3 calibrating image acquisition; S4 modulating optical property calibration to obtain the relationship between the normalized spatial frequency and the normalized optical transfer function OTF corresponding to the calibration image, and obtaining modulated optical property calibration data; S5 camera calibration; S6 collecting and measuring images; S7 determining pixel relationships; S8 distance demodulation analysis; S9 obtaining results: fusing the images where all the optical transfer function data are the largest, so as to obtain a clear picture of the maximum optical transfer function of the object being measured and the coordinates of each measured pixel point, and generating 3D point cloud and fused image information.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of industrial measurement technology, and in particular to a three-dimensional measurement method and system based on imaging. Background Art

[0002] In the field of industrial measurement, two-dimensional dimension measurement, three-dimensional position measurement and defect detection are key links to ensure product quality and production efficiency. In traditional inspection methods, two-dimensional dimension measurement and three-dimensional position measurement usually need to be performed separately at different inspection stations, which not only increases the complexity of the inspection process, but also may lead to errors caused by inconsistencies between inspection tools.

[0003] For example, the two-dimensional and three-dimensional collaborative weld defect detection method disclosed in CN202311344975.1 improves detection efficiency by the collaborative work of two-dimensional sensors and three-dimensional sensors. However, the angle differences between the two during installation and the differences caused by surface reflection characteristics when facing complex objects result in certain offsets and errors in the detection results.

[0004] In addition, although some existing imaging devices can capture objects with multiple areas, they rely on structured light sources and motion units to obtain images with different focus heights, and reconstruct the three-dimensional image of the object through image fusion. However, the disadvantage of this method is that due to the different shapes of the objects being measured, the characteristics of the structured light source may be affected by the objects being measured and produce blind spots. At the same time, the motion unit will also introduce various measurement errors due to the influence of factors such as the vertical movement direction, platform vibration, and step accuracy direction. Summary of the invention

[0005] The purpose of the present invention is to provide a three-dimensional measurement method based on imaging, introduce innovative imaging technology and processing strategies, significantly improve the ability to quickly and accurately determine the optimal imaging position during the acquisition process, and by optimizing the focusing and imaging processes, not only improve the measurement accuracy, but also can more accurately detect various objects to be measured, greatly improving the reliability and efficiency of detection.

[0006] To achieve the above object, the solution of the present invention is: a three-dimensional measurement method based on imaging, comprising the following steps:

[0007] S1, establish calibration background: illuminate the stage to obtain a uniform reflective surface as the calibration background;

[0008] S2, set up the spatial light modulation imaging system: set up the spatial light modulation mask in the image acquisition module to modulate the image passing through the lens; the spatial light modulation mask conforms to the function ,in, For light intensity, is the spatial frequency of the cosine function, and are coordinates in a two-dimensional coordinate system;

[0009] S3, calibration image acquisition: the image acquisition module shoots the calibration background at different focus distances to obtain the calibration image;

[0010] S4, Modulation optical characteristic calibration: The control and data processing module analyzes the calibration images taken at various focus distances, and demodulates the modulation of the calibration images by the spatial light modulation mask to obtain the relationship between the normalized spatial frequency and the normalized optical transfer function OTF corresponding to the calibration image. Based on these analysis results, the modulation optical characteristic calibration data is obtained;

[0011] S5, camera calibration: the control and data processing module uses the calibration target surface to determine the intrinsic and extrinsic parameters of the camera unit, as well as the mapping relationship between the camera unit and the object space, and obtains the camera unit calibration data and the custom world coordinate origin;

[0012] S6, collecting measurement images: placing the object to be measured on the stage, and the image acquisition module performs layer scanning on the object to be measured, and collects images of the object to be measured at different focus heights as measurement images;

[0013] S7, determining pixel relationship: analyzing pixel points of the measurement images taken at various focus distances of the object under test, and determining pixel positions of the same feature of the object under test at different focus heights through intrinsic and extrinsic parameters of the camera unit calibration data;

[0014] S8, distance demodulation analysis: using the pixel position information obtained in S7, and through the relationship between the normalized spatial frequency, the normalized optical transfer function and the focus distance in step S4, the image where the optical transfer function of each feature of the measured object has the largest data and the corresponding world coordinate distance are calculated;

[0015] S9, obtaining results: fusing all images where the optical transfer function data is the largest, so as to obtain a clear picture of the maximum optical transfer function of the object under test and the coordinates of each pixel under test, and generate a 3D point cloud and fused image information.

[0016] Further, in step S1, the surface of the stage is coated with a uniform reflective material, and the control and data processing equipment is used to control the adjustable light source to illuminate the stage, so as to obtain a reflective surface with a close Lambertian scattering as a calibration background;

[0017] The adjustable light source used is a uniform lighting device of a dome light source with adjustable lighting angle and adjustable brightness.

[0018] Further, in step S2, if a rectangular spatial light modulation mask is used, it conforms to the function ,in, =0.25.

[0019] Further, in step S2, if a rotationally symmetric spatial light modulation mask is used, it conforms to the function , where r is the normalized radius, =0.25, polar angle = .

[0020] Further, in step S5, a checkerboard or dot matrix is ​​used as a calibration target surface, and Zhang's calibration method is used to calibrate the intrinsic parameters and extrinsic parameters of the camera unit, determine the mapping relationship between the camera unit and the object space, and obtain the camera unit calibration data and the custom world coordinate origin.

[0021] Further, in step S8, the distance demodulation analysis method is to use a method combining physical inversion and Fourier analysis to estimate the spatial frequency, wherein a smoothing window function window is introduced before Fourier transform, and the Fourier transform coefficients obtained are for , where g represents the acquired measurement image, q represents the position of the measurement image in the Fourier operation length, j represents an imaginary number, 2 N represents the Fourier operation length, and e represents a natural constant.

[0022] Further, the method of acquiring the measurement image by layer scanning in step S6 is specifically as follows:

[0023] S6.1, presetting scanning parameters on the control and data processing module, wherein the presetting parameters include the working mode, strobe timing and partition strategy of the adjustable light source, and also include the initial focus distance, focus step length and end focus distance of the focus adjustable lens;

[0024] S6.2, capture two-dimensional images step by step according to the preset: according to the preset, adjust the focus adjustable lens and focus on the object to be measured in sequence, with the distance from the initial focus distance M0 to the final focus distance M m , complete the illumination area N1...N on the object to be measured in sequence at each focus distance n The image of the working partition is taken to complete the measurement of the object at the focus distance M i , i∈[1,m], all lighting areas N i’ , i'∈[1,n] images are captured to form a set of measurement pictures of the object under test, where m represents the number of different focus distances and n represents the number of working partitions.

[0025] The present invention also provides a three-dimensional measurement system based on imaging, which is applied to a three-dimensional measurement method based on imaging. The system includes an image acquisition module and an illumination module, and a control and data processing module electrically connected to the two modules and performing signal transmission. The image acquisition module includes: a camera adjustment mechanism having a mechanical drive device for adjusting the height and angle of the camera; a camera unit for taking images of the object to be measured; a focus-adjustable lens for adjusting the focus at different distances on the object to be measured; and a spatial light modulation mask placed in front of the focus-adjustable lens for modulating the image passing through the lens.

[0026] The lighting module includes: an adjustable light source for zoning the object to be tested; a stage for placing the object to be tested, the surface of which is coated with a uniform reflective material; wherein the camera unit, the focus adjustable lens and the adjustable light source are coaxially installed.

[0027] Furthermore, the image height of the camera is h, and the relationship between the focal length F of the focus adjustable lens, the field of view angle w and the image height h is h=2F×(w / M), where M is the focus distance.

[0028] Furthermore, the camera is a black and white area array camera or a color area array camera;

[0029] The focus-adjustable lens is an industrial lens with adjustable focus;

[0030] The adjustable light source is a multi-zone light source, or the adjustable light source is a combined light source formed by one or more of a strip light source, a coaxial light source, a surface light source and a time-divided frequency stroboscopic light source.

[0031] After adopting the above scheme, the beneficial effects of the present invention are:

[0032] The present invention proposes a three-dimensional measurement system based on imaging and a measurement method thereof. The system realizes an efficient and accurate three-dimensional measurement solution by combining an image acquisition module composed of a camera adjustment mechanism, a camera unit, a spatial light modulation mask, a focus adjustable lens, etc., and an illumination module composed of an adjustable light source and a stage coated with a uniform reflective material.

[0033] Improve measurement accuracy: The present invention effectively solves the problem of measurement blind spots that may be caused by the addition of an external light source in traditional methods, especially in applications such as structured light and lighting, by integrating a spatial light modulation imaging module into the device and improving the calculation method and parameter characteristics of the mask. The spatial light modulation mask technology can accurately control the modulation and transmission of light to capture imaging images with specific frequency and optical transfer function (OTF) characteristics. Even when the image is out of focus or in poor focus, these specific features can still show regular changes, ensuring that the key feature information of the object is accurately captured and retained. Therefore, the present invention not only avoids the problem of structured light features being blocked or lost in traditional methods, but also greatly enhances the stability and accuracy of imaging. Particularly suitable for imaging objects in complex environments, this method can provide more comprehensive and accurate image information.

[0034] Enhanced environmental adaptability: Using an adjustable light source and a stage made of uniform reflective material, the system can generate a high-quality uniform Lambertian scattering background, allowing the system to obtain stable measurement results under different lighting and environmental conditions.

[0035] Applicable to complex surfaces and materials: By demodulating the modulation of the spatial light modulation mask on the image, the system can obtain the relationship between the normalized spatial frequency and the normalized optical transfer function (OTF) corresponding to the image at each focusing distance, thereby achieving accurate measurement of objects with complex surfaces and materials.

[0036] In summary, the present invention provides an efficient, accurate, and environmentally adaptable imaging-based three-dimensional measurement system by introducing a spatial light modulation mask and optimizing the system structure, thereby solving the problems of traditional measurement technology in terms of accuracy, speed, environmental adaptability, and measurement of complex surfaces and materials. BRIEF DESCRIPTION OF THE DRAWINGS

[0037] Figure 1 Schematic diagram of the connection relationship between modules of the three-dimensional measurement system in the first embodiment of the present invention;

[0038] Figure 2 It is a schematic diagram of the three-dimensional structure of each module of the three-dimensional measurement system in the first embodiment of the present invention;

[0039] Figure 3 is a flow chart of a three-dimensional measurement method in Embodiment 2 of the present invention;

[0040] Figure 4 It is the modulation distribution diagram of the rectangular spatial light modulation mask in the second embodiment of the present invention;

[0041] Figure 5 is the light intensity distribution diagram of the rectangular spatial light modulation mask in the second embodiment of the present invention;

[0042] Figure 6is a modulation distribution diagram of the circular spatial light modulation mask in the second embodiment of the present invention;

[0043] Figure 7 is a light intensity distribution diagram of a circular spatial light modulation mask in the second embodiment of the present invention;

[0044] Figure 8 is a relationship diagram between normalized OTP and normalized spatial frequency at different focus distances in the second embodiment of the present invention;

[0045] Fig. 9 This is a flow chart of layer scanning and acquisition of measurement images in Embodiment 2 of the present invention;

[0046] Fig.10 This is a schematic diagram of the working partitions of the adjustable light source in the second embodiment of the present invention;

[0047] Fig.11 It is a schematic diagram of the three-dimensional structure of each module of the three-dimensional measurement system in the second embodiment of the present invention;

[0048] Fig.12 It is a schematic diagram of the three-dimensional structure of each module of the three-dimensional measurement system in the third embodiment of the present invention.

[0049] Description of labels:

[0050] 100. Camera adjustment mechanism; 200. Camera unit; 300. Spatial light modulation mask; 400. Focus adjustable lens; 500. Adjustable light source; 600. Stage; 700. Control and data processing module; 800. Image field of view; 900. Object to be measured. DETAILED DESCRIPTION

[0051] The present invention is described in detail below with reference to the accompanying drawings and specific embodiments.

[0052] Embodiment 1:

[0053] The present invention provides a three-dimensional measurement system based on imaging, such as Figure 1 and Figure 2 As shown, the three-dimensional measurement system includes an image acquisition module, an illumination module and a control and data processing module 700 .

[0054] The image acquisition module is composed of a camera adjustment mechanism 100 , a camera unit 200 , a focus adjustable lens 400 and a spatial light modulation mask 300 .

[0055] Among them, the camera adjustment mechanism 100 has a mechanical drive device for adjusting the height and angle of the camera;

[0056] The camera unit 200 is used to capture images of the object under test 900. The camera unit 200 can be a black and white area array camera or a color area array camera; the focus adjustable lens 400 can be an industrial lens with adjustable focus, including but not limited to a telecentric lens with adjustable focus and a cam focus lens. The adjustable light source 500 is flexible in design and can be easily replaced with various standard industrial light sources, such as the adjustable light source 500 is a multi-zone light source, or the adjustable light source 500 is a combination light source formed by one or more of a strip light source, a coaxial light source, a surface light source, and a time-sharing flash light source. This modular design enables the system to quickly adjust the light source combination according to the different needs of the on-site environment, ensuring that clear and accurate detection images can be obtained under various lighting conditions.

[0057] The focus adjustable lens 400 is used to adjust the focus at different distances on the object 900. The field of view of the focus adjustable lens 400 conforms to the image field of view range 800, which refers to the area or spatial range that can be clearly observed and measured in a specific optical or visual system. The image field of view range 800 matches the resolution of the camera unit 200, so that the camera unit 200 can capture a sufficiently clear image within this range, thereby realizing two-dimensional detection image acquisition of the object 900. This design can not only meet the two-dimensional detection requirements of various objects 900, but also ensure the comprehensiveness and accuracy of image acquisition.

[0058] The spatial light modulation mask 300 is placed in front of the focus adjustable lens 400 to modulate the image passing through the lens, thereby obtaining the frequency domain characteristics of the modulated image at different focus distances.

[0059] The lighting module is composed of an adjustable light source 500 and a stage 600. The adjustable light source 500 is used to perform zoned lighting on the object 900 to be measured; by adjusting the adjustable light source 500, independent lighting of different areas of the object 900 to be measured can be achieved, thereby achieving zoned lighting. The brightness, color temperature, illumination angle and other parameters of the light source can also be adjusted according to the surface characteristics and measurement requirements of the object 900 to obtain the best measurement effect. The stage 600 is used to place the object 900 to be measured. The surface of the stage 600 is coated with a uniform reflective material. The adjustable light source 500 illuminates the stage 600, and a reflective surface with close to Lambertian scattering can be obtained as a calibration background.

[0060] The camera unit 200, the focus adjustable lens 400 and the adjustable light source 500 are coaxially mounted. The camera unit 200 and the focus adjustable lens 400 are connected via a stable mechanical interface, which ensures the stability and clarity of image acquisition.

[0061] The control and data processing module 700 is electrically connected to the camera unit 200 and the adjustable light source 500 and transmits signals, receives, processes and outputs data to support decision making, optimize performance and ensure efficient and stable operation of the system. The captured image is processed for 3D image reconstruction, optimal 2D image integration or 2D and 3D image integration.

[0062] In the camera unit 200, the image height of the camera is h, and the relationship between the focal length F, the field angle w and the image height h of the focus adjustable lens 400 is h=2F×(w / M), where M is the focus distance. This formula ensures that the lens module can adjust the focal length according to actual needs, thereby obtaining the best image acquisition effect.

[0063] Embodiment 2:

[0064] The present invention also provides a three-dimensional measurement method based on imaging, which specifically includes the following steps (refer to the process Figure 3 ):

[0065] S1, establish calibration background: control the adjustable light source 500 to illuminate the uniform reflectivity stage 600 through the control and data processing module 700. The surface of the uniform reflectivity stage 600 is coated with a uniform reflective material, so that a reflective surface with close to Lambertian scattering can be obtained, and this is used as the calibration background. This uniformly illuminated calibration background can evenly reflect light, so that the brightness distribution of the reflected light is basically consistent at different positions and angles, reducing background noise errors and obtaining more obvious modulated optical characteristics. This is crucial for subsequent image processing and analysis because it can eliminate errors caused by uneven lighting or inconsistent reflection characteristics.

[0066] The used adjustable light source 500 is a uniform lighting device of a dome light source with adjustable lighting angle and adjustable brightness.

[0067] S2, set up a spatial light modulation imaging system: set a specific spatial light modulation mask 300 in front of the focus adjustable lens 400 to modulate the image passing through the lens. This step introduces a spatial light modulation mask 300 into the optical system to modulate the image, thereby obtaining the frequency domain characteristics of the modulated image at different focus distances.

[0068] In the spatial light modulation mask, a rectangular spatial light modulation mask or a rotationally symmetric spatial light modulation mask can be used.

[0069] If a rectangular spatial light modulation mask is used, the function , where P is the light intensity, β is the spatial frequency of the cosine function, and are coordinates in a two-dimensional coordinate system;

[0070] If a rotationally symmetric spatial light modulation mask is used, specifically a circular spatial light modulation mask, then the function , where P is the light intensity, β is the spatial frequency of the cosine function, r is the normalized radius, and θ is the polar angle. The parameters of the spatial light modulation mask obtained by matching and optimizing the present invention are shown in Table 1:

[0071] Table 1

[0072]

[0073] Through the above function and parameter settings, the modulation distribution of the rectangular spatial light modulation mask and the circular spatial light modulation mask is obtained as follows: Figure 4 and Figure 6 As shown, the black area indicates that the light is completely absorbed or the transmittance is very low, while the white area indicates that the light can be highly transmitted; Figure 5 and Figure 7 They are the light intensity distribution diagrams of the rectangular spatial light modulation mask and the circular spatial light modulation mask, respectively. The x and y axes represent the spatial coordinates of the spatial light modulation mask, and Z represents the normalized transmittance coefficient of the spatial light modulation mask.

[0074] When β=0.25, the modulation frequency is moderate, neither too dense nor too sparse. The modulation pattern formed on the image is neither too complex to be difficult to analyze, nor too simple to lose the modulation effect.

[0075] For a rectangular spatial light modulation mask, the light modulation conforms to the function exist =0.25, a periodic light intensity distribution will be formed in the x and y directions. Due to the moderate β value, this distribution can avoid overly sharp or flat transitions while maintaining a certain contrast, which is beneficial to the subsequent processing and analysis of the image.

[0076] For a rotationally symmetric spatial light modulation mask (such as a circle), the light modulation conforms to the function exist =0.25, a periodic light intensity distribution will be formed in the radial direction r. This distribution also has a moderate frequency, which is beneficial to reduce unnecessary noise and distortion while maintaining image features.

[0077] Therefore, when the parameter β of the spatial light modulation mask is 0.25, a better imaging effect can be obtained, and this parameter value achieves a good balance in terms of modulation frequency, light intensity distribution and system performance.

[0078] The method uses a spatial light modulation mask 300 to obtain the frequency and OTF characteristics of an image with specific characteristics. The characteristics have regular changes during the image defocusing process. Therefore, the method of the invention is not easy to lose the object characteristics.

[0079] S3, calibration image acquisition: The control and data processing system is used to control the focus adjustable lens 400, adjust the focus distance within the predetermined detection range, and use the camera unit 200 to shoot the calibration background at each different focus distance to obtain a series of calibration images. These images will be used for subsequent modulation optical property calibration to establish the relationship between the focus distance and the frequency domain characteristics. At the same time, these images can also be used for camera calibration to determine the internal and external parameters of the camera, thereby establishing a mapping relationship between the camera and the object space.

[0080] S4, calibration of modulated optical characteristics: the control and data processing module 700 analyzes the calibration images taken at various focusing distances and demodulates the modulation of the captured images by the spatial light modulation mask 300, thereby obtaining the relationship between the normalized spatial frequency and the normalized optical transfer function OTF corresponding to the calibration images at various focusing distances.

[0081] Specifically, if Figure 8 As shown in the figure, as the focus distance increases from 200mm to 500mm, the normalized spatial frequency increases, and at the same time, the side lobes of the transfer function move, the frequency interval between the zero-frequency main maximum increases, and the bandwidth also increases. This shows that as the distance increases, the system can resolve richer object details, that is, it has a higher spatial resolution.

[0082] Through these analysis results, we can obtain the calibration data of the modulated optical characteristics, which is the basis for subsequent measurement and analysis. It establishes the mathematical relationship between the focus distance and the frequency domain characteristics, so that we can infer the focus distance and height information of the object by analyzing the frequency domain characteristics of the measured object image. During the measurement process, we only need to take an image of the object and analyze its frequency domain characteristics, and we can use the previously calibrated data to accurately infer the focus distance and height information of the object.

[0083] S5, camera calibration: The control and data processing module 700 uses a standard chessboard or dot matrix as a calibration target surface. These calibration targets contain geometric feature points of known size and position, which are used to estimate the internal and external parameters of the camera. The internal parameters mainly include the focal length, principal point coordinates, distortion coefficient, etc. of the camera, while the external parameters describe the position and posture of the camera in three-dimensional space.

[0084] During the calibration process, the control and data processing module 700 uses Zhang's calibration method to calibrate the camera unit 200. Zhang's calibration method takes images of the calibration target surface at different viewing angles, and uses the correspondence between the feature points in the image and the corresponding points in the calibration target surface to establish the relationship between the camera's intrinsic parameters, extrinsic parameters and image coordinates. By solving these relationships, the intrinsic parameters and extrinsic parameters of the camera unit 200 can be determined, and then the mapping relationship between the camera unit 200 and the object space can be determined.

[0085] After completing the camera calibration, the control and data processing module 700 will obtain the calibration data of the camera unit 200, including the camera's internal parameters, external parameters, and distortion coefficients, etc. In addition, the world coordinate origin can also be customized to make the conversion between camera coordinates and world coordinates more flexible and convenient.

[0086] S6, collecting measurement images: placing the object to be measured 900 on a stage 600 coated with a uniform reflective material, using the control and data processing module 700 to control the focus adjustable lens 400, adjusting the focus distance within the detection range, performing layer scanning on the object to be measured, collecting images of the object to be measured at different focus heights as measurement images, and then using these images for subsequent processing and analysis.

[0087] The specific method of layer scanning acquisition and measurement image is as follows (refer to Fig. 9 ):

[0088] S6.1, scanning parameters are preset on the control and data processing module 700, the preset parameters include the working mode, stroboscopic timing and partition strategy of the adjustable light source 500, and the initial focus distance, focus step and end focus distance of the focus adjustable lens 400;

[0089] S6.2, capture two-dimensional images step by step according to the preset: Fig.10 As shown, according to the preset, the focus adjustable lens 400 is adjusted to focus on the object 900 in sequence, and the distance is from the initial focus distance M0 to the final focus distance M m , complete the N1...N illumination areas on the object 900 in sequence at each focus distance n The image of the working partition is taken to complete the measurement of the object 900 at the focus distance M i , i∈[1,m], all lighting areas N i’ , i'∈[1,n] images are captured to form a set of measured images of the object being measured, and the images in the image set are M i N i’ The camera unit then transmits the picture set to the control and data processing module 700. m represents the number of different focus distances, and n represents the number of working partitions.

[0090] S7, determining pixel relationships: After completing the acquisition of the measurement images of the object under test 900 at various focus distances, the pixels in these images need to be analyzed. By using the internal parameters and external parameters previously obtained by calibration of the camera unit 200, the pixel positions of the same feature of the object under test at different focus heights can be accurately determined.

[0091] Specifically, the key feature points in each measurement image are first extracted. These feature points can be the edge, corner point, texture, etc. of the object. Then, according to the internal parameters (such as focal length, principal point coordinates, distortion coefficient, etc.) and external parameters (such as camera position, posture, etc.) calibrated by the camera unit 200, a mapping relationship from image pixel coordinates to three-dimensional world coordinates can be established. Using this mapping relationship, the image pixel position of the same measured object feature at different focus heights can be converted into the corresponding three-dimensional world coordinates. By comparing and analyzing these three-dimensional coordinates, the spatial position relationship of the same measured object feature at different focus heights can be accurately determined.

[0092] S8, distance demodulation analysis: In step S7, the pixel position information of the features of the object under test 900 at different focus heights has been obtained. Next, this position information will be used to combine the relationship between the normalized spatial frequency, normalized optical transfer function (OTF) and focus distance in the modulation optical characteristic calibration parameters to perform distance demodulation analysis. Specifically, the image and the corresponding world coordinate distance of the data of the maximum optical transfer function (optimal focus distance) of each feature of the object under test are solved.

[0093] In step S8, distance demodulation analysis is a key step, which is used to determine the image where the data of the optical transfer function of the feature of the object under test is the largest and the corresponding world coordinate distance. Specifically, Fourier analysis can be used to realize the estimation of spatial frequency. In order to more accurately estimate the spatial frequency and reduce the influence of noise and artifacts, a method combining physical inversion and Fourier analysis can be used. This method introduces a smooth window function (window) before Fourier transform, which can reduce high-frequency noise and enhance the signal in the frequency range of interest. After the window function is introduced, the Fourier transform coefficients can be obtained by performing Fourier transform on the original image or signal. , , where g represents the acquired measurement image, q represents the position of the measurement image in the Fourier operation length, specifically q represents the qth column or qth row of the measurement image in the Fourier operation length; j represents an imaginary number, 2 N represents the Fourier operation length, and e represents a natural constant.

[0094] S9, obtain the result: fuse the images where all the data of the maximum optical transfer function (optimal focus distance) obtained in step S8 are located to obtain a clear picture of the maximum optical transfer function of the object 900 and the coordinates of each pixel point under test, and generate a 3D point cloud and fused image information.

[0095] The fusion process involves aligning and combining the areas with the largest optical transfer functions in each image to form a complete image with higher definition. This step requires the use of the coordinate information of each pixel point obtained in step S8 to ensure that the same features in different images can be accurately matched and superimposed. After the image fusion is completed, a clear image containing the main features of the object under test is obtained. At the same time, according to the coordinate information of each pixel point under test determined in step S8, a 3D point cloud is further generated, which represents the spatial position information of the object under test in the form of three-dimensional coordinates.

[0096] In the three-dimensional measurement system adopted in this embodiment, the camera unit uses a black-and-white area array camera with a resolution of 10 million; the focus adjustable lens is a telecentric lens with a magnification of 0.3 times and a focus adjustment function; the spatial light modulation mask uses a rectangular spatial light modulation mask, which meets the function , =0.25;

[0097] The adjustable light source 500 may be a dome light source with multiple partitions and time-sharing strobes. The multiple partitions can be adjusted in angle to illuminate different areas of the object to be inspected, and different angles and brightness are used to illuminate the designated areas.

[0098] The present invention uses an industrial camera with high resolution to significantly improve the accuracy and quality of scanning. After the three-dimensional layer scan, the system can re-import and process the two-dimensional data of the image. This unique step ensures that the image data finally acquired can retain the two-dimensional original resolution of the industrial camera, thereby avoiding the resolution loss problem common in traditional three-dimensional scanning technology. The camera unit of this embodiment uses a camera with a resolution of 10 million, which can obtain a resolution of 10 million. Compared with traditional three-dimensional scanning technology, this improvement has achieved an order of magnitude improvement in resolution and greatly improved accuracy.

[0099] like Fig.11 As shown, the focus-adjustable lens 400 of this embodiment can be replaced by an industrial lens with a focal length of 25 mm and a liquid focus function.

[0100] Embodiment three:

[0101] The difference between this embodiment and the second embodiment is that the camera unit 200, the focus adjustable lens 400 and the adjustable light source 500 of the three-dimensional measurement system are all of different types from those of the second embodiment. Fig.12As shown, in this embodiment, the camera unit of the imaging-based three-dimensional measurement system uses a black-and-white area array camera with a resolution of 12 million, and the focus-adjustable lens uses an industrial lens with a focal length of 25 mm and a focus function; the spatial light modulation mask uses a circular spatial light modulation mask, which meets the function ,in =0.25, = The adjustable light source is a lighting component composed of four groups of strip light sources. The angle between the strip light source and the object to be measured can be modulated and configured between 20° and 80°.

[0102] This embodiment uses four groups of identical strip light sources to combine, and controls the time-sharing strobe, working mode, etc. of the light source through the control and data processing module, maintains synchronous control of the light source and the camera, and can realize the embedded use of any light source in the device.

[0103] The imaging-based three-dimensional measurement system method of this embodiment is the same as that of the second embodiment, and will not be described again here.

[0104] To further illustrate the various embodiments, the present invention provides drawings. These drawings are part of the disclosure of the present invention, which are mainly used to illustrate the embodiments and can be used in conjunction with the relevant descriptions in the specification to explain the operating principles of the embodiments. With reference to these contents, a person of ordinary skill in the art should be able to understand other possible implementations and advantages of the present invention. The components in the figures are not drawn to scale, and similar component symbols are generally used to represent similar components.

[0105] Meanwhile, the directions such as front, back, left, and right involved in this embodiment are only used as a reference for directions and do not represent directions in actual use. In addition, the terms "first", "second", and "third" are only used for descriptive purposes and cannot be understood as indicating or implying relative importance.

[0106] The above description is only a preferred embodiment of the present invention and is not a limitation on the design of this case. Any equivalent changes made based on the design key of this case shall fall within the protection scope of this case.

Claims

1. A three-dimensional measurement method based on imaging, It is characterized in that The following steps are involved: S1, establish calibration background: illuminate the stage to obtain a uniform reflective surface as the calibration background; S2, set up the spatial light modulation imaging system: set up the spatial light modulation mask in the image acquisition module to modulate the image passing through the lens; the spatial light modulation mask conforms to the function ,in, For light intensity, is the spatial frequency of the cosine function, and are coordinates in a two-dimensional coordinate system; S3, calibration image acquisition: the image acquisition module shoots the calibration background at different focus distances to obtain the calibration image; S4, modulated optical characteristic calibration: the control and data processing module analyzes the calibration images taken at various focus distances, and demodulates the modulation of the calibration image by the spatial light modulation mask, obtains the relationship between the normalized spatial frequency and the normalized optical transfer function OTF corresponding to the calibration image, and obtains the modulated optical characteristic calibration data based on the relationship between the normalized spatial frequency and the normalized optical transfer function OTF corresponding to the calibration image; S5, camera calibration: the control and data processing module uses the calibration target surface to determine the intrinsic and extrinsic parameters of the camera unit, as well as the mapping relationship between the camera unit and the object space, and obtains the camera unit calibration data and the custom world coordinate origin; S6, collecting measurement images: placing the object to be measured on the stage, and the image acquisition module performs layer scanning on the object to be measured, and collects images of the object to be measured at different focus heights as measurement images; S7, determining pixel relationship: analyzing pixel points of the measurement images taken at various focus distances of the object under test, and determining pixel positions of the same feature of the object under test at different focus heights through intrinsic and extrinsic parameters of the camera unit calibration data; S8, distance demodulation analysis: using the pixel position information obtained in S7, and through the relationship between the normalized spatial frequency, the normalized optical transfer function and the focus distance in step S4, the image where the optical transfer function of each feature of the measured object has the largest data and the corresponding world coordinate distance are calculated; S9, obtaining results: fusing all images where the optical transfer function data is the largest, so as to obtain a clear picture of the maximum optical transfer function of the object under test and the coordinates of each pixel under test, and generate a 3D point cloud and fused image information.

2. The three-dimensional measurement method based on imaging as claimed in claim 1, Features: In step S1, the surface of the stage is coated with a uniform reflective material, and the control and data processing equipment is used to control the adjustable light source to illuminate the stage, so as to obtain a reflective surface with a close Lambertian scattering as a calibration background; The adjustable light source used is a uniform lighting device of a dome light source with adjustable lighting angle and adjustable brightness.

3. The three-dimensional measurement method based on imaging as claimed in claim 1, Features: In step S2, if a rectangular spatial light modulation mask is used, it conforms to the function ,in, =0.

25.

4. The three-dimensional measurement method based on imaging as claimed in claim 1, Features: In step S2, if a rotationally symmetric spatial light modulation mask is used, it conforms to the function ,in, is the normalized radius, =0.25, polar angle = .

5. The three-dimensional measurement method based on imaging as claimed in claim 1, Features: In step S5, a checkerboard or dot matrix is ​​used as a calibration target surface, and Zhang's calibration method is used to calibrate the intrinsic and extrinsic parameters of the camera unit, determine the mapping relationship between the camera unit and the object space, and obtain the camera unit calibration data and the custom world coordinate origin.

6. The three-dimensional measurement method based on imaging as claimed in claim 1, Features: In step S8, the distance demodulation analysis method is to use a method combining physical inversion and Fourier analysis to estimate the spatial frequency, wherein a smoothing window function window is introduced before Fourier transform, and the Fourier transform coefficients obtained are : , where g represents the acquired measurement image, q represents the position of the measurement image in the Fourier operation length, j represents an imaginary number, 2 N represents the Fourier operation length, and e represents a natural constant.

7. The three-dimensional measurement method based on imaging as claimed in claim 1, Features: The method of collecting the measurement image by layer scanning in step S6 is specifically as follows: S6.1, presetting scanning parameters on the control and data processing module, wherein the presetting parameters include the working mode, strobe timing and partition strategy of the adjustable light source, and also include the initial focus distance, focus step length and end focus distance of the focus adjustable lens; S6.2, take two-dimensional images step by step according to the preset: according to the preset, adjust the focus adjustable lens, focus on the object to be measured in turn, the distance is from the initial focus distance M 0 To the end focus distance M m , complete the Nth illumination area on the object at each focus distance 1 ...N n The image of the working partition is taken to complete the measurement of the object at the focus distance M i, All lighting areas N at position i∈[1,m] i’ , i'∈[1,n] images are captured to form a set of measurement pictures of the object under test, where m represents the number of different focus distances and n represents the number of working partitions.

8. A three-dimensional measurement system based on imaging, Features: The system is applied to the imaging-based three-dimensional measurement method according to any one of claims 1 to 7, and the system includes an image acquisition module and an illumination module, and a control and data processing module electrically connected to the two and performing signal transmission, wherein: The image acquisition module includes: A camera adjustment mechanism having a mechanical drive device for adjusting the height and angle of the camera; A camera unit, used for capturing images of the object under test; Focus adjustable lens, used to adjust the focus at different distances on the object being measured; The spatial light modulation mask is placed in front of the focus adjustable lens to modulate the image passing through the lens; The lighting module includes: Adjustable light source, used to illuminate the object under test in different zones; The stage is used to place the object to be measured, and the surface of the stage is coated with uniform reflective material; The camera unit, the focus adjustable lens and the adjustable light source are coaxially installed.

9. The imaging-based three-dimensional measurement system according to claim 8, Features: The image height of the camera is h, and the relationship between the focal length F of the focus-adjustable lens, the field of view angle w and the image height h is h=2F×(w / M), where M is the focus distance.

10. The imaging-based three-dimensional measurement system according to claim 8, Features: The camera is a black and white area array camera or a color area array camera; The focus-adjustable lens is an industrial lens with adjustable focus; The adjustable light source is a multi-zone light source, or the adjustable light source is a combined light source formed by one or more of a strip light source, a coaxial light source, a surface light source and a time-divided frequency stroboscopic light source.