CN115487493A - Space positioning method, device and system - Google Patents

Space positioning method, device and system Download PDF

Info

Publication number
CN115487493A
CN115487493A CN202211070503.7A CN202211070503A CN115487493A CN 115487493 A CN115487493 A CN 115487493A CN 202211070503 A CN202211070503 A CN 202211070503A CN 115487493 A CN115487493 A CN 115487493A
Authority
CN
China
Prior art keywords
electronic equipment
acceleration
specific object
determined
determining
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.)
Pending
Application number
CN202211070503.7A
Other languages
Chinese (zh)
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.)
Hunan Happly Sunshine Interactive Entertainment Media Co Ltd
Original Assignee
Hunan Happly Sunshine Interactive Entertainment Media 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 Hunan Happly Sunshine Interactive Entertainment Media Co Ltd filed Critical Hunan Happly Sunshine Interactive Entertainment Media Co Ltd
Priority to CN202211070503.7A priority Critical patent/CN115487493A/en
Publication of CN115487493A publication Critical patent/CN115487493A/en
Pending legal-status Critical Current

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/40Processing input control signals of video game devices, e.g. signals generated by the player or derived from the environment
    • A63F13/42Processing input control signals of video game devices, e.g. signals generated by the player or derived from the environment by mapping the input signals into game commands, e.g. mapping the displacement of a stylus on a touch screen to the steering angle of a virtual vehicle
    • A63F13/428Processing input control signals of video game devices, e.g. signals generated by the player or derived from the environment by mapping the input signals into game commands, e.g. mapping the displacement of a stylus on a touch screen to the steering angle of a virtual vehicle involving motion or position input signals, e.g. signals representing the rotation of an input controller or a player's arm motions sensed by accelerometers or gyroscopes
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/70Determining position or orientation of objects or cameras
    • G06T7/73Determining position or orientation of objects or cameras using feature-based methods
    • G06T7/74Determining position or orientation of objects or cameras using feature-based methods involving reference images or patches
    • 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/10Features of games using an electronically generated display having two or more dimensions, e.g. on a television screen, showing representations related to the game characterized by input arrangements for converting player-generated signals into game device control signals
    • A63F2300/105Features of games using an electronically generated display having two or more dimensions, e.g. on a television screen, showing representations related to the game characterized by input arrangements for converting player-generated signals into game device control signals using inertial sensors, e.g. accelerometers, gyroscopes

Abstract

The application discloses a space positioning method, a device and a system, the change information of the position and the gesture of electronic equipment is determined by an acceleration sensor of the electronic equipment through a gyroscope in the scheme, and the position and the gesture information of the electronic equipment in a virtual space are determined based on the change information of the position and the gesture of the electronic equipment, so that the change of the position and the gesture of an object in the virtual space is determined through the detection of the change information of the position and the gesture of the electronic equipment, the positioning of the object in the virtual space through the electronic equipment is realized, the positioning can be realized only by the aid of the electronic equipment comprising the acceleration sensor and the gyroscope, special space positioning equipment is not required to be utilized, and the universality of equipment capable of positioning the object in the virtual space is ensured.

Description

Space positioning method, device and system
Technical Field
The present application relates to the field of electronic information technologies, and in particular, to a method, an apparatus, and a system for spatial positioning.
Background
With the advent of VR, MR, AR, XR, etc. technologies, there is an urgent need for the skilled person to add more solutions to the immersive experience. For traditional games, control can be achieved through a mouse or a keyboard, and for virtual technologies, spatial positioning is required to achieve a better experience effect.
However, in the existing solutions, dedicated spatial location technologies such as Htc LightHouse, sony PS Move, UWB, laser or infrared radar are usually adopted for virtual spatial location, and the dedicated spatial location technologies need to be supported by dedicated devices, so that they are not universal.
Disclosure of Invention
In view of this, the present application provides a method, an apparatus, and a system for spatial positioning, and the specific solution is as follows:
a spatial location method, comprising:
acquiring acceleration detected by an acceleration sensor of the electronic equipment;
determining a relative offset distance of the electronic device within a preset time interval based on the acceleration;
obtaining rotation parameters detected by a gyroscope of the electronic equipment;
determining change information of the position and the posture of the electronic equipment based on the relative offset distance and the rotation parameters;
and determining the position and posture information of the electronic equipment in the virtual space based on the change information of the position and the posture of the electronic equipment.
Further, the obtaining the acceleration detected by the acceleration sensor of the electronic device includes:
acquiring acceleration detected by a linear acceleration sensor of the electronic equipment;
and/or the presence of a gas in the atmosphere,
and carrying out filtering processing on the initial acceleration detected by the acceleration sensor in a first-order low-pass filtering mode to obtain the acceleration for eliminating the gravity acceleration.
Further, the method also comprises the following steps:
tracking a specific object in a view frame through an image acquisition device of the electronic equipment, and determining whether the electronic equipment is deviated or not based on tracking information of the specific object, so that when the electronic equipment is determined to be deviated, a relative deviation distance of the electronic equipment in a preset time interval is determined based on the acceleration detected by the acceleration sensor.
Further, the determining whether the electronic device is shifted based on the tracking information of the specific object includes:
the specific object is a preset fixed-position object,
obtaining at least two frames of images of the specific object through an image acquisition device of the electronic equipment, and comparing the specific object presented in the at least two frames of images;
if the position and/or the size of the specific object presented in the at least two frames of images are determined to be changed, the electronic equipment is determined to be shifted based on the size change information.
Further, if it is determined that the position and/or the size of the specific object represented in the at least two images are changed, determining that the electronic device is shifted based on the size change information includes:
if the position of the central point of the specific object presented in the at least two frames of images is determined to be changed, determining that the electronic equipment generates plane movement;
if the size proportion of the specific object presented in the at least two frames of images is determined to be changed, determining that the electronic equipment rotates;
and if the size of the specific object presented in the at least two frames of images is determined to be changed, determining that the electronic equipment moves forwards and backwards.
Further, the tracking a specific object in the view frame by an image capturing device of the electronic device includes:
obtaining an image of the specific object through an image acquisition device of the electronic equipment;
the specific object in the image is determined based on an image recognition mode, and/or the specific object in the image is determined based on an image difference mode.
A spatial locator device, comprising:
an acceleration obtaining unit configured to obtain an acceleration detected by an acceleration sensor of the electronic device;
a distance determination unit for determining a relative offset distance of the electronic device within a preset time interval based on the acceleration;
a rotation parameter obtaining unit configured to obtain a rotation parameter detected by a gyroscope of the electronic device;
a change determination unit configured to determine change information of the position and the orientation of the electronic device based on the relative offset distance and the rotation parameter;
a virtual change determining unit configured to determine position and orientation information of the electronic device in a virtual space based on change information of the position and orientation of the electronic device.
Further, the method also comprises the following steps:
the electronic equipment comprises an offset determining unit, a display unit and a control unit, wherein the offset determining unit is used for tracking a specific object in a view frame through an image acquisition device of the electronic equipment, and determining whether the electronic equipment is offset or not based on tracking information of the specific object, so that when the electronic equipment is determined to be offset, the relative offset distance of the electronic equipment in a preset time interval is determined based on the acceleration detected by the acceleration sensor.
A spatial positioning system, comprising:
the electronic equipment is used for detecting the acceleration through the acceleration sensor and detecting the rotation parameters through the gyroscope;
the space positioning device is used for obtaining the acceleration detected by the acceleration sensor of the electronic equipment; determining a relative offset distance of the electronic device within a preset time interval based on the acceleration; obtaining rotation parameters detected by a gyroscope of the electronic equipment; determining change information of the position and the posture of the electronic equipment based on the relative offset distance and the rotation parameters; and determining the position and posture information of the electronic equipment in the virtual space based on the change information of the position and the posture of the electronic equipment.
A storage medium storing at least one set of instructions;
the set of instructions is for being called and performing at least the method of spatial localization of any of the above.
According to the technical scheme, the spatial positioning method, the spatial positioning device and the spatial positioning system, acceleration detected by an acceleration sensor of the electronic equipment is obtained, the relative offset distance of the electronic equipment in a preset time interval is determined based on the acceleration speed, the rotation parameter detected by a gyroscope of the electronic equipment is obtained, the change information of the position and the posture of the electronic equipment is determined based on the relative offset distance and the rotation parameter, and the position and the posture information of the electronic equipment in a virtual space are determined based on the change information of the position and the posture of the electronic equipment. The change information of the position and the posture of the electronic equipment is determined by the acceleration sensor of the electronic equipment through the gyroscope, the position and the posture information of the electronic equipment in the virtual space are determined based on the change information of the position and the posture of the electronic equipment, the change of the position and the posture of the object in the virtual space is determined, the positioning of the object in the virtual space through the electronic equipment is realized, the positioning can be realized only by the aid of the electronic equipment comprising the acceleration sensor and the gyroscope, special space positioning equipment is not required to be utilized, and the universality of equipment capable of positioning the object in the virtual space is ensured.
Drawings
In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings used in the embodiments or the prior art descriptions will be briefly described below, it is obvious that the drawings in the following description are only some embodiments of the present application, and other drawings can be obtained by those skilled in the art without creative efforts.
Fig. 1 is a flowchart of a spatial positioning method disclosed in an embodiment of the present application;
fig. 2 is a flowchart of a spatial positioning method disclosed in an embodiment of the present application;
fig. 3 is a flowchart of a spatial location method disclosed in an embodiment of the present application;
FIG. 4 is a schematic structural diagram of a spatial location apparatus according to an embodiment of the present disclosure;
fig. 5 is a schematic structural diagram of a spatial positioning system according to an embodiment of the present disclosure.
Detailed Description
The technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are only a part of the embodiments of the present application, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present application.
The application discloses a space positioning method, a flow chart of which is shown in fig. 1, comprising:
s11, acquiring an acceleration detected by an acceleration sensor of the electronic equipment;
s12, determining a relative offset distance of the electronic equipment in a preset time interval based on the acceleration;
s13, obtaining rotation parameters detected by a gyroscope of the electronic equipment;
s14, determining position and posture change information of the electronic equipment based on the relative offset distance and the rotation parameters;
and S15, determining the position and posture information of the electronic equipment in the virtual space based on the change information of the position and the posture of the electronic equipment.
For live broadcasting of a virtual concert, human-computer interaction of a virtual person or a real person, live broadcasting of a virtual electronic commerce, human-computer interaction of a virtual anchor or a real person anchor, human-computer interaction of a virtual somatosensory game and the like, the live broadcasting and the live broadcasting of the virtual anchor or the real person anchor can be realized by means of external special somatosensory equipment, namely, the positioning of an object in a virtual space can be realized by the special somatosensory equipment.
In the scheme, commonly used electronic equipment is directly utilized, such as: the mobile phone can realize the positioning of objects in the virtual space, and can realize any scene without using special motion sensing equipment.
The electronic device can be realized by only arranging the acceleration sensor and the gyroscope, and the electronic device can be a mobile phone and other commonly used electronic devices.
The acceleration sensor is mainly used for collecting the acceleration in 6 directions, namely 6 directions of the upper direction, the lower direction, the left direction, the right direction, the front direction and the rear direction, and the displacement of the electronic equipment in a preset time interval, including both the direction and the distance, can be determined by collecting the acceleration in the 6 directions.
The displacement may be calculated by the following formula:
Figure BDA0003829918080000051
wherein s is a relative offset distance, a is an acceleration including a direction, and t is a preset time interval, the relative offset distance of the electronic device in the preset time interval can be determined by using the formula, and the relative offset distances are accumulated, so that the overall moving distance of the electronic device after the acceleration sensor is opened can be determined.
The principle of a gyroscope in electronic equipment is that an independent acceleration sensor calculates an offset angle after angular velocity integral conversion, and the gyroscope can calculate a stable triaxial offset angle in a short time, wherein the acceleration sensor can adopt an acceleration sensor of a MEMS series, and the MEMS sensor is a Micro Electro Mechanical System (MEMS).
The gyroscope can detect three parameters which represent the Euler angles of the rotation of the object, and the Euler angles are directly assigned to the Euler angles of the rotation of the virtual object, so that the function of rotating the virtual object can be realized.
The method comprises the steps of obtaining acceleration through an acceleration sensor of the electronic equipment, calculating a relative offset distance, obtaining an Euler angle through a rotation sensor of a gyroscope of the electronic equipment, calculating a rotation value, determining position change and posture change of the electronic equipment based on the relative offset distance and the rotation value, determining space coordinates and the rotation value of the electronic equipment, uploading the data to a virtual space, and determining coordinates and the rotation value of an object in the virtual space.
Specifically, a 3D program is established, the 3D program can establish a connection between a specific application of the electronic device and the 3D program through functions such as virtual scene establishment through a virtual technology, and establish network communication between the specific application of the electronic device and the 3D program through Socket. The network data to be uploaded to the virtual space includes: and three floating point data represent three coordinate values, the three floating point data represent a triaxial Euler angle, and the data are uploaded to a 3D program through two instructions, wherein the two instructions are rotation and movement operations respectively. After the 3D program receives the data, the received data are assigned to the virtual object to be controlled, the virtual object is controlled to rotate and move, the coordinates are assigned to the Position of the virtual object, the Position of the virtual object is moved, the three-axis Eulerian angle is assigned to the Eulerangle, the rotation of the virtual object is achieved, and the positioning of the virtual object in the virtual space can be completed through the mode.
By electronic devices, such as: the mobile phone realizes the positioning of the virtual object in the virtual space, and the electronic equipment is popularized as long as the electronic equipment is provided with the acceleration sensor and the gyroscope, so that the positioning of the virtual object in the virtual space can be more convenient.
It should be noted that, the positioning of the virtual object in the virtual space is realized through the electronic device, and first the virtual object to be positioned needs to be determined, and then the electronic device in the physical space is defined as the virtual object in the virtual space, and then the position and posture change of the virtual object in the virtual space can be determined by using the position and posture change of the electronic device, so as to determine the position and posture of the virtual object in the virtual space.
For the positioning of the virtual objects in different scenes, the same electronic device may be defined as different virtual objects in different virtual scenes, or the same electronic device may be defined as different virtual objects in the same virtual scene, so that the spatial positioning of different virtual objects may be sequentially determined by the same electronic device. Specifically, different virtual objects may be defined for the electronic device through the 3D program, and when the virtual object corresponding to the electronic device changes, the positioning of the virtual object corresponding to the electronic device is restarted.
The spatial positioning method disclosed in this embodiment obtains an acceleration detected by an acceleration sensor of the electronic device, determines a relative offset distance of the electronic device within a preset time interval based on the acceleration speed, obtains a rotation parameter detected by a gyroscope of the electronic device, determines change information of a position and an attitude of the electronic device based on the relative offset distance and the rotation parameter, and determines the position and the attitude information of the electronic device in a virtual space based on the change information of the position and the attitude of the electronic device. The change information of the position and the posture of the electronic equipment is determined by the acceleration sensor of the electronic equipment through the gyroscope, the position and the posture information of the electronic equipment in the virtual space are determined based on the change information of the position and the posture of the electronic equipment, the change of the position and the posture of the object in the virtual space is determined, the positioning of the object in the virtual space through the electronic equipment is realized, the positioning can be realized only by the aid of the electronic equipment comprising the acceleration sensor and the gyroscope, special space positioning equipment is not required to be utilized, and the universality of equipment capable of positioning the object in the virtual space is ensured.
The embodiment discloses a spatial positioning method, a flowchart of which is shown in fig. 2, and includes:
s21, acquiring the acceleration detected by a linear acceleration sensor of the electronic equipment;
s22, determining a relative offset distance of the electronic equipment in a preset time interval based on the acceleration;
s23, obtaining rotation parameters detected by a gyroscope of the electronic equipment;
s24, determining the position and posture change information of the electronic equipment based on the relative offset distance and the rotation parameters;
and S25, determining the position and the posture information of the electronic equipment in the virtual space based on the change information of the position and the posture of the electronic equipment.
Acceleration sensors in electronic devices typically include three types of acceleration sensors, such as: the gravity acceleration sensor is only used for detecting the influence of gravity on the acceleration of the electronic equipment; the linear acceleration sensor is used for detecting the influence of other acting forces except gravity on the acceleration of the electronic equipment; the universal acceleration sensor can detect the influence of all acting forces on the acceleration of the electronic equipment.
In the actual use process, gravity can influence the detection of the acceleration, in order to eliminate the influence of gravity, a linear acceleration sensor in the electronic equipment can be directly selected for detecting the acceleration, and the linear acceleration sensor detects the influence of other acting forces except gravity on the acceleration of the electronic equipment, so that the influence of other acting forces after the influence of gravity on the acceleration of the electronic equipment is directly eliminated, and the detected acceleration is the acceleration without the influence of gravity.
Or, a universal acceleration sensor can be directly adopted, and the acceleration detected by the universal acceleration sensor is the acceleration influenced by the gravity, so that the initial acceleration detected by the universal acceleration sensor is filtered in a first-order low-pass filtering mode, the acceleration without the influence of the gravity is obtained, and the finally obtained acceleration is ensured to be the acceleration not influenced by the gravity.
In addition, the rotation also affects the acceleration during the acceleration calculation. In order to eliminate the influence of rotation on the acceleration, the three-axis rotation angular velocity can be obtained by the rotation sensor of the gyroscope, that is, the rotation sensor of the gyroscope, and then the three-axis rotation angular velocity is calculated to obtain the acceleration without the influence of rotation.
The calculation is performed by the three-axis angular velocity, which can be calculated by the following formula:
Ax'=lg*cos(pitch)
Ay'=lg*cos(roll)
Az'=lg*cos(yaw)
where pitch is the pitch angle of rotation about the x-axis, roll is the roll angle of rotation about the z-axis, yaw is the yaw angle of rotation about the y-axis, and accordingly Ax ' is the angular velocity of rotation about the x-axis, ay ' is the angular velocity of rotation about the y-axis, and Az ' is the angular velocity of rotation about the z-axis.
The spatial positioning method disclosed in this embodiment obtains an acceleration detected by an acceleration sensor of the electronic device, determines a relative offset distance of the electronic device within a preset time interval based on the acceleration speed, obtains a rotation parameter detected by a gyroscope of the electronic device, determines change information of a position and an attitude of the electronic device based on the relative offset distance and the rotation parameter, and determines the position and the attitude information of the electronic device in a virtual space based on the change information of the position and the attitude of the electronic device. The change information of the position and the posture of the electronic equipment is determined by the acceleration sensor of the electronic equipment through the gyroscope, the position and the posture information of the electronic equipment in the virtual space are determined based on the change information of the position and the posture of the electronic equipment, the change of the position and the posture of the object in the virtual space is determined, the positioning of the object in the virtual space through the electronic equipment is realized, the positioning can be realized only by the aid of the electronic equipment comprising the acceleration sensor and the gyroscope, special space positioning equipment is not required to be utilized, and the universality of equipment capable of positioning the object in the virtual space is ensured.
The embodiment discloses a spatial positioning method, a flowchart of which is shown in fig. 3, and the method includes:
step S31, tracking a specific object in the viewfinder frame through an image acquisition device of the electronic equipment, and determining whether the electronic equipment deviates or not based on tracking information of the specific object;
step S32, if the electronic equipment is determined to be deviated, determining the relative deviation distance of the electronic equipment in a preset time interval based on the acceleration detected by the acceleration sensor;
s33, obtaining rotation parameters detected by a gyroscope of the electronic equipment;
step S34, determining position and posture change information of the electronic equipment based on the relative offset distance and the rotation parameters;
and S35, determining the position and the posture information of the electronic equipment in the virtual space based on the change information of the position and the posture of the electronic equipment.
The position and the attitude change of the electronic equipment can be accurately measured through an acceleration sensor and a gyroscope of the electronic equipment, but whether the electronic equipment moves or not cannot be judged through the acceleration sensor and the gyroscope, if the electronic equipment moves or not is judged through the acceleration sensor and the gyroscope, the acceleration sensor and the gyroscope are required to be always in an operating state, the position and the attitude data of the electronic equipment are always determined, and only then, whether the electronic equipment moves or not can be determined, but the data processing amount is increased, so that in order to avoid the problem, the position of the electronic equipment can be judged through parameters obtained by an image acquisition device of the electronic equipment.
Specifically, a specific object is preset, and the position of the specific object is not changed, that is, the position of the specific object is fixed under any condition, and the specific object may be: one tree, one sculpture, one building and the like.
The image acquisition device of the electronic equipment acquires the image of the specific object and tracks the specific object, so that whether the position or the form of the specific object changes in the image acquired by the image acquisition device is determined, as long as the position or the form of the specific object changes in the image acquired by the image acquisition device, the position or the form of the electronic equipment can be directly determined to change as the position of the specific object does not change, and the position or the form of the specific object with a fixed position acquired by the image acquisition device of the electronic equipment changes in the image as the position or the form of the electronic equipment changes, so that the electronic equipment can be determined to be deviated.
After the electronic equipment is determined to be deviated through an image acquisition device of the electronic equipment, the deviation distance and direction of the electronic equipment are further determined by combining an acceleration sensor and a gyroscope of the electronic equipment, and therefore the deviation of the virtual object in the virtual space and the position and the form of the virtual object after the deviation are determined.
Specifically, tracking a specific object in the finder frame through an image capturing device of the electronic device may specifically be: the method comprises the steps of obtaining an image of a specific object through an image acquisition device of the electronic equipment, determining the specific object in the image based on an image recognition mode, and/or determining the specific object in the image based on an image difference mode.
Specifically, the method for tracking the object may be: if in the environment of a green curtain, firstly, the object in the image acquired by the image acquisition device is scratched through an image difference algorithm and a green curtain scratching algorithm, then the outline of the object is outlined in an outline tracking mode, the bounding box information of the object in the two-dimensional image is calculated through AABB in image processing, and the change of the specific object is determined through the bounding box information, so that the specific object is tracked;
if the specific object is tracked in a non-green curtain environment, the specific object can be tracked in an object image identification mode, the object is deducted from the image through the mode, so that bounding box information of the object is determined, and the change of the specific object is determined through the bounding box information, so that the specific object is tracked.
In addition, determining whether the electronic device is offset based on the tracking information for the specific object includes: the method comprises the steps of obtaining at least two frames of images of a specific object through an image acquisition device of the electronic equipment, comparing the specific object presented in the at least two frames of images, and determining that the electronic equipment is deviated based on size change information if the position and/or size of the specific object presented in the at least two frames of images are changed.
The specific object is tracked through the image acquisition device, the multi-frame images of the specific object are required to be acquired, the multi-frame images are compared, whether the position and/or the size of the specific object in the continuous multi-frame images change or not is determined, whether the position or the size of the specific object in the multi-frame images changes or not can indicate that the electronic equipment deviates, and the distance and the direction of the deviation of the electronic equipment can be determined by combining an acceleration sensor and a gyroscope of the electronic equipment based on the conclusion that the electronic equipment deviates.
If the position of the central point of the specific object presented in the at least two frames of images is determined to be changed, determining that the electronic equipment is subjected to plane movement; if the size proportion of the specific object presented in the at least two frames of images is determined to be changed, the electronic equipment can be determined to rotate; and if the size of the specific object presented in the at least two frames of images is determined to be changed, determining that the electronic equipment moves forwards and backwards.
The bounding box of the specific object is determined in each frame of image obtained by the image acquisition device, and the lengths of four vertexes and four sides of the quadrangle and the coordinates of the center point of the bounding box can be determined based on the bounding box information.
Comparing two continuous frames of images obtained by an image acquisition device, comparing the length of the four edges of the bounding box in the current frame of image with the length of the four edges of the bounding box in the previous frame of image, comparing the position of the central point of the bounding box in the current frame of image with the position of the central point of the bounding box in the previous frame of image, and comparing the proportion of the lengths of the different edges of the bounding box in the current frame of image with the proportion of the lengths of the different edges of the bounding box in the previous frame of image.
If the length of the four sides of the bounding box in the current frame image is determined to be larger than the length of the four sides of the bounding box in the previous frame image, the electronic equipment can be determined to move forwards and move forwards towards the image acquisition device, and the specific object is in an amplification state for two continuous frames of images; if the length of the four sides of the bounding box in the current frame image is determined to be smaller than the length of the four sides of the bounding box in the previous frame image, the electronic equipment can be determined to move backwards and move backwards towards the image acquisition device, and the specific object is in a reduced state for two continuous frames of images;
if the left length of the bounding box in the current frame image is determined to be greater than the left length of the bounding box in the previous frame image, and the right length of the bounding box in the current frame image is determined to be less than the right length of the bounding box in the previous frame image, indicating that the electronic equipment rotates towards the right side of the image acquisition device; if the left length of the bounding box in the current frame image is smaller than the left length of the bounding box in the previous frame image and the right length of the bounding box in the current frame image is larger than the right length of the bounding box in the previous frame image, indicating that the electronic equipment rotates to the left side of the image acquisition device;
if the upper side length of the bounding box in the current frame image is determined to be greater than the upper side length of the bounding box in the previous frame image, and the lower side length of the bounding box in the current frame image is determined to be less than the lower side length of the bounding box in the previous frame image, indicating that the electronic equipment rotates towards the lower part of the image acquisition device; if the upper side length of the bounding box in the current frame image is smaller than the upper side length of the bounding box in the previous frame image and the lower side length of the bounding box in the current frame image is greater than the lower side length of the bounding box in the previous frame image, indicating that the electronic equipment rotates towards the upper side of the image acquisition device;
if the central point of the bounding box in the current frame image is determined to have vertical and horizontal deviation relative to the central point of the bounding box in the previous frame image, the electronic equipment is indicated to move towards the vertical and horizontal corresponding directions.
In the embodiment, at least two frames of images are obtained through the image acquisition device, and the obtained at least two frames of images are compared in the above manner to determine whether the electronic equipment shifts or rotates; when the electronic equipment is determined to move, the moving distance is determined through calculation of the acceleration sensor and can be determined through a displacement calculation formula; when the electronic equipment is determined to rotate, acquiring three-axis rotation angular velocity through a rotation sensor of a gyroscope, and determining acceleration variation of three components through the three-axis rotation angular velocity so as to eliminate acceleration after rotation influence; and further after the angular velocity is determined, the angular velocity is sent to a rendering end through a network, the Euler angle is recalculated through the angle, and the offset distance is also sent to the rendering end through the network for calculating offset accumulation, so that the electronic equipment is repositioned.
The spatial positioning method disclosed in this embodiment obtains an acceleration detected by an acceleration sensor of the electronic device, determines a relative offset distance of the electronic device within a preset time interval based on the acceleration speed, obtains a rotation parameter detected by a gyroscope of the electronic device, determines change information of a position and an attitude of the electronic device based on the relative offset distance and the rotation parameter, and determines the position and the attitude information of the electronic device in a virtual space based on the change information of the position and the attitude of the electronic device. The change information of the position and the posture of the electronic equipment is determined by the acceleration sensor of the electronic equipment through the gyroscope, the position and the posture information of the electronic equipment in the virtual space are determined based on the change information of the position and the posture of the electronic equipment, the change of the position and the posture of the object in the virtual space is determined, the positioning of the object in the virtual space through the electronic equipment is realized, the positioning can be realized only by the aid of the electronic equipment comprising the acceleration sensor and the gyroscope, special space positioning equipment is not required to be utilized, and the universality of equipment capable of positioning the object in the virtual space is ensured.
The embodiment discloses a spatial positioning device, a schematic structural diagram of which is shown in fig. 4, and the spatial positioning device comprises:
acceleration obtaining unit 41, distance determining unit 42, rotation parameter obtaining unit 43, change determining unit 44, and virtual change determining unit 45.
The acceleration obtaining unit 41 is configured to obtain an acceleration detected by an acceleration sensor of the electronic device;
the distance determination unit 42 is configured to determine a relative offset distance of the electronic device within a preset time interval based on the acceleration;
the rotation parameter obtaining unit 43 is configured to obtain a rotation parameter detected by a gyroscope of the electronic device;
the change determining unit 44 is configured to determine change information of the position and the posture of the electronic device based on the relative offset distance and the rotation parameter;
the virtual change determining unit 45 is configured to determine the position and orientation information of the electronic device in the virtual space based on the change information of the position and orientation of the electronic device.
For live broadcasting of a virtual concert, human-computer interaction of a virtual person or a real person, live broadcasting of a virtual electronic commerce, human-computer interaction of a virtual anchor or a real person anchor, human-computer interaction of a virtual somatosensory game and the like, the live broadcasting and the live broadcasting of the virtual anchor or the real person anchor can be realized by means of external special somatosensory equipment, namely, the positioning of an object in a virtual space can be realized by the special somatosensory equipment.
In the scheme, common electronic equipment is directly utilized, such as: the mobile phone can realize the positioning of objects in the virtual space, and can realize any scene without using special somatosensory equipment.
The electronic device can be realized by only arranging the acceleration sensor and the gyroscope, and the electronic device can be a mobile phone and other commonly used electronic devices.
The acceleration sensor is mainly used for collecting the acceleration in 6 directions, namely 6 directions of the upper direction, the lower direction, the left direction, the right direction, the front direction and the rear direction, and the displacement of the electronic equipment in a preset time interval, including both the direction and the distance, can be determined by collecting the acceleration in the 6 directions.
The displacement can be calculated by the following formula:
Figure BDA0003829918080000141
and determining the relative offset distance of the electronic equipment in the preset time interval by using the formula, and accumulating the relative offset distances to determine the overall movement distance of the electronic equipment after the acceleration sensor is opened.
The principle of a gyroscope in an electronic device is that an independent acceleration sensor calculates an offset angle after angular velocity integration and conversion, and the gyroscope can calculate a stable triaxial offset angle in a short time, wherein the acceleration sensor can be an acceleration sensor of a MEMS series, and the MEMS sensor is a Micro Electro Mechanical System (MEMS).
The gyroscope can detect three parameters which represent the Euler angles of the rotation of the object, and the Euler angles are directly assigned to the Euler angles of the rotation of the virtual object, so that the rotation function of the virtual object can be realized.
The method comprises the steps of obtaining acceleration through an acceleration sensor of the electronic equipment, calculating a relative offset distance, obtaining an Euler angle through a rotation sensor of a gyroscope of the electronic equipment, calculating a rotation value, determining position change and posture change of the electronic equipment based on the relative offset distance and the rotation value, determining space coordinates and the rotation value of the electronic equipment, uploading the data to a virtual space, and determining coordinates and the rotation value of an object in the virtual space.
Specifically, a 3D program is established, the 3D program can establish connection between the specific application of the electronic device and the 3D program through functions such as virtual scene establishment and the like through a virtual technology, and establish network communication between the specific application of the electronic device and the 3D program through Socket. The network data to be uploaded to the virtual space includes: the three floating point data represent three coordinate values, the three floating point data represent a triaxial Euler angle, and the data are uploaded to a 3D program through two instructions, wherein the two instructions are respectively rotation and movement operations. After the 3D program receives the data, the received data are assigned to the virtual object to be controlled, the virtual object is controlled to rotate and move, the coordinates are assigned to the Position of the virtual object, the Position of the virtual object is moved, the three-axis Eulerian angle is assigned to the Eulerangle, the rotation of the virtual object is achieved, and the positioning of the virtual object in the virtual space can be completed through the mode.
By electronic devices, such as: the mobile phone realizes the positioning of the virtual object in the virtual space, and the electronic equipment is popularized as the electronic equipment only needs to be provided with the acceleration sensor and the gyroscope, so that the positioning of the virtual object in the virtual space can be more convenient.
It should be noted that, the positioning of the virtual object in the virtual space is realized by the electronic device, the virtual object to be positioned needs to be determined first, then the electronic device in the physical space is defined as the virtual object in the virtual space, and then the position and posture change of the virtual object in the virtual space can be determined by using the position and posture change of the electronic device, so as to determine the position and posture of the virtual object in the virtual space.
For the positioning of virtual objects in different scenes, the same electronic device may be defined as different virtual objects in different virtual scenes, or, in the same virtual scene, the same electronic device may be defined as different virtual objects, so that the spatial positioning of different virtual objects may be sequentially determined by the same electronic device. Specifically, different virtual objects may be defined for the electronic device through the 3D program, and when the virtual object corresponding to the electronic device changes, the positioning of the virtual object corresponding to the electronic device is restarted.
Further, the acceleration obtaining unit is configured to: acquiring acceleration detected by a linear acceleration sensor of the electronic equipment; and/or filtering the initial acceleration detected by the acceleration sensor in a first-order low-pass filtering mode to obtain the acceleration for eliminating the gravity acceleration.
Acceleration sensors in electronic devices typically include three types of acceleration sensors, such as: the gravity acceleration sensor is only used for detecting the influence of gravity on the acceleration of the electronic equipment; the linear acceleration sensor is used for detecting the influence of other acting forces except gravity on the acceleration of the electronic equipment; the universal acceleration sensor can detect the influence of all acting forces on the acceleration of the electronic equipment.
In the actual use process, gravity can influence the detection of the acceleration, in order to eliminate the influence of gravity, a linear acceleration sensor in the electronic equipment can be directly selected for detecting the acceleration, and the linear acceleration sensor detects the influence of other acting forces except gravity on the acceleration of the electronic equipment, so that the influence of other acting forces after the influence of gravity on the acceleration of the electronic equipment is directly eliminated, and the detected acceleration is the acceleration without the influence of gravity.
Or, a universal acceleration sensor can be directly adopted, and because the acceleration detected by the universal acceleration sensor is the acceleration influenced by gravity, the initial acceleration detected by the universal acceleration sensor is subjected to filtering processing in a first-order low-pass filtering mode, so that the acceleration without the influence of gravity is obtained, and the finally obtained acceleration is ensured to be the acceleration not influenced by gravity.
In addition, the rotation also affects the acceleration during the acceleration calculation. In order to eliminate the influence of rotation on the acceleration, the three-axis rotation angular velocity can be obtained by the rotation sensor of the gyroscope, that is, the rotation sensor of the gyroscope, and then the three-axis rotation angular velocity is calculated to obtain the acceleration without the influence of rotation.
The calculation is performed by the three-axis angular velocity, which can be calculated by the following formula:
Ax'=lg*cos(pitch)
Ay'=lg*cos(roll)
Az'=lg*cos(yaw)
where pitch is the pitch angle of rotation about the x-axis, roll is the roll angle of rotation about the z-axis, yaw is the yaw angle of rotation about the y-axis, and accordingly Ax ' is the angular velocity of rotation about the x-axis, ay ' is the angular velocity of rotation about the y-axis, and Az ' is the angular velocity of rotation about the z-axis.
Further, the spatial positioning device disclosed in this embodiment further includes: an offset determination unit.
The offset determining unit is used for tracking a specific object in a view frame through an image acquisition device of the electronic equipment, and determining whether the electronic equipment is offset or not based on tracking information of the specific object, so that when the electronic equipment is determined to be offset, the relative offset distance of the electronic equipment in a preset time interval is determined based on the acceleration detected by the acceleration sensor.
The position and the attitude change of the electronic equipment can be accurately measured through an acceleration sensor and a gyroscope of the electronic equipment, but whether the electronic equipment moves or not cannot be judged through the acceleration sensor and the gyroscope, if the electronic equipment moves or not is judged through the acceleration sensor and the gyroscope, the acceleration sensor and the gyroscope are required to be always in an operating state, the position and the attitude data of the electronic equipment are always determined, and only then, whether the electronic equipment moves or not can be determined, but the data processing amount is increased, so that in order to avoid the problem, the position of the electronic equipment can be judged through parameters obtained by an image acquisition device of the electronic equipment.
Specifically, a specific object is preset, and the position of the specific object is not changed, that is, the position of the specific object is fixed under any condition, and the specific object may be: one tree, one sculpture, one building and the like.
The image acquisition device of the electronic equipment acquires the image of the specific object and tracks the specific object, so that whether the position or the form of the specific object changes in the image acquired by the image acquisition device is determined, and as long as the position or the form of the specific object changes in the image acquired by the image acquisition device, the position or the form of the electronic equipment can be directly determined to change as the position of the specific object does not change, and as the position or the form of the electronic equipment changes, the position or the form of the specific object with a fixed position acquired by the image acquisition device of the electronic equipment in the image changes, so that the electronic equipment can be determined to have an offset.
After the electronic equipment is determined to be deviated through an image acquisition device of the electronic equipment, the deviation distance and direction of the electronic equipment are further determined by combining an acceleration sensor and a gyroscope of the electronic equipment, and therefore the deviation of the virtual object in the virtual space and the position and the form of the virtual object after the deviation are determined.
Specifically, tracking a specific object in the finder frame through an image capturing device of the electronic device may specifically be: the method comprises the steps of obtaining an image of a specific object through an image acquisition device of the electronic equipment, determining the specific object in the image based on an image recognition mode, and/or determining the specific object in the image based on an image difference mode.
Specifically, the method of tracking the object may be: if in the environment of a green curtain, firstly, the object in the image acquired by the image acquisition device is scratched through an image difference algorithm and a green curtain scratching algorithm, then the outline of the object is outlined in an outline tracking mode, the bounding box information of the object in the two-dimensional image is calculated through AABB in image processing, and the change of the specific object is determined through the bounding box information, so that the specific object is tracked;
if the specific object is tracked in a non-green curtain environment, the specific object can be tracked in an object image identification mode, the object is deducted from the image in the mode, accordingly, bounding box information of the object is determined, and the change of the specific object is determined through the bounding box information, so that the specific object is tracked.
In addition, determining whether the electronic device is shifted based on the tracking information of the specific object includes: the method comprises the steps of obtaining at least two frames of images of a specific object through an image acquisition device of the electronic equipment, comparing the specific object presented in the at least two frames of images, and determining that the electronic equipment is deviated based on size change information if the position and/or size of the specific object presented in the at least two frames of images are changed.
The specific object is tracked through the image acquisition device, the multi-frame images of the specific object are required to be acquired, the multi-frame images are compared, whether the position and/or the size of the specific object in the continuous multi-frame images change or not is determined, whether the position or the size of the specific object in the multi-frame images changes or not can indicate that the electronic equipment deviates, and the distance and the direction of the deviation of the electronic equipment can be determined by combining an acceleration sensor and a gyroscope of the electronic equipment based on the conclusion that the electronic equipment deviates.
If the position of the central point of the specific object presented in the at least two frames of images is determined to be changed, the electronic equipment can be determined to generate plane movement; if the size proportion of the specific object presented in the at least two frames of images is determined to be changed, the electronic equipment can be determined to be rotated; and if the size of the specific object presented in the at least two frames of images is determined to be changed, determining that the electronic equipment moves forwards and backwards.
The bounding box of the specific object is determined in each frame of image obtained by the image acquisition device, and the lengths of four vertexes and four sides of the quadrangle and the coordinates of the center point of the bounding box can be determined based on the bounding box information.
Comparing two continuous frames of images obtained by an image acquisition device, comparing the length of the four edges of the bounding box in the current frame of image with the length of the four edges of the bounding box in the previous frame of image, comparing the position of the central point of the bounding box in the current frame of image with the position of the central point of the bounding box in the previous frame of image, and comparing the proportion of the lengths of the different edges of the bounding box in the current frame of image with the proportion of the lengths of the different edges of the bounding box in the previous frame of image.
If the length of the four sides of the bounding box in the current frame image is determined to be larger than the length of the four sides of the bounding box in the previous frame image, the electronic equipment can be determined to move forwards and move forwards towards the image acquisition device, and the specific object is in an amplification state for two continuous frames of images; if the length of the four edges of the bounding box in the current frame image is determined to be less than the length of the four edges of the bounding box in the previous frame image, the electronic equipment is determined to move backwards and moves backwards towards the image acquisition device, and the specific object is in a reduced state for two continuous frames of images;
if the left length of the bounding box in the current frame image is determined to be greater than the left length of the bounding box in the previous frame image, and the right length of the bounding box in the current frame image is determined to be less than the right length of the bounding box in the previous frame image, indicating that the electronic equipment rotates towards the right side of the image acquisition device; if the left length of the bounding box in the current frame image is smaller than the left length of the bounding box in the previous frame image and the right length of the bounding box in the current frame image is larger than the right length of the bounding box in the previous frame image, indicating that the electronic equipment rotates to the left side of the image acquisition device;
if the upper side length of the bounding box in the current frame image is determined to be greater than the upper side length of the bounding box in the previous frame image, and the lower side length of the bounding box in the current frame image is determined to be less than the lower side length of the bounding box in the previous frame image, indicating that the electronic equipment rotates towards the lower part of the image acquisition device; if the upper side length of the bounding box in the current frame image is determined to be smaller than the upper side length of the bounding box in the previous frame image, and the lower side length of the bounding box in the current frame image is determined to be greater than the lower side length of the bounding box in the previous frame image, indicating that the electronic equipment rotates towards the upper part of the image acquisition device;
if the central point of the bounding box in the current frame image is determined to have vertical and horizontal deviation relative to the central point of the bounding box in the previous frame image, the electronic equipment is indicated to move towards the vertical and horizontal corresponding directions.
In the embodiment, at least two frames of images are obtained through the image acquisition device, and the obtained at least two frames of images are compared in the above manner to determine whether the electronic equipment shifts or rotates; when the electronic equipment is determined to move, the moving distance is determined through calculation of the acceleration sensor and can be determined through a displacement calculation formula; when the electronic equipment is determined to rotate, acquiring three-axis rotation angular velocity through a rotation sensor of a gyroscope, and determining acceleration variation of three components through the three-axis rotation angular velocity so as to eliminate acceleration after rotation influence; and further after the angular velocity is determined, the angular velocity is sent to a rendering end through a network, the Euler angle is recalculated through the angle, and the offset distance is also sent to the rendering end through the network for calculating offset accumulation, so that the electronic equipment is repositioned.
The spatial positioning apparatus disclosed in this embodiment obtains an acceleration detected by an acceleration sensor of the electronic device, determines a relative offset distance of the electronic device within a preset time interval based on the acceleration speed, obtains a rotation parameter detected by a gyroscope of the electronic device, determines change information of a position and an attitude of the electronic device based on the relative offset distance and the rotation parameter, and determines the position and the attitude information of the electronic device in a virtual space based on the change information of the position and the attitude of the electronic device. The change information of the position and the posture of the electronic equipment is determined by the acceleration sensor of the electronic equipment through the gyroscope, the position and the posture information of the electronic equipment in the virtual space are determined based on the change information of the position and the posture of the electronic equipment, the change of the position and the posture of the object in the virtual space is determined, the positioning of the object in the virtual space through the electronic equipment is realized, the positioning can be realized only by the aid of the electronic equipment comprising the acceleration sensor and the gyroscope, special space positioning equipment is not required to be utilized, and the universality of equipment capable of positioning the object in the virtual space is ensured.
The embodiment discloses a spatial positioning system, a schematic structural diagram of which is shown in fig. 5, and the spatial positioning system includes:
an electronic device 51 and a spatial positioning device 52.
The electronic device 51 is configured to detect an acceleration through an acceleration sensor, and detect a rotation parameter through a gyroscope;
the spatial location device 52 is used for obtaining the acceleration detected by the acceleration sensor of the electronic equipment; determining a relative offset distance of the electronic device within a preset time interval based on the acceleration; obtaining rotation parameters detected by a gyroscope of the electronic equipment; determining change information of the position and the posture of the electronic equipment based on the relative offset distance and the rotation parameters; and determining the position and posture information of the electronic equipment in the virtual space based on the change information of the position and the posture of the electronic equipment.
Further, the electronic device detects acceleration through an acceleration sensor, and includes: the electronic equipment detects the acceleration through the linear acceleration sensor, and/or carries out filtering processing on the initial acceleration detected by the acceleration sensor through a first-order low-pass filtering mode to obtain the acceleration of eliminating the gravity acceleration.
Further, the spatial location device is further configured to:
tracking a specific object in the view frame through an image acquisition device of the electronic equipment, and determining whether the electronic equipment is deviated or not based on tracking information of the specific object so as to determine the relative deviation distance of the electronic equipment within a preset time interval based on the acceleration detected by the acceleration sensor when the electronic equipment is determined to be deviated.
Further, the spatial locating device determines whether the electronic device is shifted based on the tracking information of the specific object, including:
the specific object is a preset fixed-position object,
obtaining at least two frames of images of a specific object through an image acquisition device of the electronic equipment, and comparing the specific object presented in the at least two frames of images; and if the position and/or the size of the specific object presented in the at least two frames of images are determined to be changed, determining that the electronic equipment is shifted based on the size change information.
Further, if the spatial location device determines that the position and/or the size of the specific object represented in the at least two images are changed, determining that the electronic device is shifted based on the size change information includes:
if the spatial positioning device determines that the position of the central point of the specific object presented in the at least two frames of images changes, determining that the electronic equipment moves in a plane; if the size proportion of the specific object presented in the at least two frames of images is determined to be changed, determining that the electronic equipment rotates; and if the size of the specific object presented in the at least two frames of images is determined to be changed, determining that the electronic equipment moves forwards and backwards.
Further, the spatial positioning device tracks a specific object in the view frame through an image capturing device of the electronic device, and includes:
the space positioning device obtains an image of a specific object through an image acquisition device of the electronic equipment; the specific object in the image is determined based on the image recognition mode, and/or the specific object in the image is determined based on the image difference mode.
The spatial positioning system based on this embodiment is implemented based on the spatial positioning method disclosed in the above embodiment, and is not described herein again.
The spatial positioning system disclosed in this embodiment obtains an acceleration detected by an acceleration sensor of the electronic device, determines a relative offset distance of the electronic device within a preset time interval based on the acceleration speed, obtains a rotation parameter detected by a gyroscope of the electronic device, determines change information of a position and an attitude of the electronic device based on the relative offset distance and the rotation parameter, and determines the position and the attitude information of the electronic device in a virtual space based on the change information of the position and the attitude of the electronic device. The change information of the position and the posture of the electronic equipment is determined by the acceleration sensor of the electronic equipment through the gyroscope, the position and the posture information of the electronic equipment in the virtual space are determined based on the change information of the position and the posture of the electronic equipment, the change of the position and the posture of the object in the virtual space is determined, the positioning of the object in the virtual space through the electronic equipment is realized, the positioning can be realized only by the aid of the electronic equipment comprising the acceleration sensor and the gyroscope, special space positioning equipment is not required to be utilized, and the universality of equipment capable of positioning the object in the virtual space is ensured.
The present embodiment discloses a storage medium for storing at least one set of instructions for being called and performing at least the method of spatial localization as described in any of the above.
The embodiments in the present description are described in a progressive manner, each embodiment focuses on differences from other embodiments, and the same and similar parts among the embodiments are referred to each other. The device disclosed by the embodiment corresponds to the method disclosed by the embodiment, so that the description is simple, and the relevant points can be referred to the method part for description.
Those of skill would further appreciate that the various illustrative elements and algorithm steps described in connection with the embodiments disclosed herein may be implemented as electronic hardware, computer software, or combinations of both, and that the various illustrative components and steps have been described above generally in terms of their functionality in order to clearly illustrate this interchangeability of hardware and software. Whether such functionality is implemented as hardware or software depends upon the particular application and design constraints imposed on the technical solution. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present application.
The steps of a method or algorithm described in connection with the embodiments disclosed herein may be embodied directly in hardware, in a software module executed by a processor, or in a combination of the two. A software module may reside in Random Access Memory (RAM), memory, read Only Memory (ROM), electrically programmable ROM, electrically erasable programmable ROM, registers, hard disk, a removable disk, a CD-ROM, or any other form of storage medium known in the art.
The previous description of the disclosed embodiments is provided to enable any person skilled in the art to make or use the present application. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the generic principles defined herein may be applied to other embodiments without departing from the spirit or scope of the application. Thus, the present application is not intended to be limited to the embodiments shown herein but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.

Claims (10)

1. A spatial location method, comprising:
acquiring an acceleration detected by an acceleration sensor of the electronic equipment;
determining a relative offset distance of the electronic device within a preset time interval based on the acceleration;
obtaining rotation parameters detected by a gyroscope of the electronic equipment;
determining change information of the position and the posture of the electronic equipment based on the relative offset distance and the rotation parameters;
and determining the position and posture information of the electronic equipment in the virtual space based on the change information of the position and the posture of the electronic equipment.
2. The method of claim 1, wherein obtaining the acceleration detected by an acceleration sensor of the electronic device comprises:
acquiring acceleration detected by a linear acceleration sensor of the electronic equipment;
and/or the presence of a gas in the atmosphere,
and carrying out filtering processing on the initial acceleration detected by the acceleration sensor in a first-order low-pass filtering mode to obtain the acceleration for eliminating the gravity acceleration.
3. The method of claim 1, further comprising:
tracking a specific object in a view frame through an image acquisition device of the electronic equipment, and determining whether the electronic equipment is deviated or not based on tracking information of the specific object, so that when the electronic equipment is determined to be deviated, a relative deviation distance of the electronic equipment in a preset time interval is determined based on acceleration detected by the acceleration sensor.
4. The method of claim 3, wherein determining whether the electronic device is offset based on tracking information for the particular object comprises:
the specific object is a preset fixed-position object,
obtaining at least two frames of images of the specific object through an image acquisition device of the electronic equipment, and comparing the specific object presented in the at least two frames of images;
and if the position and/or the size of the specific object presented in the at least two frames of images are determined to be changed, determining that the electronic equipment is shifted based on the size change information.
5. The method according to claim 4, wherein determining that the electronic device is shifted based on the size change information if it is determined that the position and/or size of the specific object represented in the at least two images is changed comprises:
if the position of the central point of the specific object presented in the at least two frames of images is determined to be changed, determining that the electronic equipment generates plane movement;
if the size proportion of the specific object presented in the at least two frames of images is determined to be changed, determining that the electronic equipment rotates;
and if the size of the specific object presented in the at least two frames of images is determined to be changed, determining that the electronic equipment moves forwards and backwards.
6. The method of claim 3, wherein tracking the specific object in the viewfinder by an image capture device of the electronic device comprises:
obtaining an image of the specific object through an image acquisition device of the electronic equipment;
the specific object in the image is determined based on an image recognition mode, and/or the specific object in the image is determined based on an image difference mode.
7. A spatial locator device, comprising:
an acceleration obtaining unit configured to obtain an acceleration detected by an acceleration sensor of the electronic device;
a distance determination unit for determining a relative offset distance of the electronic device within a preset time interval based on the acceleration;
a rotation parameter obtaining unit configured to obtain a rotation parameter detected by a gyroscope of the electronic device;
a change determination unit configured to determine change information of the position and the orientation of the electronic device based on the relative offset distance and the rotation parameter;
a virtual change determination unit configured to determine position and orientation information of the electronic device in a virtual space based on change information of the position and orientation of the electronic device.
8. The apparatus of claim 7, further comprising:
the electronic equipment comprises an offset determining unit, a processing unit and a control unit, wherein the offset determining unit is used for tracking a specific object in a view frame through an image acquisition device of the electronic equipment, and determining whether the electronic equipment is offset or not based on tracking information of the specific object, so that when the electronic equipment is determined to be offset, the relative offset distance of the electronic equipment in a preset time interval is determined based on the acceleration detected by the acceleration sensor.
9. A spatial locator system, comprising:
the electronic equipment is used for detecting acceleration through the acceleration sensor and detecting rotation parameters through the gyroscope;
the space positioning device is used for obtaining the acceleration detected by the acceleration sensor of the electronic equipment; determining a relative offset distance of the electronic device within a preset time interval based on the acceleration; obtaining rotation parameters detected by a gyroscope of the electronic equipment; determining change information of the position and the posture of the electronic equipment based on the relative offset distance and the rotation parameter; and determining the position and posture information of the electronic equipment in the virtual space based on the change information of the position and the posture of the electronic equipment.
10. A storage medium storing at least one set of instructions;
the set of instructions is for being called and performing at least the method of spatial localization as claimed in any of claims 1-6.
CN202211070503.7A 2022-09-02 2022-09-02 Space positioning method, device and system Pending CN115487493A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202211070503.7A CN115487493A (en) 2022-09-02 2022-09-02 Space positioning method, device and system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202211070503.7A CN115487493A (en) 2022-09-02 2022-09-02 Space positioning method, device and system

Publications (1)

Publication Number Publication Date
CN115487493A true CN115487493A (en) 2022-12-20

Family

ID=84469189

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202211070503.7A Pending CN115487493A (en) 2022-09-02 2022-09-02 Space positioning method, device and system

Country Status (1)

Country Link
CN (1) CN115487493A (en)

Similar Documents

Publication Publication Date Title
US10605602B2 (en) Surveying system
JP5660648B2 (en) Online reference generation and tracking in multi-user augmented reality
JP6100380B2 (en) Image processing method used for vision-based positioning, particularly for apparatus
KR101775591B1 (en) Interactive and automatic 3-d object scanning method for the purpose of database creation
CN109084732A (en) Positioning and air navigation aid, device and processing equipment
US11748907B2 (en) Object pose estimation in visual data
JP6273352B2 (en) Object detection apparatus, object detection method, and mobile robot
US20110298710A1 (en) Hand-held pointing device, software cursor control system and method for controlling a movement of a software cursor
US10012509B2 (en) Utilizing camera to assist with indoor pedestrian navigation
CN107833237B (en) Method and apparatus for blurring virtual objects in video
WO2018149324A1 (en) Detection method and terminal device
JP5774226B2 (en) Resolving ambiguity of homography decomposition based on orientation sensor
CN110579207B (en) Indoor positioning system and method based on combination of geomagnetic signals and computer vision
KR102199772B1 (en) Method for providing 3D modeling data
KR101685388B1 (en) Method and apparatus for recognizing motion using a plurality of sensors
CN110741625B (en) Motion estimation method and photographic equipment
CN103995588B (en) Displacement distance obtaining method and device and displacement distance application method and device
CN115487493A (en) Space positioning method, device and system
CN110428452B (en) Method and device for detecting non-static scene points, electronic equipment and storage medium
KR101900754B1 (en) Method for establishing user definition motion and motion recognition apparatus using the same
KR102408478B1 (en) Finding Method of route and device using the same
EP4075392A1 (en) Information processing system, information processing method, and program
KR102612559B1 (en) Electronic device tracking movement of a golf ball with a pattern printed on it, method of driving the same and computer readale medium storing the same
KR100837819B1 (en) Device and method for controlling a electric device using a inertial sensor and a camera
CN115731264A (en) Target tracking method, target tracking system and controller

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