CN108261761B - Space positioning method and device and computer readable storage medium - Google Patents

Space positioning method and device and computer readable storage medium Download PDF

Info

Publication number
CN108261761B
CN108261761B CN201810049281.8A CN201810049281A CN108261761B CN 108261761 B CN108261761 B CN 108261761B CN 201810049281 A CN201810049281 A CN 201810049281A CN 108261761 B CN108261761 B CN 108261761B
Authority
CN
China
Prior art keywords
mode
base station
positioning
dimensional space
positioning base
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
CN201810049281.8A
Other languages
Chinese (zh)
Other versions
CN108261761A (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.)
Nolo Co ltd
Original Assignee
Nolo 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 Nolo Co ltd filed Critical Nolo Co ltd
Priority to CN201810049281.8A priority Critical patent/CN108261761B/en
Publication of CN108261761A publication Critical patent/CN108261761A/en
Application granted granted Critical
Publication of CN108261761B publication Critical patent/CN108261761B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • AHUMAN NECESSITIES
    • A63SPORTS; GAMES; AMUSEMENTS
    • A63FCARD, BOARD, OR ROULETTE GAMES; INDOOR GAMES USING SMALL MOVING PLAYING BODIES; VIDEO GAMES; GAMES NOT OTHERWISE PROVIDED FOR
    • A63F13/00Video games, i.e. games using an electronically generated display having two or more dimensions
    • A63F13/20Input arrangements for video game devices
    • A63F13/21Input arrangements for video game devices characterised by their sensors, purposes or types
    • A63F13/216Input arrangements for video game devices characterised by their sensors, purposes or types using geographical information, e.g. location of the game device or player using GPS
    • AHUMAN NECESSITIES
    • A63SPORTS; GAMES; AMUSEMENTS
    • A63FCARD, BOARD, OR ROULETTE GAMES; INDOOR GAMES USING SMALL MOVING PLAYING BODIES; VIDEO GAMES; GAMES NOT OTHERWISE PROVIDED FOR
    • A63F13/00Video games, i.e. games using an electronically generated display having two or more dimensions
    • A63F13/50Controlling the output signals based on the game progress
    • A63F13/52Controlling the output signals based on the game progress involving aspects of the displayed game scene
    • AHUMAN NECESSITIES
    • A63SPORTS; GAMES; AMUSEMENTS
    • A63FCARD, BOARD, OR ROULETTE GAMES; INDOOR GAMES USING SMALL MOVING PLAYING BODIES; VIDEO GAMES; GAMES NOT OTHERWISE PROVIDED FOR
    • A63F2300/00Features of games using an electronically generated display having two or more dimensions, e.g. on a television screen, showing representations related to the game
    • A63F2300/80Features of games using an electronically generated display having two or more dimensions, e.g. on a television screen, showing representations related to the game specially adapted for executing a specific type of game
    • A63F2300/8082Virtual reality

Landscapes

  • Engineering & Computer Science (AREA)
  • Multimedia (AREA)
  • Human Computer Interaction (AREA)
  • Environmental & Geological Engineering (AREA)
  • Radar, Positioning & Navigation (AREA)
  • Mobile Radio Communication Systems (AREA)
  • Processing Or Creating Images (AREA)

Abstract

The application discloses a space positioning method and a device, and a computer readable storage medium, wherein the method comprises the following steps: setting a standard mode and an actual application mode of a positioning base station; calculating the three-dimensional space coordinate of the device to be positioned in a three-dimensional space coordinate system; and determining the positioning data transmitted to the virtual scene according to the set standard mode and actual application mode of the positioning base station and the calculated three-dimensional space coordinate. According to the method and the device, the standard mode and the practical application mode of the positioning base station are set, and the positioning data transmitted to the virtual scene are determined according to the standard mode and the practical application mode, so that the space positioning under the horizontal mode and the suspension mode is realized, and the requirements of a user on different motion ranges and different steering angles under different game scenes are met.

Description

Space positioning method and device and computer readable storage medium
Technical Field
The present invention relates to the field of Virtual Reality (VR) technologies, and in particular, to a spatial positioning method and apparatus, and a computer-readable storage medium.
Background
In virtual reality operation, a user wears a head-mounted display to watch videos or perform interactive operation, and when interaction of a Steam VR or other VR platform is performed, the motion capture device and the head-mounted display are required to be matched for interactive operation. The working process of the motion capture device is as follows: a positioning base station is arranged in the indoor space and used for sending positioning signals or obtaining indoor images, a space coordinate axis is set, a signal receiver is held by the hand of a user, a head-mounted display is worn on the head, a positioner is arranged on the head-mounted display and can be arranged in the head-mounted display or arranged outside the head-mounted display, the positioner can receive the positioning signals sent by the positioning base station and calculate the position of the positioner on the space coordinate axis, the positioning base station can also receive the positioning signals sent by the signal receiver on the hand and transmit the specific postures of the head and the hands of the user to the head-mounted display, and the movement tracking of corresponding virtual objects, such as shooting arrows, playing balls and the like, is carried out on a display screen of the head-mounted display, or the positioning base station calculates the positions of the head and the hands of the user in the space according to the obtained indoor images, and transmitting the information to a display screen of the head-mounted display to perform positioning and motion tracking of the corresponding virtual object.
Currently used positioning technologies, including laser positioning technology, binocular camera positioning technology and the like, can only realize positioning within 180-degree positioning range of a user facing a camera or a signal transmitting base station; once the user deviates from the positioning range, for example, there is a table behind the user in the virtual game, and the user turns to take something on the table behind, at this time, the head-mounted display device positioner and the handle positioner of the user cannot be recognized by the camera or cannot receive the positioning signal transmitted by the signal transmitting base station, so that the head-mounted display device positioner and the handle positioner cannot perform positioning, thereby affecting the user experience.
In the application with the publication number of "CN 106774871A," entitled "method and system for spatially positioning near-eye display device based on image recognition," it is mentioned that the light-emitting device is disposed at the top end of the near-eye display device, so that the probability that the test light emitted by the light-emitting device is blocked during use can be reduced, and the accuracy and continuity of measurement can be further increased; however, in practical applications, when a user needs to play a game with a large movement range and a small steering angle, the light-emitting device is disposed at the top end of the near-eye display device, and when the movement range is large, the user may leave the image capturing range of the camera and cannot track the head position of the user.
Disclosure of Invention
In order to solve the above technical problem, the present invention provides a spatial positioning method and apparatus, and a computer-readable storage medium, which can simultaneously implement spatial positioning in horizontal and suspension modes.
In order to achieve the purpose of the invention, the technical scheme of the embodiment of the invention is realized as follows:
the embodiment of the invention provides a space positioning method, which comprises the following steps:
setting a standard mode and an actual application mode of a positioning base station;
calculating the three-dimensional space coordinate of the device to be positioned in a three-dimensional space coordinate system;
and determining the positioning data transmitted to the virtual scene according to the set standard mode and actual application mode of the positioning base station and the calculated three-dimensional space coordinate of the device to be positioned.
Further, the positioning base station comprises at least one of:
laser emitter, camera, ultrasonic transmitter.
Further, when the positioning base station is the laser transmitter and/or the ultrasonic transmitter, the calculating a three-dimensional space coordinate of the device to be positioned in a three-dimensional space coordinate system specifically includes: receiving a positioning signal sent by the positioning base station, and calculating a three-dimensional space coordinate of the device to be positioned in a three-dimensional space coordinate system according to the received positioning signal;
when the positioning base station is the camera, the calculating the three-dimensional space coordinate of the device to be positioned in the three-dimensional space coordinate system specifically includes: and calculating the three-dimensional space coordinate of the device to be positioned in a three-dimensional space coordinate system according to the image shot by the positioning base station.
Further, the standard mode and the actual application mode are a horizontal mode or a suspension mode.
Further, the determining, according to the set standard mode and the set actual application mode of the positioning base station and the calculated three-dimensional space coordinate of the device to be positioned, the positioning data transmitted to the virtual scene specifically includes:
when the set standard mode of the positioning base station is consistent with the set actual application mode, determining that the positioning data transmitted to the virtual scene is the same as the calculated three-dimensional space coordinate of the device to be positioned;
and when the set standard mode of the positioning base station is inconsistent with the set actual application mode, acquiring the rotation mode of the positioning base station, and determining the positioning data transmitted to the virtual scene according to the rotation mode of the positioning base station.
Further, the determining the positioning data transmitted to the virtual scene according to the rotation mode of the positioning base station specifically includes:
when the positioning base station rotates clockwise by 90 degrees by taking one coordinate axis in the X/Y/Z axes as the rotating axis to cause that the set standard mode is inconsistent with the actual application mode, determining that the positioning data of the rotating axis is unchanged in the positioning data transmitted to the virtual scene, exchanging the positioning data of other two coordinate axes, and taking the negative positioning data of one coordinate axis.
Further, the determining the positioning data transmitted to the virtual scene according to the rotation mode of the positioning base station specifically includes:
assuming that the standard mode and the actual application mode set by the positioning base station are both horizontal modes, the three-dimensional space coordinate axis set by the positioning base station is as follows: and when the positioning base station rotates by 90 degrees clockwise by taking the X axis as a rotating shaft and rotates by 180 degrees by taking the Z axis as a rotating shaft, the set standard mode and the actual application mode are inconsistent, the positioning data transmitted to the virtual scene is determined to be (-X, -Z, -Y).
Embodiments of the present invention also provide a computer-readable storage medium storing one or more programs, which are executable by one or more processors to implement the steps of the spatial location method as described in any of the above.
The embodiment of the invention also provides a space positioning device, which comprises a setting module, a positioning module and a determining module, wherein:
the device comprises a setting module, a determining module and a processing module, wherein the setting module is used for setting a standard mode and an actual application mode of a positioning base station and outputting the set standard mode and the actual application mode to the determining module;
the positioning module is used for calculating the three-dimensional space coordinate of the device to be positioned in the three-dimensional space coordinate system and outputting the calculated three-dimensional space coordinate to the determining module;
and the determining module is used for determining the positioning data transmitted to the virtual scene according to the acquired standard mode and actual application mode of the positioning base station and the calculated three-dimensional space coordinate of the device to be positioned.
Further, the determining module determines the positioning data transmitted to the virtual scene according to the acquired standard mode and actual application mode of the positioning base station and the calculated three-dimensional space coordinate of the device to be positioned, and specifically includes:
when the obtained standard mode and the obtained actual application mode of the positioning base station are consistent, determining that the positioning data transmitted to the virtual scene are the same as the calculated three-dimensional space coordinates of the device to be positioned;
and when the obtained standard mode and the practical application mode of the positioning base station are not consistent, obtaining the rotation mode of the positioning base station, and determining the positioning data transmitted to the virtual scene according to the rotation mode of the positioning base station.
Further, the standard mode and the actual application mode are a horizontal mode or a suspension mode.
The technical scheme of the invention has the following beneficial effects:
according to the space positioning method and device and the computer readable storage medium, the standard mode and the practical application mode of the positioning base station are set, and the positioning data transmitted to the virtual scene are determined according to the set standard mode and the set practical application mode, so that the space positioning under the horizontal mode and the suspension mode is realized, and the requirements of a user on different motion ranges and different steering angles under different game scenes are met.
Drawings
The accompanying drawings, which are included to provide a further understanding of the invention and are incorporated in and constitute a part of this application, illustrate embodiment(s) of the invention and together with the description serve to explain the invention without limiting the invention. In the drawings:
fig. 1 is a schematic flow chart of a spatial positioning method according to an embodiment of the present invention;
FIG. 2 is a schematic diagram of a system structure when a positioning base station is horizontally disposed according to an embodiment of the present invention;
FIG. 3 is a schematic diagram of a system for positioning a base station in a suspended manner according to an embodiment of the present invention;
fig. 4(a) and fig. 4(b) are schematic diagrams illustrating coordinate system transformation of a horizontal mode and a suspension mode in a coordinate axis setting method of different positioning base stations according to an embodiment of the present invention;
fig. 5 is a schematic structural diagram of a spatial positioning device according to an embodiment of the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the present invention more apparent, embodiments of the present invention will be described in detail below with reference to the accompanying drawings. It should be noted that the embodiments and features of the embodiments in the present application may be arbitrarily combined with each other without conflict.
Referring to fig. 1, an embodiment of the present invention provides a spatial positioning method, including the following steps:
step 101: setting a standard mode and an actual application mode of a positioning base station;
further, positioning the base station comprises at least one of:
laser emitter, camera, ultrasonic transmitter.
Illustratively, for laser positioning technology, the positioning base station is a laser transmitter; for the camera positioning technology, the positioning base station is a camera, and can be a monocular camera or a binocular camera; for the laser + ultrasonic positioning technology, the positioning base station is a laser + ultrasonic transmitter.
Further, the standard mode and the actual application mode include a horizontal mode and a suspension mode.
It should be noted that, according to the needs of the user, the positioning base station has two positions to be selected, one is a horizontal mode, and the positioning base station is placed horizontally in a direction right opposite to the front of the body of the user, as shown in fig. 2; one is a hanging mode, where the positioning base station is hung up against the user's overhead, as shown in fig. 3. When a user needs to play a game with a large movement range and a small turning angle, the positioning base station is placed in a horizontal placement mode as shown in fig. 2, and on a control device (such as a mobile phone and a PC), the user correspondingly selects a mode option horizontal mode appearing on a page according to the placement mode of the positioning base station; when the user needs to play a game with a small movement range but a large steering angle, the suspension placement mode shown in fig. 3 is selected to place the positioning base station, and on the control device, the user correspondingly selects the mode option appearing on the page as the "suspension" mode according to the placement mode of the positioning base station.
The standard mode of the positioning base station can be a horizontal mode or a suspension mode, when the motion capture equipment (comprising the positioning base station and a device to be positioned) is matched with the head-mounted display, the standard mode of the positioning base station is set, and the horizontal mode is usually set as the standard mode of the positioning base station; the actual application mode of the positioning base station can be a horizontal mode or a hanging mode, the placement mode of the positioning base station is selected according to a specific application scene, and setting is selected on a control device (such as a mobile phone and a PC).
Step 102: calculating the three-dimensional space coordinate of the device to be positioned in a three-dimensional space coordinate system;
further, when the positioning base station is a laser transmitter and/or an ultrasonic transmitter, step 102 specifically includes: receiving a positioning signal sent by a positioning base station, and calculating a three-dimensional space coordinate of a device to be positioned in a three-dimensional space coordinate system according to the received positioning signal;
when the positioning base station is a camera, the step 102 specifically includes: and calculating the three-dimensional space coordinate of the device to be positioned in the three-dimensional space coordinate system according to the image shot by the positioning base station.
It should be noted that, the present application emphasizes that a standard mode and an actual application mode of a positioning base station can be set, and positioning data transmitted to a virtual scene is determined according to the set standard mode, the actual application mode and the calculated three-dimensional space coordinate, and how to calculate the three-dimensional space coordinate of a device to be positioned in a three-dimensional space coordinate system, for example, the positioning base station is a laser and ultrasonic transmitter, refer to the existing patent, for example, the publication number is "CN 106526537A", the invention name is "a three-dimensional space positioning method and system"; for example, the positioning base station is a camera, which can be referred to in the prior patent, such as the application with the publication number "CN 106774871A", entitled "near-eye display device space positioning method and system based on image recognition"; for example, the positioning base station is a laser transmitter, which can be referred to in the prior patent, such as the application with publication number "CN 106646342" entitled "positioning base station and positioning system". This is not limited by the present application.
Step 103: and determining the positioning data transmitted to the virtual scene according to the set standard mode and actual application mode of the positioning base station and the calculated three-dimensional space coordinate.
Further, the step 103 of determining the positioning data transmitted to the virtual scene according to the set standard mode, the set actual application mode, and the calculated three-dimensional space coordinate of the positioning base station specifically includes:
when the set actual application mode of the positioning base station is consistent with the standard mode, determining that the positioning data transmitted to the virtual scene is the same as the calculated three-dimensional space coordinate of the device to be positioned;
and when the set actual application mode of the positioning base station is inconsistent with the standard mode, acquiring the rotation mode of the positioning base station, and determining the positioning data transmitted to the virtual scene according to the rotation mode of the positioning base station.
Further, determining the positioning data transmitted to the virtual scene according to the rotation mode of the positioning base station specifically includes:
when the positioning base station rotates clockwise by 90 degrees by taking one coordinate axis in the X/Y/Z axis as a rotating axis to cause that the set practical application mode is inconsistent with the standard mode, the positioning data of the rotating axis is unchanged, the positioning data of other two coordinate axes are exchanged, and the positioning data of one coordinate axis is negative.
In an embodiment of the present invention, when the set standard mode and the set actual application mode are both horizontal modes, assuming that the three-dimensional space coordinate calculated according to the X/Y/Z axis of the positioning base station is (X, Y, Z), it is determined that the positioning data transmitted to the virtual scene is also (X, Y, Z); when the standard mode set by the positioning base station is unchanged, and the practical application mode is changed into the hanging mode, the positioning base station uses one coordinate axis in the X/Y/Z axis as a rotating axis, clockwise rotation is 90 degrees, the three-dimensional space coordinate calculated according to the X/Y/Z axis of the positioning base station is (X, Y, Z), the positioning data transmitted to the virtual scene is determined, the positioning data of the rotating axis is unchanged, the positioning data of other two coordinate axes are exchanged, and the positioning data of one coordinate axis is negative.
For example, the X/Y/Z axis of the positioning base station is set as shown in fig. 2, and assuming that the calculated three-dimensional space coordinate is (X, Y, Z), when the actual application mode is consistent with the set standard mode, it is determined that the positioning data transmitted to the virtual scene is also (X, Y, Z); when the set standard mode is not changed and the actual application mode is changed from the horizontal mode of fig. 2 to the suspension mode of fig. 3, the positioning base station rotates clockwise by 90 degrees by taking the X axis as the rotation axis, and the calculated three-dimensional space coordinate is (X, y, z), and the positioning data transmitted to the virtual scene is determined to be (X, -z, y).
It should be noted that, the positioning base station may determine a preset three-dimensional spatial coordinate system, for example, when the positioning base station is horizontally placed, the X/Y/Z directions of the corresponding calculation may be as shown in fig. 2, taking the positioning base station as a rectangular parallelepiped as an example, an origin of the preset spatial coordinate system may be a center of gravity of the positioning base station, a first coordinate axis (for example, referred to as an X axis) may be perpendicular to a side panel of the positioning base station, a second coordinate axis (for example, referred to as a Z axis) may be perpendicular to a front panel of the positioning base station, a direction pointing to the front side of the front panel is a positive direction of the second coordinate axis, the positive direction of the first coordinate axis and the positive direction of the second coordinate axis satisfy a right-hand rule, and a third coordinate axis (for example, referred to as a Y axis) is perpendicular. There are various ways for setting the preset spatial coordinate system, which is not limited in this application. In practical application, the preset spatial coordinate system can be determined according to the actual situation of the real scene and the adopted positioning mode. When the user needs to play a game with a small movement range and a large steering angle, the positioning base station is suspended, and at this time, the user is assumed to rotate the positioning base station clockwise by 90 ° around the X axis as a rotation axis and mount the positioning base station at an overhead position, for example, on a ceiling, and the X/Y/Z directions calculated correspondingly are as shown in fig. 3 (note that the X axis in fig. 2 and 3 is a direction vertical to the paper surface and inward). When a user acts in a horizontal mode, for example, moves backwards, the value of z in the calculated three-dimensional space coordinates (x, y, z) is increased, positioning data (x, y, z) transmitted to the virtual scene is determined, the value of z is also increased, and when the coordinate system of the virtual scene corresponds to the three-dimensional space coordinate system determined by the positioning base station, the value of z in the coordinate system of the virtual scene is increased, which shows that a virtual character in the virtual scene moves backwards, so that the action consistency between the real world and the virtual scene can be achieved, and good game experience is achieved.
However, when the set standard pattern and the actual application pattern do not match, it is necessary to convert the positioning data on different coordinate axes when transmitting the positioning data to the virtual scene display. As shown in fig. 2 and fig. 3, if the positioning data conversion is not performed, when the user moves backward, the value of y in the calculated three-dimensional space coordinates (x, y, z) is increased, it is determined that the value of y in the positioning data (x, y, z) transmitted to the virtual scene is increased, and when the coordinate system of the virtual scene corresponds to the three-dimensional space coordinate system determined by the positioning base station, the value of z in the coordinate system of the virtual scene is increased, which shows that the virtual character in the virtual scene moves upward, so that the action consistency between the real world and the virtual scene cannot be achieved.
Specifically, when positioning is performed by using a camera, a laser, and an ultrasonic + laser method, assuming that an X/Y/Z axis calculated by a positioning base station is as shown in fig. 2, a three-dimensional space coordinate (X, Y, Z) in a three-dimensional space coordinate system calculated in a suspended mode needs to be converted, a Y value is converted into a Z value, and the Z value is converted into a Y value, that is, the positioning data finally sent to a virtual scene is (X, -Z, Y), so that the action consistency between the real world and the virtual scene can be achieved, and the spatial positioning in the two modes can be realized.
The positioning data conversion mode is set based on the X/Y/Z axis of one positioning base station, and the positioning data to be converted is different for the X/Y/Z axis setting of different positioning base stations. As shown in fig. 4(a), in the setting manner of the X/Y/Z axes of the positioning base station (the X axes on the left side and the right side in fig. 4(a) are both directions from the vertical paper surface to the inside), assuming that the three-dimensional space coordinate calculated in the horizontal mode is (X, Y, Z), if the actual application mode is consistent with the set standard mode, it is determined that the positioning data transmitted to the virtual scene is also (X, Y, Z); when the set standard mode is not changed and the actual application mode is changed into the suspension mode, the positioning base station rotates clockwise by 90 degrees by taking the X axis as a rotating axis, the calculated three-dimensional space coordinate is (X, y, z), and the positioning data transmitted to the virtual scene is determined to be (X, z, -y).
The X/Y/Z axes of the positioning base station are rotated by 90 degrees by taking one axis as a rotating axis, and the positioning data in the horizontal mode and the suspension mode are exchanged. When the positioning base station uses two shafts as rotating shafts, the clockwise rotation is carried out for 90 degrees along one shaft, and the rotation of the other shaft for 180 degrees causes the set standard mode to be inconsistent with the actual application mode, the positioning data transmitted to the virtual scene is determined, the positioning data along the 90-degree rotating shaft is unchanged, the positioning data of other two coordinate shafts are interchanged, and all numerical values are negative.
As shown in fig. 4(b), the setting manner of the X/Y/Z axes of the positioning base station (the X axis in fig. 4(b) is a direction from the vertical paper surface to the inside, and the X axis on the right side is a direction from the vertical paper surface to the outside), assuming that the three-dimensional space coordinate calculated in the horizontal mode is (X, Y, Z), when the actual application mode is also the horizontal mode, it is determined that the positioning data transmitted to the virtual scene is also (X, Y, Z); when the set standard mode is not changed and the actual application mode is changed into the suspension mode, the positioning base station rotates clockwise by 90 degrees by taking the X axis as a rotating axis, and then rotates 180 degrees by taking the Z axis as a rotating axis, and if the calculated three-dimensional space coordinate is (X, y, Z), the positioning data transmitted to the virtual scene is determined to be (-X, -Z, -y). By analogy, the positioning data transmitted to the virtual scene are correspondingly converted in different modes according to the setting modes of the X/Y/Z axes of different positioning base stations.
The rotation mode of the positioning base station can be determined by an artificial setting, for example, it is determined that the positioning base station can only rotate 90 ° clockwise along a fixed coordinate axis, and the positioning base station is converted from a horizontal mode to a suspension mode, or the rotation mode of the positioning base station can be determined by an IMU (inertial sensor) installed inside the positioning base station.
Embodiments of the present invention also provide a computer-readable storage medium storing one or more programs, which are executable by one or more processors to implement the steps of the spatial location method as described in any of the above.
Referring to fig. 5, an embodiment of the present invention further provides a spatial location apparatus, including a setting module 501, a location module 502, and a determination module 503, where:
a setting module 501, configured to set a standard mode and an actual application mode of a positioning base station, and output the set standard mode and the set actual application mode to a determining module 503;
the positioning module 502 is configured to calculate a three-dimensional space coordinate of the device to be positioned in a three-dimensional space coordinate system, and output the calculated three-dimensional space coordinate to the determining module 503;
the determining module 503 is configured to determine the positioning data transmitted to the virtual scene according to the acquired standard mode and actual application mode of the positioning base station and the calculated three-dimensional space coordinate of the device to be positioned.
Further, the positioning base station comprises at least one of:
laser emitter, camera, ultrasonic transmitter.
Illustratively, for laser positioning technology, the positioning base station is a laser transmitter; for the camera positioning technology, the positioning base station is a monocular camera or a binocular camera; for the laser + ultrasonic positioning technology, the positioning base station is a laser + ultrasonic transmitter.
Further, the standard mode of the positioning base station is a horizontal mode, and the practical application mode comprises a horizontal mode and a hanging mode.
Further, the positioning module 502 is specifically configured to, for laser positioning and laser + ultrasonic positioning, receive a positioning signal sent by a positioning base station, calculate a three-dimensional space coordinate of the device to be positioned in a three-dimensional space coordinate system according to the received positioning signal, and output the calculated three-dimensional space coordinate to the determining module 503; for the camera positioning, the module is configured to calculate a three-dimensional space coordinate of the device to be positioned in the three-dimensional space coordinate system according to an image captured by the positioning base station, and output the calculated three-dimensional space coordinate to the determining module 503.
It should be noted that, according to the needs of the user, the positioning base station has two positions to be selected, one is horizontally placed in a direction directly facing the front of the user body, as shown in fig. 2; one is suspended in a direction against the top of the user's head as shown in fig. 3. When a user needs to play a game with a large movement range and a small turning angle, the positioning base station is placed in a horizontal placement mode as shown in fig. 2, and on a control device (such as a mobile phone and a PC), the user correspondingly selects a mode option horizontal mode appearing on a page according to the placement mode of the positioning base station; when the user needs to play a game with a small movement range but a large steering angle, the suspension placement mode shown in fig. 3 is selected to place the positioning base station, and on the control device, the user correspondingly selects the mode option appearing on the page as the "suspension" mode according to the placement mode of the positioning base station.
The method includes the steps of setting a standard mode and an actual application mode of a positioning base station, determining positioning data transmitted to a virtual scene according to the set standard mode and the actual application mode and the calculated three-dimensional space coordinate of a device to be positioned, and calculating the three-dimensional space coordinate of the device to be positioned in a three-dimensional space coordinate system.
Further, the determining module 503 determines the positioning data transmitted to the virtual scene according to the acquired standard mode of the positioning base station, the actual application mode, and the calculated three-dimensional space coordinate of the device to be positioned, and specifically includes:
when the set standard mode is consistent with the set actual application mode, determining that the positioning data transmitted to the virtual scene is the same as the calculated three-dimensional space coordinate of the device to be positioned;
and when the set standard mode is inconsistent with the actual application mode, acquiring the rotation mode of the positioning base station, and determining the positioning data transmitted to the virtual scene according to the rotation mode of the positioning base station.
Further, the determining module 503 determines the positioning data transmitted to the virtual scene according to the rotation mode of the positioning base station, and specifically includes:
when the positioning base station rotates clockwise by 90 degrees by taking one coordinate axis in the X/Y/Z axis as a rotating axis to cause that a set standard mode is inconsistent with an actual application mode, determining that the positioning data of the rotating axis is unchanged in the positioning data transmitted to the virtual scene, exchanging the positioning data of other two coordinate axes, and taking the negative positioning data of one coordinate axis.
It should be noted that, the positioning base station may determine a preset three-dimensional spatial coordinate system, for example, when the positioning base station is horizontally placed, the X/Y/Z directions of the corresponding calculation may be as shown in fig. 2, taking the positioning base station as a rectangular parallelepiped as an example, an origin of the preset spatial coordinate system may be a center of gravity of the positioning base station, a first coordinate axis (for example, referred to as an X axis) may be perpendicular to a side panel of the positioning base station, a second coordinate axis (for example, referred to as a Z axis) may be perpendicular to a front panel of the positioning base station, a direction pointing to the front side of the front panel is a positive direction of the second coordinate axis, the positive direction of the first coordinate axis and the positive direction of the second coordinate axis satisfy a right-hand rule, and a third coordinate axis (for example, referred to as a Y axis) is perpendicular. There are various ways for setting the preset spatial coordinate system, which is not limited in this application. In practical application, the preset spatial coordinate system can be determined according to the actual situation of the real scene and the adopted positioning mode. When a user needs to play a game with a small movement range and a large steering angle, the positioning base station is suspended, and at this time, the user is assumed to rotate clockwise by 90 degrees by taking the X axis as a rotating axis, and the corresponding calculated X/Y/Z axis directions are as shown in fig. 3. When a user acts in a horizontal mode, for example, moves backwards, the value of z in the calculated three-dimensional space coordinates (x, y, z) is increased, positioning data (x, y, z) transmitted to the virtual scene is determined, the value of z is also increased, and when the coordinate system of the virtual scene corresponds to the three-dimensional space coordinate system determined by the positioning base station, the value of z in the coordinate system of the virtual scene is increased, which shows that a virtual character in the virtual scene moves backwards, so that the action consistency between the real world and the virtual scene can be achieved, and good game experience is achieved.
However, when the set standard mode and the set actual application mode do not match, the determination module 503 needs to convert the positioning data of different coordinate axes when transmitting the positioning data to the virtual scene display. As shown in fig. 2 and fig. 3, if the positioning data conversion is not performed, when the user moves backward, the value of y in the calculated three-dimensional space coordinates (x, y, z) is increased, it is determined that the value of y in the positioning data (x, y, z) transmitted to the virtual scene is increased, and when the coordinate system of the virtual scene corresponds to the three-dimensional space coordinate system determined by the positioning base station, the value of z in the coordinate system of the virtual scene is increased, which shows that the virtual character in the virtual scene moves upward, so that the action consistency between the real world and the virtual scene cannot be achieved.
For example, in an embodiment of the present invention, the setting manner of the X/Y/Z axis of the positioning base station is as shown in fig. 2, the set standard mode is a horizontal mode as shown in fig. 2, and when the actual application mode is changed to the suspension mode as shown in fig. 3, the positioning base station rotates clockwise by 90 ° with one coordinate axis of the X/Y/Z axis as a rotation axis, and assuming that the three-dimensional spatial coordinate calculated according to the X/Y/Z axis of the positioning base station is (X, Y, Z), the determining module 503 determines the positioning data transmitted to the virtual scene to be (X, -Z, Y), so that the motions in the real world and the virtual scene are consistent, and spatial positioning in two modes can be achieved.
And for the X/Y/Z axis setting of different positioning base stations, the positioning data needing to be converted are different. For example, in another embodiment of the present invention, as shown in the left side of fig. 4(a), if the set standard mode is the horizontal mode and the three-dimensional space coordinate calculated in the horizontal mode is (X, Y, Z), when the actual application mode is changed to the suspension mode in the right side of fig. 4(a), and the positioning base station rotates clockwise by 90 ° with the X axis as the rotation axis, the determining module 503 determines the positioning data transmitted to the virtual scene to be (X, Z, -Y).
In another embodiment of the present invention, when the positioning base station uses two axes as rotation axes, and rotates clockwise 90 ° along one axis and rotates 180 ° along the other axis, the determining module 503 determines that the positioning data transmitted to the virtual scene is unchanged along the rotation axis of 90 °, the positioning data of the other two coordinate axes are interchanged, and all values are negative.
For example, as shown in the left side of fig. 4(b), if the set standard mode is the horizontal mode and the three-dimensional space coordinate calculated in the horizontal mode is (X, Y, Z), when the set practical application mode is changed to the suspension mode shown in the right side of fig. 4(b), the positioning base station rotates clockwise by 90 ° with the X axis as the rotation axis, and rotates 180 ° with the Z axis as the rotation axis, the determining module 503 determines the positioning data transmitted to the virtual scene to be (-X, -Z, -Y). In this way, the positioning data transmitted to the virtual scene are correspondingly converted in different modes according to the setting modes of the X/Y/Z axes of different positioning base stations.
The rotation mode of the positioning base station can be determined by an artificial setting, for example, it is determined that the positioning base station can only rotate 90 ° clockwise along a fixed coordinate axis, and the positioning base station is converted from a horizontal mode to a suspension mode, or the rotation mode of the positioning base station can be determined by an IMU (inertial sensor) installed inside the positioning base station.
It will be understood by those skilled in the art that all or part of the steps of the above methods may be implemented by instructing the relevant hardware through a program, and the program may be stored in a computer readable storage medium, such as a read-only memory, a magnetic or optical disk, and the like. Alternatively, all or part of the steps of the foregoing embodiments may also be implemented by using one or more integrated circuits, and accordingly, each module/unit in the foregoing embodiments may be implemented in the form of hardware, and may also be implemented in the form of a software functional module. The present invention is not limited to any specific form of combination of hardware and software.
The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention, and various modifications and changes may be made by those skilled in the art. Any modification, equivalent replacement, or improvement made within the spirit and principle of the present invention should be included in the protection scope of the present invention.

Claims (8)

1. A spatial localization method, comprising:
setting a standard mode and an actual application mode of a positioning base station;
calculating the three-dimensional space coordinate of the device to be positioned in a three-dimensional space coordinate system;
determining positioning data transmitted to a virtual scene according to the set standard mode and actual application mode of the positioning base station and the calculated three-dimensional space coordinate of the device to be positioned; the determining the positioning data transmitted to the virtual scene according to the set standard mode and the set actual application mode of the positioning base station and the calculated three-dimensional space coordinate of the device to be positioned specifically includes: when the set standard mode of the positioning base station is consistent with the set actual application mode, determining that the positioning data transmitted to the virtual scene is the same as the calculated three-dimensional space coordinate of the device to be positioned; and when the set standard mode of the positioning base station is inconsistent with the set actual application mode, acquiring the rotation mode of the positioning base station, and determining the positioning data transmitted to the virtual scene according to the rotation mode of the positioning base station.
2. The spatial location method of claim 1, wherein the positioning base station comprises at least one of:
laser emitter, camera, ultrasonic transmitter.
3. The spatial positioning method according to claim 2, wherein when the positioning base station is the laser transmitter and/or the ultrasonic transmitter, the calculating three-dimensional space coordinates of the device to be positioned in a three-dimensional space coordinate system specifically comprises: receiving a positioning signal sent by the positioning base station, and calculating a three-dimensional space coordinate of the device to be positioned in a three-dimensional space coordinate system according to the received positioning signal;
when the positioning base station is the camera, the calculating the three-dimensional space coordinate of the device to be positioned in the three-dimensional space coordinate system specifically includes: and calculating the three-dimensional space coordinate of the device to be positioned in a three-dimensional space coordinate system according to the image shot by the positioning base station.
4. The spatial location method of claim 1, wherein the standard mode and the actual application mode are a horizontal mode or a hanging mode.
5. The spatial location method according to claim 1, wherein the determining the location data transmitted to the virtual scene according to the rotation mode of the location base station specifically includes:
when the positioning base station rotates clockwise by 90 degrees by taking one coordinate axis in the X/Y/Z axes as the rotating axis to cause that the set standard mode is inconsistent with the actual application mode, determining that the positioning data of the rotating axis is unchanged in the positioning data transmitted to the virtual scene, exchanging the positioning data of other two coordinate axes, and taking the negative positioning data of one coordinate axis.
6. A computer readable storage medium, characterized in that the computer readable storage medium stores one or more programs which are executable by one or more processors to implement the steps of the spatial localization method according to any one of claims 1 to 5.
7. A spatial locator device, comprising a setting module, a locating module, and a determining module, wherein:
the device comprises a setting module, a determining module and a processing module, wherein the setting module is used for setting a standard mode and an actual application mode of a positioning base station and outputting the set standard mode and the actual application mode to the determining module;
the positioning module is used for calculating the three-dimensional space coordinate of the device to be positioned in the three-dimensional space coordinate system and outputting the calculated three-dimensional space coordinate to the determining module;
the determining module is used for determining positioning data transmitted to a virtual scene according to the acquired standard mode and actual application mode of the positioning base station and the calculated three-dimensional space coordinate of the device to be positioned; the determining module determines the positioning data transmitted to the virtual scene according to the acquired standard mode and actual application mode of the positioning base station and the calculated three-dimensional space coordinate of the device to be positioned, and specifically includes: when the obtained standard mode and the obtained actual application mode of the positioning base station are consistent, determining that the positioning data transmitted to the virtual scene are the same as the calculated three-dimensional space coordinates of the device to be positioned; and when the obtained standard mode and the practical application mode of the positioning base station are not consistent, obtaining the rotation mode of the positioning base station, and determining the positioning data transmitted to the virtual scene according to the rotation mode of the positioning base station.
8. The spatial positioning apparatus of claim 7, wherein the standard mode and the actual application mode are a horizontal mode or a hanging mode.
CN201810049281.8A 2018-01-18 2018-01-18 Space positioning method and device and computer readable storage medium Active CN108261761B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201810049281.8A CN108261761B (en) 2018-01-18 2018-01-18 Space positioning method and device and computer readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201810049281.8A CN108261761B (en) 2018-01-18 2018-01-18 Space positioning method and device and computer readable storage medium

Publications (2)

Publication Number Publication Date
CN108261761A CN108261761A (en) 2018-07-10
CN108261761B true CN108261761B (en) 2021-01-12

Family

ID=62776061

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201810049281.8A Active CN108261761B (en) 2018-01-18 2018-01-18 Space positioning method and device and computer readable storage medium

Country Status (1)

Country Link
CN (1) CN108261761B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109316750B (en) * 2018-11-21 2022-01-11 北京像素软件科技股份有限公司 Game scene area dividing method and device

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101393257A (en) * 2007-08-03 2009-03-25 汉莎航空系统股份公司 Device for controlling the position of an object and control method
CN104793637A (en) * 2015-04-08 2015-07-22 北京科技大学 Real-time tracking system and method of mobile equipment
CN107037880A (en) * 2017-03-02 2017-08-11 深圳前海极客船长网络科技有限公司 Space orientation attitude determination system and its method based on virtual reality technology
CN107564064A (en) * 2017-09-12 2018-01-09 深圳市欢创科技有限公司 A kind of anchor point, its coding method, localization method and its system

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7466303B2 (en) * 2004-02-10 2008-12-16 Sunnybrook Health Sciences Center Device and process for manipulating real and virtual objects in three-dimensional space

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101393257A (en) * 2007-08-03 2009-03-25 汉莎航空系统股份公司 Device for controlling the position of an object and control method
CN104793637A (en) * 2015-04-08 2015-07-22 北京科技大学 Real-time tracking system and method of mobile equipment
CN107037880A (en) * 2017-03-02 2017-08-11 深圳前海极客船长网络科技有限公司 Space orientation attitude determination system and its method based on virtual reality technology
CN107564064A (en) * 2017-09-12 2018-01-09 深圳市欢创科技有限公司 A kind of anchor point, its coding method, localization method and its system

Also Published As

Publication number Publication date
CN108261761A (en) 2018-07-10

Similar Documents

Publication Publication Date Title
CN110140099B (en) System and method for tracking controller
CN105138135B (en) Wear-type virtual reality device and virtual reality system
CN110650354B (en) Live broadcast method, system, equipment and storage medium for virtual cartoon character
US9892563B2 (en) System and method for generating a mixed reality environment
Foxlin Motion tracking requirements and technologies
US11042028B1 (en) Relative pose data augmentation of tracked devices in virtual environments
CN104380347B (en) Video processing equipment, method for processing video frequency and processing system for video
US20160292924A1 (en) System and method for augmented reality and virtual reality applications
JP2021530814A (en) Methods and systems for resolving hemispherical ambiguities using position vectors
US20150070274A1 (en) Methods and systems for determining 6dof location and orientation of head-mounted display and associated user movements
US20150097719A1 (en) System and method for active reference positioning in an augmented reality environment
CN104699247A (en) Virtual reality interactive system and method based on machine vision
CN103517061B (en) A kind of display control method of terminal equipment and device
WO2021098358A1 (en) Virtual reality system
CN110262667B (en) Virtual reality equipment and positioning method
WO2018113759A1 (en) Detection system and detection method based on positioning system and ar/mr
CN111712780A (en) System and method for augmented reality
EP3913478A1 (en) Systems and methods for facilitating shared rendering
CN108830944B (en) Optical perspective three-dimensional near-to-eye display system and display method
CN109166181A (en) A kind of mixing motion capture system based on deep learning
JP2020047239A (en) Tracking system and tracking method
CN110544278B (en) Rigid body motion capture method and device and AGV pose capture system
CN109716396A (en) Information processing equipment, information processing method and program
CN108261761B (en) Space positioning method and device and computer readable storage medium
CN112788443B (en) Interaction method and system based on optical communication device

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