WO2020029556A1 - Plane adaptation method and device, and computer readable storage medium - Google Patents

Plane adaptation method and device, and computer readable storage medium Download PDF

Info

Publication number
WO2020029556A1
WO2020029556A1 PCT/CN2019/073080 CN2019073080W WO2020029556A1 WO 2020029556 A1 WO2020029556 A1 WO 2020029556A1 CN 2019073080 W CN2019073080 W CN 2019073080W WO 2020029556 A1 WO2020029556 A1 WO 2020029556A1
Authority
WO
WIPO (PCT)
Prior art keywords
plane
virtual object
target
terminal screen
adaptive
Prior art date
Application number
PCT/CN2019/073080
Other languages
French (fr)
Chinese (zh)
Inventor
刘昂
陈怡�
Original Assignee
北京微播视界科技有限公司
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 北京微播视界科技有限公司 filed Critical 北京微播视界科技有限公司
Publication of WO2020029556A1 publication Critical patent/WO2020029556A1/en

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T19/00Manipulating 3D models or images for computer graphics
    • G06T19/006Mixed reality
    • 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
    • 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

Definitions

  • the present disclosure relates to the field of information technology, and in particular, to a method, an apparatus, and a computer-readable storage medium for an adaptive plane.
  • Augmented Reality is a technology that calculates the position and angle of the camera image in real time and adds the corresponding images, videos, and virtual objects.
  • the goal of this technology is to put the virtual world on the screen. Real world and interact.
  • the implementation method of augmented reality technology is to put a virtual object in a real scene, that is, a real environment and a virtual object are superimposed on the same screen or space in real time. After superimposing, the virtual object will move according to a predetermined motion trajectory, or control the virtual object to perform a predetermined action through controls.
  • virtual objects are usually placed on a plane in a real scene, such as on a desktop or a wall.
  • the placed virtual objects can be controlled to move between multiple planes.
  • the plane angle is different due to different planes, such as moving from the desktop to the wall.
  • the virtual object is either suspended or kept on the desktop (vertical to the desktop).
  • the virtual cylindrical object was originally placed on a horizontal plane, and then moved from the horizontal plane to another vertical plane, but after moving out of the horizontal plane, the virtual cylindrical object is still Keeping the previous posture and the size has not changed, it can be seen from the figure that the virtual cylindrical object is not correctly placed on the vertical plane, which affects the display effect.
  • the technical problem solved by the present disclosure is to provide an adaptive plane method to at least partially solve the technical problem of how to improve the display effect of a virtual object on a terminal.
  • an adaptive plane device an adaptive plane hardware device, a computer-readable storage medium, and an adaptive plane terminal are also provided.
  • An adaptive plane method includes:
  • the virtual object is displayed on a terminal screen, and the displayed virtual object is adapted to the target plane.
  • the step of adjusting the placement posture of the virtual object according to the direction includes:
  • the method further includes:
  • the method further includes:
  • a plane is selected from the identified planes as the target plane.
  • the step of selecting a plane from the identified planes as the target plane includes:
  • the selected plane is used as the target plane.
  • the method further includes:
  • the step of adjusting the placement posture of the virtual object according to the direction further includes:
  • the step of determining a target position according to the target display position and the target plane includes:
  • An intersection of the line and the target plane is used as the target position.
  • the line is perpendicular to a plane on which the terminal screen is located.
  • the step of determining a target display position of the virtual object on a terminal screen includes:
  • the target display position to receive the input.
  • the step of determining a target plane of the virtual object in the real scene includes:
  • a plane is selected from the identified planes as the target plane.
  • the step of selecting a plane from the identified planes as the target plane includes:
  • the selected plane is used as the target plane.
  • the step of determining a target position of a virtual object in a real scene includes:
  • the step of adjusting the placement posture of the virtual object according to the direction further includes:
  • the step of determining the target position according to the target display position and the target plane includes:
  • An intersection of the line and the target plane is used as the target position.
  • the line is perpendicular to a plane on which the terminal screen is located.
  • the step of determining a target display position of the virtual object on a terminal screen includes:
  • the target display position to receive the input.
  • An adaptive plane device includes:
  • a plane direction determining module configured to determine a direction of a target plane of a virtual object in a real scene
  • An attitude adjustment module is configured to adjust the placement posture of the virtual object according to the direction, and display the virtual object on a terminal screen, and the displayed virtual object is adapted to the target plane.
  • attitude adjustment module is specifically configured to:
  • the device further includes:
  • a control movement module configured to control the virtual object to move on an initial plane
  • a position determination module is configured to, if it is determined that the position of the virtual object exceeds the initial plane, trigger an operation of determining a direction of a target plane of the virtual object in a real scene.
  • the device further includes:
  • a plane identification module is configured to identify a plurality of planes included in the real scene; and select one plane from the identified planes as the target plane.
  • plane identification module is specifically configured to:
  • the device further includes:
  • a target position determining module configured to determine a target display position of the virtual object on a terminal screen; determine a target position according to the target display position and the target plane;
  • the attitude adjustment module is specifically configured to:
  • target position determination module is specifically configured to:
  • the line is perpendicular to a plane on which the terminal screen is located.
  • target position determination module is specifically configured to:
  • the target display position to receive the input.
  • An adaptive plane hardware device includes:
  • Memory for storing non-transitory computer-readable instructions
  • a processor configured to run the computer-readable instructions, so that the processor, when executed, implements the steps described in any one of the foregoing technical solutions of the adaptive plane.
  • a computer-readable storage medium is configured to store non-transitory computer-readable instructions, and when the non-transitory computer-readable instructions are executed by a computer, cause the computer to execute any one of the foregoing adaptive plane method technical solutions Described steps.
  • An adaptive plane terminal includes any of the foregoing adaptive plane devices.
  • Embodiments of the present disclosure provide an adaptive plane method, an adaptive plane device, an adaptive plane hardware device, a computer-readable storage medium, and an adaptive plane terminal.
  • the adaptive plane method includes determining a direction of a target plane of a virtual object in a real scene; adjusting a placement posture of the virtual object according to the direction, and displaying the virtual object on a terminal screen, and displaying the virtual object.
  • the virtual object is adapted to the target plane.
  • the embodiment of the present disclosure first determines the direction of a target plane of a virtual object in a real scene, and then adjusts the posture of the virtual object according to the direction, and displays the virtual object on a terminal screen, and the displayed all
  • the virtual object is adapted to the target plane, which can avoid the situation where the virtual object is suspended in the plane or the posture of the plane is incorrect when moving, and improve the display effect of the terminal.
  • FIG. 1 is a schematic diagram of a posture for controlling a virtual object to reach a target plane according to the prior art
  • FIG. 2a is a schematic flowchart of a method for adaptive plane according to an embodiment of the present disclosure
  • 2b is a schematic diagram of controlling a placement posture of a virtual object to a target plane in a method of adaptive plane according to an embodiment of the present disclosure
  • 2c is a schematic flowchart of a method for adaptive plane according to another embodiment of the present disclosure.
  • 2d is a schematic flowchart of a method for adaptive plane according to another embodiment of the present disclosure.
  • FIG. 2e is a schematic diagram of a plane selection state in the method for adaptive plane according to the embodiment shown in FIG. 2a;
  • FIG. 2f is a schematic diagram of a selected plane state in the method for adaptive plane according to the embodiment shown in FIG. 2a;
  • FIG. 3a is a schematic structural diagram of an adaptive plane device according to an embodiment of the present disclosure.
  • 3b is a schematic structural diagram of an adaptive plane device according to another embodiment of the present disclosure.
  • FIG. 4 is a schematic structural diagram of a hardware device of an adaptive plane according to an embodiment of the present disclosure
  • FIG. 5 is a schematic structural diagram of a computer-readable storage medium according to an embodiment of the present disclosure.
  • FIG. 6 is a schematic structural diagram of an adaptive plane terminal according to an embodiment of the present disclosure.
  • the adaptive plane method mainly includes the following steps S1 to S2. among them:
  • Step S1 Determine the direction of the target plane of the virtual object in the real scene.
  • the execution subject of this embodiment may be an adaptive plane device provided by an embodiment of the present disclosure, or an adaptive plane hardware device provided by an embodiment of the present disclosure, or an adaptive plane terminal provided by an embodiment of the present disclosure.
  • the virtual object may be a three-dimensional model of the real object in the scene.
  • the target plane is a plane to which a virtual object is to be moved in a real scene
  • the plane is a surface of an entity located in the real scene, and may be, for example, but not limited to, a desktop or a wall.
  • the direction of the target plane can be determined according to the coordinate axis of any direction in the three-dimensional space where the virtual object is located. For example, if the x-axis of the three-dimensional coordinates is used as a reference, the orientation of the target plane can be determined by calculating the angle between the target plane and the x-axis. For example, if the angle is 0, it is determined that the target plane is parallel to the x-axis. If the included angle is an angle greater than 0 and less than 90 degrees, it is determined that the target plane is inclined by a preset angle with respect to the x axis, and if the included angle is 90 degrees, it is determined that the target plane is perpendicular to the x axis.
  • Step S2 Adjust the posture of the virtual object according to the direction, display the virtual object on the terminal screen, and the displayed virtual object is adapted to the target plane.
  • the terminal may be, but is not limited to, a mobile terminal (for example, an iPhone, a smart phone, a tablet computer, etc.), or a fixed terminal (for example, a desktop computer).
  • the virtual object can be controlled to rotate and / or zoom, and the virtual object can be displayed on the terminal screen, and the displayed virtual object can be adapted to the target plane.
  • Figure 1 Take Figure 1 as an example. According to Figure 1, it can be seen that the virtual cylindrical object was originally placed vertically on a horizontal plane, and then moved to the target plane. As shown in Figure 1, the target plane is placed vertically, so the The virtual cylindrical object can be placed vertically on the vertical plane after being rotated by 90 degrees. The placement position of the virtual cylindrical object finally obtained is shown in FIG. 2b.
  • the displayed virtual object adapts
  • the target plane can avoid the situation where the virtual object is suspended in the plane or the posture is incorrect when the virtual object is moved, and improve the display effect of the terminal.
  • step S2 may include:
  • the initial position of the virtual cylindrical object is that the corresponding z-axis is perpendicular to the horizontal plane, and then it is moved to the target plane, as shown in FIG. 1.
  • the target plane is placed vertically, the direction of the corresponding plane has changed, and its corresponding z-axis is no longer perpendicular to the target plane. Therefore, the virtual cylindrical object's z-axis needs to be perpendicular to the target plane. It is placed vertically on the target plane, and the placement position of the virtual cylindrical object finally obtained is shown in FIG. 2b.
  • the method in the embodiment of the present disclosure further includes:
  • the initial plane can be selected by the user and is the plane on which the virtual object is initially placed.
  • the virtual screen can be controlled to move on the initial plane by controlling the terminal screen or the terminal.
  • the virtual screen can be controlled to move on the initial plane by controlling the terminal screen or the terminal.
  • the virtual object is always located in the center of the terminal screen, and the mobile terminal is equivalent to a mobile virtual model.
  • the edge contour position of the initial plane is recorded in advance, and then it is determined whether the position of the virtual object completely exceeds the initial plane. Specifically, it can be implemented by using the recognition method of the extended plane edge contour in the prior art, for example, using feature points or using texture to identify. Once it is determined that the position of the virtual object exceeds the initial plane, the direction of the target plane is determined.
  • This embodiment adopts the above technical solution, and determines whether the position of the virtual object exceeds the initial plane. If the position of the virtual object exceeds the initial plane, the operation of determining the direction of the target plane of the virtual object in the real scene is triggered, and then the virtual object is adjusted according to the direction. Placing a posture and displaying the virtual object on the terminal screen, and the displayed virtual object adapts to the target plane, can avoid the virtual object floating on the plane or the posture of the plane is incorrect when moving, and improve the display effect of the terminal.
  • the method in this embodiment may further include a step of determining a target plane:
  • a real scene may include one or more planes.
  • Corresponding algorithms are needed to identify the planes contained in the real scene. This step can be implemented using existing technologies, for example, real-time positioning and map construction (simultaneous localization and mapping) (SLAM) algorithms, which are not repeated here.
  • SLAM real-time positioning and map construction
  • this step can be implemented in the following two ways:
  • a plane is automatically selected as the target plane, that is, a plane is automatically selected as the target plane from the identified planes.
  • the user selects the target plane, that is, the identified plane is displayed on the terminal screen, and the identified plane is selected; the selected plane is used as the target plane. That is, the user can select the plane by clicking or double-clicking or other preset actions, and use the plane selected by the user as the target plane.
  • planes 1 to 3 in the recognized real scene are sequentially displayed on the terminal screen. If the user wants to display the virtual object on the plane 1, they only need to order on the terminal screen. Click or double-click on plane 1 to complete the selection operation.
  • plane 1 is displayed on the terminal screen according to its placement position in the display scene, as shown in FIG. 2f. The process of determining the initial plane is similar to that of the target plane, and is not repeated here.
  • the method in the embodiment of the present disclosure further includes:
  • S17 determine the target display position of the virtual object on the terminal screen
  • the terminal may be, but is not limited to, a mobile terminal (for example, an iPhone, a smart phone, a tablet computer, etc.), or a fixed terminal (for example, a desktop computer).
  • a mobile terminal for example, an iPhone, a smart phone, a tablet computer, etc.
  • a fixed terminal for example, a desktop computer
  • the target display position is the display position of the virtual object on the terminal screen.
  • step S2 specifically includes:
  • Control the virtual object to move to the target position adjust the placement posture of the virtual object according to the direction, and display the virtual object on the terminal screen, and the displayed virtual object adapts to the target plane.
  • the target display position can be obtained in the following two ways: the first method: the trigger response generated on the screen of the terminal is detected, and the generation position of the trigger response is used as the target display position.
  • the trigger response is a response generated by a trigger operation acting on the terminal screen, and may be, but is not limited to, a click response, a double-click response, or a detected preset gesture action generated for the terminal screen.
  • the location where the trigger response is generated is a point on the corresponding plane of the terminal screen, which can be specifically determined by a sensor arranged on the terminal screen.
  • the user wants to change the display position of the virtual object on the terminal screen, the user needs to perform operations on the terminal screen, for example, by clicking, or double-clicking, or making a preset gesture on the terminal screen to determine the virtual object A display position.
  • a trigger response is generated.
  • the generation position of the trigger response is the display position where the user wants to move the virtual object, and the display position is not the target position of the virtual object in the real scene.
  • the trigger response determines the target position of the virtual object in the real scene, so that the display position of the virtual object on the terminal screen can be accurately located.
  • the second way is to receive the input target display position.
  • the user can input the target display position through the terminal. Since the user's trigger operation on the terminal screen is often a trigger area, it is difficult to locate to a point, and the target position can be accurately located to the point. Compared with the trigger operation of the user on the terminal screen, the embodiment can more accurately locate the position of the virtual object and further improve the display effect of the terminal.
  • step S18 may include:
  • the line may be a straight line, a ray, or a line segment.
  • the line is perpendicular to the plane where the terminal screen is located.
  • the following is a device embodiment of the present disclosure.
  • the device embodiment of the present disclosure can be used to perform the steps implemented by the method embodiments of the present disclosure.
  • Only parts related to the embodiments of the present disclosure are shown. Specific technical details are not disclosed. Reference is made to the method embodiments of the present disclosure.
  • an embodiment of the present disclosure provides an adaptive plane device.
  • the apparatus may perform the steps in the foregoing embodiment of the adaptive plane method.
  • the device mainly includes: a plane direction determination module 21 and an attitude adjustment module 22; wherein the plane direction determination module 21 is used to determine the direction of a target plane of a virtual object in a real scene; The posture of the virtual object is adjusted according to the direction, and the virtual object is displayed on the terminal screen, and the displayed virtual object is adapted to the target plane.
  • the virtual object may be a three-dimensional model of the real object in the scene.
  • the target plane is a plane to which a virtual object is to be moved in a real scene
  • the plane is a surface of an entity located in the real scene, and may be, for example, but not limited to, a desktop or a wall.
  • the direction of the target plane can be determined according to the coordinate axis of any direction in the three-dimensional space where the virtual object is located. For example, if the x-axis of the three-dimensional coordinates is used as a reference, the orientation of the target plane can be determined by calculating the angle between the target plane and the x-axis. For example, if the angle is 0, it is determined that the target plane is parallel to the x-axis. If the included angle is an angle greater than 0 and less than 90 degrees, it is determined that the target plane is inclined by a preset angle with respect to the x axis, and if the included angle is 90 degrees, it is determined that the target plane is perpendicular to the x axis.
  • the terminal may be, but is not limited to, a mobile terminal (for example, an iPhone, a smart phone, a tablet computer, etc.), or a fixed terminal (for example, a desktop computer).
  • a mobile terminal for example, an iPhone, a smart phone, a tablet computer, etc.
  • a fixed terminal for example, a desktop computer
  • the attitude adjustment module 22 may control the rotation and / or scaling of the virtual object, and display the virtual object on the terminal screen, and the displayed virtual object adapts to the target plane.
  • Figure 1 it can be seen that the virtual cylindrical object was originally placed vertically on a horizontal plane, and then moved to the target plane. As shown in Figure 1, the target plane is placed vertically, so the The virtual cylindrical object can be placed vertically on the vertical plane after being rotated by 90 degrees. The placement position of the virtual cylindrical object finally obtained is shown in FIG. 2b.
  • the plane direction determination module 21 determines the direction of the target plane of the virtual object in the real scene, and then uses the attitude adjustment module 22 to adjust the posture of the virtual object according to the direction, and displays the virtual object on the terminal screen.
  • the virtual object is displayed on the screen, and the displayed virtual object is adapted to the target plane, which can prevent the virtual object from floating on the plane or the posture of the plane is incorrect when moving, and improve the display effect of the terminal.
  • the attitude adjustment module 22 is specifically configured to:
  • the initial position of the virtual cylindrical object is that the corresponding z-axis is perpendicular to the horizontal plane, and then it is moved to the target plane, as shown in FIG. 1.
  • the target plane is placed vertically, the direction of the corresponding plane has changed, and its corresponding z-axis is no longer perpendicular to the target plane. Therefore, the virtual cylindrical object's z-axis needs to be perpendicular to the target plane. It is placed vertically on the target plane, and the placement position of the virtual cylindrical object finally obtained is shown in FIG. 2b.
  • the device further includes: a control movement module 23 and a position determination module 24; wherein the control movement module 23 is used to control the movement of the virtual object on the initial plane; the position determination module 24 is used If it is determined that the position of the virtual object exceeds the initial plane, an operation for determining the direction of the target plane of the virtual object in the real scene is triggered.
  • the initial plane can be selected by the user and is the plane on which the virtual object is initially placed.
  • control movement module 23 can control the movement of the virtual object on the initial plane by controlling the terminal screen or the terminal.
  • the control movement module 23 can control the movement of the virtual object on the initial plane by controlling the terminal screen or the terminal.
  • the virtual object is always located in the center of the terminal screen, and the mobile terminal is equivalent to a mobile virtual model.
  • the position determination module 24 may record the edge contour position of the initial plane in advance, and then determine whether the position of the virtual object completely exceeds the initial plane. Specifically, it can be implemented by using the recognition method of the extended plane edge contour in the prior art, for example, using feature points or using texture to identify. Once it is determined that the position of the virtual object exceeds the initial plane, the direction of the target plane is determined.
  • the device further includes: a plane identification module; the plane identification module is used to identify a plane included in the real scene; and a plane is selected from the identified planes as a target plane.
  • a real scene may include one or more planes.
  • Corresponding algorithms are required to identify the planes contained in the real scene. This step can be implemented using existing technologies, for example, real-time positioning and map construction (simultaneous localization and mapping) (SLAM) algorithms, which are not repeated here.
  • SLAM real-time positioning and map construction
  • the plane identification module can be implemented in the following two ways:
  • a plane is automatically selected as the target plane, that is, a plane is automatically selected as the target plane from the identified planes.
  • the user selects the target plane, that is, the identified plane is displayed on the terminal screen, and the identified plane is selected; the selected plane is used as the target plane. That is, the user can select the plane by clicking or double-clicking or other preset actions, and use the plane selected by the user as the target plane.
  • the plane recognition module sequentially displays the plane 1-plane 3 in the recognized real scene on the terminal screen. If the user wants to display the virtual object on the plane 1, it only needs to be displayed on the terminal. Click or double-click plane 1 on the screen to complete the selected operation. When plane 1 is selected, it is displayed on the terminal screen according to its placement position in the display scene, as shown in FIG. 2f.
  • the process of determining the initial plane is similar to that of the target plane, and is not repeated here.
  • the device further includes: a target position determination module for determining a target display position of the virtual object on the terminal screen; determining the target position according to the target display position and the target plane; correspondingly
  • the posture adjustment module 22 is specifically configured to control the virtual object to move to the target position, adjust the placement posture of the virtual object according to the direction, and display the virtual object on the terminal screen, and the displayed virtual object adapts Target plane.
  • the terminal may be, but is not limited to, a mobile terminal (for example, an iPhone, a smart phone, a tablet computer, etc.), or a fixed terminal (for example, a desktop computer).
  • a mobile terminal for example, an iPhone, a smart phone, a tablet computer, etc.
  • a fixed terminal for example, a desktop computer
  • the target display position is the display position of the virtual object on the terminal screen.
  • the attitude adjustment module 22 is specifically configured to control the virtual object to move to the target position, adjust the placement posture of the virtual object according to the direction, display the virtual object on the terminal screen, and the displayed virtual object adapts to the target plane.
  • the target position determination module is specifically configured to detect a trigger response generated on the screen of the terminal, and use the generation position of the trigger response as a target display position.
  • the trigger response is a response generated by a trigger operation acting on the terminal screen, and may be, but is not limited to, a click response, a double-click response, or a preset gesture gesture detected for the terminal screen.
  • the location where the trigger response is generated is a point on the corresponding plane of the terminal screen, which can be specifically determined by a sensor arranged on the terminal screen.
  • the user wants to change the display position of the virtual object on the terminal screen, the user needs to perform operations on the terminal screen, for example, by clicking, or double-clicking, or making a preset gesture on the terminal screen to determine the virtual object A display position.
  • a trigger response is generated.
  • the generation position of the trigger response is the display position where the user wants to move the virtual object, and the display position is not the target position of the virtual object in the real scene.
  • the trigger response determines the target position of the virtual object in the real scene, so that the display position of the virtual object on the terminal screen can be accurately located.
  • the target position determination module is specifically configured to receive an input target display position.
  • the user can input the target display position through the terminal. Since the user's trigger operation on the terminal screen is often a trigger area, it is difficult to locate to a point, and the target position can be accurately located to the point. Compared with the trigger operation of the user on the terminal screen, the embodiment can more accurately locate the position of the virtual object and further improve the display effect of the terminal.
  • the target position determination module is specifically configured to: obtain a line passing through a point at which the target display position is located; and use the intersection of the line and the target plane as the target position.
  • the line is perpendicular to the plane where the terminal screen is located.
  • FIG. 4 is a hardware block diagram illustrating a hardware device of an adaptive plane according to an embodiment of the present disclosure.
  • an adaptive plane hardware device 30 according to an embodiment of the present disclosure includes a memory 31 and a processor 32.
  • the memory 31 is configured to store non-transitory computer-readable instructions.
  • the memory 31 may include one or more computer program products, which may include various forms of computer-readable storage media, such as volatile memory and / or non-volatile memory.
  • the volatile memory may include, for example, a random access memory (RAM) and / or a cache memory.
  • the non-volatile memory may include, for example, a read-only memory (ROM), a hard disk, a flash memory, and the like.
  • the processor 32 may be a central processing unit (CPU) or other form of processing unit having data processing capabilities and / or instruction execution capabilities, and may control other components in the hardware device 30 of the adaptive plane to perform desired functions.
  • the processor 32 is configured to run the computer-readable instructions stored in the memory 31, so that the hardware device 30 of the adaptive plane executes the aforementioned adaptive plane of the embodiments of the present disclosure. All or part of the steps of a method.
  • this embodiment may also include well-known structures such as a communication bus and an interface. These well-known structures should also be included in the protection scope of the present disclosure. within.
  • FIG. 5 is a schematic diagram illustrating a computer-readable storage medium according to an embodiment of the present disclosure.
  • a computer-readable storage medium 40 according to an embodiment of the present disclosure stores non-transitory computer-readable instructions 41 thereon.
  • the non-transitory computer-readable instruction 41 is executed by a processor, all or part of the steps of the method for adaptive plane of the foregoing embodiments of the present disclosure are performed.
  • the computer-readable storage medium 40 includes, but is not limited to, optical storage media (for example, CD-ROM and DVD), magneto-optical storage media (for example, MO), magnetic storage media (for example, magnetic tape or mobile hard disk), Non-volatile memory rewritable media (for example: memory card) and media with built-in ROM (for example: ROM box).
  • optical storage media for example, CD-ROM and DVD
  • magneto-optical storage media for example, MO
  • magnetic storage media for example, magnetic tape or mobile hard disk
  • Non-volatile memory rewritable media for example: memory card
  • media with built-in ROM for example: ROM box
  • FIG. 6 is a schematic diagram illustrating a hardware structure of a terminal according to an embodiment of the present disclosure. As shown in FIG. 5, the adaptive plane terminal 50 includes the foregoing embodiment of the adaptive plane device.
  • the terminal may be implemented in various forms, and the terminal in the present disclosure may include, but is not limited to, such as a mobile phone, a smart phone, a notebook computer, a digital broadcast receiver, a PDA (personal digital assistant), a PAD (tablet computer), a PMP ( Portable multimedia players), navigation devices, on-board terminals, on-board display terminals, on-board electronic rear-view mirrors, and other mobile terminals, and fixed terminals such as digital TVs, desktop computers, and the like.
  • a mobile phone such as a mobile phone, a smart phone, a notebook computer, a digital broadcast receiver, a PDA (personal digital assistant), a PAD (tablet computer), a PMP ( Portable multimedia players), navigation devices, on-board terminals, on-board display terminals, on-board electronic rear-view mirrors, and other mobile terminals, and fixed terminals such as digital TVs, desktop computers, and the like.
  • PDA personal digital assistant
  • PAD tablet computer
  • PMP Portable multimedia players
  • navigation devices
  • the terminal may further include other components.
  • the adaptive plane terminal 50 may include a power supply unit 51, a wireless communication unit 52, an A / V (audio / video) input unit 53, a user input unit 54, a sensing unit 55, an interface unit 56, The controller 57, the output unit 58 and the memory 59 and so on.
  • FIG. 5 illustrates a terminal having various components, but it should be understood that it is not required to implement all the illustrated components, and more or fewer components may be implemented instead.
  • the wireless communication unit 52 allows radio communication between the terminal 50 and a wireless communication system or network.
  • the A / V input unit 53 is used to receive audio or video signals.
  • the user input unit 54 may generate key input data according to a command input by the user to control various operations of the terminal.
  • the sensing unit 55 detects the current state of the terminal 50, the position of the terminal 50, the presence or absence of a user's touch input to the terminal 50, the orientation of the terminal 50, the acceleration or deceleration movement and direction of the terminal 50, and the like, and generates a signal for controlling the terminal. 50 commands or signals for operation.
  • the interface unit 56 functions as an interface through which at least one external device can be connected to the terminal 50.
  • the output unit 58 is configured to provide an output signal in a visual, audio, and / or tactile manner.
  • the memory 59 may store software programs and the like for processing and control operations performed by the controller 55, or may temporarily store data that has been output or is to be output.
  • the memory 59 may include at least one type of storage medium.
  • the terminal 50 may cooperate with a network storage device that performs a storage function of the memory 59 through a network connection.
  • the controller 57 generally controls the overall operation of the terminal.
  • the controller 57 may include a multimedia module for reproducing or playing back multimedia data.
  • the controller 57 may perform a pattern recognition process to recognize a handwriting input or a picture drawing input performed on the touch screen as characters or images.
  • the power supply unit 51 receives external power or internal power under the control of the controller 57 and provides appropriate power required to operate each element and component.
  • Various embodiments of the adaptive plane approach proposed by the present disclosure may be implemented in a computer-readable medium using, for example, computer software, hardware, or any combination thereof.
  • various embodiments of the adaptive plane method proposed by the present disclosure can be implemented by using application-specific integrated circuits (ASICs), digital signal processors (DSPs), digital signal processing devices (DSPDs), (PLD), field programmable gate array (FPGA), processor, controller, microcontroller, microprocessor, electronic unit designed to perform the functions described herein, and in some cases,
  • Various embodiments of the adaptive plane method proposed by the present disclosure may be implemented in the controller 57.
  • various embodiments of the adaptive plane method proposed by the present disclosure may be implemented with separate software modules that allow performing at least one function or operation.
  • the software codes may be implemented by a software application (or program) written in any suitable programming language, and the software codes may be stored in the memory 59 and executed by the controller 57.
  • an "or” used in an enumeration of items beginning with “at least one” indicates a separate enumeration such that, for example, an "at least one of A, B, or C” enumeration means A or B or C, or AB or AC or BC, or ABC (ie A and B and C).
  • the word "exemplary” does not mean that the described example is preferred or better than other examples.
  • each component or each step can be disassembled and / or recombined.

Landscapes

  • Engineering & Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Human Computer Interaction (AREA)
  • Computer Graphics (AREA)
  • Computer Hardware Design (AREA)
  • Software Systems (AREA)
  • User Interface Of Digital Computer (AREA)

Abstract

A plane adaptation method, a plane adaptation device, a plane adaptation hardware device, and a computer readable storage medium. The plane adaptation method comprises: determining the direction of a virtual object in a target plane in a real scene (S1); and adjusting, according to the direction, a placement posture of the virtual object, and displaying the virtual object on a terminal screen, the displayed virtual object adapting to the target plane (S2). By means of said method, firstly a direction of a virtual object in a target plane in a real scene is determined, then a placement gesture of the virtual object is adjusted according to the direction, and the virtual object is displayed on a terminal screen, and the displayed virtual object adapts to the target plane, it is possible to avoid the situation in which a virtual object is suspended in a plane or is in an incorrect posture in a plane during movement, improving the display effect of a terminal.

Description

自适应平面的方法、装置和计算机可读存储介质Method, device and computer-readable storage medium for adaptive plane
交叉引用cross reference
本公开引用于2018年08月09日递交的名称为“自适应平面的方法、装置和计算机可读存储介质”的、申请号为201810900637.4的中国专利申请,其通过引用被全部并入本申请。The present disclosure refers to a Chinese patent application with the application number 201810900637.4, entitled "Method, Apparatus, and Computer-Readable Storage Medium for Adaptive Plane", filed on August 9, 2018, which is incorporated herein by reference in its entirety.
技术领域Technical field
本公开涉及一种信息技术领域,特别是涉及一种自适应平面的方法、装置和计算机可读存储介质。The present disclosure relates to the field of information technology, and in particular, to a method, an apparatus, and a computer-readable storage medium for an adaptive plane.
背景技术Background technique
增强现实技术(Augmented Reality,简称AR),是一种实时地计算摄影机影像的位置及角度并加上相应图像、视频、虚拟物体的技术,这种技术的目标是在屏幕上把虚拟世界套在现实世界并进行互动。Augmented Reality (AR) is a technology that calculates the position and angle of the camera image in real time and adds the corresponding images, videos, and virtual objects. The goal of this technology is to put the virtual world on the screen. Real world and interact.
增强现实技术实现方法为在现实场景中放入虚拟物体,即将真实的环境和虚拟的物体实时地叠加在同一个画面或空间。而叠加之后,该虚拟物体会按照预定的运动轨迹进行运动,或者通过控件控制虚拟物体进行预定动作。The implementation method of augmented reality technology is to put a virtual object in a real scene, that is, a real environment and a virtual object are superimposed on the same screen or space in real time. After superimposing, the virtual object will move according to a predetermined motion trajectory, or control the virtual object to perform a predetermined action through controls.
目前,在现有的增强现实场景下,虚拟物体通常被放置于真实场景中的平面上,比如放置于桌面上,或者墙面上,可以控制放置后的虚拟物体在多个平面间移动。但是在移动的时候,由于平面不同,其平面角度不同,比如从桌面上移动到墙面上,现有技术中,虚拟物体要么悬空、要么保持在桌面上时的姿态(与桌面垂直)。At present, in existing augmented reality scenes, virtual objects are usually placed on a plane in a real scene, such as on a desktop or a wall. The placed virtual objects can be controlled to move between multiple planes. However, when moving, the plane angle is different due to different planes, such as moving from the desktop to the wall. In the prior art, the virtual object is either suspended or kept on the desktop (vertical to the desktop).
例如,如图1所示,虚拟柱形物体原先被放置在一个水平平面上,之后从该水平平面移动到另一个竖直平面上,但是在移动出该水平平面之后,该虚拟柱形物体仍然保持之前的姿态,并且大小也没有变化,从图中可以看出该虚拟柱形物体并没有正确放置在垂直平面上,从而影响显示效果。For example, as shown in Figure 1, the virtual cylindrical object was originally placed on a horizontal plane, and then moved from the horizontal plane to another vertical plane, but after moving out of the horizontal plane, the virtual cylindrical object is still Keeping the previous posture and the size has not changed, it can be seen from the figure that the virtual cylindrical object is not correctly placed on the vertical plane, which affects the display effect.
发明内容Summary of the invention
本公开解决的技术问题是提供一种自适应平面的方法,以至少部分地解决如何提高虚拟物体在终端上的显示效果的技术问题。此外,还提供一种自适应平面的装置、自适应平面的硬件装置、计算机可读存储介质和自适应平面的终端。The technical problem solved by the present disclosure is to provide an adaptive plane method to at least partially solve the technical problem of how to improve the display effect of a virtual object on a terminal. In addition, an adaptive plane device, an adaptive plane hardware device, a computer-readable storage medium, and an adaptive plane terminal are also provided.
为了实现上述目的,根据本公开的一个方面,提供以下技术方案:To achieve the above objective, according to one aspect of the present disclosure, the following technical solutions are provided:
一种自适应平面的方法,包括:An adaptive plane method includes:
确定虚拟物体在现实场景中的目标平面的方向;Determine the direction of the target plane of the virtual object in the real scene;
根据所述方向调整所述虚拟物体的摆放姿态;并且Adjusting the placement posture of the virtual object according to the direction; and
在终端屏幕上显示所述虚拟物体,其中显示出来的所述虚拟物体适应所述目标平面。The virtual object is displayed on a terminal screen, and the displayed virtual object is adapted to the target plane.
进一步的,所述根据所述方向调整所述虚拟物体的摆放姿态的步骤,包括:Further, the step of adjusting the placement posture of the virtual object according to the direction includes:
确定所述虚拟物体在现实场景中的z轴;Determining a z-axis of the virtual object in a real scene;
调整所述虚拟物体的摆放姿态,使所述z轴垂直于所述目标平面,并在所述终端屏幕上显示所述虚拟物体,且显示出来的所述虚拟物体适应所述目标平面。Adjust the placement posture of the virtual object so that the z-axis is perpendicular to the target plane, and display the virtual object on the terminal screen, and the displayed virtual object adapts to the target plane.
进一步的,所述方法还包括:Further, the method further includes:
控制所述虚拟物体在初始平面上移动;Controlling the virtual object to move on the initial plane;
若判定所述虚拟物体的位置超出所述初始平面,则触发执行所述确定虚拟物体在现实场景中的目标平面的方向的操作。If it is determined that the position of the virtual object exceeds the initial plane, triggering the operation of determining the direction of the target plane of the virtual object in the real scene is triggered.
进一步的,所述方法还包括:Further, the method further includes:
识别所述现实场景中包含的多个平面;Identifying multiple planes included in the real scene;
从所述识别出的平面中选定一个平面作为所述目标平面。A plane is selected from the identified planes as the target plane.
进一步的,所述从所述识别出的平面中选定一个平面作为所述目标平面的步骤,包括:Further, the step of selecting a plane from the identified planes as the target plane includes:
在所述终端屏幕上显示所述识别出的平面,且使所述识别出的平面处于可选中状态;Displaying the identified plane on the terminal screen, and making the identified plane selectable;
将选中的平面作为所述目标平面。The selected plane is used as the target plane.
进一步的,所述方法还包括:Further, the method further includes:
确定所述虚拟物体在终端屏幕上的目标显示位置;Determining a target display position of the virtual object on a terminal screen;
根据所述目标显示位置和所述目标平面确定目标位置;Determining a target position according to the target display position and the target plane;
所述根据所述方向调整所述虚拟物体的摆放姿态的步骤还包括:The step of adjusting the placement posture of the virtual object according to the direction further includes:
控制所述虚拟物体移动至所述目标位置上,并根据所述方向调整所述虚拟物体的摆放姿态。Controlling the virtual object to move to the target position, and adjusting the placement posture of the virtual object according to the direction.
进一步的,所述根据所述目标显示位置和所述目标平面确定目标位置的步骤,包括:Further, the step of determining a target position according to the target display position and the target plane includes:
获取穿过所述目标显示位置所在点的线;Obtaining a line passing through a point at which the target display position is located;
将所述线与所述目标平面的交点作为所述目标位置。An intersection of the line and the target plane is used as the target position.
进一步的,所述线垂直于所述终端屏幕所在的平面。Further, the line is perpendicular to a plane on which the terminal screen is located.
进一步的,所述确定所述虚拟物体在终端屏幕上的目标显示位置的步骤,包括:Further, the step of determining a target display position of the virtual object on a terminal screen includes:
检测所述终端屏幕上产生的触发响应,将所述触发响应的产生位置作为所述目标显示位置;或者Detecting a trigger response generated on the terminal screen, and using the generation position of the trigger response as the target display position; or
接收输入的目标显示位置。The target display position to receive the input.
确定虚拟物体在现实场景中的目标平面及目标位置;Determine the target plane and target position of the virtual object in the real scene;
控制所述虚拟物体移动至所述目标位置,且使所述虚拟物体位于所述目标平面的表面。Controlling the virtual object to move to the target position, and positioning the virtual object on a surface of the target plane.
进一步的,所述确定所述虚拟物体在所述现实场景中的目标平面的步骤,包括:Further, the step of determining a target plane of the virtual object in the real scene includes:
识别所述现实场景中包含的多个平面;Identifying multiple planes included in the real scene;
从所述识别出的平面中选定一个平面作为所述目标平面。A plane is selected from the identified planes as the target plane.
进一步的,所述从所述识别出的平面中选定一个平面作为所述目标平面的步骤,包括:Further, the step of selecting a plane from the identified planes as the target plane includes:
在所述终端屏幕上显示所述识别出的平面,且使所述识别出的平面处于可选中状态;Displaying the identified plane on the terminal screen, and making the identified plane selectable;
将选中的平面作为所述目标平面。The selected plane is used as the target plane.
进一步的,所述确定虚拟物体在现实场景中的目标位置的步骤,包括:Further, the step of determining a target position of a virtual object in a real scene includes:
确定所述虚拟物体在终端屏幕上的目标显示位置;Determining a target display position of the virtual object on a terminal screen;
根据所述目标显示位置和所述目标平面确定所述目标位置;Determining the target position according to the target display position and the target plane;
所述根据所述方向调整所述虚拟物体的摆放姿态的步骤还包括:The step of adjusting the placement posture of the virtual object according to the direction further includes:
控制所述虚拟物体移动至所述目标位置上,并根据所述方向调整所述虚拟物体的摆放姿态。Controlling the virtual object to move to the target position, and adjusting the placement posture of the virtual object according to the direction.
进一步的,所述根据所述目标显示位置和所述目标平面确定所述目标位置的步骤,包括:Further, the step of determining the target position according to the target display position and the target plane includes:
获取穿过所述目标显示位置所在点的线;Obtaining a line passing through a point at which the target display position is located;
将所述线与所述目标平面的交点作为所述目标位置。An intersection of the line and the target plane is used as the target position.
进一步的,所述线垂直于所述终端屏幕所在的平面。Further, the line is perpendicular to a plane on which the terminal screen is located.
进一步的,所述确定所述虚拟物体在终端屏幕上的目标显示位置的步骤,包括:Further, the step of determining a target display position of the virtual object on a terminal screen includes:
检测所述终端屏幕上产生的第一触发响应,将所述第一触发响应的产生位置作为所述目标显示位置;或者Detecting a first trigger response generated on the terminal screen, and using the generation position of the first trigger response as the target display position; or
接收输入的目标显示位置。The target display position to receive the input.
为了实现上述目的,根据本公开的又一个方面,还提供以下技术方案:To achieve the above object, according to another aspect of the present disclosure, the following technical solutions are also provided:
一种自适应平面的装置,包括:An adaptive plane device includes:
平面方向确定模块,用于确定虚拟物体在现实场景中的目标平面的方向;A plane direction determining module, configured to determine a direction of a target plane of a virtual object in a real scene;
姿态调整模块,用于根据所述方向调整所述虚拟物体的摆放姿态,并在终端屏幕上显示所述虚拟物体,且显示出来的所述虚拟物体适应所述目标平面。An attitude adjustment module is configured to adjust the placement posture of the virtual object according to the direction, and display the virtual object on a terminal screen, and the displayed virtual object is adapted to the target plane.
进一步的,所述姿态调整模块具体用于:Further, the attitude adjustment module is specifically configured to:
确定所述虚拟物体在现实场景中的z轴;调整所述虚拟物体的摆放姿态,使所述z轴垂直于所述目标平面,并在所述终端屏幕上显示所述虚拟物体,且显示出来的所述虚拟物体适应所述目标平面。Determine the z-axis of the virtual object in a real scene; adjust the placement posture of the virtual object so that the z-axis is perpendicular to the target plane, and display the virtual object on the terminal screen, and display The virtual object that comes out is adapted to the target plane.
进一步的,所述装置还包括:Further, the device further includes:
控制移动模块,用于控制所述虚拟物体在初始平面上移动;A control movement module, configured to control the virtual object to move on an initial plane;
位置判定模块,用于若判定所述虚拟物体的位置超出所述初始平面,则触发执行所述确定虚拟物体在现实场景中的目标平面的方向的操作。A position determination module is configured to, if it is determined that the position of the virtual object exceeds the initial plane, trigger an operation of determining a direction of a target plane of the virtual object in a real scene.
进一步的,所述装置还包括:Further, the device further includes:
平面识别模块,用于识别所述现实场景中包含的多个平面;从所述识别出的平面中选定一个平面作为所述目标平面。A plane identification module is configured to identify a plurality of planes included in the real scene; and select one plane from the identified planes as the target plane.
进一步的,所述平面识别模块具体用于:Further, the plane identification module is specifically configured to:
在所述终端屏幕上显示所述识别出的平面,且使所述识别出的平面处于可选中状态;将选中的平面作为所述目标平面。Displaying the identified plane on the terminal screen and making the identified plane in a selectable state; using the selected plane as the target plane.
进一步的,所述装置还包括:Further, the device further includes:
目标位置确定模块,用于确定所述虚拟物体在终端屏幕上的目标显示位置;根据所述目标显示位置和所述目标平面确定目标位置;A target position determining module, configured to determine a target display position of the virtual object on a terminal screen; determine a target position according to the target display position and the target plane;
相应的,所述姿态调整模块具体用于:Accordingly, the attitude adjustment module is specifically configured to:
控制所述虚拟物体移动至所述目标位置上,并根据所述方向调整所述虚拟物体的摆放姿态,并在终端屏幕上显示所述虚拟物体,且显示出来的所述虚拟物体适应所述目标平面。Controlling the virtual object to move to the target position, adjusting the placement posture of the virtual object according to the direction, and displaying the virtual object on a terminal screen, and the displayed virtual object adapts to the Target plane.
进一步的,所述目标位置确定模块具体用于:Further, the target position determination module is specifically configured to:
获取穿过所述目标显示位置所在点的线;将所述线与所述目标平面的交点作为所述目标位置。Acquiring a line passing through a point at which the target display position is located; and taking an intersection point of the line and the target plane as the target position.
进一步的,所述线垂直于所述终端屏幕所在的平面。Further, the line is perpendicular to a plane on which the terminal screen is located.
进一步的,所述目标位置确定模块具体用于:Further, the target position determination module is specifically configured to:
检测所述终端屏幕上产生的触发响应,将所述触发响应的产生位置作为所述目标显示位置;或者Detecting a trigger response generated on the terminal screen, and using the generation position of the trigger response as the target display position; or
接收输入的目标显示位置。The target display position to receive the input.
为了实现上述目的,根据本公开的又一个方面,还提供以下技术方案:To achieve the above object, according to another aspect of the present disclosure, the following technical solutions are also provided:
一种自适应平面的硬件装置,包括:An adaptive plane hardware device includes:
存储器,用于存储非暂时性计算机可读指令;以及Memory for storing non-transitory computer-readable instructions; and
处理器,用于运行所述计算机可读指令,使得所述处理器执行时实现上述任一自适应平面的方法技术方案中所述的步骤。A processor, configured to run the computer-readable instructions, so that the processor, when executed, implements the steps described in any one of the foregoing technical solutions of the adaptive plane.
为了实现上述目的,根据本公开的又一个方面,还提供以下技术方案:To achieve the above object, according to another aspect of the present disclosure, the following technical solutions are also provided:
一种计算机可读存储介质,用于存储非暂时性计算机可读指令,当所述非暂时性计算机可读指令由计算机执行时,使得所述计算机执行上述任一自适应平面的方法技术方案中所述的步骤。A computer-readable storage medium is configured to store non-transitory computer-readable instructions, and when the non-transitory computer-readable instructions are executed by a computer, cause the computer to execute any one of the foregoing adaptive plane method technical solutions Described steps.
为了实现上述目的,根据本公开的又一个方面,还提供以下技术方案:To achieve the above object, according to another aspect of the present disclosure, the following technical solutions are also provided:
一种自适应平面的终端,包括上述任一自适应平面的装置。An adaptive plane terminal includes any of the foregoing adaptive plane devices.
本公开实施例提供一种自适应平面的方法、自适应平面的装置、自适应平面的硬件装置、计算机可读存储介质和自适应平面的终端。其中,该自适应平面的方法包括确定虚拟物体在现实场景中的目标平面的方向;根据所述方向调整所述虚拟物体的摆放姿态,并在终端屏幕上显示所述虚拟物体,且显示出来的所述虚拟物体适应所述目标平面。本公开实施例首先通过确定虚拟物体在现实场景中的目标平面的方向,然后根据所述方向调整所述虚拟物体的摆放姿态,并在终端屏幕上显示所述虚拟物体,且显示出来的所述虚拟物体适应所述目标平面,可以避免虚拟物体在移动时出现悬浮于平面或在平面姿态不正确的情况,提高终端的显示效果。Embodiments of the present disclosure provide an adaptive plane method, an adaptive plane device, an adaptive plane hardware device, a computer-readable storage medium, and an adaptive plane terminal. The adaptive plane method includes determining a direction of a target plane of a virtual object in a real scene; adjusting a placement posture of the virtual object according to the direction, and displaying the virtual object on a terminal screen, and displaying the virtual object. The virtual object is adapted to the target plane. The embodiment of the present disclosure first determines the direction of a target plane of a virtual object in a real scene, and then adjusts the posture of the virtual object according to the direction, and displays the virtual object on a terminal screen, and the displayed all The virtual object is adapted to the target plane, which can avoid the situation where the virtual object is suspended in the plane or the posture of the plane is incorrect when moving, and improve the display effect of the terminal.
上述说明仅是本公开技术方案的概述,为了能更清楚了解本公开的技术手段,而可依照说明书的内容予以实施,并且为让本公开的上述和其他目的、特征和优点能够更明显易懂,以下特举较佳实施例,并配合附图,详细说明如下。The above description is only an overview of the technical solutions of the present disclosure. In order to better understand the technical means of the present disclosure, it can be implemented in accordance with the contents of the description, and to make the above and other objects, features, and advantages of the present disclosure more obvious and understandable. The preferred embodiments are described below and described in detail with the accompanying drawings.
附图说明BRIEF DESCRIPTION OF THE DRAWINGS
图1为根据现有技术控制虚拟物体到达目标平面的摆放姿态示意图;FIG. 1 is a schematic diagram of a posture for controlling a virtual object to reach a target plane according to the prior art; FIG.
图2a为根据本公开一个实施例的自适应平面的方法的流程示意图;2a is a schematic flowchart of a method for adaptive plane according to an embodiment of the present disclosure;
图2b为根据本公开一个实施例的自适应平面的方法中的控制虚拟物体到达目标平面的摆放姿态的示意图;2b is a schematic diagram of controlling a placement posture of a virtual object to a target plane in a method of adaptive plane according to an embodiment of the present disclosure;
图2c为根据本公开另一个实施例的自适应平面的方法的流程示意图;2c is a schematic flowchart of a method for adaptive plane according to another embodiment of the present disclosure;
图2d为根据本公开另一个实施例的自适应平面的方法的流程示意图;2d is a schematic flowchart of a method for adaptive plane according to another embodiment of the present disclosure;
图2e为根据图2a所示实施例的自适应平面的方法中的平面可选中状态示意图;FIG. 2e is a schematic diagram of a plane selection state in the method for adaptive plane according to the embodiment shown in FIG. 2a;
图2f为根据图2a所示实施例的自适应平面的方法中的被选中的平面状态示意图;2f is a schematic diagram of a selected plane state in the method for adaptive plane according to the embodiment shown in FIG. 2a;
图3a为根据本公开一个实施例的自适应平面的装置的结构示意图;3a is a schematic structural diagram of an adaptive plane device according to an embodiment of the present disclosure;
图3b为根据本公开另一个实施例的自适应平面的装置的结构示意图;3b is a schematic structural diagram of an adaptive plane device according to another embodiment of the present disclosure;
图4为根据本公开一个实施例的自适应平面的硬件装置的结构示意图;4 is a schematic structural diagram of a hardware device of an adaptive plane according to an embodiment of the present disclosure;
图5为根据本公开一个实施例的计算机可读存储介质的结构示意图;5 is a schematic structural diagram of a computer-readable storage medium according to an embodiment of the present disclosure;
图6为根据本公开一个实施例的自适应平面的终端的结构示意图。FIG. 6 is a schematic structural diagram of an adaptive plane terminal according to an embodiment of the present disclosure.
具体实施方式detailed description
以下通过特定的具体实例说明本公开的实施方式,本领域技术人员可由本说明书所揭露的内容轻易地了解本公开的其他优点与功效。显然,所描述的实施例仅仅是本公开一部分实施例,而不是全部的实施例。本公开还可以通过另外不同的具体实施方式加以实施或应用,本说明书中的各项细节也可以基于不同观点与应用,在没有背离本公开的精神下进行各种修饰或改变。需说明的是,在不冲突的情况下,以下实施例及实施例中的特征可以相互组合。基于本公开中的实施例,本领域普通技术人员在没有做出创造性劳动前提下所获得的所有其他实施例,都属于本公开保护的范围。The embodiments of the present disclosure are described below through specific specific examples. Those skilled in the art can easily understand other advantages and effects of the present disclosure from the content disclosed in this specification. Obviously, the described embodiments are only a part of the embodiments of the present disclosure, but not all the embodiments. The present disclosure can also be implemented or applied through different specific implementations, and various details in this specification can also be modified or changed based on different viewpoints and applications without departing from the spirit of the present disclosure. It should be noted that, in the case of no conflict, the following embodiments and features in the embodiments can be combined with each other. Based on the embodiments in the present disclosure, all other embodiments obtained by a person having ordinary skill in the art without making creative efforts fall within the protection scope of the present disclosure.
需要说明的是,下文描述在所附权利要求书的范围内的实施例的各种方面。应显而易见,本文中所描述的方面可体现于广泛多种形式中,且本文中所描述的任何特定结构及/或功能仅为说明性的。基于本公开,所属领域的技术人员应了解,本文中所描述的一个方面可与任何其它方面独立地实施,且可以各种方式组合这些方面中的两者或两者以上。举例来说,可使用本文中所阐述的任何数目个方面来实施设备及/或实践方法。另外,可使用除了本文中所阐述的方面中的一或多者之外的其它结构及/或功能性实施此设备及/或实践此方法。It should be noted that various aspects of the embodiments within the scope of the appended claims are described below. It should be apparent that aspects described herein may be embodied in a wide variety of forms and that any specific structure and / or function described herein is merely illustrative. Based on the present disclosure, those skilled in the art should understand that one aspect described herein may be implemented independently of any other aspect, and that two or more of these aspects may be combined in various ways. For example, any number of the aspects set forth herein may be used to implement a device and / or a practice method. In addition, the apparatus and / or the method may be implemented using other structures and / or functionality than one or more of the aspects set forth herein.
还需要说明的是,以下实施例中所提供的图示仅以示意方式说明本公开的基本构想,图式中仅显示与本公开中有关的组件而非按照实际实施时的组件数目、形状及尺寸绘制,其实际实施时各组件的型态、数量及比例可为一种随意的改变,且其组件布局型态也可能更为复杂。It should also be noted that the illustrations provided in the following embodiments only illustrate the basic idea of the present disclosure in a schematic manner, and only the components related to the present disclosure are shown in the drawings instead of the number, shape and For size drawing, the type, quantity, and proportion of each component can be changed at will in actual implementation, and the component layout type may be more complicated.
另外,在以下描述中,提供具体细节是为了便于透彻理解实例。然而,所属领域的技术人员将理解,可在没有这些特定细节的情况下实践所述方面。In addition, in the following description, specific details are provided to facilitate a thorough understanding of the examples. However, those skilled in the art will understand that the described aspects may be practiced without these specific details.
为了解决如何提高用户体验效果的技术问题,本公开实施例提供一种自适应平面的方法。如图2a所示,该自适应平面的方法主要包括如下步骤S1至步骤S2。其中:In order to solve the technical problem of how to improve the user experience effect, an embodiment of the present disclosure provides an adaptive plane method. As shown in FIG. 2a, the adaptive plane method mainly includes the following steps S1 to S2. among them:
步骤S1:确定虚拟物体在现实场景中的目标平面的方向。Step S1: Determine the direction of the target plane of the virtual object in the real scene.
其中,本实施例的执行主体可选为本公开实施例提供的自适应平面的装置、或本公开实施例提供的自适应平面的硬件装置、或本公开实施例提供的自适应平面的终端。The execution subject of this embodiment may be an adaptive plane device provided by an embodiment of the present disclosure, or an adaptive plane hardware device provided by an embodiment of the present disclosure, or an adaptive plane terminal provided by an embodiment of the present disclosure.
其中,虚拟物体可选为现场场景中实物的三维模型。Among them, the virtual object may be a three-dimensional model of the real object in the scene.
其中,目标平面为虚拟物体在现实场景中即将移动到的平面,该平面为位于现实场景中的实体的表面,例如可以为但不限于为桌面或墙面。The target plane is a plane to which a virtual object is to be moved in a real scene, and the plane is a surface of an entity located in the real scene, and may be, for example, but not limited to, a desktop or a wall.
其中,目标平面的方向可以根据虚拟物体所在的三维空间的任意方向的坐标轴来确定。例如,如果以三维坐标的x轴为参照,则可通过计算该目标平面与x轴的夹角来确定目标平面的方位,例如,如果夹角为0,则确定该目标平面与x轴平行,如果夹角为大于0小于90度的角度,则确定该目标平面相对于x轴时倾斜预设角度,如果夹角为90度,则确定该目标平面与x轴垂直。The direction of the target plane can be determined according to the coordinate axis of any direction in the three-dimensional space where the virtual object is located. For example, if the x-axis of the three-dimensional coordinates is used as a reference, the orientation of the target plane can be determined by calculating the angle between the target plane and the x-axis. For example, if the angle is 0, it is determined that the target plane is parallel to the x-axis. If the included angle is an angle greater than 0 and less than 90 degrees, it is determined that the target plane is inclined by a preset angle with respect to the x axis, and if the included angle is 90 degrees, it is determined that the target plane is perpendicular to the x axis.
步骤S2:根据方向调整虚拟物体的摆放姿态,并在终端屏幕上显示虚拟物体,且显示出来的虚拟物体适应目标平面。Step S2: Adjust the posture of the virtual object according to the direction, display the virtual object on the terminal screen, and the displayed virtual object is adapted to the target plane.
其中,终端可以为但不限于为移动终端(例如,iPhone、智能手机、平板电脑等)、或固定终端(例如台式电脑)。具体的,可通过控制虚拟物体旋转和/或缩放,并将虚拟物体显示在终端屏幕上虚拟物体,且显示出来的虚拟物体适应该目标平面。以图1所示为例,通过图1可知,该虚拟柱形物体原先垂直放置于水平平面,后将其移动至目标平面,如图1可知,该目标平面是垂直放置的,因此需要将该虚拟柱形物体旋转90度才可将其垂直放置于该垂直平面上,最后得到的该虚拟柱形物体的放置位置如图2b所示。The terminal may be, but is not limited to, a mobile terminal (for example, an iPhone, a smart phone, a tablet computer, etc.), or a fixed terminal (for example, a desktop computer). Specifically, the virtual object can be controlled to rotate and / or zoom, and the virtual object can be displayed on the terminal screen, and the displayed virtual object can be adapted to the target plane. Take Figure 1 as an example. According to Figure 1, it can be seen that the virtual cylindrical object was originally placed vertically on a horizontal plane, and then moved to the target plane. As shown in Figure 1, the target plane is placed vertically, so the The virtual cylindrical object can be placed vertically on the vertical plane after being rotated by 90 degrees. The placement position of the virtual cylindrical object finally obtained is shown in FIG. 2b.
本实施例通过采取上述技术方案,通过确定虚拟物体在现实场景中的目标平面的方向,然后根据方向调整虚拟物体的摆放姿态,并在终端屏幕上显示虚拟物体,且显示出来的虚拟物体适应目标平面,可以避免虚拟物体在移动时出现悬浮于平面或在平面姿态不正确的情况,提高终端的显示效果。In this embodiment, by adopting the above technical solution, by determining the direction of the target plane of the virtual object in the real scene, and then adjusting the orientation of the virtual object according to the direction, and displaying the virtual object on the terminal screen, the displayed virtual object adapts The target plane can avoid the situation where the virtual object is suspended in the plane or the posture is incorrect when the virtual object is moved, and improve the display effect of the terminal.
在一个可选的实施例中,如图2c所示,步骤S2可以包括:In an optional embodiment, as shown in FIG. 2c, step S2 may include:
S21:确定虚拟物体在现实场景中的z轴。S21: Determine the z-axis of the virtual object in the real scene.
S22:调整虚拟物体的摆放姿态,使z轴垂直于目标平面,并在终端屏幕上显示虚拟物体,且显示出来的虚拟物体适应目标平面。S22: Adjust the posture of the virtual object so that the z-axis is perpendicular to the target plane, and display the virtual object on the terminal screen, and the displayed virtual object adapts to the target plane.
同样以如图1所示为例,通过图1可知,该虚拟柱形物体初始摆放姿态为,对应的z轴垂直于水平平面,后将其移动至目标平面,如图1可知,由于该目标平面是垂直放置的,对应的平面的方向发生了变化,其对应的z轴不再垂直于该目标平面,因此需要将该虚拟柱形物体z轴,使其垂直于该目标平面,才可将其垂直放置于该目标平面上,最后得到的该虚拟柱形物体的放置位置如图2b所示。As shown in FIG. 1 as an example, it can be seen from FIG. 1 that the initial position of the virtual cylindrical object is that the corresponding z-axis is perpendicular to the horizontal plane, and then it is moved to the target plane, as shown in FIG. 1. The target plane is placed vertically, the direction of the corresponding plane has changed, and its corresponding z-axis is no longer perpendicular to the target plane. Therefore, the virtual cylindrical object's z-axis needs to be perpendicular to the target plane. It is placed vertically on the target plane, and the placement position of the virtual cylindrical object finally obtained is shown in FIG. 2b.
在一个可选的实施例中,如图2d所示,本公开实施例的方法还包括:In an optional embodiment, as shown in FIG. 2d, the method in the embodiment of the present disclosure further includes:
S13:控制虚拟物体在初始平面上移动。S13: Control the virtual object to move on the initial plane.
其中,初始平面可以通过用户选定,为虚拟物体初始放置的平面。The initial plane can be selected by the user and is the plane on which the virtual object is initially placed.
具体的,可通过对终端屏幕或终端的控制,实现控制虚拟物体在初始平面上移动。例如,可以使用移动控件控制虚拟物体的移动,例如虚拟操纵按钮来实现虚拟物体的移动;也可以使用手指在终端屏幕上滑动控制虚拟物体的移动;也可以通过直接移动终端控制虚拟物体的移动,此时虚拟物体总是位于终端屏幕的中央,移动终端就相当于移动虚拟模型。Specifically, the virtual screen can be controlled to move on the initial plane by controlling the terminal screen or the terminal. For example, you can use mobile controls to control the movement of virtual objects, such as virtual manipulation buttons to achieve the movement of virtual objects; you can also use your fingers to slide on the terminal screen to control the movement of virtual objects; you can also control the movement of virtual objects by directly moving the terminal, At this time, the virtual object is always located in the center of the terminal screen, and the mobile terminal is equivalent to a mobile virtual model.
在虚拟物体移动过程中,可以不计算新的位置,只在平面上移动虚拟物体,此处的移动可以是跟上述的移动控件、手指移动或者终端移动成比例的在平面上移动;也可以直接计算新的位置,将虚拟物体移动至新的位置上。In the process of moving a virtual object, you can move the virtual object on the plane without calculating a new position. The movement here can be on the plane in proportion to the above-mentioned movement control, finger movement, or terminal movement; it can also be directly Calculate the new position and move the virtual object to the new position.
S14:若判定虚拟物体的位置超出初始平面,则触发执行确定虚拟物体在现实场景中的目标平面的方向的操作。S14: If it is determined that the position of the virtual object exceeds the initial plane, trigger an operation to determine the direction of the target plane of the virtual object in the real scene.
具体的,预先记录初始平面的边缘轮廓位置,进而判断虚拟物体的位置是否完全超出该初始平面。具体可采用现有技术中的扩展平面边缘轮廓的识别方法来实现,例如,利用特征点或者利用纹理来识别等。一旦判定虚拟物体的位置超出初始平面,则确定目标平面的方向。Specifically, the edge contour position of the initial plane is recorded in advance, and then it is determined whether the position of the virtual object completely exceeds the initial plane. Specifically, it can be implemented by using the recognition method of the extended plane edge contour in the prior art, for example, using feature points or using texture to identify. Once it is determined that the position of the virtual object exceeds the initial plane, the direction of the target plane is determined.
本实施例通过采取上述技术方案,通过判定虚拟物体的位置是否超出初始平面,若超出初始平面,则触发执行确定虚拟物体在现实场景中的目标平面的方向的操作,然后根据方向调整虚拟物体的摆放姿态,并在终端屏幕上显示虚拟物体,且显示出来的虚拟物体适应目标平面,可以避免虚拟物体在移动时出现悬浮于平面或在平面姿态不正确的情况,提高终端的显示效果。This embodiment adopts the above technical solution, and determines whether the position of the virtual object exceeds the initial plane. If the position of the virtual object exceeds the initial plane, the operation of determining the direction of the target plane of the virtual object in the real scene is triggered, and then the virtual object is adjusted according to the direction. Placing a posture and displaying the virtual object on the terminal screen, and the displayed virtual object adapts to the target plane, can avoid the virtual object floating on the plane or the posture of the plane is incorrect when moving, and improve the display effect of the terminal.
在一个可选的实施例中,本实施例的方法还可以包括确定目标平面的步骤:In an optional embodiment, the method in this embodiment may further include a step of determining a target plane:
S15:识别现实场景中包含的平面。S15: Identify the planes contained in the real scene.
其中,现实场景中可能包含一个或多个平面。需采用相应的算法才能识别出现实场景中包含的平面,该步骤可采用现有技术来实现,例如,即时定位与地图构建(simultaneous localization and mapping,SLAM)算法,这里不再赘述。Among them, a real scene may include one or more planes. Corresponding algorithms are needed to identify the planes contained in the real scene. This step can be implemented using existing technologies, for example, real-time positioning and map construction (simultaneous localization and mapping) (SLAM) algorithms, which are not repeated here.
S16:从识别出的平面中选定一个平面作为目标平面。S16: Select a plane from the identified planes as the target plane.
进一步,该步骤可采用如下两种方式实现:Further, this step can be implemented in the following two ways:
第一种方式,自动选定一个平面作为目标平面,即自动从识别出的平面中选定一个平面作为目标平面。In the first method, a plane is automatically selected as the target plane, that is, a plane is automatically selected as the target plane from the identified planes.
第二种方式,由用户选择目标平面,即在终端屏幕上显示识别出的平面,且使识别出的平面处于可选中状态;将选中的平面作为目标平面。也就是说,用户可通过点击或双击或其它预设动作选中平面,将用户选中的平面作为目标平面。In the second method, the user selects the target plane, that is, the identified plane is displayed on the terminal screen, and the identified plane is selected; the selected plane is used as the target plane. That is, the user can select the plane by clicking or double-clicking or other preset actions, and use the plane selected by the user as the target plane.
示例性的,如图2e所示,将识别出的现实场景中的平面1-平面3依次显示在终端屏幕上,如果用户想将虚拟物体显示在平面1上,则只需要在终端屏幕上单击或双击平面1,即可完成选中操作。当平面1被选中之后,则按照其在显示场景中的摆放位置显示在终端屏幕上,如图2f所示。其中,上述初始平面的确定过程与目标平面类似,这里不再赘赘述。Exemplarily, as shown in FIG. 2e, planes 1 to 3 in the recognized real scene are sequentially displayed on the terminal screen. If the user wants to display the virtual object on the plane 1, they only need to order on the terminal screen. Click or double-click on plane 1 to complete the selection operation. When plane 1 is selected, it is displayed on the terminal screen according to its placement position in the display scene, as shown in FIG. 2f. The process of determining the initial plane is similar to that of the target plane, and is not repeated here.
在一个可选的实施例中,本公开实施例的方法还包括:In an optional embodiment, the method in the embodiment of the present disclosure further includes:
S17:确定虚拟物体在终端屏幕上的目标显示位置;S17: determine the target display position of the virtual object on the terminal screen;
其中,终端可以为但不限于为移动终端(例如,iPhone、智能手机、平板电脑等)、或固定终端(例如台式电脑)。The terminal may be, but is not limited to, a mobile terminal (for example, an iPhone, a smart phone, a tablet computer, etc.), or a fixed terminal (for example, a desktop computer).
其中,目标显示位置为虚拟物体在终端屏幕上的显示位置。The target display position is the display position of the virtual object on the terminal screen.
S18:根据目标显示位置和目标平面确定目标位置;S18: Determine the target position according to the target display position and the target plane;
相应的,步骤S2具体包括:Accordingly, step S2 specifically includes:
控制虚拟物体移动至目标位置上,并根据方向调整虚拟物体的摆放姿态,并在终端屏幕上显示虚拟物体,且显示出来的虚拟物体适应目标平面。Control the virtual object to move to the target position, adjust the placement posture of the virtual object according to the direction, and display the virtual object on the terminal screen, and the displayed virtual object adapts to the target plane.
进一步的,步骤S17可采用如下两种方式获取目标显示位置:第一种方式:检测终端屏幕上产生的触发响应,将触发响应的产生位置作为目标显示位置。Further, in step S17, the target display position can be obtained in the following two ways: the first method: the trigger response generated on the screen of the terminal is detected, and the generation position of the trigger response is used as the target display position.
其中,触发响应为作用在终端屏幕上的触发操作所产生的响应,可以为但不限于为终端屏幕产生的点击响应、或双击响应、或检测到的预设手势动作。The trigger response is a response generated by a trigger operation acting on the terminal screen, and may be, but is not limited to, a click response, a double-click response, or a detected preset gesture action generated for the terminal screen.
其中,触发响应的产生位置为终端屏幕对应平面上的一个点,具体可通过布置于该终端屏幕上的传感器确定。The location where the trigger response is generated is a point on the corresponding plane of the terminal screen, which can be specifically determined by a sensor arranged on the terminal screen.
具体的,如果用户想要改变虚拟物体在终端屏幕的显示位置,则需要在终端屏幕上进行操作,例如,通过点击、或双击或在终端屏幕上做出预设手势动作来确定虚拟物体的下一个显示位置。终端屏幕接收到上述操作后会产生触发响应,该触发响应的产生位置即为用户想要将虚拟物体移动的显示位置,而该显示位置并不是虚拟物体在现实场景中的目标位置,因此需要根据该触发响应确定虚拟物体在现实场景中的目标位置,从而可以精确定位虚拟物体在终端屏幕上的显示位置。Specifically, if the user wants to change the display position of the virtual object on the terminal screen, the user needs to perform operations on the terminal screen, for example, by clicking, or double-clicking, or making a preset gesture on the terminal screen to determine the virtual object A display position. After the terminal screen receives the above operation, a trigger response is generated. The generation position of the trigger response is the display position where the user wants to move the virtual object, and the display position is not the target position of the virtual object in the real scene. The trigger response determines the target position of the virtual object in the real scene, so that the display position of the virtual object on the terminal screen can be accurately located.
第二种方式,接收输入的目标显示位置。The second way is to receive the input target display position.
具体的,用户可通过终端输入目标显示位置,由于用户在终端屏幕上的触发操作往往是一个触发区域,很难定位到一个点上,而通过输入目标位置的方式可以精确定位到点,因此本实施例相对于用户在终端屏幕上的触发操作,更能精确定位虚拟物体的位置,进一步提高终端显示效果。Specifically, the user can input the target display position through the terminal. Since the user's trigger operation on the terminal screen is often a trigger area, it is difficult to locate to a point, and the target position can be accurately located to the point. Compared with the trigger operation of the user on the terminal screen, the embodiment can more accurately locate the position of the virtual object and further improve the display effect of the terminal.
进一步的,步骤S18可以包括:Further, step S18 may include:
获取穿过目标显示位置所在点的线;Get the line passing through the point where the target display position is;
将线与目标平面的交点作为目标位置。Use the intersection of the line and the target plane as the target position.
其中,该线可以为直线、射线或线段。The line may be a straight line, a ray, or a line segment.
进一步的,线垂直于终端屏幕所在的平面。Further, the line is perpendicular to the plane where the terminal screen is located.
本领域技术人员应能理解,在上述各个实施例的基础上,还可以进行明显变型(例如,对所列举的模式进行组合)或等同替换。Those skilled in the art should understand that, on the basis of the foregoing embodiments, obvious modifications (for example, combining the listed modes) or equivalent replacements can also be performed.
在上文中,虽然按照上述的顺序描述了自适应平面的方法实施例中的各个步骤,本领域技术人员应清楚,本公开实施例中的步骤并不必然按照上述顺序执行,其也可以倒序、并行、交叉等其他顺序执行,而且,在上述步骤的基础上,本领域技术人员也可以再加入其他步骤,这些明显变型或等同替换的方式也应包含在本公开的保护范围之内,在此不再赘述。In the foregoing, although the steps in the method embodiment of the adaptive plane are described in the above order, those skilled in the art should understand that the steps in the embodiments of the present disclosure are not necessarily performed in the above order, and they may also be reversed, Parallel, cross, and other sequential executions, and on the basis of the above steps, those skilled in the art can also add other steps. These obvious variations or equivalent replacements should also be included in the scope of protection of the present disclosure. No longer.
下面为本公开装置实施例,本公开装置实施例可用于执行本公开方法实施例实现的步骤,为了便于说明,仅示出了与本公开实施例相关的部分, 具体技术细节未揭示的,请参照本公开方法实施例。The following is a device embodiment of the present disclosure. The device embodiment of the present disclosure can be used to perform the steps implemented by the method embodiments of the present disclosure. For convenience of explanation, only parts related to the embodiments of the present disclosure are shown. Specific technical details are not disclosed. Reference is made to the method embodiments of the present disclosure.
为了解决如何提高用户体验效果的技术问题,本公开实施例提供一种自适应平面的装置。该装置可以执行上述自适应平面的方法实施例中的步骤。如图3a所示,该装置主要包括:平面方向确定模块21和姿态调整模块22;其中,平面方向确定模块21用于确定虚拟物体在现实场景中的目标平面的方向;姿态调整模块22用于根据方向调整虚拟物体的摆放姿态,并在终端屏幕上显示所述虚拟物体,且显示出来的所述虚拟物体适应目标平面。In order to solve the technical problem of how to improve the user experience effect, an embodiment of the present disclosure provides an adaptive plane device. The apparatus may perform the steps in the foregoing embodiment of the adaptive plane method. As shown in FIG. 3a, the device mainly includes: a plane direction determination module 21 and an attitude adjustment module 22; wherein the plane direction determination module 21 is used to determine the direction of a target plane of a virtual object in a real scene; The posture of the virtual object is adjusted according to the direction, and the virtual object is displayed on the terminal screen, and the displayed virtual object is adapted to the target plane.
其中,虚拟物体可选为现场场景中实物的三维模型。Among them, the virtual object may be a three-dimensional model of the real object in the scene.
其中,目标平面为虚拟物体在现实场景中即将移动到的平面,该平面为位于现实场景中的实体的表面,例如可以为但不限于为桌面或墙面。The target plane is a plane to which a virtual object is to be moved in a real scene, and the plane is a surface of an entity located in the real scene, and may be, for example, but not limited to, a desktop or a wall.
其中,目标平面的方向可以根据虚拟物体所在的三维空间的任意方向的坐标轴来确定。例如,如果以三维坐标的x轴为参照,则可通过计算该目标平面与x轴的夹角来确定目标平面的方位,例如,如果夹角为0,则确定该目标平面与x轴平行,如果夹角为大于0小于90度的角度,则确定该目标平面相对于x轴时倾斜预设角度,如果夹角为90度,则确定该目标平面与x轴垂直。The direction of the target plane can be determined according to the coordinate axis of any direction in the three-dimensional space where the virtual object is located. For example, if the x-axis of the three-dimensional coordinates is used as a reference, the orientation of the target plane can be determined by calculating the angle between the target plane and the x-axis. For example, if the angle is 0, it is determined that the target plane is parallel to the x-axis. If the included angle is an angle greater than 0 and less than 90 degrees, it is determined that the target plane is inclined by a preset angle with respect to the x axis, and if the included angle is 90 degrees, it is determined that the target plane is perpendicular to the x axis.
其中,终端可以为但不限于为移动终端(例如,iPhone、智能手机、平板电脑等)、或固定终端(例如台式电脑)。The terminal may be, but is not limited to, a mobile terminal (for example, an iPhone, a smart phone, a tablet computer, etc.), or a fixed terminal (for example, a desktop computer).
具体的,姿态调整模块22可通过控制虚拟物体旋转和/或缩放,并将虚拟物体显示在终端屏幕上虚拟物体,且显示出来的虚拟物体适应该目标平面。以图1所示为例,通过图1可知,该虚拟柱形物体原先垂直放置于水平平面,后将其移动至目标平面,如图1可知,该目标平面是垂直放置的,因此需要将该虚拟柱形物体旋转90度才可将其垂直放置于该垂直平面上,最后得到的该虚拟柱形物体的放置位置如图2b所示。Specifically, the attitude adjustment module 22 may control the rotation and / or scaling of the virtual object, and display the virtual object on the terminal screen, and the displayed virtual object adapts to the target plane. Take Figure 1 as an example. According to Figure 1, it can be seen that the virtual cylindrical object was originally placed vertically on a horizontal plane, and then moved to the target plane. As shown in Figure 1, the target plane is placed vertically, so the The virtual cylindrical object can be placed vertically on the vertical plane after being rotated by 90 degrees. The placement position of the virtual cylindrical object finally obtained is shown in FIG. 2b.
本实施例通过采取上述技术方案,通过平面方向确定模块21,确定虚拟物体在现实场景中的目标平面的方向,然后通过姿态调整模块22,根据方向调整虚拟物体的摆放姿态,并在终端屏幕上显示所述虚拟物体,且显示出来的所述虚拟物体适应目标平面,可以避免虚拟物体在移动时出现悬浮于平面或在平面姿态不正确的情况,提高终端的显示效果。In this embodiment, by adopting the above technical solution, the plane direction determination module 21 determines the direction of the target plane of the virtual object in the real scene, and then uses the attitude adjustment module 22 to adjust the posture of the virtual object according to the direction, and displays the virtual object on the terminal screen. The virtual object is displayed on the screen, and the displayed virtual object is adapted to the target plane, which can prevent the virtual object from floating on the plane or the posture of the plane is incorrect when moving, and improve the display effect of the terminal.
在一个可选的实施例中,基于图3a,姿态调整模块22具体用于:In an optional embodiment, based on FIG. 3a, the attitude adjustment module 22 is specifically configured to:
确定虚拟物体在现实场景中的z轴;调整虚拟物体的摆放姿态,使z 轴垂直于目标平面。Determine the z-axis of the virtual object in the real scene; adjust the placement of the virtual object so that the z-axis is perpendicular to the target plane.
同样以如图1所示为例,通过图1可知,该虚拟柱形物体初始摆放姿态为,对应的z轴垂直于水平平面,后将其移动至目标平面,如图1可知,由于该目标平面是垂直放置的,对应的平面的方向发生了变化,其对应的z轴不再垂直于该目标平面,因此需要将该虚拟柱形物体z轴,使其垂直于该目标平面,才可将其垂直放置于该目标平面上,最后得到的该虚拟柱形物体的放置位置如图2b所示。As shown in FIG. 1 as an example, it can be seen from FIG. 1 that the initial position of the virtual cylindrical object is that the corresponding z-axis is perpendicular to the horizontal plane, and then it is moved to the target plane, as shown in FIG. 1. The target plane is placed vertically, the direction of the corresponding plane has changed, and its corresponding z-axis is no longer perpendicular to the target plane. Therefore, the virtual cylindrical object's z-axis needs to be perpendicular to the target plane. It is placed vertically on the target plane, and the placement position of the virtual cylindrical object finally obtained is shown in FIG. 2b.
在一个可选的实施例中,如图3b所示,装置还包括:控制移动模块23和位置判定模块24;其中控制移动模块23用于控制虚拟物体在初始平面上移动;位置判定模块24用于若判定虚拟物体的位置超出初始平面,则触发执行确定虚拟物体在现实场景中的目标平面的方向的操作。In an optional embodiment, as shown in FIG. 3b, the device further includes: a control movement module 23 and a position determination module 24; wherein the control movement module 23 is used to control the movement of the virtual object on the initial plane; the position determination module 24 is used If it is determined that the position of the virtual object exceeds the initial plane, an operation for determining the direction of the target plane of the virtual object in the real scene is triggered.
其中,初始平面可以通过用户选定,为虚拟物体初始放置的平面。The initial plane can be selected by the user and is the plane on which the virtual object is initially placed.
具体的,控制移动模块23,可通过对终端屏幕或终端的控制,实现控制虚拟物体在初始平面上移动。例如,可以使用移动控件控制虚拟物体的移动,例如虚拟操纵按钮来实现虚拟物体的移动;也可以使用手指在终端屏幕上滑动控制虚拟物体的移动;也可以通过直接移动终端控制虚拟物体的移动,此时虚拟物体总是位于终端屏幕的中央,移动终端就相当于移动虚拟模型。Specifically, the control movement module 23 can control the movement of the virtual object on the initial plane by controlling the terminal screen or the terminal. For example, you can use mobile controls to control the movement of virtual objects, such as virtual manipulation buttons to achieve the movement of virtual objects; you can also use your fingers to slide on the terminal screen to control the movement of virtual objects; you can also control the movement of virtual objects by directly moving the terminal, At this time, the virtual object is always located in the center of the terminal screen, and the mobile terminal is equivalent to a mobile virtual model.
在虚拟物体移动过程中,可以不计算新的位置,只在平面上移动虚拟物体,此处的移动可以是跟上述的移动控件、手指移动或者终端移动成比例的在平面上移动;也可以直接计算新的位置,将虚拟物体移动至新的位置上。In the process of moving a virtual object, you can move the virtual object on the plane without calculating a new position. The movement here can be on the plane in proportion to the above-mentioned movement control, finger movement, or terminal movement; it can also be directly Calculate the new position and move the virtual object to the new position.
具体的,位置判定模块24,可以预先记录初始平面的边缘轮廓位置,进而判断虚拟物体的位置是否完全超出该初始平面。具体可采用现有技术中的扩展平面边缘轮廓的识别方法来实现,例如,利用特征点或者利用纹理来识别等。一旦判定虚拟物体的位置超出初始平面,则确定目标平面的方向。Specifically, the position determination module 24 may record the edge contour position of the initial plane in advance, and then determine whether the position of the virtual object completely exceeds the initial plane. Specifically, it can be implemented by using the recognition method of the extended plane edge contour in the prior art, for example, using feature points or using texture to identify. Once it is determined that the position of the virtual object exceeds the initial plane, the direction of the target plane is determined.
在一个可选的实施例中,装置还包括:平面识别模块;该平面识别模块,用于识别现实场景中包含的平面;从识别出的平面中选定一个平面作为目标平面。In an optional embodiment, the device further includes: a plane identification module; the plane identification module is used to identify a plane included in the real scene; and a plane is selected from the identified planes as a target plane.
其中,现实场景中可能包含一个或多个平面。需采用相应的算法才能识别出现实场景中包含的平面,该步骤可采用现有技术来实现,例如, 即时定位与地图构建(simultaneous localization and mapping,SLAM)算法,这里不再赘述。Among them, a real scene may include one or more planes. Corresponding algorithms are required to identify the planes contained in the real scene. This step can be implemented using existing technologies, for example, real-time positioning and map construction (simultaneous localization and mapping) (SLAM) algorithms, which are not repeated here.
进一步,该平面识别模块可采用如下两种方式实现:Further, the plane identification module can be implemented in the following two ways:
第一种方式,自动选定一个平面作为目标平面,即自动从识别出的平面中选定一个平面作为目标平面。In the first method, a plane is automatically selected as the target plane, that is, a plane is automatically selected as the target plane from the identified planes.
第二种方式,由用户选择目标平面,即在终端屏幕上显示识别出的平面,且使识别出的平面处于可选中状态;将选中的平面作为目标平面。也就是说,用户可通过点击或双击或其它预设动作选中平面,将用户选中的平面作为目标平面。In the second method, the user selects the target plane, that is, the identified plane is displayed on the terminal screen, and the identified plane is selected; the selected plane is used as the target plane. That is, the user can select the plane by clicking or double-clicking or other preset actions, and use the plane selected by the user as the target plane.
示例性的,如图2e所示,平面识别模块将识别出的现实场景中的平面1-平面3依次显示在终端屏幕上,如果用户想将虚拟物体显示在平面1上,则只需要在终端屏幕上单击或双击平面1,即可完成选中操作。当平面1被选中之后,则按照其在显示场景中的摆放位置显示在终端屏幕上,如图2f所示。Exemplarily, as shown in FIG. 2e, the plane recognition module sequentially displays the plane 1-plane 3 in the recognized real scene on the terminal screen. If the user wants to display the virtual object on the plane 1, it only needs to be displayed on the terminal. Click or double-click plane 1 on the screen to complete the selected operation. When plane 1 is selected, it is displayed on the terminal screen according to its placement position in the display scene, as shown in FIG. 2f.
其中,上述初始平面的确定过程与目标平面类似,这里不再赘赘述。The process of determining the initial plane is similar to that of the target plane, and is not repeated here.
在一个可选的实施例中,装置还包括:目标位置确定模块,该目标位置确定模块,用于确定虚拟物体在终端屏幕上的目标显示位置;根据目标显示位置和目标平面确定目标位置;相应的,姿态调整模块22具体用于:控制虚拟物体移动至目标位置上,并根据方向调整虚拟物体的摆放姿态,并在终端屏幕上显示所述虚拟物体,且显示出来的所述虚拟物体适应目标平面。In an optional embodiment, the device further includes: a target position determination module for determining a target display position of the virtual object on the terminal screen; determining the target position according to the target display position and the target plane; correspondingly The posture adjustment module 22 is specifically configured to control the virtual object to move to the target position, adjust the placement posture of the virtual object according to the direction, and display the virtual object on the terminal screen, and the displayed virtual object adapts Target plane.
其中,终端可以为但不限于为移动终端(例如,iPhone、智能手机、平板电脑等)、或固定终端(例如台式电脑)。The terminal may be, but is not limited to, a mobile terminal (for example, an iPhone, a smart phone, a tablet computer, etc.), or a fixed terminal (for example, a desktop computer).
其中,目标显示位置为虚拟物体在终端屏幕上的显示位置。The target display position is the display position of the virtual object on the terminal screen.
姿态调整模块22具体用于:控制虚拟物体移动至目标位置上,并根据方向调整虚拟物体的摆放姿态,并在终端屏幕上显示虚拟物体,且显示出来的虚拟物体适应目标平面。The attitude adjustment module 22 is specifically configured to control the virtual object to move to the target position, adjust the placement posture of the virtual object according to the direction, display the virtual object on the terminal screen, and the displayed virtual object adapts to the target plane.
进一步的,目标位置确定模块具体用于:检测终端屏幕上产生的触发响应,将触发响应的产生位置作为目标显示位置。Further, the target position determination module is specifically configured to detect a trigger response generated on the screen of the terminal, and use the generation position of the trigger response as a target display position.
其中,触发响应为作用在终端屏幕上的触发操作所产生的响应,可以为但不限于为终端屏幕产生的点击响应、或双击响应、或检测到的预设手 势动作。The trigger response is a response generated by a trigger operation acting on the terminal screen, and may be, but is not limited to, a click response, a double-click response, or a preset gesture gesture detected for the terminal screen.
其中,触发响应的产生位置为终端屏幕对应平面上的一个点,具体可通过布置于该终端屏幕上的传感器确定。The location where the trigger response is generated is a point on the corresponding plane of the terminal screen, which can be specifically determined by a sensor arranged on the terminal screen.
具体的,如果用户想要改变虚拟物体在终端屏幕的显示位置,则需要在终端屏幕上进行操作,例如,通过点击、或双击或在终端屏幕上做出预设手势动作来确定虚拟物体的下一个显示位置。终端屏幕接收到上述操作后会产生触发响应,该触发响应的产生位置即为用户想要将虚拟物体移动的显示位置,而该显示位置并不是虚拟物体在现实场景中的目标位置,因此需要根据该触发响应确定虚拟物体在现实场景中的目标位置,从而可以精确定位虚拟物体在终端屏幕上的显示位置。Specifically, if the user wants to change the display position of the virtual object on the terminal screen, the user needs to perform operations on the terminal screen, for example, by clicking, or double-clicking, or making a preset gesture on the terminal screen to determine the virtual object A display position. After the terminal screen receives the above operation, a trigger response is generated. The generation position of the trigger response is the display position where the user wants to move the virtual object, and the display position is not the target position of the virtual object in the real scene. The trigger response determines the target position of the virtual object in the real scene, so that the display position of the virtual object on the terminal screen can be accurately located.
或者,目标位置确定模块具体用于:接收输入的目标显示位置。Alternatively, the target position determination module is specifically configured to receive an input target display position.
具体的,用户可通过终端输入目标显示位置,由于用户在终端屏幕上的触发操作往往是一个触发区域,很难定位到一个点上,而通过输入目标位置的方式可以精确定位到点,因此本实施例相对于用户在终端屏幕上的触发操作,更能精确定位虚拟物体的位置,进一步提高终端显示效果。Specifically, the user can input the target display position through the terminal. Since the user's trigger operation on the terminal screen is often a trigger area, it is difficult to locate to a point, and the target position can be accurately located to the point. Compared with the trigger operation of the user on the terminal screen, the embodiment can more accurately locate the position of the virtual object and further improve the display effect of the terminal.
进一步的,目标位置确定模块具体用于:获取穿过目标显示位置所在点的线;将线与目标平面的交点作为目标位置。Further, the target position determination module is specifically configured to: obtain a line passing through a point at which the target display position is located; and use the intersection of the line and the target plane as the target position.
进一步的,线垂直于终端屏幕所在的平面。Further, the line is perpendicular to the plane where the terminal screen is located.
有关自适应平面的装置实施例的工作原理、实现的技术效果等详细说明可以参考前述自适应平面的方法实施例中的相关说明,在此不再赘述。For detailed descriptions of the working principle and technical effects of the device embodiment of the adaptive plane, reference may be made to related descriptions in the foregoing embodiment of the method of the adaptive plane, and details are not described herein again.
图4是图示根据本公开的实施例的自适应平面的硬件装置的硬件框图。如图4所示,根据本公开实施例的自适应平面的硬件装置30包括存储器31和处理器32。FIG. 4 is a hardware block diagram illustrating a hardware device of an adaptive plane according to an embodiment of the present disclosure. As shown in FIG. 4, an adaptive plane hardware device 30 according to an embodiment of the present disclosure includes a memory 31 and a processor 32.
该存储器31用于存储非暂时性计算机可读指令。具体地,存储器31可以包括一个或多个计算机程序产品,该计算机程序产品可以包括各种形式的计算机可读存储介质,例如易失性存储器和/或非易失性存储器。该易失性存储器例如可以包括随机存取存储器(RAM)和/或高速缓冲存储器(cache)等。该非易失性存储器例如可以包括只读存储器(ROM)、硬盘、闪存等。The memory 31 is configured to store non-transitory computer-readable instructions. Specifically, the memory 31 may include one or more computer program products, which may include various forms of computer-readable storage media, such as volatile memory and / or non-volatile memory. The volatile memory may include, for example, a random access memory (RAM) and / or a cache memory. The non-volatile memory may include, for example, a read-only memory (ROM), a hard disk, a flash memory, and the like.
该处理器32可以是中央处理单元(CPU)或者具有数据处理能力和/或指令执行能力的其它形式的处理单元,并且可以控制自适应平面的硬件装置30中的其它组件以执行期望的功能。在本公开的一个实施例中,该处理 器32用于运行该存储器31中存储的该计算机可读指令,使得该自适应平面的硬件装置30执行前述的本公开各实施例的自适应平面的方法的全部或部分步骤。The processor 32 may be a central processing unit (CPU) or other form of processing unit having data processing capabilities and / or instruction execution capabilities, and may control other components in the hardware device 30 of the adaptive plane to perform desired functions. In an embodiment of the present disclosure, the processor 32 is configured to run the computer-readable instructions stored in the memory 31, so that the hardware device 30 of the adaptive plane executes the aforementioned adaptive plane of the embodiments of the present disclosure. All or part of the steps of a method.
本领域技术人员应能理解,为了解决如何获得良好用户体验效果的技术问题,本实施例中也可以包括诸如通信总线、接口等公知的结构,这些公知的结构也应包含在本公开的保护范围之内。Those skilled in the art should understand that in order to solve the technical problem of how to obtain a good user experience effect, this embodiment may also include well-known structures such as a communication bus and an interface. These well-known structures should also be included in the protection scope of the present disclosure. within.
有关本实施例的详细说明可以参考前述各实施例中的相应说明,在此不再赘述。For detailed descriptions of this embodiment, reference may be made to corresponding descriptions in the foregoing embodiments, and details are not described herein again.
图5是图示根据本公开的实施例的计算机可读存储介质的示意图。如图5所示,根据本公开实施例的计算机可读存储介质40,其上存储有非暂时性计算机可读指令41。当该非暂时性计算机可读指令41由处理器运行时,执行前述的本公开各实施例的自适应平面的方法的全部或部分步骤。FIG. 5 is a schematic diagram illustrating a computer-readable storage medium according to an embodiment of the present disclosure. As shown in FIG. 5, a computer-readable storage medium 40 according to an embodiment of the present disclosure stores non-transitory computer-readable instructions 41 thereon. When the non-transitory computer-readable instruction 41 is executed by a processor, all or part of the steps of the method for adaptive plane of the foregoing embodiments of the present disclosure are performed.
上述计算机可读存储介质40包括但不限于:光存储介质(例如:CD-ROM和DVD)、磁光存储介质(例如:MO)、磁存储介质(例如:磁带或移动硬盘)、具有内置的可重写非易失性存储器的媒体(例如:存储卡)和具有内置ROM的媒体(例如:ROM盒)。The computer-readable storage medium 40 includes, but is not limited to, optical storage media (for example, CD-ROM and DVD), magneto-optical storage media (for example, MO), magnetic storage media (for example, magnetic tape or mobile hard disk), Non-volatile memory rewritable media (for example: memory card) and media with built-in ROM (for example: ROM box).
有关本实施例的详细说明可以参考前述各实施例中的相应说明,在此不再赘述。For detailed descriptions of this embodiment, reference may be made to corresponding descriptions in the foregoing embodiments, and details are not described herein again.
图6是图示根据本公开实施例的终端的硬件结构示意图。如图5所示,该自适应平面的终端50包括上述自适应平面的装置实施例。FIG. 6 is a schematic diagram illustrating a hardware structure of a terminal according to an embodiment of the present disclosure. As shown in FIG. 5, the adaptive plane terminal 50 includes the foregoing embodiment of the adaptive plane device.
该终端可以以各种形式来实施,本公开中的终端可以包括但不限于诸如移动电话、智能电话、笔记本电脑、数字广播接收器、PDA(个人数字助理)、PAD(平板电脑)、PMP(便携式多媒体播放器)、导航装置、车载终端、车载显示终端、车载电子后视镜等等的移动终端以及诸如数字TV、台式计算机等等的固定终端。The terminal may be implemented in various forms, and the terminal in the present disclosure may include, but is not limited to, such as a mobile phone, a smart phone, a notebook computer, a digital broadcast receiver, a PDA (personal digital assistant), a PAD (tablet computer), a PMP ( Portable multimedia players), navigation devices, on-board terminals, on-board display terminals, on-board electronic rear-view mirrors, and other mobile terminals, and fixed terminals such as digital TVs, desktop computers, and the like.
作为等同替换的实施方式,该终端还可以包括其他组件。如图5所示,该自适应平面的终端50可以包括电源单元51、无线通信单元52、A/V(音频/视频)输入单元53、用户输入单元54、感测单元55、接口单元56、控制器57、输出单元58和存储器59等等。图5示出了具有各种组件的终端,但是应理解的是,并不要求实施所有示出的组件,也可以替代地实施更多或更少的组件。As an equivalent alternative, the terminal may further include other components. As shown in FIG. 5, the adaptive plane terminal 50 may include a power supply unit 51, a wireless communication unit 52, an A / V (audio / video) input unit 53, a user input unit 54, a sensing unit 55, an interface unit 56, The controller 57, the output unit 58 and the memory 59 and so on. FIG. 5 illustrates a terminal having various components, but it should be understood that it is not required to implement all the illustrated components, and more or fewer components may be implemented instead.
其中,无线通信单元52允许终端50与无线通信系统或网络之间的无 线电通信。A/V输入单元53用于接收音频或视频信号。用户输入单元54可以根据用户输入的命令生成键输入数据以控制终端的各种操作。感测单元55检测终端50的当前状态、终端50的位置、用户对于终端50的触摸输入的有无、终端50的取向、终端50的加速或减速移动和方向等等,并且生成用于控制终端50的操作的命令或信号。接口单元56用作至少一个外部装置与终端50连接可以通过的接口。输出单元58被构造为以视觉、音频和/或触觉方式提供输出信号。存储器59可以存储由控制器55执行的处理和控制操作的软件程序等等,或者可以暂时地存储己经输出或将要输出的数据。存储器59可以包括至少一种类型的存储介质。而且,终端50可以与通过网络连接执行存储器59的存储功能的网络存储装置协作。控制器57通常控制终端的总体操作。另外,控制器57可以包括用于再现或回放多媒体数据的多媒体模块。控制器57可以执行模式识别处理,以将在触摸屏上执行的手写输入或者图片绘制输入识别为字符或图像。电源单元51在控制器57的控制下接收外部电力或内部电力并且提供操作各元件和组件所需的适当的电力。Among them, the wireless communication unit 52 allows radio communication between the terminal 50 and a wireless communication system or network. The A / V input unit 53 is used to receive audio or video signals. The user input unit 54 may generate key input data according to a command input by the user to control various operations of the terminal. The sensing unit 55 detects the current state of the terminal 50, the position of the terminal 50, the presence or absence of a user's touch input to the terminal 50, the orientation of the terminal 50, the acceleration or deceleration movement and direction of the terminal 50, and the like, and generates a signal for controlling the terminal. 50 commands or signals for operation. The interface unit 56 functions as an interface through which at least one external device can be connected to the terminal 50. The output unit 58 is configured to provide an output signal in a visual, audio, and / or tactile manner. The memory 59 may store software programs and the like for processing and control operations performed by the controller 55, or may temporarily store data that has been output or is to be output. The memory 59 may include at least one type of storage medium. Moreover, the terminal 50 may cooperate with a network storage device that performs a storage function of the memory 59 through a network connection. The controller 57 generally controls the overall operation of the terminal. In addition, the controller 57 may include a multimedia module for reproducing or playing back multimedia data. The controller 57 may perform a pattern recognition process to recognize a handwriting input or a picture drawing input performed on the touch screen as characters or images. The power supply unit 51 receives external power or internal power under the control of the controller 57 and provides appropriate power required to operate each element and component.
本公开提出的自适应平面的方法的各种实施方式可以以使用例如计算机软件、硬件或其任何组合的计算机可读介质来实施。对于硬件实施,本公开提出的自适应平面的方法的各种实施方式可以通过使用特定用途集成电路(ASIC)、数字信号处理器(DSP)、数字信号处理装置(DSPD)、可编程逻辑装置(PLD)、现场可编程门阵列(FPGA)、处理器、控制器、微控制器、微处理器、被设计为执行这里描述的功能的电子单元中的至少一种来实施,在一些情况下,本公开提出的自适应平面的方法的各种实施方式可以在控制器57中实施。对于软件实施,本公开提出的自适应平面的方法的各种实施方式可以与允许执行至少一种功能或操作的单独的软件模块来实施。软件代码可以由以任何适当的编程语言编写的软件应用程序(或程序)来实施,软件代码可以存储在存储器59中并且由控制器57执行。Various embodiments of the adaptive plane approach proposed by the present disclosure may be implemented in a computer-readable medium using, for example, computer software, hardware, or any combination thereof. For hardware implementation, various embodiments of the adaptive plane method proposed by the present disclosure can be implemented by using application-specific integrated circuits (ASICs), digital signal processors (DSPs), digital signal processing devices (DSPDs), (PLD), field programmable gate array (FPGA), processor, controller, microcontroller, microprocessor, electronic unit designed to perform the functions described herein, and in some cases, Various embodiments of the adaptive plane method proposed by the present disclosure may be implemented in the controller 57. For software implementation, various embodiments of the adaptive plane method proposed by the present disclosure may be implemented with separate software modules that allow performing at least one function or operation. The software codes may be implemented by a software application (or program) written in any suitable programming language, and the software codes may be stored in the memory 59 and executed by the controller 57.
有关本实施例的详细说明可以参考前述各实施例中的相应说明,在此不再赘述。For detailed descriptions of this embodiment, reference may be made to corresponding descriptions in the foregoing embodiments, and details are not described herein again.
以上结合具体实施例描述了本公开的基本原理,但是,需要指出的是,在本公开中提及的优点、优势、效果等仅是示例而非限制,不能认为这些优点、优势、效果等是本公开的各个实施例必须具备的。另外,上述公开的具体细节仅是为了示例的作用和便于理解的作用,而非限制,上述细节并不限制本公开为必须采用上述具体的细节来实现。The basic principles of the present disclosure have been described above in conjunction with specific embodiments, but it should be noted that the advantages, advantages, effects, etc. mentioned in this disclosure are merely examples and not limitations, and these advantages, advantages, effects, etc. cannot be considered as Required for various embodiments of the present disclosure. In addition, the specific details of the above disclosure are only for the purpose of example and easy to understand, and are not limiting, and the above details do not limit the present disclosure to the implementation of the above specific details.
本公开中涉及的器件、装置、设备、系统的方框图仅作为例示性的例 子并且不意图要求或暗示必须按照方框图示出的方式进行连接、布置、配置。如本领域技术人员将认识到的,可以按任意方式连接、布置、配置这些器件、装置、设备、系统。诸如“包括”、“包含”、“具有”等等的词语是开放性词汇,指“包括但不限于”,且可与其互换使用。这里所使用的词汇“或”和“和”指词汇“和/或”,且可与其互换使用,除非上下文明确指示不是如此。这里所使用的词汇“诸如”指词组“诸如但不限于”,且可与其互换使用。The block diagrams of the devices, devices, equipment, and systems referred to in this disclosure are merely illustrative and are not intended to require or imply that they must be connected, arranged, and configured in the manner shown in the block diagrams. As will be recognized by those skilled in the art, these devices, devices, equipment, systems can be connected, arranged, and configured in any manner. Words such as "including," "including," "having," and the like are open words that refer to "including, but not limited to," and can be used interchangeably with them. As used herein, the terms "or" and "and" refer to the terms "and / or" and are used interchangeably therewith unless the context clearly indicates otherwise. The term "such as" as used herein refers to the phrase "such as, but not limited to," and is used interchangeably with it.
另外,如在此使用的,在以“至少一个”开始的项的列举中使用的“或”指示分离的列举,以便例如“A、B或C的至少一个”的列举意味着A或B或C,或AB或AC或BC,或ABC(即A和B和C)。此外,措辞“示例的”不意味着描述的例子是优选的或者比其他例子更好。In addition, as used herein, an "or" used in an enumeration of items beginning with "at least one" indicates a separate enumeration such that, for example, an "at least one of A, B, or C" enumeration means A or B or C, or AB or AC or BC, or ABC (ie A and B and C). Furthermore, the word "exemplary" does not mean that the described example is preferred or better than other examples.
还需要指出的是,在本公开的系统和方法中,各部件或各步骤是可以分解和/或重新组合的。这些分解和/或重新组合应视为本公开的等效方案。It should also be noted that in the system and method of the present disclosure, each component or each step can be disassembled and / or recombined. These decompositions and / or recombinations should be regarded as equivalent solutions of the present disclosure.
可以不脱离由所附权利要求定义的教导的技术而进行对在此所述的技术的各种改变、替换和更改。此外,本公开的权利要求的范围不限于以上所述的处理、机器、制造、事件的组成、手段、方法和动作的具体方面。可以利用与在此所述的相应方面进行基本相同的功能或者实现基本相同的结果的当前存在的或者稍后要开发的处理、机器、制造、事件的组成、手段、方法或动作。因而,所附权利要求包括在其范围内的这样的处理、机器、制造、事件的组成、手段、方法或动作。Various changes, substitutions, and alterations to the techniques described herein can be made without departing from the techniques taught by the appended claims. Further, the scope of the claims of the present disclosure is not limited to the specific aspects of the processes, machines, manufacturing, composition of events, means, methods, and actions described above. The composition, means, methods, or actions of processes, machines, manufacturing, and events that currently exist or are to be developed later may be utilized that perform substantially the same functions or achieve substantially the same results as the corresponding aspects described herein. Accordingly, the appended claims include within their scope such processes, machines, manufacture, compositions of matter, means, methods, or actions.
提供所公开的方面的以上描述以使本领域的任何技术人员能够做出或者使用本公开。对这些方面的各种修改对于本领域技术人员而言是非常显而易见的,并且在此定义的一般原理可以应用于其他方面而不脱离本公开的范围。因此,本公开不意图被限制到在此示出的方面,而是按照与在此公开的原理和新颖的特征一致的最宽范围。The above description of the disclosed aspects is provided to enable any person skilled in the art to make or use the present disclosure. Various modifications to these aspects will be readily apparent to those skilled in the art, and the general principles defined herein may be applied to other aspects without departing from the scope of the present disclosure. Accordingly, the disclosure is not intended to be limited to the aspects shown herein, but to the broadest scope consistent with the principles and novel features disclosed herein.
为了例示和描述的目的已经给出了以上描述。此外,此描述不意图将本公开的实施例限制到在此公开的形式。尽管以上已经讨论了多个示例方面和实施例,但是本领域技术人员将认识到其某些变型、修改、改变、添加和子组合。The foregoing description has been given for the purposes of illustration and description. Furthermore, this description is not intended to limit the embodiments of the present disclosure to the forms disclosed herein. Although a number of example aspects and embodiments have been discussed above, those skilled in the art will recognize certain variations, modifications, changes, additions and sub-combinations thereof.

Claims (12)

  1. 一种自适应平面的方法,包括:An adaptive plane method includes:
    确定虚拟物体在现实场景中的目标平面的方向;Determine the direction of the target plane of the virtual object in the real scene;
    根据所述方向调整所述虚拟物体的摆放姿态;并且Adjusting the placement posture of the virtual object according to the direction; and
    在终端屏幕上显示所述虚拟物体,其中显示出来的所述虚拟物体适应所述目标平面。The virtual object is displayed on a terminal screen, and the displayed virtual object is adapted to the target plane.
  2. 根据权利要求1所述的方法,其中根据所述方向调整所述虚拟物体的摆放姿态的步骤,包括:The method according to claim 1, wherein the step of adjusting the posture of the virtual object according to the direction comprises:
    确定所述虚拟物体在现实场景中的z轴;Determining a z-axis of the virtual object in a real scene;
    调整所述虚拟物体的摆放姿态,使所述z轴垂直于所述目标平面,并在所述终端屏幕上显示所述虚拟物体,且显示出来的所述虚拟物体适应所述目标平面。Adjust the placement posture of the virtual object so that the z-axis is perpendicular to the target plane, and display the virtual object on the terminal screen, and the displayed virtual object adapts to the target plane.
  3. 根据权利要求1所述的方法,其中所述方法还包括:The method of claim 1, wherein the method further comprises:
    控制所述虚拟物体在初始平面上移动;Controlling the virtual object to move on the initial plane;
    响应于判定所述虚拟物体的位置超出所述初始平面,触发执行所述确定虚拟物体在现实场景中的目标平面的方向的操作。In response to determining that the position of the virtual object exceeds the initial plane, triggering the operation of determining a direction of a target plane of the virtual object in a real scene is triggered.
  4. 根据权利要求1所述的方法,其中所述方法还包括:The method of claim 1, wherein the method further comprises:
    识别所述现实场景中包含的多个平面;Identifying multiple planes included in the real scene;
    从所述识别出的平面中选定一个平面作为所述目标平面。A plane is selected from the identified planes as the target plane.
  5. 根据权利要求4所述的方法,其中从所述识别出的平面中选定一个平面作为所述目标平面的步骤,包括:The method according to claim 4, wherein the step of selecting a plane from the identified planes as the target plane comprises:
    在所述终端屏幕上显示所述识别出的平面,且使所述识别出的平面处于可选中状态;Displaying the identified plane on the terminal screen, and making the identified plane selectable;
    将选中的平面作为所述目标平面。The selected plane is used as the target plane.
  6. 根据权利要求1所述的方法,其中所述方法还包括:The method of claim 1, wherein the method further comprises:
    确定所述虚拟物体在终端屏幕上的目标显示位置;Determining a target display position of the virtual object on a terminal screen;
    根据所述目标显示位置和所述目标平面确定目标位置;Determining a target position according to the target display position and the target plane;
    所述根据所述方向调整所述虚拟物体的摆放姿态的步骤还包括:控制 所述虚拟物体移动至所述目标位置上,并根据所述方向调整所述虚拟物体的摆放姿态。The step of adjusting the placement posture of the virtual object according to the direction further includes: controlling the virtual object to move to the target position, and adjusting the placement posture of the virtual object according to the direction.
  7. 根据权利要求6所述的方法,其中所述根据所述目标显示位置和所述目标平面确定目标位置的步骤,包括:The method according to claim 6, wherein the step of determining a target position based on the target display position and the target plane comprises:
    获取穿过所述目标显示位置所在点的线;Obtaining a line passing through a point at which the target display position is located;
    将所述线与所述目标平面的交点作为所述目标位置。An intersection of the line and the target plane is used as the target position.
  8. 根据权利要求7所述的方法,其中所述线垂直于所述终端屏幕所在的平面。The method according to claim 7, wherein the line is perpendicular to a plane on which the terminal screen is located.
  9. 根据权利要求6所述的方法,其中所述确定所述虚拟物体在终端屏幕上的目标显示位置的步骤,包括:The method according to claim 6, wherein the step of determining a target display position of the virtual object on a terminal screen comprises:
    检测所述终端屏幕上产生的触发响应,将所述触发响应的产生位置作为所述目标显示位置;或者Detecting a trigger response generated on the terminal screen, and using the generation position of the trigger response as the target display position; or
    接收输入的目标显示位置。The target display position to receive the input.
  10. 一种自适应平面的装置,包括:An adaptive plane device includes:
    平面方向确定模块,用于确定虚拟物体在现实场景中的目标平面的方向;A plane direction determining module, configured to determine a direction of a target plane of a virtual object in a real scene;
    姿态调整模块,用于根据所述方向调整所述虚拟物体的摆放姿态,并在终端屏幕上显示所述虚拟物体,且显示出来的所述虚拟物体适应所述目标平面。An attitude adjustment module is configured to adjust the placement posture of the virtual object according to the direction, and display the virtual object on a terminal screen, and the displayed virtual object is adapted to the target plane.
  11. 一种自适应平面的硬件装置,包括:An adaptive plane hardware device includes:
    存储器,用于存储非暂时性计算机可读指令;以及Memory for storing non-transitory computer-readable instructions; and
    处理器,用于运行所述计算机可读指令,使得所述处理器执行时实现根据权利要求1-9中任意一项所述的自适应平面的方法。A processor, configured to run the computer-readable instructions, so that the processor, when executed, implements the method of the adaptive plane according to any one of claims 1-9.
  12. 一种计算机可读存储介质,用于存储非暂时性计算机可读指令,当所述非暂时性计算机可读指令由计算机执行时,使得所述计算机执行权利要求1-9中任意一项所述的自适应平面的方法。A computer-readable storage medium for storing non-transitory computer-readable instructions, and when the non-transitory computer-readable instructions are executed by a computer, cause the computer to execute any one of claims 1-9 Adaptive plane method.
PCT/CN2019/073080 2018-08-09 2019-01-25 Plane adaptation method and device, and computer readable storage medium WO2020029556A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201810900637.4 2018-08-09
CN201810900637.4A CN110827412A (en) 2018-08-09 2018-08-09 Method, apparatus and computer-readable storage medium for adapting a plane

Publications (1)

Publication Number Publication Date
WO2020029556A1 true WO2020029556A1 (en) 2020-02-13

Family

ID=69413913

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2019/073080 WO2020029556A1 (en) 2018-08-09 2019-01-25 Plane adaptation method and device, and computer readable storage medium

Country Status (2)

Country Link
CN (1) CN110827412A (en)
WO (1) WO2020029556A1 (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2023065949A1 (en) * 2021-10-20 2023-04-27 腾讯科技(深圳)有限公司 Object control method and apparatus in virtual scene, terminal device, computer-readable storage medium, and computer program product

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112274922A (en) * 2020-11-19 2021-01-29 网易(杭州)网络有限公司 Virtual subject position adjusting method and device, storage medium and electronic equipment

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH11272892A (en) * 1998-03-24 1999-10-08 Rekusaa Research:Kk Device and method for moving and arranging object in three-dimensional space display system
CN102722908A (en) * 2012-05-25 2012-10-10 任伟峰 Object space positioning method and device in three-dimensional virtual reality scene
CN105825499A (en) * 2016-03-09 2016-08-03 京东方科技集团股份有限公司 Reference plane determination method and determination system
JP2017084323A (en) * 2015-10-22 2017-05-18 キヤノン株式会社 Information processing device, method, and program
CN108052253A (en) * 2017-12-28 2018-05-18 灵图互动(武汉)科技有限公司 A kind of virtual reality display method for manufacturing contents

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9020825B1 (en) * 2012-09-25 2015-04-28 Rawles Llc Voice gestures
JP2014191718A (en) * 2013-03-28 2014-10-06 Sony Corp Display control device, display control method, and recording medium
CN107665505B (en) * 2016-07-29 2021-04-06 成都理想境界科技有限公司 Method and device for realizing augmented reality based on plane detection
CN107665506B (en) * 2016-07-29 2021-06-01 成都理想境界科技有限公司 Method and system for realizing augmented reality

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH11272892A (en) * 1998-03-24 1999-10-08 Rekusaa Research:Kk Device and method for moving and arranging object in three-dimensional space display system
CN102722908A (en) * 2012-05-25 2012-10-10 任伟峰 Object space positioning method and device in three-dimensional virtual reality scene
JP2017084323A (en) * 2015-10-22 2017-05-18 キヤノン株式会社 Information processing device, method, and program
CN105825499A (en) * 2016-03-09 2016-08-03 京东方科技集团股份有限公司 Reference plane determination method and determination system
CN108052253A (en) * 2017-12-28 2018-05-18 灵图互动(武汉)科技有限公司 A kind of virtual reality display method for manufacturing contents

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2023065949A1 (en) * 2021-10-20 2023-04-27 腾讯科技(深圳)有限公司 Object control method and apparatus in virtual scene, terminal device, computer-readable storage medium, and computer program product

Also Published As

Publication number Publication date
CN110827412A (en) 2020-02-21

Similar Documents

Publication Publication Date Title
US11017580B2 (en) Face image processing based on key point detection
WO2020019663A1 (en) Face-based special effect generation method and apparatus, and electronic device
US11443453B2 (en) Method and device for detecting planes and/or quadtrees for use as a virtual substrate
US9304591B2 (en) Gesture control
WO2019141100A1 (en) Method and apparatus for displaying additional object, computer device, and storage medium
WO2020019666A1 (en) Multiple face tracking method for facial special effect, apparatus and electronic device
US8769409B2 (en) Systems and methods for improving object detection
US20120036485A1 (en) Motion Driven User Interface
US20120038675A1 (en) Assisted zoom
WO2020029554A1 (en) Augmented reality multi-plane model animation interaction method and device, apparatus, and storage medium
US10191612B2 (en) Three-dimensional virtualization
US10649616B2 (en) Volumetric multi-selection interface for selecting multiple objects in 3D space
US20110261048A1 (en) Electronic device and method for displaying three dimensional image
WO2020019664A1 (en) Deformed image generation method and apparatus based on human face
US10649615B2 (en) Control interface for a three-dimensional graphical object
US10606360B2 (en) Three-dimensional tilt and pan navigation using a single gesture
WO2016179912A1 (en) Application program control method and apparatus, and mobile terminal
WO2020029556A1 (en) Plane adaptation method and device, and computer readable storage medium
KR101949493B1 (en) Method and system for controlling play of multimeida content
WO2020029555A1 (en) Method and device for seamlessly switching among planes, and computer readable storage medium
WO2020001015A1 (en) Scenario control method and device, and electronic device
US20160224134A1 (en) Display apparatus and control method thereof
US9898183B1 (en) Motions for object rendering and selection
CN110827413A (en) Method, apparatus and computer-readable storage medium for controlling a change in a virtual object form
CN110825280A (en) Method, apparatus and computer-readable storage medium for controlling position movement of virtual object

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 19847553

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

32PN Ep: public notification in the ep bulletin as address of the adressee cannot be established

Free format text: NOTING OF LOSS OF RIGHTS PURSUANT TO RULE 112(1) EPC (EPO FORM 1205A DATED 20.05.2021)

122 Ep: pct application non-entry in european phase

Ref document number: 19847553

Country of ref document: EP

Kind code of ref document: A1