CN113012214A - Method and electronic device for setting spatial position of virtual object - Google Patents

Method and electronic device for setting spatial position of virtual object Download PDF

Info

Publication number
CN113012214A
CN113012214A CN201911322368.9A CN201911322368A CN113012214A CN 113012214 A CN113012214 A CN 113012214A CN 201911322368 A CN201911322368 A CN 201911322368A CN 113012214 A CN113012214 A CN 113012214A
Authority
CN
China
Prior art keywords
virtual object
electronic device
initial
spatial position
spatial
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
CN201911322368.9A
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.)
Beijing Yimu Technology Co ltd
Original Assignee
Beijing Whyhow Information 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 Beijing Whyhow Information Technology Co Ltd filed Critical Beijing Whyhow Information Technology Co Ltd
Priority to CN201911322368.9A priority Critical patent/CN113012214A/en
Priority to PCT/CN2020/134218 priority patent/WO2021121061A1/en
Priority to TW109144907A priority patent/TWI777333B/en
Publication of CN113012214A publication Critical patent/CN113012214A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/70Determining position or orientation of objects or cameras
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T19/00Manipulating 3D models or images for computer graphics
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T19/00Manipulating 3D models or images for computer graphics
    • G06T19/006Mixed reality

Landscapes

  • Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Graphics (AREA)
  • Computer Hardware Design (AREA)
  • General Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Processing Or Creating Images (AREA)
  • User Interface Of Digital Computer (AREA)
  • Image Analysis (AREA)

Abstract

A method and electronic device for setting a spatial position of a virtual object, the method comprising: determining a virtual object to be set in a spatial position; obtaining an initial spatial position of the virtual object; obtaining location information of an electronic device, the location information comprising: the initial position of the electronic equipment at the initial moment and the new position of the electronic equipment, and/or the position change information of the electronic equipment; and setting the spatial position of the virtual object according to the initial spatial position of the virtual object, the initial position of the electronic device, and the new position of the electronic device, or setting the spatial position of the virtual object according to the initial spatial position of the virtual object and the position change information of the electronic device.

Description

Method and electronic device for setting spatial position of virtual object
Technical Field
The present invention relates to the field of augmented reality or virtual reality technologies, and in particular, to a method and an electronic device for setting a spatial position of a virtual object.
Background
The statements in this section merely provide background information related to the present disclosure and may not constitute prior art for the purposes of describing the present disclosure.
Virtual Reality (Virtual Reality) is a computer simulation technique that creates and experiences a Virtual world by using a computer to create a simulated environment containing Virtual objects (e.g., icons, pictures, text, emoticons, Virtual three-dimensional objects, three-dimensional scene models, a piece of animation, a piece of video, etc.) that a user can immerse into. Augmented Reality (Augmented Reality) technology is a technology that skillfully fuses virtual information with a real world, and can place a virtual object generated by a computer into the real world observed through an electronic device (e.g., a mobile phone, a tablet computer, smart glasses, AR glasses, a smart helmet, a smart watch, etc.), so that the virtual object and the real world complement each other, and "augmentation" of the real world is achieved.
To achieve good virtual reality or augmented reality effects, it is often necessary to place virtual objects at precise locations in space and often to adjust the positions of the virtual objects. In one scheme of the prior art, a virtual object may be initially placed at a preset position or a selected position in a visual field of a mobile phone, and then a position of the virtual object in a three-dimensional space may be set by an operation (e.g., a drag operation on the virtual object) of the virtual object on a screen of the mobile phone by a user. However, the operation on the cell phone screen is an operation on a two-dimensional plane, which makes it difficult to accurately or conveniently set the position of the virtual object in the three-dimensional space.
Therefore, a method for conveniently and rapidly setting the spatial position of the virtual object is required.
Disclosure of Invention
One aspect of the invention relates to a method for setting a spatial position of a virtual object, comprising: determining a virtual object to be set in a spatial position; obtaining an initial spatial position of the virtual object; obtaining location information of an electronic device, the location information comprising: the initial position of the electronic equipment at the initial moment and the new position of the electronic equipment, and/or the position change information of the electronic equipment; and setting the spatial position of the virtual object according to the initial spatial position of the virtual object, the initial position of the electronic device, and the new position of the electronic device, or setting the spatial position of the virtual object according to the initial spatial position of the virtual object and the position change information of the electronic device.
Optionally, the method further comprises: obtaining pose information of the electronic device, wherein the position and pose information of the electronic device comprises: the initial position and the attitude of the electronic equipment at the initial moment and the new position and attitude of the electronic equipment, and/or the position and attitude change information of the electronic equipment; and wherein the setting the spatial position of the virtual object comprises: setting a spatial position of the virtual object according to the initial spatial position of the virtual object, the initial position and posture of the electronic device, and the new position and posture of the electronic device, or setting a spatial position of the virtual object according to the initial spatial position of the virtual object and the position and posture change information of the electronic device.
Optionally, wherein the position and posture information of the electronic device includes: an initial position and posture of the electronic device at an initial time and a new position and posture of the electronic device, and/or an initial position and posture of the electronic device at an initial time and position and posture change information of the electronic device, and wherein the setting of the spatial position of the virtual object comprises: setting the spatial position of the virtual object according to the initial spatial position of the virtual object, the initial position and posture of the electronic device, and the new position and posture of the electronic device or the position and posture change information of the electronic device after the initial time.
Optionally, wherein the setting of the spatial position of the virtual object according to the initial spatial position of the virtual object, the initial position and orientation of the electronic device, and the new position and orientation of the electronic device or the position and orientation change information of the electronic device after the initial time comprises: determining a position of the virtual object relative to the electronic device from an initial spatial position of the virtual object and the initial position and pose of the electronic device; and setting the spatial position of the virtual object according to the new position and posture of the electronic equipment and the position of the virtual object relative to the electronic equipment.
Optionally, wherein the setting of the spatial position of the virtual object according to the initial spatial position of the virtual object, the initial position and orientation of the electronic device, and the new position and orientation of the electronic device or the position and orientation change information of the electronic device after the initial time comprises: determining a position of the virtual object relative to the electronic device from an initial spatial position of the virtual object and the initial position and pose of the electronic device; determining spatial position change information of the virtual object according to the position and posture change information of the electronic equipment and the position of the virtual object relative to the electronic equipment; and setting the spatial position of the virtual object according to the initial spatial position of the virtual object and the spatial position change information of the virtual object.
Optionally, wherein the position of the virtual object relative to the electronic device remains unchanged at all times.
Optionally, wherein the position of the virtual object relative to the electronic device comprises a direction of the virtual object relative to the electronic device and a distance or depth of the virtual object relative to the electronic device; and wherein the method further comprises: changing a distance or depth of the virtual object relative to the electronic device based on input information from a user.
Optionally, wherein a selection icon is presented on a display medium of the electronic device, and wherein the determining of the virtual object to set the spatial position comprises: when a certain virtual object is presented at the position of the selection icon and a selection instruction of a user is received, the virtual object is determined as the virtual object of which the spatial position is to be set.
Optionally, the position change information or the posture change information of the electronic device is position change information or posture change information of the electronic device after the initial time.
Another aspect of the invention relates to a storage medium in which a computer program is stored which, when being executed by a processor, can be used for carrying out the above-mentioned method.
Yet another aspect of the invention relates to an electronic device comprising a processor and a memory, in which a computer program is stored which, when being executed by the processor, is operative to carry out the method as described above.
By adopting the scheme of the invention, the position of the virtual object in the three-dimensional space can be correspondingly adjusted according to the position or pose change of the electronic equipment in the three-dimensional space, and the limitation and inconvenience of operation through a two-dimensional plane (such as a mobile phone screen) in the prior art are overcome, so that a user can conveniently and quickly set the spatial position of the virtual object.
Drawings
Embodiments of the invention are further described below with reference to the accompanying drawings, in which:
FIG. 1 illustrates a method for setting a spatial position of a virtual object by an electronic device according to one embodiment of the present application;
FIG. 2 illustrates a coordinate transformation diagram according to one embodiment;
FIG. 3 illustrates a hypothetical rigid connection established between a virtual object and an electronic device;
FIG. 4 illustrates a change in position of a virtual object when the electronic device is panned;
FIG. 5 illustrates a change in position of a virtual object as the electronic device is further rotated;
FIG. 6 illustrates a method for setting a spatial position of a virtual object by an electronic device according to another embodiment of the present application;
fig. 7 illustrates a method for setting a spatial position of a virtual object by an electronic device according to yet another embodiment of the present application.
Detailed Description
In order to make the objects, technical solutions and advantages of the present invention more apparent, the present invention will be further described in detail by embodiments with reference to the accompanying drawings. It should be understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention.
The electronic device in the present application may be, for example, a cell phone, a tablet, smart glasses, AR/VR headset, smart watch, etc., having an image display medium (e.g., a screen), and optionally may have an image capture device (e.g., a camera). In some embodiments of the present application, a mobile phone is taken as an example for description, but it is understood that the present invention is not limited thereto. In some embodiments of the present application, an augmented reality application is taken as an example for description, but it is to be understood that this is not a limitation, and the solution of the present application may also be applied to a virtual reality application.
Fig. 1 shows a method for setting a spatial position of a virtual object by an electronic device according to an embodiment of the application, comprising the steps of:
step 101: a virtual object for which a spatial position is to be set is determined.
In one embodiment, a user of an electronic device may select a virtual object presented on a display medium of the electronic device to set its position in space. One or more virtual objects that already exist in space may be rendered on a display medium of the electronic device based on the position and pose information (collectively pose information) of the electronic device in space, and the one or more virtual objects may have corresponding spatial positions. In the augmented reality application, a real image of a space acquired by an image acquisition device of the electronic device may be presented on a display medium of the electronic device, and the virtual object may be presented on the display medium of the electronic device together with the real image, thereby achieving an augmented reality effect. A user may select a virtual object presented on their display medium by operating the electronic device. In one embodiment, a user may directly manipulate (e.g., click or double-click) a virtual object presented on a display medium of an electronic device to determine it as the virtual object to be spatially located. In one embodiment, the user may first operate a virtual object presented on the display medium of the electronic device to select the virtual object, and then determine the virtual object as the virtual object to be spatially positioned by other operations (e.g., clicking a virtual key presented on the display medium of the electronic device, or pressing a physical key on the electronic device). In one embodiment, a selection icon (e.g., a ring, a cross, etc.) for identifying a selection area or a selection point may be presented on a display medium of the electronic device, and a user may adjust a position or a posture of the electronic device to cause a certain virtual object to be presented at a position of the selection icon, at this time, if the user performs a corresponding operation on the electronic device (e.g., clicks a certain virtual key presented on the display medium of the electronic device, or presses a certain physical key on the electronic device), the virtual object may be determined as a virtual object to be set to a spatial position.
In one embodiment, the virtual object that the user has just added to the space may be determined as the virtual object for which the spatial position is to be set. When a user adds a virtual object to a space, the virtual object may have a preset or random position relative to the electronic device.
Step 102: an initial spatial position of the virtual object is obtained.
The initial spatial position of the virtual object may be its position (e.g., coordinates) in some coordinate system of space, which may be, for example, a venue coordinate system (e.g., a coordinate system established for a certain room, building, campus, etc.) or a world coordinate system. The information about the initial spatial position of the virtual object may be stored in the electronic device, or may be stored in another device, such as a server, that can be accessed by the electronic device.
Step 103: the initial position and the posture of the electronic equipment at the initial moment are obtained.
The position and posture information (pose information) of the electronic device in space can be determined in various ways that are present and may appear in the future. For example, the electronic device may determine its pose information in space by visual recognition of the surrounding scene by the image capture device thereon. The electronic device may also determine its pose information in the space by interacting with landmark points (e.g., visual landmark points or wireless signal landmark points) arranged in the space. The electronic device may also use various sensors built in (e.g., magnetic sensors, orientation sensors, gravity sensors, gyroscopes, acceleration sensors, satellite positioning signal receivers, etc.) to measure or track its pose information.
The initial time may be, for example, a time at which a virtual object whose spatial position is to be set is determined, but may also be another time after the time. For example, after determining a virtual object to set a spatial position, the user may indicate an initial time by the electronic device performing some operation. After the initial time, the change in the position or attitude of the electronic device may have an effect on the spatial position of the virtual object. In one embodiment, a user may determine a virtual object to be set in a spatial position by one operation, and may take the execution time of the operation as an initial time. In another embodiment, the user may determine the virtual object to be set in the spatial position through one operation, and then the user may perform another operation (e.g., pressing a certain virtual key or physical key of the electronic device) to instruct to start setting or adjusting the spatial position of the virtual object, and may take the execution time of the another operation as the initial time.
Step 104: and determining the position of the virtual object relative to the electronic equipment according to the initial spatial position of the virtual object and the initial position and the attitude of the electronic equipment.
In one embodiment, the spatial position of a virtual object may be represented by the coordinates of the virtual object in a spatial coordinate system. An electronic device coordinate system with the electronic device as an origin can be set for the electronic device, and the electronic device coordinate system translates and rotates in a space coordinate system along with translation and rotation of the electronic device. The position and the posture of the electronic device or the electronic device coordinate system in the space coordinate system can be represented by a rotation matrix R and a displacement vector t, wherein the rotation matrix R is a rotation matrix between the space coordinate system and the electronic device coordinate system and can be used for representing the posture information of the electronic device in the space coordinate system, and the displacement vector t can be used for representing the origin of the electronic device coordinate system or the position information of the electronic device in the space coordinate system.
Fig. 2 shows a schematic diagram of coordinate transformation according to an embodiment, in which a virtual object 201, an electronic device 202, a spatial coordinate system with Oa as origin of coordinates, an electronic device coordinate system with Ob or the electronic device 202 as origin of coordinates are shown. The virtual object 201 has position coordinates in a spatial coordinate system. From the position and the attitude of the electronic device 202 in the spatial coordinate system, a rotation matrix R and a displacement vector t between the spatial coordinate system and the electronic device coordinate system can be obtained. Based on the position coordinates of the virtual object 201 in the spatial coordinate system and the rotation matrix R and the displacement vector t between the spatial coordinate system and the electronic device coordinate system, the position coordinates of the virtual object 201 in the electronic device coordinate system, that is, the position information of the virtual object 201 relative to the electronic device 202, can be obtained. The transformation of the coordinate system using the rotation matrix R and the displacement vector t is prior art in the field and will not be described herein.
After determining the position information of the virtual object 201 relative to the electronic device 202, it may be assumed that a "rigid connection" is established between the virtual object 201 and the electronic device 202, as indicated by the dashed line in fig. 3. In this way, when the electronic device 202 is translated or rotated to change the position or posture of the electronic device 202 in the spatial coordinate system, accordingly, the position of the virtual object 201 in the spatial coordinate system is also changed due to the rigid connection, and meanwhile, the position of the virtual object 201 relative to the electronic device 202 is always kept unchanged. Fig. 4 shows the change in position of the virtual object 201 when the electronic device 202 is panned. As shown in fig. 4, when the electronic device 202 translates in the spatial coordinate system to change the position, the virtual object 201 also translates in the spatial coordinate system and causes the same position change. Fig. 5 shows the change in position of the virtual object 201 as the electronic device 202 is further rotated. As shown in fig. 5, when the electronic device 202 rotates in the space coordinate system to change the posture, the virtual object 201 will have a corresponding position change in the space coordinate system, which depends on the specific rotation mode of the electronic device 202 and the position of the virtual object relative to the electronic device.
Step 105: and obtaining a new position and posture of the electronic equipment after the position or posture of the electronic equipment is changed.
As mentioned above, various ways, existing and likely to occur in the future, may be used to determine new position and pose information for the electronic device in the spatial coordinate system, which also corresponds to the new position and pose information for the electronic device coordinate system. The new position and pose of the electronic device in the spatial coordinate system may be represented by a rotation matrix R and a displacement vector t between the spatial coordinate system and the new electronic device coordinate system.
Step 106: setting a spatial position of the virtual object according to the new position and posture of the electronic device and the position of the virtual object relative to the electronic device.
Referring back to the coordinate transformation diagram shown in fig. 2, based on the position information of the virtual object 201 relative to the electronic device 202 (i.e., the position coordinates of the virtual object 201 in the electronic device coordinate system) and the rotation matrix R and the displacement vector t between the spatial coordinate system and the new electronic device coordinate system, coordinate transformation may be performed to obtain the current position coordinates of the virtual object 201 in the spatial coordinate system, and the current position coordinates may be set as the new spatial position of the virtual object 201. The new spatial position set for the virtual object 201 may be recorded or stored.
In one embodiment, the user may indicate to start setting the spatial position of the virtual object by performing a certain operation on the electronic device (e.g., pressing a certain virtual key or physical key of the electronic device), and thus the spatial position of the virtual object is configured to be changeable as the position or posture of the electronic device changes. In moving the virtual object to the desired spatial position, the user may perform another operation on the electronic device to indicate that the setup operation is complete, and may accordingly deselect the virtual object or remove the assumed rigid connection between the virtual object and the electronic device, such that the spatial position of the virtual object is not changed as the position or attitude of the electronic device continues to change.
In one embodiment, the user may indicate to start setting the spatial position of the virtual object by pressing a certain virtual key or physical key of the electronic device, after which the user may keep pressing said key and move the electronic device. When the user moves the virtual object to a desired spatial position, the key may be released to complete the setting of the spatial position of the virtual object. After releasing the key, the spatial position of the virtual object may be configured to no longer change as the position or posture of the electronic device changes.
In the process of changing the position or the posture of the electronic equipment, the virtual object can be presented on the display medium of the electronic equipment, so that the user can be facilitated to set the spatial position of the virtual object more intuitively.
In one embodiment, since the position of the virtual object relative to the electronic device remains constant at all times, the virtual object may always be presented at the same position on the display medium of the electronic device as the position or pose of the electronic device changes.
In another embodiment, during the change of the position and the posture of the electronic device, the position of the virtual object in the spatial coordinate system may be updated according to the new position and the posture of the electronic device in the spatial coordinate system and the position of the virtual object relative to the electronic device, and then the virtual object may be rendered at the corresponding position on the display medium of the electronic device according to the position and the posture of the electronic device in the spatial coordinate system and the position of the virtual object in the spatial coordinate system. It will be appreciated that since the position of the virtual object relative to the electronic device is always constant, the virtual object will always be presented at the same position on the display medium of the electronic device.
In one embodiment, a display medium of the electronic device may present a real-world image of a space captured by an image capturing device of the electronic device, thereby implementing an augmented reality application. In another embodiment, the display medium of the electronic device may not present the real-scene image of the space acquired by the image acquisition device of the electronic device, so as to implement the virtual reality application. In a virtual reality application, the electronic device may not have an image capture device therein.
In the embodiment shown in fig. 1, the spatial position of the virtual object is set according to the new position and orientation of the electronic device and the position of the virtual object relative to the electronic device, but the spatial position change information of the virtual object may be determined according to the position and orientation change information of the electronic device and the position of the virtual object relative to the electronic device, thereby setting the spatial position of the virtual object. Fig. 6 shows a method for setting a spatial position of a virtual object by an electronic device according to another embodiment of the present application, which includes the following steps (some steps are similar to those shown in fig. 1 and will not be explained in detail here):
step 601: a virtual object for which a spatial position is to be set is determined.
Step 602: an initial spatial position of the virtual object is obtained.
Step 603: the initial position and the posture of the electronic equipment at the initial moment are obtained.
Step 604: and determining the position of the virtual object relative to the electronic equipment according to the initial spatial position of the virtual object and the initial position and the attitude of the electronic equipment.
As mentioned above, the position of the virtual object relative to the electronic device may be represented by the position coordinates of the virtual object in the electronic device coordinate system.
Step 605: and obtaining the position and posture change information of the electronic equipment after the initial moment.
Various ways, both existing and as may occur in the future, may be used to determine the position and attitude change information of the electronic device in space. For example, the electronic device may also use various sensors (e.g., magnetic sensors, orientation sensors, gravity sensors, gyroscopes, acceleration sensors, satellite positioning signal receivers, etc.) built in to measure or track changes in its position and/or attitude through, for example, inertial navigation, visual odometry, SLAM, VSLAM, SFM, etc.
Step 606: and determining the space position change information of the virtual object according to the position and posture change information of the electronic equipment and the position of the virtual object relative to the electronic equipment.
In one embodiment, from the position and pose change information of the electronic device, the translational and rotational changes experienced by the electronic device may be determined. The translation of the electronic device may cause the spatial position of the virtual object to likewise translate, as shown in fig. 4. A rotation of the electronic device may cause a change in the spatial position of the virtual object corresponding to the rotation, which is dependent on the particular manner of rotation of the electronic device and the position of the virtual object relative to the electronic device, as shown in fig. 5.
Step 607: and setting the space position of the virtual object according to the initial space position of the virtual object and the space position change information of the virtual object.
The current spatial position of the virtual object can be calculated from the initial spatial position of the virtual object and the spatial position change information of the virtual object. The current spatial position of the virtual object may be set as the new spatial position of the virtual object and may be recorded or stored.
The difference between the two methods shown in fig. 1 and fig. 6 is that according to the method shown in fig. 1, the position and posture change of the electronic device does not need to be tracked all the time, and only the initial position and posture and the final position and posture of the electronic device need to be determined; according to the method shown in fig. 6, the final position and posture of the electronic device do not need to be determined, and only the position and posture change information of the electronic device needs to be tracked. It can be understood that the practical principles of the two methods are similar, because the position and posture change information of the electronic device can be calculated according to the initial position and posture and the final position and posture of the electronic device; accordingly, the final position and orientation of the electronic device can also be calculated according to the initial position and orientation of the electronic device and the position and orientation change information thereof. Thus, in a more general embodiment, there is provided a method for setting a spatial position of a virtual object, comprising: determining a virtual object to be set in a spatial position; obtaining an initial spatial position of the virtual object; obtaining an initial position and a posture of the electronic equipment at an initial moment; acquiring new position and attitude of the electronic equipment or position and attitude change information of the electronic equipment after the initial time; and setting the spatial position of the virtual object according to the initial spatial position of the virtual object, the initial position and posture of the electronic device, and the new position and posture of the electronic device or the position and posture change information of the electronic device after the initial time.
In some embodiments above, a hypothetical "rigid connection" is established between the electronic device and the virtual object in adjusting or setting the spatial position of the virtual object, but it is emphasized that this is not a limitation of the present invention. In other embodiments of the present application, after determining the virtual object whose spatial position is to be set, the spatial position of the virtual object may be set in any other desired manner or rule according to a new position or pose of the electronic device or position or pose change information of the electronic device.
In one embodiment, the position of the virtual object relative to the electronic device may be determined from the initial spatial position of the virtual object and the initial position and pose of the electronic device, which includes the orientation of the virtual object relative to the electronic device and the distance or depth of the virtual object relative to the electronic device. In adjusting or setting the spatial position of the virtual object, a user of the electronic device may provide input information through an operating element of the electronic device to change or adjust the distance or depth of the virtual object relative to the electronic device while the orientation of the virtual object relative to the electronic device remains unchanged. That is, in a case where the "rigid connection" shown by the broken line in fig. 3 is kept unchanged with respect to the orientation of the electronic apparatus, the length of the "rigid connection" is changed. The operation element of the electronic device may be a virtual operation element presented on a display medium of the electronic device, or may be a physical operation element provided on the electronic device. In one embodiment, the operating element may be a slider bar presented on a display medium of the electronic device, and the distance or depth of the virtual object relative to the electronic device may be changed by dragging a slider of the slider bar. The distance of the virtual object with respect to the electronic device may refer to a straight-line distance of the virtual object to the electronic device. The depth of the virtual object with respect to the electronic device may for example refer to the vertical distance of the virtual object with respect to a plane in which the electronic device is located or an imaging plane of an image acquisition means of the electronic device. It will be appreciated by those skilled in the art that since the orientation of the virtual object relative to the electronic device remains the same, setting the distance of the virtual object relative to the electronic device will in fact set the depth of the virtual object relative to the electronic device accordingly, and vice versa, and thus, setting the distance and setting the depth will have the same effect in many cases. The value of the currently set distance or depth may be displayed on a display medium of the electronic device in real time when the distance or depth of the virtual object with respect to the electronic device is set. In some embodiments, the size or dimensions of the virtual object presented may be changed according to the distance or depth of the virtual object relative to the electronic device.
In one embodiment, only the location information of the electronic device may be considered and the spatial location of the virtual object may be changed according to the location or change in location of the electronic device. In one approach, the displacement of the electronic device may be determined from the initial position of the electronic device and the new position of the electronic device, thereby altering the initial spatial position of the virtual object. In another approach, the position change information of the electronic device may be tracked and the initial spatial position of the virtual object may be modified based on the position change information of the electronic device. Fig. 7 illustrates a method for setting a spatial position of a virtual object by an electronic device, which changes the spatial position of the virtual object according to a position or a change in the position of the electronic device, according to an embodiment of the present application, and includes the steps of:
step 701: determining a virtual object to be set in a spatial position;
step 702: obtaining an initial spatial position of the virtual object;
step 703: obtaining location information of an electronic device, the location information comprising: the initial position of the electronic equipment at the initial moment and the new position of the electronic equipment, and/or the position change information of the electronic equipment; and
step 704: setting a spatial position of the virtual object according to an initial spatial position of the virtual object, an initial position of the electronic device, and a new position of the electronic device, or setting a spatial position of the virtual object according to an initial spatial position of the virtual object and position change information of the electronic device. In one embodiment, when the spatial position of the virtual object is changed in accordance with a change in the position or posture of the electronic apparatus, the amount of change in the position of the electronic apparatus (i.e., the amount of displacement) is the same as the amount of change in the position of the virtual object. In another embodiment, when the spatial position of the virtual object is changed in accordance with a change in the position or posture of the electronic device, a scaling between the amount of change in the position of the electronic device and the amount of change in the position of the virtual object may be set. In a case where the amount of positional change of the electronic apparatus can be made larger than the amount of positional change of the virtual object, this case is suitable for fine adjustment of the spatial position of the virtual object by the electronic apparatus. In another case, the amount of positional change of the electronic device can be made smaller than the amount of positional change of the virtual object, which is suitable for large-scale adjustment of the spatial position of the virtual object by a small change in displacement of the electronic device.
In one embodiment of the invention, the invention may be implemented in the form of a computer program. The computer program may be stored in various storage media (e.g., hard disk, optical disk, flash memory, etc.), which when executed by a processor, can be used to implement the methods of the present invention.
In another embodiment of the invention, the invention may be implemented in the form of an electronic device. The electronic device comprises a processor and a memory in which a computer program is stored which, when being executed by the processor, can be used for carrying out the method of the invention.
References herein to "various embodiments," "some embodiments," "one embodiment," or "an embodiment," etc., indicate that a particular feature, structure, or characteristic described in connection with the embodiment is included in at least one embodiment. Thus, appearances of the phrases "in various embodiments," "in some embodiments," "in one embodiment," or "in an embodiment," or the like, in various places throughout this document are not necessarily referring to the same embodiment. Furthermore, the particular features, structures, or characteristics may be combined in any suitable manner in one or more embodiments. Thus, a particular feature, structure, or characteristic illustrated or described in connection with one embodiment may be combined, in whole or in part, with a feature, structure, or characteristic of one or more other embodiments without limitation, as long as the combination is not logically inconsistent or workable. Expressions appearing herein similar to "according to a", "based on a", "by a" or "using a" mean non-exclusive, i.e. "according to a" may cover "according to a only", and also "according to a and B", unless it is specifically stated that the meaning is "according to a only". In the present application, for clarity of explanation, some illustrative operational steps are described in a certain order, but one skilled in the art will appreciate that each of these operational steps is not essential and some of them may be omitted or replaced by others. It is also not necessary that these operations be performed sequentially in the manner shown, but rather that some of these operations be performed in a different order, or in parallel, as desired, provided that the new implementation is not logically or operationally unfeasible.
Having thus described several aspects of at least one embodiment of this invention, it is to be appreciated various alterations, modifications, and improvements will readily occur to those skilled in the art. Such alterations, modifications, and improvements are intended to be within the spirit and scope of the invention. Although the present invention has been described by way of preferred embodiments, the present invention is not limited to the embodiments described herein, and various changes and modifications may be made without departing from the scope of the present invention.

Claims (17)

1. A method for setting a spatial position of a virtual object, comprising:
determining a virtual object to be set in a spatial position;
obtaining an initial spatial position of the virtual object;
obtaining location information of an electronic device, the location information comprising: the initial position of the electronic equipment at the initial moment and the new position of the electronic equipment, and/or the position change information of the electronic equipment; and
setting a spatial position of the virtual object according to an initial spatial position of the virtual object, an initial position of the electronic device, and a new position of the electronic device, or setting a spatial position of the virtual object according to an initial spatial position of the virtual object and position change information of the electronic device.
2. The method of claim 1, further comprising: obtaining pose information of the electronic device, wherein the position and pose information of the electronic device comprises: the initial position and the attitude of the electronic equipment at the initial moment and the new position and attitude of the electronic equipment, and/or the position and attitude change information of the electronic equipment;
and wherein the setting the spatial position of the virtual object comprises: setting a spatial position of the virtual object according to the initial spatial position of the virtual object, the initial position and posture of the electronic device, and the new position and posture of the electronic device, or setting a spatial position of the virtual object according to the initial spatial position of the virtual object and the position and posture change information of the electronic device.
3. The method of claim 1, wherein the position and pose information of the electronic device comprises: an initial position and posture of the electronic device at an initial time and a new position and posture of the electronic device, and/or initial position and posture of the electronic device at an initial time and position and posture change information of the electronic device,
and wherein the setting the spatial position of the virtual object comprises: setting the spatial position of the virtual object according to the initial spatial position of the virtual object, the initial position and posture of the electronic device, and the new position and posture of the electronic device or the position and posture change information of the electronic device after the initial time.
4. The method of claim 3, wherein the setting of the spatial position of the virtual object according to an initial spatial position of the virtual object, the initial position and pose of the electronic device, and a new position and pose of the electronic device or position and pose change information of the electronic device after the initial time comprises:
determining a position of the virtual object relative to the electronic device from an initial spatial position of the virtual object and the initial position and pose of the electronic device; and
setting a spatial position of the virtual object according to the new position and posture of the electronic device and the position of the virtual object relative to the electronic device.
5. The method of claim 3, wherein the setting of the spatial position of the virtual object according to an initial spatial position of the virtual object, the initial position and pose of the electronic device, and a new position and pose of the electronic device or position and pose change information of the electronic device after the initial time comprises:
determining a position of the virtual object relative to the electronic device from an initial spatial position of the virtual object and the initial position and pose of the electronic device;
determining spatial position change information of the virtual object according to the position and posture change information of the electronic equipment and the position of the virtual object relative to the electronic equipment; and
and setting the space position of the virtual object according to the initial space position of the virtual object and the space position change information of the virtual object.
6. The method of claim 4 or 5, wherein the position of the virtual object relative to the electronic device remains constant at all times.
7. The method of claim 4 or 5, wherein the position of the virtual object relative to the electronic device comprises a direction of the virtual object relative to the electronic device and a distance or depth of the virtual object relative to the electronic device;
and wherein the method further comprises: changing a distance or depth of the virtual object relative to the electronic device based on input information from a user.
8. The method according to any of claims 1-5, wherein the initial time instant is a time instant at which a virtual object is determined to be set in spatial position, or a time instant after this time instant.
9. The method of any of claims 1-5, wherein, after the initial time, a change in position or pose of the electronic device affects a spatial position of the virtual object.
10. The method of any of claims 1-5, wherein the determining a virtual object to set a spatial location comprises:
determining a virtual object located on a display medium of the electronic equipment selected by a user as a virtual object to be set in a spatial position; or
The virtual object that the user last added to the space is determined as the virtual object whose spatial position is to be set.
11. The method of any of claims 1-5, wherein a selection icon is presented on a display medium of the electronic device, and wherein the determining a virtual object to set a spatial location comprises:
when a certain virtual object is presented at the position of the selection icon and a selection instruction of a user is received, the virtual object is determined as the virtual object of which the spatial position is to be set.
12. The method of any of claims 1-5, wherein when a certain virtual or physical key of the electronic device is pressed by a user, setting a spatial position of the virtual object as a position or pose of the electronic device changes; and wherein when the virtual key or physical key is released by a user, the spatial position of the virtual object is configured to no longer change as the position or attitude of the electronic device changes.
13. The method of any of claims 1-5, wherein the change in position or change in orientation information of the electronic device is change in position or change in orientation information of the electronic device after the initial time.
14. The method of any of claims 1-5, wherein an amount of change in the position of the electronic device is equal to an amount of change in the position of the virtual object.
15. The method of any of claims 1-5, wherein an amount of change in a position of the electronic device is not equal to an amount of change in a position of the virtual object.
16. A storage medium in which a computer program is stored which, when being executed by a processor, is operative to carry out the method of any one of claims 1-15.
17. An electronic device comprising a processor and a memory, the memory having stored therein a computer program which, when executed by the processor, is operable to carry out the method of any of claims 1-15.
CN201911322368.9A 2019-12-20 2019-12-20 Method and electronic device for setting spatial position of virtual object Pending CN113012214A (en)

Priority Applications (3)

Application Number Priority Date Filing Date Title
CN201911322368.9A CN113012214A (en) 2019-12-20 2019-12-20 Method and electronic device for setting spatial position of virtual object
PCT/CN2020/134218 WO2021121061A1 (en) 2019-12-20 2020-12-07 Method for configuring spatial position of virtual object, and electronic device
TW109144907A TWI777333B (en) 2019-12-20 2020-12-18 Method and electronic device for setting spatial positions of a virtual object

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201911322368.9A CN113012214A (en) 2019-12-20 2019-12-20 Method and electronic device for setting spatial position of virtual object

Publications (1)

Publication Number Publication Date
CN113012214A true CN113012214A (en) 2021-06-22

Family

ID=76382113

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201911322368.9A Pending CN113012214A (en) 2019-12-20 2019-12-20 Method and electronic device for setting spatial position of virtual object

Country Status (3)

Country Link
CN (1) CN113012214A (en)
TW (1) TWI777333B (en)
WO (1) WO2021121061A1 (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2023142265A1 (en) * 2022-01-27 2023-08-03 歌尔股份有限公司 Information display method and apparatus, device, and storage medium

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20140149903A1 (en) * 2012-11-28 2014-05-29 Samsung Electronics Co., Ltd. Method for providing user interface based on physical engine and an electronic device thereof
CN107861682A (en) * 2017-11-03 2018-03-30 网易(杭州)网络有限公司 The control method for movement and device of virtual objects
CN108520552A (en) * 2018-03-26 2018-09-11 广东欧珀移动通信有限公司 Image processing method, device, storage medium and electronic equipment
CN109782901A (en) * 2018-12-06 2019-05-21 网易(杭州)网络有限公司 Augmented reality exchange method, device, computer equipment and storage medium
CN110199245A (en) * 2017-01-23 2019-09-03 斯纳普公司 Three-dimension interaction system

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP5116424B2 (en) * 2007-10-09 2013-01-09 任天堂株式会社 GAME PROGRAM AND GAME DEVICE
WO2013093906A1 (en) * 2011-09-19 2013-06-27 Eyesight Mobile Technologies Ltd. Touch free interface for augmented reality systems
CN103391357A (en) * 2012-05-09 2013-11-13 北京千橡网景科技发展有限公司 Mobile-terminal-related method and device
CN108543309B (en) * 2018-04-03 2020-03-10 网易(杭州)网络有限公司 Method, device and terminal for controlling movement of virtual control object in augmented reality

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20140149903A1 (en) * 2012-11-28 2014-05-29 Samsung Electronics Co., Ltd. Method for providing user interface based on physical engine and an electronic device thereof
CN110199245A (en) * 2017-01-23 2019-09-03 斯纳普公司 Three-dimension interaction system
CN107861682A (en) * 2017-11-03 2018-03-30 网易(杭州)网络有限公司 The control method for movement and device of virtual objects
CN108520552A (en) * 2018-03-26 2018-09-11 广东欧珀移动通信有限公司 Image processing method, device, storage medium and electronic equipment
CN109782901A (en) * 2018-12-06 2019-05-21 网易(杭州)网络有限公司 Augmented reality exchange method, device, computer equipment and storage medium

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2023142265A1 (en) * 2022-01-27 2023-08-03 歌尔股份有限公司 Information display method and apparatus, device, and storage medium

Also Published As

Publication number Publication date
TWI777333B (en) 2022-09-11
WO2021121061A1 (en) 2021-06-24
TW202125203A (en) 2021-07-01

Similar Documents

Publication Publication Date Title
US11663785B2 (en) Augmented and virtual reality
KR101433305B1 (en) Mobile device based content mapping for augmented reality environment
KR20220035380A (en) System and method for augmented reality scenes
JP6048898B2 (en) Information display device, information display method, and information display program
US20200264695A1 (en) A cloud-based system and method for creating a virtual tour
CN103426202A (en) Display system and display method for three-dimensional panoramic interactive mobile terminal
CN109189302B (en) Control method and device of AR virtual model
US11044398B2 (en) Panoramic light field capture, processing, and display
JP2021128743A (en) Method for augmented reality application of adding note and interface to control panel and screen
EP3819752A1 (en) Personalized scene image processing method and apparatus, and storage medium
Rumiński et al. Creation of interactive AR content on mobile devices
CN110544315B (en) Virtual object control method and related equipment
JP2006039872A (en) Information processing method and information processor
CN104331241A (en) Panoramic interaction mobile terminal displaying system and method
CN112099681B (en) Interaction method and device based on three-dimensional scene application and computer equipment
CN113012214A (en) Method and electronic device for setting spatial position of virtual object
JP2008219390A (en) Image reader
US20120265516A1 (en) Peripheral device simulation
JP2018097645A (en) Information processing apparatus, information processing system, control methods therefor, and program
CN112037227A (en) Video shooting method, device, equipment and storage medium
CN113010005A (en) Method and electronic device for setting position of virtual object in space
US20230405475A1 (en) Shooting method, apparatus, device and medium based on virtual reality space
US11948257B2 (en) Systems and methods for augmented reality video generation
Xiu et al. The Research and Realization of Public Safety Orientated Panoramic Video Hotspot Interaction Technique
CN117640919A (en) Picture display method, device, equipment and medium based on virtual reality space

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
TA01 Transfer of patent application right
TA01 Transfer of patent application right

Effective date of registration: 20230804

Address after: B708, Tiandao United Building, Building 1, No. 35 Jinghai Fourth Road, Daxing District Economic and Technological Development Zone, Beijing, 100023

Applicant after: Beijing Yimu Technology Co.,Ltd.

Address before: 100176 room 801, 8 / F, block B, AVIC Plaza, 15 ronghua South Road, Yizhuang Economic and Technological Development Zone, Daxing District, Beijing

Applicant before: BEIJING WHYHOW INFORMATION TECHNOLOGY Co.,Ltd.