Position estimation device, position estimation method, and program
The position estimation device enhances SLAM by predicting camera posture using sensor data and adjusting calculations based on actual feature points, improving accuracy during sudden movements.
Patent Information
- Application Number
- JP2020170942
- Authority / Receiving Office
- JP · JP
- Patent Type
- Patents
- Current Assignee / Owner
- Filing Date
- 2020-10-09
- Publication Date
- 2024-09-18
- Estimated Expiration
- 2040-10-09
AI Technical Summary
Conventional SLAM systems experience significant errors in estimating the position of a moving object when sudden changes in movement occur, such as sharp turns, leading to inaccuracies in feature point matching and map updates.
A position estimation device that utilizes sensor data to predict the camera posture in subsequent frames, sets a search window based on this prediction, and adjusts the camera posture calculation using actual feature points to refine the position estimation, incorporating a Kalman filter for improved accuracy.
The method effectively suppresses fluctuations in estimation accuracy due to sudden movements, ensuring precise position estimation and map updates even during rapid changes in the object's trajectory.
Smart Images

Figure 0007553090000020 
Figure 0007553090000022 
Figure 0007553090000019
Abstract
Description
[Technical field]
[0001] The present invention relates to a position estimation device and a position estimation method for estimating the position of a moving object, and further to a program for implementing these. [Background technology]
[0002] In recent years, with the improvement of sensing technology, SLAM (Simultaneous Localization and Mapping) has been attracting attention. SLAM is a technology in which a mobile object equipped with a sensor simultaneously estimates its own position and creates an environmental map (see, for example, Patent Document 1 and Non-Patent Document 1). With SLAM, an autonomous robot does not need to move randomly, but can move along an environmental map, improving the efficiency of its movement.
[0003] Specifically, SLAM uses a moving object equipped with an imaging device. The imaging device outputs image data (hereafter referred to as "frame") in frame units at set intervals. In conventional SLAM, an initial environment map is first created using the image data.
[0004] Next, when an initial environment map is created, feature points in the latest frame that correspond to feature points extracted from past frames are searched for, and pairs of feature points consisting of corresponding feature points are extracted.
[0005] Next, the camera matrix in the latest frame is calculated using the set of feature points, and the position of the camera (position of the moving object) is estimated. Then, for each set of feature points, the three-dimensional coordinates of the feature points are calculated using the camera matrix and the two-dimensional coordinates of the feature points in the frame, and the environmental map is updated using the calculated three-dimensional coordinates. [Prior art documents] [Patent documents]
[0006]
Patent Document 1
Non-Patent Document
[0007]
Non-Patent Document 1
[0008] In conventional SLAM, in order to reduce the time required for feature point search processing, the area in which the corresponding feature point exists is predicted in the latest frame, and the feature point is searched for in the predicted area. The area prediction is performed by estimating the movement vector of the moving object in the latest frame.
[0009] However, in conventional SLAM, when a moving object suddenly changes its movement, such as by suddenly turning, the difference between the estimated movement vector and the actual movement vector becomes large, resulting in a large error in predicting the area to be searched for feature points in the latest frame. In such cases, a problem called "degeneration" occurs, in which the corresponding feature points cannot be extracted and the position of the moving object cannot be estimated.
[0010] An example of an object of the present invention is to provide a position estimation device, a position estimation method, and a program that can solve the above problem and suppress fluctuations in estimation accuracy due to the movement of a moving object when estimating the position of a moving object. [Means for solving the problem]
[0011] In order to achieve the above object, a position estimation device according to one aspect of the present invention comprises: an image data acquisition unit that acquires image data output from a camera mounted on the moving object for each frame; a sensor data acquisition unit that acquires sensor data from a sensor that detects the attitude of the moving object; a camera posture prediction unit that obtains a camera posture in the acquired frame, and calculates a predicted value of a camera posture in a next frame obtained after the frame, based on the obtained camera posture in the frame and the sensor data obtained after the acquisition of the frame; a feature point searching unit that, after obtaining the next frame, sets a search window on the next frame using the predicted value and searches for a feature point corresponding to a feature point in the frame within the search window; a position estimation unit that calculates a camera posture in the next frame based on the searched feature points separately from the predicted value, and estimates a position of the moving object in the next frame based on the calculated camera posture in the next frame; The present invention is characterized in that it is equipped with:
[0012] In order to achieve the above object, a position estimation method according to one aspect of the present invention includes: An image data acquisition step of acquiring image data output from a camera mounted on the moving object for each frame; a sensor data acquisition step of acquiring sensor data from a sensor that detects the attitude of the moving object; a camera posture prediction step of determining a camera posture in the acquired frame, and calculating a predicted value of a camera posture in a next frame acquired after the frame from the determined camera posture in the frame and the sensor data acquired after the acquisition of the frame; a feature point searching step of, after obtaining the next frame, setting a search window on the next frame using the predicted value, and searching for feature points corresponding to feature points in the frame within the search window; a position estimation step of calculating a camera posture in the next frame based on the searched feature points separately from the predicted value, and estimating a position of the moving object in the next frame based on the calculated camera posture in the next frame; The present invention is characterized in that it has the following features:
[0013] Furthermore, in order to achieve the above object, a program according to one aspect of the present invention comprises: On the computer, An image data acquisition step of acquiring image data output from a camera mounted on the moving object for each frame; a sensor data acquisition step of acquiring sensor data from a sensor that detects the attitude of the moving object; a camera posture prediction step of determining a camera posture in the acquired frame, and calculating a predicted value of a camera posture in a next frame acquired after the frame from the determined camera posture in the frame and the sensor data acquired after the acquisition of the frame; a feature point searching step of, after obtaining the next frame, setting a search window on the next frame using the predicted value, and searching for feature points corresponding to feature points in the frame within the search window; a position estimation step of calculating a camera posture in the next frame based on the searched feature points separately from the predicted value, and estimating a position of the moving object in the next frame based on the calculated camera posture in the next frame; The present invention is characterized in that: Effect of the Invention
[0014] As described above, according to the present invention, in estimating the position of a moving object, it is possible to suppress fluctuations in estimation accuracy due to the movement of the moving object. [Brief description of the drawings]
[0015] [Figure 1] FIG. 1 is a diagram showing a schematic configuration of a position estimation device according to an embodiment. [Diagram 2] FIG. 2 is a block diagram specifically showing the configuration of the position estimation device according to the embodiment. [Diagram 3] FIG. 3 is a diagram illustrating an example of a process for creating an environment map. [Figure 4] FIG. 4 is a diagram illustrating an example of a process performed by the Kalman filter. [Diagram 5] FIG. 5 is a diagram showing an example of a search window set in the embodiment. [Figure 6] FIG. 6 is a flow diagram showing the operation of the position estimation device in the embodiment. [Figure 7] FIG. 7 is a block diagram illustrating an example of a computer that realizes the position estimation device according to the embodiment. DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS
[0016] (Embodiment) Hereinafter, a position estimation device, a position estimation method, and a program according to an embodiment will be described with reference to FIGS.
[0017] [Device configuration] First, a schematic configuration of a position estimation device in an embodiment will be described with reference to Fig. 1. Fig. 1 is a diagram showing a schematic configuration of a position estimation device in an embodiment.
[0018] The position estimation device 10 shown in Fig. 1 is a device for estimating the position of a moving object. As shown in Fig. 1, the position estimation device 10 includes an image data acquisition unit 11, a sensor data acquisition unit 12, a camera attitude prediction unit 13, a feature point search unit 14, and a position estimation unit 15.
[0019] The image data acquisition unit 11 acquires image data output from a camera mounted on a moving object for each frame. The last frame acquired by the image data acquisition unit 11 is set as the "current frame." The sensor data acquisition unit 12 acquires sensor data from a sensor that detects the attitude of the moving object.
[0020] The camera posture prediction unit 13 calculates a predicted value of the camera posture in the next frame to be acquired after the current frame from the camera posture in the current frame acquired by the image data acquisition unit 11 and the sensor data acquired by the sensor data acquisition unit 12 after acquiring the current frame.
[0021] When the image data acquisition unit 11 acquires the next frame, the feature point search unit 14 sets a search window on the next frame using the predicted value after acquisition, and searches for feature points corresponding to the feature points in the current frame within the search window. The next frame is acquired after the acquisition of the above-mentioned current frame, and is the latest frame.
[0022] The position estimation unit 15 calculates the camera posture in the next frame based on the feature points searched for by the feature point search unit 14, separately from the predicted value calculated by the camera posture prediction unit 13. Furthermore, the position estimation unit 15 estimates the position of the moving object in the next frame based on the calculated camera posture in the next frame.
[0023] In this way, the position estimation device 10 sets a search window in the next frame using the camera attitude in the current frame and the attitude of the moving object calculated from the sensor data, thereby suppressing errors in setting the search window. Therefore, the position estimation device 10 can suppress fluctuations in estimation accuracy due to the movement of the moving object when estimating the position of the moving object.
[0024] Next, the configuration and functions of the position estimation device 10 in the embodiment will be specifically described with reference to Figures 2 to 5. Figure 2 is a block diagram specifically showing the configuration of the position estimation device in the embodiment.
[0025] 2, in the embodiment, the position estimation device 10 is mounted on a moving body 100. The moving body 100 is, for example, a self-propelled robot, a vehicle, etc. In addition to the position estimation device 10, the moving body 100 includes a camera 20, a sensor 30, a control device 40, a driving device 50, and a steering device 60.
[0026] The camera 20 is attached to the moving body in the traveling direction, and outputs image data of an image in the traveling direction in frame units at set intervals.
[0027] The sensor 30 is a sensor that detects the attitude of the moving body 100. Examples of the sensor 30 include an acceleration sensor, an angular velocity sensor, and an IMU (Inertial Measurement Unit) equipped with these. In the embodiment, the sensor 30 is an IMU equipped with an acceleration sensor and an angular velocity sensor.
[0028] The control device 40 determines the traveling direction and traveling speed of the moving body 100 based on the position estimated by the position estimation device 10, and controls the drive device 50 and steering device 60 according to the determined traveling direction and traveling speed.
[0029] The driving device 50 includes a prime mover such as an electric motor, a transmission mechanism for transmitting the power of the prime mover to the wheels, and the like, and moves the moving body 100 forward in response to instructions from the control device 40. The steering device 60 includes a mechanism for moving the steering wheels, and operates the steering wheels in response to instructions from the control device 40.
[0030] In the embodiment, the moving body 100 is not limited to the above-mentioned aspect. For example, the moving body 100 may not include the steering device 60, and may be steered by controlling the torque of the left and right drive wheels instead.
[0031] In this embodiment, the image data acquisition unit 11 acquires image data output by the camera 20 on a frame-by-frame basis. In this embodiment, the sensor data acquisition unit 12 acquires acceleration data (a x ,a y ,a z ) and angular velocity data (ω x ,ω y ,ω z ) to get the
[0032] In the embodiment, the position estimation device 10 first creates an environmental map in addition to estimating the position of the moving object 100. First, as shown in Fig. 3, an initial environmental map is created by the feature point searching unit 14 and the position estimation unit 15. Fig. 3 is a diagram showing an example of the process of creating an environmental map.
[0033] 3, first, feature point searching unit 14 extracts feature points (hereinafter referred to as "corresponding feature points") that correspond to feature points extracted in past frames from the current frame. If there is no past frame from which feature points have been extracted, feature point searching unit 14 extracts feature points from the current frame, and after acquiring the next frame, sets the next frame as a new current frame and extracts corresponding feature points that correspond to the previously extracted feature points.
[0034] Next, the position estimation unit 15 calculates the camera posture in the current frame by using a combination of feature points in the current frame and the past frame. Here, in the embodiment, the camera posture is calculated by a rotation matrix R t and the translation vector t t The camera orientation can be calculated by a known method shown in Reference 1 below. (Reference 1) David Nister, "An Efficient Solution to the Five-Point Relative Pose Problem", Published 2004, DOI:10.1109 / TPAMI.2004.17, Corpus ID:886598,<URL:https: / / pdfs.semanticscholar.org / c288 / 7c83751d2c36c63139e68d46516ba3038909.pdf>
[0035] Furthermore, the position estimation unit 15 calculates the three-dimensional coordinates (point cloud data) of the corresponding feature points by performing triangulation using the camera attitude and the two-dimensional coordinates of the corresponding feature points in each of the current frame and the past frame. When the above-mentioned processes by the feature point search unit 14 and the position estimation unit 15 are repeated several times in accordance with the movement of the moving body 100, an initial environmental map is created in which objects around the moving body are represented by three-dimensional point cloud data.
[0036] Then, when the position estimation device 10 can create the initial environmental map, the camera attitude prediction unit 13 calculates a predicted value using the sensor data, and estimates the position of the moving object. The position estimation device 10 can also expand the environmental map using the estimated position. The position estimation of the moving object will be described in detail below.
[0037] In this embodiment, the camera posture prediction unit 13 performs Bayesian estimation using the camera posture in the current frame and sensor data acquired after the current frame is acquired, thereby calculating a predicted value of the camera posture in the next frame. If the processing by the position estimation unit 15 has already been performed, the camera posture in the current frame has been calculated by the position estimation unit 15.
[0038] Specifically, the camera attitude prediction unit 13 applies the sensor data acquired after the acquisition of the current frame to a Kalman filter to calculate a prior prediction value, which will be described later, and calculates the camera attitude in the next frame using the calculated prior prediction value. t and the translation vector t t Hereafter, this is referred to as "camera posture [R][t]".
[0039] The Kalman filter is an iterative estimator (iterative estimation filter) that provides a current state estimate and a state prediction value one step ahead from the current observation amount of a system and a state estimate value one step before. Here, the Kalman filter will be explained with reference to Fig. 4. Fig. 4 is a diagram showing an example of processing performed by the Kalman filter.
[0040] As shown in Figure 4, the Kalman filter first calculates the prior prediction value x t , covariance matrix P t Then, the initial value (t=0) of is set, and the prior prediction value and the covariance matrix are updated based on Equation 1. Furthermore, the Kalman filter uses the measurement data (sensor data) y t and executes a correction that reflects the measurement result based on Equation 2. Furthermore, these processes are repeated and the latest advance prediction value is output.
[0041] In the following formula 1, f t (x t-1 ) is the prior forecast value x at time t t This is a function to find K t is the optimal Kalman gain. In equation 1, w t-1 is the observation error. In equation 1, hat F T t-1 f t (x t-1 ) is the Jacobian matrix of Q. T is the transpose of a matrix. t-1 , w t-1 is the covariance matrix when it is Gaussian distributed.
[0042]
number
[0043]
number
[0044] In the embodiment, the prior prediction value x t For example, the position p, velocity v, and quaternion q of the moving body 100 are used as the measurement data y. The quaternion q is a parameter that represents the rotation of the moving body 100. t The acceleration data output from the IMU (a x ,a y ,a z ) and angular velocity data (ω x ,ω y ,ω z ) is used.
[0045] The camera posture prediction unit 13 predicts the pre-prediction value x t The position p, velocity v, and quaternion q of the moving object 100 are output, and the output predicted values, the camera pose [R][t] in the current frame, and the measurement data y t Using this, we calculate the predicted value of the camera pose [R][t] in the next frame.
[0046] In addition, the camera posture prediction unit 13 converts the Jacobian matrix of the previous state into F t-1 , the covariance matrix of the previous state is P t Then, the measured data y t =h(x t )+r, then h(x t ) Jacobian matrix of H t , the covariance matrix of noise r is R t As the optimal Kalman gain K t In this case, as described later, the position estimation unit 15 calculates the optimal Kalman gain K t Using the posterior predicted value x t Calculate.
[0047] In this embodiment, the feature point searching unit 14 sets a search window on the next frame using a predicted value of the camera pose [R][t] as shown in Fig. 5. Fig. 5 is a diagram showing an example of a search window set in this embodiment.
[0048] Specifically, the feature point search unit 14 applies the predicted value of the camera posture [R][t] to the following equation 3 to obtain the three-dimensional coordinates (world coordinate system (W)) (X W ,Y W ,Z W ) in the camera coordinate system (C) (X C ,Y C ,Z C Next, the feature point search unit 14 converts Z C =1, and normalizes the coordinates of the transformed feature points using the following equation 4. Then, the feature point searching unit 14 calculates the coordinates (X' C ,Y' C ) is reprojected onto the next frame using the following equation 4, and a search window is set around the two-dimensional coordinates of the reprojected feature point.
[0049]
number
[0050]
number
[0051]
number
[0052] Furthermore, the feature point searching unit 14 sets the search window on the next frame such that the length of the search window in a direction parallel to the epipolar line of the next frame is longer than the length of the search window in a direction perpendicular to that direction, as shown in Fig. 5. That is, the feature point searching unit 14 sets the search window such that the horizontal length is longer than the vertical length. This makes it possible to reduce the estimation error of the position of the search window in a moving body 100 whose movement in the horizontal direction is larger than that in the vertical direction, such as a self-propelled robot or vehicle.
[0053] The feature point search unit 14 searches for feature points of the next frame that match the feature points of the current frame within the set search window. The feature point search unit 14 executes the above-mentioned process for each of several feature points to extract multiple combinations of feature points of the current frame and feature points of the next frame.
[0054] The position estimation unit 15 first calculates the camera posture in the next frame, and then calculates a posterior predicted value x in the next frame using the predicted value predicted by the camera posture prediction unit 13, the calculated camera posture in the next frame, and the Kalman gain. t Calculate the posterior predicted value x t For example, the position p, the velocity v, and the quaternion q of the moving body 100 are used as the Kalman gain. t is used.
[0055] Next, the position estimation unit 15 calculates the true camera orientation [R][t] in the next frame, in other words, the three-dimensional coordinates of the moving object, for each combination of the extracted feature points, using the posterior predicted value.
[0056] [Device operation] Next, the operation of the position estimation device 10 in the embodiment will be described with reference to FIG. 6. FIG. 6 is a flow diagram showing the operation of the position estimation device in the embodiment. In the following description, FIGS. 1 to 5 will be referred to as appropriate. In the embodiment, a position estimation method is implemented by operating the position estimation device 10. Therefore, the description of the position estimation method in the embodiment will be replaced by the following description of the operation of the position estimation device 10.
[0057] First, it is assumed that an initial environmental map has been created. The camera 20 is mounted on the moving body 100 and outputs image data at a constant frame rate. The image data acquisition unit 11 acquires the image data output by the camera 20 for each frame.
[0058] As shown in FIG. 6, when an initial environmental map is created, the camera posture prediction unit 13 first calculates the initial values of the position p, velocity v, and quaternion q of the moving body 100, which are prior prediction values, and the covariance matrix P t The initial value (t=0) of is set (step A1).
[0059] Next, the sensor data acquisition unit 12 acquires acceleration data (a x ,a y ,a z ) and angular velocity data (ω x ,ω y ,ω z ) is obtained (Step A2).
[0060] Next, when the acceleration data and angular velocity data are acquired in step A2, the camera posture prediction unit 13 applies the acquired acceleration data and angular velocity data to the above-mentioned equations 1 and 2 to calculate the position p, velocity v, and quaternion q as the latest advance predicted values (step A3). t When step A3 is executed for the first time, the initial value set in step A1 is used.
[0061] Next, the camera posture prediction unit 13 calculates a predicted value of the camera posture [R|t] in the next frame using the position p and quaternion q of the moving body 100 calculated as the prior predicted values in step A3 (step A4). Also, in step A4, the camera posture prediction unit 13 calculates the optimal Kalman gain K t Also calculate.
[0062] Next, when the image data acquisition unit 11 acquires the next frame, the feature point search unit 14 sets a search window on the next frame using the predicted value of the camera orientation [R|t] calculated in step A4 (step A5). In step A5, the search window is set so that the length in the direction parallel to the epipolar line of the next frame is longer than the length in the direction perpendicular to that direction.
[0063] Next, the feature point searching unit 14 searches for feature points of the next frame that match the feature points of the current frame within the search window set in step A5, and extracts multiple combinations of the feature points of the current frame and the feature points of the next frame (step A6).
[0064] Next, for each combination of feature points extracted in step A6, the position estimation unit 15 executes the PnP method using the two-dimensional coordinates of the feature points on the next frame and the three-dimensional coordinates of the feature points on the environmental map (point cloud data) to calculate the camera posture in the next frame (step A7).
[0065] Next, the position estimation unit 15 compares the predicted value calculated in step A4 with the optimal Kalman gain K t and the camera posture in the next frame calculated in step A7, the position p, velocity v, and quaternion q are calculated as posterior predicted values in the next frame (step A8).
[0066] Next, the position estimation unit 15 calculates the three-dimensional coordinates of the moving object (the true camera orientation [R][t] in the next frame) using the position p and the quaternion q calculated in step A8 (step A9).
[0067] Next, the camera posture prediction unit 13 judges whether or not a termination condition, such as the moving body 100 being out of operation, is satisfied (step A10). If the result of the judgment in step A10 is that the termination condition is not satisfied, the camera posture prediction unit 13 executes step A2 again. On the other hand, if the result of the judgment in step A10 is that the termination condition is satisfied, the processing in the position estimation device 10 ends.
[0068] [Effects of the embodiment] As described above, in the embodiment, the search window is set using information from the sensor 30 (IMU) attached to the moving body 100, so that the search window is appropriately set even if the moving body 100 makes a sudden turn and the movement of the moving body 100 changes suddenly. As a result, the position estimation device 10 can suppress the fluctuation in estimation accuracy due to the movement of the moving body 100 in estimating the position of the moving body 100.
[0069] [program] An example of the program in the embodiment is a program that causes a computer to execute steps A1 to A10 shown in Fig. 6. By installing and executing this program in a computer, the position estimation device 10 and the position estimation method in the embodiment can be realized. In this case, the processor of the computer functions as an image data acquisition unit 11, a sensor data acquisition unit 12, a camera attitude prediction unit 13, a feature point search unit 14, and a position estimation unit 15, and performs processing.
[0070] Examples of the computer include a general-purpose PC, a smartphone, and a tablet terminal device. Furthermore, the computer may be a computer (control device 40) mounted on the moving object 100.
[0071] The program in the embodiment may be executed by a computer system constructed by a plurality of computers. In this case, for example, each computer may function as any one of the image data acquisition unit 11, the sensor data acquisition unit 12, the camera attitude prediction unit 13, the feature point search unit 14, and the position estimation unit 15.
[0072] (physical configuration) Here, a computer that realizes the position estimation device 10 by executing a program in the embodiment will be described with reference to Fig. 7. Fig. 7 is a block diagram showing an example of a computer that realizes the position estimation device in the embodiment.
[0073] 7, the computer 110 includes a CPU (Central Processing Unit) 111, a main memory 112, a storage device 113, an input interface 114, a display controller 115, a data reader / writer 116, and a communication interface 117. These components are connected to each other via a bus 121 so as to be able to communicate data with each other.
[0074] Furthermore, the computer 110 may include a GPU (Graphics Processing Unit) or an FPGA (Field-Programmable Gate Array) in addition to or instead of the CPU 111. In this embodiment, the GPU or FPGA can execute the programs in the embodiments.
[0075] The CPU 111 loads a program in the embodiment, which is composed of a group of codes and is stored in the storage device 113, into the main memory 112, and executes each code in a predetermined order to perform various calculations. The main memory 112 is typically a volatile storage device such as a DRAM (Dynamic Random Access Memory).
[0076] Moreover, the program in the embodiment is provided in a state stored in a computer-readable recording medium 120. The program in the embodiment may be distributed on the Internet connected via the communication interface 117.
[0077] Specific examples of the storage device 113 include a hard disk drive and a semiconductor storage device such as a flash memory. The input interface 114 mediates data transmission between the CPU 111 and input devices 118 such as a keyboard and a mouse. The display controller 115 is connected to a display device 119 and controls the display on the display device 119.
[0078] Data reader / writer 116 mediates data transmission between CPU 111 and recording medium 120, reads programs from recording medium 120, and writes processing results in computer 110 to recording medium 120. Communication interface 117 mediates data transmission between CPU 111 and other computers.
[0079] Specific examples of the recording medium 120 include general-purpose semiconductor storage devices such as CF (Compact Flash (registered trademark)) and SD (Secure Digital), magnetic recording media such as a flexible disk, or optical recording media such as a CD-ROM (Compact Disk Read Only Memory).
[0080] The position estimation device 10 in the embodiment can be realized by using hardware corresponding to each part, instead of a computer with a program installed. Furthermore, the position estimation device 10 may be partially realized by a program and the remaining part by hardware. EXAMPLES
[0081] Next, an example of the position estimation device 10 in the embodiment will be described. The following description will be given along steps A1 to A10 shown in Fig. 6. Furthermore, the following documents are referenced in the following description. (References) Joan Sola,"Quaternion kinematics for the error-state Kalman filter",2017, <URL:https: / / arxiv.org / abs / 1711.02508>
[0082] (Step A1) First, the camera attitude prediction unit 13 sets the initial values of the position p and velocity v of the moving body 100 as shown in the following formula 6. Here, the time when the IMU performs measurement is set to "t-1", and the camera attitude during the generation of the initial environmental map is set to [R|t].
[0083]
number
[0084] Moreover, the rotation matrix R is defined as in Expression 7. The quaternion q is defined by Expressions 7 and 8 using each element of the rotation matrix. Therefore, the initial value of the quaternion q is found from the rotation matrix at "t-1".
[0085]
number
[0086]
number
[0087]
number
[0088] (Step A2) The sensor data acquisition unit 12 acquires acceleration data (a x ,a y ,a z ) and angular velocity data (ω x ,ω y ,ω z ) is obtained. Here, the actual position obtained from the acceleration data is R(a m -a b ) and the actual position obtained from the angular velocity data is (ω m -ω b ) Note that a m and ω m is the measured value, and a b and ω b is the error.
[0089] (Step A3) The camera posture prediction unit 13 applies the actual measurement of the angle data and the angular velocity data to the following equation 10 to calculate the latest predicted values of the position p, the velocity v, and the quaternion q. The camera posture prediction unit 13 also calculates the covariance matrix P t Calculate the prior prediction value of F in Equation 11. x and Q i is the Jacobian matrix calculated from equation (10).
[0090]
number
[0091]
number
[0092] (Step A4) The camera posture prediction unit 13 applies the prior prediction value of the quaternion q to the following equation 12 to calculate a prediction value of the camera posture [R|t] in the next frame. The position of the camera in the next frame is set to the position p calculated in step A3.
[0093]
number
[0094] In addition, the optimal Kalman gain K t The calculation formula for is as shown in the following formula 13, and is calculated from the Jacobian matrix H of the function h. Therefore, the camera posture prediction unit 13 calculates the optimal Kalman gain K t Calculate.
[0095]
number
[0096] (Step A5) When the image data acquisition unit 11 acquires the next frame, the feature point search unit 14 sets a search window on the next frame using the predicted value of the camera orientation [R|t] calculated in step A4.
[0097] Specifically, the feature point search unit 14 applies the predicted value of the camera posture [R][t] to the following equation 3 to obtain the three-dimensional coordinates (world coordinate system (W)) (X W ,Y W ,Z W ) in the camera coordinate system (C) (X C ,Y C ,Z C Next, the feature point search unit 14 converts Z C =1, and normalizes the coordinates of the transformed feature points using the above-mentioned equation 4. Then, the feature point searching unit 14 calculates the coordinates (X' C ,Y' C ) is reprojected onto the next frame using Equation 4 above, and a search window is set around the two-dimensional coordinates of the reprojected feature point.
[0098] In addition, as shown in Figure 5, the feature point search unit 14 sets a search window on the next frame so that the length of the search window in a direction parallel to the epipolar line of the next frame is longer than the length of the search window in a direction perpendicular to that direction.
[0099] (Step A6) The feature point searching unit 14 searches for feature points of the next frame that match the feature points of the current frame within the search window set in step A5, and extracts a plurality of combinations of the feature points of the current frame and the feature points of the next frame.
[0100] (Step A7) For each combination of feature points extracted in step A6, the position estimation unit 15 executes the PnP method using the two-dimensional coordinates of the feature points on the next frame and the three-dimensional coordinates of the feature points on the environmental map (point cloud data) to calculate the camera posture in the next frame.
[0101] (Step A8) First, the self-position y of the moving object 100 is obtained from the camera posture in the next frame estimated in step A7. Then, the sensor data at and ωt at time t and the self-position y of the moving object 100 in the next frame are expressed by a function h as shown in the following equation 14. In addition, in equation 14, h() is a nonlinear function representing the system state, and v here is Gaussian noise expressed by the covariance matrix V.
[0102]
number
[0103] The following equation 15 holds between the Kalman coefficient K and the function h.
[0104]
number
[0105] Furthermore, the hat δ in the above formula 15 x is the posterior predicted value x t Therefore, in step A8, the position estimation unit 15 calculates posterior predicted values of the position p, the velocity v, and the quaternion q using the following equation (17).
[0106]
number
[0107]
number
[0108] (Step A9) In step A9, the position estimation unit 15 calculates the three-dimensional coordinates of the moving body (the true camera pose [R][t] in the next frame) using the posterior predicted values (position p, velocity v, and quaternion q) for each combination of feature points extracted in step A6.
[0109] (Step A10) Thereafter, step A9 is executed, and if the end condition is not satisfied, step A2 is executed again, and if the end condition is satisfied, the processing in the position estimation device 10 is terminated.
[0110] A part or all of the above-described embodiment and examples can be expressed by (Addendum 1) to (Addendum 18) described below, but are not limited to the following descriptions.
[0111] (Appendix 1) an image data acquisition unit that acquires image data output from a camera mounted on the moving object for each frame; a sensor data acquisition unit that acquires sensor data from a sensor that detects the attitude of the moving object; a camera posture prediction unit that obtains a camera posture in the acquired frame, and calculates a predicted value of a camera posture in a next frame obtained after the frame, based on the obtained camera posture in the frame and the sensor data obtained after the acquisition of the frame; a feature point searching unit that, after obtaining the next frame, sets a search window on the next frame using the predicted value and searches for a feature point corresponding to a feature point in the frame within the search window; a position estimation unit that calculates a camera posture in the next frame based on the searched feature points separately from the predicted value, and estimates a position of the moving object in the next frame based on the calculated camera posture in the next frame; A position estimation device comprising:
[0112] (Appendix 2) 2. A position estimation device according to claim 1, the camera posture prediction unit calculates the predicted value by performing Bayesian estimation using a camera posture in the frame and the sensor data acquired after acquisition of the frame. A position estimation device comprising:
[0113] (Appendix 3) 3. A position estimation device according to claim 1 or 2, the feature point searching unit sets the search window such that a length of the search window in a direction parallel to an epipolar line of the next frame is longer than a length of the search window in a direction perpendicular to the direction; A position estimation device comprising:
[0114] (Appendix 4) A position estimation device according to any one of claims 1 to 3, the sensor includes at least one of an inertial measurement unit, an acceleration sensor, and an angular rate sensor; A position estimation device comprising:
[0115] (Appendix 5) A position estimation device according to any one of claims 1 to 4, the camera pose includes a rotation matrix and a translation vector of the camera; A position estimation device comprising:
[0116] (Appendix 6) 3. A position estimation device according to claim 2, the camera posture prediction unit applies the sensor data acquired after acquisition of the frame to a Kalman filter to calculate a prior prediction value, and calculates the prediction value using the calculated prior prediction value and the camera posture in the frame; the position estimation unit calculates a camera posture in the next frame based on the searched feature points separately from the predicted value, and then calculates a posterior predicted value in the next frame using the predicted value, the calculated camera posture in the next frame, and a Kalman gain, and further estimates a position of the moving object in the next frame using the posterior predicted value. A position estimation device comprising:
[0117] (Appendix 7) An image data acquisition step of acquiring image data output from a camera mounted on the moving object for each frame; a sensor data acquisition step of acquiring sensor data from a sensor that detects the attitude of the moving object; a camera posture prediction step of determining a camera posture in the acquired frame, and calculating a predicted value of a camera posture in a next frame acquired after the frame from the determined camera posture in the frame and the sensor data acquired after the acquisition of the frame; a feature point searching step of, after obtaining the next frame, setting a search window on the next frame using the predicted value, and searching for feature points corresponding to feature points in the frame within the search window; a position estimation step of calculating a camera posture in the next frame based on the searched feature points separately from the predicted value, and estimating a position of the moving object in the next frame based on the calculated camera posture in the next frame; 13. A position estimation method comprising:
[0118] (Appendix 8) 8. The method of claim 7, further comprising: In the camera pose prediction step, the predicted value is calculated by performing Bayesian estimation using the camera pose in the frame and the sensor data acquired after acquisition of the frame. A position estimation method comprising:
[0119] (Appendix 9) 9. The method of claim 7, further comprising: In the feature point searching step, the search window is set so that a length of the search window in a direction parallel to the epipolar line of the next frame is longer than a length of the search window in a direction perpendicular to the direction. A position estimation method comprising:
[0120] (Appendix 10) A position estimation method according to any one of Supplementary Notes 7 to 9, the sensor includes at least one of an inertial measurement unit, an acceleration sensor, and an angular rate sensor; A position estimation method comprising:
[0121] (Appendix 11) A position estimation method according to any one of Supplementary Notes 7 to 10, the camera pose includes a rotation matrix and a translation vector of the camera; A position estimation method comprising:
[0122] (Appendix 12) 9. A location estimation method according to claim 8, further comprising: In the camera posture prediction step, a prior prediction value is calculated by applying the sensor data acquired after acquisition of the frame to a Kalman filter, and the prediction value is calculated using the calculated prior prediction value and a camera posture in the frame; In the position estimation step, a camera posture in the next frame is calculated based on the searched feature points separately from the predicted value, and then a posterior predicted value in the next frame is calculated using the predicted value, the calculated camera posture in the next frame, and a Kalman gain, and further a position of the moving object in the next frame is estimated using the posterior predicted value. A position estimation method comprising:
[0123] (Appendix 13) On the computer, An image data acquisition step of acquiring image data output from a camera mounted on the moving object for each frame; a sensor data acquisition step of acquiring sensor data from a sensor that detects the attitude of the moving object; a camera posture prediction step of determining a camera posture in the acquired frame, and calculating a predicted value of a camera posture in a next frame acquired after the frame from the determined camera posture in the frame and the sensor data acquired after the acquisition of the frame; a feature point searching step of, after obtaining the next frame, setting a search window on the next frame using the predicted value, and searching for feature points corresponding to feature points in the frame within the search window; a position estimation step of calculating a camera posture in the next frame based on the searched feature points separately from the predicted value, and estimating a position of the moving object in the next frame based on the calculated camera posture in the next frame; A program to execute.
[0124] (Appendix 14) 14. The program of claim 13, In the camera pose prediction step, the predicted value is calculated by performing Bayesian estimation using the camera pose in the frame and the sensor data acquired after acquisition of the frame. A program characterized by:
[0125] (Appendix 15) 15. The program according to claim 13 or 14, In the feature point searching step, the search window is set so that a length of the search window in a direction parallel to the epipolar line of the next frame is longer than a length of the search window in a direction perpendicular to the direction. A program characterized by:
[0126] (Appendix 16) The program according to any one of appendices 13 to 15, the sensor includes at least one of an inertial measurement unit, an acceleration sensor, and an angular rate sensor; A program characterized by:
[0127] (Appendix 17) The program according to any one of appendices 13 to 16, the camera pose includes a rotation matrix and a translation vector of the camera; A program characterized by:
[0128] (Appendix 18) 15. The program of claim 14, In the camera posture prediction step, a prior prediction value is calculated by applying the sensor data acquired after acquisition of the frame to a Kalman filter, and the prediction value is calculated using the calculated prior prediction value and a camera posture in the frame; In the position estimation step, a camera posture in the next frame is calculated based on the searched feature points separately from the predicted value, and then a posterior predicted value in the next frame is calculated using the predicted value, the calculated camera posture in the next frame, and a Kalman gain, and further a position of the moving object in the next frame is estimated using the posterior predicted value. A program characterized by: [Industrial Applicability]
[0129] INDUSTRIAL APPLICABILITY As described above, according to the present invention, in estimating the position of a moving object, it is possible to suppress fluctuations in estimation accuracy due to the movement of the moving object. The present invention is useful for systems that use SLAM. [Explanation of symbols]
[0130] 10 Position estimation device 11 Image data acquisition section 12 Sensor data acquisition unit 13 Camera Pose Prediction Unit 14 Feature point search section 15 Position estimation part 20 Camera 30 Sensors 40 Control device 50 Drive unit 60 Steering Gear 70 Ranging device 100 Mobile 110 Computer 111 CPU 112 Main memory 113 Storage device 114 Input Interface 115 Display Controller 116 Data Reader / Writer 117 Communication Interface 118 Input Devices 119 Display device 120 Recording media 121 Bus< / url:>
Claims
1. an image data acquisition unit that acquires image data output from a camera mounted on the moving object for each frame; a sensor data acquisition unit that acquires sensor data from a sensor that detects the attitude of the moving object; a camera posture prediction unit that obtains a camera posture in the acquired frame, and calculates a predicted value of a camera posture in a next frame obtained after the frame, based on the obtained camera posture in the frame and the sensor data obtained after the acquisition of the frame; a feature point searching unit that, after obtaining the next frame, sets a search window on the next frame using the predicted value and searches for a feature point corresponding to a feature point in the frame within the search window; a position estimation unit that calculates a camera posture in the next frame based on the searched feature points separately from the predicted value, and estimates a position of the moving object in the next frame based on the calculated camera posture in the next frame; Equipped with the camera posture prediction unit calculates a prior prediction value by applying a Kalman filter to the sensor data acquired after acquisition of the frame, and calculates the prediction value using the camera posture in the frame, the calculated prior prediction value, and the sensor data; the feature point searching unit sets the search window such that a length of the search window in a direction parallel to an epipolar line of the next frame is longer than a length of the search window in a direction perpendicular to the direction; A position estimation device comprising:
2. The position estimation device according to claim 1 , the sensor includes at least one of an inertial measurement unit, an acceleration sensor, and an angular rate sensor; A position estimation device comprising:
3. The position estimation device according to claim 1 , the camera pose includes a rotation matrix and a translation vector of the camera; A position estimation device comprising:
4. The position estimation device according to claim 1 , the camera posture prediction unit applies the sensor data acquired after acquisition of the frame to a Kalman filter to calculate a prior prediction value, and calculates the prediction value using the calculated prior prediction value and the camera posture in the frame; the position estimation unit calculates a camera posture in the next frame based on the searched feature points separately from the predicted value, and then calculates a posterior predicted value in the next frame using the predicted value, the calculated camera posture in the next frame, and a Kalman gain, and further estimates a position of the moving object in the next frame using the posterior predicted value. A position estimation device comprising:
5. An image data acquisition step of acquiring image data output from a camera mounted on the moving object for each frame; a sensor data acquisition step of acquiring sensor data from a sensor that detects the attitude of the moving object; a camera posture prediction step of determining a camera posture in the acquired frame, and calculating a predicted value of a camera posture in a next frame acquired after the frame from the determined camera posture in the frame and the sensor data acquired after the acquisition of the frame; a feature point searching step of setting a search window on the next frame using the predicted value after the next frame is obtained, and searching for a feature point corresponding to a feature point in the frame within the search window; a position estimation step of calculating a camera posture in the next frame based on the searched feature points separately from the predicted value, and estimating a position of the moving object in the next frame based on the calculated camera posture in the next frame; having In the camera posture prediction step, a prior prediction value is calculated by applying a Kalman filter to the sensor data acquired after acquisition of the frame, and the prediction value is calculated using the camera posture in the frame, the calculated prior prediction value, and the sensor data; In the feature point searching step, the search window is set so that a length of the search window in a direction parallel to the epipolar line of the next frame is longer than a length of the search window in a direction perpendicular to the direction. A position estimation method comprising:
6. 6. A position estimation method according to claim 5, comprising: the sensor includes at least one of an inertial measurement unit, an acceleration sensor, and an angular rate sensor; A position estimation method comprising:
7. 6. A position estimation method according to claim 5, comprising: the camera pose includes a rotation matrix and a translation vector of the camera; A position estimation method comprising:
8. 6. A position estimation method according to claim 5, comprising: In the camera posture prediction step, a prior prediction value is calculated by applying the sensor data acquired after acquisition of the frame to a Kalman filter, and the prediction value is calculated using the calculated prior prediction value and a camera posture in the frame; In the position estimation step, a camera posture in the next frame is calculated based on the searched feature points separately from the predicted value, and then a posterior predicted value in the next frame is calculated using the predicted value, the calculated camera posture in the next frame, and a Kalman gain, and further a position of the moving object in the next frame is estimated using the posterior predicted value. A position estimation method comprising:
9. On the computer, An image data acquisition step of acquiring image data output from a camera mounted on the moving object for each frame; a sensor data acquisition step of acquiring sensor data from a sensor that detects the attitude of the moving object; a camera posture prediction step of determining a camera posture in the acquired frame, and calculating a predicted value of a camera posture in a next frame acquired after the frame from the determined camera posture in the frame and the sensor data acquired after the acquisition of the frame; a feature point searching step of, after obtaining the next frame, setting a search window on the next frame using the predicted value, and searching for feature points corresponding to feature points in the frame within the search window; a position estimation step of calculating a camera posture in the next frame based on the searched feature points separately from the predicted value, and estimating a position of the moving object in the next frame based on the calculated camera posture in the next frame; Run the command, In the camera posture prediction step, a Kalman filter is applied to the sensor data acquired after acquisition of the frame to calculate a prior prediction value, and the prediction value is calculated using the camera posture in the frame, the calculated prior prediction value, and the sensor data; In the feature point searching step, the search window is set so that a length of the search window in a direction parallel to the epipolar line of the next frame is longer than a length of the search window in a direction perpendicular to the direction. program.
10. The program according to claim 9, the sensor includes at least one of an inertial measurement unit, an acceleration sensor, and an angular rate sensor; A program characterized by:
11. The program according to claim 9, the camera pose includes a rotation matrix and a translation vector of the camera; A program characterized by:
12. The program according to claim 9, In the camera posture prediction step, a prior prediction value is calculated by applying the sensor data acquired after acquisition of the frame to a Kalman filter, and the prediction value is calculated using the calculated prior prediction value and a camera posture in the frame; In the position estimation step, a camera posture in the next frame is calculated based on the searched feature points separately from the predicted value, and then a posterior predicted value in the next frame is calculated using the predicted value, the calculated camera posture in the next frame, and a Kalman gain, and further a position of the moving object in the next frame is estimated using the posterior predicted value. A program characterized by:
Citation Information
Patent Citations
Locus estimation method and locus estimation device
JP2019018743A
Position attitude estimation device
JP2020076714A
Subject tracking system, subject tracking method, image processing device and method and program for controlling same
WO2014083910A1
Localization device
WO2020137313A1
