Unmanned system posture estimation method, device, computer equipment and storage medium
Through the combination of event cameras and traditional cameras and sliding window graph optimization, the tight coupling of unmanned system pose estimation is achieved, solving the pose estimation problem under rapid motion and extreme light intensity changes, and improving stationary performance through zero-speed update The pose estimation results under the state improve the accuracy and efficiency of the estimation.
Patent Information
- Application Number
- CN202311704631.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-12-12
- Publication Date
- 2024-09-20
- Estimated Expiration
- 2043-12-12
AI Technical Summary
Existing unmanned system pose estimation methods can easily lead to dynamic blur and pose estimation divergence during rapid motion or extreme light intensity changes, and errors when stationary lead to pose drift, making it impossible to achieve accurate estimation.
Using event cameras combined with traditional cameras, event frames are integrated through spatiotemporal window synchronization and motion compensation, combined with sliding window graph optimization and adaptive tight coupling judgment, constructing a cost function and performing nonlinear optimization, and utilizing the tight coupling of GNSS, IMU and visual sensors. Pose estimation is performed, and zero-velocity updates are performed when stationary to suppress pose divergence.
It achieves accurate pose estimation when moving quickly in scenes with large illumination changes, improves the accuracy and robustness of pose estimation, reduces the amount of calculation, and enhances the pose estimation results in a stationary state.
Smart Images

Figure CN117726678B
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of posture estimation, and in particular to a method, device, computer equipment and storage medium for estimating the posture of an unmanned system. Background Art
[0002] At present, the conventional unmanned system pose estimation method is to use GNSS, traditional cameras and IMU to perform pose estimation. GNSS provides global drift-free positioning information, the camera provides rich visual information for visual feature tracking, and IMU can estimate the pose of the sensor platform. These three sensors are highly complementary in different navigation scales and scenarios. After the three sensors use their own characteristics to estimate the pose of the system, the pose estimation of the unmanned system can be obtained by fusing the results of their respective pose estimations.
[0003] The limitations of existing technologies in practical applications are that, on the one hand, due to its low frame rate, the imaging is prone to dynamic blur when the unmanned system platform moves faster; and the clarity of the image cannot be guaranteed under extreme light intensity changes. The unmanned system is easily affected by the above situation when it is in motion or the scene changes, resulting in divergence or even failure of pose estimation; on the other hand, for sensor data fusion, although loose coupling has higher computational efficiency, loose coupling does not consider the inherent constraints of several sensors, and the pose estimation of the system is easily affected by one sensor, and cannot solve problems in some degraded scenarios; in addition, when the unmanned system is stationary, the speed of the unmanned system platform is zero, and the measurements of GNSS, vision, and IMU are still occurring. Errors may cause deviation propagation and cause pose estimation to diverge, causing the pose estimation results to drift near the stationary position, making it impossible to achieve accurate pose estimation. Summary of the invention
[0004] In order to solve the above technical problems, the present invention provides a method, device, computer equipment and storage medium for unmanned system pose estimation, which suppresses the divergence of pose estimation when the unmanned system platform is stationary by tightly coupling multiple sensors and utilizing the static characteristics of the unmanned system, so as to achieve the technical effect of improving the accuracy of the unmanned system pose estimation results.
[0005] In a first aspect, the present invention provides a method for estimating a posture of an unmanned system, the method comprising:
[0006] Acquire image frames of a conventional camera and events of an event camera, and synchronize spatiotemporal windows of the events on timestamps of the image frames;
[0007] Through motion compensation, the events in each spatiotemporal window are integrated into event frames;
[0008] Extracting and tracking feature points of the image frame and the event frame to obtain corner feature points;
[0009] A system state vector based on the corner feature points is constructed using a sliding window graph optimization method;
[0010] Perform adaptive tight coupling judgment on the unmanned system, build a cost function based on the judgment results, perform static detection on the unmanned system, and update the cost function based on the detection results;
[0011] According to the updated cost function, the system state vector is solved by nonlinear optimization to obtain the pose estimation result of the unmanned system.
[0012] Furthermore, the step of performing adaptive tight coupling judgment on the unmanned system and constructing a cost function according to the judgment result includes:
[0013] According to the GNSS data, it is determined whether the number of received satellites is less than the satellite threshold. If so, a cost function is constructed based on the traditional camera reprojection residual, the event camera reprojection residual and the IMU residual. Otherwise, a cost function is constructed based on the traditional camera reprojection residual, the event camera reprojection residual, the IMU residual and the GNSS residual.
[0014] Determine whether the unmanned system satisfies an event camera enabling condition. In response to not satisfying the event camera enabling condition, remove the event camera reprojection residual from the cost function. The event camera enabling condition includes a speed condition and / or a grayscale condition. The speed condition includes that the speed of the unmanned system is greater than a speed threshold. The grayscale condition includes that the average grayscale value of the image frame is within a grayscale threshold range and the average grayscale value change rate is greater than a change rate threshold.
[0015] Furthermore, the step of performing a stationary detection on the unmanned system and updating the cost function according to the detection result includes:
[0016] A stationary detection is performed on the unmanned system. In response to the detection result being a stationary state, a velocity residual, a position residual, and a rotation residual are added to a cost function, and the cost function is updated.
[0017] Furthermore, the step of performing stationary detection on the unmanned system includes:
[0018] Performing a stationary detection on the unmanned system through the IMU to obtain a first detection result;
[0019] Performing a stationary detection on the unmanned system by using a traditional camera or an event camera to obtain a second detection result;
[0020] When the first detection result and the second detection result are both in a stationary state, it is determined that the unmanned system is in a stationary state.
[0021] Furthermore, the step of performing stationary detection on the unmanned system by using a traditional camera or an event camera to obtain a second detection result includes:
[0022] When a conventional camera is used to perform stationary detection on an unmanned system, the image frames are arranged in time sequence and feature point matching is performed on adjacent image frames;
[0023] Calculate the pixel difference between the matching feature points, filter the matching feature points according to the pixel difference, and extract the maximum pixel difference from the pixel differences corresponding to the filtered matching feature points;
[0024] The maximum pixel difference value is compared with a pixel difference threshold, and a second detection result is obtained according to the comparison result.
[0025] Furthermore, the step of performing stationary detection on the unmanned system by using a traditional camera or an event camera to obtain a second detection result includes:
[0026] When the unmanned system is detected stationary by the event camera, the number of events occurring in the event camera accumulated between two adjacent timestamps of the traditional camera is calculated;
[0027] The event number is compared with an event threshold, and a second detection result is obtained according to the comparison result.
[0028] Furthermore, the cost function constructed according to the traditional camera reprojection residual, event camera reprojection residual, IMU residual and GNSS residual is expressed as follows:
[0029]
[0030] In the formula, χ represents the system state vector, e m represents the marginalized residual, W m represents the weight of the marginalized residual, represents the reprojection residual of the event camera, represents the weight of the reprojection residual of the event camera, represents the reprojection residual of the traditional camera, represents the weight of the reprojection residual of the traditional camera, represents the IMU residual, represents the weight of the IMU residual, represents the GNSS residual, represents the weight of GNSS residual, ζ and ξ represent the set of event frame feature points and the set of image frame feature points respectively, l represents the lth image frame corner feature in the image frame corner feature tracking sequence, and k represents the kth key frame image;
[0031] The velocity residual is expressed as follows:
[0032]
[0033] The position residual is expressed as follows:
[0034]
[0035] The rotation residual is expressed as follows:
[0036]
[0037] In the formula, represents the velocity of the IMU at the kth key frame in the world coordinate system, represents the position of the kth keyframe of the IMU in the world coordinate system, Represents the orientation quaternion of the IMU at the kth keyframe in the world coordinate system.
[0038] In a second aspect, the present invention provides an unmanned system posture estimation device, the device comprising:
[0039] A spatiotemporal window synchronization module, for acquiring image frames of a conventional camera and events of an event camera, and synchronizing the spatiotemporal windows of the events on the timestamps of the image frames;
[0040] An event frame synthesis module is used to integrate events in each spatiotemporal window into event frames through motion compensation;
[0041] A feature point extraction module, used to extract and track feature points of the image frame and the event frame to obtain corner feature points;
[0042] A sliding window graph optimization module is used to construct a system state vector based on the corner feature points by using a sliding window graph optimization method; perform adaptive tight coupling judgment on the unmanned system, construct a cost function according to the judgment result, perform stationary detection on the unmanned system, and update the cost function according to the detection result;
[0043] The nonlinear optimization solution module is used to solve the system state vector using nonlinear optimization according to the updated cost function to obtain the pose estimation result of the unmanned system.
[0044] In a third aspect, an embodiment of the present invention further provides a computer device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the steps of the above method when executing the computer program.
[0045] In a fourth aspect, an embodiment of the present invention further provides a computer-readable storage medium having a computer program stored thereon, wherein the computer program implements the steps of the above method when executed by a processor.
[0046] The present invention provides a method, device, computer equipment and storage medium for unmanned system pose estimation. The present invention assists the pose estimation of the unmanned system by making full use of the characteristics of the event camera, so that the unmanned system can still accurately perform pose estimation when it moves quickly in a scene with large changes in illumination. The sliding window graph optimization method is used to achieve tight coupling of traditional cameras, event cameras, global navigation satellite systems and inertial sensors, and adaptive adjustment of tight coupling between different sensors is achieved according to different scene settings. At the same time, the event camera, traditional camera and inertial sensor are used to detect static scenes, which effectively suppresses the divergence of pose estimation when the unmanned system platform is stationary. The error amount is corrected by zero-speed update, which improves the pose estimation result in a stationary state, and further improves the accuracy of the pose estimation result of the unmanned system. BRIEF DESCRIPTION OF THE DRAWINGS
[0047] Figure 1 is a schematic flow chart of a method for estimating the posture of an unmanned system in an embodiment of the present invention;
[0048] Figure 2 is a schematic diagram of a spatiotemporal window of an event in an embodiment of the present invention;
[0049] Figure 3 is another flow chart of the method for estimating the posture of an unmanned system in an embodiment of the present invention;
[0050] Figure 4 is a schematic structural diagram of an unmanned system posture estimation device in an embodiment of the present invention;
[0051] Figure 5 It is a diagram of the internal structure of a computer device in an embodiment of the present invention. DETAILED DESCRIPTION
[0052] In order to make the purpose, technical solution and advantages of the embodiments of the present invention clearer, the technical solution in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0053] Before describing the technical solution of the present invention, the related technologies involved in the present invention are described first. Conventional cameras can provide rich information about the environment in real time most of the time, such as in low-speed and well-lit scenes, but they lose their function in fast motion or poor lighting conditions, such as high dynamic range or low-light scenes. Event cameras are bionic visual sensors. Event cameras such as dynamic visual sensors (DVS) only transmit intensity changes instead of standard intensity frames. In the pixel array, each pixel independently generates an output whenever the intensity change exceeds a threshold, and the output is called an "event". The data output by the event camera is an asynchronous event stream in time and space. Since all pixels capture light independently, the event camera is not affected by motion blur and has a very high dynamic range. It can provide reliable visual information during high-speed motion or in scenes with high dynamic range characteristics, thereby overcoming the limitations of traditional cameras in dealing with high-speed motion scenes and high dynamic range scenes. However, when the amount of motion is limited, such as in the case of almost stationary motion, the event camera only outputs very little information. In addition, GNSS (Global Navigation Satellite System) refers to the global navigation satellite system, which is an air-based radio navigation and positioning system that can provide users with all-weather 3D coordinates, speed and time information at any location on the earth's surface or near-earth space. IMU (Inertial Measurement Unit) is an inertial measurement unit, also known as an inertial sensor, which is mainly used to detect and measure acceleration and rotational motion.
[0054] See also Figure 1 , a method for estimating the posture of an unmanned system proposed in the first embodiment of the present invention, comprising steps S10 to S50:
[0055] Step S10, acquiring image frames of a conventional camera and events of an event camera, and synchronizing a spatiotemporal window of the event on the timestamps of the image frames;
[0056] Step S20, integrating the events in each spatiotemporal window into an event frame through motion compensation;
[0057] Step S30, extracting and tracking feature points of the image frame and the event frame to obtain corner feature points;
[0058] Step S40, constructing a system state vector based on the corner feature points using a sliding window graph optimization method;
[0059] Step S50, performing adaptive tight coupling judgment on the unmanned system, constructing a cost function according to the judgment result, performing stationary detection on the unmanned system, and updating the cost function according to the detection result;
[0060] Step S60, according to the updated cost function, nonlinear optimization is used to solve the system state vector to obtain a pose estimation result of the unmanned system.
[0061] In order to overcome the limitation of traditional cameras in dealing with high-speed motion scenes and high dynamic range scenes, the present invention adds an event camera to assist in the pose estimation of the unmanned system, so that the unmanned system can still accurately estimate the pose when it moves quickly in scenes with large changes in lighting. First, the image frames taken by the traditional camera and the events taken by the event camera are synchronized, that is, the spatiotemporal window of the event is synchronized with the timestamp of the image frame of the traditional camera. After receiving an image frame at time t, a corresponding spatiotemporal window W of the event is created, such as Figure 2 As shown, the points represent events, the arrow segments represent the spatiotemporal windows of events, and the kth window is recorded as the set of event points in the spatiotemporal window:
[0062]
[0063] Where N represents the size of the spatiotemporal window, j(t k ) is the index of the first event, and the trigger timestamp t j <t k , the duration of each window is inversely proportional to the event generation rate.
[0064] Virtual frames are then synthesized from the spatiotemporal windows of events by motion compensation, i.e., after correcting the motion of each event according to its individual timestamp, the set of events within each spatiotemporal window of events is assembled into an event frame by drawing each event on the image plane:
[0065]
[0066] The number of events generated by the event point in each spatiotemporal window at the image plane position x is the grayscale value, x i It is event i The pixel coordinates of , δ(x) is the impulse function.
[0067] In order to solve the problem that too many events in the spatiotemporal window cause the position of the event point to shift and the image edge to become coarse, motion compensation is introduced in this embodiment to correct the event frame. The corrected event frame is expressed as follows:
[0068]
[0069]
[0070] Among them, x i ′ is the event e i Corrected pixel coordinates, π e(·) is the projection model of the event camera, is the posture transformation from time i to time k, obtained by IMU integration, Z(x i ) is t i Time i The corresponding depth is estimated by the reprojection model.
[0071] After obtaining the image frame and event frame, the Fast corner detection method can be used to extract the feature points on the frame, and the KLT optical flow method is used to track the feature points extracted from the event frame and the image frame. For both cameras, each extracted feature point is regarded as a candidate feature point, and then the candidate feature points are tracked on multiple frames. Once the feature point can be reliably triangulated, the corresponding 3D landmark points are linearly triangulated and converted into long-term feature points, which will be further tracked in the next frame. Once the number of tracked feature points is less than 50, the feature points on the two cameras will be re-detected to obtain the frame feature points.
[0072] The next step is to perform sliding window graph optimization, that is, to define the complete system state vector in the sliding window:
[0073]
[0074] χ b =[X1,...,X K ]
[0075] In the formula, λ e and λ c are the inverse depth of the mth feature point in the event frame and image frame, respectively. is the external parameter from the event camera to the IMU, is the external parameter from the traditional camera to the IMU, χ b is the optimization variable in the sliding window, K is the total number of key frames in the sliding window, and the system state X of the Kth key frame K The position of the IMU in the world coordinate system direction quaternion speed Accelerometer bias and gyro bias Composition, namely:
[0076]
[0077] Then, the maximum a posteriori estimate of χ is solved by nonlinear optimization to obtain the pose estimation result of the unmanned system. The construction of the cost function used for the nonlinear optimization solution is based on the tight coupling of multiple sensors. Specifically, the camera trajectory and the position of the 3D landmark can be continuously optimized by minimizing the cost function of the visual residual (reprojection error), IMU residual, and GNSS residual involved, thereby effectively integrating the visual, inertial and GNSS information to perform pose estimation of the unmanned system. In order to improve the efficiency of pose estimation and the accuracy of the estimation result, the present invention also provides an adaptive tight coupling determination method to achieve tight coupling of multiple sensors in different scenarios. The specific steps include:
[0078] Step S501, judging whether the number of received satellites is less than the satellite threshold according to the GNSS data, if so, constructing a cost function according to the traditional camera reprojection residual, the event camera reprojection residual and the IMU residual, otherwise, constructing a cost function according to the traditional camera reprojection residual, the event camera reprojection residual, the IMU residual and the GNSS residual;
[0079] Step S502, determining whether the unmanned system satisfies an event camera enabling condition, and in response to not satisfying the event camera enabling condition, removing the event camera reprojection residual from the cost function, wherein the event camera enabling condition includes a speed condition and / or a grayscale condition, wherein the speed condition includes that the speed of the unmanned system is greater than a speed threshold, and the grayscale condition includes that the average grayscale value of the image frame is within a grayscale threshold range and the average grayscale value change rate is greater than a change rate threshold.
[0080] In this embodiment, under normal circumstances, a cost function can be constructed by tightly coupling a traditional camera, an event camera, an IMU, and a GNSS, wherein the cost function is expressed by the following formula:
[0081]
[0082] Where χ represents the state vector of the unmanned system, e m represents the marginalized residual, W m represents the weight of the marginalized residual, represents the reprojection residual of the event camera, represents the weight of the reprojection residual of the event camera, represents the reprojection residual of the traditional camera, represents the weight of the reprojection residual of the traditional camera, represents the IMU residual, represents the weight of the IMU residual, represents the GNSS residual, Represents the weight of the GNSS residual, l represents the lth image frame corner feature in the image frame corner feature tracking sequence, k represents the kth key frame image, ζ and ξ represent the set of event frame feature points and the set of image frame feature points, respectively, which have been successfully tracked or matched at least twice in the current sliding window. After the cost function is expressed, the Ceres optimizer is used to solve this nonlinear problem to obtain the pose estimation result of the unmanned system.
[0083] It can be seen that the cost function is constructed by traditional camera reprojection residual, event camera reprojection residual, IMU residual and GNSS residual. The following is an explanation of these four residuals:
[0084] ① Traditional camera reprojection residual
[0085] The reprojection residual of the feature point of the lth event frame first observed in the i-th key frame in the k-th key frame can be defined as:
[0086]
[0087] in, is the pixel coordinate of the feature point of the lth image frame observed for the first time in the i-th key frame; are the pixel coordinates of the same image frame feature observed in the kth keyframe.
[0088] π c (·) is the projection model of a traditional camera; represents the transformation matrix from the IMU frame to the world frame at timestamp i, is the transformation matrix from the world frame to the IMU frame in the kth key frame.
[0089] ② Event camera reprojection residual
[0090] The reprojection residual of the feature point of the lth event frame first observed in the i-th key frame in the k-th key frame can be defined as:
[0091]
[0092] in, is the pixel coordinate of the feature point of the lth image frame observed for the first time in the i-th key frame; is the pixel coordinate of the same image frame feature observed in the kth key frame. e (·) is the projection model of the event camera; represents the transformation matrix from the IMU frame to the world frame at timestamp i, is the transformation matrix from the world frame to the IMU frame in the kth key frame.
[0093] ③IMU residual
[0094] Time t k When IMU angular velocity and ω k Acceleration k The original measurement of is:
[0095]
[0096]
[0097] where n a and n ω is additive Gaussian white noise, g w is the gravity vector in the world system, represents the three-axis acceleration measured by the k-frame IMU; a k It is expressed as the actual value of acceleration at time k; Represents the rotation matrix of the kth key frame image from the world system to the machine system; Indicates the bias of IMU acceleration of k frames; represents the three-axis angular velocity measured by the k-frame IMU; ω k represents the actual value of angular velocity at time k; Indicates the bias of the IMU angular velocity of frame k.
[0098] Given a key frame b k and b k+1 The corresponding time interval [t k ,t k+1 ]. Using the gyroscope and accelerometer The corresponding time interval is expressed in world frames:
[0099]
[0100]
[0101]
[0102] In order to ensure that the pre-integrated term is only related to [t k ,t k+1 ] is related to the IMU measurement value and the deviation, and is discretized to obtain the pre-integration term:
[0103]
[0104]
[0105]
[0106] Therefore, the IMU residual It can be expressed as:
[0107]
[0108] In the formula, [·] xyz Indicates that the orientation quaternion used to represent the error state has been extracted The vector part of Represents quaternion multiplication; Represents the rotation matrix from the IMU coordinate system to the world system at time k; Indicates the position of the IMU coordinate system in the world coordinate system at time (k+1); represents the velocity of the IMU coordinate system at time (k+1) in the world coordinate system; Δt represents two consecutive key frame images b k and b k+1 The time interval between k and (k+1); g w It represents the gravity vector in the world coordinate system; Represents two consecutive key frame images b k and b k+1 Pre-integrated estimates of position, velocity, and angular velocity within the time interval; Indicates the IMU acceleration bias at time (k+1); Indicates the IMU angular velocity bias at time (k+1).
[0109] ④GNSS residual
[0110] Time t j The global position measurement at time is given by and additive white Gaussian noise n p constitute:
[0111]
[0112] Given time t k When the current sliding window X k The state and time t in j (t j ∈[t k ,t k+1 ]) The global position residual is defined as:
[0113]
[0114] in Converted to
[0115]
[0116] The present invention synthesizes event frames from the spatiotemporal window of the event, and then uses classic computer vision methods to perform feature detection and tracking. Finally, by minimizing the cost function of the visual residual (reprojection error), IMU residual, and GNSS residual involved, the camera trajectory and the position of the 3D landmark are continuously optimized, and the visual, inertial and GNSS information are effectively integrated to perform the pose estimation of the unmanned system. The present invention utilizes the characteristics of the event camera to assist the pose estimation of the unmanned system, so that the unmanned system can still accurately perform pose estimation when it moves rapidly in a scene with large illumination changes, and solves the problem that the traditional camera imaging is prone to dynamic blur when the unmanned system platform moves faster; the clarity of the image cannot be guaranteed under extreme light intensity changes, and the unmanned system is easily affected by the above situation when it moves or the scene changes, resulting in the divergence or even failure of pose estimation. In addition, the present invention also utilizes the sliding window graph optimization method to realize the tight coupling of the four sensors of the traditional camera, event camera, GNSS and IMU, and solves the problem that the existing sensor data fusion adopts a loose coupling method without considering the inherent constraints of several sensors, and the pose estimation of the system is easily affected by one sensor and thus cannot solve some degraded scenes.
[0117] From the above description, it can be seen that the present invention realizes the tight coupling of four sensors: traditional camera, event camera, GNSS and IMU. However, in practical applications, GNSS may be unavailable. In this case, the steps of constructing the cost function will be different from the above steps. Specifically, when the unmanned system is in a strong shielding or indoor environment, the number of received satellites may be less than 5, resulting in a large error in the calculated global position. If the GNSS residual is still added to the cost function for solution, it will affect the solution of the optimizer and cause the pose estimation of the unmanned system to fail. Therefore, when it is detected that the number of received satellites is less than 5, the GNSS residual is removed from the cost function. The cost function at this time is:
[0118]
[0119] Furthermore, since the image processing part of the event camera needs to consume more computing resources, in order to reduce the amount of calculation, this embodiment also performs an adaptive determination on whether to enable the event camera. Specifically, since the image processing part of the event camera needs to consume more computing resources, and in many cases the traditional camera can normally cope with the motion of the unmanned system, this embodiment only adds the event camera reprojection residual to the cost function for solution when the unmanned system is in rapid motion, or the light is extremely dark, overexposed, or the light changes suddenly. Taking the cost function under the above conventional circumstances as an example, when the activation condition of the event camera is not met, the cost function can be expressed as:
[0120]
[0121] There are two ways to judge the event camera startup conditions. One is the speed judgment. When the speed of the unmanned system is greater than 10m / s, it is considered that the unmanned system is in rapid motion. At this time, the event camera is needed to assist the traditional camera. Therefore, the event camera reprojection residual can be added to the cost function for solution. The other is the judgment of image grayscale. When the average grayscale value of the image captured by the traditional camera is less than 80 and greater than 180, and the rate of change of the average grayscale value is greater than 20, it is considered that the image frame of the traditional camera cannot effectively meet the requirements of pose estimation. At this time, the event camera reprojection residual can be added to the cost function for solution. Of course, if the number of received satellites and the activation conditions of the event camera are not met, the cost function is actually the cost function corresponding to the normal situation, with the GNSS residual and the event camera reprojection residual removed.
[0122] The adaptive adjustment method provided in this embodiment can enable the unmanned system to adaptively perform tight coupling between different sensors according to different scenarios, which effectively reduces the amount of calculation while ensuring the accuracy of the unmanned system's pose estimation results, thereby improving the efficiency of the pose estimation calculation.
[0123] Furthermore, in practical applications, there is also a situation in unmanned systems where, when the unmanned system is stationary, the speed of the unmanned system platform is zero, and the measurements of GNSS, vision, and IMU are still occurring. Errors may cause deviation propagation and cause the divergence of the pose estimation, causing the pose estimation result to drift near the stationary position. In order to solve this problem, the present invention also adds a zero-speed correction to update the cost function before solving the system state vector to improve the pose estimation result in the stationary state, thereby suppressing the divergence of the pose estimation when the unmanned system platform is stationary and increasing the robustness of the pose estimation. The specific update steps include:
[0124] Step S503, performing a stationary detection on the unmanned system, and in response to the detection result being a stationary state, adding the speed residual, the position residual and the rotation residual to the cost function, and updating the cost function.
[0125] In this embodiment, the unmanned system is detected to be stationary by using an IMU, a traditional camera or an event camera. The specific detection steps are as follows:
[0126] Performing a stationary detection on the unmanned system through the IMU to obtain a first detection result;
[0127] Performing a stationary detection on the unmanned system by using a traditional camera or an event camera to obtain a second detection result;
[0128] When the first detection result and the second detection result are both in a stationary state, it is determined that the unmanned system is in a stationary state.
[0129] In this embodiment, the static detection of unmanned systems is based on IMU detection, and auxiliary detection is performed by traditional cameras or event cameras to ensure the accuracy of the detection results. Among them, when using IMU for zero-speed detection of unmanned systems, acceleration sliding variance detection and angular velocity sliding variance detection can be used to make a preliminary judgment of zero speed. The three-axis output vector sum of the accelerometer in the IMU should be stable near the local gravity acceleration value, and the variance of the output values of the three axes of the gyroscope should be close to 0. The size is set to L w The sliding window is set by the acceleration variance threshold a t and angular rate variance threshold b t Detect zero-speed state. The sliding window size and threshold here need to be adjusted according to the actual situation and the IMU period. The specific detection steps can refer to the conventional steps of IMU zero-speed detection, which will not be repeated here. Although IMU can be used to detect static scenes, when the unmanned system platform is moving at a constant speed, the acceleration is zero, making it impossible for IMU to accurately identify static and constant-speed motion. Therefore, after the IMU initially detects that the unmanned system is at zero speed, this embodiment also uses a traditional camera or event camera for auxiliary judgment. Among them, the steps of using a traditional camera to perform static detection of the unmanned system include:
[0130] When a conventional camera is used to perform stationary detection on an unmanned system, the image frames are arranged in time sequence and feature point matching is performed on adjacent image frames;
[0131] Calculate the pixel difference between the matching feature points, filter the matching feature points according to the pixel difference, and extract the maximum pixel difference from the pixel differences corresponding to the filtered matching feature points;
[0132] The maximum pixel difference value is compared with a pixel difference threshold, and a second detection result is obtained according to the comparison result.
[0133] In this embodiment, the image frames taken by the traditional camera are first sorted according to time to form a time-series image frame, and the feature points in the image frame are matched, and then the pixel difference between the matched feature points in the adjacent image frames is calculated. If the pixel difference is less than the pixel threshold, it can be determined that the unmanned system is in a stationary state. However, in actual applications, if there are a small number of dynamic objects in the field of view, it may cause the stationary detection to fail. This is because the matched feature points on the dynamic objects will cause a large pixel difference. In order to eliminate the influence of a small number of dynamic objects on the detection results, in this embodiment, the matched feature points are filtered according to the pixel difference, that is, 10 matching feature points with the largest pixel difference are deleted, and then the value with the largest pixel difference is extracted from the remaining matching feature points. The maximum pixel difference is then compared with the threshold. If it is still less than the threshold, it is determined that the unmanned system is in a stationary state. In this way, the accuracy of the traditional camera's detection of the stationary state of the unmanned system can be effectively improved. When both the IMU and the traditional camera detect that the unmanned system is in a stationary state, it is determined that the unmanned system is in a stationary state at this time.
[0134] When using an event camera to perform stationary detection on an unmanned system, the steps are:
[0135] When the unmanned system is detected stationary by the event camera, the number of events occurring in the event camera accumulated between two adjacent timestamps of the traditional camera is calculated;
[0136] The event number is compared with an event threshold, and a second detection result is obtained according to the comparison result.
[0137] For the event camera, when the unmanned system is in a stationary state, according to the principle of event camera generating events, the number of events output by the event camera should be zero. However, due to the large noise in the event camera and the interference of dynamic objects in the environment, some events will still be generated. Therefore, in this embodiment, the number of events of the event camera accumulated between two adjacent timestamps of the traditional camera is calculated to determine whether the unmanned system is in a stationary state. That is, when the number of events is less than the threshold, the unmanned system is considered to be in a stationary state. This method can reduce the interference of dynamic objects on the event camera and improve the accuracy of the event camera's stationary detection. Similarly, when the detection results of the IMU and the event camera are both in a stationary state, it is determined that the unmanned system is in a stationary state at this time.
[0138] When the unmanned system is determined to be in a stationary state, this embodiment adds the velocity residual, position residual and rotation residual to the cost function for constraint on the basis of the original cost function, that is, the error amount is corrected through zero-speed update, thereby suppressing the posture drift generated by the unmanned system platform when it is stationary and improving the posture estimation result in the stationary state.
[0139] Among them, the velocity residual can be expressed as:
[0140]
[0141] The position residual can be expressed as:
[0142]
[0143] The rotation residual can be expressed as:
[0144]
[0145] If the cost function constructed after adaptive tight coupling judgment is the cost function under normal circumstances, the cost function after zero-speed update can be expressed as:
[0146]
[0147] The present invention utilizes event cameras, traditional cameras, and IMUs to detect static scenes, suppresses the divergence of pose estimation when the unmanned system platform is stationary, corrects the error through zero-speed updating, and effectively improves the pose estimation result in a stationary state.
[0148] See also Figure 3 In a preferred embodiment, the present invention obtains frame feature points by detecting and tracking feature points of event cameras and traditional cameras, and initializes the visual inertial odometer EVIO based on the event camera in combination with the pre-integration processing of the IMU. After preprocessing and initializing the GNSS information, adaptive detection is used to adapt to different scenarios for tight sensor coupling, thereby saving computing resources, and the error amount is corrected through zero-speed updating, thereby suppressing the divergence of the pose estimation of the unmanned system when it is stationary. Finally, the state estimation of the unmanned system is performed through sliding window graph optimization, thereby realizing the pose estimation of the unmanned system.
[0149] This embodiment provides a method for estimating the pose of an unmanned system. The present invention utilizes the characteristics of an event camera to assist in the pose estimation of the unmanned system, so that the unmanned system can still accurately perform pose estimation when it moves quickly in a scene with large changes in illumination, and uses a sliding window graph optimization method to achieve tight coupling of four sensors: traditional camera, event camera, GNSS and IMU, thereby achieving pose estimation with higher accuracy. Furthermore, the present invention uses an adaptive adjustment method to enable the unmanned system to adaptively perform tight coupling between different sensors according to different scenes, while effectively reducing the amount of calculation while ensuring the accuracy of the pose estimation results of the unmanned system, thereby improving the efficiency of pose estimation calculations. In addition, the present invention also utilizes event cameras, traditional cameras, and IMUs to detect static scenes, thereby suppressing the divergence of pose estimation when the unmanned system platform is stationary, and effectively improving the pose estimation results in a stationary state.
[0150] See also Figure 4 Based on the same inventive concept, a second embodiment of the present invention provides an unmanned system posture estimation device, comprising:
[0151] A spatiotemporal window synchronization module 10, for acquiring image frames of a conventional camera and events of an event camera, and synchronizing the spatiotemporal window of the event on the timestamp of the image frames;
[0152] An event frame synthesis module 20, for integrating events in each spatiotemporal window into event frames through motion compensation;
[0153] A feature point extraction module 30 is used to extract and track feature points of the image frame and the event frame to obtain corner feature points;
[0154] The sliding window graph optimization module 40 is used to construct a system state vector based on the corner feature points by using a sliding window graph optimization method; perform adaptive tight coupling judgment on the unmanned system, construct a cost function according to the judgment result, and perform stationary detection on the unmanned system, and update the cost function according to the detection result;
[0155] The nonlinear optimization solution module 50 is used to solve the system state vector using nonlinear optimization according to the updated cost function to obtain the pose estimation result of the unmanned system.
[0156] The technical features and technical effects of the unmanned system pose estimation device proposed in the embodiment of the present invention are the same as the method proposed in the embodiment of the present invention, and will not be repeated here. Each module in the above-mentioned unmanned system pose estimation device can be implemented in whole or in part by software, hardware and a combination thereof. The above-mentioned modules can be embedded in or independent of the processor in the computer device in the form of hardware, or can be stored in the memory of the computer device in the form of software, so that the processor can call and execute the operations corresponding to the above modules.
[0157] In addition, an embodiment of the present invention further provides a computer device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the steps of the above method when executing the computer program.
[0158] See also Figure 5, an internal structure diagram of a computer device in one embodiment, the computer device can specifically be a terminal or a server. The computer device includes a processor, a memory, a network interface, a display and an input device connected via a system bus. Among them, the processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The network interface of the computer device is used to communicate with an external terminal through a network connection. When the computer program is executed by the processor, an unmanned system posture estimation method is implemented. The display screen of the computer device can be a liquid crystal display screen or an electronic ink display screen, and the input device of the computer device can be a touch layer covered on the display screen, or a button, trackball or touchpad set on the computer device housing, or an external keyboard, touchpad or mouse, etc.
[0159] It can be understood by those skilled in the art that Figure 5 The structure shown in the figure is merely a block diagram of a portion of the structure related to the present application scheme, and does not constitute a limitation on the computer device to which the present application scheme is applied. The specific computing device may include more or fewer components than those shown in the figure, or combine certain components, or have the same component arrangement.
[0160] In addition, an embodiment of the present invention further provides a computer-readable storage medium on which a computer program is stored. When the computer program is executed by a processor, the steps of the above method are implemented.
[0161] In summary, an unmanned system pose estimation method, device, computer equipment and storage medium proposed in an embodiment of the present invention, the method acquires the image frame of a traditional camera and the event of an event camera, and synchronizes the spatiotemporal window of the event on the timestamp of the image frame; integrates the events in each spatiotemporal window into an event frame through motion compensation; extracts and tracks feature points of the image frame and the event frame to obtain corner feature points; adopts a sliding window graph optimization method to construct a system state vector based on the corner feature points; performs adaptive tight coupling judgment on the unmanned system, constructs a cost function according to the judgment result, and performs static detection on the unmanned system, and updates the cost function according to the detection result; according to the updated cost function, nonlinear optimization is used to solve the system state vector to obtain the pose estimation result of the unmanned system. The present invention uses the characteristics of the event camera to assist the pose estimation of the unmanned system, so that the unmanned system can still accurately perform pose estimation when it moves rapidly in a scene with large changes in illumination, and uses the sliding window graph optimization method to achieve tight coupling of four sensors: traditional camera, event camera, GNSS and IMU, and achieves pose estimation with higher accuracy. Furthermore, the present invention uses an adaptive adjustment method to enable the unmanned system to adaptively perform tight coupling between different sensors according to different scenarios, effectively reducing the amount of calculation while ensuring the accuracy of the unmanned system pose estimation results, and improving the efficiency of pose estimation calculations. In addition, the present invention also uses event cameras, traditional cameras, and IMUs to detect static scenes, suppressing the divergence of pose estimation when the unmanned system platform is stationary, and effectively improving the pose estimation results in a stationary state.
[0162] Each embodiment in this specification is described in a progressive manner, and the same or similar parts of each embodiment can be directly referred to each other, and each embodiment focuses on the differences from other embodiments. In particular, for the system embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiment. It should be noted that the technical features of the above-mentioned embodiments can be combined arbitrarily. In order to make the description concise, all possible combinations of the technical features in the above-mentioned embodiments are not described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.
[0163] The above-mentioned embodiments only express several preferred implementation modes of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the invention patent. It should be pointed out that, for ordinary technicians in the technical field, several improvements and substitutions can be made without departing from the technical principles of the present invention, and these improvements and substitutions should also be regarded as the protection scope of the present application. Therefore, the protection scope of the patent of the present application shall be based on the protection scope of the claims.
Claims
1. A method for estimating the pose of an unmanned system, characterized in that: The method comprises: Acquire image frames of a conventional camera and events of an event camera, and synchronize spatiotemporal windows of the events on timestamps of the image frames; Through motion compensation, the events in each spatiotemporal window are integrated into event frames; Extracting and tracking feature points of the image frame and the event frame to obtain corner feature points; A system state vector based on the corner feature points is constructed using a sliding window graph optimization method; Perform adaptive tight coupling judgment on the unmanned system, build a cost function based on the judgment result, perform static detection on the unmanned system, and update the cost function based on the detection result; According to the updated cost function, the system state vector is solved by nonlinear optimization to obtain the pose estimation result of the unmanned system; The step of performing adaptive tight coupling judgment on the unmanned system and constructing a cost function according to the judgment result comprises: According to the GNSS data, it is determined whether the number of received satellites is less than the satellite threshold. If so, a cost function is constructed based on the traditional camera reprojection residual, the event camera reprojection residual and the IMU residual. Otherwise, a cost function is constructed based on the traditional camera reprojection residual, the event camera reprojection residual, the IMU residual and the GNSS residual. Determining whether the unmanned system satisfies an event camera enabling condition, and in response to not satisfying the event camera enabling condition, removing the event camera reprojection residual from the cost function, wherein the event camera enabling condition includes a speed condition and / or a grayscale condition, wherein the speed condition includes that the speed of the unmanned system is greater than a speed threshold, and the grayscale condition includes that an average grayscale value of the image frame is within a grayscale threshold range and a rate of change of the average grayscale value is greater than a rate of change threshold; The cost function constructed based on the traditional camera reprojection residual, event camera reprojection residual, IMU residual and GNSS residual is expressed as follows: In the formula, χ represents the system state vector, e m represents the marginalized residual, W m represents the weight of the marginalized residual, represents the reprojection residual of the event camera, represents the weight of the reprojection residual of the event camera, represents the reprojection residual of the traditional camera, represents the weight of the reprojection residual of the traditional camera, represents the IMU residual, W i k represents the weight of the IMU residual, represents the GNSS residual, represents the weight of the GNSS residual, ζ and ξ represent the set of event frame feature points and the set of image frame feature points respectively, l represents the lth image frame corner feature in the image frame corner feature tracking sequence, and k represents the kth key frame image.
2. The method for estimating the pose of an unmanned system according to claim 1, characterized in that: The step of performing a stationary detection on the unmanned system and updating the cost function according to the detection result includes: A stationary detection is performed on the unmanned system, and in response to the detection result being a stationary state, a velocity residual, a position residual, and a rotation residual are added to a cost function, and the cost function is updated.
3. The method for estimating the pose of an unmanned system according to claim 2, characterized in that: The step of performing stationary detection on the unmanned system comprises: Performing a stationary detection on the unmanned system through the IMU to obtain a first detection result; Performing a stationary detection on the unmanned system by using a traditional camera or an event camera to obtain a second detection result; When the first detection result and the second detection result are both in a stationary state, it is determined that the unmanned system is in a stationary state.
4. The method for estimating the pose of an unmanned system according to claim 3, characterized in that: The step of performing static detection on the unmanned system by using a traditional camera or an event camera to obtain a second detection result comprises: When a conventional camera is used to perform stationary detection on an unmanned system, the image frames are arranged in time sequence and feature point matching is performed on adjacent image frames; Calculate the pixel difference between the matching feature points, filter the matching feature points according to the pixel difference, and extract the maximum pixel difference from the pixel differences corresponding to the filtered matching feature points; The maximum pixel difference value is compared with a pixel difference threshold, and a second detection result is obtained according to the comparison result.
5. The method for estimating the pose of an unmanned system according to claim 3, characterized in that: The step of performing static detection on the unmanned system by using a traditional camera or an event camera to obtain a second detection result comprises: When the unmanned system is detected stationary by the event camera, the number of events occurring in the event camera accumulated between two adjacent timestamps of the traditional camera is calculated; The event number is compared with an event threshold, and a second detection result is obtained according to the comparison result.
6. The method for estimating the pose of an unmanned system according to claim 2, characterized in that: The velocity residual is expressed by the following formula: The position residual is expressed as follows: The rotation residual is expressed as follows: In the formula, represents the velocity of the IMU at the kth key frame in the world coordinate system, represents the position of the kth keyframe of the IMU in the world coordinate system, Represents the orientation quaternion of the IMU at the kth keyframe in the world coordinate system.
7. An unmanned system posture estimation device, characterized in that: The device comprises: A spatiotemporal window synchronization module, for acquiring image frames of a conventional camera and events of an event camera, and synchronizing the spatiotemporal windows of the events on the timestamps of the image frames; An event frame synthesis module is used to integrate events in each spatiotemporal window into event frames through motion compensation; A feature point extraction module, used to extract and track feature points of the image frame and the event frame to obtain corner feature points; A sliding window graph optimization module is used to construct a system state vector based on the corner feature points by using a sliding window graph optimization method; perform adaptive tight coupling judgment on the unmanned system, construct a cost function according to the judgment result, perform stationary detection on the unmanned system, and update the cost function according to the detection result; The step of performing adaptive tight coupling judgment on the unmanned system and constructing a cost function according to the judgment result comprises: According to the GNSS data, it is determined whether the number of received satellites is less than the satellite threshold. If so, a cost function is constructed based on the traditional camera reprojection residual, the event camera reprojection residual and the IMU residual. Otherwise, a cost function is constructed based on the traditional camera reprojection residual, the event camera reprojection residual, the IMU residual and the GNSS residual. Determining whether the unmanned system satisfies an event camera enabling condition, and in response to not satisfying the event camera enabling condition, removing the event camera reprojection residual from the cost function, wherein the event camera enabling condition includes a speed condition and / or a grayscale condition, wherein the speed condition includes that the speed of the unmanned system is greater than a speed threshold, and the grayscale condition includes that an average grayscale value of the image frame is within a grayscale threshold range and a rate of change of the average grayscale value is greater than a rate of change threshold; The cost function constructed based on the traditional camera reprojection residual, event camera reprojection residual, IMU residual and GNSS residual is expressed as follows: In the formula, χ represents the system state vector, e m represents the marginalized residual, W m represents the weight of the marginalized residual, represents the reprojection residual of the event camera, represents the weight of the reprojection residual of the event camera, represents the reprojection residual of the traditional camera, represents the weight of the reprojection residual of the traditional camera, represents the IMU residual, W i k represents the weight of the IMU residual, represents the GNSS residual, represents the weight of GNSS residual, ζ and ξ represent the set of event frame feature points and the set of image frame feature points respectively, l represents the lth image frame corner feature in the image frame corner feature tracking sequence, and k represents the kth key frame image; The nonlinear optimization solution module is used to solve the system state vector using nonlinear optimization according to the updated cost function to obtain the pose estimation result of the unmanned system.
8. A computer device comprising a memory, a processor and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 6 are implemented.
9. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 6 are implemented.
