An automatic exposure control method based on structured light stripes

By adopting an automatic exposure control method based on structured light fringes, and by acquiring a four-step phase-shifting grating pattern and performing double downsampling and histogram analysis, the exposure time is automatically adjusted, which solves the measurement efficiency and accuracy problems caused by unstable exposure time in structured light measurement, and achieves fast and stable three-dimensional measurement results.

CN116124033BActive Publication Date: 2025-11-25WUXI V-SENSOR TECH CO LTD
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN202211446150.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-11-18
Publication Date
2025-11-25
Estimated Expiration
2042-11-18

AI Technical Summary

Technical Problem

In existing technologies, structured light measurement fails to adjust the exposure time for point values, which affects measurement efficiency and quality, especially in extremely dark or bright scenes.

Method used

An automatic exposure control method based on structured light fringes is adopted. By acquiring four-step phase-shifting grating images, performing double downsampling and histogram analysis, and combining the modulation degree and background light intensity value, the exposure time is automatically adjusted to achieve the best exposure state.

Benefits of technology

It enables rapid and stable exposure time adjustment in different scenarios, improving measurement accuracy and efficiency, and reducing the instability of exposure time and point cloud variations.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116124033B_ABST
    Figure CN116124033B_ABST
Patent Text Reader

Abstract

The application discloses a kind of automatic exposure control methods based on structured light stripe, comprising: S1, a group of four-step phase shift grating is collected, and is solved;S2, to modulation and background light are double down-sampling, eliminate oversaturated sampling value is sorted and is histogram;S3, find the modulation value and background light intensity value of the mark position on histogram;S4, according to step S3, the relationship between exposure time and background light is obtained, to find the most suitable exposure time of current frame;S5, the most suitable exposure time of current frame is compared with current frame exposure time, and output stable value;S6, set the most suitable exposure time of current frame, point cloud generation.The application solves the problem that exposure time is not adjusted for point value during camera exposure process, which leads to high or low exposure time, affecting measurement efficiency and quality.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of automatic exposure technology in three-dimensional measurement, and particularly relates to an automatic exposure control method based on structured light fringes. Background Technology

[0002] In industrial inspection, structured light-based 3D measurement technology offers advantages such as non-contact operation, high measurement accuracy, and fast response speed, leading to its widespread application across various industries. Structured light measurement is an active optical measurement technique that projects a patterned grating pattern onto the surface of the object being measured. A camera acquires the grating pattern, which is deformed by the shape of the object, and then calculates the 3D information data of the object. It is highly sensitive to the intensity of the grating pattern. When the surface is overexposed or underexposed, such as due to specular reflection, the camera image cannot accurately reflect the true surface intensity, resulting in decreased measurement accuracy or even the inability to reconstruct the image. Multiple exposure technology is used in structured light reconstruction to address this reflection problem. After acquiring multiple exposure images, it selects the pixel with the highest grayscale value at the same location that is not saturated for reconstruction. While the combination of structured light technology and multiple exposures achieves good measurement results, the exposure time and number of exposures rely entirely on the operator's experience, affecting measurement efficiency and industrial applications. Therefore, finding an automatic exposure feedback mechanism that adapts to different scenarios is particularly important.

[0003] Chinese patent CN108827184B discloses a structured light adaptive 3D measurement method based on camera response curves. It uses the camera response function to obtain the relative irradiance values ​​of all points, and calculates the number of exposures and exposure time based on the relative irradiance values ​​and the camera response function, achieving automatic exposure. The camera itself adapts to the exposure adjustment of different scenes. This camera-based adjustment algorithm prioritizes the overall image quality. When the measured scene is extremely dark or extremely bright, it actively adjusts the exposure time in the opposite direction to achieve a reasonable overall image exposure. However, achieving the optimal image does not mean that all point values ​​are at their optimal state. Since 3D measurement mainly relies on point values, this affects measurement efficiency and quality. Summary of the Invention

[0004] The purpose of this invention is to provide an automatic exposure control method based on structured light fringes to solve the problem that existing cameras do not adjust the exposure time for point values ​​during the exposure process, resulting in excessively high or low exposure times that affect measurement efficiency and quality.

[0005] To address the above problems, this invention discloses an automatic exposure control method based on structured light fringes, comprising the following steps:

[0006] S1. Acquire a set of four-step phase-shifting grating images and perform calculations;

[0007] S2. Perform double downsampling on the modulation scheme and background light, remove oversaturated sampled values, sort them, and plot a histogram.

[0008] The dual downsampling includes a first downsampling and a second downsampling. The first downsampling is specifically performed using the region of interest method, with a large central sampling region and eight smaller directional sampling regions. The center coordinates of the central sampling region are (640, 512), and its length and width are 400 pixels and 300 pixels, respectively. The center coordinates of the eight directional sampling regions are represented in the following order from left to right and from top to bottom: (200, 212), (640, 212), (1080, 212), (200, 512), (1080, 512), (200, 812), (640, 812), (1080, 812). The length of the four positive directional sampling regions is 150 pixels, the length of the other four directional sampling regions is 100 pixels, and the width of the eight directional sampling regions is uniformly 100 pixels.

[0009] The second downsampling uses different weights to perform downsampling based on the location. For the corresponding row and column pixels in the middle sampling area of ​​the image, one pixel is sampled every other pixel. For the corresponding row and column pixels in the eight directional sampling areas of the image, one pixel is sampled every two pixels.

[0010] A histogram operation was performed on the modulation index and the one-dimensional background light array after double downsampling, with the modulation index array as the independent variable of the histogram and the background light array as the dependent variable of the histogram.

[0011] The advantage of this step is that it can reduce the number of pixels to be operated on while taking into account the region of interest in the image, thereby improving the response time of automatic exposure. The double sampling mentioned above also fully considers the weight of the region of interest in different regions, making the final result more reliable.

[0012] S3. Find the modulation value and background light intensity value at the marked position on the histogram;

[0013] Find the modulation index and background light intensity value at the marked position on the histogram; the marked position is the modulation index value at the 2.5% position in descending order of modulation index. Use this value to find the background light intensity value at the corresponding location. The 2.5% mark indicates the maximum overall modulation value after excluding some special cases.

[0014] If the modulation value is found If the value is less than 5, the current frame's exposure time is deemed insufficient, and the exposure time t2 is set to 40ms as the output for the current frame; if the found modulation value... If the value is greater than 5, proceed to step S4;

[0015] The advantage of the above steps is that they enable a rapid response to some extreme situations in camera shooting, making the whole process more robust.

[0016] S4. Based on the correspondence, find the exposure time of the current frame;

[0017] Based on the relationship between exposure time and background light obtained in the previous step, the background light intensity value set here for projection is... If the time remains constant, then the optimal exposure time and the ideal background light intensity value are:

[0018]

[0019]

[0020] In the formula, This represents the ideal background light intensity value. This indicates the optimal exposure time under ideal conditions.

[0021] Regardless of the exposure time and the intensity of the light captured. It won't change; simply changing the exposure time will achieve the optimal target brightness.

[0022]

[0023]

[0024] in, This represents the background light intensity value at the corresponding location in the current frame. Given the exposure time of the current frame, the optimal exposure time for the current frame can be calculated using the above formula. .

[0025] The advantage of the above steps is that they eliminate the tedious step of calculating the reflectance of the object being measured, and a suitable and reliable exposure time can be obtained directly through a linear relationship.

[0026] S5. Set the optimal exposure time for the current frame. Compare the current frame exposure time with the output stable value.

[0027] Specifically, it includes:

[0028] The optimal exposure time for the current frame The difference between the two is compared to the exposure time of the current frame to determine whether the condition is met:

[0029] | - |<2

[0030] If satisfied, then the optimal exposure time for the current frame is executed. If the condition is not met, the average of the optimal exposure time of the current frame and the exposure time of the current frame is taken as the new exposure time of the current frame, and the cycle is repeated until the condition is met, which is the output stable value.

[0031] The advantage of the above steps is that, through a simple one-step feedback mechanism, it can overcome some minor changes in light intensity in a changing environment, allowing the final exposure time to reach a stable state.

[0032] S6. Set the optimal exposure time for the current frame. Point cloud generation.

[0033] Compared with the prior art, the beneficial effects of the present invention are:

[0034] The present invention provides an automatic exposure control method based on structured light stripes, which solves the problems of the existing technology that requires a long time to determine the relationship between exposure time and grayscale value, and the problem that the obtained exposure value is unstable when the external lighting is unstable, with the point cloud constantly changing and the background light also changing. Compared with the existing technology, the automatic exposure control method of the present invention has a faster response time, is more accurate and more stable. Attached Figure Description

[0035] Figure 1 This is a schematic diagram of the process of the present invention;

[0036] Figure 2 This is a schematic diagram of the first downsampling region of the present invention;

[0037] Figure 3 This is a schematic diagram of the intermediate sampling region for the second downsampling step of the present invention;

[0038] Figure 4 This is a schematic diagram of the eight directional sampling areas for the second downsampling of the present invention. Detailed Implementation

[0039] To make the technical means, creative features, objectives and effects of this invention easier to understand, the invention will be further described below in conjunction with specific embodiments.

[0040] In the description of this invention, it should be noted that the terms "upper," "lower," "inner," "outer," "front end," "rear end," "both ends," "one end," and "the other end," etc., indicate the orientation or positional relationship based on the orientation or positional relationship shown in the accompanying drawings. They are used only for the convenience of describing this invention and for simplifying the description, and do not indicate or imply that the device or element referred to must have a specific orientation, or be constructed and operated in a specific orientation. Therefore, they should not be construed as limitations on this invention. Furthermore, the terms "first" and "second" are used for descriptive purposes only and should not be construed as indicating or implying relative importance.

[0041] In the description of this invention, it should be noted that, unless otherwise explicitly specified and limited, the terms "installed," "equipped with," "connected," etc., should be interpreted broadly. For example, "connection" can be a fixed connection, a detachable connection, or an integral connection; it can be a mechanical connection or an electrical connection; it can be a direct connection or an indirect connection through an intermediate medium; it can be a connection within two components. Those skilled in the art can understand the specific meaning of the above terms in this invention based on the specific circumstances.

[0042] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.

[0043] like Figure 1 As shown, this embodiment discloses an automatic exposure control method based on structured light fringes, including the following steps:

[0044] S1. Acquire a set of fringe grating patterns, use a 64-frequency four-step phase-shifting sinusoidal fringe grating, calculate the four-step phase-shifting sinusoidal fringe grating, and obtain the corresponding modulation and background light;

[0045] S2. Perform double downsampling on the modulation index and background light. After removing oversaturated gray values, sort all sampled values ​​of the modulation index and background light and plot a histogram. The value extracted from the modulation index map is used as the independent variable of the histogram, and the value extracted from the background light map is used as the dependent variable of the histogram.

[0046] Double downsampling includes a first downsampling and a second downsampling.

[0047] like Figure 2As shown, the first downsampling is specifically performed using the region of interest (ROI) method. The central sampling region is large, while the eight directional sampling regions are small. The center coordinates of the central sampling region are (640, 512), with a length of 400 pixels and a width of 300 pixels. The other eight directional sampling regions are of different sizes. The center coordinates of the eight directional sampling regions, from left to right and top to bottom, are (200, 212), (640, 212), (1080, 212), (200, 512), (1080, 512), (200, 812), (640, 812), and (1080, 812). The four positive directional sampling regions are 150 pixels long, the other four are 100 pixels long, and the width of all eight directional sampling regions is uniformly 100 pixels.

[0048] The second downsampling process uses different weights to perform downsampling based on different locations.

[0049] like Figure 3 As shown, for the corresponding row and column pixels in the middle sampling area of ​​the image, every other pixel is sampled, such as... Figure 4 As shown, the corresponding row and column pixels in the eight sampling areas of the image are sampled one pixel every two pixels.

[0050] S3. Locate the modulation index and background light intensity at the marked position on the histogram; the marked position is the modulation index value at the 2.5% position, sorted from largest to smallest. Use this value to find the background light intensity value at the corresponding location. If the modulation value is found If the value is less than 5, the current frame's exposure time is deemed insufficient, and the exposure time t2 is set to 40ms as the output for the current frame; if the found modulation value... If the value is greater than 5, proceed to step S4;

[0051] S4. Based on the correspondence, find the exposure time of the current frame, specifically:

[0052] Formula for projection onto camera:

[0053]

[0054] In the formula, Indicates sensor sensitivity; Indicates the camera's exposure time; Indicates the reflectivity of an object; This represents ambient light reflected from an object. This refers to ambient light that directly enters the camera;

[0055] because and The ambient light is much less than the light intensity of the actively projected stripes, so the above equation can be simplified to:

[0056]

[0057] Based on the four-step phase shift, the relationship between exposure time and background light is obtained by superimposing the four fringe patterns:

[0058]

[0059] In the formula, This indicates the background light intensity value set during projection. This indicates the background light intensity value at the corresponding location;

[0060] The optimal exposure time and ideal background light value obtained are:

[0061]

[0062]

[0063] In the formula, This represents the ideal background light intensity value. This indicates the optimal exposure time under ideal conditions;

[0064] Regardless of the exposure time and the intensity of the light captured. It won't change; simply changing the exposure time will achieve the optimal target brightness.

[0065]

[0066]

[0067] in, This represents the background light intensity value at the corresponding location in the current frame. Given the exposure time of the current frame, the optimal exposure time for the current frame can be calculated using the above formula. .

[0068] S5. Set the optimal exposure time for the current frame. Exposure time of the current frame Compare the values ​​and output the stable values.

[0069] Specifically, it includes:

[0070] The optimal exposure time for the current frame is compared with the current frame's exposure time; this determines whether the difference between the two satisfies the condition.

[0071] | - |<2

[0072] If satisfied, then the optimal exposure time for the current frame is executed. If the condition is not met, the average of the optimal exposure time of the current frame and the exposure time of the current frame is taken as the new exposure time of the current frame, and the cycle is repeated until the condition is met, which is the output stable value.

[0073] S6. Set the optimal exposure time for the current frame. Point cloud generation.

[0074] The automatic exposure method of the present invention solves the problem of the relationship between exposure time and grayscale value required in the prior art, which is time-consuming and results in unstable exposure values ​​when the external lighting is unstable, with the point cloud constantly changing and the background light also changing. Compared with the prior art, the automatic exposure control method of the present invention has a faster response time, is more accurate and more stable.

[0075] The above descriptions are merely embodiments of the present invention, and common knowledge regarding specific structures and characteristics of the solutions is not described in detail here. It will be apparent to those skilled in the art that the present invention is not limited to the details of the above exemplary embodiments, and that the present invention can be implemented in other specific forms without departing from the spirit or essential characteristics of the invention. Therefore, the embodiments should be considered exemplary and non-limiting in all respects, and the scope of the present invention is defined by the appended claims rather than the foregoing description. Therefore, it is intended that all variations falling within the meaning and scope of equivalents of the claims be included within the present invention. No reference numerals in the claims should be construed as limiting the scope of the claims.

Claims

1. An automatic exposure control method based on structured light fringes, characterized in that, Includes the following steps: S1. Acquire a set of four-step phase-shifting grating images and perform calculations; S2. Perform double downsampling on the modulation scheme and background light, discard oversaturated sampled values, sort them, and generate a histogram; the double downsampling includes: S21. First downsampling: Downsampling is performed based on the region of interest method, with a large sampling area in the middle of the image and small sampling areas in the eight directions. S22. Second downsampling: Design different weights for downsampling based on different locations; S23. Perform histogram operation on the modulation index and background light one-dimensional array after double downsampling, with the modulation index array as the independent variable of the histogram and the background light array as the dependent variable of the histogram. S3. Locate the modulation index and background light intensity values ​​at the marked positions on the histogram; including: S31, The marked position is the modulation value at the 2.5% position when the modulation is sorted from largest to smallest. Use this value to find the background light intensity value at the corresponding location. ; Formula for projection onto camera: In the formula, s represents the sensor sensitivity; t represents the camera's exposure time; Indicates the reflectivity of an object; This represents ambient light reflected from an object. This refers to ambient light that directly enters the camera; because and The ambient light is much less than the light intensity of the actively projected stripes, so the above equation can be simplified to: Based on the four-step phase shift, the relationship between exposure time and background light is obtained by superimposing the four fringe patterns: In the formula, This indicates the background light intensity value set during projection. This indicates the background light intensity value at the corresponding location; S32. Determine if a modulation value has been found. If the value is less than 5, then the current frame exposure time is determined to be insufficient, and the exposure time is set to 40ms as the output of the current frame; otherwise, proceed to step S4. S4. Based on the relationship between exposure time and background light obtained in step S3, find the optimal exposure time for the current frame. ; S5. Set the optimal exposure time for the current frame. The difference between the two is compared to the exposure time of the current frame to determine whether the condition is met: | - |<2 If satisfied, then the optimal exposure time for the current frame is executed. If the condition is not met, the average of the optimal exposure time for the current frame and the current frame exposure time is taken as the new current frame exposure time, and this process is repeated until the condition is met, which is the stable output value. ; S6. Set the optimal exposure time for the current frame. Point cloud generation.

2. The automatic exposure control method based on structured light fringes according to claim 1, characterized in that, Step S4 includes: Based on the relationship between exposure time and background light obtained in step S3, the background light intensity value set during projection is as follows. If the time remains constant, then the optimal exposure time and the ideal background light value are: In the formula, This represents the ideal background light intensity value. This indicates the optimal exposure time under ideal conditions; Regardless of the exposure time and the intensity of the light captured. It won't change; simply changing the exposure time will achieve the optimal target brightness. in, This represents the background light intensity value at the corresponding location in the current frame. Given the exposure time for the current frame, we can calculate the optimal exposure time for that frame. .

Citation Information

Patent Citations

  • A structured light adaptive 3D measurement method based on camera response curves

    CN108827184B

  • Structured light self-adapting repeated multi-exposure method

    CN103411533A

  • High-dynamic-range grating projection three-dimensional measurement method based on full-automatic exposure

    CN107894215A