WO2022110777A1 - 定位方法及装置、电子设备、存储介质、计算机程序产品、计算机程序 - Google Patents

定位方法及装置、电子设备、存储介质、计算机程序产品、计算机程序 Download PDF

Info

Publication number
WO2022110777A1
WO2022110777A1 PCT/CN2021/101040 CN2021101040W WO2022110777A1 WO 2022110777 A1 WO2022110777 A1 WO 2022110777A1 CN 2021101040 W CN2021101040 W CN 2021101040W WO 2022110777 A1 WO2022110777 A1 WO 2022110777A1
Authority
WO
WIPO (PCT)
Prior art keywords
electronic device
positioning
positioning result
result
attitude information
Prior art date
Application number
PCT/CN2021/101040
Other languages
English (en)
French (fr)
Inventor
谢卫健
钱权浩
王楠
章国锋
鲍虎军
Original Assignee
浙江商汤科技开发有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 浙江商汤科技开发有限公司 filed Critical 浙江商汤科技开发有限公司
Publication of WO2022110777A1 publication Critical patent/WO2022110777A1/zh

Links

Images

Classifications

    • GPHYSICS
    • G01MEASURING; TESTING
    • G01CMEASURING DISTANCES, LEVELS OR BEARINGS; SURVEYING; NAVIGATION; GYROSCOPIC INSTRUMENTS; PHOTOGRAMMETRY OR VIDEOGRAMMETRY
    • G01C11/00Photogrammetry or videogrammetry, e.g. stereogrammetry; Photographic surveying
    • G01C11/04Interpretation of pictures
    • G01C11/06Interpretation of pictures by comparison of two or more pictures of the same area
    • 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
    • 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
    • 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
    • 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/26Navigation; Navigational instruments not provided for in groups G01C1/00 - G01C19/00 specially adapted for navigation in a road network
    • G01C21/28Navigation; Navigational instruments not provided for in groups G01C1/00 - G01C19/00 specially adapted for navigation in a road network with correlation of data from several navigational 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/26Navigation; Navigational instruments not provided for in groups G01C1/00 - G01C19/00 specially adapted for navigation in a road network
    • G01C21/28Navigation; Navigational instruments not provided for in groups G01C1/00 - G01C19/00 specially adapted for navigation in a road network with correlation of data from several navigational instruments
    • G01C21/30Map- or contour-matching
    • 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/26Navigation; Navigational instruments not provided for in groups G01C1/00 - G01C19/00 specially adapted for navigation in a road network
    • G01C21/28Navigation; Navigational instruments not provided for in groups G01C1/00 - G01C19/00 specially adapted for navigation in a road network with correlation of data from several navigational instruments
    • G01C21/30Map- or contour-matching
    • G01C21/32Structuring or formatting of map data
    • 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/26Navigation; Navigational instruments not provided for in groups G01C1/00 - G01C19/00 specially adapted for navigation in a road network
    • G01C21/34Route searching; Route guidance
    • G01C21/36Input/output arrangements for on-board computers
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/29Geographical information databases

Definitions

  • the present disclosure relates to, but is not limited to, the field of computer technology, and in particular, relates to a positioning method and apparatus, electronic equipment, storage medium, computer program product, and computer program.
  • terminal positioning is realized by means of visual positioning, and in some scenarios, positioning errors are prone to occur.
  • the embodiment of the present disclosure proposes a positioning technical solution, which can be implemented as follows:
  • An embodiment of the present disclosure provides a positioning method, which is applied to a second electronic device, including:
  • the current geographic area where the first electronic device is located is determined according to a first positioning result in the positioning request, where the positioning request includes the first positioning request.
  • the environmental image of the environment where the electronic device is located and the first localization result of the first electronic device; the point cloud sub-map corresponding to the current geographical area is determined from the preset point cloud map; according to the environmental image and For the point cloud submap, perform visual positioning on the first electronic device to obtain a second positioning result of the first electronic device; and send the second positioning result to the first electronic device.
  • performing visual positioning on the first electronic device according to the environment image and the point cloud submap to obtain a second positioning result of the first electronic device includes: The environment image is projected and matched with the point cloud submap to determine the point cloud information matched with the environment image; and the second positioning result of the first electronic device is determined according to the matched point cloud information.
  • the positioning request further includes gravity posture information of the first electronic device, and the first electronic device is visually positioned according to the environment image and the point cloud submap,
  • Obtaining the second positioning result of the first electronic device includes: matching the environment image with the point cloud submap to obtain a third positioning result of the first electronic device; and according to the gravity attitude information, The third positioning result is verified to determine the second positioning result, where the second positioning result includes position information and attitude information of the first electronic device.
  • verifying the third positioning result according to the gravity attitude information, and determining the second positioning result includes: determining the first electronic device according to the gravity attitude information. the first direction; determine the second direction of the first electronic device according to the attitude information in the third positioning result; determine the third positioning result that satisfies the verification condition as the second positioning result, the verification condition It includes that the angle difference between the first direction and the second direction in the direction of gravity is less than or equal to an angle threshold.
  • the method further includes: if all the third positioning results do not meet the verification condition, sending positioning failure information to the first electronic device.
  • An embodiment of the present disclosure provides a positioning method, which is applied to a first electronic device, and includes: sending a positioning request to a second electronic device, where the positioning request includes an environmental image of the environment where the first electronic device is located and the first electronic device.
  • a first localization result local to an electronic device in the case of receiving a second localization result sent by the second electronic device, according to at least one first historical localization result local to the first electronic device and the second localization result
  • At least one second historical positioning result sent by the electronic device to determine whether the second positioning result satisfies the consistency verification condition; in the case that the second positioning result meets the consistency verification condition, according to the second positioning result
  • the results are positioned and displayed.
  • the second positioning result satisfies the Consistency verification conditions, including: according to the first posture information in the first positioning result, the second posture information in the second positioning result, and the third posture information in the first historical positioning result, the The fourth attitude information in the second historical positioning result determines the attitude deviation; in the case that the attitude deviation is less than or equal to the deviation threshold, it is determined that the second positioning result satisfies the consistency verification condition.
  • the method before sending the positioning request to the second electronic device, the method further includes: determining, according to the environment image and a local map of the first electronic device, a local first location of the first electronic device. A positioning result, where the first positioning result includes position information and attitude information of the first electronic device.
  • the method before sending the positioning request to the second electronic device, the method further includes: determining the gravity attitude information of the first electronic device through the inertial measurement unit IMU of the first electronic device, the The positioning request includes the gravity attitude information.
  • the performing positioning and displaying according to the second positioning result includes: determining a navigation path of the first electronic device according to the second positioning result and the geographic location of the destination; Navigation path, displaying the augmented reality AR navigation path in the display interface of the screen of the first electronic device.
  • the performing positioning and displaying according to the second positioning result includes: determining, according to the second positioning result and first position and attitude information of the AR object, that the AR object is in the first position of the AR object.
  • the second position and attitude information in the display interface of the screen of the electronic device; the AR object is displayed in the display interface according to the second position and attitude information.
  • An embodiment of the present disclosure provides a positioning apparatus, which is applied to a second electronic device, and includes: an area determination part configured to, in the case of receiving a positioning request from the first electronic device, according to the first positioning request in the positioning request
  • the positioning result is to determine the current geographic area where the first electronic device is located, and the positioning request includes an environmental image of the environment where the first electronic device is located and the first localization result of the first electronic device; the sub-map is determined
  • the positioning part is configured to determine the point cloud sub-map corresponding to the current geographical area from the preset point cloud map; the positioning part is configured to determine the first
  • the electronic device performs visual positioning to obtain a second positioning result of the first electronic device; the result sending part is configured to send the second positioning result to the first electronic device.
  • An embodiment of the present disclosure provides a positioning apparatus, which is applied to a first electronic device, and includes: a request sending part configured to send a positioning request to a second electronic device, where the positioning request includes information about the environment where the first electronic device is located. an environment image and a local first localization result of the first electronic device; the verification part is configured to, in the case of receiving the second localization result sent by the second electronic device, A first historical positioning result and at least one second historical positioning result sent by the second electronic device, to determine whether the second positioning result satisfies the consistency verification condition; the positioning and display part is configured to be in the second positioning If the result satisfies the consistency verification condition, positioning and display are performed according to the second positioning result.
  • An embodiment of the present disclosure provides an electronic device, including: a processor; a memory configured to store instructions executable by the processor; wherein the processor is configured to invoke the instructions stored in the memory to execute the above method.
  • Embodiments of the present disclosure provide a computer-readable storage medium, on which computer program instructions are stored, and when the computer program instructions are executed by a processor, the foregoing method is implemented.
  • Embodiments of the present disclosure provide a computer program, including computer-readable codes, and when the computer-readable codes are run on a device, a processor in the device executes instructions for implementing the above method.
  • Embodiments of the present disclosure also provide a computer program product for storing computer-readable instructions, which, when executed, cause a computer to execute the above method.
  • the positioning request sent by the first electronic device can include a local positioning result
  • the second electronic device can determine the current geographical area where the first electronic device is located according to the local positioning result
  • the sub-map is used for positioning, thereby improving the success rate and positioning accuracy of positioning, and reducing the probability of false matching.
  • FIG. 1 is a schematic diagram of an implementation flowchart of a positioning method provided by an embodiment of the present disclosure.
  • FIG. 2 is a schematic diagram of an implementation flow of a positioning method provided by an embodiment of the present disclosure.
  • FIG. 3 is a schematic structural diagram of a positioning device according to an embodiment of the present disclosure.
  • FIG. 4 is a schematic structural diagram of a positioning device according to an embodiment of the present disclosure.
  • FIG. 5 is a schematic diagram of the composition and structure of an electronic device according to an embodiment of the present disclosure.
  • FIG. 6 is a schematic structural diagram of an electronic device according to an embodiment of the present disclosure.
  • the positioning in the case of realizing terminal positioning by means of visual positioning, the positioning usually only relies on the image uploaded by the user, resulting in that the positioning accuracy cannot be guaranteed, especially in application environments such as weak textures, repeated textures or large scenes. Positioning errors are prone to occur.
  • the embodiments of the present disclosure provide a positioning method, which can be applied to indoor and outdoor scenarios such as large shopping malls, transportation hubs, hospitals, large exhibition halls, etc., to improve the positioning accuracy.
  • the positioning method can be implemented by the first electronic device and the second electronic device.
  • the first electronic device may include, for example, a terminal device
  • the second electronic device may include, for example, a cloud server.
  • FIG. 1 is a schematic diagram of an implementation flowchart of a positioning method provided by an embodiment of the present disclosure.
  • the positioning method can be applied to a second electronic device. As shown in FIG. 1 , the positioning method includes:
  • step S11 in the case of receiving a positioning request from a first electronic device, the current geographic area where the first electronic device is located is determined according to a first positioning result in the positioning request, and the positioning request includes including an environmental image of the environment where the first electronic device is located and a local first localization result of the first electronic device;
  • step S12 a point cloud submap corresponding to the current geographic area is determined from a preset point cloud map
  • step S13 visual positioning is performed on the first electronic device according to the environment image and the point cloud submap to obtain a second positioning result of the first electronic device;
  • step S14 the second positioning result is sent to the first electronic device.
  • the second electronic device may be, for example, a cloud server, which stores a point cloud map of the entire geographic area (eg, an inner area of a shopping mall, a city area, etc.) where the first electronic device is located.
  • a cloud server which stores a point cloud map of the entire geographic area (eg, an inner area of a shopping mall, a city area, etc.) where the first electronic device is located.
  • the first electronic device may be a terminal device, such as User Equipment (UE), mobile device, user terminal, terminal, cellular phone, cordless phone, Personal Digital Assistant (PDA), Handheld devices, computing devices, in-vehicle devices, wearable devices, etc.
  • UE User Equipment
  • PDA Personal Digital Assistant
  • the method may be implemented by a processor invoking computer readable instructions stored in a memory.
  • an environmental image of the environment in which he is located may be collected by a collection component (such as a camera) of the first electronic device, such as photographing the first electronic device.
  • a collection component such as a camera
  • the environment image may be one or more images, or may be a short video including multiple frames of images, which is not limited in this embodiment of the present disclosure.
  • a set of Simultaneous Localization And Mapping (SLAM) system may be run locally on the first electronic device.
  • SLAM Simultaneous Localization And Mapping
  • a local map of the entire geographic area where the first electronic device is located may be stored in the first electronic device, and the accuracy of the local map is lower than that of the point cloud map in the second electronic device.
  • the first electronic device may collect an environment image, and perform preliminary positioning through the SLAM system according to the environment image and the local map to obtain a local positioning result of the first electronic device (referred to as the first positioning result).
  • the first positioning result may include position information and attitude information of the first electronic device, and the positioning accuracy of the first positioning result may be lower than the positioning result of the cloud.
  • the first electronic device may send a positioning request to the second electronic device, and the positioning request may include the environment image and the first positioning result.
  • the positioning result of the local SLAM system can be used as a priori information during cloud positioning, so that the second electronic device can improve the matching efficiency and improve the positioning accuracy.
  • the second electronic device when receiving a positioning request from the first electronic device, may determine the current geographic area where the first electronic device is located according to the first positioning result. That is, the second electronic device can use the positioning information provided locally by the first electronic device, such as pose (Pose), to determine the area where the first electronic device is located, so as to perform local mini-map positioning and improve positioning accuracy.
  • the positioning information provided locally by the first electronic device, such as pose (Pose)
  • the current geographic area may be an area within a certain range near the local positioning position of the first electronic device, for example, the distance from the local positioning position of the first electronic device is within a preset distance (for example, 5-10 meters).
  • a preset distance for example, 5-10 meters.
  • a circular area, and the specific scope of the current geographic area is not limited in this embodiment of the present disclosure.
  • a point cloud sub-map corresponding to the current geographic area may be determined from the point cloud map of the overall geographic area.
  • the first electronic device may be visually positioned according to the environment image and the point cloud submap to obtain a second positioning result of the first electronic device.
  • the second electronic device may extract feature information of the environment image.
  • the feature information of the environment image can be obtained by, for example, performing feature extraction on the environment image through a pre-trained neural network.
  • the embodiments of the present disclosure do not limit the specific manner of feature extraction.
  • the second electronic device may match the feature information with the point cloud submap to determine a matching visual positioning result (which may be referred to as a second positioning result).
  • a matching visual positioning result which may be referred to as a second positioning result.
  • the second positioning result includes position information and attitude information of the first electronic device.
  • the position information may include the position coordinates of the first electronic device; the attitude information may include the orientation, pitch angle, etc. of the first electronic device.
  • the second electronic device may send the second positioning result to the first electronic device, so as to correct the position and attitude information of the local SLAM of the first electronic device.
  • the positioning request sent by the first electronic device can include a local positioning result
  • the second electronic device can determine the current geographical area where the first electronic device is located according to the local positioning result
  • the sub-map is used for positioning, thereby improving the success rate and positioning accuracy of positioning, and reducing the probability of false matching.
  • step S13 may include:
  • a second positioning result of the first electronic device is determined.
  • the second electronic device can project the three-dimensional point cloud submap into a two-dimensional image, and then match it with the environment image.
  • the environmental feature points in the environmental image can only be matched with the feature points projected from the point cloud submap within the radius of the environmental feature point, thereby reducing the probability of false matching and improving the matching efficiency.
  • point cloud information matching the environment image can be determined; then the position and attitude information corresponding to the matched point cloud information can be determined as the second positioning result of the first electronic device, thereby Complete the positioning process.
  • an inertial measurement unit (Inertial measurement unit, IMU) is usually provided in the first electronic device, for acquiring information such as speed, acceleration, angular velocity, and the like of the first electronic device.
  • the first electronic device may determine the gravity attitude (Attitude) information of the first electronic device according to the IMU, for example, including the direction of the first electronic device, which is not limited in this embodiment of the present disclosure.
  • the positioning request sent by the first electronic device may include gravity posture information of the first electronic device.
  • the gravity attitude information is relatively accurate and can be used as a priori information for cloud positioning.
  • step S13 may include:
  • the third positioning result is verified, and the second positioning result is determined, and the second positioning result includes the position information and attitude information of the first electronic device.
  • the second electronic device may match the environment image with the point cloud submap of the current geographic area to obtain a preliminary positioning result (which may be referred to as a third positioning result).
  • a preliminary positioning result which may be referred to as a third positioning result.
  • the embodiment of the present disclosure does not limit the specific manner of matching the environment image with the point cloud submap.
  • the second electronic device may verify the third positioning result, so as to eliminate erroneous positioning results.
  • the third positioning result is verified according to the gravity attitude information, and the step of determining the second positioning result may include:
  • a third positioning result satisfying a verification condition is determined as the second positioning result, and the verification condition includes that the angle difference between the first direction and the second direction in the direction of gravity is less than or equal to an angle threshold.
  • the first direction R imu of the first electronic device can be determined; according to the attitude information in the third positioning result, the second direction R cloud of the first electronic device can be determined ; According to the first direction R imu and the second direction R cloud , the angle difference between the first direction and the second direction in the direction of gravity can be determined.
  • the angle difference A can be determined by the following formula 1-1:
  • z represents the coordinate axis in the direction of gravity
  • dR*z represents the value of the vector dR in the z-axis direction
  • acos() represents the arc cosine function
  • the angle difference A between the first direction and the second direction in the direction of gravity is less than or equal to a preset angle threshold, it may be considered that the attitude of the third positioning result is within the allowable error range, which is The correct positioning result meets the verification conditions. That is, the verification condition includes that the angle difference between the first direction and the second direction in the direction of gravity is less than or equal to the angle threshold.
  • the embodiment of the present disclosure does not limit the specific value of the angle threshold.
  • the third positioning result satisfying the verification condition may be determined as the second positioning result.
  • the third positioning result that does not meet the verification condition exceeds the allowable range of the error and is an erroneous positioning result, and the third positioning result that does not meet the verification condition may be deleted.
  • the positioning method may further include:
  • the third positioning results if all the third positioning results do not meet the verification condition, that is, the first direction and the second direction of each third positioning result are in the direction of gravity If the angle difference A is greater than the preset angle threshold, it can be considered that the attitude of each third positioning result exceeds the allowable range of error, which is an erroneous positioning result, and it is determined that the verification of the third positioning result fails.
  • the environment image and the point cloud submap may also be matched again, so as to obtain a new positioning result.
  • the embodiment of the present disclosure does not limit the specific processing manner after the verification of the third positioning result fails.
  • positioning failure information can be returned to the terminal, thereby avoiding sending back an erroneous positioning result and improving the accuracy of the positioning result.
  • FIG. 2 is a schematic diagram of an implementation flow of a positioning method according to an embodiment of the present disclosure.
  • the positioning method can be applied to a first electronic device. As shown in FIG. 2 , the positioning method includes:
  • step S21 a positioning request is sent to the second electronic device, where the positioning request includes an environmental image of the environment where the first electronic device is located and a local first positioning result of the first electronic device;
  • step S22 in the case of receiving the second positioning result sent by the second electronic device, according to at least one local historical positioning result of the first electronic device and at least one local positioning result sent by the second electronic device A second historical positioning result, to judge whether the second positioning result satisfies the consistency verification condition;
  • step S23 if the second positioning result satisfies the consistency verification condition, positioning and displaying are performed according to the second positioning result.
  • the first electronic device may be a terminal device.
  • the second electronic device may be, for example, a cloud server, which stores a point cloud map of the entire geographic area where the first electronic device is located (eg, an inner area of a shopping mall, a city area, etc.).
  • an environmental image of the environment in which he is located can be collected through a collection component (such as a camera) of the first electronic device, for example, a photograph of what the first electronic device faces image of the scenery.
  • the environment image may be one or more images, or may be a short video including multiple frames of images, which is not limited in this embodiment of the present disclosure.
  • a SLAM system may be run locally on the first electronic device.
  • the local SLAM system is used for preliminary positioning, and then the cloud positioning results are requested to correct the local SLAM position and attitude information.
  • the first electronic device may send a positioning request to the second electronic device, and the positioning request may include an environment image and a local first positioning result.
  • the positioning result of the local SLAM system can be used as a priori information during cloud positioning, so that the second electronic device can increase the matching efficiency and improve the positioning accuracy.
  • the second electronic device when receiving a positioning request from the first electronic device, may determine where the first electronic device is located according to the first positioning result in the positioning request (for example, the pose provided by SLAM).
  • the current geographic area may be an area within a certain range near the local positioning position of the first electronic device, for example, the distance from the local positioning position of the first electronic device is within a preset distance (for example, 5-10 meters).
  • a preset distance for example, 5-10 meters.
  • a circular area, and the specific scope of the current geographic area is not limited in this embodiment of the present disclosure.
  • the second positioning result obtained by positioning the second electronic device may include position information and attitude information of the first electronic device.
  • the position information may include the position coordinates of the first electronic device; the attitude information may include the orientation, pitch angle, etc. of the first electronic device.
  • the first electronic device may perform consistency verification on the second positioning result to verify the accuracy of the second positioning result .
  • the first electronic device may determine whether the current second positioning result satisfies the consistency verification condition according to at least one local first historical positioning result and at least one second historical positioning result sent by the second electronic device.
  • the first historical positioning result may include the first positioning result obtained by performing local positioning by the first electronic device before sending the current positioning request; the second historical positioning result may include the first positioning result obtained after receiving the second electronic device The second positioning result that has been received by the first electronic device before the current second positioning result. For example, if this time is the kth positioning, the first historical positioning result may include all or part of the first positioning results from the 1st to the k-1th local positioning, and the second historical positioning results may include the first to the k-1th local positioning results. All or part of the second positioning results received in k-1 times.
  • the position difference between the local first historical positioning result and the current first positioning result, and the positioning change between the second historical positioning result in the cloud and the current second positioning result can be calculated respectively; When the difference between the two sets of positioning changes is small, it can be considered that the consistency verification condition is satisfied; on the contrary, when the difference between the two sets of positioning changes is large, it can be considered that the consistency verification condition is not satisfied.
  • the embodiment of the present disclosure does not limit the specific setting of the consistency verification condition.
  • the second positioning result may be used as the final positioning result of the first electronic device, and positioning may be performed according to the second positioning result and display. That is, the output result of the visual-inertial odometry (VIO) module of the local SLAM system can be constrained by the second positioning result. According to the current application scenario of the first electronic device, the corresponding content to be displayed is rendered through the output result of the VIO module, and displayed on the display interface.
  • VIO visual-inertial odometry
  • the navigation path can be determined according to the second positioning result and the destination position and displayed on the display interface, so as to realize the navigation function; Based on the positioning result, the position and posture of the virtual object to be displayed are determined, and displayed on the display interface, thereby realizing accurate virtual object display.
  • the embodiments of the present disclosure do not limit the specific content displayed in the display interface.
  • a positioning request including an environmental image and a local positioning result can be sent to the second electronic device, so as to realize the positioning of a high-precision map and improve the positioning accuracy and success rate; the positioning result returned by the second electronic device can be Consistency verification is performed to filter erroneous positioning results and improve the quality of positioning.
  • step S22 may include:
  • the The fourth attitude information to determine the attitude deviation
  • the first attitude change value of the local positioning of the first electronic device can be calculated.
  • the fourth attitude information in the second historical positioning result previously sent by the cloud and the second attitude information in the second positioning result currently sent by the cloud calculate the second attitude change value of the first electronic device positioned in the cloud.
  • the attitude deviation between the attitude change values may be determined according to the first attitude change value and the second attitude change value. For example, when the historical positioning result of a certain positioning is used, the attitude deviation
  • the attitude deviation when the attitude deviation is less than or equal to a preset deviation threshold, it can be considered that the second positioning result currently sent by the cloud is within the allowable error range, consistent with the motion state of the local SLAM, and satisfies the consistency Verify the conditions for correct positioning results. In this case, corresponding positioning and display can be performed according to the second positioning result.
  • the embodiment of the present disclosure does not limit the specific value of the deviation threshold.
  • the second positioning result currently sent by the cloud exceeds the allowable range of the error, is inconsistent with the motion state of the local SLAM, does not meet the consistency verification conditions, and is an error positioning results.
  • the second positioning result may be deleted, or the second positioning result may not be used to constrain the output result of the VIO module of the local SLAM system, and a positioning request may be sent to the second electronic device again.
  • the method before step S21, the method further includes:
  • a first localization result of the first electronic device is determined, where the first localization result includes position information and attitude information of the first electronic device.
  • the first electronic device may store a local map of the entire geographic area where the first electronic device is located, and the accuracy of the local map is lower than that of the point cloud map in the second electronic device.
  • the first electronic device may collect an environment image, and perform preliminary positioning through the SLAM system according to the environment image and the local map to obtain a local positioning result of the first electronic device (referred to as the first positioning result).
  • the first positioning result may include position information and attitude information of the first electronic device, and the positioning accuracy of the first positioning result may be lower than the positioning result of the cloud.
  • the positioning request when the first electronic device sends a positioning request to the second electronic device in step S21, the positioning request includes the local first positioning result.
  • the positioning result of the local SLAM system can be used as a priori information during cloud positioning, so that the second electronic device can improve the matching efficiency, improve the positioning accuracy, and eliminate erroneous matching results.
  • the method before step S21, the method further includes:
  • the gravity attitude information of the first electronic device is determined through the inertial measurement unit IMU of the first electronic device, and the positioning request includes the gravity attitude information.
  • an inertial measurement unit IMU is usually provided in the first electronic device, which is used to acquire information such as speed, acceleration, and angular velocity of the first electronic device.
  • the first electronic device may determine gravity attitude (attitude) information of the first electronic device according to the IMU, for example, including the direction of the first electronic device, which is not limited in this embodiment of the present disclosure.
  • the positioning request sent by the first electronic device may include the gravity attitude information, which is relatively accurate and can be used as a priori information during cloud positioning, and the cloud may verify the third positioning result, so that Eliminate wrong positioning results, thereby improving the accuracy of positioning results.
  • step S23 may include:
  • the augmented reality AR navigation path is displayed in the display interface of the screen of the first electronic device.
  • the navigation path of the first electronic device can be determined according to the position information and posture information in the second positioning result and the geographic location of the destination set by the user.
  • the embodiment of the present disclosure does not limit the specific manner of determining the navigation path.
  • the AR navigation path may be displayed in a live image or a panoramic image of the display interface of the screen of the first electronic device, so as to instruct the user to follow the AR navigation path.
  • the AR navigation path includes, for example, AR arrows along the navigation path. The embodiment of the present disclosure does not limit the specific form of the AR navigation path.
  • step S23 may include:
  • the second positioning result and the first position and attitude information of the AR object determine the second position and attitude information of the AR object in the display interface of the first electronic device screen
  • the AR object is displayed in the display interface according to the second position and attitude information.
  • the AR object is in the first electronic device according to the position information and attitude information in the second positioning result and the first position and attitude information of the AR object to be displayed.
  • the second position and attitude information in the display interface of the screen do not limit the specific determination manner.
  • the AR object may be displayed in the real image of the display interface.
  • the AR objects to be displayed may include AR markers, virtual objects, and the like, such as virtual landscapes, virtual animals, and the like.
  • the embodiments of the present disclosure do not limit the specific categories of AR objects.
  • the AR object display in the real scene image can be realized, and the accuracy of the AR object display can be improved.
  • the positioning request sent by the terminal to the cloud includes the positioning result of the local SLAM, so that the cloud can determine the current geographical area where the terminal is located according to the local positioning result, and perform positioning according to the submap of the current geographical area, In this way, the success rate and accuracy of positioning are improved, and the probability of mismatching is reduced; the positioning request also includes the gravity attitude information of the IMU, so that the cloud can verify the cloud positioning results according to the gravity attitude information, so as to eliminate the wrong positioning results and improve positioning. accuracy of the result.
  • the terminal after receiving the positioning results returned by the cloud, the terminal can perform consistency verification on the current positioning results according to the historical positioning results, filter the wrong positioning results, and filter out the qualified positioning results, thereby improving the positioning quality.
  • the positioning method according to the embodiment of the present disclosure can be applied to various application scenarios of augmented reality AR, such as AR cloud, AR navigation and other scenarios; and various application scenarios of Location Based Services (LBS).
  • augmented reality AR such as AR cloud, AR navigation and other scenarios
  • LBS Location Based Services
  • embodiments of the present disclosure also provide positioning devices, electronic devices, computer-readable storage media, and programs, all of which can be used to implement any positioning method provided by the embodiments of the present disclosure. Record accordingly.
  • FIG. 3 is a schematic structural diagram of a positioning device provided by an embodiment of the present disclosure.
  • the device is applied to a second electronic device. As shown in FIG. 3 , the device includes:
  • the area determination part 31 is configured to, in the case of receiving a positioning request from the first electronic device, according to the first positioning result in the positioning request, determine the current geographical area where the first electronic device is located, and the positioning The request includes an environment image of the environment where the first electronic device is located and a local first localization result of the first electronic device;
  • the submap determination part 32 is configured to determine the point cloud submap corresponding to the current geographical area from the preset point cloud map;
  • the positioning part 33 is configured to perform visual positioning on the first electronic device according to the environment image and the point cloud sub-map to obtain a second positioning result of the first electronic device;
  • the result sending part 34 is configured to send the second positioning result to the first electronic device.
  • the positioning part includes: a first matching sub-part configured to perform projection matching on the environment image and the point cloud sub-map, and determine point cloud information matched with the environment image; the result is determined The part is configured to determine the second positioning result of the first electronic device according to the matched point cloud information.
  • the positioning request further includes gravity attitude information of the first electronic device
  • the positioning part includes: a second matching sub-section configured to compare the environment image and the point cloud sub-map Matching is performed to obtain the third positioning result of the first electronic device; the first verification sub-section is configured to verify the third positioning result according to the gravity attitude information, and determine the second positioning result.
  • the second positioning result includes position information and attitude information of the first electronic device.
  • the first verification sub-section is further configured to: determine the first direction of the first electronic device according to the gravitational attitude information; determine the first direction of the first electronic device according to the attitude information in the third positioning result The second orientation of the first electronic device; the third positioning result satisfying the verification condition is determined as the second positioning result, and the verification condition includes the angle between the first direction and the second direction in the direction of gravity The difference is less than or equal to the angle threshold.
  • the apparatus further includes: an information sending part configured to send positioning failure information to the first electronic device if all third positioning results do not satisfy the verification condition.
  • FIG. 4 is a schematic structural diagram of a positioning device provided by an embodiment of the present disclosure.
  • the device is applied to a first electronic device. As shown in FIG. 4 , the device includes:
  • the request sending part 41 is configured to send a positioning request to the second electronic device, where the positioning request includes an environment image of the environment where the first electronic device is located and a local first positioning result of the first electronic device;
  • the verification part 42 is configured to, in the case of receiving the second positioning result sent by the second electronic device, according to at least one first historical positioning result local to the first electronic device and the second positioning result sent by the second electronic device. At least one second historical positioning result, to determine whether the second positioning result satisfies the consistency verification condition;
  • the positioning and display part 43 is configured to perform positioning and display according to the second positioning result when the second positioning result satisfies the consistency verification condition.
  • the verification part includes: a deviation determination sub-part configured to be based on the first posture information in the first positioning result, the second posture information in the second positioning result, the first The third attitude information in the historical positioning result, and the fourth attitude information in the second historical positioning result, determine attitude deviation; the second verification sub-section is configured to be less than or equal to the deviation threshold when the attitude deviation is less than or equal to the threshold value, It is determined that the second positioning result satisfies the consistency verification condition.
  • the apparatus further includes: a local positioning part configured to determine a local first localization result of the first electronic device according to the environment image and the local map of the first electronic device.
  • the apparatus further includes: a gravity attitude determination part, configured to determine the gravity attitude information of the first electronic device through the inertial measurement unit IMU of the first electronic device, and the positioning request includes the gravity attitude information.
  • the positioning and displaying part is further configured to: determine a navigation path of the first electronic device according to the second positioning result and the geographic position of the destination;
  • the augmented reality AR navigation path is displayed in the display interface of the screen of the first electronic device.
  • the positioning and displaying part is further configured to: determine the display interface of the AR object on the screen of the first electronic device according to the second positioning result and the first position and attitude information of the AR object The second position and attitude information in the ; according to the second position and attitude information, the AR object is displayed in the display interface.
  • the functions or included parts of the apparatus provided in the embodiments of the present disclosure may be configured to execute the methods described in the above method embodiments, and for specific implementation, reference may be made to the above method embodiments.
  • a "part" may be a part of a circuit, a part of a processor, a part of a program or software, etc., of course, a unit, a module or a non-modularity.
  • Embodiments of the present disclosure further provide a computer-readable storage medium, on which computer program instructions are stored, and when the computer program instructions are executed by a processor, the foregoing method is implemented.
  • the computer-readable storage medium may be a non-volatile computer-readable storage medium or a volatile computer-readable storage medium.
  • Embodiments of the present disclosure further provide an electronic device, including: a processor; a memory configured to store instructions executable by the processor; wherein the processor is configured to invoke the instructions stored in the memory to execute the above method.
  • Embodiments of the present disclosure also provide a computer program, including computer-readable codes.
  • a processor in the device executes the method for implementing the positioning method provided by any of the above embodiments. instruction.
  • Embodiments of the present disclosure further provide a computer program product for storing computer-readable instructions, which, when executed, cause the computer to perform the operations of the positioning method provided by any of the foregoing embodiments.
  • Electronic devices may be implemented as terminals, servers, or other forms of devices.
  • FIG. 5 is a schematic structural diagram of an electronic device 800 according to an embodiment of the present disclosure.
  • electronic device 800 may be a mobile phone, computer, digital broadcast terminal, messaging device, game console, tablet device, medical device, fitness device, personal digital assistant, etc. terminal.
  • an electronic device 800 may include one or more of the following components: a processing component 802, a memory 804, a power supply component 806, a multimedia component 808, an audio component 810, an Input/Output (I/O) interface 812, Sensor assembly 814 , and communication assembly 816 .
  • the processing component 802 generally controls the overall operation of the electronic device 800, such as operations associated with display, phone calls, data communications, camera operations, and recording operations.
  • the processing component 802 can include one or more processors 820 to execute instructions to perform all or some of the steps of the methods described above.
  • processing component 802 may include one or more modules that facilitate interaction between processing component 802 and other components.
  • processing component 802 may include a multimedia module to facilitate interaction between multimedia component 808 and processing component 802.
  • Memory 804 is configured to store various types of data to support operation at electronic device 800 . Examples of such data include instructions for any application or method operating on electronic device 800, contact data, phonebook data, messages, pictures, videos, and the like.
  • the memory 804 may be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as Static Random-Access Memory (SRAM), Electrically Erasable Programmable Read-Only Memory (Electrically Erasable) Erasable Programmable Read Only Memory, EEPROM), Erasable Programmable Read Only Memory (EPROM), Programmable Read Only Memory (PROM), Read Only Memory (Read-Only Memory) , ROM), magnetic memory, flash memory, magnetic disk or optical disk.
  • SRAM Static Random-Access Memory
  • EEPROM Electrically Erasable Programmable Read-Only Memory
  • EPROM Erasable Programmable Read Only Memory
  • PROM Programmable Read Only Memory
  • Read-Only Memory Read-Only Memory
  • Power supply assembly 806 provides power to various components of electronic device 800 .
  • Power supply components 806 may include a power management system, one or more power supplies, and other components associated with generating, managing, and distributing power to electronic device 800 .
  • Multimedia component 808 includes a screen that provides an output interface between the electronic device 800 and the user.
  • the screen may include a liquid crystal display (LCD) and a touch panel (TP). If the screen includes a touch panel, the screen may be implemented as a touch screen to receive input signals from a user.
  • the touch panel includes one or more touch sensors to sense touch, swipe, and gestures on the touch panel. The touch sensor may not only sense the boundaries of a touch or swipe action, but also detect the duration and pressure associated with the touch or swipe action.
  • the multimedia component 808 includes a front-facing camera and/or a rear-facing camera. When the electronic device 800 is in an operation mode, such as a shooting mode or a video mode, the front camera and/or the rear camera may receive external multimedia data. Each of the front and rear cameras can be a fixed optical lens system or have focal length and optical zoom capability.
  • Audio component 810 is configured to output and/or input audio signals.
  • audio component 810 includes a microphone (MIC) that is configured to receive external audio signals when electronic device 800 is in operating modes, such as call mode, recording mode, and voice recognition mode.
  • the received audio signal may be stored in memory 804 or transmitted via communication component 816 .
  • audio component 810 also includes a speaker for outputting audio signals.
  • the I/O interface 812 provides an interface between the processing component 802 and a peripheral interface module, which may be a keyboard, a click wheel, a button, or the like. These buttons may include, but are not limited to: home button, volume buttons, start button, and lock button.
  • Sensor assembly 814 includes one or more sensors for providing status assessment of various aspects of electronic device 800 .
  • the sensor assembly 814 can detect the on/off state of the electronic device 800, the relative positioning of the components, such as the display and the keypad of the electronic device 800, the sensor assembly 814 can also detect the electronic device 800 or one of the electronic device 800 Changes in the position of components, presence or absence of user contact with the electronic device 800 , orientation or acceleration/deceleration of the electronic device 800 and changes in the temperature of the electronic device 800 .
  • Sensor assembly 814 may include a proximity sensor configured to detect the presence of nearby objects in the absence of any physical contact.
  • Sensor assembly 814 may also include a light sensor, such as a Complementary Metal-Oxide-Semiconductor (CMOS) or Charge Coupled Device (CCD) image sensor, for use in imaging applications.
  • CMOS Complementary Metal-Oxide-Semiconductor
  • CCD Charge Coupled Device
  • the sensor assembly 814 may also include an acceleration sensor, a gyroscope sensor, a magnetic sensor, a pressure sensor, or a temperature sensor.
  • Communication component 816 is configured to facilitate wired or wireless communication between electronic device 800 and other devices.
  • the electronic device 800 can access a wireless network based on a communication standard, such as a wireless network (WiFi), a second generation mobile communication technology (The 2nd Generation, 2G) or a third generation mobile communication technology (The 3rd Generation, 3G), or their The combination.
  • the communication component 816 receives broadcast signals or broadcast related information from an external broadcast management system via a broadcast channel.
  • the communication component 816 also includes a Near Field Communication (NFC) module to facilitate short-range communication.
  • the NFC module may be based on Radio Frequency Identification (RFID) technology, Infrared Data Association (IrDA) technology, Ultra Wide Band (UWB) technology, Bluetooth (Bluetooth, BT) technology and other technology to achieve.
  • RFID Radio Frequency Identification
  • IrDA Infrared Data Association
  • UWB Ultra Wide Band
  • Bluetooth Bluetooth
  • the electronic device 800 may be implemented by one or more Application Specific Integrated Circuits (ASICs), Digital Signal Processors (DSPs), Digital Signal Processing Devices (Digital Signal Processing Devices) , DSPD), Programmable Logic Device (PLD), Field Programmable Gate Array (FPGA), controller, microcontroller, microprocessor, or other electronic component implementation, used to perform the above method.
  • ASICs Application Specific Integrated Circuits
  • DSPs Digital Signal Processors
  • DPD Digital Signal Processing Devices
  • PLD Programmable Logic Device
  • FPGA Field Programmable Gate Array
  • controller microcontroller, microprocessor, or other electronic component implementation, used to perform the above method.
  • a non-volatile computer-readable storage medium such as a memory 804 comprising computer program instructions executable by the processor 820 of the electronic device 800 to perform the above method is also provided.
  • FIG. 6 is a schematic structural diagram of an electronic device 1900 according to an embodiment of the present disclosure.
  • the electronic device 1900 may be implemented as a server.
  • an electronic device 1900 includes a processing component 1922, which in some embodiments may include one or more processors, and a memory resource, represented by memory 1932, for storing instructions executable by the processing component 1922, such as applications program.
  • An application program stored in memory 1932 may include one or more modules, each corresponding to a set of instructions.
  • the processing component 1922 is configured to execute instructions to perform the above-described methods.
  • the electronic device 1900 may also include a power supply assembly 1926 configured to perform power management of the electronic device 1900, a wired or wireless network interface 1950 configured to connect the electronic device 1900 to a network, and an input output (I/O) interface 1958 .
  • the electronic device 1900 can operate based on an operating system stored in the memory 1932, such as a Microsoft server operating system (Windows Server TM ), a graphical user interface based operating system (Mac OS X TM ) introduced by Apple, a multi-user multi-process computer operating system (Unix TM ), Free and Open Source Unix-like Operating System (Linux TM ), Open Source Unix-like Operating System (FreeBSD TM ) or the like.
  • Microsoft server operating system Windows Server TM
  • Mac OS X TM graphical user interface based operating system
  • Uniix TM multi-user multi-process computer operating system
  • Free and Open Source Unix-like Operating System Linux TM
  • FreeBSD TM Open Source Unix-like Operating System
  • a non-volatile computer-readable storage medium such as memory 1932 comprising computer program instructions executable by the processing component 1922 of the electronic device 1900 to perform the above method.
  • An embodiment of the present disclosure may be at least one of a system, a method, a computer-readable storage medium, a computer program product, and a computer program.
  • the computer program product may include a computer-readable storage medium loaded with computer-readable program instructions for enabling the processor to implement the positioning method provided by any of the foregoing embodiments of the present disclosure.
  • a computer-readable storage medium may be a tangible device that can hold and store instructions for use by the instruction execution device.
  • the computer-readable storage medium may be, for example, but not limited to, an electrical storage device, a magnetic storage device, an optical storage device, an electromagnetic storage device, a semiconductor storage device, or any suitable combination of the foregoing.
  • Computer readable storage media include: portable computer disks, hard disks, random access memory (RAM), read only memory (ROM), erasable programmable Read Memory (EPROM or Flash), Static Random Access Memory (SRAM), Portable Compact Disc Read-Only Memory (CD-ROM), Digital Video Disc (DVD), Memory Stick , a floppy disk, a mechanically encoded device, such as a punched card or a raised structure in a groove with instructions stored thereon, and any suitable combination of the foregoing.
  • RAM random access memory
  • ROM read only memory
  • EPROM or Flash erasable programmable Read Memory
  • SRAM Static Random Access Memory
  • CD-ROM Portable Compact Disc Read-Only Memory
  • DVD Digital Video Disc
  • Memory Stick a floppy disk
  • mechanically encoded device such as a punched card or a raised structure in a groove with instructions stored thereon, and any suitable combination of the foregoing.
  • Computer-readable storage media are not to be construed as transient signals per se, such as radio waves or other freely propagating electromagnetic waves, electromagnetic waves propagating through waveguides or other transmission media (eg, light pulses through fiber optic cables), or through electrical wires transmitted electrical signals.
  • the computer readable program instructions described herein may be downloaded to various computing/processing devices from a computer readable storage medium, or to an external computer or external storage device over a network such as the Internet, a local area network, a wide area network, and/or a wireless network.
  • the network may include copper transmission cables, fiber optic transmission, wireless transmission, routers, firewalls, switches, gateway computers, and/or edge servers.
  • a network adapter card or network interface in each computing/processing device receives computer-readable program instructions from a network and forwards the computer-readable program instructions for storage in a computer-readable storage medium in each computing/processing device .
  • the computer program instructions for carrying out the operations of the present disclosure may be assembly instructions, Instruction Set Architecture (ISA) instructions, machine instructions, machine-dependent instructions, microcode, firmware instructions, state setting data, or in one or more source or object code written in any combination of programming languages, including object-oriented programming languages such as Smalltalk, C++, etc., and conventional procedural programming languages such as the "C" language or similar programming languages.
  • the computer readable program instructions may execute entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer, or entirely on the remote computer or server implement.
  • the remote computer may be connected to the user's computer through any kind of network—including a Local Area Network (LAN) or a Wide Area Network (WAN)—or, may be connected to an external computer (eg, use an internet service provider to connect via the internet).
  • LAN Local Area Network
  • WAN Wide Area Network
  • custom electronic circuits such as programmable logic circuits, Field Programmable Gate Arrays (FPGAs), or Programmable Logic Arrays (PLAs), are personalized by utilizing state information of computer readable program instructions, The electronic circuit may execute computer-readable program instructions to implement embodiments of the present disclosure.
  • Embodiments of the present disclosure are described herein with reference to flowchart illustrations and/or structural diagrams of methods, apparatus (systems) and computer program products according to embodiments of the present disclosure. It will be understood that each block of the flowcharts and/or structural diagrams, and combinations of blocks in the flowcharts and/or structural diagrams, can be implemented by computer readable program instructions.
  • These computer readable program instructions may be provided to a processor of a general purpose computer, special purpose computer or other programmable data processing apparatus to produce a machine that causes the instructions when executed by the processor of the computer or other programmable data processing apparatus , resulting in means for implementing the functions/acts specified in one or more of the blocks in the flowcharts and/or constituent block diagrams.
  • These computer readable program instructions can also be stored in a computer readable storage medium, these instructions cause a computer, programmable data processing apparatus and/or other equipment to operate in a specific manner, so that the computer readable medium on which the instructions are stored includes An article of manufacture comprising instructions for implementing various aspects of the functions/acts specified in one or more blocks in the flowchart and/or constituent block diagrams.
  • Computer readable program instructions can also be loaded onto a computer, other programmable data processing apparatus, or other equipment to cause a series of operational steps to be performed on the computer, other programmable data processing apparatus, or other equipment to produce a computer-implemented process , thereby causing instructions executing on a computer, other programmable data processing apparatus, or other device to implement the functions/acts specified in one or more blocks of the flowchart and/or constituent block diagrams.
  • each block in the flowchart or block diagram may represent a module, segment, or portion of an instruction that contains one or more logic for implementing the specified Executable instructions for the function.
  • the functions noted in the blocks may also occur out of the order noted in the figures. For example, two blocks in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved.
  • each block of the constituent block diagrams and/or flowchart illustrations, and combinations of blocks in the constituent block diagrams and/or flowchart illustrations can be implemented using dedicated hardware-based hardware that performs the specified function or action. system, or can be implemented using a combination of dedicated hardware and computer instructions.
  • the computer program product can be specifically implemented by hardware, software or a combination thereof.
  • the computer program product is embodied as a computer storage medium, and in other embodiments, the computer program product is embodied as a software product, such as a software development kit (Software Development Kit, SDK) and the like.
  • Embodiments of the present disclosure provide a positioning method and apparatus, electronic device, storage medium, computer program product, and computer program, wherein, when the method is applied to a second electronic device, the method includes: after receiving a positioning request from the first electronic device In the case where the first electronic device is located, the current geographic area where the first electronic device is located is determined according to the first positioning result in the positioning request, and the positioning request includes an environmental image of the environment where the first electronic device is located and the first electronic device. A first localization result of an electronic device; determine a point cloud submap corresponding to the current geographical area from a preset point cloud map; An electronic device performs visual positioning to obtain a second positioning result of the first electronic device; and sends the second positioning result to the first electronic device.
  • positioning can be realized by the first electronic device and the second electronic device, and the success rate and positioning accuracy of positioning can be improved.

Abstract

一种定位方法及装置、电子设备、存储介质、计算机程序产品、计算机程序,其中,该方法应用于第二电子设备,包括:在接收到来自第一电子设备的定位请求的情况下,根据定位请求中的第一定位结果,确定第一电子设备所在的当前地理区域(S11),其中,定位请求中包括第一电子设备所在环境的环境图像以及第一电子设备本地的第一定位结果;从预设的点云地图中确定出与当前地理区域对应的点云子地图(S12);根据环境图像以及点云子地图,对第一电子设备进行视觉定位,得到第一电子设备的第二定位结果(S13);向第一电子设备发送第二定位结果(S14)。

Description

定位方法及装置、电子设备、存储介质、计算机程序产品、计算机程序
相关申请的交叉引用
本公开基于申请号为202011382582.6、申请日为2020年11月30日、申请名称为“定位方法及装置、电子设备和存储介质”的中国专利申请提出,并要求该中国专利申请的优先权,该中国专利申请的全部内容在此引入本申请作为参考。
技术领域
本公开涉及但不限于计算机技术领域,尤其涉及一种定位方法及装置、电子设备、存储介质、计算机程序产品、计算机程序。
背景技术
人们在室内外(例如大型商场内部、城市道路上等)行动时,经常需要通过定位确定自己的位置,通过导航前往目的地等。相关技术中,通过视觉定位的方式实现终端定位,在一些场景下很容易出现定位出错的情况。
发明内容
本公开实施例提出了一种定位技术方案,可以如下实现:
本公开实施例提供了一种定位方法,应用于第二电子设备,包括:
在接收到来自第一电子设备的定位请求的情况下,根据所述定位请求中的第一定位结果,确定所述第一电子设备所在的当前地理区域,所述定位请求中包括所述第一电子设备所在环境的环境图像以及所述第一电子设备本地的第一定位结果;从预设的点云地图中确定出与所述当前地理区域对应的点云子地图;根据所述环境图像以及所述点云子地图,对所述第一电子设备进行视觉定位,得到所述第一电子设备的第二定位结果;向所述第一电子设备发送所述第二定位结果。
在一些实施例中,所述根据所述环境图像以及所述点云子地图,对所述第一电子设备进行视觉定位,得到所述第一电子设备的第二定位结果,包括:对所述环境图像与所述点云子地图进行投影匹配,确定与所述环境图像匹配的点云信息;根据匹配的点云信息,确定所述第一电子设备的第二定位结果。
在一些实施例中,所述定位请求中还包括所述第一电子设备的重力姿态信息,所述根据所述环境图像以及所述点云子地图,对所述第一电子设备进行视觉定位,得到所述第一电子设备的第二定位结果,包括:对所述环境图像与所述点云子地图进行匹配,得到所述第一电子设备的第三定位结果;根据所述重力姿态信息,对所述第三定位结果进行验证,确定所述第二定位结果,所述第二定位结果包括所述第一电子设备的位置信息和姿态信息。
在一些实施例中,所述根据所述重力姿态信息,对所述第三定位结果进行验证,确定所述第二定位结果,包括:根据所述重力姿态信息,确定所述第一电子设备的第一方 向;根据所述第三定位结果中的姿态信息,确定所述第一电子设备的第二方向;将满足验证条件的第三定位结果确定为所述第二定位结果,所述验证条件包括所述第一方向与所述第二方向在重力方向上的角度差小于或等于角度阈值。
在一些实施例中,所述方法还包括:在所有第三定位结果均不满足所述验证条件的情况下,向所述第一电子设备发送定位失败信息。
本公开实施例提供了一种定位方法,应用于第一电子设备,包括:向第二电子设备发送定位请求,所述定位请求中包括所述第一电子设备所在环境的环境图像以及所述第一电子设备本地的第一定位结果;在接收到所述第二电子设备发送的第二定位结果的情况下,根据所述第一电子设备本地的至少一个第一历史定位结果以及所述第二电子设备发送的至少一个第二历史定位结果,判断所述第二定位结果是否满足一致性验证条件;在所述第二定位结果满足所述一致性验证条件的情况下,根据所述第二定位结果进行定位及展示。
在一些实施例中,所述根据所述第一电子设备本地的至少一个第一历史定位结果以及所述第二电子设备发送的至少一个第二历史定位结果,判断所述第二定位结果是否满足一致性验证条件,包括:根据所述第一定位结果中的第一姿态信息、所述第二定位结果中的第二姿态信息、所述第一历史定位结果中的第三姿态信息,所述第二历史定位结果中的第四姿态信息,确定姿态偏差;在所述姿态偏差小于或等于偏差阈值的情况下,确定所述第二定位结果满足一致性验证条件。
在一些实施例中,在向第二电子设备发送定位请求之前,所述方法还包括:根据所述环境图像及所述第一电子设备的本地地图,确定所述第一电子设备本地的第一定位结果,所述第一定位结果包括所述第一电子设备的位置信息和姿态信息。
在一些实施例中,在向第二电子设备发送定位请求之前,所述方法还包括:通过所述第一电子设备的惯性测量单元IMU,确定所述第一电子设备的重力姿态信息,所述定位请求中包括所述重力姿态信息。
在一些实施例中,所述根据所述第二定位结果进行定位及展示,包括:根据所述第二定位结果及目的地的地理位置,确定所述第一电子设备的导航路径;根据所述导航路径,在所述第一电子设备屏幕的显示界面中展示增强现实AR导航路径。
在一些实施例中,所述根据所述第二定位结果进行定位及展示,包括:根据所述第二定位结果及AR对象的第一位置及姿态信息,确定所述AR对象在所述第一电子设备屏幕的显示界面中的第二位置及姿态信息;根据所述第二位置及姿态信息,在所述显示界面中展示所述AR对象。
本公开实施例提供了一种定位装置,应用于第二电子设备,包括:区域确定部分,配置为在接收到来自第一电子设备的定位请求的情况下,根据所述定位请求中的第一定位结果,确定所述第一电子设备所在的当前地理区域,所述定位请求中包括所述第一电子设备所在环境的环境图像以及所述第一电子设备本地的第一定位结果;子地图确定部分,配置为从预设的点云地图中确定出与所述当前地理区域对应的点云子地图;定位部分,配置为根据所述环境图像以及所述点云子地图,对所述第一电子设备进行视觉定位,得到所述第一电子设备的第二定位结果;结果发送部分,配置为向所述第一电子设备发 送所述第二定位结果。
本公开实施例提供了一种定位装置,应用于第一电子设备,包括:请求发送部分,配置为向第二电子设备发送定位请求,所述定位请求中包括所述第一电子设备所在环境的环境图像以及所述第一电子设备本地的第一定位结果;验证部分,配置为在接收到所述第二电子设备发送的第二定位结果的情况下,根据所述第一电子设备本地的至少一个第一历史定位结果以及所述第二电子设备发送的至少一个第二历史定位结果,判断所述第二定位结果是否满足一致性验证条件;定位及展示部分,配置为在所述第二定位结果满足所述一致性验证条件的情况下,根据所述第二定位结果进行定位及展示。
本公开实施例提供了一种电子设备,包括:处理器;配置为存储处理器可执行指令的存储器;其中,所述处理器被配置为调用所述存储器存储的指令,以执行上述方法。
本公开实施例提供了一种计算机可读存储介质,其上存储有计算机程序指令,所述计算机程序指令被处理器执行时实现上述方法。
本公开实施例提供了一种计算机程序,包括计算机可读代码,在计算机可读代码在设备上运行的情况下,设备中的处理器执行用于实现上述方法的指令。
本公开实施例还提供了一种计算机程序产品,用于存储计算机可读指令,所述计算机可读指令被执行时使得计算机执行上述方法。
根据本公开的实施例,能够使得第一电子设备发送的定位请求中包括本地的定位结果,第二电子设备根据本地的定位结果确定第一电子设备所在的当前地理区域,并根据当前地理区域的子地图进行定位,从而提高定位的成功率和定位精度,降低误匹配的概率。
应当理解的是,以上的一般描述和后文的细节描述仅是示例性和解释性的,而非限制本公开。根据下面参考附图对示例性实施例的详细说明,本公开的其它特征将变得清楚。
附图说明
此处的附图被并入说明书中并构成本说明书的一部分,这些附图示出了符合本公开的实施例,并与说明书一起用于说明本公开的技术方案。
图1为本公开实施例提供的一种定位方法的实现流程示意图。
图2为本公开实施例提供的一种定位方法的实现流程示意图。
图3为本公开实施例提供的一种定位装置的组成结构示意图。
图4为本公开实施例提供的一种定位装置的组成结构示意图。
图5为本公开实施例提供的一种电子设备的组成结构示意图。
图6为本公开实施例提供的一种电子设备的组成结构示意图。
具体实施方式
以下将参考附图详细说明本公开的各种示例性实施例、特征和方面。附图中相同的附图标记表示功能相同或相似的元件。尽管在附图中示出了实施例的各种方面,但是除非特别指出,不必按比例绘制附图。
在这里专用的词“示例性”意为“用作例子、实施例或说明性”。这里作为“示例 性”所说明的任何实施例不必解释为优于或好于其它实施例。
本文中术语“和/或”,仅仅是一种描述关联对象的关联关系,表示可以存在三种关系,例如,A和/或B,可以表示:单独存在A,同时存在A和B,单独存在B这三种情况。另外,本文中术语“至少一种”表示多种中的任意一种或多种中的至少两种的任意组合,例如,包括A、B、C中的至少一种,可以表示包括从A、B和C构成的集合中选择的任意一个或多个元素。
另外,为了更好地说明本公开,在下文的具体实施方式中给出了众多的具体细节。本领域技术人员应当理解,没有某些具体细节,本公开同样可以实施。在一些实例中,对于本领域技术人员熟知的方法、手段、元件和电路未作详细描述,以便于凸显本公开的主旨。
为了更好地理解本公开实施例提供的定位方法,下面先对相关技术中采用的定位方法进行说明。
相关技术中,在通过视觉定位的方式实现终端定位的情况下,通常仅依赖于用户上传的图像进行定位,导致定位精度无法保证,尤其在弱纹理、重复纹理或大场景等应用环境下,很容易出现定位出错的情况。
本公开实施例提供一种定位方法,可例如应用于大型商场、交通枢纽、医院、大型展馆等室内外场景中,提高定位精度。该定位方法可通过第一电子设备和第二电子设备实现。第一电子设备可例如包括终端设备,第二电子设备可例如包括云端服务器。
图1为本公开实施例提供的一种定位方法的实现流程示意图,所述定位方法可应用于第二电子设备,如图1所示,所述定位方法包括:
在步骤S11中,在接收到来自第一电子设备的定位请求的情况下,根据所述定位请求中的第一定位结果,确定所述第一电子设备所在的当前地理区域,所述定位请求中包括所述第一电子设备所在环境的环境图像以及所述第一电子设备本地的第一定位结果;
在步骤S12中,从预设的点云地图中确定出与所述当前地理区域对应的点云子地图;
在步骤S13中,根据所述环境图像以及所述点云子地图,对所述第一电子设备进行视觉定位,得到所述第一电子设备的第二定位结果;
在步骤S14中,向所述第一电子设备发送所述第二定位结果。
在一些实施例中,第二电子设备可例如为云端服务器,存储有第一电子设备所在的整体地理区域(例如商场内部区域、城市区域等)的点云地图。
在一些实施例中,第一电子设备可以为终端设备,例如用户设备(User Equipment,UE)、移动设备、用户终端、终端、蜂窝电话、无绳电话、个人数字助理(Personal Digital Assistant,PDA)、手持设备、计算设备、车载设备、可穿戴设备等。所述方法可以通过处理器调用存储器中存储的计算机可读指令的方式来实现。
在一些实施例中,在持有或穿戴有第一电子设备的用户需要确定自身的位置的情况下,可通过第一电子设备的采集部件(例如摄像头)采集所在环境的环境图像,例如拍摄第一电子设备所面对的景物的图像。该环境图像可以为一个或多个图像,也可以为包括多帧图像的短视频,本公开实施例对此不作限制。
在一些实施例中,可在第一电子设备本地运行一套同步定位与地图构建 (Simultaneous Localization And Mapping,SLAM)系统。在进行定位时,先通过本地SLAM系统进行初步的定位,再请求云端的定位结果,修正本地SLAM的位置和姿态信息。
在一些实施例中,第一电子设备中可存储有第一电子设备所在的整体地理区域的本地地图,该本地地图的精度低于第二电子设备中的点云地图的精度。在进行定位时,第一电子设备可采集环境图像,并根据环境图像和本地地图,通过SLAM系统进行初步定位,得到第一电子设备本地的定位结果(称为第一定位结果)。
在一些实施例中,该第一定位结果可包括第一电子设备的位置信息和姿态信息,该第一定位结果的定位精度可能低于云端的定位结果。
在一些实施例中,第一电子设备可向第二电子设备发送定位请求,该定位请求中可包括环境图像以及第一定位结果。通过这种方式,可以将本地SLAM系统的定位结果,作为云端定位时的先验信息,使得第二电子设备能够提高匹配的效率,提高定位精度。
在一些实施例中,在步骤S11中,第二电子设备在接收到来自第一电子设备的定位请求的情况下,可根据第一定位结果,确定所述第一电子设备所在的当前地理区域。也即,第二电子设备可利用第一电子设备本地提供的定位信息,例如姿态(Pose),确定第一电子设备所在的区域,以便进行局部小地图定位,提高定位精度。
其中,该当前地理区域可以为第一电子设备本地的定位位置附近一定范围内的区域,例如与第一电子设备本地的定位位置之间的距离在预设距离(例如5-10米)内的圆形区域,本公开实施例对该当前地理区域的具体范围不作限制。
在一些实施例中,在步骤S12中,可从整体地理区域的点云地图中确定出与该当前地理区域对应的点云子地图。在步骤S13中,可根据所述环境图像以及所述点云子地图,对所述第一电子设备进行视觉定位,得到所述第一电子设备的第二定位结果。
在一些实施例中,第二电子设备可提取环境图像的特征信息。可例如通过预训练的神经网络对环境图像进行特征提取,得到环境图像的特征信息。本公开实施例对特征提取的具体方式不作限制。
在一些实施例中,在得到环境图像的特征信息后,第二电子设备可将该特征信息与点云子地图进行匹配,确定相匹配的视觉定位结果(可称为第二定位结果)。本公开实施例对特征信息与点云子地图匹配的具体方式不作限制。
在一些实施例中,该第二定位结果包括第一电子设备的位置信息和姿态信息。其中,位置信息可包括第一电子设备的位置坐标;姿态信息可包括第一电子设备的朝向、俯仰角度等。
在一些实施例中,在步骤S14中,第二电子设备可将该第二定位结果发送给第一电子设备,以便修正第一电子设备的本地SLAM的位置和姿态信息。
根据本公开的实施例,能够使得第一电子设备发送的定位请求中包括本地的定位结果,第二电子设备根据本地的定位结果确定第一电子设备所在的当前地理区域,并根据当前地理区域的子地图进行定位,从而提高定位的成功率和定位精度,降低误匹配的概率。
在一些实施例中,步骤S13可包括:
对所述环境图像与所述点云子地图进行投影匹配,确定与所述环境图像匹配的点云信息;
根据匹配的点云信息,确定所述第一电子设备的第二定位结果。
举例来说,第二电子设备可将三维的点云子地图投影为二维的图像,再与环境图像进行匹配。这样,环境图像中的环境特征点能够仅与点云子地图投影到该环境特征点半径之内的特征点进行匹配,从而降低误匹配的概率,提高匹配效率。
在一些实施例中,经匹配后,可确定出与环境图像匹配的点云信息;进而可将匹配的点云信息对应的位置和姿态信息,确定为第一电子设备的第二定位结果,从而完成定位过程。
通过这种方式,能够降低误匹配的概率,提高匹配效率。
在一些实施例中,在第一电子设备中通常设置有惯性测量单元(Inertial measurement unit,IMU),用于获取第一电子设备的速度、加速度、角速度等信息。第一电子设备可根据IMU确定出第一电子设备的重力姿态(Attitude)信息,例如包括第一电子设备的方向,本公开实施例对此不作限制。
在一些实施例中,第一电子设备发送的定位请求中可包括第一电子设备的重力姿态信息。该重力姿态信息较为准确,可作为云端定位时的先验信息。
在一些实施例中,步骤S13可包括:
对所述环境图像与所述点云子地图进行匹配,得到所述第一电子设备的第三定位结果;
根据所述重力姿态信息,对所述第三定位结果进行验证,确定所述第二定位结果,所述第二定位结果包括所述第一电子设备的位置信息和姿态信息。
举例来说,第二电子设备可对环境图像与当前地理区域的点云子地图进行匹配,得到初步的定位结果(可称为第三定位结果)。本公开实施例对环境图像与点云子地图匹配的具体方式不作限制。
在一些实施例中,根据定位请求中的重力姿态信息,第二电子设备可对第三定位结果进行验证,以便剔除错误的定位结果。
在一些实施例中,根据所述重力姿态信息,对所述第三定位结果进行验证,确定所述第二定位结果的步骤,可包括:
根据所述重力姿态信息,确定所述第一电子设备的第一方向;
根据所述第三定位结果中的姿态信息,确定所述第一电子设备的第二方向;
将满足验证条件的第三定位结果确定为所述第二定位结果,所述验证条件包括所述第一方向与所述第二方向在重力方向上的角度差小于或等于角度阈值。
举例来说,根据定位请求中的重力姿态信息,可确定出第一电子设备的第一方向R imu;根据第三定位结果中的姿态信息,可确定出第一电子设备的第二方向R cloud;根据第一方向R imu和第二方向R cloud,可确定第一方向与所述第二方向在重力方向上的角度差。
在一些实施例中,令
Figure PCTCN2021101040-appb-000001
z=(0,0,1),可通过如下公式1-1确定该角度差A:
A=acos(dR*z)         (1-1);
其中,z表示重力方向的坐标轴,dR*z表示向量dR在z轴方向上的值,acos()表示反余弦函数。
在一些实施例中,在第一方向与第二方向在重力方向上的角度差A小于或等于预设的角度阈值的情况下,可认为第三定位结果的姿态处于误差允许的范围内,为正确的定位结果,满足验证条件。也即,验证条件包括第一方向与第二方向在重力方向上的角度差小于或等于角度阈值。本公开实施例对角度阈值的具体取值不作限制。
在第三定位结果为一个或多个的情况下,可将满足验证条件的第三定位结果确定为第二定位结果。并且,可认为不满足验证条件的第三定位结果超出误差允许的范围,为错误的定位结果,可将不满足验证条件的第三定位结果删除。
通过这种方式,能够剔除错误的定位结果,提高定位结果的正确率。
在一些实施例中,该定位方法还可包括:
在所有第三定位结果均不满足所述验证条件的情况下,向所述第一电子设备发送定位失败信息。
举例来说,在第三定位结果为一个或多个的情况下,如果所有的第三定位结果均不满足验证条件,也即各个第三定位结果的第一方向与第二方向在重力方向上的角度差A均大于预设的角度阈值,则可认为各个第三定位结果的姿态均超出误差允许的范围,为错误的定位结果,确定第三定位结果验证失败。
在该情况下,由于不存在满足验证条件的第三定位结果,则可认为本次云端定位失败,可向第一电子设备返回定位失败信息,等待第一电子设备再次发送定位请求。
在一些实施例中,也可以再次对环境图像与点云子地图进行匹配,以便获取新的定位结果。本公开实施例对第三定位结果验证失败后的具体处理方式不作限制。
通过这种方式,能够在不存在满足验证条件的定位结果时向终端返回定位失败信息,从而避免发回错误的定位结果,提高定位结果的正确率。
图2为本公开实施例提供的一种定位方法的实现流程示意图,所述定位方法可应用于第一电子设备,如图2所示,所述定位方法包括:
在步骤S21中,向第二电子设备发送定位请求,所述定位请求中包括所述第一电子设备所在环境的环境图像以及所述第一电子设备本地的第一定位结果;
在步骤S22中,在接收到所述第二电子设备发送的第二定位结果的情况下,根据所述第一电子设备本地的至少一个第一历史定位结果以及所述第二电子设备发送的至少一个第二历史定位结果,判断所述第二定位结果是否满足一致性验证条件;
在步骤S23中,在所述第二定位结果满足所述一致性验证条件的情况下,根据所述第二定位结果进行定位及展示。
举例来说,第一电子设备可以为终端设备。第二电子设备可例如为云端服务器,存储有第一电子设备所在的整体地理区域(例如商场内部区域、城市区域等)的点云地图。
在持有或穿戴有第一电子设备的用户需要确定自身的位置的情况下,可通过第一电子设备的采集部件(例如摄像头)采集所在环境的环境图像,例如拍摄第一电子设备所面对的景物的图像。该环境图像可以为一个或多个图像,也可以为包括多帧图像的短视 频,本公开实施例对此不作限制。
在一些实施例中,可在第一电子设备本地运行一套SLAM系统。在进行定位时,先通过本地SLAM系统进行初步的定位,再请求云端的定位结果,修正本地SLAM的位置和姿态信息。
在一些实施例中,在步骤S21中,第一电子设备可向第二电子设备发送定位请求,该定位请求中可包括环境图像以及本地的第一定位结果。通过这种方式,可以将本地SLAM系统的定位结果,作为云端定位时的先验信息,使得第二电子设备能够增加匹配的效率,提高定位精度。
在一些实施例中,第二电子设备在接收到来自第一电子设备的定位请求的情况下,可根据定位请求中的第一定位结果(例如SLAM提供的姿态Pose),确定第一电子设备所在的当前地理区域,以便进行局部小地图定位,提高定位精度。
其中,该当前地理区域可以为第一电子设备本地的定位位置附近一定范围内的区域,例如与第一电子设备本地的定位位置之间的距离在预设距离(例如5-10米)内的圆形区域,本公开实施例对该当前地理区域的具体范围不作限制。
在一些实施例中,第二电子设备定位得到的第二定位结果可包括第一电子设备的位置信息和姿态信息。其中,位置信息可包括第一电子设备的位置坐标;姿态信息可包括第一电子设备的朝向、俯仰角度等。
在一些实施例中,在步骤S22中,第一电子设备在接收到第二电子设备发送的第二定位结果后,可对该第二定位结果进行一致性验证,验证第二定位结果的准确性。第一电子设备可根据本地的至少一个第一历史定位结果以及第二电子设备发送的至少一个第二历史定位结果,判断当前的第二定位结果是否满足一致性验证条件。
在一些实施例中,第一历史定位结果可包括在发送本次的定位请求之前,第一电子设备进行本地定位得到的第一定位结果;第二历史定位结果可包括在接收到第二电子设备本次的第二定位结果之前,第一电子设备已接收到的第二定位结果。例如,本次为第k次定位,则第一历史定位结果可包括第1次至第k-1次本地定位的全部或部分第一定位结果,第二历史定位结果可包括第1次至第k-1次接收的全部或部分第二定位结果。
在一些实施例中,可分别计算本地的第一历史定位结果与当前的第一定位结果之间的位置差异,以及云端的第二历史定位结果与当前的第二定位结果之间的定位变化;在两组定位变化之间的差异较小的情况下,可认为满足一致性验证条件;反之,在两组定位变化之间的差异较大的情况下,可认为不满足一致性验证条件。本公开实施例对一致性验证条件的具体设定不作限制。
在一些实施例中,在步骤S23中,在第二定位结果满足一致性验证条件的情况下,可将第二定位结果作为第一电子设备最终的定位结果,可根据该第二定位结果进行定位及展示。也即,可通过第二定位结果约束住本地SLAM系统的视觉惯性里程计(Visual-inertial odometry,VIO)模块的输出结果。根据第一电子设备当前的应用场景,通过VIO模块的输出结果来渲染待展示的相应内容,并在显示界面中进行展示。
例如,在视觉导航的应用场景下,可根据第二定位结果及目的地位置,确定出导航路径并在显示界面中展示,从而实现导航功能;在虚拟物体展示的应用场景下,可根据 第二定位结果,确定出待展示的虚拟物体的位置及姿态,并在显示界面中展示,从而实现精确的虚拟物体展示。本公开实施例对显示界面中展示的具体内容不作限制。
根据本公开的实施例,能够向第二电子设备发送包括环境图像及本地定位结果的定位请求,以便实现高精度地图的定位,提高定位精度及成功率;能够对第二电子设备返回的定位结果进行一致性验证,从而过滤错误的定位结果,提高定位的质量。
在一些实施例中,步骤S22可包括:
根据所述第一定位结果中的第一姿态信息、所述第二定位结果中的第二姿态信息、所述第一历史定位结果中的第三姿态信息,所述第二历史定位结果中的第四姿态信息,确定姿态偏差;
在所述姿态偏差小于或等于偏差阈值的情况下,确定所述第二定位结果满足一致性验证条件。
举例来说,根据本地以前的第一历史定位结果中的第三姿态信息与本地当前的第一定位结果中的第一姿态信息,可计算出第一电子设备在本地定位的第一姿态变化值;根据云端以前发送的第二历史定位结果中的第四姿态信息与云端当前发送的第二定位结果中的第二姿态信息,计算出第一电子设备在云端定位的第二姿态变化值。
在一些实施例中,根据第一姿态变化值与第二姿态变化值,可确定姿态变化值之间的姿态偏差。例如,在采用某一次定位的历史定位结果的情况下,可通过如下公式1-2计算该姿态偏差|ddT|:
Figure PCTCN2021101040-appb-000002
其中,
Figure PCTCN2021101040-appb-000003
表示当前的第i次第一定位结果中的第一姿态信息;
Figure PCTCN2021101040-appb-000004
表示之前的第j次第一历史定位结果中的第三姿态信息;dT slam表示第一姿态变化值;
Figure PCTCN2021101040-appb-000005
表示当前的第i次第二定位结果中的第二姿态信息;
Figure PCTCN2021101040-appb-000006
表示之前的第j次第二历史定位结果中的第四姿态信息;dT cloud表示第二姿态变化值;ddT的绝对值表示姿态偏差,i,j为正整数且i>j。
在一些实施例中,在该姿态偏差小于或等于预设的偏差阈值的情况下,可认为云端当前发送的第二定位结果处于误差允许的范围内,与本地SLAM的运动状态一致,满足一致性验证条件,为正确的定位结果。在该情况下,可根据该第二定位结果进行相应的定位及展示。本公开实施例对偏差阈值的具体取值不作限制。
在一些实施例中,在该姿态偏差大于偏差阈值的情况下,可认为云端当前发送的第二定位结果超出误差允许的范围,与本地SLAM的运动状态不一致,不满足一致性验证条件,为错误的定位结果。在该情况下,可删除该第二定位结果,或不采用该第二定位结果来约束本地SLAM系统的VIO模块的输出结果,并再次向第二电子设备发送定位请求。
通过这种方式,能够实现云端定位结果的一致性验证,从而过滤错误的定位结果,提高定位的质量。
在一些实施例中,在步骤S21之前,所述方法还包括:
根据所述环境图像及所述第一电子设备的本地地图,确定所述第一电子设备本地的第一定位结果,所述第一定位结果包括所述第一电子设备的位置信息和姿态信息。
举例来说,第一电子设备中可存储有第一电子设备所在的整体地理区域的本地地图,该本地地图的精度低于第二电子设备中的点云地图的精度。在进行定位时,第一电子设备可采集环境图像,并根据环境图像和本地地图,通过SLAM系统进行初步定位,得到第一电子设备本地的定位结果(称为第一定位结果)。
在一些实施例中,该第一定位结果可包括第一电子设备的位置信息和姿态信息,该第一定位结果的定位精度可能低于云端的定位结果。
在一些实施例中,第一电子设备在步骤S21中向第二电子设备发送定位请求时,定位请求中包括本地的第一定位结果。通过这种方式,可以将本地SLAM系统的定位结果,作为云端定位时的先验信息,使得第二电子设备能够提高匹配的效率,提高定位精度,并剔除错误的匹配结果。
在一些实施例中,在步骤S21之前,所述方法还包括:
通过所述第一电子设备的惯性测量单元IMU,确定所述第一电子设备的重力姿态信息,所述定位请求中包括所述重力姿态信息。
举例来说,在第一电子设备中通常设置有惯性测量单元IMU,用于获取第一电子设备的速度、加速度、角速度等信息。第一电子设备可根据IMU确定出第一电子设备的重力姿态(attitude)信息,例如包括第一电子设备的方向,本公开实施例对此不作限制。
在一些实施例中,第一电子设备发送的定位请求中可包括该重力姿态信息,该重力姿态信息较为准确,可作为云端定位时的先验信息,云端可对第三定位结果进行验证,以便剔除错误的定位结果,从而提高定位结果的正确率。
在一些实施例中,步骤S23可包括:
根据所述第二定位结果及目的地的地理位置,确定所述第一电子设备的导航路径;
根据所述导航路径,在所述第一电子设备屏幕的显示界面中展示增强现实AR导航路径。
举例来说,在进行AR导航的应用场景下,可根据第二定位结果中的位置信息和姿态信息,以及用户设定的目的地的地理位置,确定出第一电子设备的导航路径。本公开实施例对导航路径的具体确定方式不作限制。
在一些实施例中,根据导航路径,可在第一电子设备屏幕的显示界面的实景图像或全景图像中展示AR导航路径,以便指示用户按照AR导航路径行进。该AR导航路径例如包括沿着导航路径的AR箭头。本公开实施例对AR导航路径的具体形式不作限制。
通过这种方式,可以实现实景图像中的AR导航,提高导航路线的直观性,提高AR导航路径展示的精度。
在一些实施例中,步骤S23可包括:
根据所述第二定位结果及AR对象的第一位置及姿态信息,确定所述AR对象在所述第一电子设备屏幕的显示界面中的第二位置及姿态信息;
根据所述第二位置及姿态信息,在所述显示界面中展示所述AR对象。
举例来说,在展示AR对象的应用场景下,可根据第二定位结果中的位置信息和姿 态信息,以及待展示的AR对象的第一位置及姿态信息,确定出AR对象在第一电子设备屏幕的显示界面中的第二位置及姿态信息。本公开实施例对具体的确定方式不作限制。
在一些实施例中,根据第二位置及姿态信息,可在显示界面的实景图像中展示该AR对象。其中,待展示的AR对象可包括AR标记、虚拟物体等,例如虚拟的景观、虚拟的动物等。本公开实施例对AR对象的具体类别不作限制。
通过这种方式,可以实现实景图像中的AR对象展示,提高AR对象展示的精度。
根据本公开实施例的定位方法,终端向云端发送的定位请求中包括本地SLAM的定位结果,使得云端能够根据本地定位结果确定终端所在的当前地理区域,并根据当前地理区域的子地图进行定位,从而提高定位的成功率和定位精度,降低误匹配的概率;定位请求中还包括IMU的重力姿态信息,使得云端能够根据重力姿态信息对云端定位结果进行验证,以便剔除错误的定位结果,提高定位结果的正确率。
根据本公开实施例的定位方法,终端在接收到云端返回的定位结果后,能够根据历史定位结果对当前的定位结果进行一致性验证,过滤错误的定位结果,筛选出合格的定位结果,从而提高定位的质量。
根据本公开实施例的定位方法,能够应用于增强现实AR的各种应用场景,例如AR云、AR导航等场景;以及基于位置的服务(Location Based Services,LBS)的各种应用场景中,提高定位、展示及交互的效果。尤其在地图较大的场景、重复较多的场景、弱纹理/重复纹理的场景等情况下,该方法能够显著提升高精度地图的定位质量和定位成功率。
可以理解,本公开提及的上述各个方法实施例,在不违背原理逻辑的情况下,均可以彼此相互结合形成结合后的实施例。本领域技术人员可以理解,在具体实施方式的上述方法中,各步骤的具体执行顺序应当以其功能和可能的内在逻辑确定。
此外,本公开实施例还提供了定位装置、电子设备、计算机可读存储介质、程序,上述均可用来实现本公开实施例提供的任一种定位方法,相应技术方案和描述和参见方法部分的相应记载。
图3为本公开实施例提供的一种定位装置的组成结构示意图,该装置应用于第二电子设备,如图3所示,所述装置包括:
区域确定部分31,配置为在接收到来自第一电子设备的定位请求的情况下,根据所述定位请求中的第一定位结果,确定所述第一电子设备所在的当前地理区域,所述定位请求中包括所述第一电子设备所在环境的环境图像以及所述第一电子设备本地的第一定位结果;
子地图确定部分32,配置为从预设的点云地图中确定出与所述当前地理区域对应的点云子地图;
定位部分33,配置为根据所述环境图像以及所述点云子地图,对所述第一电子设备进行视觉定位,得到所述第一电子设备的第二定位结果;
结果发送部分34,配置为向所述第一电子设备发送所述第二定位结果。
在一些实施例中,所述定位部分包括:第一匹配子部分,配置为对所述环境图像与所述点云子地图进行投影匹配,确定与所述环境图像匹配的点云信息;结果确定部分, 配置为根据匹配的点云信息,确定所述第一电子设备的第二定位结果。
在一些实施例中,所述定位请求中还包括所述第一电子设备的重力姿态信息,所述定位部分包括:第二匹配子部分,配置为对所述环境图像与所述点云子地图进行匹配,得到所述第一电子设备的第三定位结果;第一验证子部分,配置为根据所述重力姿态信息,对所述第三定位结果进行验证,确定所述第二定位结果,所述第二定位结果包括所述第一电子设备的位置信息和姿态信息。
在一些实施例中,所述第一验证子部分还配置为:根据所述重力姿态信息,确定所述第一电子设备的第一方向;根据所述第三定位结果中的姿态信息,确定所述第一电子设备的第二方向;将满足验证条件的第三定位结果确定为所述第二定位结果,所述验证条件包括所述第一方向与所述第二方向在重力方向上的角度差小于或等于角度阈值。
在一些实施例中,所述装置还包括:信息发送部分,配置为在所有第三定位结果均不满足所述验证条件的情况下,向所述第一电子设备发送定位失败信息。
图4为本公开实施例提供的一种定位装置的组成结构示意图,该装置应用于第一电子设备,如图4所示,所述装置包括:
请求发送部分41,配置为向第二电子设备发送定位请求,所述定位请求中包括所述第一电子设备所在环境的环境图像以及所述第一电子设备本地的第一定位结果;
验证部分42,配置为在接收到所述第二电子设备发送的第二定位结果的情况下,根据所述第一电子设备本地的至少一个第一历史定位结果以及所述第二电子设备发送的至少一个第二历史定位结果,判断所述第二定位结果是否满足一致性验证条件;
定位及展示部分43,配置为在所述第二定位结果满足所述一致性验证条件的情况下,根据所述第二定位结果进行定位及展示。
在一些实施例中,所述验证部分包括:偏差确定子部分,配置为根据所述第一定位结果中的第一姿态信息、所述第二定位结果中的第二姿态信息、所述第一历史定位结果中的第三姿态信息,所述第二历史定位结果中的第四姿态信息,确定姿态偏差;第二验证子部分,配置为在所述姿态偏差小于或等于偏差阈值的情况下,确定所述第二定位结果满足一致性验证条件。
在一些实施例中,所述装置还包括:本地定位部分,配置为根据所述环境图像及所述第一电子设备的本地地图,确定所述第一电子设备本地的第一定位结果。
在一些实施例中,所述装置还包括:重力姿态确定部分,配置为通过所述第一电子设备的惯性测量单元IMU,确定所述第一电子设备的重力姿态信息,所述定位请求中包括所述重力姿态信息。
在一些实施例中,所述定位及展示部分还配置为:根据所述第二定位结果及目的地的地理位置,确定所述第一电子设备的导航路径;根据所述导航路径,在所述第一电子设备屏幕的显示界面中展示增强现实AR导航路径。
在一些实施例中,所述定位及展示部分还配置为:根据所述第二定位结果及AR对象的第一位置及姿态信息,确定所述AR对象在所述第一电子设备屏幕的显示界面中的第二位置及姿态信息;根据所述第二位置及姿态信息,在所述显示界面中展示所述AR对象。
在一些实施例中,本公开实施例提供的装置具有的功能或包含的部分可以配置为执行上文方法实施例描述的方法,其具体实现可以参照上文方法实施例的描述。
在本公开实施例以及其他的实施例中,“部分”可以是部分电路、部分处理器、部分程序或软件等等,当然也可以是单元,还可以是模块也可以是非模块化的。
本公开实施例还提供一种计算机可读存储介质,其上存储有计算机程序指令,所述计算机程序指令被处理器执行时实现上述方法。计算机可读存储介质可以是非易失性计算机可读存储介质,也可以是易失性计算机可读存储介质。
本公开实施例还提供一种电子设备,包括:处理器;配置为存储处理器可执行指令的存储器;其中,所述处理器被配置为调用所述存储器存储的指令,以执行上述方法。
本公开实施例还提供了一种计算机程序,包括计算机可读代码,在计算机可读代码在设备上运行的情况下,设备中的处理器执行用于实现如上任一实施例提供的定位方法的指令。
本公开实施例还提供了一种计算机程序产品,用于存储计算机可读指令,指令被执行时使得计算机执行上述任一实施例提供的定位方法的操作。
电子设备可以被实施为终端、服务器或其它形态的设备。
图5为本公开实施例提供的一种电子设备800的组成结构示意图。例如,电子设备800可以是移动电话,计算机,数字广播终端,消息收发设备,游戏控制台,平板设备,医疗设备,健身设备,个人数字助理等终端。
参照图5,电子设备800可以包括以下一个或多个组件:处理组件802,存储器804,电源组件806,多媒体组件808,音频组件810,输入/输出(Input/Output,I/O)接口812,传感器组件814,以及通信组件816。
处理组件802通常控制电子设备800的整体操作,诸如与显示,电话呼叫,数据通信,相机操作和记录操作相关联的操作。处理组件802可以包括一个或多个处理器820来执行指令,以完成上述的方法的全部或部分步骤。此外,处理组件802可以包括一个或多个模块,便于处理组件802和其他组件之间的交互。例如,处理组件802可以包括多媒体模块,以方便多媒体组件808和处理组件802之间的交互。
存储器804被配置为存储各种类型的数据以支持在电子设备800的操作。这些数据的示例包括用于在电子设备800上操作的任何应用程序或方法的指令,联系人数据,电话簿数据,消息,图片,视频等。存储器804可以由任何类型的易失性或非易失性存储设备或者它们的组合实现,如静态随机存取存储器(Static Random-Access Memory,SRAM),电可擦除可编程只读存储器(Electrically Erasable Programmable Read Only Memory,EEPROM),可擦除可编程只读存储器(Electrical Programmable Read Only Memory,EPROM),可编程只读存储器(Programmable read-only memory,PROM),只读存储器(Read-Only Memory,ROM),磁存储器,快闪存储器,磁盘或光盘。
电源组件806为电子设备800的各种组件提供电力。电源组件806可以包括电源管理系统,一个或多个电源,及其他与为电子设备800生成、管理和分配电力相关联的组件。
多媒体组件808包括在所述电子设备800和用户之间的提供一个输出接口的屏幕。 在一些实施例中,屏幕可以包括液晶显示器(Liquid Crystal Display,LCD)和触摸面板(Touch panel,TP)。如果屏幕包括触摸面板,屏幕可以被实现为触摸屏,以接收来自用户的输入信号。触摸面板包括一个或多个触摸传感器以感测触摸、滑动和触摸面板上的手势。所述触摸传感器可以不仅感测触摸或滑动动作的边界,而且还检测与所述触摸或滑动操作相关的持续时间和压力。在一些实施例中,多媒体组件808包括一个前置摄像头和/或后置摄像头。当电子设备800处于操作模式,如拍摄模式或视频模式的情况下,前置摄像头和/或后置摄像头可以接收外部的多媒体数据。每个前置摄像头和后置摄像头可以是一个固定的光学透镜系统或具有焦距和光学变焦能力。
音频组件810被配置为输出和/或输入音频信号。例如,音频组件810包括一个麦克风(MIC),当电子设备800处于操作模式,如呼叫模式、记录模式和语音识别模式的情况下,麦克风被配置为接收外部音频信号。在一些实施例中,所接收的音频信号可以被存储在存储器804或经由通信组件816发送。在一些实施例中,音频组件810还包括一个扬声器,用于输出音频信号。
I/O接口812为处理组件802和外围接口模块之间提供接口,上述外围接口模块可以是键盘,点击轮,按钮等。这些按钮可包括但不限于:主页按钮、音量按钮、启动按钮和锁定按钮。
传感器组件814包括一个或多个传感器,用于为电子设备800提供各个方面的状态评估。例如,传感器组件814可以检测到电子设备800的打开/关闭状态,组件的相对定位,例如所述组件为电子设备800的显示器和小键盘,传感器组件814还可以检测电子设备800或电子设备800一个组件的位置改变,用户与电子设备800接触的存在或不存在,电子设备800方位或加速/减速和电子设备800的温度变化。传感器组件814可以包括接近传感器,被配置用来在没有任何的物理接触时检测附近物体的存在。传感器组件814还可以包括光传感器,如互补金属氧化物半导体(Complementary Metal-Oxide-Semiconductor,CMOS)或电荷耦合装置(Charge Coupled Device,CCD)图像传感器,用于在成像应用中使用。在一些实施例中,该传感器组件814还可以包括加速度传感器,陀螺仪传感器,磁传感器,压力传感器或温度传感器。
通信组件816被配置为便于电子设备800和其他设备之间有线或无线方式的通信。电子设备800可以接入基于通信标准的无线网络,如无线网络(WiFi),第二代移动通信技术(The 2nd Generation,2G)或第三代移动通信技术(The 3rd Generation,3G),或它们的组合。在一个示例性实施例中,通信组件816经由广播信道接收来自外部广播管理系统的广播信号或广播相关信息。在一个示例性实施例中,所述通信组件816还包括近场通信(Near Field Communication,NFC)模块,以促进短程通信。例如,在NFC模块可基于射频识别(Radio Frequency Identification,RFID)技术,红外数据协会(Infrared Data Association,IrDA)技术,超宽带(Ultra Wide Band,UWB)技术,蓝牙(Bluetooth,BT)技术和其他技术来实现。
在示例性实施例中,电子设备800可以被一个或多个应用专用集成电路(Application Specific Integrated Circuit,ASIC)、数字信号处理器(Digital Signal Processor,DSP)、数字信号处理设备(Digital Signal Processing Device,DSPD)、可编程逻辑器件 (Programmable Logic Device,PLD)、现场可编程门阵列(Field Programmable Gate Array,FPGA)、控制器、微控制器、微处理器或其他电子元件实现,用于执行上述方法。
在示例性实施例中,还提供了一种非易失性计算机可读存储介质,例如包括计算机程序指令的存储器804,上述计算机程序指令可由电子设备800的处理器820执行以完成上述方法。
图6为本公开实施例提供的一种电子设备1900的组成结构示意图。例如,电子设备1900可以被实施为一服务器。参照图6,电子设备1900包括处理组件1922,在一些实施例中可以包括一个或多个处理器,以及由存储器1932所代表的存储器资源,用于存储可由处理组件1922的执行的指令,例如应用程序。存储器1932中存储的应用程序可以包括一个或一个以上的每一个对应于一组指令的模块。此外,处理组件1922被配置为执行指令,以执行上述方法。
电子设备1900还可以包括一个电源组件1926被配置为执行电子设备1900的电源管理,一个有线或无线网络接口1950被配置为将电子设备1900连接到网络,和一个输入输出(I/O)接口1958。电子设备1900可以操作基于存储在存储器1932的操作系统,例如微软服务器操作系统(Windows Server TM),苹果公司推出的基于图形用户界面操作系统(Mac OS X TM),多用户多进程的计算机操作系统(Unix TM),自由和开放原代码的类Unix操作系统(Linux TM),开放原代码的类Unix操作系统(FreeBSD TM)或类似。
在一些实施例中,还提供了一种非易失性计算机可读存储介质,例如包括计算机程序指令的存储器1932,上述计算机程序指令可由电子设备1900的处理组件1922执行以完成上述方法。
本公开实施例可以是系统、方法、计算机可读存储介质、计算机程序产品、计算机程序中的至少一种。计算机程序产品可以包括计算机可读存储介质,其上载有用于使处理器实现本公开上述任一实施例提供的定位方法的计算机可读程序指令。
计算机可读存储介质可以是可以保持和存储由指令执行设备使用的指令的有形设备。计算机可读存储介质例如可以是(但不限于)电存储设备、磁存储设备、光存储设备、电磁存储设备、半导体存储设备或者上述的任意合适的组合。计算机可读存储介质的更具体的例子(非穷举的列表)包括:便携式计算机盘、硬盘、随机存取存储器(Random Access Memory,RAM)、只读存储器(ROM)、可擦式可编程只读存储器(EPROM或闪存)、静态随机存取存储器(SRAM)、便携式压缩盘只读存储器(Compact Disc Read-Only Memory,CD-ROM)、数字多功能盘(Digital Video Disc,DVD)、记忆棒、软盘、机械编码设备、例如其上存储有指令的打孔卡或凹槽内凸起结构、以及上述的任意合适的组合。这里所使用的计算机可读存储介质不被解释为瞬时信号本身,诸如无线电波或者其他自由传播的电磁波、通过波导或其他传输媒介传播的电磁波(例如,通过光纤电缆的光脉冲)、或者通过电线传输的电信号。
这里所描述的计算机可读程序指令可以从计算机可读存储介质下载到各个计算/处理设备,或者通过网络、例如因特网、局域网、广域网和/或无线网下载到外部计算机或外部存储设备。网络可以包括铜传输电缆、光纤传输、无线传输、路由器、防火墙、交换机、网关计算机和/或边缘服务器。每个计算/处理设备中的网络适配卡或者网络接口 从网络接收计算机可读程序指令,并转发该计算机可读程序指令,以供存储在各个计算/处理设备中的计算机可读存储介质中。
用于执行本公开操作的计算机程序指令可以是汇编指令、指令集架构(Instruction Set Architecture,ISA)指令、机器指令、机器相关指令、微代码、固件指令、状态设置数据、或者以一种或多种编程语言的任意组合编写的源代码或目标代码,所述编程语言包括面向对象的编程语言—诸如Smalltalk、C++等,以及常规的过程式编程语言—诸如“C”语言或类似的编程语言。计算机可读程序指令可以完全地在用户计算机上执行、部分地在用户计算机上执行、作为一个独立的软件包执行、部分在用户计算机上部分在远程计算机上执行、或者完全在远程计算机或服务器上执行。在涉及远程计算机的情形中,远程计算机可以通过任意种类的网络—包括局域网(Local Area Network,LAN)或广域网(Wide Area Network,WAN)—连接到用户计算机,或者,可以连接到外部计算机(例如利用因特网服务提供商来通过因特网连接)。在一些实施例中,通过利用计算机可读程序指令的状态信息来个性化定制电子电路,例如可编程逻辑电路、现场可编程门阵列(FPGA)或可编程逻辑阵列(Programmable Logic Arrays,PLA),该电子电路可以执行计算机可读程序指令,从而实现本公开实施例。
这里参照根据本公开实施例的方法、装置(系统)和计算机程序产品的流程图和/或组成结构图描述了本公开实施例。应当理解,流程图和/或组成结构图的每个方框以及流程图和/或组成结构图中各方框的组合,都可以由计算机可读程序指令实现。
这些计算机可读程序指令可以提供给通用计算机、专用计算机或其它可编程数据处理装置的处理器,从而生产出一种机器,使得这些指令在通过计算机或其它可编程数据处理装置的处理器执行时,产生了实现流程图和/或组成结构图中的一个或多个方框中规定的功能/动作的装置。也可以把这些计算机可读程序指令存储在计算机可读存储介质中,这些指令使得计算机、可编程数据处理装置和/或其他设备以特定方式工作,从而,存储有指令的计算机可读介质则包括一个制造品,其包括实现流程图和/或组成结构图中的一个或多个方框中规定的功能/动作的各个方面的指令。
也可以把计算机可读程序指令加载到计算机、其它可编程数据处理装置、或其它设备上,使得在计算机、其它可编程数据处理装置或其它设备上执行一系列操作步骤,以产生计算机实现的过程,从而使得在计算机、其它可编程数据处理装置、或其它设备上执行的指令实现流程图和/或组成结构图中的一个或多个方框中规定的功能/动作。
附图中的流程图和组成结构图显示了根据本公开的多个实施例的系统、方法和计算机程序产品的可能实现的体系架构、功能和操作。在这点上,流程图或组成结构图中的每个方框可以代表一个模块、程序段或指令的一部分,所述模块、程序段或指令的一部分包含一个或多个用于实现规定的逻辑功能的可执行指令。在一些实施例中,方框中所标注的功能也可以以不同于附图中所标注的顺序发生。例如,两个连续的方框实际上可以基本并行地执行,它们有时也可以按相反的顺序执行,这依所涉及的功能而定。也要注意的是,组成结构图和/或流程图中的每个方框、以及组成结构图和/或流程图中的方框的组合,可以用执行规定的功能或动作的专用的基于硬件的系统来实现,或者可以用专用硬件与计算机指令的组合来实现。
该计算机程序产品可以具体通过硬件、软件或其结合的方式实现。在一些实施例中,所述计算机程序产品具体体现为计算机存储介质,在另一些实施例中,计算机程序产品具体体现为软件产品,例如软件开发包(Software Development Kit,SDK)等等。
以上已经描述了本公开的各实施例,上述说明是示例性的,并非穷尽性的,并且也不限于所披露的各实施例。在不偏离所说明的各实施例的范围和精神的情况下,对于本技术领域的普通技术人员来说许多修改和变更都是显而易见的。本文中所用术语的选择,旨在最好地解释各实施例的原理、实际应用或对市场中的技术的改进,或者使本技术领域的其它普通技术人员能理解本文披露的各实施例。
工业实用性
本公开实施例提供了一种定位方法及装置、电子设备、存储介质、计算机程序产品、计算机程序,其中,该方法应用于第二电子设备,包括:在接收到来自第一电子设备的定位请求的情况下,根据所述定位请求中的第一定位结果,确定所述第一电子设备所在的当前地理区域,所述定位请求中包括所述第一电子设备所在环境的环境图像以及所述第一电子设备本地的第一定位结果;从预设的点云地图中确定出与所述当前地理区域对应的点云子地图;根据所述环境图像以及所述点云子地图,对所述第一电子设备进行视觉定位,得到所述第一电子设备的第二定位结果;向所述第一电子设备发送所述第二定位结果。根据本公开实施例,可以通过第一电子设备和第二电子设备实现定位,能够提高定位的成功率和定位精度。

Claims (26)

  1. 一种定位方法,应用于第二电子设备,包括:
    在接收到来自第一电子设备的定位请求的情况下,根据所述定位请求中的第一定位结果,确定所述第一电子设备所在的当前地理区域,所述定位请求中包括所述第一电子设备所在环境的环境图像以及所述第一电子设备本地的第一定位结果;
    从预设的点云地图中确定出与所述当前地理区域对应的点云子地图;
    根据所述环境图像以及所述点云子地图,对所述第一电子设备进行视觉定位,得到所述第一电子设备的第二定位结果;
    向所述第一电子设备发送所述第二定位结果。
  2. 根据权利要求1所述的方法,其中,所述根据所述环境图像以及所述点云子地图,对所述第一电子设备进行视觉定位,得到所述第一电子设备的第二定位结果,包括:
    对所述环境图像与所述点云子地图进行投影匹配,确定与所述环境图像匹配的点云信息;
    根据匹配的点云信息,确定所述第一电子设备的第二定位结果。
  3. 根据权利要求1所述的方法,其中,所述定位请求中还包括所述第一电子设备的重力姿态信息,
    所述根据所述环境图像以及所述点云子地图,对所述第一电子设备进行视觉定位,得到所述第一电子设备的第二定位结果,包括:
    对所述环境图像与所述点云子地图进行匹配,得到所述第一电子设备的第三定位结果;
    根据所述重力姿态信息,对所述第三定位结果进行验证,确定所述第二定位结果,所述第二定位结果包括所述第一电子设备的位置信息和姿态信息。
  4. 根据权利要求3所述的方法,其中,所述根据所述重力姿态信息,对所述第三定位结果进行验证,确定所述第二定位结果,包括:
    根据所述重力姿态信息,确定所述第一电子设备的第一方向;
    根据所述第三定位结果中的姿态信息,确定所述第一电子设备的第二方向;
    将满足验证条件的第三定位结果确定为所述第二定位结果,所述验证条件包括所述第一方向与所述第二方向在重力方向上的角度差小于或等于角度阈值。
  5. 根据权利要求4所述的方法,其中,所述方法还包括:
    在所有第三定位结果均不满足所述验证条件的情况下,向所述第一电子设备发送定位失败信息。
  6. 一种定位方法,应用于第一电子设备,包括:
    向第二电子设备发送定位请求,所述定位请求中包括所述第一电子设备所在环境的环境图像以及所述第一电子设备本地的第一定位结果;
    在接收到所述第二电子设备发送的第二定位结果的情况下,根据所述第一电子设备本地的至少一个第一历史定位结果以及所述第二电子设备发送的至少一个第二历史定位结果,判断所述第二定位结果是否满足一致性验证条件;
    在所述第二定位结果满足所述一致性验证条件的情况下,根据所述第二定位结果 进行定位及展示。
  7. 根据权利要求6所述的方法,其中,所述根据所述第一电子设备本地的至少一个第一历史定位结果以及所述第二电子设备发送的至少一个第二历史定位结果,判断所述第二定位结果是否满足一致性验证条件,包括:
    根据所述第一定位结果中的第一姿态信息、所述第二定位结果中的第二姿态信息、所述第一历史定位结果中的第三姿态信息,所述第二历史定位结果中的第四姿态信息,确定姿态偏差;
    在所述姿态偏差小于或等于偏差阈值的情况下,确定所述第二定位结果满足一致性验证条件。
  8. 根据权利要求6或7所述的方法,其中,在向第二电子设备发送定位请求之前,所述方法还包括:
    根据所述环境图像及所述第一电子设备的本地地图,确定所述第一电子设备本地的第一定位结果,所述第一定位结果包括所述第一电子设备的位置信息和姿态信息。
  9. 根据权利要求6-8中任意一项所述的方法,其中,在向第二电子设备发送定位请求之前,所述方法还包括:
    通过所述第一电子设备的惯性测量单元IMU,确定所述第一电子设备的重力姿态信息,所述定位请求中包括所述重力姿态信息。
  10. 根据权利要求6-9中任意一项所述的方法,其中,所述根据所述第二定位结果进行定位及展示,包括:
    根据所述第二定位结果及目的地的地理位置,确定所述第一电子设备的导航路径;
    根据所述导航路径,在所述第一电子设备屏幕的显示界面中展示增强现实AR导航路径。
  11. 根据权利要求6-10中任意一项中任意一项所述的方法,其中,所述根据所述第二定位结果进行定位及展示,包括:
    根据所述第二定位结果及AR对象的第一位置及姿态信息,确定所述AR对象在所述第一电子设备屏幕的显示界面中的第二位置及姿态信息;
    根据所述第二位置及姿态信息,在所述显示界面中展示所述AR对象。
  12. 一种定位装置,其特征在于,应用于第二电子设备,包括:
    区域确定部分,配置为在接收到来自第一电子设备的定位请求的情况下,根据所述定位请求中的第一定位结果,确定所述第一电子设备所在的当前地理区域,所述定位请求中包括所述第一电子设备所在环境的环境图像以及所述第一电子设备本地的第一定位结果;
    子地图确定部分,配置为从预设的点云地图中确定出与所述当前地理区域对应的点云子地图;
    定位部分,配置为根据所述环境图像以及所述点云子地图,对所述第一电子设备进行视觉定位,得到所述第一电子设备的第二定位结果;
    结果发送部分,配置为向所述第一电子设备发送所述第二定位结果。
  13. 根据权利要求12所述的装置,其中,所述定位部分包括:第一匹配子部分,配置为对所述环境图像与所述点云子地图进行投影匹配,确定与所述环境图像匹配的点 云信息;结果确定部分,配置为根据匹配的点云信息,确定所述第一电子设备的第二定位结果。
  14. 根据权利要求12所述的装置,其中,所述定位请求中还包括所述第一电子设备的重力姿态信息,所述定位部分包括:第二匹配子部分,配置为对所述环境图像与所述点云子地图进行匹配,得到所述第一电子设备的第三定位结果;第一验证子部分,配置为根据所述重力姿态信息,对所述第三定位结果进行验证,确定所述第二定位结果,所述第二定位结果包括所述第一电子设备的位置信息和姿态信息。
  15. 根据权利要求14所述的装置,其中,所述第一验证子部分还配置为:根据所述重力姿态信息,确定所述第一电子设备的第一方向;根据所述第三定位结果中的姿态信息,确定所述第一电子设备的第二方向;将满足验证条件的第三定位结果确定为所述第二定位结果,所述验证条件包括所述第一方向与所述第二方向在重力方向上的角度差小于或等于角度阈值。
  16. 根据权利要求15所述的装置,其中,所述装置还包括:信息发送部分,配置为在所有第三定位结果均不满足所述验证条件的情况下,向所述第一电子设备发送定位失败信息。
  17. 一种定位装置,应用于第一电子设备,包括:
    请求发送部分,配置为向第二电子设备发送定位请求,所述定位请求中包括所述第一电子设备所在环境的环境图像以及所述第一电子设备本地的第一定位结果;
    验证部分,配置为在接收到所述第二电子设备发送的第二定位结果的情况下,根据所述第一电子设备本地的至少一个第一历史定位结果以及所述第二电子设备发送的至少一个第二历史定位结果,判断所述第二定位结果是否满足一致性验证条件;
    定位及展示部分,配置为在所述第二定位结果满足所述一致性验证条件的情况下,根据所述第二定位结果进行定位及展示。
  18. 根据权利要求17所述的装置,其中,所述验证部分包括:偏差确定子部分,配置为根据所述第一定位结果中的第一姿态信息、所述第二定位结果中的第二姿态信息、所述第一历史定位结果中的第三姿态信息,所述第二历史定位结果中的第四姿态信息,确定姿态偏差;第二验证子部分,配置为在所述姿态偏差小于或等于偏差阈值的情况下,确定所述第二定位结果满足一致性验证条件。
  19. 根据权利要求17或18所述的装置,其中,所述装置还包括:本地定位部分,配置为根据所述环境图像及所述第一电子设备的本地地图,确定所述第一电子设备本地的第一定位结果。
  20. 根据权利要求17-19中任一项所述的装置,其中,所述装置还包括:重力姿态确定部分,配置为通过所述第一电子设备的惯性测量单元IMU,确定所述第一电子设备的重力姿态信息,所述定位请求中包括所述重力姿态信息。
  21. 根据权利要求17-20中任一项所述的装置,其中,所述定位及展示部分还配置为:根据所述第二定位结果及目的地的地理位置,确定所述第一电子设备的导航路径;根据所述导航路径,在所述第一电子设备屏幕的显示界面中展示增强现实AR导航路径。
  22. 根据权利要求17-21中任一项所述的装置,其中,所述定位及展示部分还配置为:根据所述第二定位结果及AR对象的第一位置及姿态信息,确定所述AR对象在所 述第一电子设备屏幕的显示界面中的第二位置及姿态信息;根据所述第二位置及姿态信息,在所述显示界面中展示所述AR对象。
  23. 一种电子设备,包括:
    处理器;
    配置为存储处理器可执行指令的存储器;
    其中,所述处理器被配置为调用所述存储器存储的指令,以执行权利要求1至11中任意一项所述的方法。
  24. 一种计算机可读存储介质,其上存储有计算机程序指令,所述计算机程序指令被处理器执行时实现权利要求1至11中任意一项所述的方法。
  25. 一种计算机程序,包括计算机可读代码,在计算机可读代码在设备上运行的情况下,设备中的处理器执行用于实现权利要求1至11中任意一项所述的方法。
  26. 一种计算机程序产品,用于存储计算机可读指令,所述计算机可读指令被执行时使得计算机执行权利要求1至11中任意一项所述的方法。
PCT/CN2021/101040 2020-11-30 2021-06-18 定位方法及装置、电子设备、存储介质、计算机程序产品、计算机程序 WO2022110777A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202011382582.6 2020-11-30
CN202011382582.6A CN112683262A (zh) 2020-11-30 2020-11-30 定位方法及装置、电子设备和存储介质

Publications (1)

Publication Number Publication Date
WO2022110777A1 true WO2022110777A1 (zh) 2022-06-02

Family

ID=75447042

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2021/101040 WO2022110777A1 (zh) 2020-11-30 2021-06-18 定位方法及装置、电子设备、存储介质、计算机程序产品、计算机程序

Country Status (2)

Country Link
CN (1) CN112683262A (zh)
WO (1) WO2022110777A1 (zh)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112683262A (zh) * 2020-11-30 2021-04-20 浙江商汤科技开发有限公司 定位方法及装置、电子设备和存储介质

Citations (14)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105184852A (zh) * 2015-08-04 2015-12-23 百度在线网络技术(北京)有限公司 一种基于激光点云的城市道路识别方法及装置
CN106525025A (zh) * 2016-10-28 2017-03-22 武汉大学 一种变电站巡检机器人路线规划导航方法
CN108692720A (zh) * 2018-04-09 2018-10-23 京东方科技集团股份有限公司 定位方法、定位服务器及定位系统
CN109543634A (zh) * 2018-11-29 2019-03-29 达闼科技(北京)有限公司 定位过程中的数据处理方法、装置、电子设备和存储介质
US20190325251A1 (en) * 2018-03-01 2019-10-24 Htc Corporation Scene reconstructing system, scene reconstructing method and non-transitory computer-readable medium
CN111192364A (zh) * 2020-01-09 2020-05-22 北京科技大学 一种低成本移动多机器人视觉同时定位和地图创建方法
CN111325796A (zh) * 2020-02-28 2020-06-23 北京百度网讯科技有限公司 用于确定视觉设备的位姿的方法和装置
CN111402413A (zh) * 2020-06-04 2020-07-10 浙江欣奕华智能科技有限公司 三维视觉定位方法、装置及计算设备、存储介质
US20200226782A1 (en) * 2018-05-18 2020-07-16 Boe Technology Group Co., Ltd. Positioning method, positioning apparatus, positioning system, storage medium, and method for constructing offline map database
CN111442722A (zh) * 2020-03-26 2020-07-24 达闼科技成都有限公司 定位方法、装置、存储介质及电子设备
CN111595349A (zh) * 2020-06-28 2020-08-28 浙江商汤科技开发有限公司 导航方法及装置、电子设备和存储介质
CN111664866A (zh) * 2020-06-04 2020-09-15 浙江商汤科技开发有限公司 定位展示方法及装置、定位方法及装置和电子设备
CN111815779A (zh) * 2020-06-29 2020-10-23 浙江商汤科技开发有限公司 对象展示方法及装置、定位方法及装置以及电子设备
CN112683262A (zh) * 2020-11-30 2021-04-20 浙江商汤科技开发有限公司 定位方法及装置、电子设备和存储介质

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101907467B (zh) * 2010-08-06 2012-08-22 浙江大学 基于运动量测信息的个人定位方法及装置
JP2012208033A (ja) * 2011-03-30 2012-10-25 Mitsubishi Electric Corp 航法計算システム
JP6521753B2 (ja) * 2015-06-09 2019-05-29 株式会社Subaru 車両の測位システム
CN110567480B (zh) * 2019-09-12 2021-06-29 北京百度网讯科技有限公司 车辆定位的优化方法、装置、设备及存储介质

Patent Citations (14)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105184852A (zh) * 2015-08-04 2015-12-23 百度在线网络技术(北京)有限公司 一种基于激光点云的城市道路识别方法及装置
CN106525025A (zh) * 2016-10-28 2017-03-22 武汉大学 一种变电站巡检机器人路线规划导航方法
US20190325251A1 (en) * 2018-03-01 2019-10-24 Htc Corporation Scene reconstructing system, scene reconstructing method and non-transitory computer-readable medium
CN108692720A (zh) * 2018-04-09 2018-10-23 京东方科技集团股份有限公司 定位方法、定位服务器及定位系统
US20200226782A1 (en) * 2018-05-18 2020-07-16 Boe Technology Group Co., Ltd. Positioning method, positioning apparatus, positioning system, storage medium, and method for constructing offline map database
CN109543634A (zh) * 2018-11-29 2019-03-29 达闼科技(北京)有限公司 定位过程中的数据处理方法、装置、电子设备和存储介质
CN111192364A (zh) * 2020-01-09 2020-05-22 北京科技大学 一种低成本移动多机器人视觉同时定位和地图创建方法
CN111325796A (zh) * 2020-02-28 2020-06-23 北京百度网讯科技有限公司 用于确定视觉设备的位姿的方法和装置
CN111442722A (zh) * 2020-03-26 2020-07-24 达闼科技成都有限公司 定位方法、装置、存储介质及电子设备
CN111402413A (zh) * 2020-06-04 2020-07-10 浙江欣奕华智能科技有限公司 三维视觉定位方法、装置及计算设备、存储介质
CN111664866A (zh) * 2020-06-04 2020-09-15 浙江商汤科技开发有限公司 定位展示方法及装置、定位方法及装置和电子设备
CN111595349A (zh) * 2020-06-28 2020-08-28 浙江商汤科技开发有限公司 导航方法及装置、电子设备和存储介质
CN111815779A (zh) * 2020-06-29 2020-10-23 浙江商汤科技开发有限公司 对象展示方法及装置、定位方法及装置以及电子设备
CN112683262A (zh) * 2020-11-30 2021-04-20 浙江商汤科技开发有限公司 定位方法及装置、电子设备和存储介质

Also Published As

Publication number Publication date
CN112683262A (zh) 2021-04-20

Similar Documents

Publication Publication Date Title
US9699375B2 (en) Method and apparatus for determining camera location information and/or camera pose information according to a global coordinate system
CN111983635B (zh) 位姿确定方法及装置、电子设备和存储介质
US20180357824A1 (en) Augmented Reality Positioning Method and Apparatus for Location-Based Service LBS
CN111664866A (zh) 定位展示方法及装置、定位方法及装置和电子设备
WO2022110776A1 (zh) 定位方法及装置、电子设备、存储介质、计算机程序产品、计算机程序
WO2022134475A1 (zh) 点云地图构建方法及装置、电子设备、存储介质和程序
CN112229424B (zh) 视觉惯性系统的参数标定方法及装置、电子设备和介质
TWI767217B (zh) 坐標系對齊的方法及裝置、電子設備和計算機可讀存儲介質
CN112945207B (zh) 目标定位方法及装置、电子设备和存储介质
CN111401230A (zh) 姿态估计方法及装置、电子设备和存储介质
CN112433211A (zh) 一种位姿确定方法及装置、电子设备和存储介质
WO2022110777A1 (zh) 定位方法及装置、电子设备、存储介质、计算机程序产品、计算机程序
WO2022179080A1 (zh) 定位方法、装置、电子设备、存储介质、程序及产品
CN112837372A (zh) 数据生成方法及装置、电子设备和存储介质
WO2022110785A1 (zh) 定位方法及装置、电子设备、存储介质、计算机程序产品、计算机程序
CN112307363A (zh) 虚实融合展示方法及装置、电子设备和存储介质
WO2022237071A1 (zh) 定位方法及装置、电子设备、存储介质和计算机程序
WO2022110801A1 (zh) 数据处理方法及装置、电子设备和存储介质
CN113611152A (zh) 停车场的导航方法及装置、电子设备和存储介质
CN112767541A (zh) 三维重建方法及装置、电子设备和存储介质
CN113160424A (zh) 基于增强现实的虚拟对象的摆放方法及装置、设备和介质
CN112965652A (zh) 信息展示方法及装置、电子设备和存储介质
CN117115244A (zh) 云端重定位方法、装置及存储介质
CN112308878A (zh) 一种信息处理方法、装置、电子设备和存储介质
CN114945088A (zh) 三维模型生成方法、装置、拍摄终端和终端设备

Legal Events

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

Ref document number: 21896285

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

Country of ref document: EP

Kind code of ref document: A1

122 Ep: pct application non-entry in european phase

Ref document number: 21896285

Country of ref document: EP

Kind code of ref document: A1