A three-dimensional measuring device and a method for increasing uniformity of projection brightness

By calculating the projection geometry parameters and brightness compensation coefficient of the projection device, the problem of uneven brightness caused by the high tilt angle of the projection device was solved, which improved the accuracy and reliability of three-dimensional measurement and reduced the complexity and cost of optical design.

CN119289898BActive Publication Date: 2025-11-04SHENZHEN HUAHAN WEIYE TECH
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202411228030.8
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-09-03
Publication Date
2025-11-04
Estimated Expiration
2044-09-03

AI Technical Summary

Technical Problem

The high tilt angle of the projection device results in uneven brightness of the light spot projected onto the object to be inspected, affecting the accuracy of 3D measurement.

Method used

By acquiring the projection geometry parameters of the projection device, calculating the brightness compensation coefficient of each pixel, and performing brightness compensation on the image to be projected, a uniformly bright projected image is obtained.

Benefits of technology

It improves the reliability of 3D measurement results, reduces the impact of light source attenuation on grayscale difference, reduces grayscale difference in local high reflectivity areas, and saves optical design costs.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119289898B_ABST
    Figure CN119289898B_ABST
Patent Text Reader

Abstract

A kind of three-dimensional measuring equipment and the method for increasing projection brightness uniformity, obtain the projection geometry parameter of projection device;According to the projection geometry parameter obtained, the brightness compensation coefficient of each pixel point of the image to be projected is calculated;According to the brightness compensation coefficient of each pixel point of the image to be projected, the brightness compensation is carried out to the image to be projected, and the image to be projected after brightness compensation is obtained;The image to be projected after brightness compensation is projected.Through the brightness compensation to the image to be projected, the brightness of the architecture light projected on the object to be detected is more uniform, which can effectively reduce the influence of gray difference caused by light source itself attenuation factor, so that the gray change in the measurement image finally obtained can more truly reflect the change of the height of the object to be detected;On the other hand, the gray difference between high light reflection area and other area can be reduced, so that more reliable three-dimensional measurement result is obtained, and the method is more simple and reliable.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the field of structured light, in particular to a three-dimensional measurement device and a method for increasing the uniformity of projected brightness. BACKGROUND

[0002] With the development of mold design, precision machining, product detection, industrial measurement and other fields, the traditional two-dimensional image sensor technology is increasingly unable to meet the needs of production scenes, and the demand for three-dimensional measurement technology is growing rapidly in recent years. Since the three-dimensional measurement sensor has one more dimension of depth information, and the depth itself is not very sensitive to factors such as posture and lighting, three-dimensional measurement has greater advantages for object recognition and measurement tasks.

[0003] The current mainstream three-dimensional measurement sensors are divided into contact type and non-contact type, and the non-contact type often uses the known geometric relationship between multiple sensors to measure coordinates, which has the advantages of no damage and no deformation, and is more popular. The surface structured light technology based on triangulation has gradually shown its potential for use.

[0004] In the structured light system, a combination of a light source-DMD (Digital Micro-mirror Device)-projection lens is generally used. Since the DLP (Digital Light Projector) technology has the advantages of high native contrast, small machine size, closed optical path, high brightness, and good uniformity, the DLP is mainly used as the light source part in the structured light system. However, due to the limitation of the mechanical structure position, the projector is often designed as a Scheimpflug off-axis structure, which results in a high tilt angle between the projector and the plane where the object to be detected is located, thereby affecting the brightness uniformity of the light spot projected onto the object to be detected. That is, the brightness near the light source is significantly higher than that far from the light source, which causes the three-dimensional information obtained to be biased.

[0005] Therefore, it is very important to design a method that can improve the uniformity of the structured light reconstruction system. SUMMARY

[0006] The technical problem solved by the present application is how to solve the problem of brightness non-uniformity caused by the high tilt angle of the projection device.

[0007] According to a first aspect, in one embodiment, a three-dimensional measurement device is provided, comprising:

[0008] One or more projection devices for projecting a to-be-projected image containing a preset pattern to an object to be detected;

[0009] An image capturing component for capturing the object to be detected with the preset pattern projected thereon to obtain a measurement image;

[0010] an image processing unit, configured to process the measurement image to obtain three-dimensional information of the object to be detected; and

[0011] a controller, configured to:

[0012] obtain a projection geometry parameter of the projection device;

[0013] calculate a brightness compensation coefficient of each pixel point of a to-be-projected image according to the projection geometry parameter of the projection device;

[0014] perform brightness compensation on the to-be-projected image according to the brightness compensation coefficient of each pixel point of the to-be-projected image, to obtain the to-be-projected image after brightness compensation;

[0015] control the projection device to project the to-be-projected image after brightness compensation.

[0016] According to a second aspect, in an embodiment, a method for increasing projection brightness uniformity of a projection device is provided, comprising:

[0017] obtain a projection geometry parameter of the projection device;

[0018] calculate a brightness compensation coefficient of each pixel point of a to-be-projected image according to the projection geometry parameter of the projection device;

[0019] perform brightness compensation on the to-be-projected image according to the brightness compensation coefficient of each pixel point of the to-be-projected image, to obtain the to-be-projected image after brightness compensation;

[0020] project the to-be-projected image after brightness compensation.

[0021] According to the three-dimensional measurement device and the method for increasing the uniformity of the projection brightness of the above-mentioned embodiments, the brightness of the stripe structure light finally projected on the object to be detected is more uniform by performing brightness compensation on the image to be projected at the projection end, and when gray scale imaging is performed by using the image shooting component, no further flat field correction is needed. On the one hand, the influence of the gray scale difference caused by the self-decay factor of the light source can be effectively reduced, so that the gray scale change in the finally obtained measurement image can more truly reflect the change of the height of the object to be detected. On the other hand, for a local high-reflectivity object, if the local high-reflectivity area is close to the area of the light source without brightness compensation, a higher gray scale difference between the area and other areas in the obtained measurement image will be caused, resulting in a large deviation of the three-dimensional information of the area after reconstruction. The brightness compensation can reduce the brightness of the area close to the light source, thereby reducing the gray scale difference between the high-reflectivity area and other areas, so that more reliable three-dimensional measurement results can be obtained. In addition, since the projection image is more uniform in space, the influence of the spatial position on the reconstruction of the object to be detected is smaller, and compared with complex optical design or structural design, the processing of the image to be projected on the algorithm can save cost and be simpler. BRIEF DESCRIPTION OF DRAWINGS

[0022] Figure 1 FIG. 1 is a structural schematic diagram of a three-dimensional measurement device;

[0023] Figure 2 FIG. 5 is a flowchart of a method for increasing the uniformity of the projection brightness of a projection device;

[0024] Figure 3 FIG. 7 is a position schematic diagram of different components of a structured light system;

[0025] Figure 4 FIG. 8 is an image to be projected before brightness compensation;

[0026] Figure 5 FIG. 9 is a brightness compensation image;

[0027] Figure 6 FIG. 10 is an image to be projected after brightness compensation. DETAILED DESCRIPTION

[0028] The application will be described in further detail below with reference to the drawings. Like elements in different embodiments are denoted by like reference numerals. In the following embodiments, many specific details are described in order to provide a thorough understanding of the application. However, it will be apparent to those skilled in the art that the application can be practiced without these specific details. In other instances, well-known methods, procedures, components, and networks have not been described in detail so as not to unnecessarily obscure aspects of the application. Embodiments of the present application will also be described as a process which is detailed in a certain order. This manner of describing embodiments is also merely for convenience and is in no way meant to limit the application. Therefore, it is to be understood that any sequence / order of steps can be employed, without departing from the scope of the application.

[0029] In addition, features, operations, or steps described in the specification can be combined in any suitable manner without departing from the scope of the present application. In addition, the various steps or actions in a method described herein can also be performed in a different sequence from those described, without departing from the scope of the application. Therefore, the various sequences described in the specification and the attached drawings are merely for clarity, and do not necessarily mean that the order must be followed, unless otherwise specified.

[0030] In this document, the terms "first", "second", etc. are used only to distinguish one object from another, and do not have any technical meaning. In this document, the terms "connected" and "coupled" are used only to mean direct or indirect connection (coupling) unless otherwise specified.

[0031] In the embodiments of the application, the relationship between each micromirror on the projection device and the corresponding theoretical brightness of the projection field area is established according to the structure and spatial relationship of the structured light system, and then the brightness compensation coefficient is obtained. The brightness compensation coefficient is used to compensate the brightness of the image to be projected, so that the gray difference in the measurement image collected by the camera can truly reflect the height information of the object to be detected, and the reliability of the three-dimensional measurement result is improved.

[0032] In the structured light system, one or more projection devices 11 are used to alternately project a preset pattern containing a to-be-projected image to the object to be detected. In the present embodiment, the projection device 11 used includes a matrix arrangement of a micro-mirror array, each micro-mirror corresponding to a pixel point in the to-be-projected image, for projecting a pixel point in the projection image to the object to be detected, and forming a projection field region on the surface of the object to be detected, and the projection field region is a trapezoidal region. After the single projection device 11 projects the preset pattern containing the to-be-projected image to the object to be detected, an image capturing component 12 is used to capture an image of the object to be detected, and a measurement image of the object to be detected is obtained. In the present embodiment, the image capturing component 12 is a camera. Then, a phase image is obtained by decoding the obtained measurement image according to a corresponding decoding algorithm in an image processing unit 13, and the phase value is restored to the real three-dimensional coordinates of the object according to the pre-calibrated position parameters.

[0033] In the present embodiment, since the fringe coding structured light is one of the three-dimensional measurement methods with higher usage rate at present, and has the advantages of high accuracy, non-contact, high speed and high stability, etc., the measurement principle is triangulation, that is, the intersection of the light plane projected by the projector and the light corresponding to the pixel position of the camera is calculated to obtain the three-dimensional coordinates of the object to be measured. Among them, there are many ways to code the light plane, and the classical method is Gray code and / or sinusoidal phase shift, which has the advantages of high stability and high precision. Therefore, the phase shift image and / or Gray code image generated by the fringe coding structured light in the present embodiment is used as the initial to-be-projected image, that is, the to-be-projected image before brightness compensation, as shown in FIG. 2, and then the to-be-projected image is projected onto the surface of the object to be detected after processing. Figure 4

[0034] In this process, since the light attenuates during propagation, the brightness of the area close to the light source on the object to be detected is higher, and the brightness of the area far from the light source is lower, that is, the gray scale difference in the measurement image obtained by the camera is not completely caused by the height change of the object to be detected itself, but also affected by the attenuation of the light itself. Therefore, the brightness of the to-be-projected image can be compensated at the projection end according to the brightness of the projection field region corresponding to a single micro-mirror, so that the brightness projected onto the object to be detected is more uniform, and the gray scale information in the measurement image can more accurately reflect the actual three-dimensional information of the object to be detected, thereby obtaining more accurate and reliable three-dimensional measurement results. The specific process of using the controller 14 to compensate the brightness of the to-be-projected image in the present embodiment is as follows:

[0035] Step S100: Obtain the projection geometry parameters of the projection device.

[0036] ​For a micro-mirror on the projector, the micro-mirror is in the "on" state and other micro-mirrors are in the "off state, the plane where the object to be detected is located is projected, the plane becomes the measured plane in the embodiment, then the camera is used to collect the image of the measured plane to obtain the surface image of the measured plane, at this time, the surface image obtained only contains the projection field region of the micro-mirror on the measured plane, that is, a trapezoidal region, then the corner point detection algorithm such as Harris corner point detection algorithm is used to detect the corner points of the trapezoidal region to obtain the pixel coordinates of the four corner points of the trapezoidal region, and the space coordinates of the four corner points are obtained according to the pixel coordinates of the four corner points in the surface image, the internal parameter matrix and the external parameter matrix of the camera; then the DLT algorithm, that is, the direct linear transformation algorithm, is used to estimate the homography matrix according to the space coordinates of the four corner points and the pixel coordinates of the micro-mirror, so as to establish the corresponding relationship between the micro-mirror and the projection field region formed on the measured plane, at this time, the internal and external parameter matrices of the camera are further combined, so that the corresponding relationship between the micro-mirror and the trapezoidal region in the surface image is obtained;

[0037] For example, for any micro-mirror on the projector, the projection field region formed by the micro-mirror in the surface image is a trapezoidal region, for the i-th corner point in the trapezoidal region, i = 1, 2, 3, 4, the pixel coordinates of the corner point are converted into the world coordinate system according to the internal parameter matrix and the external parameter matrix of the camera to obtain the space coordinates of the corner point, that is:

[0038]

[0039] Where (x i ,y i ) is the pixel coordinates of the i-th corner point in the surface image; K is the internal parameter matrix of the camera, K -1 is the inverse matrix of the internal parameter matrix of the camera, E is the external parameter matrix of the camera; (X wi ,Y wi ,Z wi ) is the space coordinates of the i-th corner point;

[0040] The other corner points in the trapezoidal region are processed to obtain the spatial coordinates of the four corner points; in this embodiment, the coordinates of the upper left corner of each micro-mirror are directly determined by the row number and the column number, that is, the pixel coordinates of the micro-mirror, and the coordinates of the other three corners of the micro-mirror are represented by the pixel coordinates of the adjacent micro-mirror, for example, for the micro-mirror in the u-th row and the v-th column, the pixel coordinates of the micro-mirror are (u, v), that is, the coordinates of the upper left corner of the micro-mirror are (u, v), the coordinates of the upper right corner of the micro-mirror are (u, v+1), the coordinates of the lower left corner of the micro-mirror are (u+1, v), and the coordinates of the lower right corner of the micro-mirror are (u+1, v+1), at this time, the four corners of the micro-mirror correspond to the four corner points in the trapezoidal region one by one; then, the homography matrix H is estimated according to the spatial coordinates of the four corner points in the trapezoidal region and the pixel coordinates corresponding to the four corners of the micro-mirror by using the DLT algorithm, the obtained homography matrix is a 3x3 matrix, and the conversion relationship between the pixel coordinates of the current micro-mirror and the spatial coordinates of the corresponding corner point is represented as:

[0041]

[0042] Thus, the corresponding relationship between any micro-mirror on the projector and the four corner points of the projection field of view region in the surface image can be established, and the projection geometric parameter in this embodiment is the corresponding relationship; at this time, the four corner points of the projection field of view region corresponding to any micro-mirror on the projector can be obtained according to the pixel coordinates of the micro-mirror.

[0043] Step S110: calculating the brightness compensation coefficient of each pixel point of the image to be projected according to the projection geometric parameter of the projection device.

[0044] For any micro-mirror in the projector, the four corner points of the projection field of view region of the corresponding trapezoid are obtained according to the obtained corresponding relationship, and two corner points corresponding to the lower base of the trapezoidal region are selected from the four corner points, that is, the corner points with the same horizontal coordinates in the four corner points of the projection field of view region are divided into a group, thereby obtaining two groups of corner points, each group containing two corner points, and then the Euclidean distance between the two corner points in each group is calculated, and the group of corner points with the maximum Euclidean distance is taken as the two corner points corresponding to the lower base of the trapezoidal region, at this time, the two obtained corner points have the same horizontal coordinates, and the two corner points are referred to as long-side corner points in this embodiment; it should be noted that, in geometry, the lower base of the trapezoid refers to the longer one of the two bases of the trapezoid;

[0045] The ratio between the horizontal coordinate of the obtained long-side corner point and the height of the micro-mirror corresponding to the pixel point is calculated, the inverse tangent value of the obtained ratio is calculated, the cosine value of the obtained inverse tangent value is calculated, the fixed gain of the projector is obtained, and the ratio between the fixed gain and the nth power of the obtained cosine value is taken as the theoretical brightness of the projection field of view region, n can be 2, 3, 4, etc., and can be set according to actual requirements;

[0046] Taking a typical scenario in a structured light system, namely a combination of two projectors and one camera, as an example, the positional diagram is as follows: Figure 3 As shown, let the plane being measured be P, and the center point of the projector be located at (x, h), where x is the Euclidean distance between the center point of the projector and the center point of the camera, and h is the height of the center point of the projector relative to the horizontal plane. Then, the horizontal distance within the projector's projection field of view is... The theoretical brightness at a given position can be expressed as k / cos n (θ), where k is the fixed gain of the projector, which is related to the projector's optical power and field of view.

[0047] For the e-th micromirror on the projector, by obtaining the two corner points corresponding to the bottom edge of the trapezoidal region corresponding to the micromirror, the theoretical brightness of the projected field of view region formed by the micromirror on the measured plane can be expressed as:

[0048]

[0049] Among them, L e h is the theoretical brightness of the projected field of view corresponding to the e-th micromirror. e Let b be the height of the e-th micromirror from the horizontal plane. e Let x be the x-coordinate of the corner point of the long side corresponding to the e-th micromirror; k is the fixed gain of the projector; cos() is the cosine function; arctan() is the arctangent function;

[0050] Since there is a one-to-one correspondence between the micromirrors on the projector and the pixels in the image to be projected, the theoretical brightness of the projection field of view corresponding to the e-th micromirror is also the theoretical brightness corresponding to the e-th pixel in the image to be projected.

[0051] Then, the reciprocal of the obtained theoretical brightness is used as the gain coefficient of the e-th micromirror, and the scale transformation coefficient is set to normalize the obtained gain coefficient. The gain coefficient of the e-th micromirror is mapped to the range of (0,1] through the scale transformation coefficient, and the normalization of the obtained gain coefficient is completed. The normalization result is the brightness compensation coefficient of the e-th micromirror, which is also the brightness compensation coefficient of the e-th pixel. The scale transformation coefficient can be set according to the actual situation.

[0052] Each pixel in the projected image is processed to obtain the theoretical brightness of the corresponding projection field of view for each pixel. This yields the brightness compensation coefficient for each pixel in the projected image. The brightness compensation coefficients for all pixels constitute the brightness compensation image, such as... Figure 5 As shown.

[0053] Step S120: Perform brightness compensation on the image to be projected according to the brightness compensation coefficient of each pixel of the image to be projected, and obtain the brightness-compensated image to be projected.

[0054] Calculate the product between the grayscale value of each pixel in the projected image and its corresponding brightness compensation coefficient. Use this product as the brightness compensation result for each pixel. The brightness compensation results for all pixels constitute the brightness-compensated projected image, such as... Figure 6 As shown.

[0055] Step S130: Project the brightness-compensated image to be projected to obtain a measurement image, thereby obtaining the three-dimensional information of the object to be detected.

[0056] The brightness-compensated image to be projected is projected from the projector onto the object to be detected. Then, the camera is used to acquire the image of the object to be detected, and the measurement image is obtained. The image processing unit 13 processes the obtained measurement image, that is, it performs structured light demodulation and three-dimensional reconstruction on the obtained measurement image, thereby obtaining the true three-dimensional information of the object to be detected.

[0057] Please refer to Figure 1 In this embodiment, a three-dimensional measurement device first uses the controller 14 to obtain the projection geometry parameters of the projection device 11, thereby calculating the brightness compensation coefficient of each pixel of the image to be projected, and then performs brightness compensation on the image to be projected. After the brightness compensation image to be projected is projected, the image capturing component 12 captures the object to be detected to obtain the measurement image. Finally, the image processing unit 13 processes the obtained measurement image to obtain the three-dimensional information of the object to be detected.

[0058] This embodiment compensates for the brightness of the image to be projected at the projection end, making the brightness of the striped beams projected onto the object to be detected more uniform. When using the image capturing component 12 for grayscale imaging, no further flat-field correction is required. On the one hand, this effectively reduces the influence of grayscale differences caused by the attenuation of the light source itself, allowing the grayscale changes in the final measurement image to more realistically reflect the height changes of the object to be detected. On the other hand, for locally highly reflective objects, without brightness compensation, if the locally highly reflective area is close to the light source area, it will result in a higher grayscale difference between this area and other areas in the obtained measurement image, leading to a large deviation in the three-dimensional information of this area after reconstruction. Brightness compensation can reduce the brightness of the area close to the light source, thereby reducing the grayscale difference between the highly reflective area and other areas, thus obtaining more reliable three-dimensional measurement results. In addition, since the projected image is more uniform in space, the spatial position of the object to be detected is less affected during reconstruction. Compared with complex optical or structural designs, processing the projected image algorithmically is more cost-effective and simpler. Furthermore, this method is also applicable to situations where the camera has a high tilt angle.

[0059] Please refer to a method for increasing the uniformity of projection brightness in a projection device. Figure 2 ,include:

[0060] Step S200: Obtain the projection geometry parameters of the projection device.

[0061] For a micromirror on the projector, this micromirror is set to "on" while the other micromirrors are set to "off". The plane containing the object to be tested is projected onto the surface. In this embodiment, this plane is called the test plane. Then, a camera is used to acquire an image of the test plane, obtaining a surface image of the test plane. At this time, the obtained surface image only contains the projection field of view region formed by the micromirror on the test plane, which is a trapezoidal region. Then, a corner detection algorithm, such as the Harris corner detection algorithm, is used to detect corners on the obtained surface image to obtain the pixel coordinates of the four corners of the trapezoidal region. Based on the pixel coordinates of the four corners in the surface image, the camera's intrinsic and extrinsic parameter matrices, the spatial coordinates of these four corners are obtained. Then, the DLT algorithm, i.e., the direct linear transformation algorithm, is used to estimate the homography matrix based on the spatial coordinates of these four corners and the pixel coordinates of the micromirror, thereby establishing the correspondence between the micromirror and the projection field of view region formed on the test plane. At this time, by further combining the camera's intrinsic and extrinsic parameter matrices, the correspondence between the micromirror and the trapezoidal region in the surface image can be obtained.

[0062] For example, for any micromirror on a projector, the projected field of view formed by the micromirror in the surface image is a trapezoidal region. For the i-th corner point in this trapezoidal region, i = 1, 2, 3, 4, the pixel coordinates of the corner point are transformed to the world coordinate system according to the camera's intrinsic and extrinsic parameter matrices to obtain the spatial coordinates of the corner point:

[0063]

[0064] Among them, (x i ,y i Let be the pixel coordinates of the i-th corner point in the surface image; K is the intrinsic parameter matrix of the camera. -1 X is the inverse of the camera's intrinsic parameter matrix, and E is the camera's extrinsic parameter matrix; wi ,Y wi Z wi Let be the spatial coordinates of the i-th corner point;

[0065] The other corner points in the trapezoidal region are processed to obtain the spatial coordinates of the four corner points. In this embodiment, the coordinates of the upper left corner of each micromirror are directly determined by the row and column numbers, which are the pixel coordinates of the micromirror. The coordinates of the other three corners of the micromirror are represented by the pixel coordinates of the adjacent micromirrors. For example, for the micromirror in row u and column v, the pixel coordinates of the micromirror are (u, v), that is, the coordinates of the upper left corner of the micromirror are (u, v), the coordinates of the upper right corner of the micromirror are (u, v+1), the coordinates of the lower left corner are (u+1, v), and the coordinates of the lower right corner are (u+1, v). At this time, the four corners of the micromirror correspond one-to-one with the four corner points in the trapezoidal region. Then, the DLT algorithm is used to estimate the homography matrix H based on the spatial coordinates of the four corner points in the trapezoidal region and the pixel coordinates corresponding to the four corners of the micromirror. The resulting homography matrix is ​​a 3×3 matrix. Let the spatial coordinates of the corner point corresponding to the pixel coordinates of the current micromirror be (X, Y, Z), then the transformation relationship between the two can be expressed as:

[0066]

[0067] This allows us to establish a correspondence between any micromirror on the projector and the four corner points of the projected field of view in the surface image. The projection geometry parameters in this embodiment represent this correspondence. At this point, the four corner points of the projected field of view in the surface image can be obtained based on the pixel coordinates of any micromirror on the projector.

[0068] Step S210: Calculate the brightness compensation coefficient of each pixel of the image to be projected based on the projection geometry parameters of the projection device.

[0069] For any micromirror in the projector, the four corner points of the projection field of view of the corresponding trapezoid are obtained according to the obtained correspondence. Then, the two corner points corresponding to the lower base of the trapezoid are selected. That is, the corner points with the same x-coordinate among the four corner points of the projection field of view are divided into two groups, thus obtaining two groups of corner points. Each group contains two corner points. Then, the Euclidean distance between the two corner points in each group is calculated. The corner points with the largest Euclidean distance are taken as the two corner points corresponding to the lower base of the trapezoid. At this time, the two corner points have the same x-coordinate. In this embodiment, these two corner points are called the longer side corner points. It should be noted that in geometry, the lower base of a trapezoid refers to the longer of the two bases of the trapezoid.

[0070] The ratio between the x-coordinate of the long side corner point and the height of the corresponding micromirror of the pixel is calculated. The arctangent of the ratio is calculated, and the cosine of the arctangent is calculated. The fixed gain of the projector is obtained. The ratio between the fixed gain and the nth power of the cosine value is used as the theoretical brightness of the projection field of view. n can be 2, 3, 4, etc., and can be set according to actual needs.

[0071] Taking a typical scenario in a structured light system, namely a combination of two projectors and one camera, as an example, the positional diagram is as follows: Figure 3 As shown, let the plane being measured be P, and the center point of the projector be located at (x, h), where x is the Euclidean distance between the center point of the projector and the center point of the camera, and h is the height of the center point of the projector relative to the horizontal plane. Then, the horizontal distance within the projector's projection field of view is... The theoretical brightness at a given position can be expressed as k / cos n (θ), where k is the fixed gain of the projector, which is related to the projector's optical power and field of view.

[0072] For the e-th micromirror on the projector, by obtaining the two corner points corresponding to the bottom edge of the trapezoidal region corresponding to the micromirror, the theoretical brightness of the projected field of view region formed by the micromirror on the measured plane can be expressed as:

[0073]

[0074] Among them, L e h is the theoretical brightness of the projected field of view corresponding to the e-th micromirror. e Let b be the height of the e-th micromirror from the horizontal plane. e Let x be the x-coordinate of the corner point of the long side corresponding to the e-th micromirror; k is the fixed gain of the projector; cos() is the cosine function; arctan() is the arctangent function;

[0075] Since there is a one-to-one correspondence between the micromirrors on the projector and the pixels in the image to be projected, the theoretical brightness of the projection field of view corresponding to the e-th micromirror is also the theoretical brightness corresponding to the e-th pixel in the image to be projected.

[0076] Then, the reciprocal of the obtained theoretical brightness is used as the gain coefficient of the e-th micromirror, and the scale transformation coefficient is set to normalize the obtained gain coefficient. The gain coefficient of the e-th micromirror is mapped to the range of (0,1] through the scale transformation coefficient, and the normalization of the obtained gain coefficient is completed. The normalization result is the brightness compensation coefficient of the e-th micromirror, which is also the brightness compensation coefficient of the e-th pixel. The scale transformation coefficient can be set according to the actual situation.

[0077] Each pixel in the projected image is processed to obtain the theoretical brightness of the corresponding projection field of view for each pixel. This yields the brightness compensation coefficients for each pixel in the projected image. These brightness compensation coefficients constitute the brightness compensation image, such as... Figure 5 As shown.

[0078] Step S220: Perform brightness compensation on the image to be projected according to the brightness compensation coefficient of each pixel of the image to be projected, and obtain the brightness-compensated image to be projected.

[0079] Calculate the product between the grayscale value of each pixel in the projected image and its corresponding brightness compensation coefficient. Use this product as the brightness compensation result for each pixel. The brightness compensation results for all pixels constitute the brightness-compensated projected image, such as... Figure 6 As shown.

[0080] Step S230: Project the brightness-compensated image to be projected to obtain a measurement image, thereby obtaining the three-dimensional information of the object to be detected.

[0081] The brightness-compensated image to be projected is projected from the projector onto the object to be detected. Then, a camera is used to acquire an image of the object to be detected, and a measurement image is obtained. The obtained measurement image is then subjected to structured light demodulation and 3D reconstruction to obtain the true 3D information of the object to be detected.

[0082] Those skilled in the art will understand that all or part of the functions of the various methods in the above embodiments can be implemented by hardware or by computer programs. When all or part of the functions in the above embodiments are implemented by computer programs, the program can be stored in a computer-readable storage medium, which may include: read-only memory, random access memory, disk, optical disk, hard disk, etc., and the program is executed by a computer to achieve the above functions. For example, the program can be stored in the memory of a device, and when the program in the memory is executed by the processor, all or part of the above functions can be achieved. In addition, when all or part of the functions in the above embodiments are implemented by computer programs, the program can also be stored in a server, another computer, disk, optical disk, flash drive, or external hard drive, etc., and can be downloaded or copied to the memory of a local device, or the system of the local device can be updated. When the program in the memory is executed by the processor, all or part of the functions in the above embodiments can be achieved.

[0083] The above examples illustrate the present invention only to aid in understanding it and are not intended to limit the scope of the invention. Those skilled in the art can make various simple deductions, modifications, or substitutions based on the principles of this invention.

Claims

1. A three-dimensional measuring device, characterized in that, include: One or more projection devices are used to project an image containing a preset pattern onto an object to be detected; the projection device includes a plurality of micromirrors arranged in a matrix, each micromirror being used to project a pixel on the image to be projected; An image capturing component is used to capture an image of the object to be detected on which the preset pattern is projected, thereby obtaining a measurement image; An image processing unit is used to process the measured image to obtain the three-dimensional information of the object to be detected; as well as, Controller, used for: Obtain the projection geometry parameters of the projection device; The brightness compensation coefficient for each pixel of the image to be projected is calculated based on the projection geometry parameters of the projection device. Specifically, for any pixel in the image to be projected: the four corner points of the projection field of view corresponding to the pixel are obtained based on the projection geometry parameters of the projection device; the theoretical brightness of the projection field of view is obtained based on the coordinates of the four corner points and the height of the micromirror corresponding to the pixel; the reciprocal of the obtained theoretical brightness is used as the gain coefficient of the pixel; a scale transformation coefficient is obtained; the obtained gain coefficient is normalized based on the scale transformation coefficient; the normalized result is used as the brightness compensation coefficient of the pixel; brightness compensation is performed on the image to be projected based on the brightness compensation coefficient for each pixel to obtain the brightness-compensated image to be projected. The projection device is controlled to project the brightness-compensated image to be projected.

2. The three-dimensional measuring device as described in claim 1, characterized in that, The controller obtains the theoretical brightness of the projected field of view area based on the coordinates of the four corner points and the height of the micromirror corresponding to each pixel, including: The projection field of view is a trapezoidal region. The two corner points corresponding to the lower base of the trapezoidal region are called the long-side corner points. These two long-side corner points have the same x-coordinate. The ratio between the x-coordinate of the long-side corner point and the height of the micromirror corresponding to the pixel is calculated. The arctangent of this ratio is calculated, and the cosine of the arctangent is calculated. The fixed gain of the projector is then obtained. The fixed gain is then compared with the cosine value. n The ratio between powers is used as the theoretical brightness of the projected field of view.

3. The three-dimensional measuring device as described in claim 1, characterized in that, The controller performs brightness compensation on the image to be projected based on the brightness compensation coefficient of each pixel, to obtain the brightness-compensated image to be projected, including: Calculate the product between the gray value of each pixel and the corresponding brightness compensation coefficient, and use the resulting product as the brightness compensation result of each pixel. The brightness compensation results of all pixels constitute the brightness-compensated image to be projected.

4. The three-dimensional measuring device as described in claim 1, characterized in that, The image to be projected includes a phase-shifted image and / or a Gray code image.

5. A method for increasing the uniformity of projection brightness of a projection device, said method being applied to a three-dimensional measuring device as described in any one of claims 1 to 4, characterized in that, The method includes: Obtain the projection geometry parameters of the projection device; the projection device includes a matrix of micromirrors, each micromirror being used to project a pixel on the image to be projected; The brightness compensation coefficient for each pixel of the image to be projected is calculated based on the projection geometry parameters of the projection device. Specifically, for any pixel in the image to be projected: the four corner points of the projection field of view corresponding to the pixel are obtained based on the projection geometry parameters of the projection device; the theoretical brightness of the projection field of view is obtained based on the coordinates of the four corner points and the height of the micromirror corresponding to the pixel; the reciprocal of the obtained theoretical brightness is used as the gain coefficient of the pixel; a scale transformation coefficient is obtained; the obtained gain coefficient is normalized based on the scale transformation coefficient; the normalized result is used as the brightness compensation coefficient of the pixel; brightness compensation is performed on the image to be projected based on the brightness compensation coefficient for each pixel to obtain the brightness-compensated image to be projected. The brightness-compensated image to be projected is then projected.

6. The method as described in claim 5, characterized in that, The step of obtaining the theoretical brightness of the projected field of view area based on the coordinates of the four corner points and the height of the micromirror corresponding to the pixel includes: The projection field of view is a trapezoidal region. The two corner points corresponding to the lower base of the trapezoidal region are called the long-side corner points. These two long-side corner points have the same x-coordinate. The ratio between the x-coordinate of the long-side corner point and the height of the micromirror corresponding to the pixel is calculated. The arctangent of this ratio is calculated, and the cosine of the arctangent is calculated. The fixed gain of the projector is then obtained. The fixed gain is then compared with the cosine value. n The ratio between powers is used as the theoretical brightness of the projected field of view.

7. The method as described in claim 5, characterized in that, The step of performing brightness compensation on the image to be projected based on the brightness compensation coefficient of each pixel of the image to be projected, to obtain the brightness-compensated image to be projected, includes: Calculate the product between the gray value of each pixel and the corresponding brightness compensation coefficient, and use the resulting product as the brightness compensation result of each pixel. The brightness compensation results of all pixels constitute the brightness-compensated image to be projected.

8. A computer-readable storage medium, characterized in that, The medium stores a computer program that can be executed by a processor to implement the method as described in any one of claims 5-7.

Citation Information

Patent Citations

  • Surface structured light based dynamic detection and compensation method for highlight or too-dark area in 3D measurement

    CN107917679A

  • Self-detection optimization method and system for high-speed and high-precision structured light measurement system

    CN118548824A