A method for constructing visual odometer in robot visual navigation

By combining the double threshold method and the YOLOv3 algorithm, the static feature points in the visual odometry are extracted and filtered, and the dynamic feature points are eliminated, which solves the problem of poor accuracy of the traditional visual odometry in dynamic environments and improves the positioning accuracy of robot navigation. sex.

CN112184763BInactive Publication Date: 2024-09-10ZHENJIANG INNOVATION & DEV RES INST OF NANJING NORMAL UNIV +1
View PDF 4 Cites 0 Cited by

Patent Information

Application Number
CN202010939522.3
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2020-09-09
Publication Date
2024-09-10
Estimated Expiration
Not applicable · inactive patent

AI Technical Summary

Technical Problem

Traditional visual odometry has poor robustness and accuracy in dynamic environments. It is subject to mismatching of feature points of moving objects and large interference from the external environment, which affects positioning accuracy and mapping accuracy.

Method used

The double threshold method is used to extract feature points, and the YOLOv3 algorithm is used for target detection, feature points that are not within the object boundary box are eliminated, optical flow tracking and dynamic feature point determination are performed, dynamic feature points are eliminated, and only static feature points are retained. Through optical flow The epipolar method determines the movement of feature points and estimates the camera pose.

Benefits of technology

It effectively solves the interference of moving objects on visual odometry, improves positioning and navigation accuracy, and enhances robustness.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN112184763B
    Figure CN112184763B
Patent Text Reader

Abstract

The present invention provides a method for constructing a visual odometer in robot visual navigation, comprising: extracting image feature points; obtaining the position of an object boundary box; judging whether the extracted feature points are within the detected object boundary box, and if not, removing the feature points; if within the object boundary box, tracking the feature points within the object boundary box by optical flow, and judging the dynamic points by optical flow polar line method, if the number of dynamic points within the object boundary box is greater than a threshold, it is considered that the object within the object boundary box is moving, and all feature points therein are removed. If the number does not exceed the threshold, it is considered that the object within the object boundary box is stationary, and the feature points within the object boundary box are valid feature points. The camera motion trajectory is estimated based on the valid feature points, the camera rotation and translation motion are restored, the camera posture is estimated, and the construction of the visual odometer is completed. The present invention solves the problem of inaccurate posture estimation in a dynamic environment and improves positioning accuracy.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of visual navigation and image processing, and in particular to a method for constructing a visual odometer in robot visual navigation. Background Art

[0002] When a robot enters an unknown environment, it cannot achieve positioning and navigation without visual odometry. Visual odometry refers to the use of machine vision technology to process and analyze continuous video sequence frame images to complete the position and posture estimation of the mobile camera to achieve navigation and positioning functions. Traditional visual odometry has poor robustness and accuracy in dynamic environments. Moving objects in the scene will cause mismatching of feature points in pose estimation, which in turn affects positioning accuracy and map construction accuracy. It is greatly disturbed by feature points of moving objects in the external environment. Summary of the invention

[0003] Purpose of the invention: To solve the technical problems existing in the background technology, the present invention proposes a method for constructing a visual odometer in robot visual navigation, comprising the following steps:

[0004] Step 1, read the original image, extract feature points by double threshold method and obtain the position of feature points;

[0005] Step 2: Use the YOLOv3 algorithm [see “Redmon J, Farhadi A. YOLOv3: an incremental improvement [OL]. [2018-04-08].”] to detect the object in the original image and obtain the position of the object bounding box;

[0006] Step 3: According to the position of the feature point and the position of the object bounding box, determine whether the feature point is within the object bounding box, remove the feature points that are not within the object bounding box, and obtain the feature points within the object bounding box;

[0007] Step 4, performing optical flow tracking on the feature points within the object bounding box to obtain the motion position of the feature points within the object bounding box;

[0008] Step 5, according to the motion position obtained in step 4, the dynamic feature point is determined by the optical flow epipolar method to determine whether the feature point in the object boundary box is a static feature point or a dynamic feature point;

[0009] Step 6, judging the motion of the object according to the dynamic feature points in the object boundary box, when the number of dynamic feature points in the object boundary box reaches a certain threshold, it is determined that the object in the object boundary box is moving, and all feature points in the object boundary box are removed to obtain static object feature points, which are valid feature points;

[0010] Step 7: Estimate the camera motion trajectory based on the valid feature points, restore the camera rotation and translation motion, estimate the camera pose, and complete the construction of the visual odometer;

[0011] In the present invention, step 1 comprises the following steps:

[0012] Step 1-1: Select 20 pixels p1, p2, ... p in the original image at random. 20 , p 20 Indicates the 20th pixel selected, and their brightness Ip1, Ip2...Ip 20 , set the threshold Tp1:

[0013]

[0014] Ip i is the brightness of the i-th pixel, i ranges from 1 to 20;

[0015] Step 1-2: Select any pixel p from the original image, detect its brightness Ip, and set a threshold value Tp2, which is 20% of Ip;

[0016] Step 1-3: Select 16 pixels on a circle with a radius of 3 with pixel p as the center;

[0017] Step 1-4: If there are twelve consecutive pixels on the selected circle with a brightness greater than Or there are twelve consecutive pixels on the circle with brightness less than Then the pixel p is marked as a feature point, and the coordinates of this feature point (x r ,y r ) and save. Among them, x r Indicates the row coordinates of the feature point, y r Represents the column coordinates of the feature points;

[0018] Step 1-5: Loop steps 1-2 to 1-4, perform the same operation on each pixel point on the original image, and obtain feature points and feature point positions.

[0019] Step 3 includes:

[0020] Step 3-1: Compare the position of the feature point obtained in step 1 with the position of the object bounding box obtained in step 2 to determine whether the feature point is within the object bounding box;

[0021] Step 3-2: Eliminate feature points that are not within the object bounding box and retain feature points within the object bounding box;

[0022] Step 3-3: Repeat steps 3-1 and 3-2 until the feature points obtained in step 1 are compared with the object bounding box obtained in step 2.

[0023] Step 4 includes:

[0024] Step 4-1: Take any feature point (x, y) obtained in step 3 within the object boundary box, record the current time as t, and record that the feature point moves to (x+dx, y+dy) at time t+dt;

[0025] Among them, x represents the row coordinate of the feature point at time t, y represents the column coordinate of the feature point at time t, (x, y) represents the coordinate of the feature point at time t, t+dt represents the time when the camera reads the next frame of image, x+dx represents the row coordinate of the feature point at time t+dt, y+dy represents the column coordinate of the feature point at time t+dt, and (x+dx, y+dy) represents the coordinate of the feature point at time t+dt.

[0026] Step 4-2: Set the pixel grayscale value of the same spatial point to be fixed, and use I(x, y, t) to describe the grayscale value of the feature point at time t, and I(x+dx, y+dy, t+dt) to represent the grayscale value of the feature point at time t+dt. Then I(x+dx, y+dy, t+dt)=I(x, y, t); expand the equation through Taylor series, retain the first-order term, and get:

[0027]

[0028] Since the gray value remains unchanged, we have

[0029] in, Represents the partial derivative of the current frame image in the x direction at the feature point taken,

[0030] Ix represents the gradient of the current frame image in the x direction at the feature point taken.

[0031] Represents the partial derivative of the current frame image in the y direction at the feature point taken,

[0032] Iy represents the gradient of the current frame image in the y direction at the feature point taken,

[0033] Represents the partial derivative of the change in the grayscale of the current frame image over time,

[0034] It represents the change of the grayscale of the current frame image over time.

[0035] u and v represent the movement speed of the feature point on the x-axis and the movement speed on the y-axis respectively.

[0036] Step 4-3: Assume that the pixels in a window have the same motion. Then, in a window of size 3×3, using the least squares method, we have

[0037] in,

[0038] It1 to It9 are the grayscale values ​​of the nine pixels in the 3×3 window, Ix1 to Ix9 are the gradients of the nine pixels in the 3×3 window in the x direction, and Iy1 to Iy9 are the gradients of the nine pixels in the 3×3 window in the y direction. T represents the transpose of matrix A, (A T A) -1 Represents the matrix A T The inverse of the product of matrix A.

[0039] Step 4-4: The movement speed of the feature points on the x-axis and y-axis obtained in step 4-3 Get the feature point at time t+dt (x+dx, y+dy) = (x+udt, y+vdt);

[0040] Step 4-5: By performing optical flow tracking on two consecutive frames of images, the matching points corresponding to the feature points in the object boundary box described in step 3 in the next frame of image are obtained;

[0041] Step 5 includes:

[0042] Step 5-1: Take any eight pairs of matching points obtained in step 4-5 and calculate the basic matrix F. The calculation formula is as follows:

[0043]

[0044] Among them, q k =(u k ,v k ,1),q′ k =(u′ k ,v′ k , 1) respectively represent the normalized coordinates of the kth pair of matching points among the eight pairs of matching points, and the value of k ranges from 1 to 8; u k ,u k 'represents the normalized row coordinates of the kth pair of matching points among the eight pairs of matching points obtained, v k ,v k 'respectively represent the normalized column coordinates of the kth pair of matching points among the eight pairs of matching points obtained.

[0045] Step 5-2: Using the basic matrix F obtained in step 5-1, taking the feature point with coordinates (x, y) at time t as described in step 4 as an example, project the feature point to the image at time t+dt to obtain the epipolar line l2 corresponding to the feature point at time t+dt;

[0046] l2=Fq

[0047] Where q represents the normalized coordinates (x1, y1, 1) of the feature point (x, y) taken in step 4-1 at time t.

[0048] Step 5-3: Calculate the distance D from the matching point q' of the feature point taken in step 5-2 at time t+dt to the epipolar line l2. The distance formula is as follows:

[0049]

[0050] Where q' represents the normalized coordinates (x1', y1', 1) of the matching point corresponding to the feature point taken in step 5-2 at time t+dt. represents the transpose of q1′, q0 represents the coordinates (x, y) of the feature point taken in step 5-2 at time t, and X, Y represent the coefficients of the independent variable and the dependent variable in the general formula of the polar line l2 respectively.

[0051] Step 5-4: Determine the relationship between the distance D and the threshold m. If the distance D is greater than the threshold m, it is determined that the taken feature point is a dynamic point; wherein the value of m is 6.

[0052] Step 5-5: Repeat steps 5-2 to 5-4 until all feature points within the object boundary box are determined.

[0053] Step 6 includes:

[0054] Step 6-1: Save the position of the dynamic feature points obtained in step 5, compare the position of the dynamic feature points obtained in step 5 with the position of the object bounding box obtained in step 2, and obtain the number of dynamic feature points falling in the object area;

[0055] Step 6-2: Determine the number of dynamic feature points acquired in step 6-1 that fall in the object area and the value of the threshold n. If the number is greater than the threshold n, it is determined that the object in the object bounding box detected in step 2 is moving, and all feature points in the object bounding box are removed; wherein the threshold n is 15;

[0056] Step 6-3: Repeat steps 6-1 to 6-2 until the dynamic feature points obtained in step 5 are compared with the object bounding box, and static feature points are obtained, which are valid feature points.

[0057] Step 7 includes:

[0058] Step 7-1: Calculate the pose estimation essential matrix based on the valid feature points obtained in step 6 [see “Wang Jun, Xu Xiaofeng, Dong Mingli, Sun Peng, Chen Min. Relative pose estimation method for monocular mobile robot[J]. Applied Optics, 2019, 40(04): 535-541.”];

[0059] Step 7-2: Restore the camera's motion information based on the essential matrix, obtain the camera's rotation matrix and translation matrix, and thus estimate the camera's pose [see "Wang Xin. Research on target positioning algorithm based on monocular vision [D]. Harbin: Harbin Institute of Technology, 2016."].

[0060] Beneficial effects: The present invention discloses a method for constructing a visual odometer in robot visual navigation. Ordinary visual odometers have poor robustness in dynamic environments, and moving objects will cause mismatches in pose estimation, thereby affecting the accuracy of map construction. This method effectively solves the interference of moving objects on ordinary visual odometers and improves the accuracy of positioning and navigation. BRIEF DESCRIPTION OF THE DRAWINGS

[0061] The present invention will be further described in detail below in conjunction with the accompanying drawings and specific embodiments, and the above and other advantages of the present invention will become more clear.

[0062] Figure 1 It is a flowchart of the technical process of the present invention.

[0063] Figure 2 This is the feature point result extracted by the present invention.

[0064] Figure 3 This is the result of target detection performed by the present invention.

[0065] Figure 4 This is the result after the present invention removes the feature points that are not within the object boundary box.

[0066] Figure 5 Shown is a schematic diagram of the epipolar constraint plane.

[0067] Figure 6 This is the result after the dynamic feature points are removed in the present invention. DETAILED DESCRIPTION

[0068] like Figure 1 As shown, the present invention discloses a method for constructing a visual odometer in robot visual navigation, comprising the following steps:

[0069] Step 1, read the original image, extract feature points by double threshold method and obtain the position of feature points;

[0070] Step 2: Perform target detection on the original image using the YOLOv3 algorithm to obtain the position of the object bounding box; Figure 3The figure shows the target detection result, which respectively outlines the bounding boxes of the tricycle, pedestrian, and car.

[0071] Step 3, judging whether the feature point is within the object bounding box according to the position of the feature point and the position of the object bounding box, removing the feature points that are not within the object bounding box, and obtaining the feature points within the object bounding box;

[0072] Step 4, performing optical flow tracking on the feature points within the object boundary frame to obtain the motion position of the feature points within the object boundary frame;

[0073] Step 5, according to the motion position of the feature point in the object boundary frame, the dynamic feature point is determined by the optical flow epipolar method to determine whether the feature point in the object boundary frame is a static feature point or a dynamic feature point;

[0074] Step 6, judging the motion of the object according to the dynamic feature points in the object boundary box. When the number of dynamic feature points in the object boundary box reaches a certain threshold, it is considered that the object in the object boundary box is moving, and all feature points in the object boundary box are removed to obtain static object feature points, which are valid feature points.

[0075] Step 7, estimating the camera motion trajectory according to the effective feature points, restoring the camera rotation and translation motion, estimating the camera pose, and completing the construction of the visual odometer;

[0076] In the present invention, step 1 comprises the following steps:

[0077] Step 1-1: Select 20 pixels p1, p2, ... p in the original image at random. 20 , respectively detect their brightness Ip1, Ip2......Ip 20 , set the threshold 1Tp1;

[0078] in, Ip i is the brightness of the i-th pixel, where i ranges from 1 to 20.

[0079] Step 1-2: Select any pixel p on the original image, detect its brightness Ip, and set the threshold 2Tp2, where Tp2 is 20% of Ip;

[0080] Step 1-3: Select 16 pixels on a circle with a radius of 3 with pixel p as the center;

[0081] Step 1-4: If there are twelve consecutive pixels on the selected circle with a brightness greater than Or there are twelve consecutive pixels on the circle with brightness less than Then the pixel p is marked as a feature point, and the coordinates of the feature point (xr ,y r ) and save. Among them, x r Indicates the row coordinates of the feature point, y r Represents the column coordinates of the feature points,

[0082] Step 1-5: Loop steps 1-2 to 1-4, perform the same operation on each pixel on the image, and obtain the feature points and feature point positions. Figure 2 The figure shows an example of feature point extraction effect.

[0083] Step 3 includes:

[0084] Step 3-1: Compare the position of the feature point obtained in step 1 with the position of the object bounding box obtained in step 2 to determine whether the feature point is within the object bounding box;

[0085] Step 3-2: Eliminate feature points that are not within the object bounding box and retain feature points within the object bounding box;

[0086] Step 3-3: Repeat step 3-1 and step 3-2 until the feature points obtained in step 1 are compared with the object bounding box obtained in step 2.

[0087] Figure 4 This is the result after removing feature points that are not within the object bounding box.

[0088] Step 4 includes:

[0089] Step 4-1: Take any feature point (x, y) obtained in step 3 within the object boundary box, record the current time as t, and record that the feature point moves to (x+dx, y+dy) at time t+dt;

[0090] Among them, x represents the row coordinate of the feature point at time t, y represents the column coordinate of the feature point at time t, (x, y) represents the coordinate of the feature point at time t, t+dt represents the time when the camera reads the next frame of image, x+dx represents the row coordinate of the feature point at time t+dt, y+dy represents the column coordinate of the feature point at time t+dt, and (x+dx, y+dy) represents the coordinate of the feature point at time t+dt.

[0091] Step 4-2: Assume that the grayscale value of the pixel at the same spatial point is fixed, and I(x, y, t) is used to describe the grayscale value of the feature point at time t, and I(x+dx, y+dy, t+dt) represents the grayscale value of the feature point at time t+dt. Then I(x+dx, y+dy, t+dt)=I(x, y, t); expand the equation through Taylor series, retain the first-order term, and get:

[0092]

[0093] Since the gray value remains unchanged, we have

[0094] in, Represents the partial derivative of the current frame image in the x direction at the feature point taken,

[0095] Ix represents the gradient of the current frame image in the x direction at the feature point taken.

[0096] Represents the partial derivative of the current frame image in the y direction at the feature point taken,

[0097] Iy represents the gradient of the current frame image in the y direction at the feature point taken,

[0098] Represents the partial derivative of the change in the grayscale of the current frame image over time,

[0099] It represents the change of the grayscale of the current frame image over time.

[0100] u and v represent the movement speed of the feature points on the x-axis and y-axis respectively.

[0101] Step 4-3: Assuming that the pixels in a window have the same motion, then in a window of size 3×3, using the least squares method, we have

[0102] in,

[0103] It1 to It9 are the grayscale values ​​of the nine pixels in the 3×3 window, Ix1 to Ix9 are the gradients of the nine pixels in the 3×3 window in the x direction, and Iy1 to Iy9 are the gradients of the nine pixels in the 3×3 window in the y direction. T represents the transpose of matrix A, (A T A) -1 Represents the matrix A T The inverse of the product of matrix A.

[0104] Step 4-4: The movement speed of the feature points on the x-axis and y-axis obtained in step 4-3 Get the feature point at time t+dt (x+dx, y+dy) = (x+udt, y+vdt);

[0105] Step 4-5: By performing optical flow tracking on two consecutive frames of images, the matching points corresponding to the feature points in the object boundary box described in step 3 in the next frame of image are obtained;

[0106] Step 5 includes:

[0107] Step 5-1: Take any eight pairs of matching points obtained in step 4-5 and calculate the basic matrix F. The calculation formula is as follows:

[0108]

[0109] Among them, q k =(u k ,v k ,1),q′ k =(u′ k ,v′ k , 1) respectively represent the normalized coordinates of the kth pair of matching points among the eight pairs of matching points, and the value of k ranges from 1 to 8; u k ,u' k They represent the normalized row coordinates of the kth pair of matching points among the eight pairs of matching points obtained, and v k ,v' k They respectively represent the normalized column coordinates of the kth pair of matching points among the eight pairs of matching points obtained.

[0110] Step 5-2: Using the basic matrix F obtained in step 5-1, taking the feature point with coordinates (x, y) at time t as described in step 4 as an example, project the feature point to the image at time t+dt to obtain the epipolar line l2 corresponding to the feature point at time t+dt;

[0111] l2=Fq

[0112] Where q represents the normalized coordinates (x1, y1, 1) of the feature point (x, y) taken in step 4-1 at time t.

[0113] Step 5-3: Calculate the distance from the matching point q' of the feature point taken in step 5-2 at time t+dt to the epipolar line l2. The distance formula is as follows:

[0114]

[0115] Where q' represents the normalized coordinates (x1', y1', 1) of the matching point corresponding to the feature point taken in step 5-2 at time t+dt. represents the transpose of q'1, q0 represents the coordinates (x, y) of the feature point taken in step 5-2 at time t, and X, Y represent the coefficients of the independent variable and the dependent variable in the general formula of the polar line l2 respectively.

[0116] Step 5-4: Determine the relationship between D and the threshold m. If the distance is greater than the threshold, the feature point is considered to be a dynamic point and its position coordinates are saved. The value of m is 6.

[0117] Step 5-5: Repeat steps 5-2 to 5-4 until all feature points in the object boundary box described in step 3 are determined.

[0118] Down Figure 5 Shown is a schematic diagram of the epipolar constraint plane.

[0119] Step 6 includes:

[0120] Step 6-1: Save the position of the dynamic feature points obtained in step 5, compare the position of the dynamic feature points obtained in step 5 with the position of the object bounding box obtained in step 2, and obtain the number of dynamic feature points falling in the object area;

[0121] Step 6-2: Determine the number of dynamic feature points acquired in step 6-1 that fall in the object area and the value of the threshold n. If the number is greater than the threshold n, it is considered that the object in the object bounding box detected in step 2 is moving, and all feature points in the object bounding box are removed; wherein the threshold n is 15;

[0122] Step 6-3: Repeat steps 6-1 and 6-2 until the dynamic feature points obtained in step 5 are compared with the object bounding box, and static feature points are obtained, which are valid feature points.

[0123] According to step 6-2, the pedestrian is moving, while the tricycle and the car are stationary. Figure 6 The result of removing dynamic feature points is shown.

[0124] Step 7 includes:

[0125] Step 7-1: Calculate the pose estimation essential matrix based on the valid feature points obtained in step 6;

[0126] Step 7-2: Restore the camera's motion information based on the essential matrix, obtain the camera's rotation matrix and translation matrix, and thus estimate the camera's pose.

[0127] The present invention provides a method for constructing a visual odometer in robot visual navigation. There are many methods and ways to implement the technical solution. The above is only a preferred embodiment of the present invention. It should be pointed out that for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the principle of the present invention. These improvements and modifications should also be regarded as the scope of protection of the present invention. All components not specified in this embodiment can be implemented by existing technologies.

Claims

1. A method for constructing a visual odometer in robot visual navigation, characterized in that: The following steps are involved: Step 1, read the original image, extract feature points by double threshold method and obtain the position of feature points; Step 2: Perform target detection on the original image using the YOLOv3 algorithm to obtain the position of the object bounding box; Step 3: According to the position of the feature point and the position of the object bounding box, determine whether the feature point is within the object bounding box, remove the feature points that are not within the object bounding box, and obtain the feature points within the object bounding box; Step 4, performing optical flow tracking on the feature points within the object bounding box to obtain the motion position of the feature points within the object bounding box; Step 5, according to the motion position obtained in step 4, the dynamic feature point is determined by the optical flow epipolar method to determine whether the feature point in the object boundary box is a static feature point or a dynamic feature point; Step 6: determine the motion of the object based on the dynamic feature points in the object bounding box. When the number of dynamic feature points in the object bounding box reaches a certain threshold, the object in the object bounding box is determined to be moving. All feature points in the object bounding box are removed to obtain static object feature points, which are valid feature points. Step 7: Estimate the camera motion trajectory based on the valid feature points, restore the camera rotation and translation motion, estimate the camera pose, and complete the construction of the visual odometer; Step 1 includes: Step 1-1: Select 20 pixels p1, p2, ... p in the original image at random. 20 , p 20 Indicates the 20th pixel selected, and their brightness Ip1, Ip2...Ip 20 , set the threshold Tp1: Ip i is the brightness of the i-th pixel, i ranges from 1 to 20; Step 1-2: Select any pixel p from the original image, detect its brightness Ip, and set a threshold value Tp2, which is 20% of Ip; Step 1-3: Select 16 pixels on a circle with a radius of 3 with pixel p as the center; Step 1-4: If there are twelve consecutive pixels on the selected circle with a brightness greater than Or there are twelve consecutive pixels on the circle with brightness less than Then the pixel p is marked as a feature point, and the coordinates of this feature point (x r ,y r ) and save; where x r Indicates the row coordinates of the feature point, y r Represents the column coordinates of the feature points; Step 1-5: Loop steps 1-2 to 1-4, perform the same operation on each pixel point on the original image, and obtain feature points and feature point positions.

2. The method according to claim 1, characterized in that step 3 comprises the following steps: Step 3-1: Compare the position of the feature point obtained in step 1 with the position of the object bounding box obtained in step 2 to determine whether the feature point is within the object bounding box; Step 3-2: Eliminate feature points that are not within the object bounding box and retain feature points within the object bounding box; Step 3-3: Repeat steps 3-1 and 3-2 until the feature points obtained in step 1 are compared with the object bounding box obtained in step 2.

3. The method according to claim 2, characterized in that step 4 comprises: Step 4-1: Take any feature point (x, y) obtained in step 3 within the object boundary box, record the current time as t, and record that the feature point moves to (x+dx, y+dy) at time t+dt; Wherein, x represents the row coordinate of the feature point at time t, y represents the column coordinate of the feature point at time t, (x, y) represents the coordinate of the feature point at time t, t+dt represents the time when the camera reads the next frame of image, x+dx represents the row coordinate of the feature point at time t+dt, y+dy represents the column coordinate of the feature point at time t+dt, (x+dx, y+dy) represents the coordinate of the feature point at time t+dt; Step 4-2: Set the pixel grayscale value of the same spatial point to be fixed, and use I(x, y, t) to describe the grayscale value of the feature point at time t, and I(x+dx, y+dy, t+dt) to represent the grayscale value of the feature point at time t+dt. Then I(x+dx, y+dy, t+dt)=I(x, y, t); expand the equation through Taylor series, retain the first-order term, and get: Since the gray value remains unchanged, we have in, Represents the partial derivative of the current frame image in the x direction at the feature point taken, Ix represents the gradient of the current frame image in the x direction at the feature point taken, Represents the partial derivative of the current frame image in the y direction at the feature point taken, Iy represents the gradient of the current frame image in the y direction at the feature point taken, Represents the partial derivative of the change in the grayscale of the current frame image over time, It represents the change of the grayscale of the current frame image over time. u, v represent the movement speed of the feature point on the x-axis and the movement speed on the y-axis respectively; Step 4-3: Assume that the pixels in a window have the same motion. Then, in a window of size 3×3, using the least squares method, we have in, It1 to It9 are the grayscale values ​​of the nine pixels in the 3×3 window, Ix1 to Ix9 are the gradients of the nine pixels in the 3×3 window in the x direction, and Iy1 to Iy9 are the gradients of the nine pixels in the 3×3 window in the y direction; A T represents the transpose of matrix A, (A T A) -1 Represents the matrix A T The inverse matrix of the product with matrix A; Step 4-4: The movement speed of the feature points on the x-axis and y-axis obtained in step 4-3 Get the feature point at time t+dt (x+dx, y+dy) = (x+udt, y+vdt); Step 4-5: By performing optical flow tracking on two consecutive frames of images, obtain the matching points corresponding to the feature points in the object boundary box in step 3 in the next frame of image.

4. The method according to claim 3, characterized in that step 5 comprises: Step 5-1: Take any eight pairs of matching points obtained in step 4-5 and calculate the basic matrix F. The calculation formula is as follows: Among them, q k =(u k ,v k ,1),q′ k =(u′ k ,v′ k , 1) respectively represent the normalized coordinates of the kth pair of matching points among the eight pairs of matching points, and the value of k ranges from 1 to 8; u k ,u k 'represents the normalized row coordinates of the kth pair of matching points among the eight pairs of matching points obtained, v k ,v k 'respectively represent the normalized column coordinates of the kth pair of matching points among the eight pairs of matching points obtained; Step 5-2: Using the basic matrix F obtained in step 5-1, taking the feature point with coordinates (x, y) at time t in step 4 as an example, project the feature point to the image at time t+dt to obtain the epipolar line l2 corresponding to the feature point at time t+dt: l2=Fq, Wherein, q represents the normalized coordinates (x1, y1, 1) of the feature point (x, y) taken in step 4-1 at time t; Step 5-3: Calculate the distance D from the matching point q' of the feature point taken in step 5-2 at time t+dt to the epipolar line l2. The distance formula is as follows: Where q' represents the normalized coordinates (x1', y1', 1) of the matching point corresponding to the feature point taken in step 5-2 at time t+dt. represents the transpose of q1′, q0 represents the coordinates (x, y) of the feature point taken in step 5-2 at time t, and X, Y represent the coefficients of the independent variable and the dependent variable in the general formula of the polar line l2 respectively; Step 5-4: Determine the relationship between the distance D and the threshold m. If the distance D is greater than the threshold m, it is determined that the feature point is a dynamic point. Step 5-5: Repeat steps 5-2 to 5-4 until all feature points within the object boundary box are determined.

5. The method according to claim 4, characterized in that Step 6 includes: Step 6-1: Save the position of the dynamic feature points obtained in step 5, compare the position of the dynamic feature points obtained in step 5 with the position of the object bounding box obtained in step 2, and obtain the number of dynamic feature points falling in the object area; Step 6-2: Determine the number of dynamic feature points acquired in step 6-1 that fall in the object area and the value of the threshold n. If the number is greater than the threshold n, it is determined that the object in the object bounding box detected in step 2 is moving, and all feature points in the object bounding box are removed; Step 6-3: Repeat steps 6-1 to 6-2 until the dynamic feature points obtained in step 5 are compared with the object bounding box, and static feature points are obtained, which are valid feature points.

6. The method according to claim 5, characterized in that step 7 comprises the following steps: Step 7-1: Calculate the pose estimation essential matrix based on the valid feature points obtained in step 6; Step 7-2: Restore the camera's motion information based on the essential matrix, obtain the camera's rotation matrix and translation matrix, and thus estimate the camera's pose.

Citation Information

Patent Citations

  • A fast monocular vision odometer navigation and positioning method combining a feature point method and a direct method

    CN109544636A

  • Anti-interference visual odometer construction method based on optimized Gaussian mixture model

    CN110006444A

  • Slam method in dynamic environment

    CN110648354A

  • Pressure detection method and device

    WO2018082080A1