Exposure control method based on roller shutter exposure and exposure device thereof

By adopting a rolling shutter exposure control method in the laser displacement sensor, using laser modulation and CMOS drive to quickly adjust the exposure parameters, the problem of insufficient exposure or overexposure is solved, the measurement accuracy and response speed are improved, and it is suitable for high-speed measurement scenarios.

CN118921561APending Publication Date: 2024-11-08PHOTON SHENZHEN PRECISION TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410593348.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-05-14
Publication Date
2024-11-08

AI Technical Summary

Technical Problem

Existing laser displacement (profile) sensors are underexposed or overexposed due to diffuse reflectivity differences when measuring different objects, and multiple frame exposures are required to try to adjust the exposure parameters, resulting in response delay and measurement frame rate drop, affecting high-speed measurement applications.

Method used

Using an exposure control method based on roller shutter exposure, through laser modulation and CMOS drive, the exposure detection frame is added to quickly find the ideal exposure parameters of the next frame, and the exposure parameters are adjusted to reduce the exposure adjustment time and improve the exposure accuracy.

Benefits of technology

It greatly improves exposure accuracy and displacement measurement accuracy, reduces the time required for CMOS exposure adjustment, and enhances the application capabilities of laser displacement sensors in the field of high-speed measurement.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118921561A_ABST
    Figure CN118921561A_ABST
Patent Text Reader

Abstract

The invention discloses an exposure control method and device based on roller shutter exposure, and the method comprises the steps: judging whether an exposure image of a (K-1) th frame is in an ideal exposure gray scale range or not before the exposure of a Kth frame, if not, adding an exposure detection frame, obtaining an exposure image of a frame with small exposure, and taking the maximum value of an exposure light band as a center, the exposure area deviating from the maximum value preset range is an exposure screening area; taking the ratio of the exposure parameter of the large exposure frame to the maximum exposure power as the line exposure time of each line in the exposure detection frame; setting the exposure power of each row in the exposure detection frame to be linearly increased; according to the exposure detection method, line-by-line exposure is carried out according to the exposure parameters of the exposure detection frame, and the Kth frame exposure is carried out according to the exposure parameters of the kth line, meeting the ideal exposure gray scale range, in the exposure detection image, so that the time required by CMOS exposure adjustment can be shortened, and the exposure precision and the displacement measurement precision are greatly improved at the same time.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The embodiments of the present invention relate to the field of high-precision detection technology, and in particular to an exposure control method based on rolling shutter exposure and an exposure device thereof. Background Art

[0002] At present, laser displacement sensors and laser profile sensors generally use the principle of triangular reflection method, that is, the laser beam emitted by the laser diode is irradiated to the surface of the object to be measured, and the light reflected back slowly passes through a group of lenses and is projected onto the photosensitive element matrix. Depending on the distance of the surface of the object to be measured from the laser light source, the imaging position on the photosensitive element matrix will also be different. By calculating the center of the imaging spot on the photosensitive element matrix, the surface displacement of the object to be measured can be confirmed.

[0003] Due to the great difference in diffuse reflectivity of different object surfaces, the light intensity received by the CMOS (Complementary Metal Oxide Semiconductor) camera when measuring different objects under the same laser power and exposure settings is also very different. The ranging principle of the laser displacement (profile) sensor is to confirm the surface displacement of the measured object according to the center of the imaging spot on the photosensitive element matrix. Therefore, dynamic exposure adjustment is required to obtain high-quality imaging to avoid spot deformation caused by underexposure or overexposure, which in turn leads to loss of measurement accuracy.

[0004] Existing exposure algorithms generally require multiple exposure attempts to confirm appropriate exposure parameters (such as laser power and exposure time). When the laser displacement (contour) sensor scans areas with material or color changes, or the surface of complex objects, additional CMOS camera frames are required to adjust the exposure parameters. This will cause the laser displacement (contour) sensor to respond late or the actual measurement frame rate to drop, affecting the application of laser displacement (contour) sensors in the field of high-speed measurement.

[0005] Currently, when using rolling shutter to shoot slow-moving objects, the image is not easily offset or distorted, but there are still problems such as slow exposure parameter adjustment speed and low exposure accuracy. Summary of the invention

[0006] The present invention provides an exposure control method based on rolling shutter exposure, and in particular relates to um-level and sub-um-level low-speed displacement measurement. Through laser modulation, CMOS drive and exposure parameter adjustment, the time required for CMOS exposure adjustment can be reduced, and the exposure accuracy can be greatly improved.

[0007] In a first aspect, the present application provides an exposure control method based on rolling exposure, which is used to control exposure parameters of a camera sensor. The exposure control method includes:

[0008] Before exposing the Kth frame, determine whether the exposure image of the K-1th frame is within the ideal exposure grayscale range;

[0009] If yes, expose the Kth frame according to the exposure parameters of the K-1th frame; K≥2, K is a positive integer;

[0010] If not, before the Kth frame is exposed, an exposure detection frame is added, where G is the gain of the camera sensor.

[0011] The parameters of the exposure detection frame are set as follows:

[0012] Adjust the exposure parameter of the K-1th frame to a preset multiple and then expose it line by line to obtain a frame with overexposure and a frame with underexposure;

[0013] Taking the exposure image of the under-exposure frame as a reference, selecting the maximum value of the exposure light band as the center, and the exposure area within a preset range deviating from the maximum value as the exposure screening area;

[0014] The exposure parameter Q of the exposure biased frame M The ratio of the maximum exposure power Pmax is used as the row exposure time T = Q for each row in the exposure detection frame. M / P max ;

[0015] The exposure power of each row in the exposure detection frame is set to increase linearly, and the exposure power of the kth row satisfies the following formula:

[0016]

[0017]

[0018]

[0019]

[0020] T frame =(n-1)t σ +T; 1≤k≤n, n is the number of exposure rows;

[0021] is the starting exposure power of the kth row within the row exposure time T, is the ending exposure power of the kth row within the row exposure time T; is the average exposure power of the kth row; Q (k) is the exposure parameter of the kth row of the exposure detection frame; T frame is the frame exposure time of the exposure detection frame; p is the detection exposure power; tσ is the time interval between adjacent exposure rows; G is the gain of the camera sensor;

[0022] Exposing row by row according to the exposure parameters of the exposure detection frame to obtain an exposure detection image of the exposure screening area;

[0023] Acquire the exposure parameters of the kth row in the exposure detection image that meet the ideal exposure grayscale range, and take the exposure parameters of the kth row in the exposure detection frame as the ideal exposure parameters;

[0024] The Kth frame is exposed according to the ideal exposure parameters.

[0025] Optionally, obtaining the exposure parameters of the kth row in the exposure detection frame that meet the ideal exposure grayscale range, and taking the exposure parameters of the kth row in the exposure detection frame as the ideal exposure parameters, includes:

[0026] Recording the grayscale values ​​of all pixels in the exposure screening area in the under-exposure frame, normalizing the grayscale values ​​of all pixels, and obtaining a grayscale value normalization value N(k) of the under-exposure frame;

[0027] Get the gray value G of each pixel of the exposure detection image in the exposure screening area x (k);

[0028] The gray value G of the exposure detection image x The ratio of (k) to the normalized grayscale value N(k) of the frame with less exposure is taken as the expected grayscale value G x (k) / N(k);

[0029] When the expected gray value G x (k) / N(k) determines the average exposure parameter G of the kth row within the ideal exposure grayscale range. x (k) is the ideal exposure parameter Q(ki); where i is an integer.

[0030] Optionally, adjusting the exposure parameter of the K-1th frame to a preset multiple and then exposing it line by line to obtain a frame with an overexposure and a frame with an underexposure, including:

[0031] The exposure parameters of the K-1th frame are adjusted by using the binary method and then exposed simultaneously to obtain a frame with an over-exposure and a frame with an under-exposure.

[0032] Optionally, the exposure parameter of the frame with a larger exposure is twice the exposure parameter of the frame with a smaller exposure.

[0033] Optionally, the maximum exposure adjustment frame number R of the exposure detection frame is The value of is rounded up;

[0034] In, Q max is the maximum exposure parameter, Q min is the minimum exposure parameter.

[0035] Optionally, the ideal exposure parameter is between the exposure parameter of the frame with a larger exposure and the exposure parameter of the frame with a smaller exposure.

[0036] Optionally, exposing the Kth frame according to the ideal exposure parameters includes:

[0037] assigning the ideal exposure parameters to laser power, exposure time, and gain of a camera sensor;

[0038] The allocation ratio is such that the laser power is greater than the exposure time, and the exposure time is greater than the gain.

[0039] Optionally, the detection exposure power is 75% to 85% of the maximum exposure power.

[0040] Optionally, the preset range of the maximum value of the exposure screening area is an area centered on the maximum value of the exposure light band and within a range of 10% to 13.5% of the total diameter of the exposure light band.

[0041] In a second aspect, an embodiment of the present application further provides an exposure device based on rolling shutter exposure, which is used to implement the exposure control method provided in the first aspect, wherein the exposure device includes an exposure light source, an illumination lens, an imaging lens, a camera sensor with rolling shutter exposure function, a control system, and a data processing system;

[0042] The control system is electrically connected to the camera sensor and the data processing system respectively; the exposure light source and the camera sensor are electrically connected to the data processing system;

[0043] The illumination lens is located on the exposure light path of the exposure light source, and the imaging lens is located on the photosensitive front end surface of the camera sensor.

[0044] In summary, the exposure control method based on rolling shutter exposure provided in the present application, through laser modulation, CMOS drive and exposure parameter adjustment, only needs to add one exposure detection frame to obtain the ideal exposure parameters of the next frame. The ideal exposure parameters are used to expose the next frame, which can reduce the time required for CMOS exposure adjustment and greatly improve the exposure accuracy and displacement measurement accuracy. BRIEF DESCRIPTION OF THE DRAWINGS

[0045] Figure 1 is a schematic diagram of an exposure device based on rolling shutter exposure provided by the present application;

[0046] Figure 2 is a flow chart of an exposure control method based on rolling exposure provided by an embodiment of the present application;

[0047] Figure 3 yes Figure 2Schematic diagram of the exposure process of the exposure control method based on rolling shutter exposure. DETAILED DESCRIPTION

[0048] The present invention will be further described in detail below in conjunction with the accompanying drawings and examples. It will be understood that the specific embodiments described herein are only used to explain the present invention, rather than to limit the present invention. It should also be noted that, for ease of description, only parts related to the present invention, rather than all structures, are shown in the accompanying drawings. It is obvious to those skilled in the art that various modifications and changes can be made in the present invention without departing from the spirit or scope of the present invention. Therefore, the present invention is intended to cover modifications and changes of the present invention that fall within the scope of the corresponding claims (technical solutions for protection) and their equivalents. It should be noted that the implementation methods provided in the embodiments of the present invention can be combined with each other without contradiction.

[0049] Figure 1 is a schematic diagram of an exposure device based on rolling shutter exposure provided by the present application. The embodiment of the present application provides an exposure device based on rolling shutter exposure. The exposure device adopts the principle of triangular reflection method measurement. Figure 1 As shown, the exposure device 100 includes an exposure light source 10, an illumination lens 20, an imaging lens 30, a camera sensor 40 with a rolling exposure function, a control system (not shown in the figure) and a data processing system 50; the control system is electrically connected to the exposure light source 10, the camera sensor 40 and the data processing system 50 respectively; the exposure light source 10 and the camera sensor 40 are electrically connected to the data processing system 50; the illumination lens 20 is located on the exposure light path of the exposure light source 10, and the imaging lens 30 is located on the photosensitive front end surface of the camera sensor 40.

[0050] Specifically, the exposure light source 10 can be a laser light source for emitting an exposure beam. For example, a point light source or a line light source within the visible light range can be used; the illumination lens 20 is used to focus the exposure beam; the camera sensor 40 can be a CMOS (Complementary Metal Oxide Semiconductor, CMOS) camera or a CCD (Charge Coupled Device, CCD) camera with a rolling shutter exposure function. The imaging lens 30 is located at the front end of the photosensitive surface of the camera sensor 40, and is used to converge the exposure beam reflected by the object to be measured. The photosensitive surface of the camera sensor 40 is used to receive the exposure beam reflected by the object to be measured; the data processing system 50 performs image processing on the exposure image obtained by the camera sensor 40, and analyzes and confirms the moving distance of the object to be measured. The control system is used to control the exposure light source 10 to turn on and off, the camera sensor 40 to expose and turn off, and the data processing system 50 to start image processing and turn off.

[0051] The present application adopts a rolling exposure method to generate an exposure image of the object to be measured. Depending on the distance between the surface of the object to be measured and the laser light source, the imaging position on the photosensitive element matrix will also be different.

[0052] For example, Figure 1 As shown, when the surface of the object to be measured moves from point A to point B by x, the displacement of the image point on the photosensitive surface of the camera sensor 40 is x', a is the distance from the imaging lens 30 to the object to be measured (object distance), b is the distance from the main surface after receiving to the center of the imaging surface (generally the focal length f), θ is the angle between the optical axis of the exposure beam and the imaging lens 30, D is the distance from the exposure beam to the center of the exposure beam, and the focal length of the imaging lens 30 is f; the camera sensor 40 transmits the acquired exposure image information to the data processing system 50, and the data processing system 50 can confirm the surface displacement of the object to be measured by calculating the center of the imaging spot on the photosensitive element matrix.

[0053] Among them, rolling shutter exposure adopts a row-by-row scanning and exposure method. When all pixels in the previous row are exposed at the same time, all pixels in the next row are exposed at the same time until all rows are exposed. It has low cost and low noise, and is suitable for precision detection requirements with low noise requirements.

[0054] Based on the same inventive concept, the present invention proposes an exposure control method based on rolling shutter exposure in view of one or more of the above-mentioned problems existing in the prior art. The exposure control method based on rolling shutter exposure provided in the embodiment of the present application adopts the exposure device provided in the above-mentioned embodiment. In the process of measuring the low-speed displacement of the object, the exposure frame is detected to quickly find the best exposure parameters suitable for the next frame exposure, so as to quickly adjust the exposure parameters of the camera sensor, which can greatly improve the exposure accuracy and displacement measurement accuracy.

[0055] Figure 2 is a flow chart of an exposure control method based on rolling exposure provided by an embodiment of the present application, Figure 3 yes Figure 2 A schematic diagram of a rolling exposure parameter process of an exposure control method based on rolling exposure, wherein: Figure 3 The horizontal axis is time, and the vertical axis is exposure power. Figure 1-Figure 3 As shown, the exposure control method includes:

[0056] S101. Before exposing the Kth frame, determine whether the exposure image of the K-1th frame is within the ideal exposure grayscale range.

[0057] Specific, combined Figure 1 and Figure 2As shown, when measuring the surface displacement of the object, after the rolling shutter exposure frame K-1, the data processing system 50 determines whether the exposure image is normal. Specifically, the data processing system 50 calculates whether the grayscale value of each pixel of the exposure image of the K-1 frame is within the ideal exposure grayscale range, which is used to evaluate whether the exposure image of the K-1 frame meets the normal exposure requirements. Among them, the ideal exposure grayscale range is a grayscale value range set according to the exposure requirements. Exemplarily, the range can be 30 to 180, and other grayscale value ranges are not listed one by one in the embodiments of this application.

[0058] It should be noted that the evaluation criteria may be the grayscale values ​​of all pixels in the exposure image of the K-1th frame, or the grayscale average value of all pixels in the exposure image of the K-1th frame, or the grayscale values ​​of pixels in a selected area of ​​the exposure image of the K-1th frame, etc. The number of pixels may be appropriately adjusted according to the requirements of the exposure accuracy. The system determines whether the grayscale value of the pixel in the exposure image of the K-1th frame is within the ideal exposure grayscale range.

[0059] S102: If yes, perform exposure of the Kth frame according to the exposure parameters preset by the system.

[0060] Wherein, K≥2, K is a positive integer.

[0061] Specifically, if the grayscale value of each pixel of the exposure image of the K-1th frame is within the ideal exposure grayscale range, it indicates that the exposure image of the K-1th frame meets the normal exposure requirements, and the camera sensor 40 will use the system preset exposure parameters to perform the Kth frame exposure. As an example, the exposure parameters of the K-1th frame can continue to be used to perform the Kth frame exposure on the surface of the object.

[0062] S103: If no, before exposing the Kth frame, add an exposure detection frame to obtain ideal exposure parameters.

[0063] The parameters of the exposure detection frame X are set using steps S104 to S109.

[0064] Specifically, if the grayscale value of each pixel of the exposure image of the K-1th frame is lower than the ideal exposure grayscale range, or higher than the ideal exposure grayscale range, it indicates that the exposure image of the K-1th frame does not meet the exposure requirements. Before exposing the Kth frame, the camera sensor 40 will add an exposure detection frame X, and use the exposure detection frame X to obtain the ideal exposure parameters for exposing the Kth frame.

[0065] Specifically, the steps for setting the exposure detection frame X are as follows:

[0066] S104, adjusting the exposure parameter of the K-1th frame to a preset multiple and then exposing it line by line to obtain a frame with overexposure and a frame with underexposure.

[0067] The overexposed frame means that the image is overexposed under the exposure parameters of the overexposed frame; the underexposed frame means that the image is underexposed under the exposure parameters of the underexposed frame.

[0068] Specific, combined Figure 1 As shown in the figure, when the system detects that the exposure image of the K-1th frame is overexposed or underexposed, the exposure parameter Q of the K-1th frame is used. (k-1) As a benchmark, the exposure parameter Q of the K-1 frame is (k-1) Coarse adjustment, find the exposure parameter large frames and large frames between overexposure and underexposure within a certain exposure parameter range.

[0069] Specifically, a rough search method is adopted to increase the exposure detection frames of the rough adjustment. For example, the rough adjustment multiple can be 0.5 times, 5 times, 10 times, 15 times, etc. When the exposure image of the K-1th frame is overexposed, the Q (k-1) Reduced to 0.5 times Q (k-1) , find the underexposed exposure parameters as the underexposed frame N; when the exposure image of the K-1th frame is underexposed, Q (k-1) Increase to 5 times Q (k-1) , find the overexposed exposure parameter as the overexposed frame M.

[0070] Furthermore, a fine search method is adopted to increase the exposure detection frame X of fine call to obtain the ideal exposure parameters, as follows.

[0071] S105, taking the exposure image of the frame with smaller exposure as a reference, selecting the maximum value of the exposure light band as the center, and the exposure area within a preset range deviating from the maximum value as the exposure screening area.

[0072] Specifically, the exposure image of the smaller frame N is taken as a reference, the maximum value of the exposure light band is selected as the center, and the exposure area within a preset range deviating from the maximum value is the exposure screening area. Exemplarily, the exposure screening area is a circular area centered on the maximum value of the exposure light band.

[0073] S106, setting the exposure parameter Q of the larger frame M The ratio of the maximum exposure power P max As the exposure time T = Q for each row in the exposure detection frame M / P max .

[0074] Specific, combined Figure 3 As shown, the row exposure time T of rolling shutter exposure is set to Q M / Pmax;QM is the exposure parameter for exposing the larger frame M, P max is the maximum exposure power of the exposure light source.

[0075] Wherein, exposure parameter Q=laser power P*exposure time T*camera sensor (CMOS) gain G.

[0076] S107 , setting the exposure power of each row in the exposure detection frame to increase linearly.

[0077] Among them, the exposure power of the kth row satisfies the following formula:

[0078]

[0079]

[0080]

[0081]

[0082] T frame =(n-1)t σ +T, (1.5); 1≤k≤n, n is the number of exposure rows;

[0083] is the starting exposure power of the kth row within the row exposure time T, is the ending exposure power of the kth row within the row exposure time T; is the average exposure power of the kth row; Q (k) is the exposure parameter of the kth row of the exposure detection frame X; T frame is the frame exposure time of the exposure detection frame X; p is the detection exposure power; tσ is the time interval between adjacent exposure rows; G is the gain of the camera sensor.

[0084] Specifically, refer to Figure 3 As shown, the number of rows exposed line by line in one frame of rolling shutter exposure is n, the exposure time of each row is T, and the starting exposure power of the kth row within the row exposure time T is The final exposure power of the kth row within the row exposure time T is

[0085] For example, k=1, row 1:

[0086] Initial exposure power

[0087] End exposure power

[0088] Average exposure power

[0089] Exposure parameters of exposure detection frame X

[0090] k=2, row 2:

[0091] Initial exposure power

[0092] End exposure power

[0093] Average exposure power

[0094] Exposure parameters of exposure detection frame X

[0095] By analogy, the exposure parameters of n rows of rolling exposure are obtained, such as the exposure parameters of the kth row, ..., the n-1th row, and the nth row.

[0096] S108 , exposing row by row according to the exposure parameters of the exposure detection frame X to obtain an exposure detection image of the exposure screening area.

[0097] S109, obtaining exposure parameters of the kth row in the exposure detection image that meet the ideal exposure grayscale range, and taking the exposure parameters of the kth row in the exposure detection frame X as the ideal exposure parameters.

[0098] S110 , exposing the Kth frame according to ideal exposure parameters.

[0099] Specifically, the control system of the exposure device exposes row by row according to the exposure parameters of the exposure detection frame X, and the camera sensor 40 transmits the exposure image information to the data processing system 50. The data processing system 50 searches for exposure rows that meet the ideal exposure grayscale range in the exposure detection image according to the preset ideal exposure grayscale range. Exemplarily, the ideal exposure is the kth row, and the exposure parameter Q(k) of the kth row is determined as the ideal exposure parameter Q(ki) of the Kth frame. The control system controls the exposure light source 10 and the camera sensor 40 to perform the Kth frame exposure according to the exposure power and exposure time of the ideal exposure parameter Q(ki). The camera sensor 40 uses rolling exposure to generate the Kth frame exposure image. After the data processing system 50 analyzes and processes the exposure image of the Kth frame, the moving distance of the object under test is obtained.

[0100] Based on the above embodiment, obtaining the ideal exposure parameters in step S109 may include:

[0101] Step S1, recording the grayscale values ​​of all pixels in the exposure screening area in the under-exposure frame, normalizing the grayscale values ​​of all pixels, and obtaining the grayscale value normalization value N(k) of the under-exposure frame.

[0102] For example, select the frame N with a small exposure, and the grayscale values ​​of the pixels in the exposure screening area from 1 to n rows are G N (1) G N (2), ..., G N (k), ... G N (n), normalize the grayscale values ​​of all pixels to obtain the grayscale normalization value N(k) = 100% G N (k) / (G sat ).

[0103] Among them, G sat is the pixel grayscale saturation value.

[0104] For example, k=1, N(1)=100%G N (1) / G sat ;

[0105] k=2,N(2)=100%G N (2) / G sat ;

[0106] And so on.

[0107] Step S2: Obtain the grayscale value G of each pixel in the exposure detection image of the exposure screening area X (k).

[0108] For example, the grayscale values ​​of the pixels in rows 1 to n in the exposure screening area in the exposure detection image are G X (1) G X (2), ..., G X (k), ... G X (n).

[0109] Step S3: Expose the gray value G of the detected image X The ratio of (k) to the normalized brightness value N(k) of the frame with less exposure is taken as the expected grayscale value G X (k) / N(k).

[0110] Combined with the grayscale value normalization N(k) of the N pixels in the under-exposed frame, the grayscale value G of the exposure detection image is calculated X (k) is the ratio of the brightness normalized value N(k) of the frame with less exposure, where k=1, G X (1) / N(1); k = 2, G X (2) / N(2); ..., k = n, G X (n) / N(n).

[0111] Step S4: When the expected gray value G X (k) / N(k) determines the average exposure parameter Q of the kth row within the ideal exposure grayscale range.(k) is the ideal exposure parameter Q(ki), where i is an integer.

[0112] Specifically, for example, according to the exposure effect, detection accuracy, etc. of the exposure image, an ideal grayscale value range is pre-set. For example, the ideal grayscale value is 80% to 85% of the saturation value. When the kth row of the exposure detection frame X is exposed to obtain the grayscale value G X The ratio G of (k) to the normalized brightness value N(k) of the frame with less exposure X (k) / N(k) is within the ideal grayscale value range, and the exposure parameter Q of the kth row of the exposure detection frame X is determined. (k) is the ideal exposure parameter Q(ki) of the Kth frame, that is, the system adjusts the exposure parameter of the Kth frame to Q (k) =p avg T frame G, using an exposure detection frame X with linearly increasing power, the fine adjustment of the exposure parameters of the Kth frame can be achieved, which can greatly improve the exposure accuracy and reduce the time required for CMOS exposure adjustment.

[0113] Based on the above embodiment, the ideal exposure parameter is between the exposure parameter of the frame with larger exposure and the exposure parameter of the frame with smaller exposure.

[0114] Specifically, the exposure effect of the exposure image obtained by exposure using ideal exposure parameters should be between underexposure and overexposure.

[0115] Based on the above embodiments, Figure 3 As shown in formulas (1.1)-(1.4), the detected exposure power P is the maximum exposure power P max Such a selection is conducive to achieving the power linearity of the exposure light source 30, meeting the requirement of setting the exposure power of each row in the exposure detection frame X in step S107 to increase linearly, realizing fine adjustment of the exposure power and improving the exposure accuracy.

[0116] On the basis of the above embodiment, in step S104, a binary method may be used to obtain a frame with excessively large exposure and a frame with excessively small exposure according to the exposure parameter of the K-1th frame.

[0117] Specific, combined Figure 1 As shown in the figure, when the system detects that the exposure image of the K-1th frame is overexposed, the exposure parameter Q of the K-1th frame is set to (k-1) Divide by 2 to obtain the intermediate exposure parameter Q (k-1) / 2 for exposure; if the system detects that the exposure of the K-1th frame is too weak, the exposure parameter Q of the K-1th frame is set to (k-1) Multiply by 2 to get the intermediate exposure parameter 2Q (k-1) Make an exposure.

[0118] For example, when Q (k-1) Overexposure, execute Q (k-1) / 2 exposure; detection Q (k-1) / 2 exposure image, if it is still overexposed, execute Q (k-1) / 4 exposure; if underexposed, determine Q (k-1) / 2 is a larger frame for exposure, Q (k-1) / 4 means a smaller frame exposure.

[0119] When Q (k-1) Underexposure, execute 2Q (k-1) Exposure; Detection 2Q (k-1) Expose the image. If it is overexposed, confirm Q (k-1) For smaller exposure frames, 2Q (k-1) The exposure is too large. If it is still underexposed, execute 4Q. (k-1) Exposure, if overexposed, confirm 2Q (k-1) For smaller exposure frames, 4Q (k-1) For larger frames, exposure is preferred.

[0120] The above method is used until two adjacent exposure frames whose exposure images are respectively too weak or too strong are found, and the over-exposure frame and the under-exposure frame are determined.

[0121] Based on the above embodiment, the maximum exposure adjustment frame number R of the exposure detection frame X is: The value of is rounded up to an integer.

[0122] Among them, Q max is the maximum exposure parameter, Q min is the minimum exposure parameter.

[0123] In some embodiments, the formula

[0124] In some embodiments, the formula

[0125] By adopting the above formula of rounding upwards, the maximum number of exposure adjustment frames of the pre-increased exposure detection frames can be calculated in advance as a reference for exposure adjustment, thereby improving the efficiency of exposure adjustment.

[0126] On the basis of the above embodiment, the selection rule of the over-exposure frame and the under-exposure frame may be based on the exposure parameter of the over-exposure frame being twice the exposure parameter of the under-exposure frame.

[0127] Specifically, setting the exposure parameter of the overexposed image to twice that of the underexposed image can reduce the number of exposure detection frames X. An ideal exposure parameter can be obtained by using one exposure detection frame X, which is beneficial to improving the speed of exposure adjustment.

[0128] Based on the above embodiment, in step S110, performing exposure of the Kth frame according to the ideal exposure parameters includes:

[0129] Assign the ideal exposure parameters to the laser power, exposure time, and gain of the camera sensor.

[0130] The allocation ratio is such that the laser power is greater than the exposure time, and the exposure time is greater than the gain.

[0131] Specifically, in some embodiments, the value of the ideal exposure parameter Q(ki) is distributed to the laser power P, the exposure time T, and the CMOS gain G, and the gain of the camera sensor is selected to be as small as possible.

[0132] In some embodiments, when the moving speed of the object is relatively low, the exposure time T is increased to ensure clear low-speed video recording.

[0133] In some embodiments, when the moving speed of the object is relatively high, the exposure power P is increased and the exposure time T is reduced to meet the requirements of high-speed and clear video recording.

[0134] Based on the above embodiment, the preset range of the maximum value of the exposure screening area is the area within the range of 10% to 25% of the total diameter of the exposure light band, with the maximum value of the exposure light band as the center.

[0135] Exemplary, combined Figure 1-Figure 3 As shown, a circular area with a maximum value of the exposure light band as the center and a radius of 13% of the total diameter of the exposure light band is used as the exposure screening area. There is no need to calculate all pixel information of the camera sensor 40, which is beneficial to reducing the amount of data calculation and improving the calculation effect.

[0136] In summary, the exposure control method based on rolling shutter exposure provided in the present application, through laser modulation, CMOS drive and exposure parameter adjustment, when the system is overexposed or underexposed, by increasing the exposure detection frame, and using coarse and fine checks to find the ideal exposure parameters for the next frame, thereby achieving fine adjustment of the exposure parameters, greatly reducing the time required for CMOS exposure adjustment, greatly improving the exposure accuracy and displacement measurement accuracy, and improving the adjustment speed of the exposure parameters of the laser displacement sensor and laser profile scanner, thereby enhancing the application of the product in high-speed occasions.

[0137] Note that the above are only preferred embodiments of the present invention and the technical principles used. Those skilled in the art will understand that the present invention is not limited to the specific embodiments described herein, and that various obvious changes, readjustments, combinations and substitutions can be made by those skilled in the art without departing from the scope of protection of the present invention. Therefore, although the present invention has been described in more detail through the above embodiments, the present invention is not limited to the above embodiments, and may include more other equivalent embodiments without departing from the concept of the present invention, and the scope of the present invention is determined by the scope of the appended claims.

Claims

1. An exposure control method based on rolling exposure, used to control the exposure parameters of a camera sensor, characterized in that: The exposure control method comprises: Before exposing the Kth frame, determine whether the exposure image of the K-1th frame is within the ideal exposure grayscale range; If yes, perform exposure of the Kth frame according to the exposure parameters preset by the system; K ≥ 2, K is a positive integer; If not, before the Kth frame is exposed, an exposure detection frame is added to obtain ideal exposure parameters. The parameters of the exposure detection frame are set as follows: Adjust the exposure parameter of the K-1th frame to a preset multiple and then expose it line by line to obtain a frame with overexposure and a frame with underexposure; Taking the exposure image of the underexposed frame as a reference, selecting the maximum value of the exposure light band as the center, and the exposure area within a preset range deviating from the maximum value as the exposure screening area; The exposure parameter Q of the exposure biased frame M The ratio of the maximum exposure power Pmax is used as the row exposure time T = Q for each row in the exposure detection frame. M / P max ; The exposure power of each row in the exposure detection frame is set to increase linearly, and the exposure power of the kth row satisfies the following formula: T frame =(n-1)t σ +T; 1≤k≤n, n is the number of exposure rows; is the starting exposure power of the kth row within the row exposure time T, is the ending exposure power of the kth row within the row exposure time T; is the average exposure power of the kth row; Q (k) is the exposure parameter of the kth row of the exposure detection frame; T frame is the frame exposure time of the exposure detection frame; p is the detection exposure power; tσ is the time interval between adjacent exposure rows; G is the gain of the camera sensor; Exposing row by row according to the exposure parameters of the exposure detection frame to obtain an exposure detection image of the exposure screening area; Acquire the exposure parameters of the kth row in the exposure detection image that meet the ideal exposure grayscale range, and take the exposure parameters of the kth row in the exposure detection frame as the ideal exposure parameters; The Kth frame is exposed according to the ideal exposure parameters.

2. The exposure control method according to claim 1, characterized in that: Obtaining the exposure parameters of the kth row in the exposure detection frame that meet the ideal exposure grayscale range, and taking the exposure parameters of the kth row in the exposure detection frame as the ideal exposure parameters, including: Recording the grayscale values ​​of all pixels in the exposure screening area in the under-exposure frame, normalizing the grayscale values ​​of all pixels, and obtaining a grayscale value normalization value N(k) of the under-exposure frame; Get the gray value G of each pixel of the exposure detection image in the exposure screening area x (k); The gray value G of the exposure detection image x The ratio of (k) to the normalized grayscale value N(k) of the frame with less exposure is taken as the expected grayscale value G x (k) / N(k); When the expected gray value G x (k) / N(k) determines the average exposure parameter G of the kth row within the ideal exposure grayscale range. x (k) is the ideal exposure parameter Q(ki); where i is an integer.

3. The exposure control method according to claim 1, characterized in that: Adjust the exposure parameters of the K-1th frame to the preset multiples and then expose line by line to obtain frames with overexposure and underexposure, including: The exposure parameters of the K-1th frame are adjusted by using the binary method, and then exposed line by line to obtain frames with overexposure and frames with underexposure.

4. The exposure control method according to claim 3, characterized in that: The exposure parameter of the frame with a larger exposure is twice the exposure parameter of the frame with a smaller exposure.

5. The exposure control method according to claim 3, wherein the maximum exposure adjustment frame number R of the exposure detection frame is The value of is rounded up; in, Q max is the maximum exposure parameter, Q min is the minimum exposure parameter.

6. The exposure control method according to claim 3, characterized in that: The ideal exposure parameter is between the exposure parameter of the frame with a larger exposure and the exposure parameter of the frame with a smaller exposure.

7. The exposure control method according to claim 1, characterized in that: Exposing the Kth frame according to the ideal exposure parameters includes: assigning the ideal exposure parameters to laser power, exposure time, and gain of a camera sensor; The allocation ratio is such that the laser power is greater than the exposure time, and the exposure time is greater than the gain.

8. The exposure control method according to claim 1, characterized in that: The detection exposure power is 75% to 85% of the maximum exposure power.

9. The exposure control method according to claim 1, wherein the preset range of the maximum value of the exposure screening area is an area within a range of 10% to 13.5% of the total diameter of the exposure light band, with the maximum value of the exposure light band as the center.

10. An exposure device based on rolling shutter exposure, used to implement the exposure control method according to any one of claims 1 to 9, characterized in that: The exposure device includes an exposure light source, an illumination lens, an imaging lens, a camera sensor with a rolling shutter exposure function, a control system, and a data processing system; The control system is electrically connected to the camera sensor and the data processing system respectively; the exposure light source and the camera sensor are electrically connected to the data processing system; The illumination lens is located on the exposure light path of the exposure light source, and the imaging lens is located on the photosensitive front end surface of the camera sensor.