WO2020150996A1 - 视觉定位方法、装置及系统 - Google Patents

视觉定位方法、装置及系统 Download PDF

Info

Publication number
WO2020150996A1
WO2020150996A1 PCT/CN2019/073147 CN2019073147W WO2020150996A1 WO 2020150996 A1 WO2020150996 A1 WO 2020150996A1 CN 2019073147 W CN2019073147 W CN 2019073147W WO 2020150996 A1 WO2020150996 A1 WO 2020150996A1
Authority
WO
WIPO (PCT)
Prior art keywords
load
algorithm
processor
target direction
directions
Prior art date
Legal status (The legal status 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 status listed.)
Ceased
Application number
PCT/CN2019/073147
Other languages
English (en)
French (fr)
Inventor
周游
叶长春
严嘉祺
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
SZ DJI Technology Co Ltd
Original Assignee
SZ DJI Technology Co Ltd
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 SZ DJI Technology Co Ltd filed Critical SZ DJI Technology Co Ltd
Priority to CN201980005639.XA priority Critical patent/CN111356903A/zh
Priority to PCT/CN2019/073147 priority patent/WO2020150996A1/zh
Publication of WO2020150996A1 publication Critical patent/WO2020150996A1/zh
Anticipated expiration legal-status Critical
Ceased legal-status Critical Current

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
    • 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/20Instruments for performing navigational calculations

Definitions

  • the present invention relates to the technical field of positioning, in particular to a visual positioning method, device and system.
  • VIO Visual-Inertial Odometry
  • a fixed algorithm is used to determine the position and posture of the movable platform (abbreviated as: pose) based on the images collected by the vision sensors arranged in all directions of the movable platform. )information.
  • images respectively collected by vision sensors in all directions can be used as the input of the algorithm, and the output of the algorithm is the position and posture of the movable platform, thereby realizing visual positioning.
  • the embodiments of the present invention provide a visual positioning method, device and system, which are used to solve the problem of shortage of processor resources in the prior art.
  • an embodiment of the present invention provides a visual positioning method, including:
  • the first algorithm is used to determine the pose information of the movable platform.
  • an embodiment of the present invention provides a visual positioning device, including: a processor and a memory;
  • the memory is used to store program code
  • the processor calls the program code, and when the program code is executed, is used to perform the following operations:
  • the first algorithm is used to determine the pose information of the movable platform.
  • an embodiment of the present invention provides a visual positioning system, including: a visual sensor and the visual positioning device according to any one of the second aspects.
  • an embodiment of the present invention provides a computer-readable storage medium, the computer-readable storage medium stores a computer program, the computer program includes at least one piece of code, the at least one piece of code can be executed by a computer to control all The computer executes the visual positioning method according to any one of the above-mentioned first aspects.
  • an embodiment of the present invention provides a computer program, which is characterized in that, when the computer program is executed by a computer, it is used to implement the visual positioning method according to any one of the above-mentioned first aspects.
  • the visual sensor of at least one target direction among the visual sensors in all directions of the movable platform is determined, according to the at least one target
  • the image obtained by the vision sensor of each target direction in the direction uses the first algorithm to determine the pose information of the movable platform, so that at least one target that can be processed under the load condition of the processor is determined according to the load information of the processor
  • the visual sensor of the direction allows the processor to use the first algorithm to determine the pose information of the movable platform according to the images acquired by the visual sensor of each target direction in at least one target direction, which can avoid the problem of processor resource shortage.
  • FIG. 1 is a schematic flowchart of a visual positioning method provided by an embodiment of the present invention
  • FIG. 2 is a schematic flowchart of a visual positioning method provided by another embodiment of the present invention.
  • FIG. 3 is a schematic flowchart of a visual positioning method provided by another embodiment of the present invention.
  • FIG. 4 is a schematic flowchart of a visual positioning method provided by another embodiment of the present invention.
  • FIG. 5 is a schematic flowchart of a visual positioning method provided by another embodiment of the present invention.
  • Fig. 6 is a schematic structural diagram of a visual positioning device provided by an embodiment of the present invention.
  • Fig. 7 is a schematic structural diagram of a visual positioning system provided by an embodiment of the present invention.
  • the load condition of the processor is considered, so as to avoid the high complexity of the algorithm used in the visual positioning process, which leads to the shortage of processor resources. problem.
  • the movable platform may specifically be any type of equipment that can move in a two-dimensional space or a three-dimensional space and can be equipped with a visual sensor.
  • the movable platform may be a drone, a robot, etc., for example.
  • the number of vision sensors provided on the movable platform may be multiple, and the position of the multiple vision sensors on the movable platform is not limited by the present invention.
  • the front, bottom, rear, left, and right sides of the drone may all be equipped with vision sensors.
  • the vision sensors provided on the movable platform may be monocular vision sensors; or, the vision sensors provided on the movable platform may be binocular vision sensors; or, the vision sensors provided on the movable platform may be either Including monocular vision sensor and binocular vision sensor.
  • the vision sensors provided on the front, bottom, and rear of the drone may be binocular vision sensors, and the vision sensors provided on the left and right of the drone may be monocular vision sensors.
  • FIG. 1 is a schematic flowchart of a visual positioning method provided by an embodiment of the present invention.
  • the execution subject of this embodiment may be a movable platform, and specifically may be a processor of the movable platform.
  • the method of this embodiment may include:
  • Step 101 Obtain current load information of the processor, and determine, according to the load information, at least one visual sensor in the target direction among the visual sensors in all directions of the movable platform.
  • the processor may specifically refer to a processor in the movable platform that is used to determine the pose information of the movable platform according to the image obtained by the vision sensor. It should be noted that the number of the processors may be one or more, and may be single-core or multi-core processors, which may not be limited in the present invention.
  • the load information may specifically be any type of information that can be used to indicate the load status.
  • the load information may be a central processing unit (CPU, Central Processing Unit) usage rate, and a higher CPU usage rate can indicate a heavier load.
  • CPU Central Processing Unit
  • the greater the load of the processor the less the remaining resources of the processor, and the greater the strain on processor resources.
  • the smaller the load of the processor the more remaining resources of the processor, and the less stress on the processor resources.
  • the visual sensor that executes the target direction of step 102 can be determined according to the load information of the processor.
  • the degree of processor resource tension can be represented by the remaining resources of the processor, for example, when the remaining resources of the processor are less than or equal to the resource threshold, it can indicate that the processor resources are tight, and when the remaining resources of the processor are greater than the resource threshold, you can Indicates that the processor resources are not tight.
  • the determined visual sensor in at least one target direction may be a visual sensor in all directions of the movable platform, or may be a visual sensor in all directions of the movable platform.
  • the visual sensor in at least one target direction that can be processed under the load condition of the processor is determined, so that the processor uses the image obtained by the visual sensor in each target direction according to the at least one target direction.
  • the processor calculation amount is less than or equal to a certain threshold, so that the problem of processor resource shortage can be avoided.
  • the visual sensor provided in the front of the drone may be, for example, a binocular vision sensor, and the binoculars of the binocular vision sensor may be sequentially arranged in front of the drone along the left-right direction of the drone, for example.
  • the visual sensor provided under the drone may be, for example, a binocular vision sensor, and the binoculars of the binocular vision sensor may be sequentially arranged below the drone, for example, along the front and rear direction of the drone.
  • the vision sensor provided at the rear of the drone may be, for example, a binocular vision sensor, and the binoculars of the binocular vision sensor may, for example, be sequentially arranged behind the drone along the vertical direction of the drone.
  • the vision sensor provided on the left side of the drone may be, for example, a monocular vision sensor, and the monocular vision sensor may be provided, for example, on the left side of the drone and close to the rear of the drone.
  • the vision sensor provided on the right side of the drone may be, for example, a monocular vision sensor, and the monocular vision sensor may be provided, for example, on the right side of the drone and close to the rear of the drone.
  • the number, type, and location of the vision sensors provided on the above-mentioned UAV are only examples, and can be flexibly set according to requirements in practical applications.
  • Step 102 Determine the pose information of the movable platform by using the first algorithm according to the images acquired by the vision sensors in each target direction in the at least one target direction.
  • the image obtained by the visual sensor in the target direction is not used according to the image obtained by the visual sensor in other directions except the target direction.
  • the front, bottom, rear, left, and right of the drone can be equipped with vision sensors, after determining the target direction includes front, rear, and bottom, the image obtained by the front vision sensor, the rear
  • the first algorithm is used to determine the position information of the movable platform using the image obtained by the visual sensor of the image sensor and the image obtained by the visual sensor below.
  • the vision sensors of all directions of the movable platform may specifically be vision sensors of all directions of the movable platform that can acquire images.
  • the vision sensors in all directions of the movable platform can acquire images in real time, and further, according to the current load information of the processor, the images acquired by the vision sensors in at least one target direction in all directions are determined.
  • the visual sensor of at least one target direction among the visual sensors of all directions of the movable platform is determined, and the visual sensor of each target direction in the at least one target direction is determined.
  • the acquired image uses the first algorithm to determine the pose information of the movable platform, and realizes that according to the load information of the processor, it is possible to determine at least one target direction visual sensor that can be processed under the load condition of the processor, so that the processor
  • the first algorithm is used to determine the pose information of the movable platform according to the images acquired by the vision sensor in each target direction in at least one target direction
  • the calculation amount of the processor under the current load condition indicated by the current load information can be Accept it to avoid the problem of processor resource shortage.
  • FIG. 2 is a schematic flowchart of a visual positioning method provided by another embodiment of the present invention. Based on the embodiment shown in FIG. 2, this embodiment mainly describes an optional implementation of step 101. As shown in Figure 2, the method of this embodiment may include:
  • Step 201 Determine whether the load of the processor is less than or equal to a first load threshold according to the current load information of the processor.
  • the first load threshold may be a pre-configured threshold, or may also be a predefined threshold, or may also be a dynamically indicated threshold, etc., which is not limited in the present invention.
  • the first load threshold may be related to the complexity of the first algorithm, the number of vision sensors in all directions, and the type of vision sensor. For example, the greater the complexity of the first algorithm, the smaller the first load threshold may be. For another example, the larger the number of visual sensors in all directions, the smaller the first load threshold may be. For another example, the type of the visual sensor is a binocular visual sensor, the larger the number of visual sensors, the smaller the first load threshold may be.
  • the complexity of an algorithm may refer to the resources required by the algorithm to run after being compiled into an executable program, and the resources include time resources and memory resources. It should be noted that when the algorithm runs on different processors, the complexity may be different, and the different processors may be, for example, a flight control processor and an image processor.
  • Step 202 Using the first algorithm to determine the pose information of the movable platform according to the images acquired by the vision sensor in each target direction in the at least one target direction; the at least one target direction is all directions of the all directions .
  • the first algorithm can be used to determine the pose information of the movable platform according to the images acquired by the vision sensors in all directions set on the movable platform.
  • the first algorithm is used to determine the movable platform according to the images obtained by the vision sensor in all directions.
  • the pose information the calculation amount of the processor under the current load condition indicated by the current load information is acceptable, which can avoid the problem of processor resource shortage.
  • the first algorithm may be a visual inertial odometry (VIO, Visual-Inertial Odometry) algorithm.
  • VIO visual inertial odometry
  • the images respectively acquired by the vision sensors in all directions can be used as the input of the VIO algorithm, and the output of the VIO algorithm is the pose information of the movable platform.
  • the VIO algorithm needs to process the images respectively collected by the vision sensors in all directions at the same time, although the accuracy is high, the amount of calculation is relatively large.
  • the load of the processor is greater than the first load threshold, it may indicate that the load of the processor is relatively large. At this time, the pose information of the movable platform may not be determined by performing step 202.
  • the first algorithm when the load of the processor is small, the first algorithm is used to determine the pose information of the movable platform based on the images acquired by the vision sensors in all directions set on the movable platform, so that even the first The algorithm complexity of the algorithm is high, but when the load of the processor is less than or equal to the first load threshold, the first algorithm is used to determine the pose information of the movable platform according to the images obtained by the vision sensors in all directions. , The calculation amount of the processor under the current load condition indicated by the load information is acceptable, which can avoid the problem of processor resource shortage.
  • FIG. 3 is a schematic flow chart of a visual positioning method provided by another embodiment of the present invention. Based on the embodiment shown in FIG. 3, this embodiment mainly describes an optional implementation of step 101. As shown in FIG. 3, the method of this embodiment may include:
  • Step 301 Determine whether the load of the processor is less than or equal to a first load threshold according to the current load information of the processor.
  • the first load threshold may be a pre-configured threshold, or may also be a predefined threshold, or may also be a dynamically indicated threshold, etc., which is not limited in the present invention.
  • step 302 is executed.
  • the load of the processor is greater than the first load threshold, which may indicate that the load of the processor is relatively large.
  • step 302 the first algorithm is adopted for the images acquired by the vision sensor in part of the at least one target direction, and the second algorithm is adopted for the images acquired by the vision sensor in the other direction in the at least one target direction, and the The pose information of the movable platform; the at least one target direction is all of the directions.
  • the first algorithm is used for the images acquired by the vision sensor in some of the above-mentioned directions, and the first algorithm is used for the other directions in all directions (ie, all directions except those that use the first algorithm)
  • the image acquired by the vision sensor in the direction other than part of the direction uses the second algorithm to determine the pose information of the movable platform.
  • the first algorithm may be an algorithm with higher algorithm complexity
  • the second algorithm is an algorithm with lower algorithm complexity, that is, the algorithm complexity of the second algorithm is less than the algorithm complexity of the first algorithm.
  • the first algorithm is used for the images acquired by the vision sensor in part of all directions.
  • the images acquired by vision sensors in other directions adopt the second algorithm.
  • the first algorithm may be an algorithm in the vision algorithm that closely couples the image collected by the vision sensor with the inertial measurement unit (IMU, Inertial Measurement Unit) information
  • the second algorithm may be the vision algorithm for the image collected by the vision sensor.
  • the first algorithm may be a visual inertial odometry (VIO, Visual-Inertial Odometry) algorithm
  • the second algorithm may be a visual odometry (VO, Visual Odometry) algorithm.
  • the first algorithm and the second algorithm may not be limited in the embodiment of the present invention.
  • the algorithm is complicated.
  • the algorithm with higher degree can be regarded as the first algorithm, and the algorithm with lower algorithm complexity can be regarded as the second algorithm.
  • the accuracy of the first algorithm can be greater than that of the second algorithm.
  • the load of the processor is less than or equal to the first load threshold, it may indicate that the load of the processor is small.
  • the pose information of the movable platform may not be determined by performing step 302. Specifically, if the load of the processor is less than or equal to the first load threshold, the manner of determining the pose information of the movable platform may be performed by a manner that the amount of calculation is greater than step 302.
  • step 302 the complexity of algorithms used in some of all directions is reduced to reduce the amount of calculation and save processor resources, thereby avoiding the problem of processor resource shortage.
  • Fig. 3 mainly describes the implementation of determining the size relationship between the load of the processor and a load threshold (that is, the first load threshold), and determining the pose information of the movable platform according to the judgment result. It is understandable that the relationship between the load of the processor and a plurality of different load thresholds can also be judged according to actual needs, and the implementation manner of determining the pose information of the movable platform can be obtained according to the judgment result.
  • step A is executed.
  • Step A Determine whether the load of the processor is less than or equal to a second load threshold.
  • the second load threshold is greater than the first load threshold.
  • step 302 is executed.
  • the load of the processor is less than or equal to the second load threshold, which may indicate that the load of the processor is relatively large.
  • the second load threshold may be a pre-configured threshold, or may also be a predefined threshold, or may also be a dynamically indicated threshold, etc., which is not limited in the present invention.
  • the second load threshold may be related to the complexity of the first algorithm, the number of vision sensors in all directions, and the type of vision sensor. For example, the greater the complexity of the first algorithm, the smaller the second load threshold may be. For another example, the larger the number of visual sensors in all directions, the smaller the second load threshold may be. For another example, the type of the visual sensor is a binocular visual sensor, the larger the number of visual sensors, the smaller the second load threshold may be.
  • step B1 is executed.
  • the load of the processor is greater than the second load threshold, which may indicate that the load of the processor is large (the degree is greater than the load).
  • the pose information of the movable platform can be determined by a method that is less calculated than in step 302 .
  • Step B1 Using the first algorithm to determine the pose information of the movable platform according to the images acquired by the vision sensor in part of the target directions in the at least one target direction; the at least one target direction is a part of all directions .
  • the first algorithm can be used to determine the pose information of the movable platform according to the image obtained by the vision sensor in the partial direction provided on the movable platform.
  • the first algorithm is used to determine the position of the movable platform according to the images obtained by the vision sensor in some directions.
  • posture information the calculation amount of the processor under the current load condition indicated by the current load information is acceptable, which can avoid the problem of processor resource shortage.
  • step B2 is executed.
  • steps B1 and B2 are compared with step 302, by reducing the target direction, reducing the number of images used to determine the pose information of the movable platform, so as to reduce the amount of calculation and save processor resources, thereby avoiding processing The problem of shortage of resources.
  • Step B2 Determine whether the load of the processor is greater than a third load threshold.
  • the third load threshold is greater than the second load threshold.
  • step B1 is executed.
  • the load of the processor is less than or equal to the third load threshold, which may indicate that the load of the processor is relatively large.
  • the third load threshold may be a pre-configured threshold, or may also be a predefined threshold, or may also be a dynamically indicated threshold, etc., which is not limited in the present invention.
  • the third load threshold may be related to the complexity of the first algorithm, the number of vision sensors in all directions, and the type of vision sensor. For example, the greater the complexity of the first algorithm, the smaller the third load threshold may be. For another example, the larger the number of visual sensors in all directions, the smaller the third load threshold may be. For another example, the type of the visual sensor is a binocular visual sensor, the larger the number of visual sensors, the smaller the third load threshold may be.
  • step B21 or B22 is executed.
  • the load of the processor is greater than the third load threshold, which can indicate that the load of the processor is very large (the degree is greater than the load).
  • the calculation amount of the processor can be smaller than that of step B1 (ie, step B21 or step B22). ) Determine the pose information of the movable platform.
  • Step B21 According to the image obtained by the binocular vision sensor in the first direction in the at least one target direction, and the image obtained by the vision sensor in other directions in the at least one target direction, the first algorithm is used to determine the The pose information of the movable platform; the target direction is a partial direction of all the directions.
  • the load of the processor when the load of the processor is large, it can be based on the image obtained by the monocular in the first direction binocular vision sensor in all target directions, as well as other directions in all target directions (that is, all target directions except for the first direction).
  • the first algorithm is used to determine the pose information of the movable platform.
  • the first direction may specifically be all target directions, and the vision sensor is one or more directions of the binocular vision sensor.
  • the second direction and the first direction may be different directions. That is, in a scenario where the visual sensor in the second direction is a binocular vision sensor, the pose information of the movable platform can be determined according to the images obtained by the binocular in the binocular vision sensor in the second direction.
  • the present invention may not limit the specific function and the second direction. Further optionally, the specific function is a lateral obstacle avoidance function, and the second direction is a lateral direction of the movable platform.
  • the binocular vision sensor is reduced to a monocular vision sensor through the binocular vision sensor, which reduces the number of images used to determine the pose information of the movable platform to reduce the amount of calculation and save processor resources , So as to avoid the problem of processor resource shortage.
  • Step B22 The first algorithm is used for the images acquired by the vision sensor in some of the at least one target direction, and the second algorithm is used for the images acquired by the vision sensor in other directions in the at least one target direction to determine the The pose information of the movable platform; the at least one target direction is a partial direction of all the directions.
  • the first algorithm is used for the images acquired by the vision sensor in some of the target directions
  • the second algorithm is used for the images acquired by the vision sensor in other directions in all target directions.
  • the first algorithm may be an algorithm with higher algorithm complexity
  • the second algorithm is an algorithm with lower algorithm complexity, that is, the algorithm complexity of the second algorithm is less than the algorithm complexity of the first algorithm.
  • all target directions are the at least one target direction, which is part of all the directions described above.
  • the first algorithm is used for the images acquired by the vision sensor in part of all target directions.
  • the images acquired by vision sensors in other directions in the direction adopt the second algorithm.
  • the visual sensor in the at least one target direction includes: a visual sensor in a second direction for realizing a specific function, and the specific function is turned on.
  • the image obtained by the visual sensor in the second direction may adopt the first algorithm.
  • the embodiment shown in FIG. 3 may be combined with the embodiment shown in FIG. 2, that is, after determining whether the load of the processor is less than or equal to the first load threshold, if the load of the processor is less than or equal to the first load threshold, For the first load threshold, step 202 is executed, and if the load of the processor is greater than the first load threshold, step 302 is executed.
  • FIG. 4 is a schematic flowchart of a visual positioning method provided by another embodiment of the present invention. Based on the embodiment shown in FIG. 1, this embodiment mainly describes an optional implementation of step 101. As shown in Figure 4, the method of this embodiment may include:
  • Step 401 Determine whether the load of the processor is less than or equal to a first load threshold according to the current load information of the processor.
  • step 402 if the load of the processor is greater than the first load threshold, step 402 is executed.
  • the load of the processor is greater than the first load threshold, which may indicate that the load of the processor is relatively large.
  • the first algorithm is used to determine the pose information of the movable platform using the first algorithm.
  • the processor can accept acceptable calculations under the current load condition indicated by the current load information, which can avoid processor resources The question of tension.
  • the load of the processor is less than or equal to the first load threshold, it may indicate that the load of the processor is small.
  • the pose information of the movable platform may not be determined by performing step 402. Specifically, if the load of the processor is less than or equal to the first load threshold, the manner of determining the pose information of the movable platform may be performed by a manner that the amount of calculation is greater than step 402.
  • the binocular vision sensor is reduced to a monocular vision sensor to reduce the number of images used to determine the pose information of the movable platform, so as to reduce the amount of calculation and save processor resources, thereby avoiding processor resources.
  • the question of tension is not limited to the above mentioned above mentioned below.
  • FIG. 4 mainly describes the implementation of determining the size relationship between the load of the processor and a load threshold (ie, the first load threshold), and obtaining the pose information of the movable platform according to the judgment result. It is understandable that the relationship between the load of the processor and a plurality of different load thresholds can also be judged according to actual needs, and the implementation manner of determining the pose information of the movable platform can be obtained according to the judgment result.
  • a load threshold ie, the first load threshold
  • step C is executed.
  • Step C Determine whether the load of the processor is less than or equal to a second load threshold.
  • step 402 is executed.
  • the load of the processor is less than or equal to the second load threshold, which may indicate that the load of the processor is relatively large.
  • the second load threshold may indicate that the load of the processor is relatively large.
  • step D1 is executed.
  • the load of the processor is greater than the second load threshold, which may indicate that the load of the processor is large (the degree is greater than the load is large).
  • the pose information of the movable platform can be determined by a method that is less calculated than in step 402. .
  • the at least one target direction is a part of all directions.
  • step D1 is similar to step B1 and will not be repeated here.
  • step D2 is executed.
  • steps D1 and D2 are compared with step 402, by reducing the target direction, reducing the number of images used to determine the pose information of the movable platform, so as to reduce the amount of calculation, save processor resources, and avoid processor The problem of resource constraints.
  • Step D2 Determine whether the load of the processor is greater than a third load threshold.
  • the third load threshold is greater than the second load threshold.
  • step C1 is executed.
  • the load of the processor is less than or equal to the third load threshold, which may indicate that the load of the processor is relatively large.
  • step D21 or step D22 is performed.
  • the load of the processor is greater than the third load threshold, which can indicate that the load of the processor is very large (the degree is greater than the load).
  • the calculation amount of the processor can be smaller than that of step C1 (ie, step D21 or step D22). ) Determine the pose information of the movable platform.
  • the first algorithm is used to determine the available The pose information of the mobile platform; the target direction is a partial direction of all the directions.
  • Step D22 Using the first algorithm for the images acquired by the vision sensor in some of the at least one target direction, and adopting the second algorithm for the images acquired by the vision sensor in other directions in the at least one target direction to determine The pose information of the movable platform; the at least one target direction is a partial direction of all the directions.
  • step D2 is similar to step B2
  • step D21 is similar to step B21
  • step D22 is similar to step B22, which will not be repeated here.
  • the embodiment shown in FIG. 4 may be combined with the embodiment shown in FIG. 2, that is, after determining whether the load of the processor is less than or equal to the first load threshold, if the load of the processor is less than or equal to the first load threshold, For the first load threshold, step 202 is executed, and if the load of the processor is greater than the first load threshold, step 402 is executed.
  • the load of the processor is less than or equal to the first load threshold, according to the image obtained by the binocular vision sensor in the first direction in all directions, and the vision in other directions in all directions
  • the image acquired by the sensor adopts the first algorithm to determine the pose information of the movable platform, which reduces the number of images used to determine the pose information of the movable platform by using the binocular vision sensor to be reduced to a monocular vision sensor. In order to reduce the amount of calculation, save processor resources, and avoid the problem of processor resource shortage.
  • FIG. 5 is a schematic flowchart of a visual positioning method provided by another embodiment of the present invention. Based on the embodiment shown in FIG. 1, this embodiment mainly describes an optional implementation of step 101. As shown in FIG. 5, the method of this embodiment may include:
  • Step 501 Determine whether the load of the processor is less than or equal to a first load threshold according to the current load information of the processor.
  • the load of the processor is greater than the first load threshold, the following step 502 is executed.
  • the load of the processor is greater than the first load threshold, which may indicate that the load of the processor is relatively large.
  • Step 502 using the first algorithm to determine the pose information of the movable platform according to the images acquired by the vision sensor in each target direction in at least one target direction; the at least one target direction is a partial direction of the all directions .
  • the first algorithm can be used to determine the pose information of the movable platform according to the images acquired by the vision sensors in all directions set on the movable platform.
  • the algorithm complexity of the first algorithm is relatively high, but under the condition that the load of the processor is greater than the first load threshold, according to the images obtained by the vision sensor in part of all directions, the first algorithm is used to determine the movable
  • the pose information of the platform is used, the calculation amount of the processor under the current load condition indicated by the current load information is acceptable, which can avoid the problem of processor resource shortage.
  • the load of the processor is less than or equal to the first load threshold, it may indicate that the load of the processor is small.
  • the pose information of the movable platform may not be determined by performing step 502. Specifically, if the load of the processor is less than or equal to the first load threshold, the manner of determining the pose information of the movable platform may be performed by a calculation amount greater than that of step 502.
  • step 502 the pose information of the movable platform is determined based on the images acquired by the vision sensor in part of all directions, so as to reduce the number of images used to determine the pose information of the movable platform to reduce the amount of calculation. , To save processor resources, thereby avoiding the problem of processor resource shortage.
  • FIG. 5 mainly describes the implementation of determining the size relationship between the load of the processor and a load threshold (ie, the first load threshold), and determining the pose information of the movable platform according to the judgment result. It is understandable that the relationship between the load of the processor and a plurality of different load thresholds can also be judged according to actual needs, and the implementation manner of determining the pose information of the movable platform can be obtained according to the judgment result.
  • a load threshold ie, the first load threshold
  • step E is executed.
  • Step E Determine whether the load of the processor is less than or equal to a third load threshold.
  • the third load threshold is greater than the first load threshold.
  • step 502 is executed.
  • the load of the processor is less than or equal to the third load threshold, which may indicate that the load of the processor is larger (the degree is greater than the load is smaller).
  • step F1 or F2 is executed.
  • the load of the processor is greater than the third load threshold, which may indicate that the load of the processor is large (the degree is greater than the load).
  • the calculation amount of step 502 can be smaller than that of step 502 (ie, step F1 or step F2). ) Determine the pose information of the movable platform.
  • Step F1 Use the first algorithm for the images acquired by the vision sensor in a part of the at least one target direction, and use the second algorithm for the images acquired by the vision sensor in the other direction in the at least one target direction to determine the The pose information of the movable platform; the at least one target direction is a partial direction of all the directions.
  • Step F2 according to the image obtained by the binocular vision sensor in the first direction in the at least one target direction and the images obtained by the vision sensor in other directions in the at least one target direction, the first algorithm is used to determine the The pose information of the movable platform; the target direction is a partial direction of all the directions.
  • step F1 is similar to step B21, and step F2 is similar to step B22, which will not be repeated here.
  • the embodiment shown in FIG. 5 may be combined with the embodiment shown in FIG. 2, that is, after determining whether the load of the processor is less than or equal to the first load threshold, if the load of the processor is less than or equal to the first load threshold, For the first load threshold, step 202 is executed, and if the load of the processor is greater than the first load threshold, step 502 is executed.
  • the first algorithm is used to determine the image obtained by the vision sensor in all directions set on the movable platform.
  • the pose information of the movable platform realizes the determination of the pose information of the movable platform through the images obtained by the vision sensor based on some of the directions in all directions, and reduces the number of images used to determine the pose information of the movable platform. Reduce the amount of calculation and save processor resources, thereby avoiding the problem of processor resource shortage.
  • the partial direction may include a third direction. Further optionally, considering that downward viewing is generally reliable, the third direction is below the movable platform.
  • the following step may be further included: selecting at least one fourth direction from multiple directions as The target direction.
  • the multiple directions can be understood as candidate directions that can serve as the target direction.
  • the selecting at least one fourth direction from multiple directions as the target direction includes: according to the average depth of the feature points in each direction in the multiple directions and the number of feature points successfully matched, At least one fourth direction is selected from the plurality of directions as the target direction.
  • the average depth of the feature points in each direction in the multiple directions may satisfy any one of the following three situations.
  • Step Match The number of successful binocular matching (Stereo Match, different from the inter-frame matching Frame Match) on the latest key frame in one direction is greater than a certain threshold, such as 100 points, then the binocular matching calculation is used Depth, find the average depth of feature points.
  • a certain threshold such as 100 points
  • the depth of the histogram statistics of the feature points that successfully match the key frame of the previous frame with the latest key frame in this direction is taken as the average depth of the feature points.
  • the trianglulation measurement method can be used to determine the feature points where the latest key frame and the key frame of the previous frame are successfully matched (the feature points that can be recorded as successful triangulation below)
  • the ratio of the number of successfully matched feature points in the fourth direction to the average depth of the feature points in the fourth direction is greater than the number of successfully matched feature points in other directions among the multiple directions and the other The ratio of the average depth of the feature points in the direction.
  • the ratio of the number of feature points successfully matched in direction 1 to the average depth of the feature points in direction 1 is G1
  • the number of feature points successfully matched in direction 2 is G2
  • the ratio of the number of feature points successfully matched in the direction 3 to the average depth of the feature point in the direction 3 is G3
  • the number of feature points successfully matched in the direction 4 is compared to the direction 4.
  • the ratio of the average depth of the feature points is G4, and G1>G2>G3>G4, then the fourth direction may include direction 1, or the fourth direction may include direction 1 and direction 2.
  • the fourth direction may also satisfy the following condition: the number of feature points successfully matched in the fourth direction is equal to the average depth of the feature points in the fourth direction The ratio is greater than or equal to the ratio threshold.
  • the step of selecting at least one fourth direction from multiple directions as the target direction may be triggered.
  • the method further includes:
  • the fourth direction is removed from the target direction, and the execution of the The step of selecting at least one fourth direction from a plurality of directions as the target direction.
  • the next calculation will not use the image obtained by the front vision sensor to update the state quantity, but will try to calculate the G value of the rear and left in turn (here, only the front, The G values of the rear and left do not participate in the update of the state quantity, the calculation amount is relatively small), and the fourth direction is selected again based on the G values of the rear and left.
  • using the first algorithm to determine the pose information of the movable platform according to the images acquired by the vision sensor in each of the at least one target direction may specifically include:
  • the pose information of the movable platform is determined based on the method of minimizing the residual of the first algorithm.
  • an algorithm for example, the first algorithm or the second algorithm
  • the image input to the algorithm is usually a key frame obtained by the vision sensor.
  • the residual error of the VIO algorithm is described as follows:
  • R cw represents the rotation relationship from the world coordinate system to the camera coordinate system, Indicates the three-dimensional position of the feature point in the world coordinate system, Indicates the three-dimensional position of the camera in the world coordinate system.
  • the upper right corner of the logo is based on which coordinate system.
  • f represents the feature point
  • w represents the world coordinate
  • c represents the camera or camera coordinate system
  • i represents the inertial measurement unit (or the body center of gravity coordinate system.
  • R cw represents the rotation transformation from the world coordinate system to the camera coordinate system.
  • R ic is the rotation transformation from the camera to the body's center of gravity, which is determined by the installation position structure
  • R wi is the rotation transformation from the drone body coordinate system to the world coordinate system, which is determined by the current attitude of the drone;
  • p f represents a two-dimensional point on the image.
  • (u,v) T is the point matched by the KLT algorithm (when the vision sensor is monocular, find the position of the point in the previous image according to the position of the point in the previous image; when the visual sensor is binocular, you can Find the position of the image in one eye and find the position in the image of the other eye),
  • (u 0 ,v 0 ) T is the optical center, and together with the focal length f, it is called the camera internal parameter, which is an inherent attribute parameter of each camera and generally does not change , The factory parameters are obtained.
  • the reprojection error error is recorded as:
  • R wi is the rotation transformation from IMU to the world coordinate system.
  • the formula for obtaining the new residual r from the above formula is a monocular formula. If the vision sensor is a binocular vision sensor and only uses an image obtained by a single eye, then only the image obtained by the left eye can be used. If the vision sensor is a binocular vision sensor, and the images obtained by both eyes are used, the residual r can be written as the following formula 2.
  • the number of vision sensors is 5 as an example, r 1 , r 2 , r 3 , r 4 , and r 5 respectively represent the difference between the images obtained by the 5 vision sensors in the VIO algorithm
  • the residual error can be specifically expressed by the above formula (1) or formula (2).
  • the target direction includes direction 1, direction 2, direction 3, direction 4, and direction 5, and the number of vision sensors in each target direction is 1, as an example, the above is for at least one target direction
  • the pose information of the movable platform is determined based on the method of minimizing the residual of the first algorithm, which may specifically include: based on the residual shown in the minimization formula (3) To determine the pose information of the movable platform.
  • the values of the above five variables can be obtained. Further, the values of the five variables can be combined with the observed values to obtain the final pose information .
  • the residual error of the VO algorithm is described as follows:
  • the PnP algorithm estimates the camera posture through a series of three-dimensional points in the world coordinate system (World Coordinates) and the corresponding two-dimensional points in the pixel coordinate system (Pixel Coordinates) in the image.
  • C 1 is the camera pose of a camera at time 1
  • C 2 is the camera pose of the camera at time 2
  • the estimated rotation matrix under C 1 is R 1
  • the translation vector is T 1
  • the image is acquired at C 1 C 2 with the acquired two-dimensional image matching points p 1
  • C 1 acquires the images acquired at the image matching point D C 2 P
  • C 2 is the corresponding rotation matrix R 2
  • T is a translation vector 2.
  • the two-dimensional point in the image obtained under C 2 that matches the image obtained under C 1 is p 2
  • the three-dimensional point in the image obtained under C 2 that matches the image obtained under C 1 is P 2 , taking the world coordinate system as the reference C
  • the rotation matrix from 2 to C 1 is R 12
  • the translation vector from C 2 to C 1 is then:
  • R 1 , R 2 , P 1 and P 2 may represent nominal values (nominal).
  • R 12 (R t1 ) T
  • R t2 [R 1 (I+[ ⁇ 1 ] x )] T [R 2 (I+[ ⁇ 2 ] x )]
  • the first algorithm is used for the images obtained by the vision sensor in some of the at least one target direction
  • the image acquired by the vision sensor in the partial direction it is determined based on the method of minimizing the residual error of the first algorithm, and the image acquired by the vision sensor in the other direction is determined based on the method of minimizing the residual error of the second algorithm.
  • the pose information of the movable platform For the image acquired by the vision sensor in the partial direction, it is determined based on the method of minimizing the residual error of the first algorithm, and the image acquired by the vision sensor in the other direction is determined based on the method of minimizing the residual error of the second algorithm.
  • the first algorithm is used for the images acquired by the vision sensor in direction 1 and direction 2
  • the second algorithm is used for the vision sensor in direction 3 and direction 4.
  • the number of vision sensors in each direction is one as an example
  • the first algorithm is used for the images acquired by the vision sensors in part of the at least one target direction.
  • the second algorithm is used to determine the pose information of the movable platform for the images acquired by the vision sensors in other directions in the at least one target direction, which may specifically include: adopting a method based on the residual r as shown in the following formula (5) , To determine the pose information of the movable platform.
  • r 1 represents the residual of the image obtained by the binocular of the direction 1 vision sensor in the VIO algorithm, and the specific residual calculation method can be referred to formula (2) or formula (3)
  • r 2 represents the dual direction of the VIO algorithm for the direction 2 vision sensor
  • the residual error of the image obtained by the target, the specific residual calculation method can be referred to formula (2) or formula (3)
  • r 3 represents the residual error of the binocular image obtained by the vision sensor in the direction 3 in the VO algorithm, and the specific residual calculation method can be referred to Formula (4)
  • r 4 represents the residual error of the image obtained by the direction 4 vision sensor in the VO algorithm, and the specific residual calculation method can be referred to formula (4).
  • the value of the state quantity can be obtained, and further, the value of the state quantity obtained can be combined with the observation value to obtain the final pose information .
  • the state quantity may specifically include: ⁇ R ic , ⁇ R wi , ⁇ P i w , ⁇ P, ⁇ 1 and ⁇ P 2 .
  • the load of the processor is divided into three levels through two load thresholds, and the specific function is the lateral obstacle avoidance function.
  • the two thresholds are 60% and 80% respectively.
  • the movable platform includes front, rear, bottom, and left side.
  • the visual sensors in the five directions on the right and the right, and the visual sensors on the front, rear, and bottom are binocular visual sensors, and the visual sensors on the left and right are monocular visual sensors as an example.
  • the above is based on the load information of the processor.
  • the vision sensor of at least one target direction among the vision sensors that determine all directions of the movable platform, and the first algorithm is used to determine the specific pose information of the movable platform according to the images obtained by the vision sensors of each target direction in at least one target direction.
  • Case 1 When the load of the processor is low, for example, less than 60%, the VIO algorithm is used to determine the pose information of the movable platform according to the images obtained by the visual sensors in the front, rear, bottom, left and right directions. , And use binocular images for the front, rear, and bottom vision sensors.
  • the pose information of the movable platform can be determined based on the method of minimizing the residual error of the VIO algorithm.
  • the residual r of the VIO algorithm can be represented by the following formula (6).
  • s represents stereo, m represents monocular; r down, s represents the residual of the image obtained by the lower visual sensor in the VIO algorithm, and the specific residual calculation method can be referred to formula (2); r front,s represents the residual of the image obtained by the front vision sensor in the VIO algorithm, and the specific residual calculation method can be found in formula (2); r rear,s represents the residual of the image obtained by the rear vision sensor in the VIO algorithm.
  • r left m represents the residual error of the image obtained by the left visual sensor in the VIO algorithm.
  • r right m represents the residual error of the image obtained by the right vision sensor in the VIO algorithm, and the specific residual calculation method can be referred to formula (1).
  • Case 2 When the processor load is medium, such as 60% to 80%, and the lateral obstacle avoidance function is turned on, the first algorithm is used for the images acquired by the lower, left, and right visual sensors, and for the front and rear The image obtained by the visual sensor of the VS adopts the second algorithm to determine the pose information of the movable platform, and the image obtained by the binocular is used for the visual sensors in the front, the rear and below.
  • the processor load is medium, such as 60% to 80%, and the lateral obstacle avoidance function is turned on
  • the first algorithm is used for the images acquired by the lower, left, and right visual sensors, and for the front and rear
  • the image obtained by the visual sensor of the VS adopts the second algorithm to determine the pose information of the movable platform, and the image obtained by the binocular is used for the visual sensors in the front, the rear and below.
  • the pose information of the movable platform can be determined based on the method of minimizing the residual error of the VIO algorithm and the VO algorithm.
  • the residual r of the VIO algorithm and the VO algorithm can be shown in the following formula (7).
  • s represents binocular, m represents monocular; r down, s represents the residual of the image obtained by the lower visual sensor in the VIO algorithm, the specific residual calculation method can be referred to formula (2); r front, PnP represents VO In the algorithm, for the residual of the image obtained by the front visual sensor binocular, the specific residual calculation method can be referred to formula (4); r rear, PnP represents the residual of the image obtained by the binocular of the rear visual sensor in the VO algorithm, and the specific residual calculation is The method can be found in formula (4); r left, m represents the residual error of the image obtained by the left vision sensor in the VIO algorithm, and the specific residual calculation method can be referred to formula (1); r right, m represents the residual error in the VIO algorithm The right vision sensor monocularly obtains the residual of the image, and the specific residual calculation method can be referred to formula (1).
  • Case 3 When the processor load is medium, such as 60% to 80%, and the lateral obstacle avoidance function is turned off, the VIO algorithm is used to determine the movable platform based on the images obtained by the visual sensors in the front, rear, and lower directions The posture information of the camera, and the images obtained by the binocular are used for the front, rear and lower vision sensors.
  • the pose information of the movable platform can be determined based on the method of minimizing the residual error of the VIO algorithm.
  • the residual r of the VIO algorithm can be represented by the following formula (8).
  • s represents stereo, m represents monocular; r down, s represents the residual of the image obtained by the lower visual sensor in the VIO algorithm, and the specific residual calculation method can be referred to formula (2); r front,s represents the residual of the image obtained by the front vision sensor in the VIO algorithm, and the specific residual calculation method can be found in formula (2); r rear,s represents the residual of the image obtained by the rear vision sensor in the VIO algorithm.
  • r front represents the residual of the image obtained by the front vision sensor in the VIO algorithm, and the specific residual calculation method can be found in formula (2); r rear,s represents the residual of the image obtained by the rear vision sensor in the VIO algorithm.
  • formula (2) For the specific residual calculation method, please refer to formula (2).
  • the pose information of the movable platform can be determined based on the method of minimizing the residual error of the VIO algorithm.
  • the residual r of the VIO algorithm can be represented by the following formula (9).
  • s represents binocular
  • m represents monocular
  • r down s represents the residual of the image obtained by the lower visual sensor in the VIO algorithm
  • the specific residual calculation method can be referred to formula (2)
  • r left m represents VIO
  • the specific residual calculation method can be referred to formula (1)
  • r right m represents the residual error of the monocular image obtained by the right visual sensor in the VIO algorithm
  • the specific residual The difference calculation method can refer to formula (1).
  • Case 5 When the load of the processor is high, for example greater than 80%, and the lateral obstacle avoidance function is turned off, according to the visual sensor in the 2 directions selected from the 4 directions of front, rear, left and right and 3 directions below
  • the obtained image uses the VIO algorithm to determine the pose information of the movable platform, and uses the image obtained by the binocular for the visual sensor below, and the selected vision sensors in the two directions use the image obtained by the monocular.
  • the pose information of the movable platform can be determined based on the method of minimizing the residual error of the VIO algorithm.
  • the residual r of the VIO algorithm can be represented by the following formula (10).
  • s means binocular
  • m means monocular
  • r down s means the residual of the image obtained by the lower visual sensor in the VIO algorithm
  • the specific residual calculation method can be referred to formula (2)
  • r 1,m means VIO
  • the specific residual calculation method can be referred to formula (1)
  • r 2,m represents the selected two directions in the VIO algorithm
  • the visual sensor in the other direction obtains the residual of the image monocularly
  • the specific residual calculation method can be referred to formula (1).
  • the embodiment of the present invention also provides a computer-readable storage medium, the computer-readable storage medium stores program instructions, and the program execution may include part or all of the visual positioning method in the foregoing method embodiments. step.
  • the embodiment of the present invention provides a computer program, when the computer program is executed by a computer, it is used to implement the visual positioning method in any of the foregoing method embodiments.
  • FIG. 6 is a schematic structural diagram of a visual positioning device provided by an embodiment of the present invention.
  • the visual positioning device 600 of this embodiment may include: a memory 601 and a processor 602; the above-mentioned memory 601 and the processor 602 may pass through a bus connection.
  • the memory 601 may include a read-only memory and a random access memory, and provides instructions and data to the processor 602.
  • a part of the memory 601 may also include a non-volatile random access memory.
  • the memory 601 is used to store program codes.
  • the processor 602 calls the program code, and when the program code is executed, is configured to perform the following operations:
  • the first algorithm is used to determine the pose information of the movable platform.
  • the processor 602 is configured to determine, according to the load information, at least one vision sensor in the target direction among the vision sensors in all directions of the movable platform, which specifically includes:
  • the load information of the processor 602 determine whether the load of the processor 602 is less than or equal to a first load threshold
  • the target direction is all of the directions.
  • the processor 602 is configured to determine, according to the load information, at least one vision sensor in the target direction among the vision sensors in all directions of the movable platform, which specifically includes:
  • the load information of the processor 602 determine whether the load of the processor 602 is less than or equal to a first load threshold
  • the target direction is all of the directions
  • the number of the at least one target direction is multiple;
  • the processor 602 is configured to use the first algorithm to determine the pose information of the movable platform according to the images acquired by the vision sensors in each target direction of the at least one target direction vision sensor, which specifically includes:
  • the first algorithm is adopted for the images acquired by the vision sensor in a part of the at least one target direction
  • the second algorithm is adopted for the images acquired by the vision sensor in the other direction in the at least one target direction to determine the movable
  • the algorithm complexity of the second algorithm is less than that of the first algorithm.
  • the processor 602 is configured to determine, according to the load information, at least one vision sensor in the target direction among the vision sensors in all directions of the movable platform, which specifically includes:
  • the load information of the processor 602 determine whether the load of the processor 602 is less than or equal to a first load threshold
  • the target direction is all of the directions
  • the vision sensor in the first direction in the at least one target direction is a binocular vision sensor
  • the processor 602 is configured to use a first algorithm to determine the pose information of the movable platform according to the images acquired by the vision sensor in each target direction in the at least one target direction, which specifically includes:
  • the first algorithm is used to determine the pose of the movable platform information.
  • the processor 602 is configured to, if the load of the processor 602 is greater than the first load threshold, then the target direction is all of the directions, specifically including:
  • the load of the processor 602 is greater than the first load threshold, determine whether the load of the processor 602 is less than or equal to a second load threshold; the second load threshold is greater than the first load threshold;
  • the target direction is all of the directions.
  • the processor 602 is further configured to:
  • the target direction is a partial direction of all directions.
  • the processor 602 is configured to determine, according to the load information of the processor 602, at least one vision sensor in the target direction among the vision sensors in all directions of the movable platform, which specifically includes:
  • the load information of the processor 602 determine whether the load of the processor 602 is less than or equal to a first load threshold
  • the target direction is a partial direction of all directions.
  • the processor 602 is configured to use a first algorithm to determine the pose of the movable platform according to the images acquired by the vision sensors in each target direction of the at least one target direction vision sensor.
  • Information including:
  • the first algorithm is used for the images acquired by the vision sensor in some of the at least one target direction, and for the other directions in the at least one target direction
  • the image acquired by the vision sensor of the second algorithm is used to determine the pose information of the movable platform; the algorithm complexity of the second algorithm is less than that of the first algorithm
  • the number of the at least one target direction is multiple.
  • the visual sensor in the at least one target direction includes: a visual sensor in a second direction for realizing a specific function, and the specific function is turned on.
  • the image acquired by the visual sensor in the second direction adopts the first algorithm.
  • the processor 602 is configured to use a first algorithm to determine the pose of the movable platform according to the images acquired by the vision sensors in each target direction of the at least one target direction vision sensor.
  • Information including:
  • the load of the processor 602 is greater than the third load threshold, according to the image obtained by the binocular vision sensor in the first direction and the image obtained by the vision sensor in other directions in the at least one target direction , Using the first algorithm to determine the pose information of the movable platform;
  • the vision sensor in the first direction in the at least one target direction is a binocular vision sensor.
  • the visual sensor in the at least one target direction includes: a visual sensor in a second direction for realizing a specific function, and the specific function is turned on.
  • the second direction and the first direction are different directions.
  • the specific function is a lateral obstacle avoidance function
  • the second direction is a lateral direction of the movable platform.
  • the partial direction includes a third direction.
  • the third direction is below the movable platform.
  • the processor 602 is further configured to select at least one fourth direction from multiple directions as the target direction.
  • the processor 602 is configured to select at least one fourth direction from multiple directions as the target direction, which specifically includes:
  • At least one fourth direction is selected from the multiple directions as the target direction.
  • the ratio of the number of feature points successfully matched in the fourth direction to the average depth of the feature points in the fourth direction is greater than the number of feature points successfully matched in other directions among the multiple directions.
  • the ratio of the average depth of the feature points in the other directions is greater than the number of feature points successfully matched in other directions among the multiple directions.
  • the processor 602 is further configured to:
  • the fourth direction is removed from the target direction Removing and triggering the execution of the step of selecting at least one fourth direction from a plurality of directions as the target direction.
  • the first algorithm is the visual inertial odometer VIO algorithm.
  • the first algorithm is a visual inertial odometer VIO algorithm
  • the second algorithm is a visual odometer VO algorithm
  • the movable platform is a drone.
  • the visual positioning device provided in this embodiment can be used to implement the technical solutions of the foregoing method embodiments of the present invention, and its implementation principles and technical effects are similar, and will not be repeated here.
  • a person of ordinary skill in the art can understand that all or part of the steps in the foregoing method embodiments can be implemented by a program instructing relevant hardware.
  • the aforementioned program can be stored in a computer readable storage medium. When the program is executed, it executes the steps including the foregoing method embodiments; and the foregoing storage medium includes: ROM, RAM, magnetic disk, or optical disk and other media that can store program codes.

Landscapes

  • Engineering & Computer Science (AREA)
  • Radar, Positioning & Navigation (AREA)
  • Remote Sensing (AREA)
  • Automation & Control Theory (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Length Measuring Devices By Optical Means (AREA)
  • Studio Devices (AREA)

Abstract

一种视觉定位方法、装置及系统。视觉定位方法包括:获取处理器当前的负载信息;根据处理器当前的负载信息,确定可移动平台的所有方向的视觉传感器中至少一个目标方向的视觉传感器(101);根据至少一个目标方向中各目标方向的视觉传感器获取到的图像,采用第一算法,确定可移动平台的位姿信息(102)。视觉定位方法可以避免处理器资源紧张的问题。

Description

视觉定位方法、装置及系统 技术领域
本发明涉及定位技术领域,尤其涉及一种视觉定位方法、装置及系统。
背景技术
目前,算法在视觉定位中的应用越来越广泛,该算法例如可以为视觉惯性里程计(VIO,Visual-Inertial Odometry)算法。
现有技术中,在视觉定位的过程中,根据设置在可移动平台的所有方向上的视觉传感器分别采集到的图像,采用固定的一个算法,确定可移动平台的位置和姿态(简称:位姿)信息。具体的,所有方向上的视觉传感器分别采集到的图像可以作为该算法的输入,该算法的输出即为可移动平台的位置和姿态,从而实现视觉定位。
但是,现有技术中,存在处理器资源紧张的问题。
发明内容
本发明实施例提供一种视觉定位方法、装置及系统,用于解决现有技术中处理器资源紧张的问题。
第一方面,本发明实施例提供一种视觉定位方法,包括:
获取处理器当前的负载信息;
根据所述负载信息,确定可移动平台的所有方向的视觉传感器中至少一个目标方向的视觉传感器;
根据所述至少一个目标方向中各目标方向的视觉传感器获取到的图像,采用第一算法,确定所述可移动平台的位姿信息。
第二方面,本发明实施例提供一种视觉定位装置,包括:处理器和存储器;
所述存储器,用于存储程序代码;
所述处理器,调用所述程序代码,当程序代码被执行时,用于执行以下操作:
获取处理器当前的负载信息;
根据所述负载信息,确定可移动平台的所有方向的视觉传感器中至少一个目标方向的视觉传感器;
根据所述至少一个目标方向中各目标方向的视觉传感器获取到的图像,采用第一算法,确定所述可移动平台的位姿信息。
第三方面,本发明实施例提供一种视觉定位系统,包括:视觉传感器以及上述第二方面任一项所述的视觉定位装置。
第四方面,本发明实施例提供一种计算机可读存储介质,所述计算机可读存储介质存储有计算机程序,所述计算机程序包含至少一段代码,所述至少一段代码可由计算机执行,以控制所述计算机执行如上述第一方面任一项所述的视觉定位方法。
第五方面,本发明实施例提供一种计算机程序,其特征在于,当所述计算机程序被计算机执行时,用于实现如上述第一方面任一项所述的视觉定位方法。
本发明实施例提供的视觉定位方法、装置及系统,通过获取处理器当前的负载信息,根据负载信息,确定可移动平台的所有方向的视觉传感器中至少一个目标方向的视觉传感器,根据至少一个目标方向中各目标方向的视觉传感器获取到的图像,采用第一算法,确定可移动平台的位姿信息,实现了根据处理器的负载信息,确定在处理器的负载状况下能够处理的至少一个目标方向的视觉传感器,使得处理器在根据至少一个目标方向中各目标方向的视觉传感器获取到的图像,采用第一算法确定可移动平台的位姿信息时,可以避免处理器资源紧张的问题。
附图说明
为了更清楚地说明本发明实施例或现有技术中的技术方案,下面将对实施例或现有技术描述中所需要使用的附图作一简单地介绍,显而易见地,下面描述中的附图是本发明的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他的附图。
图1为本发明一实施例提供的视觉定位方法的流程示意图;
图2为本发明另一实施例提供的视觉定位方法的流程示意图;
图3为本发明又一实施例提供的视觉定位方法的流程示意图;
图4为本发明又一实施例提供的视觉定位方法的流程示意图;
图5为本发明又一实施例提供的视觉定位方法的流程示意图;
图6本发明一实施例提供的视觉定位装置的结构示意图;
图7为本发明一实施例提供的视觉定位系统的结构示意图。
具体实施方式
为使本发明实施例的目的、技术方案和优点更加清楚,下面将结合本发明实施例中的附图,对本发明实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例是本发明一部分实施例,而不是全部的实施例。基于本发明中的实施例,本领域普通技术人员在没有作出创造性劳动前提下所获得的所有其他实施例,都属于本发明保护的范围。
本发明实施例提供的视觉定位方法,在进行视觉定位的过程中,考虑处理器的负载状况,以避免由于在视觉定位过程中所使用算法的算法复杂度较大,而导致处理器资源紧张的问题。
其中,可移动平台具体可以为能够在二维空间或三维空间中移动,并能够设置视觉传感器的任意类型的设备。可移动平台例如可以为无人机、机器人等。
其中,设置在可移动平台的视觉传感器的个数可以为多个,该多个视觉传感器在可移动平台上的位置,本发明并不作限定。例如,无人机的前方、下方、后方、左方和右方可以均设置有视觉传感器。
需要说明的是,对于视觉传感器的具体类型本发明不作限定。可选的,可移动平台上设置的视觉传感器可以均为单目视觉传感器;或者,可移动平台上设置的视觉传感器可以均为双目视觉传感器;或者,可移动平台上设置的视觉传感器可以既包括单目视觉传感器又包括双目视觉传感器。例如,无人机的前方、下方和后方设置的视觉传感器可以为双目视觉传感器,无人机的左方和右方设置的视觉传感器可以为单目视觉传感器。
下面结合附图,对本发明的一些实施方式作详细说明。在不冲突的情况下,下述的实施例及实施例中的特征可以相互组合。
图1为本发明一实施例提供的视觉定位方法的流程示意图,本实施例的 执行主体可以为可移动平台,具体可以为可移动平台的处理器。如图1所示,本实施例的方法可以包括:
步骤101,获取处理器当前的负载信息,根据所述负载信息,确定可移动平台的所有方向的视觉传感器中至少一个目标方向的视觉传感器。
本步骤中,所述处理器具体可以是指所述可移动平台中用于根据视觉传感器获取到的图像,确定可移动平台的位姿信息的处理器。需要说明的是,所述处理器的个数可以为一个或多个,可以为单核或多核处理器,本发明对此可以不作限定。
其中,所述负载信息具体可以为能够用于指示负载状况的任意类型的信息。例如,负载信息可以为中央处理器(CPU,Central Processing Unit)使用率,CPU使用率越高可以表示负载越重。
可以理解的是,处理器的负载越大,可以表示处理器剩余资源越少,处理器资源的紧张程度越大。处理器的负载越小,可以表示处理器剩余资源越多,处理器资源的紧张程度越小。并且,由于计算量与执行步骤102视觉传感器的数目正相关,因此,可以根据处理器的负载信息确定执行后续步骤102的目标方向的视觉传感器。其中,处理器资源的紧张程度例如可以通过处理器的剩余资源表示,在处理器的剩余资源小于或等于资源阈值时,可以表示处理器资源紧张,在处理器的剩余资源大于资源阈值时,可以表示处理器资源不紧张。
可选的,根据负载信息,确定的至少一个目标方向的视觉传感器可以为可移动平台的所有方向的视觉传感器,或者,可以为可移动平台的所有方向中部分方向的视觉传感器。这里,根据处理器的负载信息,确定在处理器的负载状况下能够处理的至少一个目标方向的视觉传感器,使得处理器在根据至少一个目标方向中各目标方向的视觉传感器获取到的图像,采用第一算法确定可移动平台的位姿信息时,处理器计算量小于或等于一定阈值,从而可以避免处理器资源紧张的问题。
例如,假设无人机的前方、下方、后方、左方和右方可以均设置有视觉传感器,则在CPU占有率为10%时,可以根据处理器的负载信息,确定无人机的前方、下方、后方、左方和右方的视觉传感器,即至少一个目标方向包括前方、下方、后方、左方和右方;在CPU占有率为50%时,可以根据处理 器的负载信息,确定无人机的前方、下方和后方的视觉传感器,即至少一个目标方向包括前方、后方和下方。
其中,无人机的前方设置的视觉传感器例如可以为双目视觉传感器,且双目视觉传感器的双目例如可以沿着无人机的左右方向依次设置在无人机的前方。无人机的下方设置的视觉传感器例如可以为双目视觉传感器,且双目视觉传感器的双目例如可以沿着无人机的前后方向依次设置在无人机的下方。无人机的后方设置的视觉传感器例如可以为双目视觉传感器,且双目视觉传感器的双目例如可以沿着无人机的上下方向依次设置在无人机的后方。无人机的左方设置的视觉传感器例如可以为单目视觉传感器,且单目视觉传感器例如可以设置在无人机的左方且靠近无人机的后方的位置。无人机的右方设置的视觉传感器例如可以为单目视觉传感器,且单目视觉传感器例如可以设置在无人机的右方且靠近无人机的后方的位置。
需要说明的是,上述无人机上设置的视觉传感器的数目、类型以及位置仅为举例,在实际应用中可以根据需求灵活设置。
步骤102,根据所述至少一个目标方向中各目标方向的视觉传感器获取到的图像,采用第一算法,确定所述可移动平台的位姿信息。
本步骤中,在采用第一算法,确定可移动平台的位姿信息时,根据目标方向的视觉传感器获取到的图像,而并不根据除目标方向之外的其他方向的视觉传感器获取到的图像。例如,假设无人机的前方、下方、后方、左方和右方可以均设置有视觉传感器,则在确定目标方向包括前方、后方和下方后,可以根据前方的视觉传感器获取到的图像、后方的视觉传感器获取到的图像和下方的视觉传感器获取到的图像,采用第一算法,确定可移动平台的位置信息。
需要说明的是,可移动平台的所有方向的视觉传感器具体可以为可移动平台的能够获取图像的所有方向的视觉传感器。可选的,可移动平台的所有方向的视觉传感器均可以实时获取图像,进一步的,根据处理器当前的负载信息,确定使用所有方向中至少一个目标方向的视觉传感器获取到的图像。
本实施例中,通过获取处理器当前的负载信息,并根据负载信息,确定可移动平台的所有方向的视觉传感器中至少一个目标方向的视觉传感器,根据至少一个目标方向中各目标方向的视觉传感器获取到的图像,采用第一算 法,确定可移动平台的位姿信息,实现了根据处理器的负载信息,确定在处理器的负载状况下能够处理的至少一个目标方向的视觉传感器,使得处理器在根据至少一个目标方向中各目标方向的视觉传感器获取到的图像,采用第一算法确定可移动平台的位姿信息时,处理器在当前的负载信息所指示的当前负载状况下的计算量可接受,可以避免处理器资源紧张的问题。
图2为本发明另一实施例提供的视觉定位方法的流程示意图,本实施例在图2所示实施例的基础上,主要描述了步骤101的一种可选的实现方式。如图2所示,本实施例的方法可以包括:
步骤201,根据处理器当前的负载信息,判断所述处理器的负载是否小于或等于第一负载阈值。
本步骤中,所述第一负载阈值可以为预配置的阈值,或者,也可以预定义的阈值,或者还可以为动态指示的阈值等,本发明对此不作限定。可选的,第一负载阈值可以与第一算法的复杂度、所有方向的视觉传感器的个数,以及视觉传感器的类型相关。例如,第一算法的复杂度越大,第一负载阈值可以越小。又例如,所有方向的视觉传感器的个数越大,第一负载阈值可以越小。又例如,视觉传感器的类型为双目视觉传感器的视觉传感器的个数越多,第一负载阈值可以越小。
其中,算法的复杂度可以是指算法在编写成可执行程序后,运行时所需要的资源,资源包括时间资源和内存资源。需要说明的是,当算法在不同处理器上运行时,复杂度可以不同,该不同处理器例如可以为飞控处理器和图像处理器。
具体的,若所述处理器的负载小于或等于所述第一负载阈值,则执行步骤202。这里,所述处理器的负载小于或等于第一负载阈值,可以表示所述处理器的负载较小。
步骤202,根据至少一个目标方向中各目标方向的视觉传感器获取到的图像,采用第一算法,确定所述可移动平台的位姿信息;所述至少一个目标方向为所述所有方向的全部方向。
本步骤中,在处理器的负载较小时,可以根据可移动平台上设置的所有方向的视觉传感器获取到的图像,采用第一算法,确定可移动平台的位姿信息。这里,即使第一算法的算法复杂度较高,但是在处理器的负载小于或等 于第一负载阈值的条件下,根据所有方向的视觉传感器获取到的图像,采用第一算法,确定可移动平台的位姿信息时,处理器在当前的负载信息所指示的当前负载状况下的计算量可接受,可以避免处理器资源紧张的问题。
可选的,第一算法可以为视觉惯性里程计(VIO,Visual-Inertial Odometry)算法。具体的,以VIO算法为例,所有方向上的视觉传感器分别获取到的图像可以作为VIO算法的输入,VIO算法的输出即为可移动平台的位姿信息。这里,由于VIO算法需要同时对所有方向上的视觉传感器分别采集到的图像进行处理,因此虽然准确度较高,但是计算量较大。
可以理解的是,若所述处理器的负载大于所述第一负载阈值,则可以表示处理器的负载较大,此时,可以不通过执行步骤202确定可移动平台的位姿信息。
本实施例中,通过在处理器的负载较小时,根据可移动平台上设置的所有方向的视觉传感器获取到的图像,采用第一算法,确定可移动平台的位姿信息,实现了即使第一算法的算法复杂度较高,但是在处理器的负载小于或等于第一负载阈值的条件下,根据所有方向的视觉传感器获取到的图像,采用第一算法,确定可移动平台的位姿信息时,处理器在负载信息所指示的当前负载状况下的计算量可接受,可以避免处理器资源紧张的问题。
图3为本发明又一实施例提供的视觉定位方法的流程示意图,本实施例在图3所示实施例的基础上,主要描述了步骤101的一种可选的实现方式。如图3所示,本实施例的方法可以包括:
步骤301,根据处理器当前的负载信息,判断所述处理器的负载是否小于或等于第一负载阈值。
本步骤中,所述第一负载阈值可以为预配置的阈值,或者,也可以预定义的阈值,或者还可以为动态指示的阈值等,本发明对此不作限定。
具体的,若所述处理器的负载大于所述第一负载阈值,则执行步骤302。这里,所述处理器的负载大于第一负载阈值,可以表示所述处理器的负载较大。
步骤302,对于所述至少一个目标方向中的部分方向的视觉传感器获取到的图像采用第一算法,对于所述至少一个目标方向中其他方向的视觉传感器获取到的图像采用第二算法,确定所述可移动平台的位姿信息;所述至少 一个目标方向为所述所有方向的全部方向。
本步骤中,在处理器的负载较高时,对于上述所有方向中部分方向的视觉传感器获取到的图像采用第一算法,对于所有方向中其他方向(即,所有方向中除采用第一算法的部分方向之外的方向)的视觉传感器获取到的图像采用第二算法,确定可移动平台的位姿信息。其中,所述第一算法可以为算法复杂度较高的算法,所述第二算法为算法复杂度较低的算法,即第二算法的算法复杂度小于第一算法的算法复杂度。
这里,即使第一算法的算法复杂度较高,但是在处理器的负载大于第一负载阈值的条件下,对于所有方向中部分方向的视觉传感器获取到的图像采用第一算法,对于所有方向中其他方向的视觉传感器获取到的图像采用第二算法,确定可移动平台的位姿信息时,处理器在当前的负载信息所指示的当前负载状况下的计算量可接受,可以避免处理器资源紧张的问题。
可选的,第一算法可以为视觉算法中对于视觉传感器采集到的图像与惯性测量单元(IMU,Inertial measurement unit)信息紧耦合的算法,第二算法可以为视觉算法中对于视觉传感器采集到的图像与IMU信息松耦合的算法。进一步可选的,第一算法可以为视觉惯性里程计(VIO,Visual-Inertial Odometry)算法,第二算法可以为视觉里程计(VO,Visual Odometry)算法。
需要说明的是,本发明实施例中对于第一算法和第二算法可以不作限定,任何能够用于根据视觉传感器获取到的图像,确定可移动平台的位姿信息的两个算法中,算法复杂度较高的算法可以认为是第一算法,算法复杂度较低的算法可以认为是第二算法。考虑到可以通过复杂度的增加,提升准确度,可选的,第一算法的准确度可以大于第二算法。
可以理解的是,若所述处理器的负载小于或等于所述第一负载阈值,则可以表示处理器的负载较小,此时,可以不通过执行步骤302确定可移动平台的位姿信息。具体的,若所述处理器的负载小于或等于所述第一负载阈值,则可以通过计算量大于步骤302的方式,确定可移动平台的位姿信息的方式。
可以理解的是,步骤302中,通过降低所有方向中部分方向采用的算法的复杂度,以降低计算量,节省处理器资源,从而避免处理器资源紧张的问题。
需要说明的是,图3中主要描述了通过判断处理器的负载与一个负载阈 值(即,第一负载阈值)的大小关系,并根据判断结果得到确定可移动平台的位姿信息的实现方式。可以理解的是,也可以根据实际需要判断处理器的负载与多个不同的负载阈值的大小关系,并根据判断结果得到确定可移动平台的位姿信息的实现方式。
可替换的,若所述处理器的负载大于所述第一负载阈值,则执行步骤A。
步骤A,判断所述处理器的负载是否小于或等于第二负载阈值。
这里,所述第二负载阈值大于所述第一负载阈值。
具体的,若所述处理器的负载小于或等于所述第二负载阈值,则执行步骤302。这里,处理器的负载小于或等于第二负载阈值,可以表示处理器的负载较大。
可选的,所述第二负载阈值可以为预配置的阈值,或者,也可以预定义的阈值,或者还可以为动态指示的阈值等,本发明对此不作限定。可选的,第二负载阈值可以与第一算法的复杂度、所有方向的视觉传感器的个数,以及视觉传感器的类型相关。例如,第一算法的复杂度越大,第二负载阈值可以越小。又例如,所有方向的视觉传感器的个数越大,第二负载阈值可以越小。又例如,视觉传感器的类型为双目视觉传感器的视觉传感器的个数越多,第二负载阈值可以越小。
进一步可选的,若所述处理器的负载大于所述第二负载阈值,则执行步骤B1。这里,处理器的负载大于第二负载阈值,可以表示处理器的负载大(其程度大于负载较大),此时,可以采用较步骤302计算量要小的方式确定可移动平台的位姿信息。
步骤B1、根据至少一个目标方向中部分目标方向的视觉传感器获取到的图像,采用第一算法,确定所述可移动平台的位姿信息;所述至少一个目标方向为所述所有方向的部分方向。
这里,在处理器的负载大时,可以根据可移动平台上设置的部分方向的视觉传感器获取到的图像,采用第一算法,确定可移动平台的位姿信息。这里,即使第一算法的算法复杂度较高,但是在处理器的负载大于第二负载阈值的条件下,根据部分方向的视觉传感器获取到的图像,采用第一算法,确定可移动平台的位姿信息时,处理器在当前的负载信息所指示的当前负载状况下的计算量可接受,可以避免处理器资源紧张的问题。
可替换的,若所述处理器的负载大于所述第二负载阈值,则执行步骤B2。
可以理解的是,步骤B1和步骤B2与步骤302相比,通过减少目标方向,减少用于确定可移动平台的位姿信息的图像的数量,以降低计算量,节省处理器资源,从而避免处理器资源紧张的问题。
步骤B2、判断所述处理器的负载是否大于第三负载阈值。
这里,所述第三负载阈值大于所述第二负载阈值。
可选的,若所述处理器的负载小于或等于所述第三负载阈值,则执行步骤B1。这里,处理器的负载小于或等于第三负载阈值,可以表示处理器的负载较大。
可选的,所述第三负载阈值可以为预配置的阈值,或者,也可以预定义的阈值,或者还可以为动态指示的阈值等,本发明对此不作限定。可选的,第三负载阈值可以与第一算法的复杂度、所有方向的视觉传感器的个数,以及视觉传感器的类型相关。例如,第一算法的复杂度越大,第三负载阈值可以越小。又例如,所有方向的视觉传感器的个数越大,第三负载阈值可以越小。又例如,视觉传感器的类型为双目视觉传感器的视觉传感器的个数越多,第三负载阈值可以越小。
进一步可选的,若所述处理器的负载大于所述第三负载阈值,则执行步骤B21或B22。这里,处理器的负载大于第三负载阈值,可以表示处理器的负载很大(其程度大于负载大),此时,可以采用较步骤B1计算量要小的方式(即,步骤B21或步骤B22)确定可移动平台的位姿信息。
步骤B21、根据至少一个目标方向中第一方向的双目视觉传感器中单目获得的图像,以及所述至少一个目标方向中其他方向的视觉传感器获取到的图像,采用第一算法,确定所述可移动平台的位姿信息;所述目标方向为所述所有方向的部分方向。
这里,在处理器的负载很大时,可以根据所有目标方向中第一方向双目视觉传感器中单目获得的图像,以及所有目标方向中其他方向(即,所有目标方向中除第一方向之外的其他方向)的视觉传感器获取到的图像,采用第一算法,确定可移动平台的位姿信息。这里,即使第一算法的算法复杂度较高,但是在处理器的负载大于第三负载阈值的条件下,根据所有目标方向中第一方向双目视觉传感器中单目获得的图像,以及所有目标方向中其他方向 的视觉传感器获取到的图像,采用第一算法,确定可移动平台的位姿信息时,处理器在当前的负载信息所指示的当前负载状况下的计算量可接受,可以避免处理器资源紧张的问题。
需要说明的是,所述第一方向具体可以为所有目标方向中,视觉传感器为双目视觉传感器的一个或多个方向。
考虑到可移动平台在实现特定功能时,需要基于特定方向的视觉传感器获取到的图像进行处理。因此,可选的,所述至少一个目标方向的视觉传感器包括:用于实现特定功能的第二方向的视觉传感器,且所述特定功能开启。
可选的,为了提供特定功能的准确度,所述第二方向和所述第一方向可以为不同方向。也就是说,在所述第二方向的视觉传感器为双目视觉传感器的场景下,可以根据第二方向的双目视觉传感器中双目获得的图像,确定可移动平台的位姿信息。
需要说明的是,对于特定功能以及第二方向,本发明可以不作限定。进一步可选的,所述特定功能为侧向避障功能,所述第二方向为所述可移动平台的侧向。
可以理解的是,步骤B21和步骤B2相比,通过双目视觉传感器降为单目视觉传感器,减少用于确定可移动平台的位姿信息的图像的数量,以降低计算量,节省处理器资源,从而避免处理器资源紧张的问题。
步骤B22、对于所述至少一个目标方向中的部分方向的视觉传感器获取到的图像采用第一算法,对于所述至少一个目标方向中其他方向的视觉传感器获取到的图像采用第二算法,确定所述可移动平台的位姿信息;所述至少一个目标方向为所述所有方向的部分方向。
这里,在处理器的负载很大时,对于所有目标方向中部分方向的视觉传感器获取到的图像采用第一算法,对于所有目标方向中其他方向的视觉传感器获取到的图像采用第二算法,确定可移动平台的位姿信息。其中,所述第一算法可以为算法复杂度较高的算法,所述第二算法为算法复杂度较低的算法,即第二算法的算法复杂度小于第一算法的算法复杂度。需要说明的是,所有目标方向即所述至少一个目标方向,其为上述所有方向中的部分方向。
这里,即使第一算法的算法复杂度较高,但是在处理器的负载大于第三负载阈值的条件下,对于所有目标方向中部分方向的视觉传感器获取到的图 像采用第一算法,对于所有目标方向中其他方向的视觉传感器获取到的图像采用第二算法,确定可移动平台的位姿信息时,处理器在当前的负载信息所指示的当前负载状况下的计算量可接受,可以避免处理器资源紧张的问题。
考虑到可移动平台在实现特定功能时,需要基于特定方向的视觉传感器获取到的图像进行处理。因此,可选的,所述至少一个目标方向的视觉传感器包括:用于实现特定功能的第二方向的视觉传感器,且所述特定功能开启。
可选的,在第一算法的准确度大于第二算法时,为了提供特定功能的准确度,所述第二方向的视觉传感器获取到的图像可以采用第一算法。
需要说明的是,对于特定功能以及第二方向,本发明可以不作限定。进可选的,所述特定功能可以为侧向避障功能,所述第二方向可以为所述可移动平台的侧向,例如第二方向可以包括可移动平台的左侧和/或右侧。
可以理解的是,步骤B22和步骤B2相比,通过降低目标方向中部分方向的视觉传感器的图像所采用的算法的复杂度,降低计算量,从而节省处理器资源。
需要说明的是,若所述处理器的负载小于或等于所述第一负载阈值,则可以表示处理器的负载较大,此时,可以不通过执行步骤302确定可移动平台的位姿信息。可选的,图3所示实施例可以与图2所示实施例结合,即在判断所述处理器的负载是否小于或等于第一负载阈值之后,若所述处理器的负载小于或等于所述第一负载阈值,则执行步骤202,若所述处理器的负载大于所述第一负载阈值,则执行步骤302。
本实施例中,通过若所述处理器的负载小于或等于所述第一负载阈值,则对于所述所有方向中的部分方向的视觉传感器获取到的图像采用第一算法,对于所述所有方向中其他方向的视觉传感器获取到的图像采用第二算法,确定所述可移动平台的位姿信息,实现了通过降低所有方向中部分方向采用的算法的复杂度,以降低计算量,节省处理器资源,从而避免处理器资源紧张的问题。
图4为本发明又一实施例提供的视觉定位方法的流程示意图,本实施例在图1所示实施例的基础上,主要描述了步骤101的一种可选的实现方式。如图4所示,本实施例的方法可以包括:
步骤401,根据处理器当前的负载信息,判断所述处理器的负载是否小 于或等于第一负载阈值。
本步骤中,若所述处理器的负载大于所述第一负载阈值,则执行步骤402。这里,所述处理器的负载大于第一负载阈值,可以表示所述处理器的负载较大。
步骤402,根据至少一个目标方向中第一方向的双目视觉传感器中单目获得的图像,以及所述至少一个目标方向中其他方向的视觉传感器获取到的图像,采用第一算法,确定所述可移动平台的位姿信息;所述目标方向为所述所有方向的全部方向。
本步骤中,所述第一方向的视觉传感器为双目视觉传感器。需要说明的是,所述第一方向具体可以为所有目标方向中,视觉传感器为双目视觉传感器的一个或多个方向。
在处理器的负载较大时,可以根据所有方向中第一方向双目视觉传感器中单目获得的图像,以及所有方向中其他方向(即,所有方向中除第一方向之外的其他方向)的视觉传感器获取到的图像,采用第一算法,确定可移动平台的位姿信息。这里,即使第一算法的算法复杂度较高,但是在处理器的负载大于第一负载阈值的条件下,根据所有方向中第一方向双目视觉传感器中单目获得的图像,以及所有方向中其他方向的视觉传感器获取到的图像,采用第一算法,确定可移动平台的位姿信息时,处理器在当前的负载信息所指示的当前负载状况下的计算量可接受,可以避免处理器资源紧张的问题。
可以理解的是,若所述处理器的负载小于或等于所述第一负载阈值,则可以表示处理器的负载较小,此时,可以不通过执行步骤402确定可移动平台的位姿信息。具体的,若所述处理器的负载小于或等于所述第一负载阈值,则可以通过计算量大于步骤402的方式,确定可移动平台的位姿信息的方式。
可以理解的是,步骤402通过双目视觉传感器降为单目视觉传感器,减少用于确定可移动平台的位姿信息的图像的数量,以降低计算量,节省处理器资源,从而避免处理器资源紧张的问题。
需要说明的是,图4中主要描述了通过判断处理器的负载与一个负载阈值(即,第一负载阈值)的大小关系,并根据判断结果得到确定可移动平台的位姿信息的实现方式。可以理解的是,也可以根据实际需要判断处理器的负载与多个不同的负载阈值的大小关系,并根据判断结果得到确定可移动平 台的位姿信息的实现方式。
与图3所示实施例类似,可替换的,若所述处理器的负载大于所述第一负载阈值,则执行步骤C。
步骤C,判断所述处理器的负载是否小于或等于第二负载阈值。
这里,所述第二负载阈值大于所述第一负载阈值。
具体的,若所述处理器的负载小于或等于所述第二负载阈值,则执行步骤402。这里,处理器的负载小于或等于第二负载阈值,可以表示处理器的负载较大。需要说明的是,关于第二负载阈值的相关说明可以参见图3所示实施例的相关描述,在此不再赘述。
进一步可选的,若所述处理器的负载大于所述第二负载阈值,则执行步骤D1。这里,处理器的负载大于第二负载阈值,可以表示处理器的负载大(其程度大于负载较大),此时,可以采用较步骤402计算量要小的方式确定可移动平台的位姿信息。
D1、根据至少一个目标方向中部分目标方向的视觉传感器获取到的图像,采用第一算法,确定所述可移动平台的位姿信息;所述至少一个目标方向为所述所有方向的部分方向。
需要说明的是,步骤D1与步骤B1类似,在此不再赘述。
可替换的,若所述处理器的负载小于或等于所述第二负载阈值,则执行步骤D2。
可以理解的是,步骤D1和步骤D2与步骤402相比,通过减少目标方向,减少用于确定可移动平台的位姿信息的图像的数量,以降低计算量,节省处理器资源,避免处理器资源紧张的问题。
步骤D2、判断所述处理器的负载是否大于第三负载阈值。
这里,所述第三负载阈值大于所述第二负载阈值。
可选的,若所述处理器的负载小于或等于所述第三负载阈值,则执行步骤C1。这里,处理器的负载小于或等于第三负载阈值,可以表示处理器的负载较大。
需要说明的是,关于第三负载阈值的相关说明可以参见图3所示实施例的相关描述,在此不再赘述。
进一步可选的,若所述处理器的负载大于所述第三负载阈值,则执行如 下步骤D21或步骤D22。这里,处理器的负载大于第三负载阈值,可以表示处理器的负载很大(其程度大于负载大),此时,可以采用较步骤C1计算量要小的方式(即,步骤D21或步骤D22)确定可移动平台的位姿信息。
D21、根据至少一个目标方向中第一方向的双目视觉传感器中单目获得的图像,以及所述至少一个目标方向中其他方向的视觉传感器获取到的图像,采用第一算法,确定所述可移动平台的位姿信息;所述目标方向为所述所有方向的部分方向。
步骤D22、对于所述至少一个目标方向中的部分方向的视觉传感器获取到的图像采用第一算法,对于所述至少一个目标方向中其他方向的视觉传感器获取到的图像采用第二算法,确定所述可移动平台的位姿信息;所述至少一个目标方向为所述所有方向的部分方向。
需要说明的是,步骤D2与步骤B2类似,步骤D21与步骤B21类似,步骤D22与步骤B22类似,在此不再赘述。
需要说明的是,若所述处理器的负载小于或等于所述第一负载阈值,则可以表示处理器的负载较大,此时,可以不通过执行步骤402确定可移动平台的位姿信息。可选的,图4所示实施例可以与图2所示实施例结合,即在判断所述处理器的负载是否小于或等于第一负载阈值之后,若所述处理器的负载小于或等于所述第一负载阈值,则执行步骤202,若所述处理器的负载大于所述第一负载阈值,则执行步骤402。
本实施例中,通过若所述处理器的负载小于或等于所述第一负载阈值,则根据所有方向中第一方向双目视觉传感器中单目获得的图像,以及所有方向中其他方向的视觉传感器获取到的图像,采用第一算法,确定可移动平台的位姿信息,实现了通过双目视觉传感器降为单目视觉传感器,减少用于确定可移动平台的位姿信息的图像的数量,以降低计算量,节省处理器资源,避免处理器资源紧张的问题。
图5为本发明又一实施例提供的视觉定位方法的流程示意图,本实施例在图1所示实施例的基础上,主要描述了步骤101的一种可选的实现方式。如图5所示,本实施例的方法可以包括:
步骤501,根据处理器当前的负载信息,判断所述处理器的负载是否小于或等于第一负载阈值。
本步骤中,若所述处理器的负载大于所述第一负载阈值,则执行如下步骤502。这里,所述处理器的负载大于第一负载阈值,可以表示所述处理器的负载较大。
步骤502,根据至少一个目标方向中各目标方向的视觉传感器获取到的图像,采用第一算法,确定所述可移动平台的位姿信息;所述至少一个目标方向为所述所有方向的部分方向。
本步骤中,在处理器的负载较高时,可以根据可移动平台上设置的所有方向中部分方向的视觉传感器获取到的图像,采用第一算法,确定可移动平台的位姿信息。这里,即使第一算法的算法复杂度较高,但是在处理器的负载大于第一负载阈值的条件下,根据所有方向中部分方向的视觉传感器获取到的图像,采用第一算法,确定可移动平台的位姿信息时,处理器在当前的负载信息所指示的当前负载状况下的计算量可接受,可以避免处理器资源紧张的问题。
可以理解的是,若所述处理器的负载小于或等于所述第一负载阈值,则可以表示处理器的负载较小,此时,可以不通过执行步骤502确定可移动平台的位姿信息。具体的,若所述处理器的负载小于或等于所述第一负载阈值,则可以通过计算量大于步骤502的方式,确定可移动平台的位姿信息的方式。
可以理解的是,步骤502通过基于所有方向中部分方向的视觉传感器获取到的图像确定可移动平台的位姿信息,减少用于确定可移动平台的位姿信息的图像的数量,以降低计算量,节省处理器资源,从而避免处理器资源紧张的问题。
需要说明的是,图5中主要描述了通过判断处理器的负载与一个负载阈值(即,第一负载阈值)的大小关系,并根据判断结果得到确定可移动平台的位姿信息的实现方式。可以理解的是,也可以根据实际需要判断处理器的负载与多个不同的负载阈值的大小关系,并根据判断结果得到确定可移动平台的位姿信息的实现方式。
与图3所示实施例类似,可替换的,若所述处理器的负载大于所述第一负载阈值,则执行步骤E。
步骤E、判断所述处理器的负载是否小于或等于第三负载阈值。
这里,所述第三负载阈值大于所述第一负载阈值。
具体的,若所述处理器的负载小于或等于所述第三负载阈值,则执行步骤502。这里,处理器的负载小于或等于第三负载阈值,可以表示处理器的负载较大(其程度大于负载较小)。
进一步可选的,若所述处理器的负载大于所述第三负载阈值,则执行步骤F1或F2。这里,处理器的负载大于第三负载阈值,可以表示处理器的负载大(其程度大于负载较大),此时,可以采用较步骤502计算量要小的方式(即,步骤F1或步骤F2)确定可移动平台的位姿信息。
步骤F1、对于所述至少一个目标方向中的部分方向的视觉传感器获取到的图像采用第一算法,对于所述至少一个目标方向中其他方向的视觉传感器获取到的图像采用第二算法,确定所述可移动平台的位姿信息;所述至少一个目标方向为所述所有方向的部分方向。
步骤F2、根据至少一个目标方向中第一方向的双目视觉传感器中单目获得的图像,以及所述至少一个目标方向中其他方向的视觉传感器获取到的图像,采用第一算法,确定所述可移动平台的位姿信息;所述目标方向为所述所有方向的部分方向。
需要说明的是,步骤F1与步骤B21类似,步骤F2与步骤B22类似,在此不再赘述。
需要说明的是,若所述处理器的负载小于或等于所述第一负载阈值,则可以表示处理器的负载较大,此时,可以不通过执行步骤402确定可移动平台的位姿信息。可选的,图5所示实施例可以与图2所示实施例结合,即在判断所述处理器的负载是否小于或等于第一负载阈值之后,若所述处理器的负载小于或等于所述第一负载阈值,则执行步骤202,若所述处理器的负载大于所述第一负载阈值,则执行步骤502。
本实施例中,通过若所述处理器的负载小于或等于所述第一负载阈值,则根据可移动平台上设置的所有方向中部分方向的视觉传感器获取到的图像,采用第一算法,确定可移动平台的位姿信息,实现了通过基于所有方向中部分方向的视觉传感器获取到的图像确定可移动平台的位姿信息,减少用于确定可移动平台的位姿信息的图像的数量,以降低计算量,节省处理器资源,从而避免处理器资源紧张的问题。
在上述实施例的基础上,考虑到在进行视觉定位时可以固定使用特定方 向的视觉传感器获取到的图像,可选的,当所述目标方向为所述可移动平台的所有方向的部分方向时,所述部分方向可以包括第三方向。进一步可选的,考虑到下视一般都是可靠的,所述第三方向为所述可移动平台的下方。
在所述目标方向为所述可移动平台的所有方向的部分方向时,在上述方法实施例的基础上,可选的,还可以包括如下步骤:从多个方向中选择至少一个第四方向作为所述目标方向。其中,所述多个方向可以理解为能够作为所述目标方向的候选方向。
进一步可选的,所述从多个方向中选择至少一个第四方向作为所述目标方向,包括:根据所述多个方向中,各方向的特征点的平均深度以及匹配成功的特征点数目,从所述多个方向中选择至少一个第四方向作为所述目标方向。
可选的,多个方向中各方向的特征点的平均深度,可以满足如下三种情况中的任意一种。
(1)一个方向的最新的关键帧(Key frame)上双目匹配(Stereo Match,区别于帧间匹配Frame Match)成功的点数大于一定阈值,比如100个点,那就使用双目匹配计算的深度,求取特征点的平均深度。
(2)如果不满足(1),该方向的最新的关键帧与前一帧关键帧匹配成功的特征点在最新关键帧上的直方图统计的深度,作为特征点的平均深度。
(3)如果不满足(1)和(2),将该方向的特征点的平均深度赋一个比较大的值,比如500米(m)。这里,将该方向的特征点的平均深度赋一个比较大的值可以认为是将该方向不作为目标方向。
可选的,可以通过三角化(Trianglulation)测量法,确定最新的关键帧与前一帧关键帧匹配成功的特征点(以下可以记为三角化成功的特征点)
可选的,多个方向中各方向匹配成功的特征点数目,具体可以为一个方向的最新的关键帧与前一帧关键帧匹配成功的特征点的数目。
可以理解的是,当深度越小表示距离越近,深度越大表示距离越远时,一个方向的平均深度d0越大,则该方向作为目标方向的概率可以越小。一个方向匹配成功的特征点数目N越多,则该方向作为目标方向的概率可以越大。
因此,可选的,可以基于一个方向的匹配成功的特征点数目与该方向的特征点的平均深度的比值(以下记为G),确定第四方向。
进一步可选的,所述第四方向的匹配成功的特征点数目与第四方向的特征点的平均深度的比值,大于所述多个方向中其他方向的匹配成功的特征点数目与所述其他方向的特征点的平均深度的比值。例如,假设多个方向包括方向1、方向2、方向3和方向4,方向1的匹配成功的特征点数目与方向1的特征点的平均深度的比值为G1,方向2的匹配成功的特征点数目与方向2的特征点的平均深度的比值为G2,方向3的匹配成功的特征点数目与方向3的特征点的平均深度的比值为G3,方向4的匹配成功的特征点数目与方向4的特征点的平均深度的比值为G4,且G1>G2>G3>G4,则第四方向可以包括方向1,或者,第四方向可以包括方向1和方向2。
进一步可选的,为了确保所选择的第四方向足够好,所述第四方向还可以满足如下条件:所述第四方向的匹配成功的特征点数目与第四方向的特征点的平均深度的比值大于或等于比值阈值。
可选的,为了减小计算量,节省计算资源,可以在满足一定条件时,触发上述从多个方向中选择至少一个第四方向作为所述目标方向的步骤。
进一步可选的,上述从多个方向中选择至少一个第四方向作为所述目标方向之前,还包括:
判断所述目标方向中是否存在匹配成功的特征点数目与特征点的平均深度的比值小于或等于比值阈值的第四方向;
若所述目标方向中存在匹配成功的特征点数目与特征点的平均深度的比值小于或等于比值阈值的第四方向,则将所述第四方向从所述目标方向中去除,并触发执行所述从多个方向中选择至少一个第四方向作为所述目标方向的步骤。
以多个方向包括前方、后方、左方和右方为例,进行如下举例。
首先,对前方、后方、左方和右方分别计算G,并依次从高到低排列。假设对前方计算G得到前方的G值等于30,对右方计算G得到右方的G值等于28,对后方计算G得到后方的G值等于20,对左方计算G得到左方的G值等于16,则可以确定第四方向包括前方和后方。
然后,在飞行过程中,假设前方没有匹配点,或是离场景很远了,那么其G值就会逐渐降低。当低于一定值,比如阈值Gth=8时,下一次计算就不会使用前方的视觉传感器获取到的图像更新状态量,而依次尝试计算后方和 左方的G值(这里,只计算前方、后方、左方的G值,而不参与更新状态量,计算量就比较小),重新根据后方和左方的G值选取出第四方向。
可选的,上述根据所述至少一个目标方向中各目标方向的视觉传感器获取到的图像,采用第一算法,确定所述可移动平台的位姿信息,具体可以包括:
对于至少一个目标方向中各目标方向的视觉传感器获取到的图像,基于最小化第一算法残差的方式,确定所述可移动平台的位姿信息。
另外,根据视觉传感器采集到的图像,采用算法(例如,第一算法或第二算法)确定可移动平台的信息时,通常需要对图像进行特征点提取,获得图像的特征点,并进一步的基于获取到的特征点进行处理。需要说明的是,为了减小计算量,输入算法的图像通常为视觉传感器获得的关键帧。
以下,以第一算法为VIO算法为例,对于VIO算法残差进行如下说明:
根据位置转换关系,对于空间中的一个三维点P f,有如下:
Figure PCTCN2019073147-appb-000001
其中,
Figure PCTCN2019073147-appb-000002
表示某一个特征点(feature point)在相机(camera)坐标系下的三维位置,R cw表示世界(world)坐标系到相机坐标系的旋转关系,
Figure PCTCN2019073147-appb-000003
表示该特征点在世界坐标系下的三维位置,
Figure PCTCN2019073147-appb-000004
表示相机在世界坐标系下的三维位置。标识的右上角标识是在以哪个坐标系为基准。f表示特征点,w表示世界坐标,c表示相机或是相机坐标系,i表示惯性测量单元(或是机身重心坐标系。R cw表示世界坐标系到相机坐标系的旋转变换。
由于
Figure PCTCN2019073147-appb-000005
所以
Figure PCTCN2019073147-appb-000006
那么,这里就有如下五个变量:
R ic是相机到机身重心的旋转变换,由安装位置结构决定;
Figure PCTCN2019073147-appb-000007
是相机到机身重心的平移变换,由安装位置结构决定;
R wi是无人机机身坐标系到世界坐标系的旋转变换,由无人机当前的姿态决定;
Figure PCTCN2019073147-appb-000008
是无人机在到世界坐标系下的三维位置,由无人机当前的位置决定;
Figure PCTCN2019073147-appb-000009
是某个特征点在世界坐标系下的三维位置,由物体本身的位置决定。
进一步的:
Figure PCTCN2019073147-appb-000010
Figure PCTCN2019073147-appb-000011
其中,p f表示图像上的二维点。
上面整个过程描述的是如何从一个空间中的三维点
Figure PCTCN2019073147-appb-000012
最终映射到某个相机中二维点的过程,这是通过针孔模型(物理模型)数学推导出来的理论位置,即预测的结果,而实际观测还有个二维点(例如,卡纳德-卢卡斯-托马西特征跟踪器(KLT,Kanade–Lucas–Tomasi feature tracker)算法匹配上的点),即观测值。
Figure PCTCN2019073147-appb-000013
(u,v) T是KLT算法匹配得到的点(视觉传感器为单目时,根据点在前一张图像的位置,找出在下一张图像的位置;视觉传感器为双目时,可以根据点在一目图像的位置,找出在另一目图像的位置),(u 0,v 0) T是光心,与焦距f一起称为相机内参,是每个相机固有的属性参数,一般不会变化,出厂参数得到。
重投影误差error记为:
Figure PCTCN2019073147-appb-000014
这里,就是要最优化上面五个变量,让重投影误差最小化。
进一步的,可以将此写成增量形式,以令残差residual表示:
Figure PCTCN2019073147-appb-000015
写成矩阵形式:
Figure PCTCN2019073147-appb-000016
同理可以得到residual y
但是,这里我们并不关心特征点在世界坐标系下的位置,我们通过边缘化(Marginalization)去除
Figure PCTCN2019073147-appb-000017
是现有方法,得到新的残差记为r(可以理解为VIO算法中对于一个视觉传感器获得图像的残差),写成矩阵形式
Figure PCTCN2019073147-appb-000018
那么R wi是IMU到世界坐标系的旋转变换。
需要说明的是,上式得到新的残差r的公式是单目的公式。如果视觉传感器是双目视觉传感器,且只使用单目获得的图像,则可以只用左目获得的图像。如果视觉传感器是双目视觉传感器,且双目获得的图像都用,那么残差r可以写成如下公式2。
Figure PCTCN2019073147-appb-000019
由公式(2)和公式(1)对比可以看出,双目相比单目需要加入左右目的旋转状态量ΔR lr以及位移状态量
Figure PCTCN2019073147-appb-000020
此时p-p f是在右目上的观测,所以还需要多做一次KLT,即左右目的立体匹配(stereo match)。
当VIO算法输入多个视觉传感器获得的图像时,其残差R可以如下公式(3)所示。
Figure PCTCN2019073147-appb-000021
需要说明的是,公式(3)中以视觉传感器的个数为5为例,r 1、r 2、r 3、r 4、r 5分别表示VIO算法中对于5个视觉传感器获得图像的分别的残差,具体可以通过如上公式(1)或公式(2)表示。
以所述第一算法为VIO算法,对于目标方向包括方向1、方向2、方向3、方向4和方向5,且各目标方向的视觉传感器的个数为1为例,上述对于至少一个目标方向中各目标方向的视觉传感器获取到的图像,基于最小化第一算法残差的方式,确定所述可移动平台的位姿信息,具体可以包括:基于最小化公式(3)所示的残差的方式,确定可移动平台的位姿信息。
具体的,基于最小化公式(3)所示的残差的方式,可以得到上述五个变量的值,进一步的,可以将该五个变量的值与观测值结合之后,得到最终的位姿信息。
基于最终的位置,再进一步的,可以得到相机的位姿。
以下,以第二算法为VO算法,且VO算法中使用透视n点(PnP,Perspective-n-Point)算法得到相机位姿为例,对于VO算法残差进行如下说明:
PnP算法是通过一系列世界坐标系(World Coordinates)的三维点以及图像中对应的像素坐标系(Pixel Coordinates)二维点,估算相机姿态。
Figure PCTCN2019073147-appb-000022
其中,
Figure PCTCN2019073147-appb-000023
表示Pixel Coordinates中的2D点;
Figure PCTCN2019073147-appb-000024
表示Camera Coordinates中的三维点;
Figure PCTCN2019073147-appb-000025
表示World Coordinates中的三维点;
α x=fm x,α y=fm y,f为焦距(focal length),m x为x方向上,单位距离的像素数(scale factors),m y为y方向上,单位距离的像素数。γ为x、y轴之间的畸变参数(skew parameters)。u 0,v 0为光心位置(principal point)。
这里,矩阵R、T就是我们要求的。其中,R表示旋转矩阵(Rotation Matrix),T平移向量(Translation Vector),[R|T]表示的是相机(Camera)与世界坐标系(World Coordinates)中三维点的旋转、位移关系。
假设,C 1为一个相机在时刻1的相机位姿,C 2为该相机在时刻2的相机位姿,C 1下估计的旋转矩阵为R 1,平移向量为T 1,C 1下获取图像中与C 2下获取图像匹配的二维点为p 1,C 1下获取图像中与C 2下获取图像匹配的三维点为P 1,C 2对应的旋转矩阵为R 2,平移向量为T 2,C 2下获取图像中与C 1下获取图像匹配的二维点为p 2,C 2下获取图像中与C 1下获取图像匹配的三维点为P 2,以世界坐标系为基准C 2到C 1的旋转矩阵为R 12,以C1为基准C 2到C 1的平移向量为
Figure PCTCN2019073147-appb-000026
则:
将P 1、p 1和p 2输入至PnP算法,可以得到R 12
Figure PCTCN2019073147-appb-000027
进一步的,将
Figure PCTCN2019073147-appb-000028
转换到以IMU为基准,可以得到
Figure PCTCN2019073147-appb-000029
需要说明的是,R 1、R 2、P 1和P 2可以表示名义值(nominal)。
R 1对应的真值(true)R t1与R 1的关系满足:R t1=R 1(I+[Δθ 1] x)=R 1ΔR 1,其中,I为单位矩阵,x表示叉乘运算。
P 1对应的真值(true)P t1与P 1的关系满足:P t1=P 1+ΔP 1
R 2对应的真值(true)R t2与R 2的关系满足:R t2=R 2(I+[Δθ 2] x)=R 2ΔR 2,其中,I为单位矩阵,x表示叉乘运算。
P 2对应的真值(true)P t2与P 2的关系满足:P t2=P 2+ΔP 2
则,R 12=(R t1) TR t2=[R 1(I+[Δθ 1] x)] T[R 2(I+[Δθ 2] x)]
Figure PCTCN2019073147-appb-000030
整理之后,得到如下公式(4)
Figure PCTCN2019073147-appb-000031
可选的,上述对于所述至少一个目标方向中的部分方向的视觉传感器获取到的图像采用第一算法,对于所述至少一个目标方向中其他方向的视觉传感器获取到的图像采用第二算法,确定所述可移动平台的位姿信息,具体可 以包括:
对于所述部分方向的视觉传感器获取到的图像,基于最小化第一算法残差的方式,并且对于所述其他方向的视觉传感器获取到的图像,基于最小化第二算法残差的方式,确定所述可移动平台的位姿信息。
以所述第一算法为VIO算法、所述第二算法为VO算法,对于方向1和方向2的视觉传感器获取到的图像采用第一算法,对于方向3和方向4的视觉传感器采用第二算法,确定可移动平台的位姿信息,每个方向视觉传感器的个数均为1个为例,上述对于所述至少一个目标方向中的部分方向的视觉传感器获取到的图像采用第一算法,对于所述至少一个目标方向中其他方向的视觉传感器获取到的图像采用第二算法,确定所述可移动平台的位姿信息,具体可以包括:采用基于如下公式(5)所示残差r的方式,确定可移动平台的位姿信息。
Figure PCTCN2019073147-appb-000032
其中,r 1表示VIO算法中对于方向1视觉传感器双目获得图像的残差,具体残差计算方式可以参见公式(2)或公式(3);r 2表示VIO算法中对于方向2视觉传感器双目获得图像的残差,具体残差计算方式可以参见公式(2)或公式(3);r 3表示VO算法中对于方向3视觉传感器双目获得图像的残差,具体残差计算方式可以参见公式(4);r 4表示VO算法中对于方向4视觉传感器单目获得图像的残差,具体残差计算方式可以参见公式(4)。
具体的,基于最小化公式(5)所示的残差的方式,可以得到上述状态量的值,进一步的,可以将得到的上述状态量的值与观测值结合之后,得到最终的位姿信息。可选的,状态量具体可以包括:ΔR ic
Figure PCTCN2019073147-appb-000033
ΔR wi、ΔP i w、ΔP、Δθ 1和ΔP 2
以将处理器的负载通过两个负载阈值分为三个等级,且特定功能为侧向避障功能,两个阈值分别为60%和80%,可移动平台包括前方、后方、下方、左侧和右侧5个方向的视觉传感器,且前方、后方和下方的视觉传感器均为双目视觉传感器,左侧和右侧的视觉传感器为单目视觉传感器为例,上述根 据处理器的负载信息,确定可移动平台的所有方向的视觉传感器中至少一个目标方向的视觉传感器,根据至少一个目标方向中各目标方向的视觉传感器获取到的图像,采用第一算法,确定可移动平台的位姿信息具体可以包括:
情况1、在处理器的负载低,例如小于60%时,根据前方、后方、下方、左侧和右侧5个方向的视觉传感器获得的图像,采用VIO算法,确定可移动平台的位姿信息,且对于前方、后方和下方的视觉传感器均使用双目获得的图像。
具体的,可以基于最小化VIO算法残差的方式,确定可移动平台的位姿信息。这里,VIO算法残差r可以如下公式(6)所示。
Figure PCTCN2019073147-appb-000034
其中,s表示双目(stereo),m表示单目(monocular);r down,s表示VIO算法中对于下方视觉传感器双目获得图像的残差,具体残差计算方式可以参见公式(2);r front,s表示VIO算法中对于前方视觉传感器双目获得图像的残差,具体残差计算方式可以参见公式(2);r rear,s表示VIO算法中对于后方视觉传感器双目获得图像的残差,具体残差计算方式可以参见公式(2);r left,m表示VIO算法中对于左方视觉传感器单目获得图像的残差,具体残差计算方式可以参见公式(1);r right,m表示VIO算法中对于右方视觉传感器单目获得图像的残差,具体残差计算方式可以参见公式(1)。
情况2、在处理器的负载中等,例如60%~80%,且侧向避障功能开启时,对于下方、左方和右方的视觉传感器获取到的图像采用第一算法,对于前方和后方的视觉传感器获取到的图像采用第二算法,确定所述可移动平台的位姿信息,且对于前方、后方和下方的视觉传感器均使用双目获得的图像。
具体的,可以基于最小化VIO算法和VO算法残差的方式,确定可移动平台的位姿信息。这里,VIO算法和VO算法残差r可以如下公式(7)所示。
Figure PCTCN2019073147-appb-000035
其中,s表示双目,m表示单目;r down,s表示VIO算法中对于下方视觉传感器双目获得图像的残差,具体残差计算方式可以参见公式(2);r front,PnP表示VO算法中对于前方视觉传感器双目获得图像的残差,具体残差计算方式可以参见公式(4);r rear,PnP表示VO算法中对于后方视觉传感器双目获得图像的残差,具体残差计算方式可以参见公式(4);r left,m表示VIO算法中对于左方视觉传感器单目获得图像的残差,具体残差计算方式可以参见公式(1);r right,m表示VIO算法中对于右方视觉传感器单目获得图像的残差,具体残差计算方式可以参见公式(1)。
情况3、在处理器的负载中等,例如60%~80%,且侧向避障功能关闭时,根据前方、后方和下方3个方向的视觉传感器获得的图像,采用VIO算法,确定可移动平台的位姿信息,且对于前方、后方和下方的视觉传感器均使用双目获得的图像。
具体的,可以基于最小化VIO算法残差的方式,确定可移动平台的位姿信息。这里,VIO算法残差r可以如下公式(8)所示。
Figure PCTCN2019073147-appb-000036
其中,s表示双目(stereo),m表示单目(monocular);r down,s表示VIO算法中对于下方视觉传感器双目获得图像的残差,具体残差计算方式可以参见公式(2);r front,s表示VIO算法中对于前方视觉传感器双目获得图像的残差,具体残差计算方式可以参见公式(2);r rear,s表示VIO算法中对于后方视觉传感器双目获得图像的残差,具体残差计算方式可以参见公式(2)。
情况4、在处理器的负载高,例如大于80%,且侧向避障功能开启时,根据下方、左方和右方3个方向的视觉传感器获得的图像,采用VIO算法,确定可移动平台的位姿信息,且对于下方的视觉传感器使用双目获得的图像。
具体的,可以基于最小化VIO算法残差的方式,确定可移动平台的位姿 信息。这里,VIO算法残差r可以如下公式(9)所示。
Figure PCTCN2019073147-appb-000037
其中,s表示双目,m表示单目;r down,s表示VIO算法中对于下方视觉传感器双目获得图像的残差,具体残差计算方式可以参见公式(2);r left,m表示VIO算法中对于左方视觉传感器单目获得图像的残差,具体残差计算方式可以参见公式(1);r right,m表示VIO算法中对于右方视觉传感器单目获得图像的残差,具体残差计算方式可以参见公式(1)。
情况5、在处理器的负载高,例如大于80%,且侧向避障功能关闭时,根据从前、后、左、右4个方向中选出的2个方向以及下方3个方向的视觉传感器获得的图像,采用VIO算法,确定可移动平台的位姿信息,且对于下方的视觉传感器使用双目获得的图像,选出的两个方向的视觉传感器均使用单目获得的图像。
具体的,可以基于最小化VIO算法残差的方式,确定可移动平台的位姿信息。这里,VIO算法残差r可以如下公式(10)所示。
Figure PCTCN2019073147-appb-000038
其中,s表示双目,m表示单目;r down,s表示VIO算法中对于下方视觉传感器双目获得图像的残差,具体残差计算方式可以参见公式(2);r 1,m表示VIO算法中对于选出的2个方向中一个方向的视觉传感器单目获得图像的残差,具体残差计算方式可以参见公式(1);r 2,m表示VIO算法中对于选出的2个方向中另一个方向的视觉传感器单目获得图像的残差,具体残差计算方式可以参见公式(1)。
本发明实施例中还提供了一种计算机可读存储介质,该计算机可读存储介质中存储有程序指令,所述程序执行时可包括如上述各方法实施例中的视觉定位方法的部分或全部步骤。
本发明实施例提供一种计算机程序,当所述计算机程序被计算机执行时,用于实现上述任一方法实施例中的视觉定位方法。
图6本发明一实施例提供的视觉定位装置的结构示意图,如图6所示, 本实施例的视觉定位装置600可以包括:存储器601和处理器602;上述存储器601和处理器602可以通过总线连接。存储器601可以包括只读存储器和随机存取存储器,并向处理器602提供指令和数据。存储器601的一部分还可以包括非易失性随机存取存储器。
所述存储器601,用于存储程序代码。
所述处理器602,调用所述程序代码,当程序代码被执行时,用于执行以下操作:
获取处理器602当前的负载信息;
根据所述负载信息,确定可移动平台的所有方向的视觉传感器中至少一个目标方向的视觉传感器;
根据所述至少一个目标方向中各目标方向的视觉传感器获取到的图像,采用第一算法,确定所述可移动平台的位姿信息。
在一种可能的实现中,所述处理器602用于根据所述负载信息,确定可移动平台的所有方向的视觉传感器中至少一个目标方向的视觉传感器,具体包括:
根据所述处理器602的负载信息,判断所述处理器602的负载是否小于或等于第一负载阈值;
若所述处理器602的负载小于或等于所述第一负载阈值,则所述目标方向为所述所有方向的全部方向。
在一种可能的实现中,所述处理器602用于根据所述负载信息,确定可移动平台的所有方向的视觉传感器中至少一个目标方向的视觉传感器,具体包括:
根据所述处理器602的负载信息,判断所述处理器602的负载是否小于或等于第一负载阈值;
若所述处理器602的负载大于所述第一负载阈值,则所述目标方向为所述所有方向的全部方向;
所述至少一个目标方向的数量为多个;
所述处理器602用于根据所述至少一个目标方向视觉传感器中各目标方向的视觉传感器获取到的图像,采用第一算法,确定所述可移动平台的位姿信息,具体包括:
对于所述至少一个目标方向中的部分方向的视觉传感器获取到的图像采用第一算法,对于所述至少一个目标方向中其他方向的视觉传感器获取到的图像采用第二算法,确定所述可移动平台的位姿信息,所述第二算法的算法复杂度小于所述第一算法。
在一种可能的实现中,所述处理器602用于根据所述负载信息,确定可移动平台的所有方向的视觉传感器中至少一个目标方向的视觉传感器,具体包括:
根据所述处理器602的负载信息,判断所述处理器602的负载是否小于或等于第一负载阈值;
若所述处理器602的负载大于所述第一负载阈值,则所述目标方向为所述所有方向的全部方向;
所述至少一个目标方向中第一方向的视觉传感器为双目视觉传感器;
所述处理器602用于根据所述至少一个目标方向中各目标方向的视觉传感器获取到的图像,采用第一算法,确定所述可移动平台的位姿信息,具体包括:
根据所述第一方向的双目视觉传感器中单目获得的图像,以及所述至少一个目标方向中其他方向的视觉传感器获取到的图像,采用第一算法,确定所述可移动平台的位姿信息。
在一种可能的实现中,所述处理器602用于若所述处理器602的负载大于所述第一负载阈值,则所述目标方向为所述所有方向的全部方向,具体包括:
若所述处理器602的负载大于所述第一负载阈值,则判断所述处理器602的负载是否小于或等于第二负载阈值;所述第二负载阈值大于所述第一负载阈值;
若所述处理器602的负载小于或等于所述第二负载阈值,则所述目标方向为所述所有方向的全部方向。
在一种可能的实现中,所述处理器602还用于:
若所述处理器602的负载大于所述第二负载阈值,则所述目标方向为所述所有方向的部分方向。
在一种可能的实现中,所述处理器602用于根据处理器602的负载信息, 确定可移动平台的所有方向的视觉传感器中至少一个目标方向的视觉传感器,具体包括:
根据所述处理器602的负载信息,判断所述处理器602的负载是否小于或等于第一负载阈值;
若所述处理器602的负载大于所述第一负载阈值,则所述目标方向为所述所有方向的部分方向。
在一种可能的实现中,所述处理器602用于根据所述至少一个目标方向视觉传感器中各目标方向的视觉传感器获取到的图像,采用第一算法,确定所述可移动平台的位姿信息,具体包括:
判断所述处理器602的负载是否大于第三负载阈值;所述第三负载阈值大于所述第一负载阈值;
若所述处理器602的负载大于所述第三负载阈值,则对于所述至少一个目标方向中的部分方向的视觉传感器获取到的图像采用第一算法,对于所述至少一个目标方向中其他方向的视觉传感器获取到的图像采用第二算法,确定所述可移动平台的位姿信息;所述第二算法的算法复杂度小于所述第一算法
其中,所述至少一个目标方向的数量为多个。
在一种可能的实现中,所述至少一个目标方向的视觉传感器包括:用于实现特定功能的第二方向的视觉传感器,且所述特定功能开启。
在一种可能的实现中,所述第二方向的视觉传感器获取到的图像采用第一算法。
在一种可能的实现中,所述处理器602用于根据所述至少一个目标方向视觉传感器中各目标方向的视觉传感器获取到的图像,采用第一算法,确定所述可移动平台的位姿信息,具体包括:
判断所述处理器602的负载是否大于第三负载阈值;所述第三负载阈值大于所述第一负载阈值;
若所述处理器602的负载大于所述第三负载阈值,则根据第一方向的双目视觉传感器中单目获得的图像,以及所述至少一个目标方向中其他方向的视觉传感器获取到的图像,采用第一算法,确定所述可移动平台的位姿信息;
所述至少一个目标方向中所述第一方向的视觉传感器为双目视觉传感器。
在一种可能的实现中,所述至少一个目标方向的视觉传感器包括:用于实现特定功能的第二方向的视觉传感器,且所述特定功能开启。
在一种可能的实现中,所述第二方向和所述第一方向为不同方向。
在一种可能的实现中,所述特定功能为侧向避障功能,所述第二方向为所述可移动平台的侧向。
在一种可能的实现中,所述处理器602用于对于所述至少一个目标方向中的部分方向的视觉传感器获取到的图像采用第一算法,对于所述至少一个目标方向中其他方向的视觉传感器获取到的图像采用第二算法,确定所述可移动平台的位姿信息,具体包括:
对于所述部分方向的视觉传感器获取到的图像,基于最小化第一算法残差的方式,并且对于所述其他方向的视觉传感器获取到的图像,基于最小化第二算法残差的方式,确定所述可移动平台的位姿信息。
在一种可能的实现中,所述部分方向包括第三方向。
在一种可能的实现中,所述第三方向为所述可移动平台的下方。
在一种可能的实现中,所述处理器602还用于:从多个方向中选择至少一个第四方向作为所述目标方向。
在一种可能的实现中,所述处理器602用于从多个方向中选择至少一个第四方向作为所述目标方向,具体包括:
根据所述多个方向中,各方向的特征点的平均深度以及匹配成功的特征点数目,从所述多个方向中选择至少一个第四方向作为所述目标方向。
在一种可能的实现中,所述第四方向匹配成功的特征点数目与所述第四方向的特征点的平均深度的比值,大于所述多个方向中其他方向匹配成功的特征点数目与所述其他方向的特征点的平均深度的比值。
在一种可能的实现中,所述处理器602还用于:
判断所述目标方向中是否存在匹配成功的特征点数目与所述第四方向的特征点的平均深度的比值小于或等于比值阈值的第四方向;
若所述目标方向中存在匹配成功的特征点数目与所述第四方向的特征点的平均深度的比值小于或等于比值阈值的第四方向,则将所述第四方向从所述目标方向中去除,并触发执行所述从多个方向中选择至少一个第四方向作为所述目标方向的步骤。
在一种可能的实现中,所述第一算法为视觉惯性里程计VIO算法。
在一种可能的实现中,所述第一算法为视觉惯性里程计VIO算法,所述第二算法为视觉里程计VO算法。
在一种可能的实现中,所述可移动平台为无人机。
本实施例提供的视觉定位装置,可以用于执行本发明上述方法实施例的技术方案,其实现原理和技术效果类似,此处不再赘述。
图7为本发明一实施例提供的视觉定位系统的结构示意图,如图7所示,本实施例的视觉定位系统700包括:视觉传感器701以及视觉定位装置702。其中,视觉定位装置702可以采用图6所示实施例的结构,其相应地,可以执行上述各方法实施例的技术方案,其实现原理和技术效果类似,此处不再赘述。
本领域普通技术人员可以理解:实现上述各方法实施例的全部或部分步骤可以通过程序指令相关的硬件来完成。前述的程序可以存储于一计算机可读取存储介质中。该程序在执行时,执行包括上述各方法实施例的步骤;而前述的存储介质包括:ROM、RAM、磁碟或者光盘等各种可以存储程序代码的介质。
最后应说明的是:以上各实施例仅用以说明本发明的技术方案,而非对其限制;尽管参照前述各实施例对本发明进行了详细的说明,本领域的普通技术人员应当理解:其依然可以对前述各实施例所记载的技术方案进行修改,或者对其中部分或者全部技术特征进行等同替换;而这些修改或者替换,并不使相应技术方案的本质脱离本发明各实施例技术方案的范围。

Claims (51)

  1. 一种视觉定位方法,应用于可移动平台,其特征在于,包括:
    获取处理器当前的负载信息;
    根据所述负载信息,确定所述可移动平台的所有方向的视觉传感器中至少一个目标方向的视觉传感器;
    根据所述至少一个目标方向中各目标方向的视觉传感器获取到的图像,采用第一算法,确定所述可移动平台的位姿信息。
  2. 根据权利要求1所述的方法,其特征在于,所述根据所述负载信息,确定可移动平台的所有方向的视觉传感器中至少一个目标方向的视觉传感器,包括:
    根据所述负载信息,判断所述处理器的负载是否小于或等于第一负载阈值;
    若所述处理器的负载小于或等于所述第一负载阈值,则所述目标方向为所述所有方向的全部方向。
  3. 根据权利要求1所述的方法,其特征在于,所述根据所述负载信息,确定可移动平台的所有方向的视觉传感器中至少一个目标方向的视觉传感器,包括:
    根据所述负载信息,判断所述处理器的负载是否小于或等于第一负载阈值;
    若所述处理器的负载大于所述第一负载阈值,则所述目标方向为所述所有方向的全部方向;
    所述至少一个目标方向的数量为多个;
    所述根据所述至少一个目标方向视觉传感器中各目标方向的视觉传感器获取到的图像,采用第一算法,确定所述可移动平台的位姿信息,包括:
    对于所述至少一个目标方向中的部分方向的视觉传感器获取到的图像采用第一算法,对于所述至少一个目标方向中其他方向的视觉传感器获取到的图像采用第二算法,确定所述可移动平台的位姿信息,所述第二算法的算法复杂度小于所述第一算法。
  4. 根据权利要求1所述的方法,其特征在于,所述根据所述负载信息,确定可移动平台的所有方向的视觉传感器中至少一个目标方向的视觉传感器, 包括:
    根据所述负载信息,判断所述处理器的负载是否小于或等于第一负载阈值;
    若所述处理器的负载大于所述第一负载阈值,则所述目标方向为所述所有方向的全部方向;
    所述至少一个目标方向中第一方向的视觉传感器为双目视觉传感器;
    所述根据所述至少一个目标方向中各目标方向的视觉传感器获取到的图像,采用第一算法,确定所述可移动平台的位姿信息,包括:
    根据所述第一方向的双目视觉传感器中单目获得的图像,以及所述至少一个目标方向中其他方向的视觉传感器获取到的图像,采用第一算法,确定所述可移动平台的位姿信息。
  5. 根据权利要求3或4所述的方法,其特征在于,所述若所述处理器的负载大于所述第一负载阈值,则所述目标方向为所述所有方向的全部方向,包括:
    若所述处理器的负载大于所述第一负载阈值,则判断所述处理器的负载是否小于或等于第二负载阈值;所述第二负载阈值大于所述第一负载阈值;
    若所述处理器的负载小于或等于所述第二负载阈值,则所述目标方向为所述所有方向的全部方向。
  6. 根据权利要求5所述的方法,其特征在于,所述方法还包括:
    若所述处理器的负载大于所述第二负载阈值,则所述目标方向为所述所有方向的部分方向。
  7. 根据权利要求1所述的方法,其特征在于,所述根据处理器的负载信息,确定可移动平台的所有方向的视觉传感器中至少一个目标方向的视觉传感器,包括:
    根据所述处理器的负载信息,判断所述处理器的负载是否小于或等于第一负载阈值;
    若所述处理器的负载大于所述第一负载阈值,则所述目标方向为所述所有方向的部分方向。
  8. 根据权利要求6或7所述的方法,其特征在于,所述根据所述至少一个目标方向视觉传感器中各目标方向的视觉传感器获取到的图像,采用第一 算法,确定所述可移动平台的位姿信息,包括:
    判断所述处理器的负载是否大于第三负载阈值;所述第三负载阈值大于所述第一负载阈值;
    若所述处理器的负载大于所述第三负载阈值,则对于所述至少一个目标方向中的部分方向的视觉传感器获取到的图像采用第一算法,对于所述至少一个目标方向中其他方向的视觉传感器获取到的图像采用第二算法,确定所述可移动平台的位姿信息;所述第二算法的算法复杂度小于所述第一算法
    其中,所述至少一个目标方向的数量为多个。
  9. 根据权利要求3或8所述的方法,其特征在于,所述至少一个目标方向的视觉传感器包括:用于实现特定功能的第二方向的视觉传感器,且所述特定功能开启。
  10. 根据权利要求9所述的方法,其特征在于,所述第二方向的视觉传感器获取到的图像采用第一算法。
  11. 根据权利要求6或7所述的方法,其特征在于,所述根据所述至少一个目标方向视觉传感器中各目标方向的视觉传感器获取到的图像,采用第一算法,确定所述可移动平台的位姿信息,包括:
    判断所述处理器的负载是否大于第三负载阈值;所述第三负载阈值大于所述第一负载阈值;
    若所述处理器的负载大于所述第三负载阈值,则根据第一方向的双目视觉传感器中单目获得的图像,以及所述至少一个目标方向中其他方向的视觉传感器获取到的图像,采用第一算法,确定所述可移动平台的位姿信息;
    所述至少一个目标方向中所述第一方向的视觉传感器为双目视觉传感器。
  12. 根据权利要求4或11所述的方法,其特征在于,所述至少一个目标方向的视觉传感器包括:用于实现特定功能的第二方向的视觉传感器,且所述特定功能开启。
  13. 根据权利要求12所述的方法,其特征在于,所述第二方向和所述第一方向为不同方向。
  14. 根据权利要求9、10、12、13任一项所述的方法,其特征在于,所述特定功能为侧向避障功能,所述第二方向为所述可移动平台的侧向。
  15. 根据权利要求3或8所述的方法,其特征在于,所述对于所述至少 一个目标方向中的部分方向的视觉传感器获取到的图像采用第一算法,对于所述至少一个目标方向中其他方向的视觉传感器获取到的图像采用第二算法,确定所述可移动平台的位姿信息,包括:
    对于所述部分方向的视觉传感器获取到的图像,基于最小化第一算法残差的方式,并且对于所述其他方向的视觉传感器获取到的图像,基于最小化第二算法残差的方式,确定所述可移动平台的位姿信息。
  16. 根据权利要求6-8、11任一项所述的方法,其特征在于,所述部分方向包括第三方向。
  17. 根据权利要求16所述的方法,其特征在于,所述第三方向为所述可移动平台的下方。
  18. 根据权利要求6-8、11、16-17任一项所述的方法,其特征在于,所述方法还包括:从多个方向中选择至少一个第四方向作为所述目标方向。
  19. 根据权利要求18所述的方法,其特征在于,所述从多个方向中选择至少一个第四方向作为所述目标方向,包括:
    根据所述多个方向中,各方向的特征点的平均深度以及匹配成功的特征点数目,从所述多个方向中选择至少一个第四方向作为所述目标方向。
  20. 根据权利要求19所述的方法,其特征在于,第四方向匹配成功的特征点数目与所述第四方向的特征点的平均深度的比值,大于所述多个方向中其他方向匹配成功的特征点数目与所述其他方向的特征点的平均深度的比值。
  21. 根据权利要求20所述的方法,其特征在于,所述从多个方向中选择至少一个第四方向作为所述目标方向之前,还包括:
    判断所述目标方向中是否存在匹配成功的特征点数目与所述第四方向的特征点的平均深度的比值小于或等于比值阈值的第四方向;
    若所述目标方向中存在匹配成功的特征点数目与所述第四方向的特征点的平均深度的比值小于或等于比值阈值的第四方向,则将所述第四方向从所述目标方向中去除,并触发执行所述从多个方向中选择至少一个第四方向作为所述目标方向的步骤。
  22. 根据权利要求1-21任一项所述的方法,其特征在于,所述第一算法为视觉惯性里程计VIO算法。
  23. 根据权利要求3、8、15任一项所述的方法,其特征在于,所述第一 算法为视觉惯性里程计VIO算法,所述第二算法为视觉里程计VO算法。
  24. 根据权利要求1-23任一项所述的方法,其特征在于,所述可移动平台为无人机。
  25. 一种视觉定位装置,其特征在于,包括:处理器和存储器;
    所述存储器,用于存储程序代码;
    所述处理器,调用所述程序代码,当程序代码被执行时,用于执行以下操作:
    获取处理器当前的负载信息;
    根据所述负载信息,确定可移动平台的所有方向的视觉传感器中至少一个目标方向的视觉传感器;
    根据所述至少一个目标方向中各目标方向的视觉传感器获取到的图像,采用第一算法,确定所述可移动平台的位姿信息。
  26. 根据权利要求25所述的装置,其特征在于,所述处理器用于根据所述负载信息,确定可移动平台的所有方向的视觉传感器中至少一个目标方向的视觉传感器,具体包括:
    根据所述负载信息,判断所述处理器的负载是否小于或等于第一负载阈值;
    若所述处理器的负载小于或等于所述第一负载阈值,则所述目标方向为所述所有方向的全部方向。
  27. 根据权利要求25所述的装置,其特征在于,所述处理器用于根据所述负载信息,确定可移动平台的所有方向的视觉传感器中至少一个目标方向的视觉传感器,具体包括:
    根据所述负载信息,判断所述处理器的负载是否小于或等于第一负载阈值;
    若所述处理器的负载大于所述第一负载阈值,则所述目标方向为所述所有方向的全部方向;
    所述至少一个目标方向的数量为多个;
    所述处理器用于根据所述至少一个目标方向视觉传感器中各目标方向的视觉传感器获取到的图像,采用第一算法,确定所述可移动平台的位姿信息,具体包括:
    对于所述至少一个目标方向中的部分方向的视觉传感器获取到的图像采用第一算法,对于所述至少一个目标方向中其他方向的视觉传感器获取到的图像采用第二算法,确定所述可移动平台的位姿信息,所述第二算法的算法复杂度小于所述第一算法。
  28. 根据权利要求25所述的装置,其特征在于,所述处理器用于根据所述负载信息,确定可移动平台的所有方向的视觉传感器中至少一个目标方向的视觉传感器,具体包括:
    根据所述负载信息,判断所述处理器的负载是否小于或等于第一负载阈值;
    若所述处理器的负载大于所述第一负载阈值,则所述目标方向为所述所有方向的全部方向;
    所述至少一个目标方向中第一方向的视觉传感器为双目视觉传感器;
    所述处理器用于根据所述至少一个目标方向中各目标方向的视觉传感器获取到的图像,采用第一算法,确定所述可移动平台的位姿信息,具体包括:
    根据所述第一方向的双目视觉传感器中单目获得的图像,以及所述至少一个目标方向中其他方向的视觉传感器获取到的图像,采用第一算法,确定所述可移动平台的位姿信息。
  29. 根据权利要求27或28所述的装置,其特征在于,所述处理器用于若所述处理器的负载大于所述第一负载阈值,则所述目标方向为所述所有方向的全部方向,具体包括:
    若所述处理器的负载大于所述第一负载阈值,则判断所述处理器的负载是否小于或等于第二负载阈值;所述第二负载阈值大于所述第一负载阈值;
    若所述处理器的负载小于或等于所述第二负载阈值,则所述目标方向为所述所有方向的全部方向。
  30. 根据权利要求29所述的装置,其特征在于,所述处理器还用于:
    若所述处理器的负载大于所述第二负载阈值,则所述目标方向为所述所有方向的部分方向。
  31. 根据权利要求25所述的装置,其特征在于,所述处理器用于根据所述负载信息,确定可移动平台的所有方向的视觉传感器中至少一个目标方向的视觉传感器,具体包括:
    根据所述负载信息,判断所述处理器的负载是否小于或等于第一负载阈值;
    若所述处理器的负载大于所述第一负载阈值,则所述目标方向为所述所有方向的部分方向。
  32. 根据权利要求30或31所述的装置,其特征在于,所述处理器用于根据所述至少一个目标方向视觉传感器中各目标方向的视觉传感器获取到的图像,采用第一算法,确定所述可移动平台的位姿信息,具体包括:
    判断所述处理器的负载是否大于第三负载阈值;所述第三负载阈值大于所述第一负载阈值;
    若所述处理器的负载大于所述第三负载阈值,则对于所述至少一个目标方向中的部分方向的视觉传感器获取到的图像采用第一算法,对于所述至少一个目标方向中其他方向的视觉传感器获取到的图像采用第二算法,确定所述可移动平台的位姿信息;所述第二算法的算法复杂度小于所述第一算法
    其中,所述至少一个目标方向的数量为多个。
  33. 根据权利要求27或32所述的装置,其特征在于,所述至少一个目标方向的视觉传感器包括:用于实现特定功能的第二方向的视觉传感器,且所述特定功能开启。
  34. 根据权利要求33所述的装置,其特征在于,所述第二方向的视觉传感器获取到的图像采用第一算法。
  35. 根据权利要求30或31所述的装置,其特征在于,所述处理器用于根据所述至少一个目标方向视觉传感器中各目标方向的视觉传感器获取到的图像,采用第一算法,确定所述可移动平台的位姿信息,具体包括:
    判断所述处理器的负载是否大于第三负载阈值;所述第三负载阈值大于所述第一负载阈值;
    若所述处理器的负载大于所述第三负载阈值,则根据第一方向的双目视觉传感器中单目获得的图像,以及所述至少一个目标方向中其他方向的视觉传感器获取到的图像,采用第一算法,确定所述可移动平台的位姿信息;
    所述至少一个目标方向中所述第一方向的视觉传感器为双目视觉传感器。
  36. 根据权利要求28或35所述的装置,其特征在于,所述至少一个目标方向的视觉传感器包括:用于实现特定功能的第二方向的视觉传感器,且 所述特定功能开启。
  37. 根据权利要求36所述的装置,其特征在于,所述第二方向和所述第一方向为不同方向。
  38. 根据权利要求33、34、36、37任一项所述的装置,其特征在于,所述特定功能为侧向避障功能,所述第二方向为所述可移动平台的侧向。
  39. 根据权利要求27或32所述的装置,其特征在于,所述处理器用于对于所述至少一个目标方向中的部分方向的视觉传感器获取到的图像采用第一算法,对于所述至少一个目标方向中其他方向的视觉传感器获取到的图像采用第二算法,确定所述可移动平台的位姿信息,具体包括:
    对于所述部分方向的视觉传感器获取到的图像,基于最小化第一算法残差的方式,并且对于所述其他方向的视觉传感器获取到的图像,基于最小化第二算法残差的方式,确定所述可移动平台的位姿信息。
  40. 根据权利要求30-32、35任一项所述的装置,其特征在于,所述部分方向包括第三方向。
  41. 根据权利要求40所述的装置,其特征在于,所述第三方向为所述可移动平台的下方。
  42. 根据权利要求30-32、35、40-41任一项所述的装置,其特征在于,所述处理器还用于:从多个方向中选择至少一个第四方向作为所述目标方向。
  43. 根据权利要求42所述的装置,其特征在于,所述处理器用于从多个方向中选择至少一个第四方向作为所述目标方向,具体包括:
    根据所述多个方向中,各方向的特征点的平均深度以及匹配成功的特征点数目,从所述多个方向中选择至少一个第四方向作为所述目标方向。
  44. 根据权利要求43所述的装置,其特征在于,所述第四方向匹配成功的特征点数目与所述第四方向的特征点的平均深度的比值,大于所述多个方向中其他方向匹配成功的特征点数目与所述其他方向的特征点的平均深度的比值。
  45. 根据权利要求44所述的装置,其特征在于,所述处理器还用于:
    判断所述目标方向中是否存在匹配成功的特征点数目与所述第四方向的特征点的平均深度的比值小于或等于比值阈值的第四方向;
    若所述目标方向中存在匹配成功的特征点数目与所述第四方向的特征点 的平均深度的比值小于或等于比值阈值的第四方向,则将所述第四方向从所述目标方向中去除,并触发执行所述从多个方向中选择至少一个第四方向作为所述目标方向的步骤。
  46. 根据权利要求25-45任一项所述的装置,其特征在于,所述第一算法为视觉惯性里程计VIO算法。
  47. 根据权利要求27、32、39任一项所述的装置,其特征在于,所述第一算法为视觉惯性里程计VIO算法,所述第二算法为视觉里程计VO算法。
  48. 根据权利要求25-47任一项所述的装置,其特征在于,所述可移动平台为无人机。
  49. 一种视觉定位系统,其特征在于,包括:视觉传感器以及权利要求25-48任一项所述的视觉定位装置。
  50. 一种计算机可读存储介质,其特征在于,所述计算机可读存储介质存储有计算机程序,所述计算机程序包含至少一段代码,所述至少一段代码可由计算机执行,以控制所述计算机执行如权利要求1-24任一项所述的视觉定位方法。
  51. 一种计算机程序,其特征在于,当所述计算机程序被计算机执行时,用于实现如权利要求1-24任一项所述的视觉定位方法。
PCT/CN2019/073147 2019-01-25 2019-01-25 视觉定位方法、装置及系统 Ceased WO2020150996A1 (zh)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN201980005639.XA CN111356903A (zh) 2019-01-25 2019-01-25 视觉定位方法、装置及系统
PCT/CN2019/073147 WO2020150996A1 (zh) 2019-01-25 2019-01-25 视觉定位方法、装置及系统

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
PCT/CN2019/073147 WO2020150996A1 (zh) 2019-01-25 2019-01-25 视觉定位方法、装置及系统

Publications (1)

Publication Number Publication Date
WO2020150996A1 true WO2020150996A1 (zh) 2020-07-30

Family

ID=71196660

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2019/073147 Ceased WO2020150996A1 (zh) 2019-01-25 2019-01-25 视觉定位方法、装置及系统

Country Status (2)

Country Link
CN (1) CN111356903A (zh)
WO (1) WO2020150996A1 (zh)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112050814A (zh) * 2020-08-28 2020-12-08 国网智能科技股份有限公司 一种室内变电站无人机视觉导航系统及方法

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20060085130A1 (en) * 2004-10-18 2006-04-20 Trex Enterprises Corporation Daytime stellar imager for attitude determination
CN101954191A (zh) * 2010-08-25 2011-01-26 颜小洋 一种智能娱乐移动机器人
CN202869645U (zh) * 2012-10-15 2013-04-10 杭州市特种设备检测院 基于Android平台手机的便携式振动测量仪
CN203069788U (zh) * 2012-12-10 2013-07-17 中山大学 浮式及半潜式移动平台方位及三维姿态监测显示系统
CN103292807A (zh) * 2012-03-02 2013-09-11 江阴中科矿业安全科技有限公司 基于单目视觉的钻车姿态测量方法

Family Cites Families (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH1070563A (ja) * 1996-08-27 1998-03-10 Hitachi Ltd インターネットワーク装置
JP2010076536A (ja) * 2008-09-25 2010-04-08 Toyota Motor Corp 電子制御ユニット、インテリジェントセンサ、車両用制御システム、信号サンプリング方法
JP2011123724A (ja) * 2009-12-11 2011-06-23 Mitsubishi Electric Corp 情報処理装置及び処理情報縮退方法
CN103901774B (zh) * 2012-12-28 2017-02-08 联想(北京)有限公司 高效鲁棒的基于多传感器的slam协调方法及系统
CN103399789B (zh) * 2013-08-09 2016-06-22 香港应用科技研究院有限公司 分布式流计算系统中可构建的动态过载控制方法
CN104142862B (zh) * 2013-12-16 2015-09-16 腾讯科技(深圳)有限公司 服务器的过载保护方法及装置
CN104236459B (zh) * 2014-09-24 2015-06-17 烟台拓伟机械有限公司 六点定位式相对位姿检测系统

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20060085130A1 (en) * 2004-10-18 2006-04-20 Trex Enterprises Corporation Daytime stellar imager for attitude determination
CN101954191A (zh) * 2010-08-25 2011-01-26 颜小洋 一种智能娱乐移动机器人
CN103292807A (zh) * 2012-03-02 2013-09-11 江阴中科矿业安全科技有限公司 基于单目视觉的钻车姿态测量方法
CN202869645U (zh) * 2012-10-15 2013-04-10 杭州市特种设备检测院 基于Android平台手机的便携式振动测量仪
CN203069788U (zh) * 2012-12-10 2013-07-17 中山大学 浮式及半潜式移动平台方位及三维姿态监测显示系统

Also Published As

Publication number Publication date
CN111356903A (zh) 2020-06-30

Similar Documents

Publication Publication Date Title
KR102728513B1 (ko) 듀얼 이벤트 카메라를 이용한 slam 방법 및 slam 시스템
CN109727288B (zh) 用于单目同时定位与地图构建的系统和方法
CN111210463B (zh) 基于特征点辅助匹配的虚拟宽视角视觉里程计方法及系统
CN113052907B (zh) 一种动态环境移动机器人的定位方法
JP7106665B2 (ja) 単眼深度推定方法およびその装置、機器ならびに記憶媒体
US8199977B2 (en) System and method for extraction of features from a 3-D point cloud
US9153066B2 (en) Image processing device, imaging device, and image processing method
JP2022519194A (ja) 奥行き推定
CN110992356A (zh) 目标对象检测方法、装置和计算机设备
CN110493488B (zh) 视频稳像方法、视频稳像装置和计算机可读存储介质
CN112115980A (zh) 基于光流跟踪和点线特征匹配的双目视觉里程计设计方法
JP7032871B2 (ja) 画像処理装置及び画像処理方法、プログラム、記憶媒体
CN112097732A (zh) 一种基于双目相机的三维测距方法、系统、设备及可读存储介质
CN109978934B (zh) 一种基于匹配代价加权的双目视觉立体匹配方法及系统
US9747690B2 (en) Image processing device, image processing method, and program
CN112287824A (zh) 基于双目视觉的三维目标检测方法、装置及系统
CN114612544B (zh) 图像处理方法、装置、设备和存储介质
WO2020125637A1 (zh) 一种立体匹配方法、装置和电子设备
CN111753739B (zh) 物体检测方法、装置、设备以及存储介质
CN113362387B (zh) 一种动态环境移动机器人的环境地图构建方法
CN114494150A (zh) 一种基于半直接法的单目视觉里程计的设计方法
CN114066950A (zh) 单目散斑结构光图像匹配方法、电子设备及存储介质
CN117237457B (zh) 一种面向非重叠多目视觉里程计的鲁棒初始化方法及系统
CN113409340B (zh) 语义分割模型训练方法、语义分割方法、装置及电子设备
US9323995B2 (en) Image processor with evaluation layer implementing software and hardware algorithms of different precision

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: 19911066

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: 19911066

Country of ref document: EP

Kind code of ref document: A1