Three-dimensional measurement equipment and method for improving uniformity of projection brightness
By calculating the projection geometry parameters and brightness compensation coefficient of the projection device, the problem of brightness non-uniformity of the projection device was solved, the accuracy and reliability of three-dimensional measurement were improved, the optical design was simplified and the cost was reduced.
Patent Information
- Application Number
- CN202411228030.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-03
- Publication Date
- 2025-01-10
- Estimated Expiration
- 2044-09-03
AI Technical Summary
The high tilt angle of the projection device causes uneven brightness between the projector and the plane where the object to be measured is located, which affects the accuracy of three-dimensional measurement.
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.
It improves the reliability of 3D measurement results, reduces the impact of light source attenuation on grayscale difference, reduces grayscale differences in local high reflectivity areas, simplifies optical design, and saves costs.
Smart Images

Figure CN119289898A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of structured light, and in particular to a three-dimensional measurement device and a method for increasing projection brightness uniformity. Background Art
[0002] With the development of various fields such as mold design, precision machining, product inspection, and industrial measurement, traditional two-dimensional image sensor technology is increasingly unable to meet the needs of production scenarios. The demand for three-dimensional measurement technology has been growing rapidly in recent years. Since three-dimensional measurement sensors have an additional dimension of depth information, and 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] At present, the mainstream 3D measurement sensors are divided into contact and non-contact types. The non-contact type often uses the known geometric relationship between multiple sensors to measure coordinates. It is more popular because of its advantages such as non-destructive and non-deformation. Among them, the surface structured light technology based on triangulation has gradually shown its potential for use.
[0004] In a structured light system, a combination of light source-DMD (Digital Micro-mirror Device)-projection lens is generally used. Among them, DLP (Digital Light Projector) technology is mainly used as the light source part of the structured light system due to its advantages such as high native contrast, miniaturization, closed optical path, high brightness, and good uniformity. However, due to the limitation of the mechanical structure position, the projector is often designed as a Sham off-axis structure, resulting in a high tilt angle between the projector and the plane where the object to be detected is located, which in turn affects the brightness uniformity of the light spot projected onto the object to be detected, that is, the brightness in the area close to the light source will be significantly higher than that in the area far away from the light source, resulting in deviations in the three-dimensional information obtained thereby.
[0005] Therefore, it is very important to design a method to improve the uniformity of the structured light reconstruction system. Summary of the invention
[0006] The main technical problem solved by the present invention is how to solve the problem of uneven brightness caused by the high tilt angle of the projection device.
[0007] According to a first aspect, an embodiment provides a three-dimensional measurement device, comprising:
[0008] One or more projection devices, wherein the projection devices are used to project an image to be projected containing a preset pattern onto the object to be detected;
[0009] An image capturing component, used for capturing the object to be detected with the preset pattern projected thereon to obtain a measurement image;
[0010] an image processing unit, used for processing the measurement image to obtain three-dimensional information of the object to be detected; and
[0011] Controller for:
[0012] Acquiring projection geometric parameters of the projection device;
[0013] Calculating a brightness compensation coefficient for each pixel of the image to be projected according to the projection geometric parameters of the projection device;
[0014] Performing brightness compensation on the image to be projected according to the brightness compensation coefficient of each pixel point of the image to be projected, so as to obtain the image to be projected after brightness compensation;
[0015] The projection device is controlled to project the image to be projected after brightness compensation.
[0016] According to a second aspect, an embodiment provides a method for increasing the uniformity of projection brightness of a projection device, comprising:
[0017] Acquiring projection geometric parameters of the projection device;
[0018] Calculating a brightness compensation coefficient for each pixel of the image to be projected according to the projection geometric parameters of the projection device;
[0019] Performing brightness compensation on the image to be projected according to the brightness compensation coefficient of each pixel point of the image to be projected, so as to obtain the image to be projected after brightness compensation;
[0020] The image to be projected after brightness compensation is projected.
[0021] According to the three-dimensional measurement device and the method for increasing the uniformity of projection brightness of the above-mentioned embodiment, by performing brightness compensation on the image to be projected at the projection end, the brightness of the stripe structure light finally projected onto the object to be detected is made more uniform. When the image capturing component is used for grayscale imaging, no further flat field correction is required. On the one hand, the influence of the grayscale difference caused by the attenuation factor of the light source itself can be effectively reduced, so that the grayscale change in the final measurement image can more truly reflect the change in the height of the object to be detected itself; on the other hand, for a local high-reflective object, when brightness compensation is not performed, if the local high-reflective area is close to the light source area, it will cause a higher grayscale difference between the area and other areas in the obtained measurement image, resulting in a large deviation in the three-dimensional information of the area after reconstruction, and brightness compensation can reduce the brightness of the area close to the light source, thereby reducing the grayscale difference between the high-reflective area and other areas, thereby obtaining a more reliable three-dimensional measurement result; in addition, since the projected image is more uniform in space, the spatial position of the object to be detected can be less affected when reconstructing, and compared with complex optical design or structural design, by performing algorithmic processing on the projected image, it can save costs and be simpler. BRIEF DESCRIPTION OF THE DRAWINGS
[0022] Figure 1 It is a structural schematic diagram of a three-dimensional measuring device;
[0023] Figure 2 A flow chart of a method for increasing the uniformity of projection brightness of a projection device;
[0024] Figure 3 Schematic diagram of the locations of different components of the structured light system;
[0025] Figure 4 The image to be projected before brightness compensation;
[0026] Figure 5 To compensate the image for brightness;
[0027] Figure 6 It is the image to be projected after brightness compensation. DETAILED DESCRIPTION
[0028] The present invention is further described in detail below by specific embodiments in conjunction with the accompanying drawings. Wherein similar elements in different embodiments adopt associated similar element numbers. In the following embodiments, many detailed descriptions are for making the present application better understood. However, those skilled in the art can easily recognize that some features can be omitted in different situations, or can be replaced by other elements, materials, methods. In some cases, some operations related to the present application are not shown or described in the specification, this is to avoid the core part of the present application being overwhelmed by too much description, and for those skilled in the art, it is not necessary to describe these related operations in detail, and they can fully understand the related operations according to the description in the specification and the general technical knowledge in the art.
[0029] In addition, the features, operations or characteristics described in the specification can be combined in any appropriate manner to form various implementations. At the same time, the steps or actions in the method description can also be interchanged or adjusted in a manner that is obvious to those skilled in the art. Therefore, the various sequences in the specification and the drawings are only for the purpose of clearly describing a certain embodiment and are not meant to be a required sequence, unless otherwise specified that a certain sequence must be followed.
[0030] The serial numbers of the components in this document, such as "first", "second", etc., are only used to distinguish the objects described and do not have any order or technical meaning. The "connection" and "coupling" mentioned in this application, unless otherwise specified, include direct and indirect connections (couplings).
[0031] In an embodiment of the present invention, a relationship between the theoretical brightness of each micromirror on the projection device and its corresponding projection field of view is established according to the structure and spatial relationship of the structured light system, and then a brightness compensation coefficient is obtained. The brightness of the projected image is compensated according to the brightness compensation coefficient, so that the grayscale difference in the measurement image captured by the camera can truly reflect the height information of the object to be detected, thereby improving the reliability of the three-dimensional measurement result.
[0032] In the structured light system, one or more projection devices 11 are used to alternately project an image to be projected containing a preset pattern onto the object to be detected. The projection device 11 used in this embodiment includes a micro-mirror array arranged in a matrix, each micro-mirror corresponds to a pixel point in the image to be projected, and is used to project a pixel point in the projection image onto the object to be detected, and form a projection field of view area on the surface of the object to be detected, and the projection field of view area is a trapezoidal area; after a single projection device 11 projects a projection image containing a preset pattern onto the object to be detected, an image capturing component 12 is used to capture an image of the object to be detected to obtain a measurement image of the object to be detected. The image capturing component 12 in this embodiment is a camera, and then the image processing unit 13 decodes the obtained measurement image according to the corresponding decoding algorithm to obtain a phase image, and then restores the phase value to the real three-dimensional coordinates of the object according to the pre-calibrated position parameters;
[0033] In this embodiment, since stripe coded structured light is one of the most commonly used three-dimensional measurement methods at present, and has the advantages of high accuracy, non-contact, high speed and high stability, its measurement principle is triangulation, that is, calculating the intersection of the light plane projected by the projector and the light corresponding to the camera pixel position to obtain the three-dimensional coordinates of the object to be measured; among them, there are many ways to encode the light plane, and the classic method is Gray code and / or sinusoidal phase shift, which has the advantages of high stability and high accuracy; therefore, this embodiment uses the phase shift image and / or Gray code image generated by stripe coded structured light as the initial image to be projected, that is, the image to be projected before brightness compensation, such as Figure 4 As shown, after the image to be projected is processed, it is projected onto the surface of the object to be detected;
[0034] In this process, due to the attenuation of light during propagation, the brightness of the area close to the light source on the object to be detected is higher, while the brightness of the area far from the light source is lower, that is, the grayscale difference in the measured image obtained by the camera is not entirely caused by the height change of the object to be detected itself, but is also affected by the attenuation of the light itself. Therefore, the brightness of the projected image can be compensated at the projection end according to the brightness of the projection field area corresponding to the single micromirror, so that the brightness projected on the object to be detected is more uniform, and then the grayscale information in the measured image can more accurately reflect the actual three-dimensional information of the object to be detected, thereby obtaining a more accurate and reliable three-dimensional measurement result. The specific process of using the controller 14 to perform brightness compensation on the projected image in this embodiment is as follows:
[0035] Step S100: obtaining projection geometric parameters of the projection device.
[0036] For one micromirror on the projector, the micromirror is set to the "on" state, and the other micromirrors are set to the "off" state, and the plane where the object to be detected is projected. In this embodiment, the plane is called the measured plane, and then the camera is used to collect images of the measured plane to obtain the surface image of the measured plane. At this time, the obtained surface image only contains the projection field of view area formed by the micromirror on the measured plane, that is, a trapezoidal area, and then a corner detection algorithm, such as the Harris corner detection algorithm, is used to perform corner detection on the obtained surface image to obtain the pixel coordinates of the four corner points of the trapezoidal area, and the spatial coordinates of the four corner points are obtained according to the pixel coordinates of the obtained four corner points in the surface image, the intrinsic parameter matrix and the extrinsic 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 spatial coordinates of the four corner points and the pixel coordinates of the micromirror, so as to establish the correspondence between the micromirror and the projection field of view area formed on the measured plane. At this time, the internal and external parameter matrices of the camera are further combined to obtain the correspondence between the micromirror and the trapezoidal area in the surface image;
[0037] For example, for any micromirror on the projector, the projection field of view formed by the micromirror in the surface image is a trapezoidal area. For the i-th corner point in the trapezoidal area, i=1, 2, 3, 4, the pixel coordinates of the corner point are converted to the world coordinate system according to the intrinsic parameter matrix and the extrinsic parameter matrix of the camera, and the spatial coordinates of the corner point are obtained, namely:
[0038]
[0039] Among them, (x i ,y i ) is the pixel coordinate of the i-th corner point in the surface image; K is the intrinsic parameter matrix of the camera, K -1 is the inverse matrix of the camera's intrinsic parameter matrix, and E is the camera's extrinsic parameter matrix; (X wi ,Y wi ,Z wi ) is the spatial coordinate of the i-th corner point;
[0040] The other corner points in the trapezoidal area 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 number and column number, that is, the pixel coordinates of the micromirror, and the coordinates of the other three corners of the micromirror are respectively represented by the pixel coordinates of the adjacent micromirrors. For example, for the micromirror in the uth row and the vth column, 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+1). At this time, the four corners of the micromirror correspond one-to-one to the four corner points in the trapezoidal area. Then, the DLT algorithm is used to estimate the homography matrix H according to the spatial coordinates of the four corner points in the trapezoidal area and the pixel coordinates corresponding to the four corners of the micromirror. The obtained homography matrix is a 3×3 matrix. Assuming that the spatial coordinates of the corner points corresponding to the pixel coordinates of the current micromirror are (X, Y, Z), the conversion relationship between the two can be expressed as:
[0041]
[0042] In this way, a correspondence can be established between any micromirror on the projector and the four corner points of the projection field of view in the surface image. The projection geometric parameters in this embodiment are the corresponding relationship. At this time, the four corner points of the projection field of view corresponding to any micromirror on the projector can be obtained according to the pixel coordinates of any micromirror on the projector.
[0043] Step S110: Calculating a brightness compensation coefficient for each pixel of the image to be projected according to the projection geometric parameters of the projection device.
[0044] 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 corresponding relationship, and two corner points corresponding to the lower base of the trapezoid area are selected, that is, the corner points with the same horizontal coordinates in the four corner points of the projection field of view 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 largest Euclidean distance is used as the two corner points corresponding to the lower base of the trapezoid area. The two corner points obtained at this time have the same horizontal coordinate. In this embodiment, these two corner points are called long-side corner points. It should be noted that in geometry, the lower base of the trapezoid refers to the longer base of the two bases of the trapezoid;
[0045] Calculate the ratio between the horizontal coordinate of the long side corner point and the height of the micromirror corresponding to the pixel point, calculate the arctangent value of the ratio, calculate the cosine value of the arctangent value, obtain the fixed gain of the projector, and use the ratio between the fixed gain and the nth power of the cosine value 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.
[0046] Take a typical scenario in a structured light system, i.e., a combination of two projectors and a camera, as an example. The schematic diagram of their positions is shown in the figure below. Figure 3 As shown, the measured plane is denoted as P, and the center point of the projector is 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 in the projection field of view of the projector is The theoretical brightness at the position can be expressed as k / cos n (θ), where k is the fixed gain of the projector, which is related to the optical power and field of view of the projector;
[0047] For the e-th micromirror on the projector, the two corner points corresponding to the lower base in the trapezoidal area corresponding to the micromirror are obtained, and the theoretical brightness of the projection field of view formed by the micromirror on the measured plane can be expressed as:
[0048]
[0049] Among them, L e is the theoretical brightness of the projection field of view corresponding to the e-th micromirror, h e is the height of the e-th micromirror from the horizontal plane, b e is the horizontal coordinate of the long side corner point corresponding to the e-th micromirror; k is the fixed gain of the projector; cos() is the cosine function; arctan() is the inverse tangent function;
[0050] Since the micromirrors on the projector correspond one to one with 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 inverse 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 to complete the normalization of the obtained gain coefficient. The normalized result is the brightness compensation coefficient of the e-th micromirror, that is, the brightness compensation coefficient of the e-th pixel point. The scale transformation coefficient can be set according to the actual situation.
[0052] Each pixel in the image to be projected is processed to obtain the theoretical brightness of the projection field of view corresponding to each pixel, and then the brightness compensation coefficient of each pixel in the image to be projected is obtained. The brightness compensation coefficients corresponding to all pixels constitute a brightness compensated image, such as Figure 5 shown.
[0053] Step S120: performing brightness compensation on the image to be projected according to the brightness compensation coefficient of each pixel of the image to be projected to obtain the image to be projected after brightness compensation.
[0054] Calculate the product of the gray value of each pixel in the projection image and the corresponding brightness compensation coefficient, and use the obtained product as the brightness compensation result of each pixel. The brightness compensation results of all pixels constitute the image to be projected after brightness compensation, such as Figure 6 shown.
[0055] Step S130: Projecting the image to be projected after brightness compensation to obtain a measurement image, and further obtaining three-dimensional information of the object to be detected.
[0056] The image to be projected after brightness compensation is projected from the projector onto the object to be detected, and then a camera is used to capture an image of the object to be detected to obtain a measurement image, which is processed by an image processing unit 13, that is, structured light demodulation and three-dimensional reconstruction are performed on the measurement image to obtain 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 a controller 14 to obtain projection geometric parameters of a projection device 11, thereby calculating a brightness compensation coefficient for each pixel of an image to be projected, and then performs brightness compensation on the image to be projected, and then projects the image to be projected after brightness compensation. After the projection is completed, the image capturing component 12 captures the object to be detected to obtain a measurement image, and finally the image processing unit 13 processes the obtained measurement image to obtain three-dimensional information of the object to be detected;
[0058] In this embodiment, by performing brightness compensation on the image to be projected at the projection end, the brightness of the stripe structure light finally projected onto the object to be detected is more uniform. When the image capturing component 12 is used for grayscale imaging, no further flat field correction is required. On the one hand, the influence of the grayscale difference caused by the attenuation factor of the light source itself can be effectively reduced, so that the grayscale change in the final measurement image can more truly reflect the change in the height of the object to be detected itself; on the other hand, for a local high-reflective object, if the local high-reflective area is close to the light source area, it will cause a higher grayscale difference between the area and other areas in the obtained measurement image, resulting in a large deviation in the three-dimensional information of the area after reconstruction, and the brightness compensation can reduce the brightness of the area close to the light source, thereby reducing the grayscale difference between the high-reflective area and other areas, so as to obtain a more reliable three-dimensional measurement result; in addition, since the projected image is more uniform in space, the spatial position of the object to be detected can be less affected during reconstruction, and compared with complex optical design or structural design, the algorithmic processing of the projected image can save costs and be simpler; in addition, this method is also applicable to the case where the camera has a high tilt angle.
[0059] A method for increasing the uniformity of projection brightness of a projection device is shown in Figure 2 ,include:
[0060] Step S200: Acquire projection geometric parameters of the projection device.
[0061] For one micromirror on the projector, the micromirror is set to the "on" state, and the other micromirrors are set to the "off" state, and the plane where the object to be detected is projected. In this embodiment, the plane is called the measured plane, and then the camera is used to collect images of the measured plane to obtain the surface image of the measured plane. At this time, the obtained surface image only contains the projection field of view area formed by the micromirror on the measured plane, that is, a trapezoidal area, and then a corner detection algorithm, such as the Harris corner detection algorithm, is used to perform corner detection on the obtained surface image to obtain the pixel coordinates of the four corner points of the trapezoidal area, and the spatial coordinates of the four corner points are obtained according to the pixel coordinates of the obtained four corner points in the surface image, the intrinsic parameter matrix and the extrinsic 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 spatial coordinates of the four corner points and the pixel coordinates of the micromirror, so as to establish the correspondence between the micromirror and the projection field of view area formed on the measured plane. At this time, the internal and external parameter matrices of the camera are further combined to obtain the correspondence between the micromirror and the trapezoidal area in the surface image;
[0062] For example, for any micromirror on the projector, the projection field of view formed by the micromirror in the surface image is a trapezoidal area. For the i-th corner point in the trapezoidal area, i=1, 2, 3, 4, the pixel coordinates of the corner point are converted to the world coordinate system according to the intrinsic parameter matrix and the extrinsic parameter matrix of the camera, and the spatial coordinates of the corner point are obtained, namely:
[0063]
[0064] Among them, (x i ,y i ) is the pixel coordinate of the i-th corner point in the surface image; K is the intrinsic parameter matrix of the camera, K -1 is the inverse matrix of the camera's intrinsic parameter matrix, and E is the camera's extrinsic parameter matrix; (X wi ,Y wi ,Z wi ) is the spatial coordinate of the i-th corner point;
[0065] The other corner points in the trapezoidal area 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 number and column number, that is, the pixel coordinates of the micromirror, and the coordinates of the other three corners of the micromirror are respectively represented by the pixel coordinates of the adjacent micromirrors. For example, for the micromirror in the uth row and the vth column, 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+1). At this time, the four corners of the micromirror correspond one-to-one to the four corner points in the trapezoidal area. Then, the DLT algorithm is used to estimate the homography matrix H according to the spatial coordinates of the four corner points in the trapezoidal area and the pixel coordinates corresponding to the four corners of the micromirror. The obtained homography matrix is a 3×3 matrix. Assuming that the spatial coordinates of the corner points corresponding to the pixel coordinates of the current micromirror are (X, Y, Z), the conversion relationship between the two can be expressed as:
[0066]
[0067] In this way, a correspondence can be established between any micromirror on the projector and the four corner points of the projection field of view in the surface image. The projection geometric parameters in this embodiment are the corresponding relationship. At this time, the four corner points of the projection field of view corresponding to any micromirror on the projector can be obtained according to 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 according to the projection geometric 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 corresponding relationship, and two corner points corresponding to the lower base of the trapezoid area are selected, that is, the corner points with the same horizontal coordinates in the four corner points of the projection field of view 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 largest Euclidean distance is used as the two corner points corresponding to the lower base of the trapezoid area. The two corner points obtained at this time have the same horizontal coordinate. In this embodiment, these two corner points are called long-side corner points. It should be noted that in geometry, the lower base of the trapezoid refers to the longer base of the two bases of the trapezoid;
[0070] Calculate the ratio between the horizontal coordinate of the long side corner point and the height of the micromirror corresponding to the pixel point, calculate the arctangent value of the ratio, calculate the cosine value of the arctangent value, obtain the fixed gain of the projector, and use the ratio between the fixed gain and the nth power of the cosine value 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] Take a typical scenario in a structured light system, i.e., a combination of two projectors and a camera, as an example. The schematic diagram of their positions is shown in the figure below. Figure 3 As shown, the measured plane is denoted as P, and the center point of the projector is 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 in the projection field of view of the projector is The theoretical brightness at the position can be expressed as k / cos n (θ), where k is the fixed gain of the projector, which is related to the optical power and field of view of the projector;
[0072] For the e-th micromirror on the projector, the two corner points corresponding to the lower base in the trapezoidal area corresponding to the micromirror are obtained, and the theoretical brightness of the projection field of view formed by the micromirror on the measured plane can be expressed as:
[0073]
[0074] Among them, L e is the theoretical brightness of the projection field of view corresponding to the e-th micromirror, h e is the height of the e-th micromirror from the horizontal plane, b e is the horizontal coordinate of the long side corner point corresponding to the e-th micromirror; k is the fixed gain of the projector; cos() is the cosine function; arctan() is the inverse tangent function;
[0075] Since the micromirrors on the projector correspond one to one with 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 inverse 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 to complete the normalization of the obtained gain coefficient. The normalized result is the brightness compensation coefficient of the e-th micromirror, that is, the brightness compensation coefficient of the e-th pixel point. The scale transformation coefficient can be set according to the actual situation.
[0077] Each pixel in the image to be projected is processed to obtain the theoretical brightness of the projection field of view corresponding to each pixel, and then the brightness compensation coefficient of each pixel in the image to be projected is obtained. The brightness compensation coefficient corresponding to each pixel constitutes a brightness compensated image, such as Figure 5 shown.
[0078] Step S220: performing brightness compensation on the image to be projected according to the brightness compensation coefficient of each pixel point of the image to be projected to obtain the image to be projected after brightness compensation.
[0079] Calculate the product of the gray value of each pixel in the projection image and the corresponding brightness compensation coefficient, and use the obtained product as the brightness compensation result of each pixel. The brightness compensation results of all pixels constitute the image to be projected after brightness compensation, such as Figure 6 shown.
[0080] Step S230: Projecting the image to be projected after brightness compensation to obtain a measurement image, and further obtaining three-dimensional information of the object to be detected.
[0081] The image to be projected after brightness compensation is projected from the projector onto the object to be detected, and then the camera is used to capture the image of the object to be detected to obtain a measurement image, which is then subjected to structured light demodulation and three-dimensional reconstruction to obtain the true three-dimensional information of the object to be detected.
[0082] Those skilled in the art will appreciate that all or part of the functions of the various methods in the above-mentioned embodiments can be implemented by hardware or by computer programs. When all or part of the functions in the above-mentioned embodiments are implemented by computer programs, the program can be stored in a computer-readable storage medium, and the storage medium can include: read-only memory, random access memory, disk, optical disk, hard disk, etc., and the program is executed by a computer to implement the above-mentioned functions. For example, the program is stored in the memory of the device, and when the program in the memory is executed by the processor, all or part of the above-mentioned functions can be implemented. In addition, when all or part of the functions in the above-mentioned embodiments are implemented by computer programs, the program can also be stored in a storage medium such as a server, another computer, disk, optical disk, flash disk or mobile hard disk, and can be downloaded or copied and saved in the memory of the local device, or the system of the local device is updated, and when the program in the memory is executed by the processor, all or part of the functions in the above-mentioned embodiments can be implemented.
[0083] The above specific examples are used to illustrate the present invention, which is only used to help understand the present invention and is not intended to limit the present invention. For those skilled in the art, according to the concept of the present invention, some simple deductions, modifications or substitutions can be made.
Claims
1. A three-dimensional measuring device, characterized in that: include: One or more projection devices, wherein the projection devices are used to project an image to be projected including a preset pattern onto the object to be detected; An image capturing component, used for capturing the object to be detected with the preset pattern projected thereon to obtain a measurement image; An image processing unit, used for processing the measurement image to obtain three-dimensional information of the object to be detected; as well as, Controller for: Acquiring projection geometric parameters of the projection device; Calculating a brightness compensation coefficient for each pixel of the image to be projected according to the projection geometric parameters of the projection device; Performing brightness compensation on the image to be projected according to the brightness compensation coefficient of each pixel point of the image to be projected, so as to obtain the image to be projected after brightness compensation; The projection device is controlled to project the image to be projected after brightness compensation.
2. The three-dimensional measuring device according to claim 1, characterized in that: The projection device comprises a plurality of micromirrors arranged in a matrix, each micromirror being used to project a pixel point on the image to be projected; The controller calculates the brightness compensation coefficient of each pixel point of the image to be projected according to the projection geometric parameters of the projection device, including: For any pixel point in the image to be projected, four corner points of a projection field of view corresponding to the pixel point are obtained according to the projection geometric parameters of the projection device, and the theoretical brightness of the projection field of view is obtained according to the coordinates of the four corner points and the height of the micromirror corresponding to the pixel point; The inverse of the obtained theoretical brightness is used as the gain coefficient of the pixel point, a scale transformation coefficient is obtained, the obtained gain coefficient is normalized according to the scale transformation coefficient, and the normalized result is used as the brightness compensation coefficient of the pixel point.
3. The three-dimensional measuring device according to claim 2, characterized in that: The controller obtains the theoretical brightness of the projection field of view area according to the coordinates of the four corner points and the height of the micromirror corresponding to the pixel point, including: The projection field of view area is a trapezoidal area. Among the four corner points, the two corner points corresponding to the lower base of the trapezoidal area are called long side corner points. The two long side corner points have the same horizontal coordinate. The ratio between the horizontal coordinate of the long side corner point and the height of the micromirror corresponding to the pixel point is calculated. The arc tangent value of the ratio is calculated. The cosine value of the arc tangent value is calculated. The fixed gain of the projector is obtained. The ratio between the fixed gain and the nth power of the obtained cosine value is used as the theoretical brightness of the projection field of view area.
4. The three-dimensional measuring device according to claim 1, characterized in that: The controller performs brightness compensation on the image to be projected according to the brightness compensation coefficient of each pixel point of the image to be projected to obtain the image to be projected after brightness compensation, including: The product between the gray value of each pixel and the corresponding brightness compensation coefficient is calculated, and the obtained product is used as the brightness compensation result of each pixel. The brightness compensation results of all pixels constitute the image to be projected after brightness compensation.
5. The three-dimensional measuring device according to claim 1, characterized in that: The image to be projected includes a phase-shift image and / or a Gray code image.
6. A method for increasing the uniformity of projection brightness of a projection device, characterized in that: The method comprises: Acquiring projection geometric parameters of the projection device; Calculating a brightness compensation coefficient for each pixel of the image to be projected according to the projection geometric parameters of the projection device; Performing brightness compensation on the image to be projected according to the brightness compensation coefficient of each pixel point of the image to be projected, so as to obtain the image to be projected after brightness compensation; The image to be projected after brightness compensation is projected.
7. The method according to claim 6, characterized in that The projection device includes a plurality of micromirrors arranged in a matrix, each micromirror is used to project a pixel point on the image to be projected; the brightness compensation coefficient of each pixel point of the image to be projected is calculated according to the projection geometric parameters of the projection device, including: For any pixel point in the image to be projected, four corner points of the projection field of view corresponding to the pixel point are obtained according to the projection geometric parameters of the projection device, and the theoretical brightness of the projection field of view area is obtained according to the coordinates of the four corner points and the height of the micromirror corresponding to the pixel point; the inverse of the obtained theoretical brightness is used as the gain coefficient of the pixel point, the scale transformation coefficient is obtained, the obtained gain coefficient is normalized according to the scale transformation coefficient, and the normalized result is used as the brightness compensation coefficient of the pixel point.
8. The method according to claim 7, characterized in that The method of obtaining the theoretical brightness of the projection field of view area according to the coordinates of the four corner points and the height of the micromirror corresponding to the pixel point includes: The projection field of view area is a trapezoidal area. Among the four corner points, the two corner points corresponding to the lower base of the trapezoidal area are called long side corner points. The two long side corner points have the same horizontal coordinate. The ratio between the horizontal coordinate of the long side corner point and the height of the micromirror corresponding to the pixel point is calculated. The arc tangent value of the ratio is calculated. The cosine value of the arc tangent value is calculated. The fixed gain of the projector is obtained. The ratio between the fixed gain and the nth power of the obtained cosine value is used as the theoretical brightness of the projection field of view area.
9. The method according to claim 6, characterized in that The step of performing brightness compensation on the image to be projected according to the brightness compensation coefficient of each pixel of the image to be projected to obtain the image to be projected after brightness compensation comprises: The product between the gray value of each pixel and the corresponding brightness compensation coefficient is calculated, and the obtained product is used as the brightness compensation result of each pixel. The brightness compensation results of all pixels constitute the image to be projected after brightness compensation.
10. A computer-readable storage medium, characterized in that: A computer program is stored on the medium, and the computer program can be executed by a processor to implement the method according to any one of claims 6 to 9.
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
Information processing apparatus, information processing method, and non-transitory computer-readable storage medium
US20180336691A1
Cited By
Three-dimensional measurement device, and method for improving projection brightness uniformity
WO2026026978A1