Method, apparatus, device, medium and camera for improving unevenness of light intensity of a stripe
By taking multiple calibration points in the structured light depth camera, obtaining grayscale values, and adjusting the angular velocity of the galvanometer rotation in segments, the problem of uneven brightness of the grating stripes was solved, and the accuracy of image processing and analysis was improved.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- MECH MIND ROBOTICS TECH LTD
- Filing Date
- 2021-11-10
- Publication Date
- 2026-05-29
AI Technical Summary
In existing structured light depth cameras, inconsistent ambient light and reflectivity lead to uneven brightness of grating fringes, affecting image processing and analysis results.
By taking multiple calibration points on the grating projection camera to obtain grayscale values, calculating the maximum and minimum values using cosine curves, and adjusting the rotational angular velocity of the galvanometer piecewise, the brightness of the grating stripes is made uniform.
This achieves uniformity in the brightness of the grating stripes, improving the accuracy of image processing and analysis.
Smart Images

Figure CN116109492B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of optical camera technology, and more particularly to a method for improving the uniformity of light intensity in grating fringes of a structured light depth camera, specifically to a method, apparatus, device, medium, and camera for improving the uniformity of light intensity in grating fringes. Background Technology
[0002] Structured light depth cameras are widely used in 3D scanning, motion-sensing interaction, and gesture recognition due to their stable performance and low cost.
[0003] In realizing the concept of this invention, the inventors discovered that existing structured light cameras have at least the following problems: Inconsistent ambient light and reflectivity can lead to uneven brightness of the light stripes on the projection surface. Specifically, this unevenness manifests as the brightness of the brightest part of the grating stripes being 3 to 4 times that of the darkest part. Of this unevenness, 30% to 40% is due to the non-constant movement of the grating stripes, while the remaining unevenness is due to the influence of ambient light and the inconsistent reflectivity of the galvanometer reflecting laser light at different angles. This unevenness directly causes uneven brightness of the grating stripes acquired by the image sensor, directly affecting subsequent image processing and analysis results.
[0004] Therefore, those skilled in the art urgently need to develop a method to improve the unevenness of stripe light intensity in order to solve the above-mentioned technical problems. Summary of the Invention
[0005] In view of this, the technical problem to be solved by the present invention is to provide a method, device, equipment, medium and camera for improving the unevenness of stripe light intensity, which solves the problem that the uneven stripe brightness generated on the projection surface by the constant angular velocity rotation of the galvanometer of the existing structured light depth camera directly affects the subsequent image processing and analysis results.
[0006] To address the aforementioned technical problems, a specific embodiment of the present invention provides a method for improving uneven stripe intensity, comprising: forming grating stripes on a projection surface using a grating projection camera; taking multiple calibration points along a straight line perpendicular to the grating stripes, wherein the number of calibration points is greater than the number of grating stripes; acquiring the grayscale value of each calibration point; and adjusting the rotational angular velocity of the galvanometer of the grating projection camera segmentally based on the grayscale value.
[0007] According to an embodiment of the present invention, taking multiple calibration points along a straight line perpendicular to the grating stripes includes: uniformly or randomly selecting multiple calibration points along a straight line perpendicular to the grating stripes, wherein the number of calibration points is more than three times the number of grating stripes.
[0008] According to an embodiment of the present invention, after obtaining the gray value of each calibration point, the method for improving the non-uniformity of stripe intensity further includes calculating the maximum and minimum values of the gray value of each calibration point using a cosine curve.
[0009] According to an embodiment of the present invention, adjusting the rotational angular velocity of the galvanometer of the grating projection camera in segments based on the grayscale value includes: calculating the modulation intensity value corresponding to each calibration point based on the maximum and minimum values; clustering all the modulation intensity values to obtain a plurality of cluster center values; and adjusting the rotational angular velocity of the galvanometer of the grating projection camera in segments based on the plurality of cluster center values.
[0010] According to an embodiment of the present invention, before calculating the modulation intensity value corresponding to each calibration point based on the maximum value and the minimum value, adjusting the rotational angular velocity of the galvanometer of the grating projection camera segmentally based on the grayscale value further includes: removing invalid values from the maximum value using the theoretical maximum value; and removing invalid values from the minimum value using the theoretical minimum value.
[0011] According to an embodiment of the present invention, adjusting the rotational angular velocity of the galvanometer of the grating projection camera in segments based on a plurality of cluster center values includes: finding the smallest cluster center value from the plurality of cluster center values as a reference cluster center value; calculating the ratio of all the cluster center values to the reference cluster center value; and adjusting the rotational angular velocity of the galvanometer of the grating projection camera according to the ratio.
[0012] According to an embodiment of the present invention, adjusting the rotational angular velocity of the galvanometer of the grating projection camera according to the ratio includes: normalizing the ratio to obtain a normalized ratio; dividing the rotation range of the galvanometer of the grating projection camera into rotation intervals corresponding to the normalized ratio according to the normalized ratio, wherein the rotation range is composed of the rotation intervals; and adjusting the rotational angular velocity of the galvanometer of the grating projection camera in each rotation interval according to the normalized ratio.
[0013] A specific embodiment of the present invention also provides a structured light depth camera, comprising: one or more processors; and a storage device for storing executable instructions, wherein the executable instructions, when executed by the processor, implement a method for improving stripe light intensity non-uniformity.
[0014] A specific embodiment of the present invention also provides a laser camera, comprising: one or more processors; and a storage device for storing executable instructions, wherein the executable instructions, when executed by the processor, implement a method for improving the non-uniformity of stripe light intensity.
[0015] A specific embodiment of the present invention also provides an electronic device, comprising: one or more processors; and a storage device for storing executable instructions, wherein the executable instructions, when executed by the processor, implement a method for improving the non-uniformity of stripe light intensity.
[0016] A further embodiment of the present invention provides a computer-readable storage medium having executable instructions stored thereon, which, when executed by a processor, implement a method for improving the non-uniformity of stripe light intensity.
[0017] A specific embodiment of the present invention also provides a computer program, which includes computer-executable instructions that, when executed, are used to implement a method for improving the non-uniformity of stripe light intensity.
[0018] In an optional embodiment of the present invention, the rotational angular velocity of the galvanometer is adjusted in segments to compensate for areas with darker grating stripe brightness, thereby making the grating stripe brightness on the projection surface uniform. This can at least partially solve the problem that the grating stripe brightness generated on the projection surface is uneven due to the constant angular velocity rotation of the galvanometer in existing structured light depth cameras (i.e., grating projection cameras), which directly affects the subsequent image processing and analysis results. Therefore, it can achieve the technical effect of uniform grating stripe brightness generated on the projection surface and improve the accuracy of image processing and analysis results.
[0019] It should be understood that the above general description and the following specific embodiments are merely exemplary and illustrative, and do not limit the scope of the invention. Attached Figure Description
[0020] The accompanying drawings, which are part of the specification of this invention, illustrate exemplary embodiments of the invention. The drawings, together with the description in the specification, serve to illustrate the principles of the invention.
[0021] Figure 1 This is a structural schematic diagram of a structured light depth camera provided for a specific embodiment of the present invention.
[0022] Figure 2 A schematic flowchart illustrating a method for improving uneven stripe intensity provided in a specific embodiment of the present invention.
[0023] Figure 3 This is a schematic flowchart illustrating a method for improving uneven stripe intensity, as provided in another embodiment of the present invention.
[0024] Figure 4 This is a schematic flowchart illustrating how to adjust the rotational angular velocity of a galvanometer in segments based on grayscale values, as provided in a specific embodiment of the present invention.
[0025] Figure 5This is a schematic flowchart illustrating how the rotational angular velocity of a galvanometer is adjusted in segments based on grayscale values, as provided in another embodiment of the present invention.
[0026] Figure 6 This is a schematic flowchart illustrating how to adjust the rotational angular velocity of a galvanometer in segments based on multiple cluster center values, as provided in a specific embodiment of the present invention.
[0027] Figure 7 This is a schematic flowchart illustrating how to adjust the rotational angular velocity of a galvanometer in segments according to a ratio, as provided in a specific embodiment of the present invention.
[0028] Figure 8 This is a structural schematic diagram of a grating projection camera provided for a specific embodiment of the present invention.
[0029] Figure 9 This is a schematic diagram illustrating how to obtain multiple calibration points of grating fringes on a projection surface, as provided in a specific embodiment of the present invention.
[0030] Figure 10 This is a schematic diagram of multiple calibration point grayscale values provided for a specific embodiment of the present invention.
[0031] Figure 11 To calculate using cosine curves Figure 10 A schematic diagram of the maximum and minimum gray values of multiple calibration points.
[0032] Figure 12A To Figure 11 A schematic diagram showing the modulation intensity values corresponding to multiple calibration points after filtering the maximum and minimum values.
[0033] Figure 12B Incorrect Figure 11 The maximum and minimum values in the data are filtered out, and a schematic diagram of the modulation intensity values corresponding to multiple calibration points is shown.
[0034] Figure 13A To Figure 12A A schematic diagram showing the clustering of modulation intensity values to obtain multiple cluster center values.
[0035] Figure 13B To Figure 12B A schematic diagram showing the clustering of modulation intensity values to obtain multiple cluster center values.
[0036] Figure 14A According to Figure 13A The obtained ratios are used to adjust the rotational angular velocity of the galvanometer in segments, resulting in a schematic diagram of grayscale values at multiple calibration points.
[0037] Figure 14B According to Figure 13B The obtained ratios are used to adjust the rotational angular velocity of the galvanometer in segments, resulting in a schematic diagram of grayscale values at multiple calibration points.
[0038] Explanation of reference numerals in the attached figures:
[0039] 1. Laser 2. Powell lens
[0040] 3. Galvanometer; 4. Image sensor
[0041] 5 Image Processors 10 Laser Emitters
[0042] 20 Lenses
[0043] 40 Image Acquisition Device
[0044] 60 drive motor Detailed Implementation
[0045] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the spirit of the contents disclosed in the present invention will be clearly explained below with reference to the accompanying drawings and detailed description. After understanding the embodiments of the present invention, any person skilled in the art can make changes and modifications based on the technology taught in the present invention without departing from the spirit and scope of the present invention.
[0046] The illustrative embodiments and descriptions of the present invention are used to explain the invention, but are not intended to limit the invention. Furthermore, elements / components using the same or similar reference numerals in the drawings and embodiments are used to represent the same or similar parts.
[0047] The terms "first," "second," etc., used in this document are not intended to specifically refer to order or sequence, nor are they intended to limit the invention. They are merely used to distinguish elements or operations described using the same technical terms.
[0048] The directional terms used in this article, such as up, down, left, right, front, or back, are for reference only when referring to the accompanying drawings. Therefore, the use of directional terms is for illustrative purposes and not to limit this work.
[0049] The terms “include,” “including,” “have,” “contain,” etc., used in this article are all open-ended terms, meaning that they include but are not limited to.
[0050] The term "and / or" as used herein includes any or all of the things mentioned.
[0051] The term "multiple" in this article includes "two" and "more than two"; the term "multiple groups" in this article includes "two groups" and "more than two groups".
[0052] The terms "approximately," "about," etc., used herein are intended to modify any quantity or error that may vary slightly, but these slight variations or errors do not change the essence of the quantity or error. Generally, the range of slight variations or errors modified by such terms may be 20% in some embodiments, 10% in others, 5% in still others, or other values. Those skilled in the art should understand that the aforementioned values can be adjusted according to actual needs and are not limited thereto.
[0053] Figure 1 This is a schematic diagram of a structured light depth camera provided for a specific embodiment of the present invention.
[0054] In optional embodiments of the present invention, such as Figure 1 As shown, the main components of a structured light depth camera include a laser 1, a Powell lens 2, a galvanometer 3, an image sensor 4, and an image processor 5. The laser emits laser points, the Powell lens converts the laser points into linear light, and the galvanometer reflects the linear light. Due to the periodic switching of the laser, as the galvanometer rotates at a constant angular velocity, the linear light reflected by the galvanometer can form alternating bright and dark grating stripes on the projection surface of objects, the ground, or walls. The image sensor acquires the grating stripe image of the projection surface, and the image processor analyzes the grating stripe image acquired by the image sensor.
[0055] When a galvanometer reflects linear light, if the angular velocity of the galvanometer is constant and the laser is periodically switched on and off, the linear light reflected by the galvanometer can form alternating bright and dark stripes on the projection surface. For grating stripes, since the distance between different points on the projection surface and the galvanometer is different, the farther away from the galvanometer on the projection surface, the faster the grating stripes move and the lower the exposure, resulting in uneven brightness of the grating stripes on the projection surface.
[0056] Figure 2 A schematic flowchart illustrating a method for improving uneven stripe intensity provided in a specific embodiment of the present invention.
[0057] like Figure 2 As shown, in an optional embodiment of the present invention, a method for improving stripe intensity non-uniformity may include the following operations S201~S204.
[0058] In operation S201: The grating projection camera forms grating stripes on the projection surface.
[0059] In an optional embodiment of the present invention, operation S201 may include the following operation: uniformly or randomly selecting a plurality of calibration points along a straight line perpendicular to the grating stripes, wherein the number of calibration points is more than three times the number of grating stripes.
[0060] Optionally, there are no obstacles between the grating projection camera and the projection surface, and the projection surface is a plane with no objects on it. Therefore, the reflectivity of the projection surface can be considered uniform, and the influence of the reflectivity of the projection surface on the brightness of the grating fringes can be largely ignored. Multiple calibration points can be selected within a 3×3 window area.
[0061] Next, in operation S202: take multiple calibration points along a straight line perpendicular to the grating stripes, wherein the number of calibration points is greater than the number of grating stripes.
[0062] In an optional embodiment of the present invention, the number of calibration points is more than three times the number of grating stripes. For example, the number of calibration points is three, four, or five times the number of grating stripes, which ensures that each grating stripe has a calibration point. The more calibration points there are, the more accurate the result, but the greater the amount of data computation; the fewer calibration points there are, the less accurate the result, but the smaller the amount of computation.
[0063] Then, in operation S203: obtain the grayscale value of each of the calibration points.
[0064] In an optional embodiment of the present invention, grayscale value This can be expressed using the following formula:
[0065]
[0066] In the above, This represents the grayscale value of the calibration point; This indicates the ambient light intensity corresponding to the calibration point; This indicates the modulated light intensity corresponding to the calibration point. The modulated light intensity is the light intensity of the laser emitted by the grating projection camera at the calibration point after being reflected by the grating mirror and projected onto the projection surface after adjusting the rotation angular velocity of the grating projection camera's mirror. This represents the phase field of the modulation mirror.
[0067] When adjusting the rotational angular velocity of the galvanometer of the grating projection camera, When the value equals 1, the gray value of the calibration point is the largest; When the value is 0, the gray value of the calibration point is the smallest.
[0068] Secondly, in operation S204: adjust the rotational angular velocity of the galvanometer of the grating projection camera in segments according to the grayscale value.
[0069] In optional embodiments of the present invention, due to factors such as ambient light intensity, the varying reflectivity of the laser reflected by the galvanometer due to different angles between the laser emitted by the grating projection camera and the galvanometer, and the varying exposure of the laser reflected by the galvanometer on the projection surface due to different distances between the galvanometer and the projection surface, the brightness of different grating fringes varies, i.e., the grayscale values of the calibration points differ. This directly affects the subsequent image processing and image recognition results. Generally, the greater the distance between the galvanometer and the projection surface, the faster the grating fringes move on the projection surface, and the smaller the exposure of the laser reflected by the galvanometer on the projection surface; conversely, the smaller the distance between the galvanometer and the projection surface, the slower the grating fringes move on the projection surface, and the greater the exposure of the laser reflected by the galvanometer on the projection surface.
[0070] In an optional embodiment of the present invention, adjusting the rotational angular velocity of the galvanometer of the grating projection camera in segments according to the grayscale value can make the brightness of the grating stripes on the projection surface relatively uniform, so that the grayscale values of the calibrated points are relatively consistent, thereby improving the accuracy of subsequent image recognition results.
[0071] Figures 3-7 Yes Figure 2 For further explanation, please refer to the following. Figures 3-7 The method for improving the uneven intensity of striped light is described in detail.
[0072] Figure 3 This is a schematic flowchart illustrating a method for improving uneven stripe intensity, as provided in another embodiment of the present invention.
[0073] After obtaining the grayscale value of each calibration point in operation S203, the method for improving stripe intensity non-uniformity may further include the following operation S203-1.
[0074] In operation S203-1: use the cosine curve to calculate the maximum and minimum gray values of each calibration point.
[0075] In an optional embodiment of the present invention, the maximum and minimum gray values of each calibration point can be calculated using a cosine curve. When the cosine value is equal to 1, the gray value of the calibration point is the maximum; when the cosine value is equal to 0, the gray value of the calibration point is the minimum.
[0076] Figure 4 This is a schematic flowchart illustrating how to adjust the rotational angular velocity of a galvanometer in segments based on grayscale values, as provided in a specific embodiment of the present invention.
[0077] like Figure 4 As shown, in an optional embodiment of the present invention, operation S204, which adjusts the rotational angular velocity of the galvanometer of the grating projection camera in segments according to the grayscale value, may include the following operations:
[0078] In operation S2041: Calculate the modulation intensity value corresponding to each calibration point based on the maximum and minimum values.
[0079] In an optional embodiment of the present invention, a calibration point corresponding to the minimum value closest to each maximum value is found in the horizontal direction (X-axis direction), the minimum value is used as the background light intensity of the calibration point corresponding to the maximum value, and the difference between the maximum value and the minimum value is used to obtain the modulation intensity value of the calibration point corresponding to the maximum value.
[0080] In an optional embodiment of the present invention, grayscale value This can be expressed using the following formula:
[0081]
[0082] In the above, This represents the grayscale value of the calibration point; This indicates the ambient light intensity corresponding to the calibration point; This indicates the modulated light intensity corresponding to the calibration point. The modulated light intensity is the light intensity of the laser emitted by the grating projection camera at the calibration point after being reflected by the grating mirror and projected onto the projection surface after adjusting the rotation angular velocity of the grating projection camera's mirror. This represents the phase field of the modulation mirror.
[0083] When adjusting the rotational angular velocity of the galvanometer of the grating projection camera, When the value equals 1, the gray value of the calibration point is at its maximum, which can be expressed as: ; When the value is 0, the gray value of the calibration point is at its minimum, which can be expressed as: Maximum grayscale value With minimum gray value By subtracting the values, we can obtain the modulation intensity value of the calibration point corresponding to the maximum value. .
[0084] Next, in operation S2042: cluster all the modulation intensity values to obtain multiple cluster center values.
[0085] In an optional embodiment of the present invention, the entire rotation period of the galvanometer of the grating projection camera is adjusted in segments. Therefore, multiple cluster center values can be obtained by clustering all modulation intensity values. Then, the entire rotation period of the galvanometer can be divided into multiple segments using the multiple cluster center values.
[0086] Then, in operation S2043: the rotational angular velocity of the galvanometer of the grating projection camera is adjusted piecewise according to the multiple cluster center values.
[0087] In an optional embodiment of the present invention, the ratio between the cluster center values can be calculated, for example, the following ratios can be obtained: 1:1.412251778:2.543979698:4.643095647:9.454755853:23.4681388
[0089] In an optional embodiment of the present invention, the rotational angular velocity of the galvanometer of the grating projection camera can be adjusted according to the above ratio at different rotation stages of the galvanometer. For example, in the first rotation stage of the galvanometer, the rotational angular velocity of the galvanometer is... Therefore, during the second rotation phase of the galvanometer, the angular velocity of the galvanometer is 1.412251778. During the third rotation phase of the galvanometer, the angular velocity of the galvanometer is 2.543979698. In the fourth rotation phase of the galvanometer, the rotational angular velocity of the galvanometer is 4.643095647. In the fifth rotation phase of the galvanometer, the rotational angular velocity of the galvanometer is 9.454755853. In the sixth rotation phase of the galvanometer, the rotational angular velocity of the galvanometer is 23.4681388. .
[0090] In an optional embodiment of the present invention, adjusting the rotational angular velocity of the galvanometer of the grating projection camera at different rotation stages according to the above ratio can accurately improve the non-uniformity of the stripe light intensity, laying a good foundation for subsequent image recognition and analysis.
[0091] Figure 5 This is a schematic flowchart illustrating how the rotational angular velocity of a galvanometer is adjusted in segments based on grayscale values, as provided in another embodiment of the present invention.
[0092] like Figure 5 As shown, before operation S2041 calculates the modulation intensity value corresponding to each calibration point based on the maximum and minimum values, operation S204 adjusts the rotation angular velocity of the grating projection camera's galvanometer in segments based on the grayscale value, and may also include the following operations S2041-1 to S2041-2.
[0093] In operation S2041-1: Use the theoretical maximum to remove invalid values from the maximum.
[0094] In an optional embodiment of the present invention, the theoretical maximum value can be determined to be 11. If the value in the maximum value is less than 11, it can be removed.
[0095] Next, in operation S2041-2: use the theoretical minimum to remove invalid values from the minimum.
[0096] In an optional embodiment of the present invention, the theoretical minimum value can be determined to be 12, and any minimum values greater than 12 can be removed.
[0097] In an optional embodiment of the present invention, if invalid values in the maxima are removed using the theoretical maxima, and invalid values in the minima are removed using the theoretical minima, then the ratio between the cluster center values can be calculated, for example, as follows: 1: 1.237281749: 1.632876235: 2.308164404: 3.063120874: 4.711006726
[0099] In an optional embodiment of the present invention, after removing invalid values, the modulation intensity value corresponding to each calibration point is calculated, and then all modulation intensity values are clustered to obtain the ratio between all cluster center values. Based on the ratio, the rotation angular velocity of the galvanometer of the grating projection camera is adjusted at different rotation stages of the galvanometer, which can further improve the non-uniformity of the stripe light intensity and lay a good foundation for subsequent image recognition and analysis.
[0100] Figure 6 This is a schematic flowchart illustrating how to adjust the rotational angular velocity of a galvanometer in segments based on multiple cluster center values, as provided in a specific embodiment of the present invention.
[0101] like Figure 6 As shown, operation S2043, which adjusts the rotational angular velocity of the galvanometer of the grating projection camera in segments according to multiple cluster center values, may include the following operations:
[0102] In operation S20431: find the smallest cluster center value from the plurality of said cluster center values as the benchmark cluster center value.
[0103] In an optional embodiment of the present invention, the smaller the cluster center value, the smaller the gray value, and the rotational angular velocity of the galvanometer should be reduced; the larger the cluster center value, the larger the gray value, and the rotational angular velocity of the galvanometer should be increased.
[0104] Next, in operation S20432: calculate the ratio of all the said cluster center values to the benchmark cluster center value.
[0105] In an optional embodiment of the present invention, the ratio of all the cluster center values to the baseline cluster center value can be, for example, the following values: 1:1.412251778:2.543979698:4.643095647:9.454755853:23.4681388 1: 1.237281749: 1.632876235: 2.308164404: 3.063120874: 4.711006726
[0108] Then, in operation S20433: adjust the rotational angular velocity of the galvanometer of the grating projection camera according to the ratio.
[0109] In an optional embodiment of the present invention, a smaller cluster center value indicates a smaller grayscale value, and the rotational angular velocity of the galvanometer should be reduced; a larger cluster center value indicates a larger grayscale value, and the rotational angular velocity of the galvanometer should be increased. For example, in the first rotation stage of the galvanometer, the rotational angular velocity of the galvanometer is... Therefore, during the second rotation phase of the galvanometer, the angular velocity of the galvanometer is 1.412251778. During the third rotation phase of the galvanometer, the angular velocity of the galvanometer is 2.543979698. In the fourth rotation phase of the galvanometer, the rotational angular velocity of the galvanometer is 4.643095647. In the fifth rotation phase of the galvanometer, the rotational angular velocity of the galvanometer is 9.454755853. In the sixth rotation phase of the galvanometer, the rotational angular velocity of the galvanometer is 23.4681388. For example, in the first rotation phase of the galvanometer, the angular velocity of the galvanometer is... Therefore, during the second rotation phase of the galvanometer, the angular velocity of the galvanometer is 1.237281749. During the third rotation phase of the galvanometer, the angular velocity of the galvanometer is 1.632876235. In the fourth rotation phase of the galvanometer, the rotational angular velocity of the galvanometer is 2.308164404. In the fifth rotation phase of the galvanometer, the rotational angular velocity of the galvanometer is 3.063120874. In the sixth rotation stage of the galvanometer, the rotational angular velocity of the galvanometer is 4.711006726.
[0110] In an optional embodiment of the present invention, the rotational angular velocity of the galvanometer of the grating projection camera is adjusted at different rotation stages of the galvanometer according to the ratio of all the cluster center values to the benchmark cluster center value. This can accurately improve the non-uniformity of the stripe light intensity and lay a good foundation for subsequent image recognition and analysis.
[0111] Figure 7 This is a schematic flowchart illustrating how to adjust the rotational angular velocity of a galvanometer in segments according to a ratio, as provided in a specific embodiment of the present invention.
[0112] like Figure 7 As shown, operation S20433 adjusts the rotational angular velocity of the galvanometer of the grating projection camera according to the ratio, and may include, for example, the following operations S204331 to S204333.
[0113] In operation S204331: the ratio is normalized to obtain a normalized ratio.
[0114] In an optional embodiment of the present invention, for ease of engineering implementation, the ratio can be normalized to obtain a normalized ratio. For example, after normalizing the ratio 1:1.237281749:1.632876235:2.308164404:3.063120874:4.711006726, we obtain 1:1.25:1.5:2.0:3.0, and discard 4.711006726.
[0115] Next, in operation S204332: the rotation range of the galvanometer of the grating projection camera is divided into rotation intervals corresponding to the specified ratio, wherein the rotation range is composed of the rotation intervals.
[0116] In an optional embodiment of the present invention, since the rotation trajectory of the galvanometer of the grating projection camera is fan-shaped, the rotation cycle of one rotation period of the galvanometer of the grating projection camera can be divided into 9 intervals using the normalized ratios 3, 2, 1.5, 1.25, 1, 1.25, 1.5, 2, 3, which are [0, 259), [259, 455), [455, 627), [627, 855), [855, 1272), [1272, 1532), [1532, 1616), [1616, 1770), [1770, 2048).
[0117] Then, in operation S204333: adjust the rotational angular velocity of the galvanometer of the grating projection camera in each rotation interval according to the specified ratio.
[0118] In an optional embodiment of the present invention, the rotational angular velocity 3 of the galvanometer of the grating projection camera in the rotation range [0, 259) is... The rotational angular velocity of the galvanometer of the grating projection camera in the rotation range [259, 455) is 2 The galvanometer of the grating projection camera has a rotational angular velocity of 1.5 rpm in the rotation range [45°, 62°). The galvanometer of the grating projection camera has a rotational angular velocity of 1.25 rpm in the rotation range [627, 855). The rotational angular velocity of the galvanometer of the grating projection camera in the rotation range [855.1272) is 1. The galvanometer of the grating projection camera has a rotational angular velocity of 1.25 rpm in the rotation range [1272, 1532). The galvanometer of the grating projection camera has a rotational angular velocity of 1.5 rpm in the rotation range [1532, 1616). The rotational angular velocity of the galvanometer of the grating projection camera in the rotation range [1616, 1770) is 2 The rotational angular velocity of the galvanometer of the grating projection camera in the rotation range [1770, 2048) is 3 .
[0119] In an optional embodiment of the present invention, adjusting the rotational angular velocity of the galvanometer of the grating projection camera at different rotation stages can precisely improve the non-uniformity of the stripe light intensity, laying a good foundation for subsequent image recognition and image analysis, and improving the accuracy of image recognition.
[0120] In an optional embodiment of the present invention, a structured light depth camera may include: one or more processors; and a storage device for storing executable instructions, which, when executed by the processor, implement the method for improving stripe intensity non-uniformity in the above embodiments.
[0121] In an optional embodiment of the present invention, a laser camera may include: one or more processors; and a storage device for storing executable instructions, which, when executed by the processor, implement the method for improving stripe intensity non-uniformity in the above embodiments.
[0122] In an optional embodiment of the present invention, an electronic device may include: one or more processors; and a storage device for storing executable instructions, which, when executed by the processor, implement the method for improving stripe intensity non-uniformity in the above embodiments.
[0123] In an optional embodiment of the present invention, a computer-readable storage medium stores executable instructions thereon, which, when executed by a processor, implement the method for improving stripe intensity non-uniformity disclosed in the above embodiments. The computer-readable storage medium may be included in the device / apparatus / system described in the above embodiments; or it may exist independently and not assembled into the device / apparatus / system. The computer-readable storage medium carries one or more programs, which, when executed, implement the method for improving stripe intensity non-uniformity disclosed in the above embodiments.
[0124] In an optional embodiment of the present invention, a computer program is provided, comprising computer-executable instructions that, when executed, implement the method for improving stripe intensity non-uniformity disclosed in the above embodiments. The computer program includes program code for performing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from a network, and / or installed from a removable medium. When executed by a processor, the computer program performs the functions defined in the electronic device of the embodiments of the present invention. According to embodiments of the present invention, the electronic devices, apparatuses, modules, units, etc., described above can be implemented by computer program modules.
[0125] Figure 8 This is a structural schematic diagram of a grating projection camera provided for a specific embodiment of the present invention.
[0126] In optional embodiments of the present invention, such as Figure 8 As shown, the grating projection camera may include a laser emitter 10, a lens 20 (e.g., a Powell lens), a galvanometer 3, an image acquisition unit 40, an image processor 5, and a drive motor 60. The point laser emitted by the laser emitter 10 is converted into a line laser after passing through the lens 20. The line laser is reflected by the galvanometer 3 and projected onto the projection surface. The drive motor 60 drives the galvanometer 3 to rotate at a uniform speed, and the laser emitter 10 periodically switches on and off, forming grating fringes on the projection surface. The image acquisition unit 40 acquires the grating fringes on the projection surface within one exposure time. The image processor 5 analyzes the grayscale values of the marker points on the grating fringes and controls the drive motor 60 based on the grayscale values, thereby adjusting the rotational angular velocity of the galvanometer 3 in segments.
[0127] Figure 9 This is a schematic diagram illustrating how to obtain multiple calibration points of grating fringes on a projection surface, as provided in a specific embodiment of the present invention.
[0128] In optional embodiments of the present invention, such as Figure 9 As shown, the x-axis represents the overall width of all grating fringes, and y represents the height of the grating fringes. A grating projection camera forms grating fringes on the projection surface, and multiple calibration points are taken along the line y=1200. Since there are no obstructions on the projection surface, the reflectivity can be considered relatively uniform, and the influence of reflectivity can be largely ignored.
[0129] Figure 10 This is a schematic diagram of multiple calibration point grayscale values provided for a specific embodiment of the present invention.
[0130] In optional embodiments of the present invention, such as Figure 10 As shown, obtain Figure 9 The grayscale value at each calibration point is represented by the y-axis, which indicates the magnitude of the grayscale value, and the x-axis, which indicates one rotation cycle of the galvanometer. Grayscale value This can be expressed using the following formula:
[0131]
[0132] In the above formula, This represents the grayscale value of the calibration point; This indicates the ambient light intensity corresponding to the calibration point; This indicates the modulated light intensity corresponding to the calibration point. The modulated light intensity is the light intensity of the laser emitted by the grating projection camera at the calibration point after being reflected by the grating mirror and projected onto the projection surface after adjusting the rotation angular velocity of the grating projection camera's mirror. This represents the phase field of the modulation mirror.
[0133] Figure 11 To calculate using cosine curves Figure 10 A schematic diagram of the maximum and minimum gray values of multiple calibration points.
[0134] In optional embodiments of the present invention, such as Figure 11 As shown, the maximum and minimum gray values of each calibration point can be calculated using a cosine curve. When the value is equal to 1, the gray value of the calibration point is the largest. ; When the value is 0, the gray value of the calibration point is the smallest. .
[0135] Figure 12A To Figure 11 A schematic diagram showing the modulation intensity values corresponding to multiple calibration points after filtering the maximum and minimum values.
[0136] In optional embodiments of the present invention, such as Figure 12A As shown, invalid values in the maxima are removed using theoretical maxima, and invalid values in the minima are removed using theoretical minima. The theoretical minima generally satisfy I < 12, and the theoretical maxima generally satisfy I > 11. By removing some invalid grayscale values, the accuracy of subsequent analysis can be improved.
[0137] Figure 12B Incorrect Figure 11 The maximum and minimum values in the data are filtered out, and a schematic diagram of the modulation intensity values corresponding to multiple calibration points is shown.
[0138] In optional embodiments of the present invention, such as Figure 12B As shown, invalid grayscale values can also be left unremoved and subsequent processing can proceed directly, reducing the amount of data processing, improving the response speed of the grating projection camera, and enhancing the user experience.
[0139] Figure 13A To Figure 12A A schematic diagram showing the clustering of modulation intensity values to obtain multiple cluster center values. Figure 13BTo Figure 12B A schematic diagram showing the clustering of modulation intensity values to obtain multiple cluster center values.
[0140] In optional embodiments of the present invention, such as Figure 13A As shown, after removing some invalid grayscale values, all modulation intensity values can be clustered to obtain multiple cluster center values, which is beneficial to the implementation of the present invention.
[0141] In optional embodiments of the present invention, such as Figure 13B As shown, multiple cluster center values can also be obtained by directly clustering all modulation intensity values without removing some invalid gray values.
[0142] Figure 13A As shown and Figure 13B In the schematic diagram shown, all modulation intensity values are clustered, and the rotational angular velocity of the galvanometer is adjusted segmentally using multiple cluster center values, instead of directly using the modulation intensity values to modulate the rotational angular velocity of the galvanometer. This greatly reduces the complexity of engineering implementation, thereby facilitating the realization of this invention.
[0143] Figure 14A According to Figure 13A The obtained ratios are used to adjust the rotational angular velocity of the galvanometer in segments, resulting in a schematic diagram of grayscale values at multiple calibration points. Figure 14B According to Figure 13B The obtained ratios are used to adjust the rotational angular velocity of the galvanometer in segments, resulting in a schematic diagram of grayscale values at multiple calibration points.
[0144] In optional embodiments of the present invention, such as Figure 14A , Figure 14B As shown, the ratio between the cluster center values can be calculated, and the rotation angular velocity of the galvanometer can be adjusted piecewise according to the ratio to obtain the gray values of multiple calibration points. The gray values of the multiple calibration points obtained are basically consistent, which can largely eliminate the problems of background light and uneven brightness of the grating fringes on the projection surface due to different distances between the galvanometer and the projection surface, thus improving the accuracy of subsequent image analysis.
[0145] In an optional embodiment of the present invention, adjusting the rotational angular velocity of the galvanometer of the grating projection camera segmentally according to the grayscale value can make the brightness of the grating stripes on the projection surface relatively uniform, thus ensuring that the grayscale values of the calibration points are relatively consistent or uniform, thereby improving the accuracy of subsequent image recognition results. Clustering the modulation intensity values corresponding to all calibration points and using the obtained multiple cluster center values to adjust the rotational angular velocity of the galvanometer segmentally, instead of directly using the modulation intensity values corresponding to the calibration points to modulate the rotational angular velocity of the galvanometer, can reduce the complexity of engineering implementation, thereby facilitating the implementation and promotion of the present invention.
[0146] The flowcharts in the accompanying drawings illustrate the architecture, functionality, and operation of possible implementations of systems, methods, and computer program products according to various embodiments of the present invention. In this regard, each block in the flowchart or block diagram may represent a module, segment, or portion of code containing one or more executable instructions for implementing the specified logical function. It should also be noted that in some alternative implementations, the functions indicated in the blocks may occur in a different order than those indicated in the drawings. For example, two consecutively indicated blocks may actually be executed substantially in parallel, and they may sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each block in the block diagram or flowchart, and combinations of blocks in the block diagram or flowchart, may be implemented using a dedicated hardware-based system that performs the specified function or operation, or using a combination of dedicated hardware and computer instructions.
[0147] Those skilled in the art will understand that the features described in the various embodiments and / or claims of the present invention can be combined or combined in various ways, even if such combinations or combinations are not explicitly described in the present invention. In particular, the features described in the various embodiments and / or claims of the present invention can be combined or combined in various ways without departing from the spirit and teachings of the present invention. All such combinations and / or combinations fall within the scope of the present invention.
[0148] The embodiments of the present invention have been described above. However, these embodiments are merely illustrative and not intended to limit the scope of the invention. Although various embodiments have been described above, this does not mean that the measures in the various embodiments cannot be used advantageously in combination. The scope of the invention is defined by the appended claims and their equivalents. Various substitutions and modifications can be made by those skilled in the art without departing from the scope of the invention, and all such substitutions and modifications should fall within the scope of the invention.
Claims
1. A method for improving uneven stripe intensity, comprising: A grating projection camera forms grating stripes on the projection surface; Multiple calibration points are taken along a straight line perpendicular to the grating stripes, wherein the number of calibration points is greater than the number of grating stripes; Obtain the grayscale value of each of the calibration points; The maximum and minimum gray values of each calibration point are calculated using a cosine curve; and Calculate the modulation intensity value corresponding to each calibration point based on the maximum and minimum values; The entire rotation period of the galvanometer of the grating projection camera is segmented and adjusted. All modulation intensity values are clustered to obtain multiple cluster center values. These multiple cluster center values are then used to divide the entire rotation period of the galvanometer into multiple segments. Adjusting the rotational angular velocity of the galvanometer of the grating projection camera in segments based on multiple cluster center values includes: finding the smallest cluster center value from the multiple cluster center values as a reference cluster center value; calculating the ratio of all cluster center values to the reference cluster center value; and adjusting the rotational angular velocity of the galvanometer of the grating projection camera based on the ratio.
2. The method for improving stripe intensity non-uniformity according to claim 1, wherein, Multiple calibration points are taken along a straight line perpendicular to the grating stripes, including: Multiple calibration points are selected uniformly or randomly along a straight line perpendicular to the grating stripes, wherein the number of calibration points is more than three times the number of grating stripes.
3. The method for improving stripe intensity non-uniformity according to claim 1, wherein, Before calculating the modulation intensity value corresponding to each calibration point based on the maximum and minimum values, the method further includes: Remove invalid values from the maxima using the theoretical maxima; and The invalid values in the minimum value are removed using the theoretical minimum value.
4. The method for improving stripe intensity non-uniformity according to claim 1, wherein, Adjusting the rotational angular velocity of the galvanometer of the grating projection camera according to the ratio includes: The ratio is normalized to obtain the normalized ratio; The rotation range of the galvanometer of the grating projection camera is divided into rotation intervals corresponding to the specified ratio, wherein the rotation range is composed of the rotation intervals; and The rotational angular velocity of the galvanometer of the grating projection camera is adjusted according to the specified ratio in each rotation interval.
5. A structured light depth camera, comprising: One or more processors; A storage device for storing executable instructions, which, when executed by the processor, implement the method according to any one of claims 1 to 4.
6. A laser camera, comprising: One or more processors; A storage device for storing executable instructions, which, when executed by the processor, implement the method according to any one of claims 1 to 4.
7. An electronic device, comprising: One or more processors; A storage device for storing executable instructions, which, when executed by the processor, implement the method according to any one of claims 1 to 4.
8. A computer-readable storage medium having executable instructions stored thereon, which, when executed by a processor, implement the method according to any one of claims 1 to 4.
9. A computer program comprising computer-executable instructions which, when executed, are used to implement the method according to any one of claims 1 to 4.