CN111323007B - Positioning method and device, electronic equipment and storage medium - Google Patents

Positioning method and device, electronic equipment and storage medium Download PDF

Info

Publication number
CN111323007B
CN111323007B CN202010088900.1A CN202010088900A CN111323007B CN 111323007 B CN111323007 B CN 111323007B CN 202010088900 A CN202010088900 A CN 202010088900A CN 111323007 B CN111323007 B CN 111323007B
Authority
CN
China
Prior art keywords
positioning
virtual object
target
absolute
moment
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202010088900.1A
Other languages
Chinese (zh)
Other versions
CN111323007A (en
Inventor
侯欣如
栾青
盛崇山
焦飞
欧华富
石盛传
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Sensetime Technology Development Co Ltd
Original Assignee
Beijing Sensetime Technology Development Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing Sensetime Technology Development Co Ltd filed Critical Beijing Sensetime Technology Development Co Ltd
Priority to CN202010088900.1A priority Critical patent/CN111323007B/en
Publication of CN111323007A publication Critical patent/CN111323007A/en
Application granted granted Critical
Publication of CN111323007B publication Critical patent/CN111323007B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G01MEASURING; TESTING
    • G01CMEASURING DISTANCES, LEVELS OR BEARINGS; SURVEYING; NAVIGATION; GYROSCOPIC INSTRUMENTS; PHOTOGRAMMETRY OR VIDEOGRAMMETRY
    • G01C21/00Navigation; Navigational instruments not provided for in groups G01C1/00 - G01C19/00
    • G01C21/005Navigation; Navigational instruments not provided for in groups G01C1/00 - G01C19/00 with correlation of navigation data from several sources, e.g. map or contour matching
    • GPHYSICS
    • G01MEASURING; TESTING
    • G01SRADIO DIRECTION-FINDING; RADIO NAVIGATION; DETERMINING DISTANCE OR VELOCITY BY USE OF RADIO WAVES; LOCATING OR PRESENCE-DETECTING BY USE OF THE REFLECTION OR RERADIATION OF RADIO WAVES; ANALOGOUS ARRANGEMENTS USING OTHER WAVES
    • G01S19/00Satellite radio beacon positioning systems; Determining position, velocity or attitude using signals transmitted by such systems
    • G01S19/38Determining a navigation solution using signals transmitted by a satellite radio beacon positioning system
    • G01S19/39Determining a navigation solution using signals transmitted by a satellite radio beacon positioning system the satellite radio beacon positioning system transmitting time-stamped messages, e.g. GPS [Global Positioning System], GLONASS [Global Orbiting Navigation Satellite System] or GALILEO
    • G01S19/40Correcting position, velocity or attitude
    • GPHYSICS
    • G01MEASURING; TESTING
    • G01SRADIO DIRECTION-FINDING; RADIO NAVIGATION; DETERMINING DISTANCE OR VELOCITY BY USE OF RADIO WAVES; LOCATING OR PRESENCE-DETECTING BY USE OF THE REFLECTION OR RERADIATION OF RADIO WAVES; ANALOGOUS ARRANGEMENTS USING OTHER WAVES
    • G01S19/00Satellite radio beacon positioning systems; Determining position, velocity or attitude using signals transmitted by such systems
    • G01S19/38Determining a navigation solution using signals transmitted by a satellite radio beacon positioning system
    • G01S19/39Determining a navigation solution using signals transmitted by a satellite radio beacon positioning system the satellite radio beacon positioning system transmitting time-stamped messages, e.g. GPS [Global Positioning System], GLONASS [Global Orbiting Navigation Satellite System] or GALILEO
    • G01S19/42Determining position
    • G01S19/48Determining position by combining or switching between position solutions derived from the satellite radio beacon positioning system and position solutions derived from a further system
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/70Determining position or orientation of objects or cameras

Landscapes

  • Engineering & Computer Science (AREA)
  • Radar, Positioning & Navigation (AREA)
  • Remote Sensing (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Automation & Control Theory (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Theoretical Computer Science (AREA)
  • User Interface Of Digital Computer (AREA)

Abstract

The disclosure relates to a positioning method and apparatus, an electronic device, and a storage medium. The method comprises the following steps: determining the absolute positioning position of the target at the current first moment according to the positioning information acquired by the positioning device; determining a first distance between an initial relative position and an absolute positioning position of a virtual object corresponding to the target at a first moment; and under the condition that the absolute value of the first distance is larger than a preset distance threshold, correcting the position of the virtual object according to the absolute positioning position at the first moment to obtain the display position of the virtual object at the first moment. According to the positioning method disclosed by the embodiment of the disclosure, when the absolute value of the first distance between the initial relative position and the absolute positioning position of the virtual object is greater than the preset distance threshold, the position of the virtual object can be corrected, so that the accumulation of errors can be reduced, and the positioning accuracy is improved.

Description

Positioning method and device, electronic equipment and storage medium
Technical Field
The present disclosure relates to the field of computer technologies, and in particular, to a positioning method and apparatus, an electronic device, and a storage medium.
Background
In the positioning process, various positioning modes have errors, for example, GPS positioning, visual positioning, marker positioning, and the like have errors, and in the process of comprehensively using various positioning modes, an accumulated error may be generated, which causes a decrease in positioning accuracy. For example, in a virtual reality/augmented reality presentation scenario, as a target moves, a position error of a presentation position of a virtual object associated with the target may have a cumulative effect such that the position error increases gradually.
Disclosure of Invention
The disclosure provides a positioning method and device, an electronic device and a storage medium.
According to an aspect of the present disclosure, there is provided a positioning method including: determining the absolute positioning position of the target at the current first moment according to the positioning information acquired by the positioning device; determining a first distance between an initial relative position of a virtual object corresponding to the target at the first time and the absolute positioning position; and under the condition that the absolute value of the first distance is larger than a preset distance threshold, correcting the position of the virtual object according to the absolute positioning position at the first moment to obtain the display position of the virtual object at the first moment.
According to the positioning method disclosed by the embodiment of the disclosure, when the absolute value of the first distance between the initial relative position and the absolute positioning position of the virtual object is greater than the preset distance threshold, the position of the virtual object can be corrected, so that the accumulation of errors can be reduced, and the positioning accuracy is improved.
In a possible implementation manner, the correcting the position of the virtual object according to the positioning position at the first time to obtain the display position of the virtual object at the first time includes: and carrying out relative positioning processing on the target according to the absolute positioning position at the first moment, and determining the display position of the virtual object corresponding to the target at the first moment.
By the method, the virtual object can be displayed at the display position, so that the virtual object is close to the target position, and the display effect is improved.
In one possible implementation, the method further includes: determining the absolute positioning position of the target at the initial moment according to the positioning information acquired by the positioning device; and carrying out relative positioning processing on the target according to the absolute positioning position at the initial moment, and determining the display position of the virtual object corresponding to the target at the initial moment.
In one possible implementation, the method further includes: determining the initial relative position as a display position of the virtual object when the absolute value of the first distance is less than or equal to a preset distance threshold.
In one possible implementation, the method further includes: determining the distance threshold according to an absolute positioning error of the positioning device.
In one possible implementation, the method further includes: and displaying the virtual object corresponding to the target at the display position at the first moment.
According to an aspect of the present disclosure, there is provided a positioning apparatus including: the first determining module is used for determining the absolute positioning position of the target at the current first moment according to the positioning information acquired by the positioning device; a second determining module, configured to determine a first distance between an initial relative position of the virtual object corresponding to the target at the first time and the absolute positioning position; and the obtaining module is used for correcting the position of the virtual object according to the absolute positioning position at the first moment under the condition that the absolute value of the first distance is greater than a preset distance threshold value, so as to obtain the display position of the virtual object at the first moment.
In one possible implementation, the obtaining module is further configured to: and carrying out relative positioning processing on the target according to the absolute positioning position at the first moment, and determining the display position of the virtual object corresponding to the target at the first moment.
In one possible implementation, the apparatus further includes: the third determining module is used for determining the absolute positioning position of the target at the initial moment according to the positioning information acquired by the positioning device; and the fourth determining module is used for performing relative positioning processing on the target according to the absolute positioning position at the initial moment, and determining the display position of the virtual object corresponding to the target at the initial moment.
In one possible implementation, the apparatus further includes: a fifth determining module, configured to determine the initial relative position as a display position of the virtual object when an absolute value of the first distance is smaller than or equal to a preset distance threshold.
In one possible implementation, the apparatus further includes: a sixth determining module, configured to determine the distance threshold according to an absolute positioning error of the positioning apparatus.
In one possible implementation, the apparatus further includes: and the display module is used for displaying the virtual object corresponding to the target at the display position of the first moment.
According to an aspect of the present disclosure, there is provided an electronic device including: a processor; a memory for storing processor-executable instructions; wherein the processor is configured to: the above-described positioning method is performed.
According to an aspect of the present disclosure, there is provided a computer-readable storage medium having stored thereon computer program instructions, which when executed by a processor, implement the above-described positioning method.
According to an aspect of the present disclosure, a computer program product is provided, the computer program product comprising program instructions which, when executed by a processor, cause the processor to perform the above-mentioned positioning method.
It is to be understood that both the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the disclosure.
Other features and aspects of the present disclosure will become apparent from the following detailed description of exemplary embodiments, which proceeds with reference to the accompanying drawings.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present disclosure and, together with the description, serve to explain the principles of the disclosure.
Fig. 1 shows a flow chart of a positioning method according to an embodiment of the present disclosure;
FIG. 2 illustrates an initial time location diagram in accordance with an embodiment of the present disclosure;
FIG. 3 shows a schematic diagram of a positioning method according to an embodiment of the present disclosure;
fig. 4 shows a schematic diagram of an application of a positioning method according to an embodiment of the present disclosure;
FIG. 5 shows a block diagram of a positioning device according to an embodiment of the present disclosure;
FIG. 6 shows a block diagram of an electronic device in accordance with an embodiment of the disclosure;
fig. 7 shows a block diagram of an electronic device according to an embodiment of the disclosure.
Detailed Description
Various exemplary embodiments, features and aspects of the present disclosure will be described in detail below with reference to the accompanying drawings. In the drawings, like reference numbers can indicate functionally identical or similar elements. While the various aspects of the embodiments are presented in drawings, the drawings are not necessarily drawn to scale unless specifically indicated.
The word "exemplary" is used exclusively herein to mean "serving as an example, embodiment, or illustration. Any embodiment described herein as "exemplary" is not necessarily to be construed as preferred or advantageous over other embodiments.
The term "and/or" herein is merely an association describing an associated object, meaning that three relationships may exist, e.g., a and/or B, may mean: a exists alone, A and B exist simultaneously, and B exists alone. In addition, the term "at least one" herein means any one of a plurality or any combination of at least two of a plurality, for example, including at least one of A, B, C, and may mean including any one or more elements selected from the group consisting of A, B and C.
Furthermore, in the following detailed description, numerous specific details are set forth in order to provide a better understanding of the present disclosure. It will be understood by those skilled in the art that the present disclosure may be practiced without some of these specific details. In some instances, methods, means, elements and circuits that are well known to those skilled in the art have not been described in detail so as not to obscure the present disclosure.
Fig. 1 shows a flow chart of a positioning method according to an embodiment of the present disclosure, as shown in fig. 1, the method comprising:
in step S11, determining an absolute positioning position of the target at the current first time based on the positioning information obtained by the positioning device;
in step S12, determining a first distance between an initial relative position of the virtual object corresponding to the target at the first time and the absolute positioning position;
in step S13, when the absolute value of the first distance is greater than a preset distance threshold, the position of the virtual object is corrected according to the absolute positioning position at the first time, so as to obtain the display position of the virtual object at the first time.
According to the positioning method disclosed by the embodiment of the disclosure, when the absolute value of the first distance between the initial relative position and the absolute positioning position of the virtual object is greater than the preset distance threshold, the position of the virtual object can be corrected, so that the accumulation of errors can be reduced, and the positioning accuracy is improved.
In one possible implementation, the positioning method may be performed by a terminal device or other processing device, where the terminal device may be a User Equipment (UE), a mobile device, a User terminal, a cellular phone, a cordless phone, a Personal Digital Assistant (PDA), a handheld device, a computing device, a vehicle-mounted device, a wearable device, or the like. The other processing devices may be servers or cloud servers, etc. In some possible implementations, the location method may be implemented by a processor calling computer readable instructions stored in a memory.
In one possible implementation, in a Virtual Reality (VR) or Augmented Reality (AR) device, a target may need to be located, and a related Virtual object may be displayed according to the located position. The target may be a target object actually existing in the real environment, for example, a target such as a user operating the VR/AR device or a user participating in the VR/AR interaction process may be located, and a display position of the virtual object may be determined based on the located position and the virtual object may be displayed, where the virtual object is, for example, a virtual object such as a virtual article, a virtual screen, or the like.
In the positioning process, an absolute positioning coordinate system (e.g., a positioning coordinate system of a GPS system) may be first determined, for example, an absolute positioning coordinate system (e.g., a positioning coordinate system of the GPS system) may be established, a correspondence between the absolute positioning coordinate system and an actual geographic location may be determined, a location of the target in the absolute positioning coordinate system (may also be referred to as an absolute positioning location) may be determined, and a geographic location of the target may be determined. The display position of the virtual object may be obtained and the virtual object may be displayed, for example, the relative positioning may be performed by image positioning, visual positioning, or other techniques, that is, a relative positioning coordinate system (e.g., an image coordinate system, etc.) may be established, a corresponding relationship between the image coordinate system and the absolute positioning coordinate system may be determined, and a position (also referred to as a relative position) of the virtual object in a relative coordinate system (e.g., an image coordinate system, etc.) may be determined according to a position of the target in the absolute positioning coordinate system.
In a possible embodiment, the virtual object and the target may be coincident in position, for example, the virtual object may be a virtual article held by the target (e.g., a person), and of course, the virtual position and the target may not be coincident, for example, the virtual article may be displayed in front of the target. In the positioning process, errors can be generated by various positioning modes, if the target moves, the virtual object can move along with the target, but the errors can be accumulated along with the movement of the target. The image positioning may be understood as determining a display position of the virtual object in the imaging image by detecting and identifying, and the visual positioning may be understood as determining a display position of the virtual object according to computer vision, such as monocular visual positioning, binocular visual positioning, or omnidirectional visual positioning. The present disclosure does not limit the specific manner in which absolute and relative positioning is achieved.
In one possible implementation, at an initial time (e.g., when the VR or AR device starts to run, or when the positioning process starts), the display position of the virtual object corresponding to the target at the initial time can be obtained through absolute positioning and relative positioning to display the virtual object at the initial time. The method further comprises the following steps: determining the absolute positioning position of the target at the initial moment according to the positioning information acquired by the positioning device; and carrying out relative positioning processing on the target according to the absolute positioning position at the initial moment, and determining the display position of the virtual object corresponding to the target at the initial moment.
Fig. 2 is a schematic diagram illustrating an initial time positioning according to an embodiment of the disclosure, and as shown in fig. 2, an object may be positioned, for example, an absolute positioning position a 'of the object at the initial time may be obtained according to an absolute positioning of the object by a positioning device, for example, GPS positioning, and the like, where the absolute positioning position a' may not coincide with an actual position a of the object due to an error generated by the positioning device in the absolute positioning process, and in an example, a positioning error (allowable error) of the positioning device is dAbsoluteThe absolute positioning position A' can be centered around the actual position A of the target and dAbsoluteIs inside a circle of radius, as shown by the solid line circle in fig. 2. For example, the distance between the locating position A' and the actual position A of the target is dA’,|dA’|≤dAbsolute
In one possible implementation, since a ' is an absolute positioning position of the target a, the position of the target a can be represented by a ', and a display position a ″ for displaying a virtual object corresponding to the target is obtained by performing relative positioning processing (e.g., image positioning, visual positioning, etc.) according to the absolute positioning position a '. In an example, the positioning error of the relative positioning may be dRelative to each otherThen, the display position A 'can be located at the center of the positioning position A', and dRelative to each otherIs inside the circle of radius, as shown by the gray circle in fig. 2. For example, the distance between the display position A 'and the positioning position A' is dA”,|dA”|≤dRelative to each other
In one possible implementation, by means of the above-described positioning, the display position a "can also be brought close to the actual position a of the target, for example, the absolute value | d of the distance between the display position a" and the actual position a of the target can be brought1|≤dAbsolute. A virtual object corresponding to target a may be presented at presentation position a ", e.g.,an information display interface of the target, a virtual article held by the target, and the like. In the example, the display position a "may be a relative position obtained by performing relative positioning processing, or may be a position obtained by shifting the relative position by a certain amount, for example, the relative position may be shifted upward to obtain a display position a" of a virtual article such as a hat or a display board, and the relative position may be shifted leftward to obtain a display position a "of a virtual article held by a left hand of a target, or the like. The present disclosure is not limited to the determination of the display position.
In one possible implementation, the target may move, and during the movement, the positioning error of the display position of the virtual object may accumulate, i.e., the positioning error may increase as the target moves. Therefore, the display position of the virtual object corresponding to the target can be repositioned at preset time intervals or at preset distance movement. For example, the display position of the virtual object corresponding to the target may be repositioned at preset time intervals, and during the time intervals, the target may not be positioned, that is, neither absolute positioning (for example, GPS positioning obtained by a positioning device) nor relative positioning (that is, image positioning or visual positioning) is performed.
Fig. 3 is a schematic diagram illustrating a positioning method according to an embodiment of the disclosure, and as shown in fig. 3, after the preset time interval, as the target moves from the position a to the position B, the display position of the virtual object corresponding to the target may also move, for example, from the position a "to the position B"Practice of(initial position of virtual object before repositioning).
In a possible implementation manner, in step S11, the absolute positioning position B ' of the target at the current first time may be obtained by the positioning device, wherein the absolute positioning position B ' may not coincide with the actual position B of the target due to an error generated by the positioning device during the positioning process, and the absolute positioning position B ' may be located around the actual position B of the target and dAbsoluteIs inside the circle of radius, as shown by the solid line circle on the right in fig. 3. For example, the distance between the absolute positioning position B' and the actual position B of the target is dB’,|dB’|≤dAbsolute
In one possible implementation, in step S12, since B 'is the absolute location position of the target B, the position of the target B can be represented by B'. And, since the actual position B cannot be accurately determined, the actual position B is relative to the initial relative position B "Practice ofA distance d between2Cannot be determined accurately, and therefore can be determined by the initial relative position B "Practice ofA first distance d from the absolute positioning position BB' actualTo determine whether repositioning of the presentation position of the virtual object is required. For example, a distance threshold may be preset, and may be at the absolute value | d of the first distanceB' actualAnd repositioning the display position of the virtual object when the | is larger than the preset distance threshold.
In one possible implementation, the method further includes: determining the distance threshold according to an absolute positioning error of the positioning device. In an example, the positioning error d of the positioning device may be determinedAbsoluteDetermined as a distance threshold. The presentation position of the virtual object may be close to the actual position of the target, e.g., such that the absolute value of the distance | d2|≤dAbsoluteDue to the distance d2And cannot be accurately determined, the position of the target can be represented by the positioning position B ', and the absolute value of the distance between the display position of the virtual object and the absolute positioning position B' is smaller than or equal to the distance threshold. Alternatively, the distance threshold may be determined from the positioning error, e.g. when the accuracy requirement is high, the distance threshold may be made smaller than the positioning error, e.g. the distance threshold may be kdAbsoluteWhere k is a coefficient greater than 0 and less than 1, the present disclosure does not limit the manner in which the distance threshold is determined from the positioning error.
In one possible implementation, in step S13, if the absolute value | d of the first distance isB' actual| is greater than a preset distance threshold dAbsoluteThen, the initial relative position B "Practice ofThe position error of (2) is large, the display position of the virtual object can be repositioned, i.e., the position of the virtual object is corrected.
In one possible implementation, step S13 mayThe method comprises the following steps: and carrying out relative positioning processing on the target according to the absolute positioning position at the first moment, and determining the display position of the virtual object corresponding to the target at the first moment. The display position B for displaying the virtual object corresponding to the target can be obtained by performing relative positioning processing (e.g., image positioning, visual positioning, or the like) based on the absolute positioning position B'Theory of the invention. In an example, the positioning error of the relative positioning may be dRelative to each otherThen show position B "Theory of the inventionCan be positioned by taking the positioning position B' as the center of a circle and dRelative to each otherIs inside the circle of radius, as shown by the right gray circle in fig. 3. For example, display position B "Theory of the inventionAt a distance d from the positioning position BTheory of B,|dTheory of B|≤dRelative to each other
In one possible implementation, after the virtual object is repositioned, the exhibition position B can be made "Theory of the inventionIs smaller, e.g. so that the display position B "Theory of the inventionThe absolute value of the distance from the actual position B of the target is less than or equal to dInsulation boardAnd (4) carrying out pairing.
In one possible implementation, if the target moves from position A to position B, the initial relative position B of the virtual object "Practice ofAbsolute value | d of first distance from positioning position BB' actual|≤dAbsoluteThe display position may not need to be repositioned. The method further comprises the following steps: determining the initial relative position as a display position of the virtual object when the absolute value of the first distance is less than or equal to a preset distance threshold. In the example, if | dB' actual|≤dAbsoluteThen, the initial relative position B "Practice ofThe positioning angle of (2) is high, the positioning error does not exceed the allowable error, the initial relative position B' can be used without repositioning the display position "Practice ofAs a display position.
In one possible implementation, the method further includes: and displaying the virtual object corresponding to the target at the display position at the first moment. For example, after repositioning the virtual objectCan be at a display position B "Theory of the inventionThe virtual object is presented or, if the presentation position does not need to be repositioned, can be in an initial relative position B "Practice ofAnd displaying the virtual object.
By the method, the virtual object can be displayed at the display position, so that the virtual object is close to the target position, and the display effect is improved.
In one possible implementation, it may be determined whether the display position needs to be repositioned every preset time interval or every preset distance moved by the target, and if the display position needs to be repositioned, the step S13 may be executed to reposition the display position. That is, the above process may be iteratively performed until the VR or AR device ends running, or the positioning process ends.
In one possible implementation, if the absolute value of the first distance | dB' actual|≤dAbsoluteThe display position can be repositioned, and the positioning precision of the display position is further improved. That is, the display position may be repositioned at predetermined time intervals, or at predetermined distances of movement, regardless of whether the first distance is greater than a predetermined distance threshold.
According to the positioning method disclosed by the embodiment of the disclosure, when the first distance between the initial position and the absolute positioning position of the virtual object is greater than the preset distance threshold, the position of the virtual object can be corrected, so that the accumulation of errors can be reduced, and the positioning accuracy is improved. And the virtual object corresponding to the target can be displayed at the display position, so that the positions of the virtual object and the target are close, and the display effect is improved.
Fig. 4 is a schematic diagram illustrating an application of a positioning method according to an embodiment of the present disclosure, as shown in fig. 4, in a VR game or an AR game, an object (e.g., a person) may move in a game scene, and as the object moves, a positioning error of a display position of a virtual object corresponding to the object may be accumulated, that is, the positioning error increases. Thus, the display position may be repositioned at each preset time interval.
In an example, the preset time interval may be 15 seconds, within which 15 seconds the target may move from the a position toAnd B position. When the target is at the A position, the absolute positioning position of the target obtained by the positioning device is (x)0,y0) When the target is at the B position, the absolute positioning position of the target obtained by the positioning device is (x)1,y1) The position of the virtual object corresponding to the target is C (x)2,y2) Position C may be tracked from the position of the presentation of the virtual object when the target is at position a (e.g., Six dimensions of free tracking, 6DOF) to the initial relative position of the virtual object when the target is at position B.
In one possible implementation, the location (x) of the virtual object may be determined2,y2) And the location (x)1,y1) And determining whether the position of the virtual object needs to be corrected according to the first distance d.
In an example, the positioning error d of the positioning device may be calculatedAbsoluteAs a distance threshold (i.e., an allowable error). If the absolute value of the first distance | d | is greater than the distance threshold dAbsolute(e.g., 1m), the position of the virtual object may be deemed inaccurate and may be based on the absolute location position (x)1,y1) The target is relatively positioned (e.g., image positioning, visual positioning), and a display position of the virtual object corresponding to the target, i.e., a position C (x) where the accuracy is not high is obtained2,y2) And (6) carrying out correction. If the absolute value of the first distance | d | is less than or equal to the distance threshold dAbsoluteThen the position of the virtual object can be considered to be more accurate and position C (x) can be determined2,y2) As the presentation position of the virtual object. Further, the virtual object may be presented at a presentation location.
In one possible implementation, it may be determined whether the display position needs to be repositioned at preset time intervals, and if the display position needs to be repositioned, the correction process may be performed until the VR game or the AR game is ended.
In a possible implementation manner, the positioning method may be used in a Virtual Reality (VR) or Augmented Reality (AR) device, or an eye, a mobile device, or the like, to position a displayed Virtual object, so as to reduce an accumulated error and correct a positioning error. The present disclosure does not limit the application field of the positioning method.
Fig. 5 shows a block diagram of a positioning apparatus according to an embodiment of the present disclosure, as shown in fig. 5, the apparatus comprising: the first determining module 11 is configured to determine an absolute positioning position of the target at a current first time according to the positioning information obtained by the positioning device; a second determining module 12, configured to determine a first distance between an initial relative position of the virtual object corresponding to the target at the first time and the absolute positioning position; an obtaining module 13, configured to correct the position of the virtual object according to the absolute positioning position at the first time when the absolute value of the first distance is greater than a preset distance threshold, so as to obtain a display position of the virtual object at the first time.
In one possible implementation, the obtaining module is further configured to: and carrying out relative positioning processing on the target according to the absolute positioning position at the first moment, and determining the display position of the virtual object corresponding to the target at the first moment.
In one possible implementation, the apparatus further includes: the third determining module is used for determining the absolute positioning position of the target at the initial moment according to the positioning information acquired by the positioning device; and the fourth determining module is used for performing relative positioning processing on the target according to the absolute positioning position at the initial moment, and determining the display position of the virtual object corresponding to the target at the initial moment.
In one possible implementation, the apparatus further includes: a fifth determining module, configured to determine the initial relative position as a display position of the virtual object when an absolute value of the first distance is smaller than or equal to a preset distance threshold.
In one possible implementation, the apparatus further includes: a sixth determining module, configured to determine the distance threshold according to an absolute positioning error of the positioning apparatus.
In one possible implementation, the apparatus further includes: and the display module is used for displaying the virtual object corresponding to the target at the display position of the first moment.
It is understood that the above-mentioned method embodiments of the present disclosure can be combined with each other to form a combined embodiment without departing from the logic of the principle, which is limited by the space, and the detailed description of the present disclosure is omitted.
In addition, the present disclosure also provides a positioning apparatus, an electronic device, a computer-readable storage medium, and a program, which can be used to implement any one of the positioning methods provided by the present disclosure, and the corresponding technical solutions and descriptions and corresponding descriptions in the method sections are not repeated.
It will be understood by those skilled in the art that in the method of the present invention, the order of writing the steps does not imply a strict order of execution and any limitations on the implementation, and the specific order of execution of the steps should be determined by their function and possible inherent logic.
In some embodiments, functions of or modules included in the apparatus provided in the embodiments of the present disclosure may be used to execute the method described in the above method embodiments, and for specific implementation, reference may be made to the description of the above method embodiments, and for brevity, details are not described here again
Embodiments of the present disclosure also provide a computer-readable storage medium having stored thereon computer program instructions, which when executed by a processor, implement the above-mentioned method. The computer readable storage medium may be a non-volatile computer readable storage medium.
An embodiment of the present disclosure further provides an electronic device, including: a processor; a memory for storing processor-executable instructions; wherein the processor is configured as the above method.
The electronic device may be provided as a terminal, server, or other form of device.
Fig. 6 is a block diagram illustrating an electronic device 800 in accordance with an example embodiment. For example, the electronic device 800 may be a mobile phone, a computer, a digital broadcast terminal, a messaging device, a game console, a tablet device, a medical device, a fitness device, a personal digital assistant, or the like terminal.
Referring to fig. 6, electronic device 800 may include one or more of the following components: processing component 802, memory 804, power component 806, multimedia component 808, audio component 810, input/output (I/O) interface 812, sensor component 814, and communication component 816.
The processing component 802 generally controls overall operation of the electronic device 800, such as operations associated with display, telephone calls, data communications, camera operations, and recording operations. The processing components 802 may include one or more processors 820 to execute instructions to perform all or a portion of the steps of the methods described above. Further, the processing component 802 can include one or more modules that facilitate interaction between the processing component 802 and other components. For example, the processing component 802 can include a multimedia module to facilitate interaction between the multimedia component 808 and the processing component 802.
The memory 804 is configured to store various types of data to support operations at the electronic device 800. Examples of such data include instructions for any application or method operating on the electronic device 800, contact data, phonebook data, messages, pictures, videos, and so forth. The memory 804 may be implemented by any type or combination of volatile or non-volatile memory devices such as Static Random Access Memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, magnetic or optical disks.
The power supply component 806 provides power to the various components of the electronic device 800. The power components 806 may include a power management system, one or more power supplies, and other components associated with generating, managing, and distributing power for the electronic device 800.
The multimedia component 808 includes a screen that provides an output interface between the electronic device 800 and a user. In some embodiments, 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 an input signal from a user. The touch panel includes one or more touch sensors to sense touch, slide, and gestures on the touch panel. The touch sensor may not only sense the boundary of a touch or slide action, but also detect the duration and pressure associated with the touch or slide operation. In some embodiments, the multimedia component 808 includes a front facing camera and/or a rear facing camera. The front camera and/or the rear camera may receive external multimedia data when the electronic device 800 is in an operation mode, such as a shooting mode or a video mode. Each front camera and rear camera may be a fixed optical lens system or have a focal length and optical zoom capability.
The audio component 810 is configured to output and/or input audio signals. For example, the audio component 810 includes a Microphone (MIC) configured to receive external audio signals when the electronic device 800 is in an operational mode, such as a call mode, a recording mode, and a voice recognition mode. The received audio signals may further be stored in the memory 804 or transmitted via the communication component 816. In some embodiments, 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 peripheral interface modules, which may be keyboards, click wheels, buttons, etc. These buttons may include, but are not limited to: a home button, a volume button, a start button, and a lock button.
The sensor assembly 814 includes one or more sensors for providing various aspects of state assessment for the electronic device 800. For example, the sensor assembly 814 may detect an open/closed state of the electronic device 800, the relative positioning of components, such as a display and keypad of the electronic device 800, the sensor assembly 814 may also detect a change in the position of the electronic device 800 or a component of the electronic device 800, the presence or absence of user contact with the electronic device 800, orientation or acceleration/deceleration of the electronic device 800, and a change in the temperature of the electronic device 800. Sensor assembly 814 may include a proximity sensor configured to detect the presence of a nearby object without any physical contact. The sensor assembly 814 may also include a light sensor, such as a CMOS or CCD image sensor, for use in imaging applications. In some embodiments, the sensor assembly 814 may also include an acceleration sensor, a gyroscope sensor, a magnetic sensor, a pressure sensor, or a temperature sensor.
The communication component 816 is configured to facilitate wired or wireless communication between the electronic device 800 and other devices. The electronic device 800 may access a wireless network based on a communication standard, such as WiFi, 2G or 3G, or a combination thereof. In an exemplary embodiment, the communication component 816 receives a broadcast signal or broadcast related information from an external broadcast management system via a broadcast channel. In an exemplary embodiment, the communication component 816 further includes a Near Field Communication (NFC) module to facilitate short-range communications. For example, the NFC module may be implemented based on Radio Frequency Identification (RFID) technology, infrared data association (IrDA) technology, Ultra Wideband (UWB) technology, Bluetooth (BT) technology, and other technologies.
In an exemplary embodiment, the electronic device 800 may be implemented by one or more Application Specific Integrated Circuits (ASICs), Digital Signal Processors (DSPs), Digital Signal Processing Devices (DSPDs), Programmable Logic Devices (PLDs), Field Programmable Gate Arrays (FPGAs), controllers, micro-controllers, microprocessors or other electronic components for performing the above-described methods.
In an exemplary embodiment, a non-transitory computer-readable storage medium, such as the memory 804, is also provided that includes computer program instructions executable by the processor 820 of the electronic device 800 to perform the above-described methods.
Fig. 7 is a block diagram illustrating an electronic device 1900 according to an example embodiment. For example, the electronic device 1900 may be provided as a server. Referring to fig. 7, electronic device 1900 includes a processing component 1922 further including one or more processors and memory resources, represented by memory 1932, for storing instructions, e.g., applications, executable by processing component 1922. The application programs stored in memory 1932 may include one or more modules that each correspond to a set of instructions. Further, the processing component 1922 is configured to execute instructions to perform the above-described method.
The electronic device 1900 may also include a power component 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 may operate based on an operating system stored in memory 1932, such as Windows Server, Mac OS XTM, UnixTM, LinuxTM, FreeBSDTM, or the like.
In an exemplary embodiment, a non-transitory computer readable storage medium, such as the memory 1932, is also provided that includes computer program instructions executable by the processing component 1922 of the electronic device 1900 to perform the above-described methods.
The present disclosure may be systems, methods, and/or computer program products. The computer program product may include a computer-readable storage medium having computer-readable program instructions embodied thereon for causing a processor to implement various aspects of the present disclosure.
The computer readable storage medium may be a tangible device that can hold and store the instructions for use by the instruction execution device. The computer readable storage medium may be, for example, but not limited to, an electronic memory device, a magnetic memory device, an optical memory device, an electromagnetic memory device, a semiconductor memory device, or any suitable combination of the foregoing. More specific examples (a non-exhaustive list) of the computer readable storage medium would include the following: a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), a Static Random Access Memory (SRAM), a portable compact disc read-only memory (CD-ROM), a Digital Versatile Disc (DVD), a memory stick, a floppy disk, a mechanical coding device, such as punch cards or in-groove projection structures having instructions stored thereon, and any suitable combination of the foregoing. Computer-readable storage media as used herein is not to be construed as transitory signals per se, such as radio waves or other freely propagating electromagnetic waves, electromagnetic waves propagating through a waveguide or other transmission medium (e.g., optical pulses through a fiber optic cable), or electrical signals transmitted through electrical wires.
The computer-readable program instructions described herein may be downloaded from a computer-readable storage medium to a respective computing/processing device, or to an external computer or external storage device via 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. The network adapter card or network interface in each computing/processing device receives computer-readable program instructions from the network and forwards the computer-readable program instructions for storage in a computer-readable storage medium in the respective computing/processing device.
The computer program instructions for carrying out operations of the present disclosure may be assembler instructions, Instruction Set Architecture (ISA) instructions, machine-related instructions, microcode, firmware instructions, state setting data, or source or object code written in any combination of one or more programming languages, including an object oriented programming language such as Smalltalk, C + + or the like and conventional procedural programming languages, such as the "C" programming 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. In the case of a remote computer, the remote computer may be connected to the user's computer through any type of network, including a Local Area Network (LAN) or a Wide Area Network (WAN), or the connection may be made to an external computer (for example, through the Internet using an Internet service provider). In some embodiments, the electronic circuitry that can execute the computer-readable program instructions implements aspects of the present disclosure by utilizing the state information of the computer-readable program instructions to personalize the electronic circuitry, such as a programmable logic circuit, a Field Programmable Gate Array (FPGA), or a Programmable Logic Array (PLA).
Various aspects of the present disclosure are described herein with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems) and computer program products according to embodiments of the disclosure. It will be understood that each block of the flowchart illustrations and/or block diagrams, and combinations of blocks in the flowchart illustrations and/or block 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, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions/acts specified in the flowchart and/or block diagram block or blocks. These computer-readable program instructions may also be stored in a computer-readable storage medium that can direct a computer, programmable data processing apparatus, and/or other devices to function in a particular manner, such that the computer-readable medium storing the instructions comprises an article of manufacture including instructions which implement the function/act specified in the flowchart and/or block diagram block or blocks.
The computer readable program instructions may also be loaded onto a computer, other programmable data processing apparatus, or other devices to cause a series of operational steps to be performed on the computer, other programmable apparatus or other devices to produce a computer implemented process such that the instructions which execute on the computer, other programmable apparatus or other devices implement the functions/acts specified in the flowchart and/or block diagram block or blocks.
The flowchart and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer program products according to various embodiments of the present disclosure. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of instructions, which comprises one or more executable instructions for implementing the specified logical function(s). In some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown 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. It will also be noted that each block of the block diagrams and/or flowchart illustration, and combinations of blocks in the block diagrams and/or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
Having described embodiments of the present disclosure, the foregoing description is intended to be exemplary, not exhaustive, and not limited to the disclosed embodiments. Many modifications and variations will be apparent to those of ordinary skill in the art without departing from the scope and spirit of the described embodiments. The terms used herein were chosen in order to best explain the principles of the embodiments, the practical application, or technical improvements to the techniques in the marketplace, or to enable others of ordinary skill in the art to understand the embodiments disclosed herein.

Claims (12)

1. A method of positioning, comprising:
determining the absolute positioning position of the target at the current first moment according to the positioning information acquired by the positioning device;
determining a first distance between an initial relative position of a virtual object corresponding to the target at the first time and the absolute positioning position;
under the condition that the absolute value of the first distance is larger than a preset distance threshold, correcting the position of the virtual object according to the absolute positioning position at the first moment to obtain the display position of the virtual object at the first moment;
the correcting the position of the virtual object according to the positioning position at the first moment to obtain the display position of the virtual object at the first moment includes:
and carrying out relative positioning processing on the target according to the absolute positioning position at the first moment, and determining the display position of the virtual object corresponding to the target at the first moment.
2. The method of claim 1, further comprising:
determining the absolute positioning position of the target at the initial moment according to the positioning information acquired by the positioning device;
and carrying out relative positioning processing on the target according to the absolute positioning position at the initial moment, and determining the display position of the virtual object corresponding to the target at the initial moment.
3. The method of claim 1, further comprising:
determining the initial relative position as a display position of the virtual object when the absolute value of the first distance is less than or equal to a preset distance threshold.
4. The method of claim 1, further comprising:
determining the distance threshold according to an absolute positioning error of the positioning device.
5. The method of claim 1, further comprising:
and displaying the virtual object corresponding to the target at the display position at the first moment.
6. A positioning device, comprising:
the first determining module is used for determining the absolute positioning position of the target at the current first moment according to the positioning information acquired by the positioning device;
a second determining module, configured to determine a first distance between an initial relative position of the virtual object corresponding to the target at the first time and the absolute positioning position;
an obtaining module, configured to correct the position of the virtual object according to the absolute positioning position at the first time when the absolute value of the first distance is greater than a preset distance threshold, and obtain a display position of the virtual object at the first time;
the obtaining module is further to:
and carrying out relative positioning processing on the target according to the absolute positioning position at the first moment, and determining the display position of the virtual object corresponding to the target at the first moment.
7. The apparatus of claim 6, further comprising:
the third determining module is used for determining the absolute positioning position of the target at the initial moment according to the positioning information acquired by the positioning device;
and the fourth determining module is used for performing relative positioning processing on the target according to the absolute positioning position at the initial moment, and determining the display position of the virtual object corresponding to the target at the initial moment.
8. The apparatus of claim 6, further comprising:
a fifth determining module, configured to determine the initial relative position as a display position of the virtual object when an absolute value of the first distance is smaller than or equal to a preset distance threshold.
9. The apparatus of claim 6, further comprising:
a sixth determining module, configured to determine the distance threshold according to an absolute positioning error of the positioning apparatus.
10. The apparatus of claim 6, further comprising:
and the display module is used for displaying the virtual object corresponding to the target at the display position of the first moment.
11. An electronic device, comprising:
a processor;
a memory for storing processor-executable instructions;
wherein the processor is configured to: performing the method of any one of claims 1 to 5.
12. A computer readable storage medium having computer program instructions stored thereon, which when executed by a processor implement the method of any one of claims 1 to 5.
CN202010088900.1A 2020-02-12 2020-02-12 Positioning method and device, electronic equipment and storage medium Active CN111323007B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010088900.1A CN111323007B (en) 2020-02-12 2020-02-12 Positioning method and device, electronic equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010088900.1A CN111323007B (en) 2020-02-12 2020-02-12 Positioning method and device, electronic equipment and storage medium

Publications (2)

Publication Number Publication Date
CN111323007A CN111323007A (en) 2020-06-23
CN111323007B true CN111323007B (en) 2022-04-15

Family

ID=71168875

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010088900.1A Active CN111323007B (en) 2020-02-12 2020-02-12 Positioning method and device, electronic equipment and storage medium

Country Status (1)

Country Link
CN (1) CN111323007B (en)

Families Citing this family (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112289167A (en) * 2020-09-14 2021-01-29 北京京东振世信息技术有限公司 Positioning method and device, computer readable storage medium and electronic equipment
CN112130185B (en) * 2020-09-22 2023-11-24 上海市计量测试技术研究院 Positioning precision measuring method of positioning terminal
CN112255917B (en) * 2020-10-19 2022-06-07 东北石油大学 Positioning driving control method, positioning driving control device, positioning driving control system, electronic equipment and storage medium
CN112432636B (en) * 2020-11-30 2023-04-07 浙江商汤科技开发有限公司 Positioning method and device, electronic equipment and storage medium
CN112950712B (en) * 2021-02-25 2023-03-24 深圳市慧鲤科技有限公司 Positioning method and device, electronic equipment and storage medium
CN113655505B (en) * 2021-08-27 2023-09-29 西安广和通无线通信有限公司 Positioning adjustment method, device, electronic equipment and storage medium
CN113724397A (en) * 2021-08-27 2021-11-30 浙江商汤科技开发有限公司 Virtual object positioning method and device, electronic equipment and storage medium

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108888953A (en) * 2018-06-29 2018-11-27 杭州电魂网络科技股份有限公司 Game element correlating method and device
CN108958462A (en) * 2017-05-25 2018-12-07 阿里巴巴集团控股有限公司 A kind of methods of exhibiting and device of virtual objects
CN109146965A (en) * 2017-06-16 2019-01-04 精工爱普生株式会社 Information processing unit and computer program
CN109173258A (en) * 2018-10-18 2019-01-11 腾讯科技(深圳)有限公司 Virtual objects show, positioning information transmitting method, equipment and storage medium
CN109545003A (en) * 2018-12-24 2019-03-29 北京卡路里信息技术有限公司 A kind of display methods, device, terminal device and storage medium

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20170352091A1 (en) * 2014-12-16 2017-12-07 Metail Limited Methods for generating a 3d virtual body model of a person combined with a 3d garment image, and related devices, systems and computer program products
CN108519816A (en) * 2018-03-26 2018-09-11 广东欧珀移动通信有限公司 Information processing method, device, storage medium and electronic equipment
CN109029443B (en) * 2018-06-08 2021-01-15 北京奇艺世纪科技有限公司 Position determination method and device in virtual environment

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108958462A (en) * 2017-05-25 2018-12-07 阿里巴巴集团控股有限公司 A kind of methods of exhibiting and device of virtual objects
CN109146965A (en) * 2017-06-16 2019-01-04 精工爱普生株式会社 Information processing unit and computer program
CN108888953A (en) * 2018-06-29 2018-11-27 杭州电魂网络科技股份有限公司 Game element correlating method and device
CN109173258A (en) * 2018-10-18 2019-01-11 腾讯科技(深圳)有限公司 Virtual objects show, positioning information transmitting method, equipment and storage medium
CN109545003A (en) * 2018-12-24 2019-03-29 北京卡路里信息技术有限公司 A kind of display methods, device, terminal device and storage medium

Also Published As

Publication number Publication date
CN111323007A (en) 2020-06-23

Similar Documents

Publication Publication Date Title
CN111323007B (en) Positioning method and device, electronic equipment and storage medium
CN110647834B (en) Human face and human hand correlation detection method and device, electronic equipment and storage medium
CN110555794B (en) Image processing method and device, electronic equipment and storage medium
CN110928627B (en) Interface display method and device, electronic equipment and storage medium
CN109947981B (en) Video sharing method and device
CN109446912B (en) Face image processing method and device, electronic equipment and storage medium
CN110933488A (en) Video editing method and device
CN112950712B (en) Positioning method and device, electronic equipment and storage medium
CN108596093B (en) Method and device for positioning human face characteristic points
EP3147802B1 (en) Method and apparatus for processing information
CN108174269B (en) Visual audio playing method and device
CN110989901B (en) Interactive display method and device for image positioning, electronic equipment and storage medium
CN111860373B (en) Target detection method and device, electronic equipment and storage medium
CN111563138B (en) Positioning method and device, electronic equipment and storage medium
CN108900903B (en) Video processing method and device, electronic equipment and storage medium
CN107508573B (en) Crystal oscillator oscillation frequency correction method and device
WO2022134475A1 (en) Point cloud map construction method and apparatus, electronic device, storage medium and program
CN112767541B (en) Three-dimensional reconstruction method and device, electronic equipment and storage medium
CN110989884A (en) Image positioning operation display method and device, electronic equipment and storage medium
CN112541875A (en) Depth image processing method and device, electronic equipment and storage medium
CN110121115B (en) Method and device for determining wonderful video clip
CN115950415A (en) Method and device for determining navigation direction and storage medium
CN111078346B (en) Target object display method and device, electronic equipment and storage medium
CN112148130A (en) Information processing method and device, electronic equipment and storage medium
CN112683262A (en) Positioning method and device, electronic equipment and storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant