CN109993834B - Positioning method and device of target object in virtual space - Google Patents

Positioning method and device of target object in virtual space Download PDF

Info

Publication number
CN109993834B
CN109993834B CN201711490330.3A CN201711490330A CN109993834B CN 109993834 B CN109993834 B CN 109993834B CN 201711490330 A CN201711490330 A CN 201711490330A CN 109993834 B CN109993834 B CN 109993834B
Authority
CN
China
Prior art keywords
virtual
target object
new
posture
real
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
CN201711490330.3A
Other languages
Chinese (zh)
Other versions
CN109993834A (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.)
Shenzhen Dlodlo New Technology Co Ltd
Original Assignee
Shenzhen Dlodlo New Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Shenzhen Dlodlo New Technology Co Ltd filed Critical Shenzhen Dlodlo New Technology Co Ltd
Priority to CN201711490330.3A priority Critical patent/CN109993834B/en
Publication of CN109993834A publication Critical patent/CN109993834A/en
Application granted granted Critical
Publication of CN109993834B publication Critical patent/CN109993834B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/01Input arrangements or combined input and output arrangements for interaction between user and computer
    • G06F3/011Arrangements for interaction with the human body, e.g. for user immersion in virtual reality
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T19/00Manipulating 3D models or images for computer graphics
    • G06T19/006Mixed reality

Abstract

The embodiment of the invention provides a method and a device for positioning a target object in a virtual space. The technical scheme not only improves the efficiency of the position update of the virtual object, well meets the requirement of the user on the real-time experience of the virtual scene, but also reduces the data volume to be processed in the position update process of the virtual object, reduces the requirement on a related processor, and reduces the cost of the position update of the virtual object.

Description

Positioning method and device of target object in virtual space
Technical Field
The embodiment of the invention relates to the technical field of virtual reality, in particular to a method and a device for positioning a target object in a virtual space.
Background
Virtual Reality (VR) technology generally refers to computer simulation technology that can create and experience a Virtual world. The basic principle of VR system is as follows: a virtual scene is generated by a computer, and then a user is immersed into the virtual scene through a specific interaction device, so that the user is guided to generate an immersive sensation. The interactive device is here used to map objects or views in real space into virtual space before the user can observe virtual objects or views in virtual space. After the object in the real space is displaced, the interactive device needs to update the position of the virtual object corresponding to the object in the virtual space, so as to display the scene change to the user in real time.
In the prior art, when updating the position of a virtual object in a virtual space, a camera is generally used to directly take a picture of the object in a real space, then a large amount of operations are performed to obtain a new position and a new posture of the object in the real space, and finally the new position and the new posture of the object in the real space are mapped into the virtual space to obtain the new position and the new posture of the virtual object in the virtual space. The existing technical scheme for updating the position of the virtual object has huge data volume to be processed, and in actual operation, the virtual object position can be updated only by processing the data by a powerful data processor, and the efficiency of updating the position of the virtual object is very low, so that the real-time experience requirement of a user on a virtual scene can not be well met.
Disclosure of Invention
The embodiment of the invention provides a method and a device for positioning a target object in a virtual space, which can obtain a new position and a new posture of the virtual object corresponding to the target object in the virtual space only according to the original position of the target object in the real space and the posture angle variation of the target object in the real space, thereby improving the efficiency of updating the position of the virtual object, well meeting the requirement of a user on real-time experience of a virtual scene, reducing the data quantity required to be processed in the process of updating the position of the virtual object, reducing the requirement on a related processor and reducing the cost of updating the position of the virtual object.
In a first aspect, there is provided a method of locating a target object in a virtual space, the method comprising the steps of:
acquiring a real space original position of a first target object in real space relative to a first positioning base point in real space, and a first real attitude angle change quantity of the first target object relative to the first positioning base point; wherein a distance between a first predetermined point located on the first target object and the first positioning base point remains unchanged;
And calculating to obtain a new position and a new posture of the first virtual object corresponding to the first target object in the virtual space according to the original position in the real space and the first actual posture angle variation.
With reference to the first aspect, in a first possible implementation manner, the calculating, according to the original position in real space and the first actual attitude angle variation, a new position and a new attitude of a first virtual object corresponding to the first target object in a virtual space includes:
according to the original position in the real space and the first real attitude angle change quantity, calculating to obtain a new position and a new attitude of the first target object relative to the first positioning base point in the real space;
and determining the new position and the new posture of the first virtual object in the virtual space according to the new position and the new posture of the first target object in the real space relative to the first positioning base point.
With reference to the first aspect, in a second possible implementation manner, the calculating, according to the original position in real space and the first change in real attitude angle, the position of the first virtual object corresponding to the first target object in the virtual space includes:
Determining a virtual space original position of the first virtual object in a virtual space according to the real space original position;
and calculating to obtain a new position and a new posture of the first virtual object in the virtual space according to the original position of the virtual space and the first actual posture angle variation.
With reference to the second possible implementation manner of the first aspect, in a third possible implementation manner, the calculating, according to the original position of the virtual space and the first actual pose angular variation, a new position and a new pose of the first virtual object in the virtual space includes:
determining a first virtual attitude angle change amount of the first virtual object in a virtual space according to the first actual attitude angle change amount;
and calculating to obtain a new position and a new posture of the first virtual object in the virtual space according to the original position of the virtual space and the first virtual posture angle variation.
With reference to the first aspect, in a fourth possible implementation manner, the method further includes the following steps:
according to the original position in the real space and the first real attitude angle change quantity, calculating to obtain a new position and a new attitude of the first target object relative to the first positioning base point in the real space;
Acquiring a second real attitude angle change amount of a second target object in real space relative to a second positioning base point in real space and a position of the second target object relative to the first target object; wherein the distance between the second predetermined point on the second target object and the second positioning base point is kept unchanged, and the second positioning base point is a point on the first target object;
and calculating the new position and the new posture of the second virtual object corresponding to the second target object in the virtual space according to the new position and the new posture of the first target object relative to the first positioning base point in the real space, the second real posture angle variation and the position of the second target object relative to the first target object.
With reference to the fourth possible implementation manner of the first aspect, in a fifth possible implementation manner, the calculating, according to a new position and a new pose of the first target object in real space relative to the first positioning base point, a second real pose angular variation, and a position of the second target object relative to the first target object, a new position and a new pose of a second virtual object corresponding to the second target object in virtual space includes:
Calculating a new position and a new posture of the second target object relative to the second positioning base point in real space according to the new position and the new posture of the first target object relative to the first positioning base point in real space, a second real posture angle change amount and the position of the second target object relative to the first target object;
and determining the new position and the new posture of the second virtual object in the virtual space according to the new position and the new posture of the second target object in the real space relative to the second positioning base point.
With reference to the first aspect, in a sixth possible implementation manner, the method further includes the following steps:
acquiring a second real attitude angle change amount of a second target object in real space relative to a second positioning base point in real space and a position of the second target object relative to the first target object; wherein the distance between the second predetermined point on the second target object and the second positioning base point is kept unchanged, and the second positioning base point is a point on the first target object;
and calculating to obtain the new position and the new posture of the second virtual object corresponding to the second target object in the virtual space according to the new position and the new posture of the first virtual object in the virtual space, the second actual posture angle variation and the position of the second target object relative to the first target object.
With reference to the sixth possible implementation manner of the first aspect, in a seventh possible implementation manner, the calculating, according to a new position and a new posture of the first virtual object in the virtual space, a second real posture angle change amount, and a position of the second target object relative to the first target object, a new position and a new posture of a second virtual object corresponding to the second target object in the virtual space includes:
determining the position of the second virtual object relative to the first virtual object according to the position of the second target object relative to the first target object;
and calculating to obtain the new position and the new posture of the second virtual object in the virtual space according to the new position and the new posture of the first virtual object, the position of the second virtual object relative to the first virtual object and the angle change of the second real posture.
With reference to the seventh possible implementation manner of the first aspect, in an eighth possible implementation manner, the calculating a new position and a new pose of the second virtual object in the virtual space according to the new position and the new pose of the first virtual object, the position of the second virtual object relative to the first virtual object, and the second real pose angular variation includes:
Determining a second virtual attitude angle change amount of the second virtual object in a virtual space according to the second actual attitude angle change amount;
and calculating to obtain the new position and the new posture of the second virtual object in the virtual space according to the new position and the new posture of the first virtual object, the position of the second virtual object relative to the first virtual object and the angle change of the second virtual posture.
With reference to the first aspect, in a ninth possible implementation manner, the first positioning base point coincides with the first predetermined point and/or the second positioning base point coincides with the second predetermined point.
In a second aspect, there is provided a positioning device of a target object in a virtual space, the device comprising:
the first data acquisition module is used for acquiring the original real space position of a first target object in real space relative to a first positioning base point in real space and the first real attitude angle change quantity of the first target object relative to the first positioning base point; wherein a distance between a first predetermined point located on the first target object and the first positioning base point remains unchanged;
and the first position calculation module is used for calculating and obtaining a new position and a new posture of the first virtual object corresponding to the first target object in the virtual space according to the original position of the real space and the first real posture angle variation.
With reference to the second aspect, in a first possible implementation manner, the first position calculating module includes:
the first real space position calculating sub-module is used for calculating a new position and a new posture of the first target object in real space relative to the first positioning base point according to the original position in real space and the first real posture angle variation;
and the first virtual space position conversion sub-module is used for determining the new position and the new posture of the first virtual object in the virtual space according to the new position and the new posture of the first target object in the real space relative to the first positioning base point.
With reference to the second aspect, in a second possible implementation manner, the first position calculating module includes:
the second virtual space position conversion sub-module is used for determining the virtual space original position of the first virtual object in the virtual space according to the real space original position;
and the first virtual space position calculating sub-module is used for calculating a new position and a new posture of the first virtual object in the virtual space according to the original position of the virtual space and the first actual posture angle variation.
With reference to the second possible implementation manner of the second aspect, in a third possible implementation manner, the first virtual space position calculating submodule includes:
a first attitude angle conversion unit, configured to determine a first virtual attitude angle variation of the first virtual object in a virtual space according to the first real attitude angle variation;
and the first virtual space position calculation unit is used for calculating a new position and a new posture of the first virtual object in the virtual space according to the original position of the virtual space and the first virtual posture angle variation.
With reference to the second aspect, in a fourth possible implementation manner, the apparatus further includes:
the second position calculation module is used for calculating a new position and a new posture of the first target object in the real space relative to the first positioning base point according to the original position in the real space and the first real posture angle variation;
the second data acquisition module is used for acquiring a second real attitude angle change amount of a second target object in real space relative to a second positioning base point in real space and the position of the second target object relative to the first target object; wherein the distance between the second predetermined point on the second target object and the second positioning base point is kept unchanged, and the second positioning base point is a point on the first target object;
And the third position calculation module is used for calculating the new position and the new posture of the second virtual object corresponding to the second target object in the virtual space according to the new position and the new posture of the first target object relative to the first positioning base point in the real space, the second real posture angle change amount and the position of the second target object relative to the first target object.
With reference to the fourth possible implementation manner of the second aspect, in a fifth possible implementation manner, the third position calculating module includes:
a second real space position calculating sub-module, configured to calculate a new position and a new posture of the second target object in real space relative to the second positioning base point according to a new position and a new posture of the first target object in real space relative to the first positioning base point, a second real posture angle variation, and a position of the second target object relative to the first target object;
and the third virtual space position conversion sub-module is used for determining the new position and the new posture of the second virtual object in the virtual space according to the new position and the new posture of the second target object in the real space relative to the second positioning base point.
With reference to the second aspect, in a sixth possible implementation manner, the apparatus further includes:
the third data acquisition module is used for acquiring a second real attitude angle change quantity of a second target object in real space relative to a second positioning base point in real space and the position of the second target object relative to the first target object; wherein the distance between the second predetermined point on the second target object and the second positioning base point is kept unchanged, and the second positioning base point is a point on the first target object;
and the fourth position calculation module is used for calculating the new position and the new posture of the second virtual object corresponding to the second target object in the virtual space according to the new position and the new posture of the first virtual object in the virtual space, the second actual posture angle variation and the position of the second target object relative to the first target object.
With reference to the sixth possible implementation manner of the second aspect, in a seventh possible implementation manner, the fourth position calculating module includes:
a fourth virtual space position conversion sub-module, configured to determine a position of the second virtual object relative to the first virtual object according to a position of the second target object relative to the first target object;
And the second virtual space position calculating sub-module is used for calculating the new position and the new posture of the second virtual object in the virtual space according to the new position and the new posture of the first virtual object, the position of the second virtual object relative to the first virtual object and the second actual posture angle variation.
With reference to the seventh possible implementation manner of the second aspect, in an eighth possible implementation manner, the second virtual space position calculating submodule includes:
a second attitude angle conversion unit, configured to determine a second virtual attitude angle variation of the second virtual object in a virtual space according to the second actual attitude angle variation;
and the second virtual space position calculating unit is used for calculating the new position and the new posture of the second virtual object in the virtual space according to the new position and the new posture of the first virtual object, the position of the second virtual object relative to the first virtual object and the second virtual posture angle variation.
In the above technical solution of the embodiment of the present invention, first, a real space original position of a first target object in real space relative to a first positioning base point in real space and a first real posture angle variation of the first target object relative to the first positioning base point are obtained, and then, according to the real space original position and the first real posture angle variation, a new position and a new posture of a first virtual object corresponding to the first target object in virtual space are calculated. According to the technical scheme, the new position and the new posture of the virtual object corresponding to the target object in the virtual space can be obtained only according to the original position of the target object in the real space and the posture angle variation of the target object in the real space, so that the position updating efficiency of the virtual object is improved, the real-time experience requirement of a user on a virtual scene is well met, the data volume required to be processed in the position updating process of the virtual object is reduced, the requirements on a related processor are reduced, and the position updating cost of the virtual object is reduced.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the following description will briefly explain the embodiments or the drawings needed in the description of the prior art, and it is obvious that the drawings in the following description are only some embodiments of the present invention, and that other drawings can be obtained according to these drawings without inventive effort for a person skilled in the art.
Fig. 1 schematically shows a flow chart of a method of positioning a target object in a virtual space according to an embodiment of the invention.
Fig. 2 schematically shows a flow chart of a method of positioning a target object in a virtual space according to a further embodiment of the invention.
Fig. 3 schematically shows a flow chart of a method of positioning a target object in a virtual space according to a further embodiment of the invention.
Fig. 4 schematically shows a block diagram of a positioning device of a target object in a virtual space according to an embodiment of the invention.
Fig. 5 schematically shows a block diagram of a positioning device of a target object in a virtual space according to a further embodiment of the invention.
Fig. 6 schematically shows a block diagram of a positioning device of a target object in a virtual space according to a further embodiment of the invention.
Detailed Description
The following description of the embodiments of the present invention will be made clearly and fully with reference to the accompanying drawings, in which it is evident that the embodiments described are some, but not all embodiments of the invention. All other embodiments, which can be made by those skilled in the art based on the embodiments of the invention without making any inventive effort, are intended to be within the scope of the invention.
A method for locating a target object in a virtual space, as shown in fig. 1, the method comprising the steps of:
110. acquiring a real space original position of a first target object in real space relative to a first positioning base point in real space, and a first real attitude angle change quantity of the first target object relative to the first positioning base point; wherein the distance between the first preset point on the first target object and the first positioning base point is kept unchanged;
in this step, the first predetermined point is located on the first target object, and preferably at one end of the first target object; the first positioning base point may or may not be located on the first target object; preferably, the first positioning base point coincides with the first predetermined point; the first positioning base point is preferably positioned at one end of the first target object;
In this step, the first real attitude angle change amount may be obtained by using a sensor capable of acquiring a spatial attitude angle change amount, and preferably the real attitude angle change amount is obtained by using a nine-axis gyroscope;
in this step, the actual space original position of the first target object relative to the first positioning base point may be stored in the storage device in advance, or may be acquired by using a binocular camera or the like, which is not limited in this embodiment;
120. according to the original position of the real space and the first real attitude angle change quantity, calculating to obtain a new position and a new attitude of a first virtual object corresponding to the first target object in the virtual space;
in the step, the new position and the new posture of the first virtual object in the virtual space are obtained, the new position and the new posture can be stored in the storage device and can be directly taken when the next position is updated, unnecessary resources are saved, the calculated amount about the position is reduced, and the efficiency is improved.
According to the technical scheme, the new position and the new posture of the virtual object corresponding to the target object in the virtual space can be obtained only according to the original position of the target object in the real space and the posture angle variation of the target object in the real space, so that the position updating efficiency of the virtual object is improved, the real-time experience requirement of a user on a virtual scene is well met, the data volume required to be processed in the position updating process of the virtual object is reduced, the requirements on a related processor are reduced, and the position updating cost of the virtual object is reduced.
In one embodiment, the method for locating a target object in a virtual space includes all the steps of the first embodiment, and step 120 may be specifically accomplished using the following optimization sub-steps:
1201. according to the original position of the real space and the first real attitude angle change quantity, calculating to obtain a new position and a new attitude of the first target object relative to the first positioning base point in the real space;
the step obtains a new position and a new posture of the first target object relative to the first positioning base point in real space, the new position and the new posture can be stored in the storage device and can be directly taken when the next position is updated, unnecessary resources are saved, the calculated amount about the position is reduced, and the efficiency is improved;
1202. and determining the new position and the new posture of the first virtual object in the virtual space according to the new position and the new posture of the first target object in the real space relative to the first positioning base point.
According to the embodiment, the new position and the new posture of the first target object relative to the first positioning base point in the real space are calculated, then the new position and the new posture of the first target object are mapped into the virtual space to obtain the new position and the new posture of the first virtual object in the virtual space, and the new position and the new posture of the first virtual object corresponding to the first target object in the virtual space can be obtained only by measuring the posture angle variation of the first target object in the real space, so that the position updating efficiency of the virtual object is improved, the data quantity required to be processed in the position updating process of the virtual object is reduced, the requirements on related processors are lowered, and the cost is reduced.
In one embodiment, the method for locating a target object in a virtual space includes all the steps of the first embodiment, and step 120 may be specifically accomplished using the following optimization sub-steps: :
1203. determining a virtual space original position of a first virtual object in a virtual space according to the real space original position;
1204. according to the original position of the virtual space and the first actual attitude angle variation, calculating to obtain a new position and a new attitude of the first virtual object in the virtual space;
in this step, the first real posture angle change amount may not change in the virtual space and the real space, or may change correspondingly, if the first real posture angle change amount is the same in the virtual space and the real space, the new position and the new posture of the first virtual object in the virtual space may be directly obtained by using step 1204, and if the first real posture angle change amount is different in the virtual space and the real space, the first real posture angle change amount in the real space needs to be converted into the first virtual posture angle change amount in the virtual space, so that the new position and the new posture of the first virtual object in the virtual space may be obtained.
When the first real pose angular variation is different in the virtual space and the real space, step 1204 specifically calculates a new position and a new pose of the first virtual object in the virtual space by using the following sub-steps:
step one, determining a first virtual attitude angle change amount of a first virtual object in a virtual space according to the first actual attitude angle change amount;
and step two, calculating to obtain a new position and a new posture of the first virtual object in the virtual space according to the original position of the virtual space and the angle change quantity of the first virtual posture.
According to the method, the original position in the real space is mapped into the virtual space to obtain the original position in the virtual space, the first actual attitude angle change amount in the real space is mapped into the virtual space to obtain the first virtual attitude angle change amount, then the new position and the new attitude of the first virtual object corresponding to the first target object in the virtual space can be directly obtained through calculation according to the position and the attitude angle in the virtual space, the new position and the new attitude of the virtual object in the virtual space can be obtained through relevant calculation only by measuring the attitude angle change amount of the target object in the real space, the position updating efficiency of the virtual object is improved, the data amount required to be processed in the position updating process of the virtual object is reduced, and the requirements on a relevant processor are lowered, so that the cost is lowered.
In one embodiment, as shown in fig. 2, the method for positioning the target object in the virtual space further includes the following steps:
210. according to the original position of the real space and the first real attitude angle change quantity, calculating to obtain a new position and a new attitude of the first target object relative to the first positioning base point in the real space;
this step is the same as step 1201 in the above embodiment, and therefore the same parts will not be described again.
220. Acquiring a second real attitude angle change amount of a second target object in real space relative to a second positioning base point in real space and a position of the second target object relative to the first target object; wherein the distance between the second predetermined point on the second target object and the second positioning base point is kept unchanged, and the second positioning base point is a point on the first target object;
in this step, the second target object is connected to the first target object, and preferably the second target object is connected to one end of the first target object;
in this step, the second predetermined point is located on the second target object, and preferably at one end of the second target object; the second positioning base point may or may not be located on the second target object; when the second positioning base point is positioned on the second target object, the second positioning base point is positioned at the connecting position of the first target object and the second target object because the second positioning base point is a point on the first target object;
The second positioning base point is preferably positioned at one end of the first target object and at the joint of the first target object and the second target object, and the second positioning base point is coincident with a second preset point;
in this step, the second real attitude angle change amount may be obtained by using a sensor capable of acquiring a spatial attitude angle change amount, and preferably the real attitude angle change amount is obtained by using a nine-axis gyroscope;
in the step, the second target object is connected with the first target object in a fixed and predictable manner, so that the position of the second target object relative to the first target object can be conveniently acquired;
230. according to the new position and the new posture of the first target object relative to the first positioning base point in the real space, the angle change of the second real posture and the position of the second target object relative to the first target object, calculating to obtain the new position and the new posture of the second virtual object corresponding to the second target object in the virtual space;
in the step, a new position and a new posture of the second virtual object in the virtual space are obtained, the new position and the new posture can be stored in the storage device and can be directly taken when the next position is updated, unnecessary resources are saved, the calculated amount about the position is reduced, and the efficiency is improved.
According to the technical scheme of the embodiment, the new position and the new posture of the second virtual object corresponding to the second target object in the virtual space can be obtained only according to the new position and the new posture of the first target object in the real space, the position of the second target object relative to the first target object and the posture angle variation of the second target object in the real space, so that the efficiency of updating the position of the virtual object is improved, the real-time experience requirement of a user on the virtual scene is well met, the data volume required to be processed in the process of updating the position of the virtual object is reduced, the requirements on related processors are reduced, and the cost of updating the position of the virtual object is reduced.
In one embodiment, the method for locating a target object in a virtual space includes all the steps of the fourth embodiment, and step 230 may be specifically accomplished using the following optimization sub-steps:
2301. calculating to obtain a new position and a new posture of the second target object relative to the second positioning base point in the real space according to the new position and the new posture of the first target object relative to the first positioning base point in the real space, the angle change of the second real posture and the position of the second target object relative to the first target object;
The step obtains a new position and a new posture of the second target object relative to the second positioning base point in the real space, the new position and the new posture can be stored in the storage device and can be directly taken when the next position is updated, unnecessary resources are saved, the calculated amount about the position is reduced, and the efficiency is improved;
2302. and determining the new position and the new posture of the second virtual object in the virtual space according to the new position and the new posture of the second target object in the real space relative to the second positioning base point.
According to the embodiment, the new position and the new posture of the second target object relative to the second positioning base point in the real space are calculated, then the new position and the new posture of the second target object are mapped into the virtual space to obtain the new position and the new posture of the second virtual object in the virtual space, and the new position and the new posture of the virtual object corresponding to the second target object in the virtual space can be obtained only by measuring the posture angle variation of the second target object in the real space, so that the position updating efficiency of the virtual object is improved, the data quantity required to be processed in the position updating process of the virtual object is reduced, the requirements on related processors are lowered, and the cost is reduced.
In one embodiment, as shown in fig. 3, the method for positioning the target object in the virtual space further includes the following steps:
310. acquiring a second real attitude angle change amount of a second target object in real space relative to a second positioning base point in real space and a position of the second target object relative to the first target object; wherein the distance between the second predetermined point on the second target object and the second positioning base point is kept unchanged, and the second positioning base point is a point on the first target object;
this step is the same as step 220 in the above embodiment, and therefore, the description thereof will not be repeated for the same parts;
320. according to the new position and the new posture of the first virtual object in the virtual space, the angle change of the second real posture and the position of the second target object relative to the first target object, calculating to obtain the new position and the new posture of the second virtual object corresponding to the second target object in the virtual space;
in the step, a new position and a new posture of the second virtual object in the virtual space are obtained, the new position and the new posture can be stored in the storage device and can be directly taken when the next position is updated, unnecessary resources are saved, the calculated amount about the position is reduced, and the efficiency is improved.
According to the technical scheme, the new position and the new posture of the virtual object corresponding to the second target object in the virtual space can be obtained only by the new position and the new posture of the first virtual object in the virtual space, the position of the second target object relative to the first target object and the posture angle variation of the second target object in the real space, so that the position updating efficiency of the virtual object is improved, the real-time experience requirement of a user on a virtual scene is well met, the data quantity to be processed in the position updating process of the virtual object is reduced, the requirements on related processors are lowered, and the position updating cost of the virtual object is reduced.
In one embodiment, the method for locating a target object in a virtual space includes all the steps of the sixth embodiment, and step 320 may be specifically performed using the following optimization sub-steps:
3201. determining the position of the second virtual object relative to the first virtual object according to the position of the second target object relative to the first target object;
3202. calculating to obtain a new position and a new posture of the second virtual object in the virtual space according to the new position and the new posture of the first virtual object, the position of the second virtual object relative to the first virtual object and the second actual posture angle variation;
In this step, the second real posture angle change amount may not change in the virtual space and the real space, or may change accordingly, if the second real posture angle change amount is the same in the virtual space and the real space, the new position and the new posture of the second virtual object in the virtual space may be directly obtained by using step 3202, and if the second real posture angle change amount is different in the virtual space and the real space, the second real posture angle change amount in the real space needs to be converted into the second virtual posture angle change amount in the virtual space, so that the new position and the new posture of the second virtual object in the virtual space may be obtained.
When the second real pose angular variation is different in the virtual space and the real space, step 3202 specifically calculates a new position and a new pose of the second virtual object in the virtual space by using the following sub-steps:
step one, determining a second virtual attitude angle change amount of a second virtual object in a virtual space according to the second actual attitude angle change amount;
and step two, calculating to obtain the new position and the new posture of the second virtual object in the virtual space according to the new position and the new posture of the first virtual object, the position of the second virtual object relative to the first virtual object and the angle change of the second virtual posture.
According to the method, the position of the second target object relative to the first target object is mapped into the virtual space to obtain the position of the second virtual object relative to the first virtual object, the second actual attitude angle change in the real space is mapped into the virtual space to obtain the second virtual attitude angle change, then the new position and the new attitude of the second virtual object corresponding to the second target object in the virtual space can be directly obtained through calculation according to the position and the attitude angle in the virtual space, the new position and the new attitude of the second virtual object in the virtual space can be obtained through relevant calculation only by measuring the second attitude angle change of the target object in the real space, the position updating efficiency of the virtual object is improved, the data quantity required to be processed in the position updating process of the virtual object is reduced, the requirements on relevant processors are lowered, and the cost is lowered.
It should be noted that the same or similar method may be used to calculate the new position and the new posture of the virtual object corresponding to the other target object in the virtual space, and if the other target object is directly connected to the first target object, the same method as the second target object is directly used to calculate the new position and the new posture of the virtual object corresponding to the other target object in the virtual space. If the other target object is connected with the second target object, calculating the new position and the new posture of the virtual object corresponding to the other target object in the virtual space by using a method similar to the calculation of the second target object according to the new position and the new posture of the second target object in the real space or the new position and the new posture of the second virtual object corresponding to the second target object in the virtual space and the posture angle variation of the other target object in the real space or the virtual space. And so on, the new position and the new posture of the virtual object corresponding to the object connected with the other target object in the virtual space can be calculated, and the embodiment of the invention will not be described.
Corresponding to the method for positioning the target object in the virtual space in the above embodiment, the embodiment of the present invention further provides a device for positioning the target object in the virtual space, as shown in fig. 4, where the device includes:
the first data acquisition module is used for acquiring the original real space position of the first target object in the real space relative to the first positioning base point in the real space and the first real attitude angle change quantity of the first target object relative to the first positioning base point; wherein the distance between the first preset point on the first target object and the first positioning base point is kept unchanged;
the first position calculation module is used for calculating a new position and a new posture of a first virtual object corresponding to the first target object in the virtual space according to the original position of the real space and the first real posture angle variation.
In one embodiment, the first location calculation module includes:
the first real space position calculation sub-module is used for calculating a new position and a new posture of the first target object in real space relative to the first positioning base point according to the original position in real space and the first real posture angle variation;
the first virtual space position conversion sub-module is used for determining a new position and a new posture of the first virtual object in the virtual space according to the new position and the new posture of the first target object in the real space relative to the first positioning base point.
In one embodiment, the first location calculation module includes:
the second virtual space position conversion sub-module is used for determining the virtual space original position of the first virtual object in the virtual space according to the real space original position;
the first virtual space position calculating sub-module is used for calculating a new position and a new posture of the first virtual object in the virtual space according to the original position of the virtual space and the first actual posture angle variation.
In one embodiment, the first virtual spatial location calculation submodule includes:
the first attitude angle conversion unit is used for determining a first virtual attitude angle change amount of the first virtual object in the virtual space according to the first actual attitude angle change amount;
the first virtual space position calculating unit is used for calculating a new position and a new posture of the first virtual object in the virtual space according to the original position of the virtual space and the first virtual posture angle variation.
In one embodiment, as shown in fig. 5, the positioning device of the target object in the virtual space further includes:
the second position calculation module is used for calculating a new position and a new posture of the first target object in the real space relative to the first positioning base point according to the original position in the real space and the first real posture angle variation;
The second data acquisition module is used for acquiring a second real attitude angle change amount of a second target object in the real space relative to a second positioning base point in the real space and the position of the second target object relative to the first target object; wherein the distance between the second predetermined point on the second target object and the second positioning base point is kept unchanged, and the second positioning base point is a point on the first target object;
and the third position calculation module is used for calculating a new position and a new posture of a second virtual object corresponding to the second target object in the virtual space according to the new position and the new posture of the first target object relative to the first positioning base point in the real space, the second real posture angle change amount and the position of the second target object relative to the first target object.
In one embodiment, the third position calculation module includes:
the second real space position calculating sub-module is used for calculating a new position and a new posture of the second target object relative to the second positioning base point in real space according to the new position and the new posture of the first target object relative to the first positioning base point in real space, the second real posture angle change amount and the position of the second target object relative to the first target object;
And the third virtual space position conversion sub-module is used for determining the new position and the new posture of the second virtual object in the virtual space according to the new position and the new posture of the second target object in the real space relative to the second positioning base point.
In one embodiment, as shown in fig. 6, the positioning device of the target object in the virtual space further includes:
the third data acquisition module is used for acquiring a second real attitude angle change amount of a second target object in the real space relative to a second positioning base point in the real space and the position of the second target object relative to the first target object; wherein the distance between the second predetermined point on the second target object and the second positioning base point is kept unchanged, and the second positioning base point is a point on the first target object;
and the fourth position calculation module is used for calculating the new position and the new posture of the second virtual object corresponding to the second target object in the virtual space according to the new position and the new posture of the first virtual object in the virtual space, the second actual posture angle variation and the position of the second target object relative to the first target object.
In one embodiment, the fourth location calculation module includes:
A fourth virtual space position conversion sub-module, configured to determine a position of the second virtual object relative to the first virtual object according to a position of the second target object relative to the first target object;
the second virtual space position calculating sub-module is used for calculating the new position and the new posture of the second virtual object in the virtual space according to the new position and the new posture of the first virtual object, the position of the second virtual object relative to the first virtual object and the second actual posture angle variation.
In one embodiment, the second virtual spatial location calculation submodule includes:
the second attitude angle conversion unit is used for determining a second virtual attitude angle change amount of the second virtual object in the virtual space according to the second actual attitude angle change amount;
and the second virtual space position calculating unit is used for calculating the new position and the new posture of the second virtual object in the virtual space according to the new position and the new posture of the first virtual object, the position of the second virtual object relative to the first virtual object and the second virtual posture angle variation.
It should be noted that, the positioning device of the target object in the virtual space according to the embodiment of the present invention is a device corresponding to the positioning method of the target object in the virtual space according to the embodiment of the present invention, and each step in the positioning method of the target object in the virtual space according to the embodiment of the present invention is completed by a module or a unit in the positioning device of the target object in the virtual space according to the embodiment of the present invention, so that for repeated parts, a description thereof will not be repeated here.
The foregoing is merely illustrative of the present invention, and the present invention is not limited thereto, and any person skilled in the art will readily recognize that variations or substitutions are within the scope of the present invention. Therefore, the protection scope of the present invention shall be subject to the protection scope of the claims.

Claims (13)

1. A method of locating a target object in a virtual space, the method comprising the steps of:
acquiring a real space original position of a first target object in real space relative to a first positioning base point in real space, and a first real attitude angle change quantity of the first target object relative to the first positioning base point; wherein a distance between a first predetermined point located on the first target object and the first positioning base point remains unchanged;
according to the original position in the real space and the first real attitude angle change quantity, calculating to obtain a new position and a new attitude of the first target object relative to the first positioning base point in the real space; determining a new position and a new posture of a first virtual object corresponding to a first target object in a virtual space according to the new position and the new posture of the first target object in the real space relative to a first positioning base point;
Or determining the virtual space original position of the first virtual object in the virtual space according to the real space original position; and determining a first virtual attitude angle change amount of the first virtual object in a virtual space according to the first real attitude angle change amount; and calculating a new position and a new posture of the first virtual object in the virtual space according to the original position of the virtual space and the first virtual posture angle variation.
2. The method according to claim 1, characterized in that the method further comprises the steps of:
according to the original position in the real space and the first real attitude angle change quantity, calculating to obtain a new position and a new attitude of the first target object relative to the first positioning base point in the real space;
acquiring a second real attitude angle change amount of a second target object in real space relative to a second positioning base point in real space and a position of the second target object relative to the first target object; wherein the distance between the second predetermined point on the second target object and the second positioning base point is kept unchanged, and the second positioning base point is a point on the first target object;
And calculating the new position and the new posture of the second virtual object corresponding to the second target object in the virtual space according to the new position and the new posture of the first target object relative to the first positioning base point in the real space, the second real posture angle variation and the position of the second target object relative to the first target object.
3. The method of claim 2, wherein calculating a new position and a new pose of a second virtual object corresponding to the second target object in virtual space based on a new position and a new pose of the first target object in real space relative to the first positioning base point, a second real pose angular variation, and a position of the second target object relative to the first target object comprises:
calculating a new position and a new posture of the second target object relative to the second positioning base point in real space according to the new position and the new posture of the first target object relative to the first positioning base point in real space, a second real posture angle change amount and the position of the second target object relative to the first target object;
And determining the new position and the new posture of the second virtual object in the virtual space according to the new position and the new posture of the second target object in the real space relative to the second positioning base point.
4. The method according to claim 1, characterized in that the method further comprises the steps of:
acquiring a second real attitude angle change amount of a second target object in real space relative to a second positioning base point in real space and a position of the second target object relative to the first target object; wherein the distance between the second predetermined point on the second target object and the second positioning base point is kept unchanged, and the second positioning base point is a point on the first target object;
and calculating to obtain the new position and the new posture of the second virtual object corresponding to the second target object in the virtual space according to the new position and the new posture of the first virtual object in the virtual space, the second actual posture angle variation and the position of the second target object relative to the first target object.
5. The method of claim 4, wherein calculating the new position and the new pose of the second virtual object corresponding to the second target object in the virtual space based on the new position and the new pose of the first virtual object in the virtual space, the second real pose angular variation, and the position of the second target object relative to the first target object comprises:
Determining the position of the second virtual object relative to the first virtual object according to the position of the second target object relative to the first target object;
and calculating to obtain the new position and the new posture of the second virtual object in the virtual space according to the new position and the new posture of the first virtual object, the position of the second virtual object relative to the first virtual object and the angle change of the second real posture.
6. The method of claim 5, wherein calculating a new position and new pose of a second virtual object in virtual space based on the new position and new pose of the first virtual object, the position of the second virtual object relative to the first virtual object, and the second real pose angular variation comprises:
determining a second virtual attitude angle change amount of the second virtual object in a virtual space according to the second actual attitude angle change amount;
and calculating to obtain the new position and the new posture of the second virtual object in the virtual space according to the new position and the new posture of the first virtual object, the position of the second virtual object relative to the first virtual object and the angle change of the second virtual posture.
7. The method according to claim 6, wherein the first positioning base point coincides with the first predetermined point and/or a second positioning base point coincides with the second predetermined point.
8. A device for locating a target object in a virtual space, the device comprising:
the first data acquisition module is used for acquiring the original real space position of a first target object in real space relative to a first positioning base point in real space and the first real attitude angle change quantity of the first target object relative to the first positioning base point; wherein a distance between a first predetermined point located on the first target object and the first positioning base point remains unchanged;
the first position calculation module is used for calculating a new position and a new posture of the first target object in the real space relative to the first positioning base point according to the original position in the real space and the first real posture angle variation; determining a new position and a new posture of a first virtual object corresponding to a first target object in a virtual space according to the new position and the new posture of the first target object in the real space relative to a first positioning base point;
Or determining the virtual space original position of the first virtual object in the virtual space according to the real space original position; and determining a first virtual attitude angle change amount of the first virtual object in a virtual space according to the first real attitude angle change amount; and calculating a new position and a new posture of the first virtual object in the virtual space according to the original position of the virtual space and the first virtual posture angle variation.
9. The apparatus of claim 8, wherein the apparatus further comprises:
the second position calculation module is used for calculating a new position and a new posture of the first target object in the real space relative to the first positioning base point according to the original position in the real space and the first real posture angle variation;
the second data acquisition module is used for acquiring a second real attitude angle change amount of a second target object in real space relative to a second positioning base point in real space and the position of the second target object relative to the first target object; wherein the distance between the second predetermined point on the second target object and the second positioning base point is kept unchanged, and the second positioning base point is a point on the first target object;
And the third position calculation module is used for calculating the new position and the new posture of the second virtual object corresponding to the second target object in the virtual space according to the new position and the new posture of the first target object relative to the first positioning base point in the real space, the second real posture angle change amount and the position of the second target object relative to the first target object.
10. The apparatus of claim 9, wherein the third position calculation module comprises:
a second real space position calculating sub-module, configured to calculate a new position and a new posture of the second target object in real space relative to the second positioning base point according to a new position and a new posture of the first target object in real space relative to the first positioning base point, a second real posture angle variation, and a position of the second target object relative to the first target object;
and the third virtual space position conversion sub-module is used for determining the new position and the new posture of the second virtual object in the virtual space according to the new position and the new posture of the second target object in the real space relative to the second positioning base point.
11. The apparatus of claim 9, wherein the apparatus further comprises:
the third data acquisition module is used for acquiring a second real attitude angle change quantity of a second target object in real space relative to a second positioning base point in real space and the position of the second target object relative to the first target object; wherein the distance between the second predetermined point on the second target object and the second positioning base point is kept unchanged, and the second positioning base point is a point on the first target object;
and the fourth position calculation module is used for calculating the new position and the new posture of the second virtual object corresponding to the second target object in the virtual space according to the new position and the new posture of the first virtual object in the virtual space, the second actual posture angle variation and the position of the second target object relative to the first target object.
12. The apparatus of claim 11, wherein the fourth location calculation module comprises:
a fourth virtual space position conversion sub-module, configured to determine a position of the second virtual object relative to the first virtual object according to a position of the second target object relative to the first target object;
And the second virtual space position calculating sub-module is used for calculating the new position and the new posture of the second virtual object in the virtual space according to the new position and the new posture of the first virtual object, the position of the second virtual object relative to the first virtual object and the second actual posture angle variation.
13. The apparatus of claim 12, wherein the second virtual spatial location calculation submodule comprises:
a second attitude angle conversion unit, configured to determine a second virtual attitude angle variation of the second virtual object in a virtual space according to the second actual attitude angle variation;
and the second virtual space position calculating unit is used for calculating the new position and the new posture of the second virtual object in the virtual space according to the new position and the new posture of the first virtual object, the position of the second virtual object relative to the first virtual object and the second virtual posture angle variation.
CN201711490330.3A 2017-12-30 2017-12-30 Positioning method and device of target object in virtual space Active CN109993834B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201711490330.3A CN109993834B (en) 2017-12-30 2017-12-30 Positioning method and device of target object in virtual space

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201711490330.3A CN109993834B (en) 2017-12-30 2017-12-30 Positioning method and device of target object in virtual space

Publications (2)

Publication Number Publication Date
CN109993834A CN109993834A (en) 2019-07-09
CN109993834B true CN109993834B (en) 2023-08-29

Family

ID=67110061

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201711490330.3A Active CN109993834B (en) 2017-12-30 2017-12-30 Positioning method and device of target object in virtual space

Country Status (1)

Country Link
CN (1) CN109993834B (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111157015A (en) * 2020-04-07 2020-05-15 北京外号信息技术有限公司 Method and system for creating path information
CN114648572A (en) * 2020-12-21 2022-06-21 青岛千眼飞凤信息技术有限公司 Virtual positioning method and device and virtual positioning system

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2009025918A (en) * 2007-07-17 2009-02-05 Canon Inc Image processor and image processing method
CN105096384A (en) * 2015-07-22 2015-11-25 深圳多新哆技术有限责任公司 Method and device for adjusting position and attitude angle of virtual object
CN105912110A (en) * 2016-04-06 2016-08-31 北京锤子数码科技有限公司 Method, device and system for performing target selection in virtual reality space

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2009025918A (en) * 2007-07-17 2009-02-05 Canon Inc Image processor and image processing method
CN105096384A (en) * 2015-07-22 2015-11-25 深圳多新哆技术有限责任公司 Method and device for adjusting position and attitude angle of virtual object
CN105912110A (en) * 2016-04-06 2016-08-31 北京锤子数码科技有限公司 Method, device and system for performing target selection in virtual reality space

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
混合硬件跟踪定位的空间信息虚实配准;武雪玲等;《地理与地理信息科学》;20100515(第03期);全文 *

Also Published As

Publication number Publication date
CN109993834A (en) 2019-07-09

Similar Documents

Publication Publication Date Title
US20210233272A1 (en) Data processing method and device used in virtual scenario
CN107223269B (en) Three-dimensional scene positioning method and device
WO2019242262A1 (en) Augmented reality-based remote guidance method and device, terminal, and storage medium
CN106846497B (en) Method and device for presenting three-dimensional map applied to terminal
WO2022000755A1 (en) Robot, motion control method and apparatus therefor, and computer-readable storage medium
CN110866977B (en) Augmented reality processing method, device, system, storage medium and electronic equipment
CN113741698A (en) Method and equipment for determining and presenting target mark information
US10147240B2 (en) Product image processing method, and apparatus and system thereof
CN115578433B (en) Image processing method, device, electronic equipment and storage medium
CN109993834B (en) Positioning method and device of target object in virtual space
US11210864B2 (en) Solution for generating virtual reality representation
CN112506465B (en) Method and device for switching scenes in panoramic roaming
CN113610702A (en) Picture construction method and device, electronic equipment and storage medium
CN110631586A (en) Map construction method based on visual SLAM, navigation system and device
CN115620264B (en) Vehicle positioning method and device, electronic equipment and computer readable medium
CN115619986B (en) Scene roaming method, device, equipment and medium
CN113900517B (en) Route navigation method and device, electronic equipment and computer readable medium
CN115131507A (en) Image processing method, image processing apparatus, and three-dimensional reconstruction method of metauniverse
CN112825198B (en) Mobile tag display method, device, terminal equipment and readable storage medium
CN116129087A (en) Positioning method, visual map generation method and device thereof
KR101591057B1 (en) Remote control method and system for synchronization
CN108845669B (en) AR/MR interaction method and device
CN112417924A (en) Method and device for acquiring space coordinates of marker post
CN117274558B (en) AR navigation method, device and equipment for visual positioning and storage medium
CN115937299B (en) Method for placing virtual object in video and related equipment

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