WO2022183665A1 - 初始化方法及装置、电子设备、存储介质和程序产品 - Google Patents

初始化方法及装置、电子设备、存储介质和程序产品 Download PDF

Info

Publication number
WO2022183665A1
WO2022183665A1 PCT/CN2021/107702 CN2021107702W WO2022183665A1 WO 2022183665 A1 WO2022183665 A1 WO 2022183665A1 CN 2021107702 W CN2021107702 W CN 2021107702W WO 2022183665 A1 WO2022183665 A1 WO 2022183665A1
Authority
WO
WIPO (PCT)
Prior art keywords
visual
inertial system
sensor
inertial
state
Prior art date
Application number
PCT/CN2021/107702
Other languages
English (en)
French (fr)
Inventor
陈常
王楠
陈丹鹏
Original Assignee
浙江商汤科技开发有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 浙江商汤科技开发有限公司 filed Critical 浙江商汤科技开发有限公司
Publication of WO2022183665A1 publication Critical patent/WO2022183665A1/zh

Links

Images

Classifications

    • GPHYSICS
    • G01MEASURING; TESTING
    • G01CMEASURING DISTANCES, LEVELS OR BEARINGS; SURVEYING; NAVIGATION; GYROSCOPIC INSTRUMENTS; PHOTOGRAMMETRY OR VIDEOGRAMMETRY
    • G01C21/00Navigation; Navigational instruments not provided for in groups G01C1/00 - G01C19/00
    • G01C21/10Navigation; Navigational instruments not provided for in groups G01C1/00 - G01C19/00 by using measurements of speed or acceleration
    • G01C21/12Navigation; Navigational instruments not provided for in groups G01C1/00 - G01C19/00 by using measurements of speed or acceleration executed aboard the object being navigated; Dead reckoning
    • G01C21/16Navigation; Navigational instruments not provided for in groups G01C1/00 - G01C19/00 by using measurements of speed or acceleration executed aboard the object being navigated; Dead reckoning by integrating acceleration or speed, i.e. inertial navigation
    • G01C21/165Navigation; Navigational instruments not provided for in groups G01C1/00 - G01C19/00 by using measurements of speed or acceleration executed aboard the object being navigated; Dead reckoning by integrating acceleration or speed, i.e. inertial navigation combined with non-inertial navigation instruments
    • GPHYSICS
    • G01MEASURING; TESTING
    • G01SRADIO DIRECTION-FINDING; RADIO NAVIGATION; DETERMINING DISTANCE OR VELOCITY BY USE OF RADIO WAVES; LOCATING OR PRESENCE-DETECTING BY USE OF THE REFLECTION OR RERADIATION OF RADIO WAVES; ANALOGOUS ARRANGEMENTS USING OTHER WAVES
    • G01S11/00Systems for determining distance or velocity not using reflection or reradiation
    • G01S11/12Systems for determining distance or velocity not using reflection or reradiation using electromagnetic waves other than radio waves

Definitions

  • the present application relates to the field of computer vision technology, and in particular, to an initialization method and apparatus, electronic equipment, storage medium and program product.
  • VI-SLAM Visual-Inertial Simultaneous Localization and Mapping
  • UAV visual and inertial sensors
  • unmanned driving and other fields The visual-inertial system can use the data collected by visual sensors and inertial sensors to obtain high-precision poses, and complete the construction of one-dimensional or multi-dimensional environment maps.
  • the visual-inertial system needs to be initialized every time it is started, and each initialization Using offline calibration parameters, the stability of the system state will be affected, resulting in slower system initialization.
  • embodiments of the present application provide an initialization method and apparatus, an electronic device, a storage medium, and a program product.
  • the embodiment of the present application provides a method for initializing a visual inertial system, the method comprising:
  • the visual inertial system is initialized for the first time with the parameters calibrated offline;
  • the visual inertial system is initialized at the current moment based on the second hot start parameter obtained from the last update.
  • the steady state and the tracking state of the visual inertial system are determined to obtain the first hot start parameter, including:
  • the first state data is stored as the first warm-start parameter.
  • updating the first warm-start parameter according to the steady state and the tracking state includes:
  • the first warm-start parameter is updated.
  • the visual-inertial system includes an inertial sensor
  • the first state data includes: the covariance of the linear acceleration in the sliding window calculated by the visual-inertial system in the case of initializing the image of the second preset number of frames, the covariance of the inertial sensor The number of rotation accumulations, the first zero bias of the inertial sensor's accelerometers and gyroscopes, the first velocity of the visual-inertial system, and the number of image features tracked by the visual-inertial system.
  • determining whether the visual-inertial system is stable and tracking is stable according to the first state data of the visual-inertial system including:
  • the first zero bias converges, and the first velocity converges, it is determined that the state of the visual inertial system is stable
  • determining that the inertial sensor is excited according to the covariance of the linear acceleration and the number of accumulated rotations including:
  • the visual-inertial system further includes a visual sensor
  • the first state data further includes: a first time of the visual-inertial system, a first temperature, a first zero-bias covariance, and a first time between the visual sensor and the inertial sensor. a time offset, the first translation and first rotation from the visual sensor to the inertial sensor external parameter, the first field of view angle of the visual sensor, the first width and height of the image collected by the visual sensor, the first internal parameter of the visual sensor .
  • the visual inertial system is initialized at the current moment based on the second hot start parameter obtained from the last update, including:
  • part or all of the second warm-start parameter includes the second time and the second temperature of the visual inertial system. , the second field of view of the vision sensor, the second width and height of the image captured by the vision sensor, the second bias of the accelerometer and gyroscope of the inertial sensor, the covariance of the second bias, the visual sensor and the inertial a second time offset between the sensors, a second translation and a second rotation from the visual sensor to the inertial sensor extrinsic parameter, and the second intrinsic parameter of the visual sensor;
  • the covariance of the second zero bias is expanded by the second time and the second temperature to obtain the expanded covariance
  • the second field of view angle, the second width and the second height, the second zero bias, the expanded covariance, and the second time are used.
  • the offset, the second translation and the second rotation, and the second internal parameter are initialized at the current moment.
  • the method further includes:
  • the second field of view angle, the second width and the second height, the second zero offset, the expanded covariance, the second time offset, the second translation and the second rotation are adopted.
  • the internal parameters of the online calibration are initialized at the current moment.
  • the method further includes:
  • the second width is equal to the first width
  • the second height is equal to the first height
  • the second field of view angle is equal to the first field of view angle
  • An embodiment of the present application provides an initialization device for a visual inertial system, and the device includes:
  • a first initialization module configured to initialize the visual inertial system for the first time by using the parameters of the offline calibration
  • a state determination module configured to determine the stable state and the tracking state of the visual inertial system to obtain the first hot start parameter
  • a priori acquisition module configured to update the first hot start parameter according to the steady state and the tracking state
  • the second initialization module is configured to initialize the visual inertial system at the current moment based on the second hot start parameter obtained from the last update.
  • the embodiments of the present application provide an electronic device, the electronic device includes an input device and an output device, and also includes a processor, which is suitable for implementing one or more instructions; and a computer storage medium, where the computer storage medium stores one or more instructions. a plurality of instructions, the one or more instructions being adapted to be loaded by the processor and to perform the following steps:
  • the visual inertial system is initialized for the first time with the parameters calibrated offline;
  • the visual inertial system is initialized at the current moment based on the second hot start parameter obtained from the last update.
  • An embodiment of the present application provides a computer storage medium, where the computer storage medium stores one or more instructions, and the one or more instructions are suitable for being loaded by a processor and performing the following steps:
  • the visual inertial system is initialized for the first time with the parameters calibrated offline;
  • the visual inertial system is initialized at the current moment based on the second hot start parameter obtained from the last update.
  • An embodiment of the present application provides a computer program product, wherein the computer program product includes a non-transitory computer-readable storage medium storing a computer program, and the computer program product may be a software installation package.
  • the above computer program is operable to cause a computer to perform the following steps:
  • the visual inertial system is initialized for the first time with the parameters calibrated offline;
  • the visual inertial system is initialized at the current moment based on the second hot start parameter obtained from the last update.
  • the embodiments of the present application provide an initialization method and device, an electronic device, a storage medium and a program product.
  • the visual inertial system is initialized for the first time by using parameters calibrated offline; the stable state and tracking state of the visual inertial system are determined to obtain the first a warm-start parameter; the first warm-start parameter is updated according to the steady state and the tracking state; the visual inertial system is initialized at the current moment based on the second warm-start parameter obtained from the last update.
  • the first hot-start parameter is stored when the visual inertial system is stable and the tracking is stable, and the first hot-start parameter will be continuously updated in the subsequent image tracking according to the stable state and tracking state of the visual-inertial system
  • the second hot start parameter obtained by the latest update is also stored under the condition that the visual inertial system is stable and the tracking is stable.
  • the second hot start parameter has higher stability.
  • the visual-inertial system can be quickly stabilized, which is beneficial to improve the speed of system initialization.
  • FIG. 1 is a schematic flowchart of an initialization method of a visual inertial system provided by an embodiment of the present application
  • FIG. 2 is a schematic diagram of obtaining a priori parameters of hot start according to an embodiment of the present application
  • FIG. 3 is a schematic diagram of performing multiple initializations according to an embodiment of the present application.
  • FIG. 4 is a schematic flowchart of another initialization method of a visual inertial system provided by an embodiment of the present application.
  • FIG. 5 is a schematic structural diagram of an initialization device for a visual inertial system provided by an embodiment of the present application
  • FIG. 6 is a schematic structural diagram of an electronic device according to an embodiment of the present application.
  • FIG. 1 is a schematic flowchart of a method for initializing a visual inertial system provided by an embodiment of the present application, which is applied to an electronic device, and the electronic device may be a parameter calibration device of a visual inertial system, such as including the visual inertial system.
  • a terminal device or server where the terminal device can be a user equipment (User Equipment, UE), mobile device, cellular phone, personal digital assistant, handheld device, vehicle-mounted device, or wearable device, etc., and the server can be an independent physical server , it can also be a server cluster or a distributed system, and it can also provide cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, and big data and Cloud servers for basic cloud computing services such as artificial intelligence platforms.
  • the initialization method of the visual inertial system includes steps S11-S14:
  • the visual inertial system is initialized for the first time by using the offline calibration parameters.
  • a visual inertial system usually includes a visual sensor and an inertial sensor
  • a visual sensor is an instrument that uses optical components and imaging devices to obtain image information of the external environment. Red, red; Green, green; Blue, blue; Deep, depth) camera, etc.
  • inertial sensor is a sensor that uses the inertial force of the sensing mass to measure, mainly including a three-axis accelerometer and a three-axis gyroscope, also known as As an inertial measurement unit (Inertial Measurement Unit, IMU).
  • IMU Inertial Measurement Unit
  • the visual-inertial system is implemented by one or more of visual sensors, inertial sensors, ultrasonics, laser rangefinders, lidar, Ultra Wide Band (UWB) and Global Navigation Satellite System (GNSS) Location and map building.
  • UWB Ultra Wide Band
  • GNSS Global Navigation Satellite System
  • the parameters of the offline calibration are still used, wherein the parameters of the offline calibration include but are not limited to the internal parameters of the visual sensor, the time offset between the visual sensor and the inertial sensor, The external parameters of the visual sensor and the inertial sensor, the zero bias of the accelerometer and the gyroscope of the inertial sensor, are initialized for the first time by loading one or more of the above offline calibration parameters into the visual-inertial system.
  • FIG. 2 is a schematic diagram of obtaining a priori parameters of a hot start provided by an embodiment of the present application. As shown in FIG. 2 , it is possible to determine the stable state and the tracking state of the visual inertial system to obtain a first hot start
  • the parameter method includes steps S1201-S1202:
  • S1201 according to the first state data of the visual inertial system, determine whether the state of the visual inertial system is stable and the tracking is stable;
  • the above-mentioned first state data refers to the real-time state data of the visual inertial system after the initial initialization, including the linear acceleration in the sliding window calculated by the visual inertial system when the image of the second preset number of frames is initialized.
  • covariance cov acc rotation accumulation number rotation of inertial sensor, first zero bias r ba and r bg of accelerometer and gyroscope of inertial sensor, first velocity v of visual-inertial system, number of image features tracked by visual-inertial system fea cnt , the first time r t of the visual inertial system, the first temperature r T , the covariance r cov ba of the first zero bias r ba and the covariance r cov bg of r bg , the first time between the visual sensor and the inertial sensor A time offset r td, the first translation r T IC and the first rotation r Q IC from the vision sensor to the inertial sensor external parameters, the first field of view angle r fov of the vision sensor, and the first width r of the image collected by the vision sensor I w and the first height r I h and the first internal reference of the vision sensor.
  • the first internal parameters include the first focal lengths r f x and r f y of the vision sensor, the first optical centers rc x and rc y , the first radial distortion parameters r k 1 and r k 2 , the first all to the distortion parameters r p 1 and r p 2 .
  • the second preset number of frames may be preset, and after the visual inertial system initializes the image of the second preset number of frames, the following formula (1) is used to calculate the covariance cov acc of the linear acceleration:
  • v i represents the speed of the i-th frame image in the sliding window
  • acc i represents the linear acceleration of the i-th frame image in the sliding window
  • mea acc represents the average linear acceleration of the visual inertial system
  • w represents the number of sliding windows, For example, you can take 20.
  • sum angle represents the rotation accumulation times rotation of the inertial sensor
  • angle min represents the minimum rotation angle threshold
  • m represents the judgment value.
  • number of frames Represents the cumulative rotation angle of the image from the i-1th frame to the i-th frame
  • (x, y, z) represents the coordinate axis.
  • the cov min may be 1.0
  • the rotation min may be 15.
  • the following formula (3) and formula ( 4) Calculate the covariance cov rba of the first zero bias r ba of the inertial sensor and the covariance cov rbg of r bg of the accelerometer and gyroscope:
  • mea rba and mea rbg represent the average value of the first zero bias of the inertial sensor accelerometer and gyroscope in the sliding window, respectively, and rba i and rbg i represent the accelerometer and gyroscope of the inertial sensor estimated by the ith frame image, respectively
  • the first zero offset, the cov rba is less than the fourth threshold and cov rbg is less than the fifth threshold
  • the fourth threshold Indicates that the first zero bias r ba of the accelerometer satisfies the maximum value of convergence
  • the fifth threshold Indicates that the first bias r bg of the gyroscope satisfies the maximum value of convergence
  • the fourth threshold Can take 0.0002
  • the fifth threshold You can take 0.00005.
  • Formula (5) calculates the covariance cov v of the first velocity v of each frame of image in the sliding window:
  • mea v represents the average value of the first velocity v in the sliding window
  • v i represents the first velocity of the ith frame image.
  • the cov v is less than the sixth threshold In the case of determining the convergence of the first velocity v, the sixth threshold Indicates that the first velocity v satisfies the maximum value of convergence, exemplarily, the sixth threshold You can take 1.0.
  • the first zero offsets r ba and r bg converge, and the first speed v converges, it is determined that the state of the visual inertial system is stable.
  • the number of image features tracked by the visual-inertial system, fea cnt is greater than or equal to the first threshold, and no tracking loss occurs in the image features, it is determined that the visual-inertial system tracking is stable. For example, when there are more than 20 fea cnts and none of them are lost, it can be determined that the tracking of the visual-inertial system is stable, wherein the image features can be tracked landmarks, corners, and the like.
  • the first state data is stored to obtain the first hot start parameter stored for the first time by the visual inertial system.
  • the electronic device will update the previously stored first hot start parameter under the condition that the system is stable and the tracking is stable.
  • the method for updating the first hot start parameter by tracking the state includes:
  • the first warm-start parameter is updated.
  • the first preset number of frames may be 300 frames.
  • the visual inertial system is determined every 300 frames to determine the stable state and the tracking state, and the determination process is as described in step S12.
  • the first warm start parameter is updated.
  • no update operation is performed.
  • a visual-inertial system is considered unstable if any of the following are satisfied: the first zero bias r ba or r bg does not converge; the first velocity v does not converge; the number of image features tracked fea cnt Less than the first threshold; the number of tracked image features fea cnt is greater than or equal to the first threshold but a tracking loss occurs. It should be noted that since the inertial sensor is excited, no repeated judgment is made here. The operation of updating the first warm-start parameter can be performed in a certain initialization after the first initialization.
  • the third initialization is still performed based on the first hot start parameter. If the hot start parameters are updated, the third initialization is performed based on the hot start parameters after the latest update, and the update in each initialization may be the same.
  • the last time refers to the time point at which the hot start parameters are updated most recently from the current moment.
  • the The second hot start parameter is the above-mentioned first hot start parameter. If the first hot start parameter is updated, the second hot start parameter obtained by the last update is the hot start parameter after the latest update.
  • the second hot start parameter obtained in the last update is still the above-mentioned first hot start parameter. If the first hot start parameter is updated in the initialization, the second hot start parameter obtained by the last update is the hot start parameter after the latest update in the second initialization.
  • FIG. 3 is a schematic diagram of performing multiple initializations provided by an embodiment of the present application.
  • the second hot start parameter is used as a priori parameter, and steps S1401-S1403 as shown in FIG. 3 are performed:
  • some or all of the prior parameters include a second time pt of the visual-inertial system, a second temperature pt , a second angle of view pfov of the vision sensor, a second The width p I w and the second height p I h , the second bias p ba and p bg of the accelerometer and gyroscope of the inertial sensor, the covariance p cov ba of the second bias p ba and the second bias p bg the covariance p cov bg , the second time offset p td between the vision sensor and the inertial sensor, the second translation p T IC and the second rotation p Q IC of the vision sensor to the inertial sensor extrinsic parameter, and the second Internal reference.
  • the second internal parameters include the first focal lengths p f x and p f y of the vision sensor, the first optical centers p c x and p c y , the first radial distortion parameters p k 1 and p k 2 , the first all to the distortion parameters pp 1 and pp 2 .
  • the vision sensor is validated using the second width p I w , the second height p I h and the second angle of view p fov, where the second width p I w , the second height p I h and the second field of view p fov
  • the visual sensor has passed the verification. That is, the following equation is satisfied to determine that the vision sensor has passed the verification:
  • the vision sensor is verified first when the initialization at the current moment is performed, so as to prevent the initialization error caused by the replacement of the vision sensor or the adjustment of the image resolution.
  • the covariance p cov ba of the second bias p ba and the covariance p cov bg of the second bias p bg are inflated using the following equations (6) and (7):
  • e cov bg E t * p cov bg + ( r t - p t +
  • e cov ba represents the inflated covariance of the covariance p cov ba
  • e cov bg represents the inflated covariance of the covariance p cov bg
  • E t represents the inflation coefficient
  • the second time pt expands the covariance p cov ba of the second zero offset p ba and the covariance p cov bg of the second zero offset p bg, and uses the expanded parameters e cov ba and e cov bg to perform a Initialization is beneficial to improve the robustness of the visual-inertial system initialization.
  • the method further comprises:
  • the zero offset p ba is initialized at the current moment.
  • the verification fails, and 0 is used to initialize the current moment, and e ba is the final zero offset.
  • the zero offset p bg is initialized at the current moment.
  • the verification fails, and 0 is used to initialize the current moment, and e bg is the final zero offset.
  • the method further includes:
  • the second field of view angle, the second width and the second height, the second zero offset, the expanded covariance, the second time offset, the second translation and the second rotation are adopted.
  • the internal parameters of the online calibration are initialized at the current moment.
  • the operation of verifying the internal reference calibrated online is performed, wherein.
  • the internal parameters of the online calibration include the third focal length e f x and e f y of the vision sensor, the third optical center e c x and e c y , the third radial distortion parameters e k 1 and e k 2 , the third tangential distortion Parameters e p 1 and e p 2 .
  • e k 1 e k 1 ,
  • ⁇ 0.1; e k 1 0, others; when the absolute value of e k 1 is less than 0.1, use e k 1 to initialize the current moment, when the absolute value of e k 1 is less than 0.1 When the absolute value is greater than or equal to 0.1, the third radial distortion parameter e k 1 adopts 0 to initialize the current moment.
  • e k 2 e k 2 ,
  • ⁇ 0.5; e k 2 0, others; when the absolute value of e k 2 is less than 0.5, use e k 2 to initialize the current moment , when the When the absolute value is greater than or equal to 0.5, the third radial distortion parameter e k 2 adopts 0 to initialize the current moment.
  • ep j ep j ,
  • ⁇ 0.005; ep j 0, others; j ⁇ (1,2); when the absolute values of the third tangential distortion parameters ep 1 and ep 2 are less than When 0.005, the third tangential distortion parameters ep 1 and ep 2 are used to initialize the current moment. When the absolute values of the third tangential distortion parameters ep 1 and ep 2 are greater than or equal to 0.005, the third tangential The distortion parameters ep 1 and ep 2 are initialized at the current moment by adopting 0.
  • the visual inertial system is initialized for the first time by adopting the offline calibration parameters; the stable state and the tracking state of the visual inertial system are determined, and the first hot start parameter is obtained; The first warm-start parameter is updated; the visual inertial system is initialized at the current moment based on the second warm-start parameter obtained from the last update. Since the first hot-start parameter is stored when the visual inertial system is stable and the tracking is stable, and the first hot-start parameter will be continuously updated in the subsequent image tracking according to the stable state and tracking state of the visual-inertial system, And the second hot start parameter obtained by the latest update is also stored under the condition that the visual inertial system is stable and the tracking is stable.
  • the second hot start parameter has higher stability.
  • the visual-inertial system can be quickly stabilized, which is beneficial to improve the speed of system initialization.
  • the zero offsets of the inertial sensor accelerometer and gyroscope the velocities of the visual sensor and the inertial sensor in the prior parameter (second warm start parameter) are all in convergence, and the initialization of the current moment is performed, the inertial sensor accelerometer and The zero offset of the gyroscope is expanded, which is beneficial to eliminate the influence of noise and temperature.
  • the initialization of the current moment based on such a priori parameters is beneficial to improve the accuracy of visual-inertial system positioning and mapping.
  • FIG. 4 is a schematic flowchart of another initialization method of a visual inertial system provided by an embodiment of the present application, as shown in FIG. 4, including steps S41-S45:
  • FIG. 5 is an initialization of a visual inertial system provided by an embodiment of the present application.
  • the first initialization module 51 is configured to use offline calibration parameters to initialize the visual inertial system for the first time
  • the state determination module 52 is configured to determine the stable state and the tracking state of the visual inertial system to obtain the first hot start parameter
  • a priori obtaining module 53 configured to update the first hot start parameter according to the steady state and the tracking state
  • the second initialization module 54 is configured to initialize the visual inertial system at the current moment based on the second hot start parameter obtained from the last update.
  • the state determining module 52 in terms of determining the stable state and tracking state of the visual inertial system to obtain the first hot start parameter, is configured to:
  • the first state data is stored as the first warm-start parameter.
  • the prior obtaining module 53 is configured to:
  • the first warm-start parameter is updated.
  • the visual-inertial system includes an inertial sensor
  • the first state data includes: a covariance of linear acceleration within a sliding window calculated by the visual-inertial system in the case of initializing an image of a second preset number of frames, a The number of rotation accumulations, the first zero bias of the inertial sensor's accelerometers and gyroscopes, the first velocity of the visual-inertial system, and the number of image features tracked by the visual-inertial system.
  • the prior obtaining module 53 is configured to:
  • the first zero bias converges, and the first velocity converges, it is determined that the state of the visual inertial system is stable
  • the prior obtaining module 53 is configured to:
  • the visual-inertial system further includes a visual sensor
  • the first state data further includes: a first time of the visual-inertial system, a first temperature, a first zero-bias covariance, and a first time between the visual sensor and the inertial sensor. a time offset, the first translation and first rotation from the visual sensor to the inertial sensor external parameter, the first field of view angle of the visual sensor, the first width and height of the image collected by the visual sensor, the first internal parameter of the visual sensor .
  • the second initialization module 54 is configured to:
  • part or all of the second warm-start parameter includes the second time and the second temperature of the visual inertial system. , the second field of view of the vision sensor, the second width and the second height of the image captured by the vision sensor, the second bias of the accelerometer and gyroscope of the inertial sensor, the covariance of the second bias, the visual sensor and the inertial the second time offset between the sensors, the second translation and the second rotation of the visual sensor to the inertial sensor extrinsic parameter, and the second intrinsic parameter of the vision sensor;
  • the covariance of the second zero bias is expanded by the second time and the second temperature to obtain the expanded covariance
  • the second field of view angle, the second width and the second height, the second zero bias, the expanded covariance, and the second time are used.
  • the offset, the second translation and the second rotation, and the second internal parameter are initialized at the current moment.
  • the second initialization module 54 is further configured to:
  • the second field of view angle, the second width and the second height, the second zero offset, the expanded covariance, the second time offset, the second translation and the second rotation are adopted.
  • the internal parameters of the online calibration are initialized at the current moment.
  • the second initialization module 54 is further configured to:
  • the second width is equal to the first width
  • the second height is equal to the first height
  • the second field of view angle is equal to the first field of view angle
  • each unit in the apparatus for initializing the visual-inertial system shown in FIG. 5 may be respectively or all merged into one or several other units to form, or some unit(s) may also be formed. It is further divided into multiple units with smaller functions, which can realize the same operation without affecting the realization of the technical effects of the embodiments of the present application.
  • the above units are divided based on logical functions. In practical applications, the function of one unit can also be implemented by multiple units, or the functions of multiple units can be implemented by one unit.
  • the initialization apparatus based on the visual inertial system may also include other units. In practical applications, these functions may also be implemented with the assistance of other units, and may be implemented by multiple units in cooperation.
  • a general-purpose computing device such as a computer
  • a general-purpose computing device may be implemented on a general-purpose computing device including a central processing unit (CPU), a random access storage medium (RAM), a read-only storage medium (ROM), and other processing elements and storage elements.
  • CPU central processing unit
  • RAM random access storage medium
  • ROM read-only storage medium
  • Run a computer program capable of executing the steps involved in the corresponding method as shown in FIG. 1 or FIG. 4, to construct the initialization device device of the visual inertial system as shown in FIG. 5, and to realize the present invention.
  • the initialization method of the visual inertial system according to the embodiment of the application.
  • the computer program can be recorded on, for example, a computer-readable recording medium, and loaded in the above-mentioned computing device through the computer-readable recording medium, and executed therein.
  • FIG. 6 is a schematic structural diagram of an electronic device provided by an embodiment of the present application.
  • the electronic device at least includes Processor 61 , input device 62 , output device 63 , and computer storage medium 64 .
  • the processor 61 , the input device 62 , the output device 63 and the computer storage medium 64 in the electronic device may be connected through a bus or other means.
  • the computer storage medium 64 may be stored in the memory of the electronic device, and the computer storage medium 64 is used for storing a computer program including program instructions, and the processor 61 is used for executing the program stored in the computer storage medium 64 instruction.
  • the processor 61 (or called CPU (Central Processing Unit, central processing unit)) is the computing core and the control core of the electronic device, which is suitable for implementing one or more instructions, and is suitable for loading and executing one or more instructions to achieve the corresponding Method flow or corresponding function.
  • CPU Central Processing Unit, central processing unit
  • the processor 61 of the electronic device provided by the embodiments of the present application may be used to perform a series of initialization processing of the visual inertial system:
  • the visual inertial system is initialized for the first time with the parameters calibrated offline;
  • the visual inertial system is initialized at the current moment based on the second hot start parameter obtained from the last update.
  • the processor 61 performs the above-mentioned determination on the stable state and tracking state of the visual-inertial system to obtain the first warm-start parameter, including:
  • the first state data is stored as the first warm-start parameter.
  • the processor 61 performs the above-mentioned updating of the first warm-start parameter according to the steady state and the tracking state, including:
  • the first warm-start parameter is updated.
  • the visual-inertial system includes an inertial sensor
  • the first state data includes: the covariance of the linear acceleration in the sliding window calculated by the visual-inertial system in the case of initializing the image of the second preset number of frames, the covariance of the inertial sensor The number of rotation accumulations, the first zero bias of the inertial sensor's accelerometers and gyroscopes, the first velocity of the visual-inertial system, and the number of image features tracked by the visual-inertial system.
  • the processor 61 performs the above-mentioned determining according to the first state data of the visual inertial system whether the visual inertial system is stable and the tracking is stable, including:
  • the first zero bias converges, and the first velocity converges, it is determined that the state of the visual inertial system is stable
  • the processor 61 performs the above-mentioned determination according to the covariance of the linear acceleration and the number of times of accumulation of rotations to determine that the inertial sensor is excited, including:
  • the visual-inertial system further includes a visual sensor
  • the first state data further includes: a first time of the visual-inertial system, a first temperature, a first zero-bias covariance, and a first time between the visual sensor and the inertial sensor. a time offset, the first translation and first rotation from the visual sensor to the inertial sensor external parameter, the first field of view angle of the visual sensor, the first width and height of the image collected by the visual sensor, the first internal parameter of the visual sensor .
  • the processor 61 performs the above-mentioned initialization of the visual inertial system at the current moment based on the second warm start parameter obtained from the last update, including:
  • part or all of the second warm-start parameter includes the second time and the second temperature of the visual inertial system. , the second field of view of the vision sensor, the second width and height of the image captured by the vision sensor, the second bias of the accelerometer and gyroscope of the inertial sensor, the covariance of the second bias, the visual sensor and the inertial a second time offset between the sensors, a second translation and a second rotation from the visual sensor to the inertial sensor extrinsic parameter, and the second intrinsic parameter of the visual sensor;
  • the covariance of the second zero bias is expanded by the second time and the second temperature to obtain the expanded covariance
  • the second field of view angle, the second width and the second height, the second zero bias, the expanded covariance, and the second time are used.
  • the offset, the second translation and the second rotation, and the second internal parameter are initialized at the current moment.
  • the processor 61 is also used to:
  • the second field of view angle, the second width and the second height, the second zero offset, the expanded covariance, the second time offset, the second translation and the second rotation are adopted.
  • the internal parameters of the online calibration are initialized at the current moment.
  • the processor 61 is further configured to:
  • the second width is equal to the first width
  • the second height is equal to the first height
  • the second field of view angle is equal to the first field of view angle
  • the electronic device may include but is not limited to a processor 61, an input device 62, an output device 63, and a computer storage medium 64.
  • the input device 62 may be a keyboard, a touch screen, etc.
  • the output device 63 may be a speaker, a display, a radio frequency transmitter Wait.
  • the processor 61 of the electronic device implements the steps in the above-mentioned initialization method of the visual inertial system when executing the computer program, the above-mentioned embodiments of the initialization method of the visual-inertial system are all applicable to the electronic device, and are capable of achieve the same or similar beneficial effects.
  • Embodiments of the present application further provide a computer storage medium (Memory), where the computer storage medium is a memory device in an electronic device and is used to store programs and data.
  • the computer storage medium here may include both a built-in storage medium in the terminal, and certainly also an extended storage medium supported by the terminal.
  • the computer storage medium provides storage space, and the storage space stores the operating system of the terminal.
  • one or more instructions suitable for being loaded and executed by the processor 61 are also stored in the storage space, and these instructions may be one or more computer programs (including program codes).
  • the computer storage medium here can be a high-speed RAM memory, or a non-volatile memory (non-volatile memory), such as at least one disk memory; of course, it can also be at least one located far away from the aforementioned processor 61.
  • computer storage media can be loaded and executed by the processor 61, so as to implement the corresponding steps of the above-mentioned initialization method related to the visual inertial system.
  • the computer program of the computer storage medium includes computer program code, which may be in source code form, object code form, executable file or some intermediate form, and the like.
  • the computer-readable medium may include: any entity or device capable of carrying the computer program code, recording medium, U disk, removable hard disk, magnetic disk, optical disk, computer memory, read-only memory (ROM, Read-Only Memory) , Random Access Memory (RAM, Random Access Memory), electric carrier signal, telecommunication signal and software distribution medium, etc.
  • Embodiments of the present application further provide a computer program product, wherein the computer program product includes a non-transitory computer-readable storage medium storing the computer program, and the computer program product may be a software installation package.
  • the above-mentioned computer program is operable to cause the computer to perform the corresponding steps of the above-mentioned method of initializing a visual-inertial system.
  • the embodiments of the present application provide an initialization method and device, electronic equipment, storage medium and program product, wherein the method includes: initializing the visual inertial system by using offline calibration parameters; and the tracking state is determined to obtain the first hot-start parameter; the first hot-start parameter is updated according to the steady state and the tracking state; based on the second hot-start parameter obtained from the last update, the current moment of initialization. Since the first hot-start parameter is stored when the visual inertial system is stable and the tracking is stable, and the first hot-start parameter will be continuously updated in the subsequent image tracking according to the stable state and tracking state of the visual-inertial system, And the second hot start parameter obtained by the latest update is also stored under the condition that the visual inertial system is stable and the tracking is stable. Compared with the offline calibration parameters, the second hot start parameter has higher stability. During initialization, the visual-inertial system can be quickly stabilized, which is beneficial to improve the speed of system initialization.

Landscapes

  • Engineering & Computer Science (AREA)
  • Radar, Positioning & Navigation (AREA)
  • Remote Sensing (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Automation & Control Theory (AREA)
  • Electromagnetism (AREA)
  • Gyroscopes (AREA)

Abstract

一种视觉惯性系统的初始化方法,其中,初始化方法包括:采用离线标定的参数对视觉惯性系统进行首次初始化(S11);对视觉惯性系统的稳定状态和跟踪状态进行判定,得到第一热启动参数(S12);根据稳定状态和跟踪状态对第一热启动参数进行更新(S13);基于上一次更新得到的第二热启动参数对视觉惯性系统进行当前时刻的初始化(S14)。有益效果:有利于提升视觉惯性系统初始化的速度。

Description

初始化方法及装置、电子设备、存储介质和程序产品
相关申请的交叉引用
本申请基于申请号为202110232556.3、申请日为2021年03月02日的中国专利申请提出,并要求该中国专利申请的优先权,该中国专利申请的全部内容在此以全文引用的方式引入本申请。
技术领域
本申请涉及计算机视觉技术领域,尤其涉及一种初始化方法及装置、电子设备、存储介质和程序产品。
背景技术
随着计算机视觉技术的发展,基于视觉和惯性传感器的同时定位与地图构建(Visual-Inertial Simultaneous Localization and Mapping,VI-SLAM)系统(以下简称视觉惯性系统)被广泛应用于虚拟现实、无人机、移动机器人、无人驾驶等领域。视觉惯性系统能够利用视觉传感器和惯性传感器采集的数据获得高精度的位姿,并完成一维或多维环境地图的构建,然而视觉惯性系统在启动时每次都要进行初始化,且每次初始化都使用离线标定的参数,这就使得系统状态的稳定性会受到影响,从而导致系统初始化的速度较慢。
发明内容
针对上述问题,本申请实施例提供了一种初始化方法及装置、电子设备、存储介质和程序产品。
本申请实施例提供了一种视觉惯性系统的初始化方法,该方法包括:
采用离线标定的参数对视觉惯性系统进行首次初始化;
对视觉惯性系统的稳定状态和跟踪状态进行判定,得到第一热启动参数;
根据该稳定状态和跟踪状态对第一热启动参数进行更新;
基于上一次更新得到的第二热启动参数对视觉惯性系统进行当前时刻的初始化。
在一些实施例中,对视觉惯性系统的稳定状态和跟踪状态进行判定,得到第一热启动参数,包括:
根据视觉惯性系统的第一状态数据确定视觉惯性系统是否状态稳定以及跟踪稳定;
在视觉惯性系统状态稳定以及跟踪稳定的情况下,将第一状态数据存储为第一热启动参数。
在一些实施例中,根据该稳定状态和跟踪状态对第一热启动参数进行更新,包括:
在视觉惯性系统跟踪的图像每满足第一预设帧数的情况下,执行对上述稳定状态和上述跟踪状态进行判定的操作;
在确定视觉惯性系统状态稳定以及跟踪稳定的情况下,对第一热启动参数进行更新。
在一些实施例中,视觉惯性系统包括惯性传感器,第一状态数据包括:视觉惯性系统在初始化第二预设帧数的图像的情况下计算得到的滑动窗口内线性加速度的协方差、惯性传感器的旋转积累次数、惯性传感器的加速度计和陀螺仪的第一零偏、视觉惯性系统的第一速度以及视觉惯性系统跟踪的图像特征的数量。
在一些实施例中,根据视觉惯性系统的第一状态数据确定视觉惯性系统是否状态稳定以及跟踪稳定,包括:
根据线性加速度的协方差及旋转积累次数确定惯性传感器得到激励;
在惯性传感器得到激励、第一零偏收敛以及第一速度收敛的情况下,确定视觉惯性系统状态稳定;
在视觉惯性系统跟踪的图像特征的数量大于或等于第一阈值,且图像特征未出现跟踪丢失的情况下,确定视觉惯性系统跟踪稳定。
在一些实施例中,根据线性加速度的协方差及旋转积累次数确定惯性传感器得到激励,包括:
在线性加速度的协方差大于第二阈值且旋转积累次数大于第三阈值的情况下,确定惯性传感器得到激励。
在一些实施例中,视觉惯性系统还包括视觉传感器,第一状态数据还包括:视觉惯性系统的第一时间、第一温度、第一零偏的协方差、视觉传感器和惯性传感器之间的第一时间偏移、视觉传感器到惯性传感器外参的第一平移和第一旋转、视觉传感器的第一视场角、视觉传感器采集的图像的第一宽度和第一高度、视觉传感器的第一内参。
在一些实施例中,基于上一次更新得到的第二热启动参数对视觉惯性系统进行当前时刻的初始化,包括:
在进行当前时刻的初始化时,确定第二热启动参数存在,并载入第二热启动参数的部分或全部;第二热启动参数的部分或全部包括视觉惯性系统的第二时间、第二温度、视觉传感器的第二视场角、视觉传感器采集的图像的第二宽度和第二高度、惯性传感器的加速度计和陀螺仪的第二零偏、第二零偏的协方差、视觉传感器和惯性传感器之间的第二时间偏移、视觉传感器到惯性传感器外参的第二平移和第二旋转以及视觉传感器的第二内参;
在视觉传感器验证通过的情况下,利用第二时间、第二温度对第二零偏的协方差进行膨胀,得到膨胀后的协方差;
在第二零偏验证通过,且视觉传感器未采用在线标定的内参的情况下,采用第二视场角、第二宽度和第二高度、第二零偏、膨胀后的协方差、第二时间偏移、第二平移和第二旋转以及第二内参进行当前时刻的初始化。
在一些实施例中,该方法还包括:
在第二零偏验证通过,且视觉传感器采用在线标定的内参的情况下,对在 线标定的内参进行验证;
在在线标定的内参验证通过的情况下,采用第二视场角、第二宽度和第二高度、第二零偏、膨胀后的协方差、第二时间偏移、第二平移和第二旋转以及在线标定的内参进行当前时刻的初始化。
在一些实施例中,在载入第二热启动参数的部分或全部之后,该方法还包括:
利用第二宽度、第二高度以及第二视场角对视觉传感器进行验证;
在第二宽度等于第一宽度、第二高度等于第一高度且第二视场角等于第一视场角的情况下,确定视觉传感器验证通过。
本申请实施例提供了一种视觉惯性系统的初始化装置,该装置包括:
第一初始化模块,配置为采用离线标定的参数对视觉惯性系统进行首次初始化;
状态判定模块,配置为对视觉惯性系统的稳定状态和跟踪状态进行判定,得到第一热启动参数;
先验获取模块,配置为根据该稳定状态和跟踪状态对第一热启动参数进行更新;
第二初始化模块,配置为基于上一次更新得到的第二热启动参数对视觉惯性系统进行当前时刻的初始化。
本申请实施例提供了一种电子设备,该电子设备包括输入设备和输出设备,还包括处理器,适于实现一条或多条指令;以及,计算机存储介质,所述计算机存储介质存储有一条或多条指令,所述一条或多条指令适于由所述处理器加载并执行以下步骤:
采用离线标定的参数对视觉惯性系统进行首次初始化;
对视觉惯性系统的稳定状态和跟踪状态进行判定,得到第一热启动参数;
根据该稳定状态和跟踪状态对第一热启动参数进行更新;
基于上一次更新得到的第二热启动参数对视觉惯性系统进行当前时刻的初始化。
本申请实施例提供了一种计算机存储介质,所述计算机存储介质存储有一条或多条指令,所述一条或多条指令适于由处理器加载并执行以下步骤:
采用离线标定的参数对视觉惯性系统进行首次初始化;
对视觉惯性系统的稳定状态和跟踪状态进行判定,得到第一热启动参数;
根据该稳定状态和跟踪状态对第一热启动参数进行更新;
基于上一次更新得到的第二热启动参数对视觉惯性系统进行当前时刻的初始化。
本申请实施例提供了一种计算机程序产品,其中,上述计算机程序产品包括存储了计算机程序的非瞬时性计算机可读存储介质,该计算机程序产品可以为一个软件安装包。上述计算机程序可操作来使计算机执行以下步骤:
采用离线标定的参数对视觉惯性系统进行首次初始化;
对视觉惯性系统的稳定状态和跟踪状态进行判定,得到第一热启动参数;
根据该稳定状态和跟踪状态对第一热启动参数进行更新;
基于上一次更新得到的第二热启动参数对视觉惯性系统进行当前时刻的初始化。
本申请实施例提供一种初始化方法及装置、电子设备、存储介质和程序产品,通过采用离线标定的参数对视觉惯性系统进行首次初始化;对视觉惯性系统的稳定状态和跟踪状态进行判定,得到第一热启动参数;根据该稳定状态和跟踪状态对第一热启动参数进行更新;基于上一次更新得到的第二热启动参数对视觉惯性系统进行当前时刻的初始化。由于第一热启动参数是在视觉惯性系统状态稳定以及跟踪稳定的情况下存储的,且在之后的图像跟踪中会根据视觉惯性系统的稳定状态和跟踪状态不断对第一热启动参数进行更新,且最近一次更新得到的第二热启动参数同样是在视觉惯性系统状态稳定以及跟踪稳定的情况下存储的,相对于离线标定的参数,该第二热启动参数稳定性更高,在当前时刻的初始化中能够使视觉惯性系统快速趋于稳定,从而有利于提升系统初始化的速度。
附图说明
为了更清楚地说明本申请实施例或现有技术中的技术方案,下面将对实施例或现有技术描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本申请的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他的附图。
图1为本申请实施例提供的一种视觉惯性系统的初始化方法的流程示意图;
图2为本申请实施例提供的一种获取热启动的先验参数的示意图;
图3为本申请实施例提供的一种进行多次初始化的示意图;
图4为本申请实施例提供的另一种视觉惯性系统的初始化方法的流程示意图;
图5为本申请实施例提供的一种视觉惯性系统的初始化装置的结构示意图;
图6为本申请实施例提供的一种电子设备的结构示意图。
具体实施方式
为了使本技术领域的人员更好地理解本申请实施例中的技术方案,下面将结合本申请实施例中的附图,对本申请实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例仅仅是本申请一部分的实施例,而不是全部的实施例。基于本申请中的实施例,本领域普通技术人员在没有做出创造性劳动前提下所获得的所有其他实施例,都应当属于本申请保护的范围。
本申请说明书、权利要求书和附图中出现的术语“包括”和“具有”以及它们任何变形,意图在于覆盖不排他的包含。例如包含了一系列步骤或单元的过程、方法、系统、产品或设备没有限定于已列出的步骤或单元,而是可选地还包括没有列出的步骤或单元,或可选地还包括对于这些过程、方法、产品或设备固有的其它步骤或单元。此外,术语“第一”、“第二”和“第三”等是用于区别不同的对象,而并非用于描述特定的顺序。
以下结合相关附图对本申请实施例提供的视觉惯性系统的初始化方法进行详细阐述。
请参见图1,图1为本申请实施例提供的一种视觉惯性系统的初始化方法的流程示意图,应用于电子设备,该电子设备可以是视觉惯性系统的参数标定设备,比如包含该视觉惯性系统的终端设备或服务器,其中,该终端设备可以是用户设备(User Equipment,UE)、移动设备、蜂窝电话、个人数字助理、手持设备、车载设备或可穿戴设备等,服务器可以是独立的物理服务器,也可以是服务器集群或者分布式系统,还可以是提供云服务、云数据库、云计算、云函数、云存储、网络服务、云通信、中间件服务、域名服务、安全服务、以及大数据和人工智能平台等基础云计算服务的云服务器。如图1所示,该视觉惯性系统的初始化方法包括步骤S11-S14:
S11,采用离线标定的参数对视觉惯性系统进行首次初始化。
应当理解的,视觉惯性系统中通常包括视觉传感器和惯性传感器,视觉传感器是利用光学元件和成像装置获取外部环境图像信息的仪器,比如可以采用单目相机、双目相机、多目相机或RGBD(Red,红;Green,绿;Blue,蓝;Deep,深度)相机等,惯性传感器是利用传感质量惯性力进行测量的传感器,主要包含三轴的加速度计和三轴的陀螺仪,也被称作惯性测量单元(Inertial Measurement Unit,IMU)。视觉惯性系统通过视觉传感器、惯性传感器、超声波、激光测距仪、激光雷达、超宽带(Ultra Wide Band,UWB)和全球导航卫星系统(Global Navigation Satellite System,GNSS)中的一种或多种进行定位和地图构建。
本申请实施例中,在视觉惯性系统首次开机初始化时,仍然采用离线标定的参数进行,其中,离线标定的参数包括但不限于视觉传感器的内参、视觉传感器和惯性传感器之间的时间偏移、视觉传感器和惯性传感器的外参、惯性传感器的加速度计和陀螺仪的零偏,通过将上述离线标定的参数中的一种或多种载入视觉惯性系统,对视觉惯性系统进行首次初始化。
S12,对视觉惯性系统的稳定状态和跟踪状态进行判定,得到第一热启动参数。
本申请实施例中,在首次初始化之后实时对视觉惯性系统的稳定状态和跟踪状态进行判定。图2为本申请实施例提供的一种获取热启动的先验参数的示意图,如图2所示,一种可能性的对视觉惯性系统的稳定状态和跟踪状态进行判定,得到第一热启动参数的方法包括步骤S1201-S1202:
S1201,根据视觉惯性系统的第一状态数据确定视觉惯性系统是否状态稳定以及跟踪稳定;
S1202,在视觉惯性系统状态稳定以及跟踪稳定的情况下,将第一状态数据存储为第一热启动参数。
本申请实施例中,上述第一状态数据是指首次初始化之后视觉惯性系统的实时状态数据,包括视觉惯性系统在初始化第二预设帧数的图像的情况下计算得到的滑动窗口内线性加速度的协方差cov acc、惯性传感器的旋转积累次数rotation、惯性传感器的加速度计和陀螺仪的第一零偏 rba和 rbg、视觉惯性系统 的第一速度v、视觉惯性系统跟踪的图像特征的数量fea cnt、视觉惯性系统的第一时间 rt、第一温度 rT、第一零偏 rba的协方差 rcov barbg的协方差 rcov bg、视觉传感器和惯性传感器之间的第一时间偏移 rtd、视觉传感器到惯性传感器外参的第一平移 rT IC和第一旋转 rQ IC、视觉传感器的第一视场角 rfov、视觉传感器采集的图像的第一宽度 rI w和第一高度 rI h以及视觉传感器的第一内参。其中,该第一内参包括视觉传感器的第一焦距 rf xrf y、第一光心 rc xrc y、第一径向畸变参数 rk 1rk 2、第一切向畸变参数 rp 1rp 2
在一些实施例中,第二预设帧数可以预先设定,在视觉惯性系统初始化第二预设帧数的图像后,采用以下公式(1)计算上述线性加速度的协方差cov acc
Figure PCTCN2021107702-appb-000001
其中,v i表示滑动窗口内第i帧图像的速度,
Figure PCTCN2021107702-appb-000002
表示第i-1帧到第i帧图像之间的时间间隔,acc i表示滑动窗口内第i帧图像的线性加速度,mea acc表示视觉惯性系统的线性加速度平均值,w表示滑动窗口的数量,比如可以取20。
采用以下公式(2)计算惯性传感器的旋转积累次数rotation:
Figure PCTCN2021107702-appb-000003
其中,sum angle表示惯性传感器的旋转积累次数rotation,angle min表示最小旋转角度阈值,当第i帧图像的累计旋转角度大于或等于angle min时将会滑入下一帧进行判断,m表示判断的帧数,
Figure PCTCN2021107702-appb-000004
表示第i-1帧到第i帧图像的积累旋转角度,(x,y,z)表示坐标轴。
其中,在上述线性加速度的协方差cov acc大于第二阈值cov min且惯性传感器的旋转积累次数rotation大于第三阈值rotation min的情况下,确定惯性传感器得到充分激励。示例性的,cov min可以取1.0,rotation min可以取15。
在一些实施例中,在确定惯性传感器得到充分激励之后,判断惯性传感器的加速度计和陀螺仪的第一零偏 rba和 rbg是否收敛,实际实施中,采用以下公式(3)和公式(4)计算惯性传感器的加速度计和陀螺仪的第一零偏 rba的协方差cov rbarbg的协方差cov rbg
Figure PCTCN2021107702-appb-000005
其中,mea rba和mea rbg分别表示滑动窗口内惯性传感器加速度计和陀螺仪的第一零偏的平均值,rba i和rbg i分别表示第i帧图像估计得到的惯性传感器的 加速度计和陀螺仪的第一零偏,在cov rba小于第四阈值
Figure PCTCN2021107702-appb-000006
且cov rbg小于第五阈值
Figure PCTCN2021107702-appb-000007
的情况下,确定惯性传感器的加速度计和陀螺仪的第一零偏 rba和 rbg收敛。其中,第四阈值
Figure PCTCN2021107702-appb-000008
表示加速度计的第一零偏 rba满足收敛的最大值,第五阈值
Figure PCTCN2021107702-appb-000009
表示陀螺仪的第一零偏 rbg满足收敛的最大值,示例性的,第四阈值
Figure PCTCN2021107702-appb-000010
可以取0.0002,第五阈值
Figure PCTCN2021107702-appb-000011
可以取0.00005。
在一些实施例中,在确定惯性传感器的加速度计和陀螺仪的第一零偏 rba和 rbg收敛之后,判断上述第一速度v是否收敛,实际实施中,在非静止的情况下采用以下公式(5)计算滑动窗口内每帧图像的第一速度v的协方差cov v
Figure PCTCN2021107702-appb-000012
其中,mea v表示滑动窗口内第一速度v的平均值,v i表示第第i帧图像的第一速度。在cov v小于第六阈值
Figure PCTCN2021107702-appb-000013
的情况下,确定第一速度v收敛,第六阈值
Figure PCTCN2021107702-appb-000014
表示第一速度v满足收敛的最大值,示例性的,第六阈值
Figure PCTCN2021107702-appb-000015
可以取1.0。
本申请实施例中,在惯性传感器得到激励、第一零偏 rba和 rbg收敛、第一速度v收敛的情况下,确定视觉惯性系统状态稳。另外,在视觉惯性系统跟踪的图像特征的数量fea cnt大于或等于第一阈值,且图像特征未出现跟踪丢失的情况下,确定视觉惯性系统跟踪稳定。比如,在fea cnt超过20个且都没有跟丢的情况下,可确定视觉惯性系统跟踪稳定,其中,图像特征可以是跟踪的地标、角点等。在视觉惯性系统的状态稳定以及跟踪稳定的情况下,对第一状态数据进行存储,得到视觉惯性系统初次存储的第一热启动参数。
S13,根据该稳定状态和跟踪状态对第一热启动参数进行更新。
本申请实施例中,随着视觉惯性系统的运行,电子设备会在系统稳定且跟踪稳定的情况下,对之前存储的第一热启动参数进行更新,一种可能性的根据视该稳定状态和跟踪状态对第一热启动参数进行更新的方法包括:
在视觉惯性系统跟踪的图像每满足第一预设帧数的情况下,执行对上述稳定状态和上述跟踪状态进行判定的操作;
在确定视觉惯性系统状态稳定以及跟踪稳定的情况下,对第一热启动参数进行更新。
本申请实施例中,第一预设帧数可以是300帧,比如对视觉惯性系统每隔300帧进行一次稳定状态和跟踪状态的判定,其判定过程如步骤S12所述。在视觉惯性系统的状态稳定且跟踪稳定的情况下,对第一热启动参数进行更新。相反的,在该稳定状态和跟踪状态中的至少一者为不稳定的情况下,不执行更新操作。在一些实施例中,在满足以下任一种的情况下,认为视觉惯性系统不稳定:第一零偏 rba或 rbg不收敛;第一速度v不收敛;跟踪的图像特征的数量fea cnt小于第一阈值;跟踪的图像特征的数量fea cnt大于或等于第一阈值但出现跟踪丢失的情况。需要说明的是,由于惯性传感器得到激励,此处不再对此进行重复判断。对第一热启动参数进行更新的操作可以是在首次初始化之后的 某次初始化中进行的,比如在第二次初始化中,每当视觉惯性系统跟踪的图像达到300帧时,执行对稳定状态和跟踪状态进行判定的操作,若第二次初始化中未对第一热启动参数进行更新,则仍基于第一热启动参数进行第三次初始化,可以理解的,若第二次初始化中对第一热启动参数进行了更新,则基于最近一次更新后的热启动参数进行第三次初始化,每次初始化中更新的情况可以相同。
S14,基于上一次更新得到的第二热启动参数对视觉惯性系统进行当前时刻的初始化。
本申请实施例中,上一次是指距当前时刻最近一次更新热启动参数的时间点,比如在进行第二次初始化时,若未对第一热启动参数进行更新,则上一次更新得到的第二热启动参数即为上述第一热启动参数,若对第一热启动参数进行了更新,则上一次更新得到的第二热启动参数即为最近一次更新后的热启动参数。再比如在进行第三次初始化时,若第二次初始化未对第一热启动参数进行更新,则上一次更新得到的第二热启动参数仍为上述第一热启动参数,若在第二次初始化中对第一热启动参数进行了更新,则上一次更新得到的第二热启动参数即为第二次初始化中最近一次更新后的热启动参数。
图3为本申请实施例提供的一种进行多次初始化的示意图,在对视觉惯性系统进行当前时刻的初始化时,首先检测热启动的文件中是否存储了上述第二热启动参数,在确定存在该第二热启动参数的情况下,将该第二热启动参数作为先验参数,执行如图3中所示的步骤S1401-S1403:
S1401,载入该先验参数的部分或全部。
在一些实施例中,该先验参数的部分或全部包括视觉惯性系统的第二时间 pt、第二温度 pT、视觉传感器的第二视场角 pfov、视觉传感器采集的图像的第二宽度 pI w和第二高度 pI h、惯性传感器的加速度计和陀螺仪的第二零偏 pba和 pbg、第二零偏 pba的协方差 pcov ba和第二零偏 pbg的协方差 pcov bg、视觉传感器和惯性传感器之间的第二时间偏移 ptd、视觉传感器到惯性传感器外参的第二平移 pT IC和第二旋转 pQ IC以及视觉传感器的第二内参。其中,该第二内参包括视觉传感器的第一焦距 pf xpf y、第一光心 pc xpc y、第一径向畸变参数 pk 1pk 2、第一切向畸变参数 pp 1pp 2
S1402,在视觉传感器验证通过的情况下,利用第二时间、第二温度对第二零偏的协方差进行膨胀,得到膨胀后的协方差。
在一些实施例中,在载入先验参数的部分或全部之后,利用第二宽度 pI w、第二高度 pI h以及第二视场角 pfov对视觉传感器进行验证,在第二宽度 pI w等于第一宽度 rI w、第二高度 pI h等于第一高度 rI h且第二视场角 pfov等于第一视场角 rfov的情况下,确定视觉传感器验证通过。即满足以下等式确定视觉传感器验证通过:
pI wrI w
pI hrI h
pfov= rfov;
该实施方式中,在进行当前时刻的初始化时先对视觉传感器进行验证,以防止视觉传感器更换或图像分辨率调整导致初始化出错。
在一些实施例中,采用以下公式(6)和公式(7)对第二零偏 pba的协方差 pcov ba和第二零偏 pbg的协方差 pcov bg进行膨胀:
ecov ba=E t* pcov ba+( rt- pt+| rT- pT|)* pba w* pba w     (6);
ecov bg=E t* pcov bg+( rt- pt+| rT- pT|)* pbg w* pbg w     (7);
其中, ecov ba表示协方差 pcov ba膨胀后的协方差, ecov bg表示协方差 pcov bg膨胀后的协方差,E t表示膨胀系数。
该实施方式中,由于惯性传感器的性能容易受到温度的影响,并且随着时间的增长会增加更多噪声,这就会导致存储的先验参数偏移稳定数值,因此利用第二时间 pt、第二温度 pT对第二零偏 pba的协方差 pcov ba和第二零偏 pbg的协方差 pcov bg进行膨胀,利用膨胀后的参数 ecov baecov bg进行当前时刻的初始化,有利于提高视觉惯性系统初始化时的鲁棒性。
S1403,在第二零偏验证通过,且视觉传感器未采用在线标定的内参的情况下,采用第二视场角、第二宽度和第二高度、第二零偏、膨胀后的协方差、第二时间偏移、第二平移和第二旋转以及第二内参进行当前时刻的初始化。
在一些实施例中,在对第二零偏 pba的协方差 pcov ba和第二零偏 pbg的协方差 pcov bg进行膨胀之后,该方法还包括:
对第二零偏进行验证;其验证过程如下式所示:
eba= pba,0< pba<1; eba=0, pba>1;当第二零偏 pba∈(0,1)时,第二零偏 pba验证通过,采用第二零偏 pba进行当前时刻的初始化,当第二零偏 pba大于1时,验证不通过,采用0进行当前时刻的初始化, eba即最终采用的零偏。
ebg= pbg,0< pbg<0.1; eba=0, pbg>0.1;当第二零偏 pbg属于(0,0.1)时,第二零偏 pbg验证通过,采用第二零偏 pbg进行当前时刻的初始化,当第二零偏 pbg大于0.1时,验证不通过,采用0进行当前时刻的初始化, ebg即最终采用的零偏。
在一些实施例中,该方法还包括:
在第二零偏验证通过,且视觉传感器采用在线标定的内参的情况下,对在线标定的内参进行验证;
在在线标定的内参验证通过的情况下,采用第二视场角、第二宽度和第二高度、第二零偏、膨胀后的协方差、第二时间偏移、第二平移和第二旋转以及在线标定的内参进行当前时刻的初始化。
本申请实施例中,在视觉传感器使用在线标定的内参的情况下,执行对在线标定的内参进行验证的操作,其中。在线标定的内参包括视觉传感器的第三焦距 ef xef y、第三光心 ec xec y、第三径向畸变参数 ek 1ek 2、第三切向畸变参数 ep 1ep 2
第三焦距 ef xef y的验证过程如下式所示:
ef xef x,0.4*( rI w+ rI h)< ef x<0.6*( rI w+ rI h); ef xrI w/2*tan( rfov÷2),其它;当 ef x属于(0.4*( rI w+ rI h),0.6*( rI w+ rI h))时,验证通过,采用 ef x进行当前时刻的初始化,当 ef x不属于(0.4*( rI w+ rI h),0.6*( rI w+ rI h))时,验证不通过,第三焦距 ef x采用 rI w/2*tan( rfov÷2)进行当前时刻的初始化。
ef yef y,0.4*( rI w+ rI h)< ef y<0.6*( rI w+ rI h); ef yrI w/2*tan( rfov÷2),其它;当 ef y属于(0.4*( rI w+ rI h),0.6*( rI w+ rI h))时,验证通过,采用 ef y进行当前时刻的初始 化;当 ef y不属于(0.4*( rI w+ rI h),0.6*( rI w+ rI h))时,验证不通过,第三焦距 ef y采用 rI w/2*tan( rfov÷2)进行当前时刻的初始化。
第三光心 ec xec y的验证过程如下式所示:
ec xec x,0.15* rI h< ec x<0.85* rI hec x=rI h/2,其它;当 ec x属于(0.15* rI h,0.85* rI h)时,验证通过,采用 ef y进行当前时刻的初始化;当 ec x不属于(0.15* rI h,0.85* rI h)时,验证不通过,第三光心 ec x采用 rI h/2进行当前时刻的初始化。
ec yec y,0.15* rI w< ec y<0.85* rI wec y=rI w/2,其它;当 ec y属于(0.15* rI w,0.85* rI w)时,验证通过,采用 ec y进行当前时刻的初始化;当 ec y不属于(0.15* rI w,0.85* rI w)时,验证不通过,第三光心 ec y采用 rI w/2进行当前时刻的初始化。
第三径向畸变参数 ek 1ek 2的验证过程如下式所示:
ek 1ek 1,| ek 1|<0.1; ek 1=0,其它;当 ek 1的绝对值小于0.1时,采用 ek 1进行当前时刻的初始化,当 ek 1的绝对值大于或等于0.1时,第三径向畸变参数 ek 1采用0进行当前时刻的初始化。
ek 2ek 2,| ek 2|<0.5; ek 2=0,其它;当 ek 2的绝对值小于0.5时,采用 ek 2进行当前时刻的初始化,当 ek 2的绝对值大于或等于0.5时,第三径向畸变参数 ek 2采用0进行当前时刻的初始化。
第三切向畸变参数 ep 1ep 2验证过程如下式所示:
ep jep j,| ep j|<0.005; ep j=0,其它;j∈(1,2);当第三切向畸变参数 ep 1ep 2的绝对值小于0.005时,采用第三切向畸变参数 ep 1ep 2进行当前时刻的初始化,当第三切向畸变参数 ep 1ep 2的绝对值大于或等于0.005时,第三切向畸变参数 ep 1ep 2采用0进行当前时刻的初始化。
可以看出,本申请实施例通过采用离线标定的参数对视觉惯性系统进行首次初始化;对视觉惯性系统的稳定状态和跟踪状态进行判定,得到第一热启动参数;根据该稳定状态和跟踪状态对第一热启动参数进行更新;基于上一次更新得到的第二热启动参数对视觉惯性系统进行当前时刻的初始化。由于第一热启动参数是在视觉惯性系统状态稳定以及跟踪稳定的情况下存储的,且在之后的图像跟踪中会根据视觉惯性系统的稳定状态和跟踪状态不断对第一热启动参数进行更新,且最近一次更新得到的第二热启动参数同样是在视觉惯性系统状态稳定以及跟踪稳定的情况下存储的,相对于离线标定的参数,该第二热启动参数稳定性更高,在当前时刻的初始化中能够使视觉惯性系统快速趋于稳定,从而有利于提升系统初始化的速度。另外,由于先验参数(第二热启动参数)中惯性传感器加速度计和陀螺仪的零偏、视觉传感器和惯性传感器的速度都处于收敛,且在进行当前时刻的初始化时对惯性传感器加速度计和陀螺仪的零偏进行了膨胀,有利于消除噪声和温度的影响,基于这样的先验参数进行当前时刻的初始化,有利于提升视觉惯性系统定位和建图的精度。
请参见图4,图4为本申请实施例提供的另一种视觉惯性系统的初始化方法的流程示意图,如图4所示,包括步骤S41-S45:
S41,采用离线标定的参数对视觉惯性系统进行首次初始化;
S42,根据视觉惯性系统的第一状态数据确定视觉惯性系统是否状态稳定以及跟踪稳定;
S43,在视觉惯性系统状态稳定以及跟踪稳定的情况下,将第一状态数据存储为第一热启动参数;
S44,根据视觉惯性系统的稳定状态和跟踪状态对第一热启动参数进行更新;
S45,基于上一次更新得到的第二热启动参数对视觉惯性系统进行当前时刻的初始化。
其中,上述步骤S41-S45的实施方式,在图1-图3所示的实施例中已有相关说明,且能达到相同或相似的有益效果。
基于图1或图4所示方法实施例的描述,本申请实施例还提供一种视觉惯性系统的初始化装置,请参见图5,图5为本申请实施例提供的一种视觉惯性系统的初始化装置的结构示意图,如图5所示,该装置包括:
第一初始化模块51,配置为采用离线标定的参数对视觉惯性系统进行首次初始化;
状态判定模块52,配置为对视觉惯性系统的稳定状态和跟踪状态进行判定,得到第一热启动参数;
先验获取模块53,配置为根据该稳定状态和跟踪状态对第一热启动参数进行更新;
第二初始化模块54,配置为基于上一次更新得到的第二热启动参数对视觉惯性系统进行当前时刻的初始化。
在一些实施例中,在对视觉惯性系统的稳定状态和跟踪状态进行判定,得到第一热启动参数方面,状态判定模块52配置为:
根据视觉惯性系统的第一状态数据确定视觉惯性系统是否状态稳定以及跟踪稳定;
在视觉惯性系统状态稳定以及跟踪稳定的情况下,将第一状态数据存储为第一热启动参数。
在一些实施例中,在根据该稳定状态和跟踪状态对第一热启动参数进行更新方面,先验获取模块53配置为:
在视觉惯性系统跟踪的图像每满足第一预设帧数的情况下,执行对上述稳定状态和上述跟踪状态进行判定的操作;
在确定视觉惯性系统状态稳定以及跟踪稳定的情况下,对第一热启动参数进行更新。
在一些实施例中,视觉惯性系统包括惯性传感器,第一状态数据包括:视觉惯性系统在初始化第二预设帧数的图像的情况下计算得到的滑动窗口内线性加速度的协方差、惯性传感器的旋转积累次数、惯性传感器的加速度计和陀螺仪的第一零偏、视觉惯性系统的第一速度以及视觉惯性系统跟踪的图像特征的数量。
在一些实施例中,在根据视觉惯性系统的第一状态数据确定视觉惯性系统是否状态稳定以及跟踪稳定方面,先验获取模块53配置为:
根据线性加速度的协方差及旋转积累次数确定惯性传感器得到激励;
在惯性传感器得到激励、第一零偏收敛以及第一速度收敛的情况下,确定 视觉惯性系统状态稳定;
在视觉惯性系统跟踪的图像特征的数量大于或等于第一阈值,且图像特征未出现跟踪丢失的情况下,确定视觉惯性系统跟踪稳定。
在一些实施例中,在根据线性加速度的协方差及旋转积累次数确定惯性传感器得到激励方面,先验获取模块53配置为:
在线性加速度的协方差大于第二阈值且旋转积累次数大于第三阈值的情况下,确定惯性传感器得到激励。
在一些实施例中,视觉惯性系统还包括视觉传感器,第一状态数据还包括:视觉惯性系统的第一时间、第一温度、第一零偏的协方差、视觉传感器和惯性传感器之间的第一时间偏移、视觉传感器到惯性传感器外参的第一平移和第一旋转、视觉传感器的第一视场角、视觉传感器采集的图像的第一宽度和第一高度、视觉传感器的第一内参。
在一些实施例中,在基于上一次更新得到的第二热启动参数对视觉惯性系统进行当前时刻的初始化方面,第二初始化模块54配置为:
在进行当前时刻的初始化时,确定第二热启动参数存在,并载入第二热启动参数的部分或全部;第二热启动参数的部分或全部包括视觉惯性系统的第二时间、第二温度、视觉传感器的第二视场角、视觉传感器采集的图像的第二宽度和第二高度、惯性传感器的加速度计和陀螺仪的第二零偏、第二零偏的协方差、视觉传感器和惯性传感器之间的第二时间偏移、视觉传感器到惯性传感器外参的第二平移和第二旋转以及视觉传感器的第二内参;
在视觉传感器验证通过的情况下,利用第二时间、第二温度对第二零偏的协方差进行膨胀,得到膨胀后的协方差;
在第二零偏验证通过,且视觉传感器未采用在线标定的内参的情况下,采用第二视场角、第二宽度和第二高度、第二零偏、膨胀后的协方差、第二时间偏移、第二平移和第二旋转以及第二内参进行当前时刻的初始化。
在一些实施例中,第二初始化模块54还配置为:
在第二零偏验证通过,且视觉传感器采用在线标定的内参的情况下,对在线标定的内参进行验证;
在在线标定的内参验证通过的情况下,采用第二视场角、第二宽度和第二高度、第二零偏、膨胀后的协方差、第二时间偏移、第二平移和第二旋转以及在线标定的内参进行当前时刻的初始化。
在一些实施例中,第二初始化模块54还配置为:
利用第二宽度、第二高度以及第二视场角对视觉传感器进行验证;
在第二宽度等于第一宽度、第二高度等于第一高度且第二视场角等于第一视场角的情况下,确定视觉传感器验证通过。
根据本申请的一个实施例,图5所示的视觉惯性系统的初始化装置中的各个单元可以分别或全部合并为一个或若干个另外的单元来构成,或者其中的某个(些)单元还可以再拆分为功能上更小的多个单元来构成,这可以实现同样的操作,而不影响本申请的实施例的技术效果的实现。上述单元是基于逻辑功能划分的,在实际应用中,一个单元的功能也可以由多个单元来实现,或者多个 单元的功能由一个单元实现。在本申请的其它实施例中,基于视觉惯性系统的初始化装置也可以包括其它单元,在实际应用中,这些功能也可以由其它单元协助实现,并且可以由多个单元协作实现。
根据本申请的另一个实施例,可以通过在包括中央处理单元(CPU)、随机存取存储介质(RAM)、只读存储介质(ROM)等处理元件和存储元件的例如计算机的通用计算设备上运行能够执行如图1或图4中所示的相应方法所涉及的各步骤的计算机程序(包括程序代码),来构造如图5中所示的视觉惯性系统的初始化装置设备,以及来实现本申请实施例的视觉惯性系统的初始化方法。所述计算机程序可以记载于例如计算机可读记录介质上,并通过计算机可读记录介质装载于上述计算设备中,并在其中运行。
基于上述方法实施例和装置实施例的描述,本申请实施例还提供一种电子设备,图6为本申请实施例提供的一种电子设备的结构示意图,请参见图6,该电子设备至少包括处理器61、输入设备62、输出设备63以及计算机存储介质64。其中,电子设备内的处理器61、输入设备62、输出设备63以及计算机存储介质64可通过总线或其他方式连接。
计算机存储介质64可以存储在电子设备的存储器中,所述计算机存储介质64用于存储计算机程序,所述计算机程序包括程序指令,所述处理器61用于执行所述计算机存储介质64存储的程序指令。处理器61(或称CPU(Central Processing Unit,中央处理器))是电子设备的计算核心以及控制核心,其适于实现一条或多条指令,适于加载并执行一条或多条指令从而实现相应方法流程或相应功能。
在一些实施例中,本申请实施例提供的电子设备的处理器61可以用于进行一系列视觉惯性系统的初始化处理:
采用离线标定的参数对视觉惯性系统进行首次初始化;
对视觉惯性系统的稳定状态和跟踪状态进行判定,得到第一热启动参数;
根据该稳定状态和跟踪状态对第一热启动参数进行更新;
基于上一次更新得到的第二热启动参数对视觉惯性系统进行当前时刻的初始化。
在一些实施例中,处理器61执行上述对视觉惯性系统的稳定状态和跟踪状态进行判定,得到第一热启动参数,包括:
根据视觉惯性系统的第一状态数据确定视觉惯性系统是否状态稳定以及跟踪稳定;
在视觉惯性系统状态稳定以及跟踪稳定的情况下,将第一状态数据存储为第一热启动参数。
在一些实施例中,处理器61执行上述根据该稳定状态和跟踪状态对第一热启动参数进行更新,包括:
在视觉惯性系统跟踪的图像每满足第一预设帧数的情况下,执行对上述稳定状态和上述跟踪状态进行判定的操作;
在确定视觉惯性系统状态稳定以及跟踪稳定的情况下,对第一热启动参数进行更新。
在一些实施例中,视觉惯性系统包括惯性传感器,第一状态数据包括:视觉惯性系统在初始化第二预设帧数的图像的情况下计算得到的滑动窗口内线性加速度的协方差、惯性传感器的旋转积累次数、惯性传感器的加速度计和陀螺仪的第一零偏、视觉惯性系统的第一速度以及视觉惯性系统跟踪的图像特征的数量。
在一些实施例中,处理器61执行上述根据视觉惯性系统的第一状态数据确定视觉惯性系统是否状态稳定以及跟踪稳定,包括:
根据线性加速度的协方差及旋转积累次数确定惯性传感器得到激励;
在惯性传感器得到激励、第一零偏收敛以及第一速度收敛的情况下,确定视觉惯性系统状态稳定;
在视觉惯性系统跟踪的图像特征的数量大于或等于第一阈值,且图像特征未出现跟踪丢失的情况下,确定视觉惯性系统跟踪稳定。
在一些实施例中,处理器61执行上述根据线性加速度的协方差及旋转积累次数确定惯性传感器得到激励,包括:
在线性加速度的协方差大于第二阈值且旋转积累次数大于第三阈值的情况下,确定惯性传感器得到激励。
在一些实施例中,视觉惯性系统还包括视觉传感器,第一状态数据还包括:视觉惯性系统的第一时间、第一温度、第一零偏的协方差、视觉传感器和惯性传感器之间的第一时间偏移、视觉传感器到惯性传感器外参的第一平移和第一旋转、视觉传感器的第一视场角、视觉传感器采集的图像的第一宽度和第一高度、视觉传感器的第一内参。
在一些实施例中,处理器61执行上述基于上一次更新得到的第二热启动参数对视觉惯性系统进行当前时刻的初始化,包括:
在进行当前时刻的初始化时,确定第二热启动参数存在,并载入第二热启动参数的部分或全部;第二热启动参数的部分或全部包括视觉惯性系统的第二时间、第二温度、视觉传感器的第二视场角、视觉传感器采集的图像的第二宽度和第二高度、惯性传感器的加速度计和陀螺仪的第二零偏、第二零偏的协方差、视觉传感器和惯性传感器之间的第二时间偏移、视觉传感器到惯性传感器外参的第二平移和第二旋转以及视觉传感器的第二内参;
在视觉传感器验证通过的情况下,利用第二时间、第二温度对第二零偏的协方差进行膨胀,得到膨胀后的协方差;
在第二零偏验证通过,且视觉传感器未采用在线标定的内参的情况下,采用第二视场角、第二宽度和第二高度、第二零偏、膨胀后的协方差、第二时间偏移、第二平移和第二旋转以及第二内参进行当前时刻的初始化。
在一些实施例中,处理器61还用于:
在第二零偏验证通过,且视觉传感器采用在线标定的内参的情况下,对在线标定的内参进行验证;
在在线标定的内参验证通过的情况下,采用第二视场角、第二宽度和第二高度、第二零偏、膨胀后的协方差、第二时间偏移、第二平移和第二旋转以及在线标定的内参进行当前时刻的初始化。
在一些实施例中,在载入第二热启动参数的部分或全部之后,处理器61还用于:
利用第二宽度、第二高度以及第二视场角对视觉传感器进行验证;
在第二宽度等于第一宽度、第二高度等于第一高度且第二视场角等于第一视场角的情况下,确定视觉传感器验证通过。
示例性的,电子设备可包括但不仅限于处理器61、输入设备62、输出设备63以及计算机存储介质64,输入设备62可以是键盘、触摸屏等,输出设备63可以是扬声器、显示器、射频发送器等。本领域技术人员可以理解,所述示意图仅仅是电子设备的示例,并不构成对电子设备的限定,可以包括比图示更多或更少的部件,或者组合某些部件,或者不同的部件。
需要说明的是,由于电子设备的处理器61执行计算机程序时实现上述的视觉惯性系统的初始化方法中的步骤,因此上述视觉惯性系统的初始化方法的实施例均适用于该电子设备,且均能达到相同或相似的有益效果。
本申请实施例还提供了一种计算机存储介质(Memory),所述计算机存储介质是电子设备中的记忆设备,用于存放程序和数据。可以理解的是,此处的计算机存储介质既可以包括终端中的内置存储介质,当然也可以包括终端所支持的扩展存储介质。计算机存储介质提供存储空间,该存储空间存储了终端的操作系统。并且,在该存储空间中还存放了适于被处理器61加载并执行的一条或多条的指令,这些指令可以是一个或一个以上的计算机程序(包括程序代码)。需要说明的是,此处的计算机存储介质可以是高速RAM存储器,也可以是非不稳定的存储器(non-volatile memory),例如至少一个磁盘存储器;当然,还可以是至少一个位于远离前述处理器61的计算机存储介质。在一个实施例中,可由处理器61加载并执行计算机存储介质中存放的一条或多条指令,以实现上述有关视觉惯性系统的初始化方法的相应步骤。
示例性的,计算机存储介质的计算机程序包括计算机程序代码,所述计算机程序代码可以为源代码形式、对象代码形式、可执行文件或某些中间形式等。所述计算机可读介质可以包括:能够携带所述计算机程序代码的任何实体或装置、记录介质、U盘、移动硬盘、磁碟、光盘、计算机存储器、只读存储器(ROM,Read-Only Memory)、随机存取存储器(RAM,Random Access Memory)、电载波信号、电信信号以及软件分发介质等。
需要说明的是,由于计算机存储介质的计算机程序被处理器执行时实现上述的视觉惯性系统的初始化方法中的步骤,因此上述视觉惯性系统的初始化方法的所有实施例均适用于该计算机存储介质,且均能达到相同或相似的有益效果。
本申请实施例还提供了一种计算机程序产品,其中,上述计算机程序产品包括存储了计算机程序的非瞬时性计算机可读存储介质,该计算机程序产品可以为一个软件安装包。上述计算机程序可操作来使计算机执行上述有关视觉惯性系统的初始化方法的相应步骤。
以上对本申请实施例进行了详细介绍,本文中应用了多个个例对本申请实施例的原理及实施方式进行了阐述,以上实施例的说明只是用于帮助理解本申 请的方法及其思想;同时,对于本领域的一般技术人员,依据本申请的思想,在实际实施方式及应用范围上均会有改变之处,综上所述,本说明书内容不应理解为对本申请的限制。
工业实用性
本申请实施例提供了一种初始化方法及装置、电子设备、存储介质和程序产品,其中,该方法包括:采用离线标定的参数对视觉惯性系统进行首次初始化;对所述视觉惯性系统的稳定状态和跟踪状态进行判定,得到第一热启动参数;根据该稳定状态和跟踪状态对所述第一热启动参数进行更新;基于上一次更新得到的第二热启动参数对所述视觉惯性系统进行当前时刻的初始化。由于第一热启动参数是在视觉惯性系统状态稳定以及跟踪稳定的情况下存储的,且在之后的图像跟踪中会根据视觉惯性系统的稳定状态和跟踪状态不断对第一热启动参数进行更新,且最近一次更新得到的第二热启动参数同样是在视觉惯性系统状态稳定以及跟踪稳定的情况下存储的,相对于离线标定的参数,该第二热启动参数稳定性更高,在当前时刻的初始化中能够使视觉惯性系统快速趋于稳定,从而有利于提升系统初始化的速度。

Claims (14)

  1. 一种视觉惯性系统的初始化方法,其中,所述方法包括:
    采用离线标定的参数对所述视觉惯性系统进行首次初始化;
    对所述视觉惯性系统的稳定状态和跟踪状态进行判定,得到第一热启动参数;
    根据所述稳定状态和所述跟踪状态对所述第一热启动参数进行更新;
    基于上一次更新得到的第二热启动参数对所述视觉惯性系统进行当前时刻的初始化。
  2. 根据权利要求1所述的方法,其中,所述对所述视觉惯性系统的稳定状态和跟踪状态进行判定,得到第一热启动参数,包括:
    根据所述视觉惯性系统的第一状态数据确定所述视觉惯性系统是否状态稳定以及跟踪稳定;
    在所述视觉惯性系统状态稳定以及跟踪稳定的情况下,将所述第一状态数据存储为所述第一热启动参数。
  3. 根据权利要求2所述的方法,其中,所述根据所述稳定状态和所述跟踪状态对所述第一热启动参数进行更新,包括:
    在所述视觉惯性系统跟踪的图像每满足第一预设帧数的情况下,执行对所述稳定状态和所述跟踪状态进行判定的操作;
    在确定所述视觉惯性系统状态稳定以及跟踪稳定的情况下,对所述第一热启动参数进行更新。
  4. 根据权利要求2所述的方法,其中,所述视觉惯性系统包括惯性传感器,所述第一状态数据包括:所述视觉惯性系统在初始化第二预设帧数的图像的情况下计算得到的滑动窗口内线性加速度的协方差、所述惯性传感器的旋转积累次数、所述惯性传感器的加速度计和陀螺仪的第一零偏、所述视觉惯性系统的第一速度以及所述视觉惯性系统跟踪的图像特征的数量。
  5. 根据权利要求4所述的方法,其中,所述根据所述视觉惯性系统的第一状态数据确定所述视觉惯性系统是否状态稳定以及跟踪稳定,包括:
    根据所述线性加速度的协方差及所述旋转积累次数确定所述惯性传感器得到激励;
    在所述惯性传感器得到激励、所述第一零偏收敛以及所述第一速度收敛的情况下,确定所述视觉惯性系统状态稳定;
    在所述视觉惯性系统跟踪的图像特征的数量大于或等于第一阈值,且所述图像特征未出现跟踪丢失的情况下,确定所述视觉惯性系统跟踪稳定。
  6. 根据权利要求5所述的方法,其中,所述根据所述线性加速度的协方差及所述旋转积累次数确定所述惯性传感器得到激励,包括:
    在所述线性加速度的协方差大于第二阈值且所述旋转积累次数大于第三阈值的情况下,确定所述惯性传感器得到激励。
  7. 根据权利要求3-6任一项所述的方法,其中,所述视觉惯性系统还包括视觉传感器,所述第一状态数据还包括:所述视觉惯性系统的第一时间、第一温度、所述第一零偏的协方差、所述视觉传感器和所述惯性传感器之间的第一时间偏移、所述视觉传感器到所述惯性传感器外参的第一平移和第一旋转、所述视觉传感器的第一视场角、所述视觉传感器采集的图像的第一宽度和第一高度、所述视觉传感器的第一内参。
  8. 根据权利要求7所述的方法,其中,所述基于上一次更新得到的第二热启动参数对所述视觉惯性系统进行当前时刻的初始化,包括:
    在进行当前时刻的初始化时,确定所述第二热启动参数存在,并载入所述第二热启动参数的部分或全部;所述第二热启动参数的部分或全部包括所述视觉惯性系统的第二时间、第二温度、所述视觉传感器的第二视场角、所述视觉传感器采集的图像的第二宽度和第二高度、所述惯性传感器的加速度计和陀螺仪的第二零偏、所述第二零偏的协方差、所述视觉传感器和所述惯性传感器之间的第二时间偏移、所述视觉传感器到所述惯性传感器外参的第二平移和第二旋转以及所述视觉传感器的第二内参;
    在所述视觉传感器验证通过的情况下,利用所述第二时间、所述第二温度对所述第二零偏的协方差进行膨胀,得到膨胀后的协方差;
    在所述第二零偏验证通过,且所述视觉传感器未采用在线标定的内参的情况下,采用所述第二视场角、所述第二宽度和所述第二高度、所述第二零偏、所述膨胀后的协方差、所述第二时间偏移、所述第二平移和所述第二旋转以及所述第二内参进行当前时刻的初始化。
  9. 根据权利要求8所述的方法,其中,所述方法还包括:
    在所述第二零偏验证通过,且所述视觉传感器采用在线标定的内参的情况下,对所述在线标定的内参进行验证;
    在所述在线标定的内参验证通过的情况下,采用所述第二视场角、所述第二宽度和所述第二高度、所述第二零偏、所述膨胀后的协方差、所述第二时间偏移、所述第二平移和所述第二旋转以及所述在线标定的内参进行当前时刻的初始化。
  10. 根据权利要求8所述的方法,其中,在载入所述第二热启动参数的部分或全部之后,所述方法还包括:
    利用所述第二宽度、所述第二高度以及所述第二视场角对所述视觉传感器进行验证;
    在所述第二宽度等于所述第一宽度、所述第二高度等于所述第一高度且所述第二视场角等于所述第一视场角的情况下,确定所述视觉传感器验证通过。
  11. 一种视觉惯性系统的初始化装置,其中,所述装置包括:
    第一初始化模块,配置为采用离线标定的参数对视觉惯性系统进行首次初始化;
    状态判定模块,配置为对所述视觉惯性系统的稳定状态和跟踪状态进行判定,得到第一热启动参数;
    先验获取模块,配置为根据所述稳定状态和所述跟踪状态对所述第一热启动参数进行更新;
    第二初始化模块,配置为基于上一次更新得到的第二热启动参数对所述视觉惯性系统进行当前时刻的初始化。
  12. 一种电子设备,包括输入设备和输出设备,其中,还包括:
    处理器,适于实现一条或多条指令;以及,
    计算机存储介质,所述计算机存储介质存储有一条或多条指令,所述一条或多条指令适于由所述处理器加载并执行如权利要求1-10任一项所述的方法。
  13. 一种计算机存储介质,其中,所述计算机存储介质存储有一条或多条指令,所述一条或多条指令适于由处理器加载并执行如权利要求1-10任一项所述的方法。
  14. 一种计算机程序产品,所述计算机程序产品包括存储了计算机程序的非瞬时性计算机可读存储介质,所述计算机程序被计算机读取并执行时,实现如权利要求1-10任意一项所述的方法。
PCT/CN2021/107702 2021-03-02 2021-07-21 初始化方法及装置、电子设备、存储介质和程序产品 WO2022183665A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202110232556.3A CN113029134B (zh) 2021-03-02 2021-03-02 视觉惯性系统的初始化方法、装置、电子设备及存储介质
CN202110232556.3 2021-03-02

Publications (1)

Publication Number Publication Date
WO2022183665A1 true WO2022183665A1 (zh) 2022-09-09

Family

ID=76466362

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2021/107702 WO2022183665A1 (zh) 2021-03-02 2021-07-21 初始化方法及装置、电子设备、存储介质和程序产品

Country Status (2)

Country Link
CN (1) CN113029134B (zh)
WO (1) WO2022183665A1 (zh)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115540854A (zh) * 2022-12-01 2022-12-30 成都信息工程大学 一种基于uwb辅助的主动定位方法、设备和介质

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113029134B (zh) * 2021-03-02 2022-04-08 浙江商汤科技开发有限公司 视觉惯性系统的初始化方法、装置、电子设备及存储介质
CN114485649B (zh) * 2022-02-09 2023-09-12 北京自动化控制设备研究所 面向无人机的惯性、视觉和高度信息融合导航方法

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20170089948A1 (en) * 2011-11-04 2017-03-30 Google Inc. Calibrating Intertial Sensors Using an Image Sensor
CN107850436A (zh) * 2015-05-23 2018-03-27 深圳市大疆创新科技有限公司 使用惯性传感器和图像传感器的传感器融合
CN108489482A (zh) * 2018-02-13 2018-09-04 视辰信息科技(上海)有限公司 视觉惯性里程计的实现方法及系统
CN111220155A (zh) * 2020-03-04 2020-06-02 广东博智林机器人有限公司 基于双目视觉惯性里程计估计位姿的方法、装置与处理器
CN111486867A (zh) * 2020-03-19 2020-08-04 天津大学 一种视觉和惯性混合跟踪组件安装参数的标定装置及方法
CN113029134A (zh) * 2021-03-02 2021-06-25 浙江商汤科技开发有限公司 视觉惯性系统的初始化方法、装置、电子设备及存储介质

Family Cites Families (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101598556B (zh) * 2009-07-15 2011-05-04 北京航空航天大学 一种未知环境下无人机视觉/惯性组合导航方法
US10739784B2 (en) * 2017-11-29 2020-08-11 Qualcomm Incorporated Radar aided visual inertial odometry initialization
CN110119189B (zh) * 2018-02-05 2022-06-03 浙江商汤科技开发有限公司 Slam系统的初始化、ar控制方法、装置和系统
CN109767470B (zh) * 2019-01-07 2021-03-02 浙江商汤科技开发有限公司 一种跟踪系统初始化方法及终端设备
CN111156997B (zh) * 2020-03-02 2021-11-30 南京航空航天大学 一种基于相机内参在线标定的视觉/惯性组合导航方法
CN111551191B (zh) * 2020-04-28 2022-08-09 浙江商汤科技开发有限公司 传感器外参数标定方法及装置、电子设备和存储介质
CN112284381B (zh) * 2020-10-19 2022-09-13 北京华捷艾米科技有限公司 视觉惯性实时初始化对准方法及系统
CN112229424B (zh) * 2020-11-16 2022-04-22 浙江商汤科技开发有限公司 视觉惯性系统的参数标定方法及装置、电子设备和介质

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20170089948A1 (en) * 2011-11-04 2017-03-30 Google Inc. Calibrating Intertial Sensors Using an Image Sensor
CN107850436A (zh) * 2015-05-23 2018-03-27 深圳市大疆创新科技有限公司 使用惯性传感器和图像传感器的传感器融合
CN108489482A (zh) * 2018-02-13 2018-09-04 视辰信息科技(上海)有限公司 视觉惯性里程计的实现方法及系统
CN111220155A (zh) * 2020-03-04 2020-06-02 广东博智林机器人有限公司 基于双目视觉惯性里程计估计位姿的方法、装置与处理器
CN111486867A (zh) * 2020-03-19 2020-08-04 天津大学 一种视觉和惯性混合跟踪组件安装参数的标定装置及方法
CN113029134A (zh) * 2021-03-02 2021-06-25 浙江商汤科技开发有限公司 视觉惯性系统的初始化方法、装置、电子设备及存储介质

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115540854A (zh) * 2022-12-01 2022-12-30 成都信息工程大学 一种基于uwb辅助的主动定位方法、设备和介质

Also Published As

Publication number Publication date
CN113029134A (zh) 2021-06-25
CN113029134B (zh) 2022-04-08

Similar Documents

Publication Publication Date Title
WO2022183665A1 (zh) 初始化方法及装置、电子设备、存储介质和程序产品
WO2018184467A1 (zh) 一种云台姿态检测方法及装置
JP6411917B2 (ja) 自己位置推定装置および移動体
CN110927708B (zh) 智能路侧单元的标定方法、装置及设备
WO2018142900A1 (ja) 情報処理装置、データ管理装置、データ管理システム、方法、及びプログラム
JP7131994B2 (ja) 自己位置推定装置、自己位置推定方法、自己位置推定プログラム、学習装置、学習方法及び学習プログラム
US20150199556A1 (en) Method of using image warping for geo-registration feature matching in vision-aided positioning
EP2915139B1 (en) Adaptive scale and gravity estimation
KR101985344B1 (ko) 관성 및 단일 광학 센서를 이용한 슬라이딩 윈도우 기반 비-구조 위치 인식 방법, 이를 수행하기 위한 기록 매체 및 장치
Michot et al. Bi-objective bundle adjustment with application to multi-sensor slam
KR101890612B1 (ko) 적응적 관심영역 및 탐색창을 이용한 객체 검출 방법 및 장치
CN113066127B (zh) 一种在线标定设备参数的视觉惯性里程计方法和系统
CN114485641A (zh) 一种基于惯导卫导方位融合的姿态解算方法及装置
KR20200037502A (ko) 포즈 정보를 출력하는 방법 및 장치
Liu et al. Eyeloc: Smartphone vision-enabled plug-n-play indoor localization in large shopping malls
CN114022556A (zh) 定位初始化方法、装置和计算机可读存储介质
CN112087728B (zh) 获取Wi-Fi指纹空间分布的方法、装置和电子设备
US20130279755A1 (en) Information processing system, information processing method, and information processing program
CN113610702A (zh) 一种建图方法、装置、电子设备及存储介质
CN115900697B (zh) 对象运动轨迹信息处理方法、电子设备以及自动驾驶车辆
CN115727871A (zh) 一种轨迹质量检测方法、装置、电子设备和存储介质
Shin et al. Multi-matching-based vision navigation referencing map tile
Casado et al. Robust heading estimation in mobile phones
CN110207687B (zh) 物体姿态测量方法、测量装置、电子设备及存储介质
CN117058430B (zh) 用于视场匹配的方法、装置、电子设备和存储介质

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 21928743

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 21928743

Country of ref document: EP

Kind code of ref document: A1