Active exposure method based on TOF imaging system and calculation method of exposure time

By calculating and adjusting the automatic exposure time of the TOF imaging system, the problem of overexposure or underexposure of images when the robot moves quickly is solved, and the accuracy of the image and the accuracy of the three-dimensional image are improved.

CN114697560BActive Publication Date: 2024-09-06ZHEJIANG SUNNY INTELLIGENT OPTICAL TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202011639643.2
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2020-12-31
Publication Date
2024-09-06
Estimated Expiration
2040-12-31

AI Technical Summary

Technical Problem

When the robot moves at a fast speed, the existing automatic exposure method is applied to the TOF imaging system, causing the image to be overexposed or underexposed, affecting the accuracy of the image, which may lead to incorrect operations such as robot collision.

Method used

By obtaining the changes in pose information of adjacent frames, the automatic exposure time of the current frame is calculated and adjusted to ensure the exposure accuracy of the target scene image. The specific method includes obtaining the pose information of the previous frame and the current frame, calculating the pose change, calculating the automatic exposure time based on the change amount and the grayscale histogram, and adjusting the exposure time.

Benefits of technology

This enables the TOF imaging system to obtain accurate depth information in a high-speed environment, avoids the ambiguity of depth information, and improves the accuracy of three-dimensional images.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114697560B
    Figure CN114697560B
Patent Text Reader

Abstract

The present application provides an automatic exposure method based on a TOF imaging system. The method includes: obtaining the posture information of the previous frame and the posture information of the current frame of the TOF imaging system; calculating the change between the posture information of the previous frame and the posture information of the current frame; calculating the automatic exposure time of the current frame according to the change; and adjusting the exposure time of the current frame according to the automatic exposure time. The automatic exposure method based on the TOF imaging system provided by the present application can ensure the exposure accuracy of each pixel of the target scene image of the current frame. When the TOF imaging system is in a working state, it can obtain more accurate depth information, and at the same time, it can avoid the ambiguity of the depth information obtained by the TOF imaging system, which is beneficial to the accuracy of the generated three-dimensional image.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of machine vision, and more specifically, to an automatic exposure method based on a TOF imaging system, a method for calculating an automatic exposure time, an automatic exposure device, a computer-readable medium for an electronic device, and a TOF imaging system. Background Art

[0002] At present, more and more mobile robots are equipped with visual sensors such as TOF (Time of Flight) cameras to perceive the external environment in order to achieve automatic navigation and obstacle avoidance functions.

[0003] The TOF camera emits light to the target scene, and then uses a sensor to receive the light reflected from the target scene to calculate the flight (round-trip) time of the emitted light and the reflected light, thereby obtaining the distance between the camera and the target scene. In this way, the image taken by the TOF camera has not only a conventional two-dimensional image, but also the depth information of the distance between the TOF camera and the target scene, and thus generates a three-dimensional image of the target scene.

[0004] When the robot moves at a high speed, the existing automatic exposure method applied to the TOF imaging system will cause the image generated by the TOF imaging system to be overexposed or underexposed, affecting the accuracy of the image generated by the TOF imaging system. For mobile robots, the generated image will be less accurate, causing the robot to collide and other erroneous operations. Summary of the invention

[0005] The present application provides an automatic exposure method based on a TOF imaging system, a method for calculating automatic exposure time, an automatic exposure device, an electronic device, a computer-readable medium and a TOF imaging system, which can at least partially solve the above-mentioned technical problems.

[0006] One aspect of the present application provides an automatic exposure method based on a TOF imaging system. The method includes: obtaining the posture information of the previous frame and the posture information of the current frame of the TOF imaging system; calculating the change between the posture information of the previous frame and the posture information of the current frame; calculating the automatic exposure time of the current frame according to the change; and adjusting the exposure time of the current frame according to the automatic exposure time.

[0007] In one embodiment, the step of calculating the automatic exposure time of the current frame may include: in response to the change amount being within a threshold range, acquiring first point cloud data of the target scene image of the previous frame and second point cloud data of the target scene image of the current frame; projecting a first area corresponding to the first point cloud data to a second area corresponding to the second point cloud data to obtain an overlapping area between the first area and the second area; and calculating the automatic exposure time of the current frame based on the overlapping area, wherein the overlapping area corresponds to a portion of the target scene image of the current frame.

[0008] In one embodiment, the variation includes a rotational variation and a translational variation, wherein a threshold range of the rotational variation may be greater than 10% and less than 50% of the field of view of the TOF imaging system; and a threshold range of the translational variation may be greater than 10% and less than 50% of the size of the image generated by the TOF imaging system.

[0009] In one embodiment, the step of calculating the automatic exposure time of the current frame may include: in response to the variation being greater than a maximum value of a threshold range, calculating the automatic exposure time of the current frame according to the variation.

[0010] In one embodiment, the step of calculating the automatic exposure time of the current frame may include: in response to the change amount being less than a minimum value of a threshold range, determining the automatic exposure time of the current frame as the automatic exposure time of a previous frame.

[0011] In one embodiment, the step of determining the automatic exposure time of the current frame as the automatic exposure time of the previous frame may include: determining that the proportion of underexposed or overexposed pixels of the target scene image of the previous frame is less than 20%; and determining the automatic exposure time of the current frame as the automatic exposure time of the previous frame.

[0012] In one embodiment, the step of calculating the automatic exposure time of the current frame may include: obtaining a grayscale histogram of at least a portion of the target scene image of the current frame; obtaining a first grayscale value corresponding to the first numerical value and a second grayscale value corresponding to the second numerical value according to the grayscale histogram; calculating a first ratio and a second ratio by comparing the first grayscale value and the second grayscale value with the reference grayscale value respectively; and calculating the automatic exposure time of the current frame according to the first ratio and the second ratio.

[0013] In one embodiment, the automatic exposure time of the current frame may be the product of the first ratio, the second ratio, and the automatic exposure time of the previous frame.

[0014] In one embodiment, the first value may be a value that is 3% of the maximum value of the grayscale histogram, and the second value may be a value that is 3% of the minimum value of the grayscale histogram.

[0015] In one embodiment, the step of calculating the automatic exposure time of the current frame may include: calculating the automatic exposure time of the current frame using a preset piecewise function.

[0016] In one embodiment, the step of acquiring the posture information of the previous frame and the posture information of the current frame of the TOF imaging system may include: acquiring the posture information of the previous frame and the posture information of the current frame using at least one of a visual sensor, a wheel encoder, or an inertial measurement unit.

[0017] Another aspect of the present application provides a method for calculating automatic exposure time. The method includes: obtaining a grayscale histogram of at least part of a target scene image; obtaining a first grayscale value corresponding to a first numerical value and a second grayscale value corresponding to a second numerical value according to the grayscale histogram; obtaining a first ratio and a second ratio according to comparing the first grayscale value and the second grayscale value with a reference grayscale value respectively; and calculating the automatic exposure time of the current frame according to the first ratio and the second ratio.

[0018] In one embodiment, the automatic exposure time of the current frame may be the product of the first ratio, the second ratio, and the automatic exposure time of the previous frame.

[0019] In one embodiment, the first value may be a value that is 3% of the maximum value of the grayscale histogram, and the second value may be a value that is 3% of the minimum value of the grayscale histogram.

[0020] Another aspect of the present application also provides an automatic exposure device. The device includes: an acquisition module, used to acquire the posture information of the previous frame and the posture information of the current frame of the TOF imaging system; a first calculation module, used to calculate the change between the posture information of the previous frame and the posture information of the current frame; a second calculation module, used to calculate the automatic exposure time of the current frame according to the change; and an adjustment module, used to adjust the exposure time of the current frame according to the automatic exposure time.

[0021] In one embodiment, the second calculation module can be configured to: in response to the change amount being within a threshold range, obtain first point cloud data of the target scene image of the previous frame and second point cloud data of the target scene image of the current frame; project a first area corresponding to the first point cloud data to a second area corresponding to the second point cloud data to obtain an overlapping area between the first area and the second area; and calculate the automatic exposure time of the current frame based on the overlapping area, wherein the overlapping area corresponds to a portion of the target scene image of the current frame.

[0022] In one embodiment, the second calculation module may be configured to: in response to the change amount being greater than a maximum value of the threshold range, calculate the automatic exposure time of the current frame according to the change amount.

[0023] In one embodiment, the second calculation module may be configured to: in response to the change amount being smaller than a minimum value of the threshold range, determine the automatic exposure time of the current frame as the automatic exposure time of the previous frame.

[0024] Another aspect of the present application provides an electronic device, which includes: a memory for storing a program; and a processor for executing any implementation of the automatic exposure method described above when executing the program.

[0025] Another aspect of the present application provides a computer-readable medium, on which a computer program is stored, and when the computer program is executed by a processor, any implementation of the automatic exposure method described above is executed.

[0026] Another aspect of the present application provides a TOF imaging system. The TOF imaging system includes: a light source module for emitting light to a target scene; a photosensitive module for receiving light reflected from the target scene; and a working module for controlling the light source module and the photosensitive module, and processing the reflected light received by the photosensitive module to perform any embodiment of the automatic exposure method described above.

[0027] The automatic exposure method based on the TOF imaging system provided by the present application can ensure the exposure accuracy of each pixel of the target scene image of the current frame by judging the change amount of the posture information of the adjacent frames and adjusting the automatic exposure time of the current frame. When the TOF imaging system is in the working state, it can obtain more accurate depth information. At the same time, it can also avoid the ambiguity of the depth information obtained by the TOF imaging system, which is beneficial to the accuracy of the generated three-dimensional image. BRIEF DESCRIPTION OF THE DRAWINGS

[0028] Other features, objects and advantages of the present application will become more apparent by reading the detailed description of non-limiting embodiments made with reference to the following drawings:

[0029] Figure 1 is a working principle diagram of a TOF imaging system according to an embodiment of the present application;

[0030] Figure 2 is a schematic block diagram of a TOF imaging system according to an embodiment of the present application;

[0031] Figure 3 is a flow chart of an automatic exposure method based on a TOF imaging system according to an embodiment of the present application;

[0032] Figure 4 is a flow chart of calculating the automatic exposure time of the current frame in response to the change amount being within a threshold range according to an embodiment of the present application;

[0033] Figure 5is a flow chart of a method for calculating automatic exposure time according to an embodiment of the present application; and

[0034] Figure 6 It is a schematic diagram of the structure of an electronic device suitable for implementing the automatic exposure method of the embodiment of the present application. DETAILED DESCRIPTION

[0035] In order to better understand the present application, various aspects of the present application will be described in more detail with reference to the accompanying drawings. It should be understood that these detailed descriptions are only descriptions of exemplary embodiments of the present application, and do not limit the scope of the present application in any way.

[0036] The terms used herein are for the purpose of describing specific exemplary embodiments and are not intended to be limiting. When used in this specification, the terms "comprise", "comprising", "including" and / or "comprising" indicate the presence of the features, integral bodies, elements, parts and / or combinations thereof, but do not exclude the presence of one or more other features, integral bodies, elements, parts and / or combinations thereof.

[0037] This document is described with reference to schematic diagrams of exemplary embodiments. The exemplary embodiments disclosed herein should not be construed as limited to the specific shapes and sizes shown, but include various equivalent structures that can achieve the same functions and shape and size deviations caused by, for example, manufacturing. The positions shown in the drawings are schematic in nature and are not intended to limit the positions of the components.

[0038] Unless otherwise defined, all terms (including technical and scientific terms) used herein have the same meaning as commonly understood by those of ordinary skill in the art to which the present disclosure belongs. Terms such as those defined in commonly used dictionaries should be interpreted as having a meaning consistent with their meaning in the context of the relevant art, and will not be interpreted in an idealized or overly formal sense unless explicitly defined as such herein.

[0039] The TOF imaging system can obtain the distance information from the observation point (TOF imaging system) to the target scene, and then obtain the depth information of the target scene image to generate a three-dimensional image. In addition, the TOF imaging system has the advantages of high real-time performance, stable accuracy, and small footprint. It can be implemented as a device such as a camera and is widely used in machine vision processing, such as object recognition, three-dimensional reconstruction, and mobile robot navigation.

[0040] Figure 1 Schematic diagram of the working principle of the TOF imaging system of the present application. Figure 1As shown, the TOF imaging system 100 is suitable for acquiring an image of a target scene 200. Different from a conventional imaging system, the TOF imaging system 100 can acquire three-dimensional image information of the target scene 200 to be measured according to the time of flight (TOF) method. In simple terms, the process of the TOF imaging system 100 acquiring three-dimensional image information of the target scene 200 is that the light of the target scene 200 enters the TOF imaging system 100 and is received by the image sensor of the TOF imaging system 100, and after the image sensor analyzes and processes the incoming light, the light signal carrying the image information is converted into three-dimensional image information of the target scene 200, so as to complete the shooting of the target scene 200.

[0041] Figure 2 FIG. 1 is a schematic block diagram of a TOF imaging system 100 according to an embodiment of the present application. Figure 2 As shown, the TOF imaging system 100 may include a light source module 110 , a photosensitive module 120 and a working module 130 .

[0042] The light source module 110 can actively emit light to the target scene, and the emitted light can be used as an optical signal for detecting the target scene. The light source module 110 may include at least one light source, such as a laser light source or an LED light source. In some embodiments, the light source may be implemented as a vertical cavity surface emitting laser (Vertical Cavity Surface Emitting Laser, referred to as VCSEL). The core parameter of the light source is the central wavelength, and the central wavelength may be, for example, infrared light of 850nm or 940nm. The illumination of sunlight is stronger at a wavelength of 850nm and weaker at a wavelength of 940nm. Therefore, when infrared light of 940nm wavelength is used as a light source, it is more able to avoid interference from outdoor sunlight as ambient light.

[0043] The optical signal emitted by the light source module 110 may be a modulated optical pulse or a continuous wave, and the frequency of the modulated optical pulse may reach 100 MHz.

[0044] The photosensitive module 120 can receive reflected light formed by reflection from the target scene. The reflected light signal carried by the reflected light may include distance information between the target scene and the TOF imaging system 100. The depth information of the target scene image can be obtained by correspondingly processing the distance information.

[0045] The photosensitive module 120 may include at least one image sensor, which may be, for example, a CCD image sensor or a CMOS image sensor with a high-speed shutter and exposure accumulation function. The image sensor may include a plurality of pixels arranged in a two-dimensional array. The difference from a conventional image sensor is that the image sensor applied to the TOF imaging system 100 also includes a modulation control unit and an A / D conversion unit, etc., for demodulating the reflected light signal and performing preliminary data processing. Therefore, the size of a single pixel of the image sensor applied to the TOF imaging system 100 is larger than that of a single pixel of a conventional image sensor. For example, the size of the image sensor of the TOF imaging system 100 may be 20 μm.

[0046] The working module 130 can be communicatively connected to the light source module 110 and the photosensitive module 120 to control the light source module 110 and the photosensitive module 120 and perform data interaction. It should be understood that the communication connection method is not limited to being implemented as a wired or wireless connection method, such as an electrical connection method, a signal connection method, etc.

[0047] In some embodiments, the working module 130 may include a control unit 131. The control unit 131 may control the working states of the light source module 110 and the photosensitive module 120 by transmitting control signals to the light source module 110 and the photosensitive module 120. For example, the control unit 131 may control the light source of the light source module 110 to emit light having a preset wavelength and frequency or may control the exposure time of the received reflected light of the photosensitive module 120. In other words, the light source module 110 and the photosensitive module 120 may change their working states through the working module 130. Optionally, the control unit 131 may synchronously transmit control signals to the light source module 110 and the photosensitive module 120 so that the light source module 110 and the photosensitive module 120 work synchronously, so as to improve the accuracy of the depth information of the target scene acquired by the TOF imaging system 100.

[0048] In some embodiments, the working module 130 may further include a processing unit 132. The processing unit 132 may be communicatively connected to the photosensitive module 120, and is used to receive the target scene image information collected by the photosensitive unit 120 and preliminarily processed for further processing to generate grayscale information or depth information of the image of the target scene, and then generate a three-dimensional image of the target scene.

[0049] The processing unit 132 can also be communicatively connected to the control unit 131, and is used to obtain a control signal for controlling the light source module 110 and the photosensitive module 120 after corresponding calculation and processing based on the collected partial information about the target scene image, and transmit it to the control unit 131. For example, the processing unit 132 can calculate and generate a control signal for the control unit 131 to perform automatic exposure according to a certain automatic exposure method based on the control requirements of automatic exposure, and transmit the control signal to the control unit 131 so that the control unit 131 performs the automatic exposure operation.

[0050] The working process of the TOF imaging system 100 can be described as follows. The light source module 110 emits an emission light with a preset wavelength, and the emission light is reflected after encountering the surface of the object to be measured in the target scene to form reflected light. The photosensitive module 120 can be controlled to quickly receive the reflected light in different time periods to obtain the depth information and depth information of the target scene. Specifically, after the light source module 110 emits the emission light, the photosensitive module 120 quickly exposes to obtain several pictures, and calculates the time between the emission and the reception of the emission light based on the acquisition time period or time interval of these pictures to calculate the depth information of each pixel in each picture. Moreover, the grayscale information of the target scene can be obtained while obtaining the depth information of the target scene. By integrating the depth information and the grayscale information, a three-dimensional image of the target scene is obtained.

[0051] It should be understood that the distance measurement method can be divided into direct TOF measurement method and indirect TOF measurement method according to the different modulation methods of the light source signal. In the direct TOF measurement method, the light signal appears in the form of pulses. By obtaining the time from the emission to the reception of the light pulse, the distance from the light signal reflected from the target scene to the image sensor is obtained. In the indirect TOF measurement method, the emitted light signal can be a periodic light signal after modulation, such as a sinusoidal light signal. After the emitted light signal is delayed by the round-trip distance, the phase of the light signal arriving at the image sensor changes. Through a certain phase detection technology, the phase change is calculated to obtain the distance from the light signal reflected from the target scene to the image sensor.

[0052] The present application provides an automatic exposure method 1000, which will be referred to below Figure 2 The TOF imaging system 100 is shown, and each step of the method 1000 is described in detail. The working module 130 can control the exposure time of the photosensitive module 120 through the method 1000, so that the photosensitive module 120 acquires the target scene image in an automatic exposure manner. Through the description of the method 1000, it can be further explained Figure 2 The detailed processing and mutual cooperation of each module of the TOF imaging system 100 are shown.

[0053] Figure 3FIG. 1 is a flow chart of an automatic exposure method 1000 based on a TOF imaging system according to an embodiment of the present application. Figure 3 As shown, method 1000 may include the following steps:

[0054] S110, obtaining the posture information of the previous frame and the posture information of the current frame of the TOF imaging system.

[0055] S120, calculating the change between the posture information of the previous frame and the posture information of the current frame.

[0056] S130, calculating the automatic exposure time of the current frame according to the change amount.

[0057] S140: Adjust the exposure time of the current frame according to the automatic exposure time.

[0058] In step S110, the TOF imaging system 100 may generate relative displacement with the target scene when continuously photographing the target scene. Therefore, for the initial position and posture of the TOF imaging system 100, the position and posture of the TOF imaging system 100 may be different at different times. Exemplarily, when the TOF imaging system 100 is mounted on a mobile robot, the TOF imaging system 100 may be used for navigation and scene recognition through SLAM (Simultaneous localization and mapping) technology. The movement of the robot drives the movement of the TOF imaging system 100, which may cause the position and posture of the TOF imaging system 100 to change at different times relative to the initial state, so as to capture images of the target scene at different times.

[0059] Further, in the time domain, the TOF imaging system 100 can obtain target scene images at different times by obtaining target scene images in different frames. Therefore, the TOF imaging system 100 can obtain target scene images in multiple frames to construct the target scene image of the robot under the current path. It should be understood that the current frame described in the present application can be any frame of the target scene image captured by the TOF imaging system 100 in multiple frames, and the current frame can be the next shooting cycle of the previous frame in the time domain.

[0060] Further, the posture information of the TOF imaging system 100 can be represented by position and attitude. The posture information of the TOF imaging system 100 in any frame (such as the current frame) can characterize the translation variable and rotation variable of the TOF imaging system and a reference coordinate system at the current moment. Specifically, the posture variable can be represented in the form of a vector or a matrix. For two-dimensional motion, the posture information of the TOF imaging system 100 may include three variables (x-axis displacement, y-axis displacement, and rotation in the xy plane). For three-dimensional motion, the posture information of the TOF imaging system 100 may include six variables (for example, displacement of the x, y, and z axes and rotation of the xy, xz, and yz planes).

[0061] In some embodiments, the posture information of the TOF imaging system 100 can be obtained by using a visual sensor, a wheel encoder or an inertial measurement unit (IMU) to obtain the posture information of the previous frame and the posture information of the current frame, which is used for calculating the change amount of the posture information of the previous frame and the posture information of the current frame of the TOF imaging system 100 in step S120. It should be noted that the wheel encoder and the IMU can be integrated into the TOF imaging system 100 to obtain the posture information of the previous frame and the current frame.

[0062] Those skilled in the art should understand that the method for obtaining the pose variable in step S110 in the embodiment of the present application should not be limited to this, and a combination of the above methods can also be used to obtain the pose information of adjacent frames, that is, the pose of the previous frame and the current frame. This is conducive to more accurate calculation of the change in the pose information of adjacent frames calculated in the subsequent step S120.

[0063] In step S120, the processing unit 132 may calculate and process the posture information of the previous frame and the posture information of the current frame of the TOF imaging system 100 obtained in step S110 to determine the change amount of the posture information of the previous frame and the posture information of the current frame.

[0064] When the TOF imaging system 100 is in working state, when calculating the change amount of the posture information of adjacent frames of the TOF imaging system 100, it is necessary to calculate the change amount of the posture information of adjacent frames through a fixed reference coordinate system.

[0065] Specifically, the coordinate system constructed with the position of the TOF imaging system 100 during operation as the origin can be called a rigid body coordinate system, and the reference coordinate system constructed with the initial position of the TOF imaging system 100 as the origin can be called a world coordinate system (reference coordinate system). The change in the pose information of adjacent frames of the TOF imaging system 100 can be characterized by the change in the translation variable and the rotation variable in the world coordinate system.

[0066] As described in step S110, in some embodiments, the TOF imaging system 100 can obtain the posture information of the two-dimensional motion of the TOF imaging system 100 through a wheel encoder to calculate the change in the posture information of the previous frame and the posture information of the current frame of the TOF imaging system 100.

[0067] The linear velocity v and angular velocity ω of the TOF imaging system 100 in the rigid body coordinate system can be determined by formula (1).

[0068] v=(ω l R l +ω r R r ) / 2

[0069] ω=(ω r R r -ω l R l ) / b (1)

[0070] Among them, ω l and ω r They are the angular velocities of the left and right wheels obtained by the wheel encoders, R l and R r are the radii of the left and right wheels respectively, and b is the distance between the left and right wheels.

[0071] Furthermore, according to formula (2), the angular velocity of the TOF imaging system 100 can be determined: Linear velocity in the x-axis direction And the linear velocity in the y-axis direction

[0072]

[0073] in, is the rotation matrix of the TOF imaging system 100 between adjacent frames. Furthermore, the change amount of the posture information of adjacent frames of the TOF imaging system 100 can be calculated through further calculation.

[0074] As an option, the TOF imaging system 100 may obtain the three-dimensional motion posture information of the TOF imaging system 100 through the IMU to calculate the change in the posture information of the previous frame and the posture information of the current frame of the TOF imaging system 100.

[0075] The acceleration a of the IMU at time t in the world coordinate system t,ω and the acceleration a at time t+1 t+1,ω It can be determined using formula (3).

[0076] at,ω =Q t (a t,b -B a )-g

[0077] a t+1,ω =Q t+1 (a t+1,b -B a )-g (3)

[0078] Among them, Q t and Q t+1 are the transformation expressions of the rigid body coordinate system and the world coordinate system at time t and time t+1 respectively, a is the zero bias of the IMU accelerometer, and g is the gravitational acceleration.

[0079] Furthermore, the average angular velocity at time t and time t+1 is It can be determined using formula (4).

[0080]

[0081] Among them, ω t and ω t+1 are the angular velocities at time t and t+1, respectively, and B g is the zero bias of the IMU's gyroscope.

[0082] At the same time, Q t , Q t+1 , And the time interval Δt between time t and time t+1 can satisfy formula (5).

[0083]

[0084] Thus, the average acceleration at time t and time t+1 is Linear velocity v at time t+1 t+1 and the displacement P at time t+1 t+1 It can be determined using formula (6).

[0085]

[0086]

[0087]

[0088] Among them, P t It should be understood that the method for calculating the motion parameters of the IMU at time t and time t+1 can be used to calculate the change in the pose information of the previous frame and the current frame of the TOF imaging system 100, that is, applied to the calculation of the change in the pose information of adjacent frames.

[0089] As an option, the TOF imaging system 100 can also obtain the change in the pose information of adjacent frames through the feature point method. The idea is to first extract a number of feature points from the target scene image of the current frame, and then match the feature points between the target scene images of adjacent frames. In this way, many matched feature points are obtained, and then the pose information of the TOF imaging system 100 is solved based on these feature points. The specific solution algorithm can use an ICP algorithm (Iterative Closest Point) and a reprojection algorithm to calculate the change in the pose information between the previous frame and the current frame.

[0090] In step S130 , the processing unit 132 determines the change in the posture information of the previous frame and the posture information of the current frame calculated in step S120 , and calculates the automatic exposure time of the current frame according to the corresponding determination rule.

[0091] Figure 4 FIG. 1 is a flow chart of calculating the automatic exposure time of the current frame in response to the change amount being within the threshold range according to an embodiment of the present application. Figure 4 As shown, when the processing unit 132 determines that the change amount between the posture information of the previous frame and the posture information of the current frame is within a certain threshold range, the following steps may be performed:

[0092] S131, in response to the change amount being within a threshold range, acquiring first point cloud data of a target scene image of a previous frame and second point cloud data of a target scene image of a current frame.

[0093] S132: Project a first area corresponding to the first point cloud data onto a second area corresponding to the second point cloud data to obtain an overlapping area between the first area and the second area.

[0094] S133, calculating the automatic exposure time of the current frame according to the overlapping area, wherein the overlapping area corresponds to a part of the target scene image of the current frame.

[0095] In some embodiments, when the processing unit 132 determines that the change between the posture information of the previous frame and the posture information of the current frame is greater than the maximum value of the threshold range, the processing unit 132 can calculate the automatic exposure time of the current frame according to a certain automatic exposure time calculation method.

[0096] In some embodiments, when the processing unit 132 determines that the change between the posture information of the previous frame and the posture information of the current frame is less than the minimum value of the threshold range, the automatic exposure time of the current frame may be determined as the automatic exposure time of the previous frame.

[0097] For example, the processing unit 132 may further determine the automatic exposure effect of the previous frame to determine whether to use the automatic exposure time of the previous frame in the current frame. Specifically, when the processing unit 132 determines that the ratio of overexposed or underexposed pixels in the target scene image of the previous frame generated by the automatic exposure time of the previous frame is less than 20%, it is considered that the automatic exposure effect of the target scene image generated by the automatic exposure time of the previous frame is good, and the current frame can continue to use the automatic exposure time of the previous frame as the automatic exposure time of the current frame.

[0098] In some embodiments, as described above, the pose information may include a rotation variable and a translation variable. Therefore, the threshold range of the change amount of the pose information of the previous frame and the pose information of the current frame should be defined for both, respectively. Specifically, the threshold range of the rotation change amount may be greater than 10% of the field of view of the TOF imaging system 100 and less than 50% of the field of view of the TOF imaging system 100. The threshold range of the translation change amount may be greater than 10% of the size of the image generated by the TOF imaging system 100 and less than 50% of the size of the image generated by the TOF imaging system 100.

[0099] It should be understood by those skilled in the art that the calculation method of the automatic exposure time of the previous frame may be the same as the calculation method of the automatic exposure time of the current frame. In other words, the processing unit 132 may calculate the automatic exposure time of any frame of the TOF imaging system 100 except the first frame according to the same automatic exposure time calculation method. It is worth noting that the automatic exposure time of the first frame may be pre-set to ensure that the TOF imaging system 100 enters the working state.

[0100] Figure 5 FIG. 2 is a flow chart of a method 2000 for calculating the automatic exposure time according to an embodiment of the present application. In some embodiments, the processing unit 132 may calculate the automatic exposure time of the current frame of the TOF imaging system 100 according to the method 2000 for calculating the automatic exposure time. Figure 5 As shown, method 2000 may include the following steps:

[0101] S210, obtaining a grayscale histogram of at least a portion of the target scene image.

[0102] In step S210, the processing unit 132 is communicatively connected to the photosensitive module 120 to receive the target scene image information preliminarily processed by the photosensitive module 120, and the processing unit 132 can obtain the grayscale histogram of the complete target scene image or a portion of the target scene image through a certain calculation method.

[0103] It should be noted that when the automatic exposure method 1000 adopts the method 2000 to calculate the automatic exposure time of the current frame, the grayscale histogram of the complete target scene image or the grayscale histogram of a part of the target scene image can be determined based on the change in the posture information of the adjacent frames.

[0104] S220, obtaining a first grayscale value corresponding to the first numerical value and a second grayscale value corresponding to the second numerical value according to the grayscale histogram.

[0105] In step S220, each frame of the target scene image may be composed of a plurality of pixel arrays, and each pixel has a gray value representing its brightness information. The gray histogram can reflect the gray values ​​of a plurality of pixels of the complete target scene image or a portion of the target scene image and the number corresponding to the gray values. In other words, in the gray histogram, the x-axis may represent the gray values ​​divided into different levels, and the y-axis may represent the number of pixels corresponding to the specified gray value in the image.

[0106] The processing unit 132 may extract the first grayscale value corresponding to the first value of the y-axis and the second grayscale value corresponding to the second value of the y-axis from the grayscale histogram of the complete target scene or the grayscale histogram of the partial target scene obtained in step S210. In other words, the processing unit 132 may calculate the first grayscale value and the second grayscale value corresponding to the two pixel quantities according to a certain algorithm.

[0107] In some embodiments, the first value may be 3% of the maximum value in the grayscale histogram, and the second value may be 3% of the minimum value in the grayscale histogram. In other words, the first value represents 3% of the value corresponding to the largest number of pixels in the grayscale histogram, and the second value represents 3% of the value corresponding to the smallest number of pixels in the grayscale histogram.

[0108] Step S230 , obtaining a first ratio and a second ratio by comparing the first grayscale value and the second grayscale value with the reference grayscale value respectively.

[0109] In step S230, the processing unit 132 may further calculate and process the first grayscale value and the second grayscale value in step S220. Specifically, the processing unit 132 may divide the first grayscale value by the reference grayscale to calculate a first ratio. Similarly, the processing unit 132 may divide the second grayscale value by the reference grayscale to calculate a second ratio. It should be noted that the reference grayscale value may be a pre-set reference value.

[0110] Step S240: calculating the automatic exposure time of the current frame according to the first ratio and the second ratio.

[0111] In step S240, since the exposure condition can be visually expressed as a change in grayscale, high exposure results in a higher grayscale and a brighter image, while low exposure results in a lower grayscale and a darker image, the automatic exposure time can be calculated based on the first ratio and the second ratio related to the grayscale value calculated in step S230.

[0112] In some embodiments, the automatic exposure time may be determined by the product of the first ratio, the second ratio, and the automatic exposure time of the previous frame. It should be noted that when the previous frame is the first frame of the TOF imaging system 100 entering the working state, its automatic exposure time may be a preset exposure time.

[0113] Reference again Figure 3 In step S140, the control unit 131 may adjust the automatic exposure time according to the automatic exposure time of the current frame calculated in step S130 to control the photosensitive module 120 of the TOF imaging system 100 to receive the light reflected by the target scene at the automatic exposure time, so that the TOF imaging system 100 acquires the target scene image in an automatic exposure manner.

[0114] Existing automatic exposure methods, such as global automatic exposure methods or partition sampling automatic exposure methods, cannot meet the needs of TOF imaging systems for dynamic shooting. Automatic exposure methods based on HDR (High Dynamic Range) easily lead to ambiguity in the measured distance from the TOF imaging system to the target scene when the TOF imaging system acquires a three-dimensional image in a ranging manner, thereby affecting the accuracy of the depth information of the acquired target scene image. Compared with the existing automatic exposure methods, the automatic exposure method provided in the embodiment of the present application can ensure the exposure accuracy of each pixel of the target scene image of the current frame by judging the change amount of the posture information of the adjacent frames and adjusting the automatic exposure time of the current frame. When the TOF imaging system is working, it can obtain more accurate depth information. At the same time, it can also avoid the ambiguity of the depth information acquired by the TOF imaging system, which is beneficial to the accuracy of the generated three-dimensional image.

[0115] Reference again Figure 5 According to the automatic exposure time calculation method 2000 provided in the present application, the following steps may be included:

[0116] S210, obtaining a grayscale histogram of at least a portion of the target scene image of the current frame.

[0117] S220, obtaining a first grayscale value corresponding to the first numerical value and a second grayscale value corresponding to the second numerical value according to the grayscale histogram.

[0118] S230, calculating a first ratio and a second ratio by comparing the first grayscale value and the second grayscale value with the reference grayscale value respectively.

[0119] S240: Calculate the automatic exposure time of the current frame according to the first ratio and the second ratio.

[0120] The automatic exposure time calculation method provided in the embodiment of the present application calculates the automatic exposure time through the grayscale histogram of the image, and the algorithm is simple and easy to implement.

[0121] Figure 6 3 is a schematic diagram of the structure of an electronic device 300 suitable for implementing the automatic exposure method of the embodiment of the present application. It should be understood that, Figure 6 The electronic device 300 shown is merely an example and should not bring any limitation to the functions and scope of use of the embodiments of the present application.

[0122] like Figure 6 As shown, the electronic device 300 includes one or more processors 301 (e.g., CPU), which can perform various appropriate actions and processes according to the program stored in the read-only memory (ROM) 302 or the program loaded from the storage part 306 into the random access memory (RAM) 303. In the RAM 303, various programs and data required for the operation of the electronic device 300 are also stored. The processor 301, the ROM 302, and the RAM 303 are connected to each other through a bus 304. An input / output (I / O) interface 305 is also connected to the bus 304.

[0123] The following components are connected to the I / O interface 305: a storage section 306 including a hard disk, etc.; and a communication section 307 including a network interface card such as a LAN card, a modem, etc. The communication section 307 performs communication processing via a network such as the Internet. A drive 308 is also connected to the I / O interface 305 as needed. A removable medium 309, such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, etc., is installed on the drive 308 as needed, so that a computer program read therefrom is installed into the storage section 306 as needed.

[0124] A person skilled in the art can understand that all or part of the steps in the method for implementing the above-mentioned embodiment can be completed by instructing the relevant hardware through a program, and the program can be stored in a computer-readable storage medium. When the program is executed, it includes the following steps: S110, obtaining the grayscale information of the target scene image of the calculation frame in the current frame; S120, calculating the automatic exposure time according to the obtained grayscale information; and S130, adjusting the exposure time of multiple subframes after the calculation frame in the current frame according to the automatic exposure time. The storage medium includes, for example, ROM / RAM, a disk, an optical disk, etc.

[0125] The computer program may be divided into a plurality of modules, which are stored in the memory and executed by the processor. The plurality of modules may be a series of computer program instruction segments capable of completing specific functions, and the instruction segments are used to describe the execution process of the computer program in the automatic exposure device. For example, the computer program may be divided into an acquisition module, a first calculation module, a second calculation module, and an adjustment module, and the specific functions of each module are as follows:

[0126] An acquisition module is used to acquire the posture information of the previous frame and the posture information of the current frame of the TOF imaging system;

[0127] A first calculation module is used to calculate the change between the posture information of the previous frame and the posture information of the current frame;

[0128] A second calculation module is used to calculate the automatic exposure time of the current frame according to the change amount; and

[0129] The adjustment module is used to adjust the exposure time of the current frame according to the automatic exposure time.

[0130] The above description is only a preferred embodiment of the present application and an explanation of the technical principles used. Those skilled in the art should understand that the scope of the invention involved in the present application is not limited to the technical solution formed by a specific combination of the above technical features, but should also cover other technical solutions formed by any combination of the above technical features or their equivalent features without departing from the inventive concept. For example, the above features are replaced with the technical features with similar functions disclosed in this application (but not limited to) by each other.

Claims

1. An automatic exposure method based on a TOF imaging system, characterized in that: include: Obtain the posture information of the previous frame and the posture information of the current frame of the TOF imaging system; Calculating a change between the pose information of the previous frame and the pose information of the current frame, wherein the change includes a change in a translation variable and a rotation variable in a reference coordinate system; Calculating the automatic exposure time of the current frame according to the change amount; and The exposure time of the current frame is adjusted according to the automatic exposure time.

2. The automatic exposure method according to claim 1, characterized in that: The step of calculating the automatic exposure time of the current frame includes: In response to the change amount being within a threshold range, acquiring first point cloud data of the target scene image of the previous frame and second point cloud data of the target scene image of the current frame; Projecting a first area corresponding to the first point cloud data onto a second area corresponding to the second point cloud data to obtain an overlapping area between the first area and the second area; and The automatic exposure time of the current frame is calculated according to the overlapping area, wherein the overlapping area corresponds to a part of the target scene image of the current frame.

3. The automatic exposure method according to claim 2, characterized in that: The threshold range of the change amount of the rotation variable is greater than 10% and less than 50% of the field of view of the TOF imaging system; as well as The threshold range of the change amount of the translation variable is greater than 10% of the size of the image generated by the TOF imaging system and less than 50% of the size of the image generated by the TOF imaging system.

4. The automatic exposure method according to claim 2 or 3, characterized in that: The step of calculating the automatic exposure time of the current frame includes: In response to the change amount being greater than a maximum value of the threshold range, the automatic exposure time of the current frame is calculated according to the change amount.

5. The automatic exposure method according to claim 2 or 3, characterized in that: The step of calculating the automatic exposure time of the current frame includes: In response to the change amount being smaller than a minimum value of the threshold range, the automatic exposure time of the current frame is determined as the automatic exposure time of the previous frame.

6. The automatic exposure method according to claim 5, characterized in that: The step of determining the automatic exposure time of the current frame as the automatic exposure time of the previous frame comprises: In response to the change amount being less than the minimum value of the threshold range and determining that the proportion of underexposed or overexposed pixels of the target scene image of the previous frame is less than 20%, the automatic exposure time of the current frame is determined to be the automatic exposure time of the previous frame.

7. The automatic exposure method according to claim 1, characterized in that: The step of calculating the automatic exposure time of the current frame includes: Acquire a grayscale histogram of at least a portion of the target scene image of the current frame; According to the grayscale histogram, obtaining a first grayscale value corresponding to the first value and a second grayscale value corresponding to the second value; Calculate a first ratio and a second ratio by comparing the first grayscale value and the second grayscale value with a reference grayscale value respectively; and The automatic exposure time of the current frame is calculated according to the first ratio and the second ratio.

8. The automatic exposure method according to claim 7, characterized in that: The automatic exposure time of the current frame is the product of the first ratio, the second ratio, and the automatic exposure time of the previous frame.

9. The automatic exposure method according to claim 7, characterized in that: The first value is 3% of the maximum value of the grayscale histogram, and the second value is 3% of the minimum value of the grayscale histogram.

10. The automatic exposure method according to claim 1, characterized in that: The step of calculating the automatic exposure time of the current frame includes: The automatic exposure time of the current frame is calculated using a preset piecewise function.

11. The automatic exposure method according to claim 1, characterized in that: The step of acquiring the posture information of the previous frame and the posture information of the current frame of the TOF imaging system comprises: The pose information of the previous frame and the pose information of the current frame are acquired by using at least one of a visual sensor, a wheel encoder or an inertial measurement unit.

12. An automatic exposure device, characterized in that: include: An acquisition module is used to acquire the posture information of the previous frame and the posture information of the current frame of the TOF imaging system; A first calculation module, used to calculate the change amount between the posture information of the previous frame and the posture information of the current frame, wherein the change amount includes the change amount of the translation variable and the rotation variable in the reference coordinate system; A second calculation module, configured to calculate the automatic exposure time of the current frame according to the variation; and An adjustment module is used to adjust the exposure time of the current frame according to the automatic exposure time.

13. The automatic exposure device according to claim 12, characterized in that: The second computing module is configured as follows: In response to the change amount being within a threshold range, acquiring first point cloud data of a target scene image of a previous frame and second point cloud data of a target scene image of a current frame; Projecting a first area corresponding to the first point cloud data onto a second area corresponding to the second point cloud data to obtain an overlapping area between the first area and the second area; as well as The automatic exposure time of the current frame is calculated according to the overlapping area, wherein the overlapping area corresponds to a part of the target scene image of the current frame.

14. The automatic exposure device according to claim 12, characterized in that: The second computing module is configured as follows: In response to the change amount being greater than a maximum value of a threshold range, the automatic exposure time of the current frame is calculated according to the change amount.

15. The automatic exposure device according to claim 12, characterized in that: The second computing module is configured as follows: In response to the change amount being smaller than a minimum value of a threshold range, the automatic exposure time of the current frame is determined as the automatic exposure time of a previous frame.

16. An electronic device, characterized in that include: Memory, used to store programs; A processor, configured to execute the method according to any one of claims 1 to 10 when executing the program.

17. A computer readable medium, characterized in that A computer program is stored thereon, and when the computer program is executed by a processor, the method according to any one of claims 1 to 10 is performed.

18. A TOF imaging system, characterized in that: include: A light source module, used for emitting light to a target scene; A photosensitive module, used for receiving the light reflected by the target scene; A working module is used to control the light source module and the photosensitive module, and process the reflected light received by the photosensitive module to execute the method as claimed in any one of claims 1 to 10.