An interaction status updating method and device
By acquiring the pose and image data of physical objects, the interaction state between target objects and virtual objects in the AR scene is updated, solving the problem of interaction difficulties when users are not wearing AR devices. This enables intuitive, real-time, and dynamic interaction between users and AR objects, improving the realism and efficiency of the AR experience.
Patent Information
- Application Number
- CN202310195419.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-02-24
- Publication Date
- 2026-11-24
- Estimated Expiration
- 2043-02-24
AI Technical Summary
In AR scenarios, users cannot perceive and interact with AR objects in a three-dimensional and accurate manner without wearing specific 3D devices.
By acquiring the pose of physical objects and image data containing target objects and virtual objects, the interaction state between target objects and virtual objects in the image data is updated based on the pose, including determining relative positional relationships, distances, and update strategies, to achieve real-time tracking and control of the interaction state.
Without relying on AR devices, it enables intuitive, real-time, dynamic, and continuous interaction between users and AR objects, improving the realism and efficiency of the interaction.
Smart Images

Figure CN116258764B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of augmented reality (AR) technology, and in particular to an interactive state update method and apparatus. Background Technology
[0002] In AR scenarios, people typically need to wear specific 3D devices, such as 3D glasses, to perceive AR objects in a stereoscopic way. Therefore, without wearing 3D glasses, people cannot perceive AR objects in a stereoscopic and accurate manner, and thus cannot interact with them precisely. Summary of the Invention
[0003] Based on the above problems, this application provides an interactive state update method and apparatus.
[0004] The technical solution provided in this application is as follows:
[0005] This application provides an interactive state update method, the method comprising:
[0006] Obtain the first pose of the physical object;
[0007] Acquire image data containing a target object and a virtual object; wherein the target object corresponds to the physical object and contains the image features of the physical object;
[0008] Based on the first pose, the interaction state between the target object and the virtual object in the image data is updated so that the physical object can adjust the first pose based on the interaction state.
[0009] In some embodiments, updating the interaction state between the target object and the virtual object in the image data based on the first pose includes:
[0010] Based on the first pose, the relative positional relationship between the physical object and the virtual object is determined;
[0011] A first distance and a second distance are determined based on the relative positional relationship; wherein, the first distance includes the distance between the physical object and the virtual object in a first direction; the second distance includes the distance between the physical object and the virtual object in a second direction; the first direction is parallel to the plane where the display device displaying the image data is located; the second direction is perpendicular to the first direction;
[0012] Based on the first distance and the second distance, determine the update strategy;
[0013] Based on the update strategy, the interaction state between the target object and the virtual object in the image data is updated.
[0014] In some embodiments, the interaction state includes an occlusion state between the target object and the virtual object; determining the update strategy based on the first distance and the second distance includes:
[0015] If the first distance is less than or equal to the first threshold, the update strategy is determined to be: update the occlusion state between the target object and the virtual object based on the second distance.
[0016] In some embodiments, the interaction state includes an occlusion state between the target object and the virtual object; determining the update strategy based on the first distance and the second distance includes:
[0017] If the second distance is less than or equal to the second threshold, the update strategy is determined to be: update the occlusion state between the target object and the virtual object based on the first distance and the second distance.
[0018] In some embodiments, the interaction state includes the touch state between the target object and the virtual object; determining the update strategy based on the first distance and the second distance includes:
[0019] If the first distance is less than or equal to the third threshold and the second distance is less than or equal to the third threshold, the update strategy is determined to be: based on the first distance and the second distance, update the touch state between the first part and the second part; wherein, the first part includes at least one part of the physical object that touches the virtual object; the second part includes at least one part of the virtual object that touches the first part.
[0020] In some embodiments, determining the relative positional relationship between the physical object and the virtual object based on the first pose includes:
[0021] Obtain the initial relative positional relationship between the physical object and the virtual object;
[0022] The relative position relationship is determined based on the first pose and the initial relative position relationship.
[0023] In some embodiments, determining the relative position relationship based on the first pose and the initial relative position relationship includes:
[0024] Determine the second pose of the virtual object based on the first pose;
[0025] The initial relative position relationship is updated based on the first movement amplitude and the second movement amplitude to obtain the relative position relationship; wherein, the first movement amplitude includes the movement amplitude of at least one part of the physical object corresponding to the first pose; and the second movement amplitude includes the movement amplitude of at least one part of the virtual object corresponding to the second pose.
[0026] In some embodiments, the method further includes:
[0027] Obtain the environmental parameters of the environment in which the physical object is located;
[0028] Based on the environmental parameters, determine the display parameters;
[0029] Based on the display parameters, the target object and the virtual object after updating their interactive state are displayed in the image data.
[0030] In some embodiments, acquiring image data containing the target object and the virtual object includes:
[0031] The feature data of the collected physical object are processed to obtain first image data containing the physical object;
[0032] Obtain second image data containing the virtual object;
[0033] Obtain the relative positional relationship between the physical object and the virtual object;
[0034] Based on the relative positional relationship, the first image data and the second image data are fused to obtain the image data.
[0035] This application embodiment also provides an interactive state update device, the device comprising:
[0036] The acquisition module is used to acquire the first pose of the physical object; acquire image data containing the target object and the virtual object; wherein the target object corresponds to the physical object and contains the image features of the physical object;
[0037] An update module is used to update the interaction state between the target object and the virtual object in the image data based on the first pose, so that the physical object can adjust the first pose based on the interaction state.
[0038] This application also provides a computer-readable storage medium storing a computer program; when the computer program is executed by a processor of an electronic device, it can implement the interactive state update method as described above.
[0039] The interactive state update method provided in this application acquires image data containing a target object and a virtual object. The target object corresponds to a physical object and contains the image features of the physical object. Thus, by leveraging the correspondence between the target object and the physical object, and the image features of the physical object possessed by the target object, the appearance and pose characteristics of the physical object can be accurately and in real time. Furthermore, since the image data contains both the target object and the virtual object, it can completely and intuitively present the interrelationship between the physical and virtual objects. Simultaneously, after acquiring the first pose of the physical object, the interactive state between the target object and the virtual object in the image data can be updated based on the first pose of the physical object. This achieves real-time tracking and control of the interactive state between the target object and the virtual object in the image data based on the real-time pose of the physical object. On the other hand, by displaying the image data, the physical object can flexibly adjust its first pose based on the interactive state between the target object and the virtual object in the image data. With the physical object being the user and the virtual object being the AR object, the interaction state update method provided in this application, without relying on specific AR devices such as AR glasses, can intuitively and in real-time display the interaction state between the user and the AR object through image data containing the user's image and the AR object, thereby eliminating dependence on AR devices such as AR glasses; furthermore, the interaction state between the user and the AR object in the image data can be updated based on the user's actual pose, so that the image data can intuitively, dynamically, and continuously present the interaction state between the user and the AR object, thereby improving the realism of the interaction between the user and the AR object and increasing the efficiency of the interaction between the user and the AR object. Attached Figure Description
[0040] Figure 1 A flowchart illustrating the interactive state update method provided in an embodiment of this application;
[0041] Figure 2 A schematic diagram illustrating the process of updating the interactive state provided in an embodiment of this application;
[0042] Figure 3 A schematic diagram illustrating the physical objects provided in the embodiments of this application in a physical environment;
[0043] Figure 4 This is a schematic diagram illustrating the effect of displaying interactive states in the image data provided in the embodiments of this application;
[0044] Figure 5 This is a schematic diagram of the interactive status update device provided in an embodiment of this application. Detailed Implementation
[0045] The technical solutions in the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings.
[0046] It should be understood that the specific embodiments described herein are merely illustrative of this application and are not intended to limit this application.
[0047] In virtual environments, users need to wear specific devices to realistically experience virtual objects. For example, in AR scenarios, users need to wear AR devices, such as AR glasses, to interact with AR objects in a three-dimensional and precise manner. Without AR devices or without access to them, users cannot accurately perceive AR objects and therefore cannot interact with them in a three-dimensional way.
[0048] To address the above issues, this application provides an interactive state update method and apparatus. The interactive state update method provided in this application can be implemented using a processor in an electronic device. The processor can be at least one of the following: Application Specific Integrated Circuit (ASIC), Digital Signal Processor (DSP), Digital Signal Processing Device (DSPD), Programmable Logic Device (PLD), Field Programmable Gate Array (FPGA), Central Processing Unit (CPU), controller, microcontroller, or microprocessor.
[0049] For example, the aforementioned electronic device may be a physical device or a virtual machine device.
[0050] For example, the above-mentioned electronic device may be a computer device, a television device, or a stereoscopic projection device.
[0051] The interactive state update method provided in this application acquires image data containing a target object and a virtual object. The target object corresponds to a physical object and contains the image features of the physical object. Thus, by leveraging the correspondence between the target object and the physical object, and the image features of the physical object possessed by the target object, the appearance and pose characteristics of the physical object can be accurately and in real time. Furthermore, since the image data contains both the target object and the virtual object, it can completely and intuitively present the interrelationship between the physical and virtual objects. Simultaneously, after acquiring the first pose of the physical object, the interactive state between the target object and the virtual object in the image data can be updated based on the first pose of the physical object. This achieves real-time tracking and control of the interactive state between the target object and the virtual object in the image data based on the real-time pose of the physical object. On the other hand, by displaying the image data, the physical object can flexibly adjust its first pose based on the interactive state between the target object and the virtual object in the image data. With the physical object being the user and the virtual object being the AR object, the interaction state update method provided in this application, without relying on specific AR devices such as AR glasses, can intuitively and in real-time display the interaction state between the user and the AR object through image data containing the user's image and the AR object, thereby eliminating dependence on AR devices such as AR glasses; furthermore, the interaction state between the user and the AR object in the image data can be updated based on the user's actual pose, so that the image data can intuitively, dynamically, and continuously present the interaction state between the user and the AR object, thereby improving the realism of the interaction between the user and the AR object and increasing the efficiency of the interaction between the user and the AR object.
[0052] Figure 1 This is a flowchart illustrating the interactive state update method provided in the embodiments of this application, as shown below. Figure 1 As shown, the method may include the following steps:
[0053] Step 101: Obtain the first pose of the physical object.
[0054] In one implementation, a physical object may include an object that exists in the physical environment and has a certain shape, volume, and color.
[0055] In one implementation, the physical object may include an object in a stationary state, such as a stationary office desk and chair.
[0056] In one implementation, the physical object may include an object in motion, such as a running pedestrian.
[0057] In one implementation, the physical object may include an object that is generally stationary but at least one part is in motion, such as a person whose position has not changed but who is waving his arm.
[0058] In one implementation, the first pose may include the position of the physical object and the pose of at least one part.
[0059] For example, the position of the physical object included in the first pose can be represented by the coordinate points of the physical object in a two-dimensional coordinate system or a three-dimensional coordinate system, or by the relative position of the physical object with respect to a reference object; for example, the reference object may include an electronic device.
[0060] For example, the pose of at least one part of the physical object included in the first pose may include the pose of the physical object as a whole, such as the squatting pose of a pedestrian.
[0061] For example, the pose of at least one part of the physical object included in the first pose may include the pose of one or more parts of the physical object, such as the pose of a pedestrian raising their arm.
[0062] In one implementation, the first pose can be obtained in any of the following ways:
[0063] A first image containing a physical object is acquired by an image acquisition device, and then the position and posture of the physical object in the first image are identified to obtain the first posture.
[0064] The contour of the physical object is determined by data collected by the position sensor. Then, the position of the physical object relative to the electronic device is determined based on the distance of the contour relative to the electronic device. The pose of the physical object is determined based on the distribution of contour points contained in the contour. Finally, the first pose is determined based on the position of the physical object relative to the electronic device and the pose of the physical object.
[0065] Step 102: Obtain image data containing the target object and the virtual object.
[0066] Among them, the target object corresponds to the physical object and contains the image features of the physical object.
[0067] In one implementation, the target object may include a set of pixel data corresponding to the physical object in a first image obtained by image acquisition of the physical object.
[0068] In one implementation, the attribute characteristics of the target object can be at least partially consistent with the attribute characteristics of the physical object. For example, when the physical object is a person, the characteristics of the target object in terms of clothing, height, and body shape can be consistent with the characteristics of the physical object in terms of clothing, height, and body shape.
[0069] In one implementation, the virtual object may include any type of virtualized object; for example, the virtual object may include an AR object.
[0070] In one implementation, image data can be obtained by adding or setting virtual objects in the first image.
[0071] In one implementation, image data can be displayed via a display device of an electronic device; for example, the display device may include a 3D display screen.
[0072] Step 103: Based on the first pose, update the interaction state between the target object and the virtual object in the image data so that the physical object can adjust the first pose based on the interaction state.
[0073] In one implementation, the interaction state can include the state of the target object and the virtual object respectively during the process of mutual association and interaction between the target object and the virtual object in the image data.
[0074] In one implementation, the interaction state can include the state of at least one part of the target object and at least one part of the virtual object respectively during the process of their association and interaction with each other in the image data.
[0075] In one implementation, the interaction state between the target object and the virtual object in the image data can be updated in the following way:
[0076] Based on the first pose, the first action currently being performed by the physical object is determined, and according to the preset interaction strategy, the second action corresponding to the first action is determined; then, the first image is updated by at least one frame of the physical object captured by the image acquisition device, and a virtual object in the second action execution state is added or set in the first image, thereby realizing the update of the interaction state between the target object and the virtual object in the image data.
[0077] In one implementation, after the interaction state between the target object and the virtual object in the image data is updated, the display device of the electronic device can output the image data in real time. At this time, the physical object can adjust and update the first pose according to the real-time interaction state between the target object and the virtual object in the image data output by the display device.
[0078] As can be seen from the above, the interactive state update method provided in this application obtains image data containing both a target object and a virtual object. The target object corresponds to a physical object and contains the image features of the physical object. Thus, by leveraging the correspondence between the target object and the physical object, and the image features of the physical object possessed by the target object, the target object can accurately and in real-time reflect the appearance and pose characteristics of the physical object. Furthermore, since the image data contains both the target object and the virtual object, it can completely and intuitively present the interrelationship between the physical and virtual objects. Simultaneously, after obtaining the first pose of the physical object, the interactive state between the target object and the virtual object in the image data can be updated based on the first pose of the physical object. This achieves real-time tracking and control of the interactive state between the target object and the virtual object in the image data based on the real-time pose of the physical object. On the other hand, by displaying the image data, the physical object can flexibly adjust its first pose based on the interactive state between the target object and the virtual object in the image data. With the physical object being the user and the virtual object being the AR object, the interaction state update method provided in this application, without relying on specific AR devices such as AR glasses, can intuitively and in real-time display the interaction state between the user and the AR object through image data containing the user's image and the AR object, thereby eliminating dependence on AR devices such as AR glasses; furthermore, the interaction state between the user and the AR object in the image data can be updated based on the user's actual pose, so that the image data can intuitively, dynamically, and continuously present the interaction state between the user and the AR object, thereby improving the realism of the interaction between the user and the AR object and increasing the efficiency of the interaction between the user and the AR object.
[0079] Based on the foregoing embodiments, the interaction state update method provided in this application updates the interaction state between the target object and the virtual object in the image data based on the first pose, which can be achieved through... Figure 2 The process shown is implemented as follows: Figure 2 This is a schematic diagram of the process for updating the interactive state provided in an embodiment of this application, such as... Figure 2 As shown, the process may include the following steps:
[0080] Step 1031: Based on the first pose, determine the relative positional relationship between the physical object and the virtual object.
[0081] In one implementation, the relative positional relationship can include the positional relationship between physical objects and virtual objects in three-dimensional space in the vertical, front-back, and left-right dimensions.
[0082] In one embodiment, the relative positional relationship may include, in three-dimensional space, the relative relationship between the current position of a physical object and the current position of a virtual object, with the display device displaying image data as a reference.
[0083] In one implementation, the aforementioned relative positional relationship can be determined in the following way:
[0084] The position information contained in the first pose is determined as the current position of the physical object. The position parameters of the virtual object are tracked and obtained, and the position parameters are determined as the current position of the virtual object. Then, with the display device as a reference, the relative relationship between the current position of the physical object and the current position of the virtual object is adjusted, and the adjustment result is determined as the relative position relationship between the two.
[0085] Step 1032: Determine the first distance and the second distance based on the relative positional relationship.
[0086] The first distance includes the distance between the physical object and the virtual object in the first direction; the second distance includes the distance between the physical object and the virtual object in the second direction; the first direction is parallel to the plane where the display device displaying the image data is located; the second direction is perpendicular to the first direction.
[0087] In one embodiment, if the display area of the display device for displaying image data has planar characteristics, the first direction may be parallel to the plane in which the display area of the display device is located.
[0088] In one embodiment, if the display area of the display device displaying image data has curved surface characteristics or irregular three-dimensional characteristics, a pre-set target plane or a user-set target plane can be obtained, and the first direction can be determined as a direction parallel to the target plane; for example, the target plane may include a plane composed of the point set on the edge of the display area and the point with the greatest vertical distance from the geometric center of the display area.
[0089] In one embodiment, when the relative positional relationship is referenced to the display device, the relative positional relationship may include the coordinate information of the physical object and the virtual object relative to the display device. By performing correlation analysis on the above coordinate information, the spatial distance between the physical object and the virtual object in the first direction and the second direction, namely the first distance and the second distance, can be determined.
[0090] Step 1033: Determine the update strategy based on the first distance and the second distance.
[0091] In one implementation, the update strategy may include a strategy for how to update the interaction state in the image data.
[0092] In one implementation, the update strategy may include updating the timing of the interaction state, such as updating the interaction state between the target object and the virtual object in the image data in real time or based on a specified delay.
[0093] In one implementation, the update strategy may include updating the degree of interaction state, such as updating the interaction state between the target object and the virtual object in the image data by a first amplitude or a second amplitude.
[0094] In one implementation, the update strategy may include updating the interactive state with additional effects, such as setting additional effects such as sound, light, and virtual obstacles during the process of updating the interactive state.
[0095] In one implementation, the update strategy can be determined in any of the following ways:
[0096] Based on the relationship between the first distance and the second distance, an update strategy is determined. For example, if the first distance is greater than the second distance, the update strategy is determined as follows: first update the position and / or pose between the target object and the virtual object in the first direction, and then update the position and / or pose between the target object and the virtual object in the second direction.
[0097] The update magnitude of the interaction state in the image data is determined based on the distance between the physical and virtual objects and the display device, and the interaction state in the image data is updated according to the update magnitude. For example, the update magnitude of the interaction state in the image data can be inversely proportional to the distance between the physical and virtual objects and the display device. For instance, if the first distance and the second distance are within a first interval, the update strategy is determined to be: update the interaction state between the target object and the virtual object in the image data according to the first magnitude; if the first distance and the second distance are within a second interval, the update strategy is determined to be: update the interaction state between the target object and the virtual object in the image data according to the second magnitude. In this case, in the distance dimension, there is no intersection between the first interval and the second interval, and the distance between the first interval and the display device is greater than the distance between the second interval and the display device, and the first magnitude is smaller than the second magnitude.
[0098] Step 1034: Based on the update strategy, update the interaction state between the target object and the virtual object in the image data.
[0099] In one implementation, the interaction state between the target object and the virtual object in the image data can be updated according to at least one of time, magnitude, and additional effects in the update strategy.
[0100] As can be seen from the above, in the interactive state update method provided in this application embodiment, since the first pose is determined in real time and can be in a continuously changing state, the relative positional relationship between the physical object and the virtual object determined based on the first pose can accurately reflect the dynamic change process of the relative positional relationship between the physical object and the virtual object during dynamic interaction. Furthermore, the first distance and the second distance determined based on the relative positional relationship can finely depict the distance between the physical object and the virtual object in the first direction parallel to the display device displaying the image data and in the second direction perpendicular to the first direction. Thus, the update strategy determined based on the first distance and the second distance can not only meet the spatial requirements of the interaction between the physical object and the virtual object, but also meet the three-dimensional display requirements of the target object and the virtual object. At the same time, updating the interactive state between the target object and the virtual object in the image data based on the update strategy can achieve targeted, real-time, and intuitive updates of the interactive state.
[0101] Based on the foregoing embodiments, in the interactive state update method provided in this application, the interactive state includes the occlusion state between the target object and the virtual object.
[0102] In one implementation, the occlusion state may include the state where the target object occludes the virtual object, or the virtual object occludes the target object.
[0103] In one implementation, the occlusion state may include a state in which at least one part of the target object occludes at least one part of the virtual object, and / or a state in which at least one part of the virtual object occludes at least one part of the target object.
[0104] Accordingly, the update strategy is determined based on the first distance and the second distance, which can be achieved in the following way:
[0105] If the first distance is less than the first threshold, the update strategy is determined as follows: update the occlusion state between the target object and the virtual object based on the second distance.
[0106] For example, if the first distance is greater than or equal to the first threshold, the operation of determining the update strategy as updating the occlusion state between the target object and the virtual object based on the second distance may not be performed.
[0107] In one embodiment, the first threshold can be determined based on a first projection profile and a second projection profile; wherein the first projection profile can include the profile of a physical object projected onto the plane where the display device is located in a second direction, and the second projection profile can include the profile of a virtual object projected onto the plane where the display device is located in a second direction.
[0108] For example, the first threshold may be less than or equal to the sum of the first value and the second value; wherein the first value may be the maximum distance between the geometric center of the first projected profile and the edge point of the first projected profile; and the second value may be the maximum distance between the geometric center of the second projected profile and the edge point of the second projected profile.
[0109] In one implementation, a first distance less than or equal to a first threshold may indicate that the first projection contour and the second projection contour overlap at least at their edge portions, i.e., the physical object and the target object are partially occluded or occluded in the first direction.
[0110] In one implementation, the second distance may have directional information, that is, the second distance may be a vector. Thus, when the first distance is less than or equal to the first threshold, the occlusion and occlusion relationship between the physical object and the virtual object can be determined based on the second distance, thereby determining whether the occlusion relationship indicates that the target object at least partially occludes the virtual object, or the virtual object at least partially occludes the target object.
[0111] As can be seen from the above, in the interactive state update method provided in this application embodiment, when the first distance between the physical object and the virtual object in the first direction is less than or equal to a first threshold, the occlusion state between the target object and the virtual object can be determined based on the second distance between the physical object and the virtual object in the second direction. Thus, based on the first distance being less than or equal to the first threshold, the degree of proximity or occlusion between the physical object and the virtual object in the first direction can be accurately determined; and based on the second distance, the occlusion relationship between the target object and the virtual object can be accurately determined, thereby enabling the occlusion state between the target object and the virtual object to more accurately and realistically reflect the three-dimensional positional relationship between the physical object and the virtual object.
[0112] Based on the foregoing embodiments, in the interactive state update method provided in this application, the interactive state includes the occlusion state between the target object and the virtual object.
[0113] Accordingly, the update strategy is determined based on the first distance and the second distance, which can be achieved in the following way:
[0114] If the second distance is less than or equal to the second threshold, the update strategy is determined as follows: update the occlusion state between the target object and the virtual object based on the first distance and the second distance.
[0115] For example, if the second distance is greater than the second threshold, the operation of determining the update strategy to update the occlusion state between the target object and the virtual object based on the first distance and the second distance can be omitted.
[0116] In one implementation, the second threshold may be preset.
[0117] In one implementation, the second threshold can be determined based on a third projection profile and a fourth projection profile in the first direction; for example, the third projection profile can include the profile of a physical object projected onto a plane in the first direction, and the fourth projection profile can include the profile of a virtual object projected onto a plane in the first direction.
[0118] In one implementation, the second threshold may be less than or equal to the sum of the third and fourth values; wherein the third value may include the maximum value of the distance between the geometric center of the third projected profile and the edge point of the profile, and the fourth value may include the maximum value of the distance between the geometric center of the fourth projected profile and the edge point of the profile.
[0119] In one implementation, the second distance being less than or equal to a second threshold may include physical objects being close to or partially overlapping virtual objects in a second direction.
[0120] In one implementation, when the second distance is less than or equal to the second threshold, the update strategy can be determined in the following way:
[0121] Based on the first distance, the proximity between the physical object and the virtual object in the first direction is determined. Combined with the second distance, the mutual occlusion relationship between the physical object and the virtual object based on the aforementioned proximity can be determined, as well as the parts of the physical object and the virtual object that have the aforementioned mutual occlusion relationship, thereby determining the occlusion state between the target object and the virtual object in the image data.
[0122] When the physical object is a user. Figure 3 This is a schematic diagram illustrating the physical objects provided in the embodiments of this application in a physical environment. Figure 4 This is a schematic diagram illustrating the effect of displaying interactive states in the image data provided in the embodiments of this application. Figure 4 The user's posture, height, clothing, and hairstyle in the image data shown are all consistent with... Figure 3 The users shown have consistent posture, height, clothing, and hairstyle, and... Figure 4 The image of the user's raised arm can be a virtual object or an AR object as described in the previous embodiments. Figure 4 As can be seen, by observing the occlusion of the user's raised hand by the virtual object in the image data, the relative positional relationship between the virtual object and the user in the three-dimensional environment can be presented intuitively, accurately, and three-dimensionally.
[0123] As can be seen from the above, in the interactive state update method provided in this application embodiment, if the second distance is less than or equal to the second threshold, it can indicate that the physical object and the virtual object are in a close state in the second direction. At this time, the occlusion state between the target object and the virtual object updated based on the first distance and the second distance can more intuitively, accurately and three-dimensionally reflect the mutual positional relationship between the physical object and the virtual object from at least one dimension.
[0124] Based on the foregoing embodiments, in the interactive state update method provided in this application, the interactive state includes the touch state between the target object and the virtual object.
[0125] In one embodiment, the touch state may include a state in which at least one part of the target object touches at least one part of the virtual object; for example, the touch state may also include an occlusion state between at least one part of the target object and at least one part of the virtual object.
[0126] Accordingly, the update strategy is determined based on the first distance and the second distance, which can be achieved in the following way:
[0127] If the first distance is less than or equal to the third threshold and the second distance is less than or equal to the third threshold, the update strategy is determined as follows: based on the first distance and the second distance, update the touch state between the first part and the second part.
[0128] The first part includes at least one part of the physical object that touches the virtual object; the second part includes at least one part of the virtual object that touches the first part.
[0129] For example, if the first distance is greater than the third threshold, or the second distance is greater than the third threshold, the operation of determining the update strategy as: updating the touch state between the first part and the second part based on the first distance and the second distance can be omitted.
[0130] In one implementation, the third threshold can be the minimum of the first threshold and the second threshold.
[0131] In one implementation, a first distance less than or equal to a third threshold can indicate that at least one part of a physical object is in contact with at least one part of a virtual object in a first direction.
[0132] In one implementation, a second distance less than or equal to a third threshold can indicate that at least one part of a physical object is in contact with at least one part of a virtual object in a second direction.
[0133] Based on the preceding explanation, when the first distance is less than or equal to the third threshold and the second distance is less than or equal to the third threshold, the update strategy can be determined in the following way:
[0134] A first set is determined based on a first distance, and a second set is determined based on a second distance. Then, by combining the three-dimensional features of physical and virtual objects, the parts corresponding to the first set and the parts corresponding to the second set are identified to determine the first part and the second part. Then, by combining the first distance and the second distance, the degree of contact between the first part and the second part is determined. The first set includes the set of parts of physical and virtual objects that touch in a first direction; the second set includes the set of parts of physical and virtual objects that touch in a second direction.
[0135] As can be seen from the above, in the interactive state update method provided in this application embodiment, when the first distance is less than or equal to the third threshold and the second distance is less than or equal to the third threshold, the touch state between at least one part of the target object and at least one part of the virtual object updated based on the first distance and the second distance can accurately characterize the touch part and touch degree between the physical object and the virtual object from the first direction corresponding to the first distance and the second direction corresponding to the second distance.
[0136] Based on the foregoing embodiments, the interactive state update method provided in this application, which determines the relative positional relationship between the physical object and the virtual object based on the first pose, can be implemented in the following way:
[0137] Obtain the initial relative positional relationship between the physical object and the virtual object; determine the relative positional relationship based on the first pose and the initial relative positional relationship.
[0138] In one implementation, the initial relative positional relationship can represent the relative positional relationship between the physical object and the virtual object at the previous moment of the current moment, with the display device displaying the image data as the reference.
[0139] In one implementation, the initial relative positional relationship can be the relative positional relationship between the physical object and the virtual object, with the display device displaying the image data as a reference, before a change in the pose of the physical object is detected.
[0140] In one implementation, the relative positional relationship can be determined in the following way:
[0141] Based on the first pose and the preset interaction strategy, the displacement amplitude of the physical object and the virtual object is estimated. Then, the coordinate position in the initial relative position relationship is updated according to the displacement amplitude, and the relative position relationship is determined according to the updated coordinate position.
[0142] As can be seen from the above, in the interactive state update method provided in this application embodiment, after obtaining the initial relative positional relationship between the physical object and the virtual object, the relative positional relationship can be determined based on the first pose and the initial relative positional relationship. Thus, determining the relative positional relationship based on the first pose and the initial relative positional relationship allows the process of determining the relative positional relationship to reflect the dynamic interaction process between the physical object and the virtual object; furthermore, determining the relative positional relationship based on the first pose and the initial relative positional relationship ensures a temporal correlation between the relative positional relationship and the initial relative positional relationship, thereby improving the continuity between the relative positional relationship and the initial relative positional relationship.
[0143] Based on the foregoing embodiments, the interactive state update method provided in this application, which determines the relative position relationship based on the first pose and the initial relative position relationship, can be implemented in the following way:
[0144] The second pose of the virtual object is determined based on the first pose; the initial relative position relationship is updated based on the first and second movement amplitudes to obtain the relative position relationship.
[0145] The first movement amplitude includes the movement amplitude of at least one part of the physical object corresponding to the first pose; the second movement amplitude includes the movement amplitude of at least one part of the virtual object corresponding to the second pose.
[0146] In one implementation, the electronic device can determine the second pose of the virtual object based on a preset interaction strategy and the first pose.
[0147] In one implementation, the starting position corresponding to the first pose can be determined based on the pose of the physical object before the first pose is detected, and the movement amplitude of at least one part corresponding to the first pose, i.e., the first movement amplitude, can be determined based on the pose tracking results of the physical object during the historical interaction process.
[0148] In one implementation, the second movement amplitude of at least one part of the virtual object corresponding to the second pose can be determined based on the interactive scene, the attribute parameters of the virtual object, and the interaction data in the historical interaction process between the virtual object and the physical object.
[0149] In one implementation, the relative positional relationship can be obtained in the following way:
[0150] The position of at least one part of the physical object in the initial relative position relationship is updated based on the first movement amplitude to obtain the updated position information of the physical object. The position of at least one part of the virtual object in the initial relative position relationship is updated based on the second movement amplitude to obtain the updated position information of the virtual object. Then, the updated position information of the physical object and the updated position information of the virtual object are associated to obtain the relative position relationship. Here, at least one part of the physical object can be a part corresponding to the first pose, and at least one part of the virtual object can be a part corresponding to the second pose.
[0151] As can be seen from the above, in the interactive state update method provided in this application embodiment, after determining the second pose of the virtual object based on the first pose, the initial relative position relationship can be updated based on the movement amplitude of at least one part of the physical object corresponding to the first pose and the movement amplitude of at least one part of the virtual object corresponding to the second pose. This achieves targeted and continuous updating of the initial relative position relationship based on the pose amplitude of the physical object and the virtual object, thereby enabling the relative position relationship obtained by the above method to accurately, three-dimensionally and continuously reflect the spatial position relationship between the physical object and the virtual object.
[0152] Based on the foregoing embodiments, the interactive state update method provided in this application may further include the following steps:
[0153] Step A1: Obtain the environmental parameters of the environment in which the physical object is located.
[0154] In one implementation, environmental parameters may include brightness parameters.
[0155] In one implementation, environmental parameters may include state parameters of static objects in the environment in which the physical object is located, such as the distance of multiple desks relative to the physical object, as well as the color, size, and whether each desk is backlit.
[0156] In one implementation, environmental parameters may include state parameters of dynamic objects in the environment in which the physical object is located, such as the blades of a fan, flashing lights, and changing clock numbers.
[0157] In one embodiment, the aforementioned environmental parameters can be collected using data acquisition devices including image acquisition devices and various types of sensors.
[0158] Step A2: Determine the display parameters based on environmental parameters.
[0159] In one implementation, display parameters may include color, brightness, contrast, and whether to add display effects.
[0160] In one implementation, the display parameters can be determined in any of the following ways:
[0161] The values of each parameter in the environmental parameters are quantified into display attributes of the display device, and these display attributes are determined as display parameters.
[0162] Based on the display requirements corresponding to the user's pre-defined interactive scenarios, at least some of the environmental parameters are enhanced or weakened, and the result of the enhancement or weakening is determined as the display parameters.
[0163] Step A3: Based on the display parameters, display the target object and virtual object in the image data after updating the interactive state.
[0164] In one implementation, after determining the interaction state, at least one of the following can be adjusted based on display parameters: the shadow display effect and brightness of the target object and the virtual object after the interaction state has been updated in the image data.
[0165] As can be seen from the above, in the interactive state update method provided in this application embodiment, after obtaining the environmental parameters of the physical object, the display parameters are determined based on the environmental parameters. This can improve the consistency between the display parameters and the environmental parameters of the physical object's environment, and can also specifically improve at least some of the display parameters. Thus, in the process of displaying the target object and virtual object after updating the interactive state in the image data based on the display parameters, the consistency and coordination between the display effect of the target object and virtual object and the actual effect of the physical object and virtual object in the environment of the physical object can be improved, thereby further improving the realism of the display of the target object and virtual object in the image data.
[0166] Based on the foregoing embodiments, the interactive state update method provided in this application, which obtains image data containing the target object and the virtual object, can be achieved through the following steps:
[0167] Step B1: Process the feature data of the collected physical objects to obtain the first image data containing the physical objects.
[0168] In one embodiment, the feature data may include image features of the physical object and distance features between at least one part of the physical object and the display device; for example, when the physical object is a person, the image features may include the physical object's height, body shape, clothing, and hairstyle, etc.
[0169] In one implementation, the aforementioned feature data can be sampled, quantized, and encoded to obtain first image data containing the physical object.
[0170] In one embodiment, feature data can be acquired using an acquisition device that includes an image acquisition device and a sensor device.
[0171] Step B2: Obtain the second image data containing the virtual object.
[0172] In one implementation, the second image data can be obtained from the memory space of the electronic device or from the executable code data that generates the virtual object.
[0173] In one implementation, the three-dimensional features of a virtual object can be obtained, and the virtual object can be rendered based on the three-dimensional features to obtain second image data.
[0174] Step B3: Obtain the relative positional relationship between the physical object and the virtual object.
[0175] Step B4: Based on the relative positional relationship, fuse the first image data and the second image data to obtain image data.
[0176] In one implementation, the first image data and the second image data can be stitched and fused together based on their relative positional relationship to obtain image data.
[0177] As can be seen from the above, in the interactive state update method provided in this application embodiment, the feature data of the collected physical object is processed to obtain the first image data containing the physical object, so that the first image data can accurately reflect the shape of the physical object; and after obtaining the second image data containing the virtual object and the relative positional relationship between the physical object and the virtual object, the first image data and the second image data are fused based on the relative positional relationship, so as to achieve targeted fusion processing of the first image data and the second image data, thereby improving the accuracy between the target object and the virtual object in the image data obtained by the above method.
[0178] Based on the foregoing embodiments, this application also provides an interactive status update device 5. Figure 5 This is a schematic diagram of the structure of the interactive state update device provided in the embodiments of this application, as shown below. Figure 5 As shown, the device may include:
[0179] The acquisition module 501 is used to acquire the first pose of the physical object and to acquire image data containing the target object and the virtual object; wherein the target object corresponds to the physical object and contains the image features of the physical object;
[0180] The update module 502 is used to update the interaction state between the target object and the virtual object in the image data based on the first pose, so that the physical object can adjust the first pose based on the interaction state.
[0181] In some embodiments, the interactive state update device 5 further includes a determining module, configured to determine the relative positional relationship between the physical object and the virtual object based on a first pose; and determine a first distance and a second distance based on the relative positional relationship; wherein the first distance includes the distance between the physical object and the virtual object in a first direction; the second distance includes the distance between the physical object and the virtual object in a second direction; the first direction is parallel to the plane where the display device displaying the image data is located; and the second direction is perpendicular to the first direction.
[0182] The determination module is also used to determine the update strategy based on the first distance and the second distance;
[0183] The update module 502 is used to update the interaction state between the target object and the virtual object in the image data based on the update strategy.
[0184] In some embodiments, the interaction state includes the occlusion state between the target object and the virtual object;
[0185] The determination module is used to determine the update strategy as follows if the first distance is less than or equal to the first threshold: update the occlusion state between the target object and the virtual object based on the second distance.
[0186] In some embodiments, the interaction state includes the occlusion state between the target object and the virtual object;
[0187] The determination module is used to determine the update strategy if the second distance is less than or equal to the second threshold: update the occlusion state between the target object and the virtual object based on the first distance and the second distance.
[0188] In some embodiments, the interaction state includes the touch state between the target object and the virtual object;
[0189] The determination module is used to determine the update strategy as follows if the first distance is less than or equal to the third threshold and the second distance is less than or equal to the third threshold: based on the first distance and the second distance, update the touch state between the first part and the second part; wherein the first part includes at least one part of the physical object that touches the virtual object; and the second part includes at least one part of the virtual object that touches the first part.
[0190] In some embodiments, the acquisition module 501 is used to acquire the initial relative positional relationship between the physical object and the virtual object;
[0191] The determination module is used to determine the relative position relationship based on the first pose and the initial relative position relationship.
[0192] In some embodiments, the determining module is configured to determine a second pose of the virtual object based on the first pose.
[0193] The update module 502 is used to update the initial relative position relationship based on the first movement amplitude and the second movement amplitude to obtain the relative position relationship; wherein, the first movement amplitude includes the movement amplitude of at least one part of the physical object corresponding to the first pose; the second movement amplitude includes the movement amplitude of at least one part of the virtual object corresponding to the second pose.
[0194] In some embodiments, the acquisition module 501 is used to acquire environmental parameters of the environment in which the physical object is located.
[0195] The determination module is used to determine the display parameters based on environmental parameters;
[0196] The interactive state update device 5 also includes a display module for displaying the target object and virtual object in the image data after the interactive state has been updated, based on display parameters.
[0197] In some embodiments, the acquisition module 501 is used to process the feature data of the acquired physical object to obtain first image data containing the physical object; acquire second image data containing the virtual object; and acquire the relative positional relationship between the physical object and the virtual object.
[0198] The determination module is used to fuse the first image data and the second image data based on their relative positional relationship to obtain image data.
[0199] As can be seen from the above, the interactive state update device provided in this application acquires image data containing target objects and virtual objects, in which the target objects correspond to physical objects and contain the image features of physical objects. Thus, by utilizing the correspondence between target objects and physical objects, and the image features of physical objects possessed by the target objects, the target objects can accurately and in real time reflect the appearance and pose features of physical objects. Furthermore, since the image data contains both target objects and virtual objects, the image data can completely and intuitively present the interrelationship between physical objects and virtual objects. At the same time, after acquiring the first pose of the physical object, the interactive state between the target objects and virtual objects in the image data can be updated based on the first pose of the physical object, thereby realizing real-time tracking and control of the interactive state between the target objects and virtual objects in the image data based on the real-time pose of the physical objects. On the other hand, by displaying the image data, the physical objects can flexibly adjust their first pose based on the interactive state between the target objects and virtual objects in the image data. With the physical object being the user and the virtual object being the AR object, the interactive state update device provided in this application embodiment can intuitively and in real-time display the interaction state between the user and the AR object without relying on specific AR devices such as AR glasses. This is achieved by using image data containing the user's image and the AR object, thus eliminating dependence on AR glasses and other AR devices. Furthermore, the interaction state between the user and the AR object in the image data can be updated based on the user's actual pose, enabling the image data to present the interaction state between the user and the AR object intuitively, dynamically, and continuously. This improves the realism of the interaction between the user and the AR object and increases the efficiency of the interaction.
[0200] Based on the foregoing embodiments, this application also provides an electronic device, including a processor and a memory, wherein the memory stores a computer program that, when executed by the processor, can implement the interactive state update method provided in any of the preceding embodiments.
[0201] The aforementioned processor can be at least one of ASIC, DSP, DSPD, PLD, FPGA, CPU, controller, microcontroller, and microprocessor.
[0202] The aforementioned memory can be volatile memory, such as random access memory (RAM); or non-volatile memory, such as read-only memory (ROM), flash memory, hard disk drive (HDD), or solid state disk (SSD); or a combination of the above types of memory, and provides instructions and data to the processor.
[0203] Based on the foregoing embodiments, this application also provides a computer-readable storage medium storing a computer program that, when executed by a processor of an electronic device, can implement the interactive state update method provided in any of the preceding embodiments.
[0204] The description of the various embodiments above tends to emphasize the differences between the various embodiments. The similarities or similarities between them can be referred to, and for the sake of brevity, they will not be repeated here.
[0205] The methods disclosed in the various method embodiments provided in this application can be arbitrarily combined to obtain new method embodiments without conflict.
[0206] The features disclosed in the various product embodiments provided in this application can be arbitrarily combined without conflict to obtain new product embodiments.
[0207] The features disclosed in the various method or device embodiments provided in this application can be arbitrarily combined without conflict to obtain new method or device embodiments.
[0208] It should be noted that the aforementioned computer-readable storage media can be read-only memory (ROM), programmable read-only memory (PROM), erasable programmable read-only memory (EPROM), electrically erasable programmable read-only memory (EEPROM), magnetic random access memory (FRAM), flash memory, magnetic surface memory, optical disc, or compact disc read-only memory (CD-ROM), etc.; or it can be various electronic devices that include one or any combination of the above-mentioned memories, such as mobile phones, computers, tablet devices, personal digital assistants, etc.
[0209] It should be noted that, in this document, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Unless otherwise specified, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes that element.
[0210] The sequence numbers of the embodiments in this application are for descriptive purposes only and do not represent the superiority or inferiority of the embodiments.
[0211] Through the above description of the embodiments, those skilled in the art can clearly understand that the methods of the above embodiments can be implemented by means of software plus necessary general-purpose hardware nodes. Of course, they can also be implemented by hardware, but in many cases the former is a better implementation method. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk) and includes several instructions to cause a terminal device (which may be a mobile phone, computer, server, air conditioner, or network device, etc.) to execute the methods described in the various embodiments of this application.
[0212] This application is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of this application. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, generate instructions for implementing the flowchart... Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.
[0213] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.
[0214] These computer program instructions may also be loaded onto a computer or other programmable data processing equipment to cause a series of operational steps to be performed on the computer or other programmable equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.
[0215] The above are merely preferred embodiments of this application and do not limit the patent scope of this application. Any equivalent structural or procedural transformations made using the content of this application's specification and drawings, or direct or indirect applications in other related technical fields, are similarly included within the patent protection scope of this application.
Claims
1. An interactive state update method, wherein, The method includes: Obtain the first pose of the physical object; Acquire image data containing a target object and a virtual object; wherein the target object corresponds to the physical object and contains the image features of the physical object; Based on the first pose and the update strategy, the interaction state between the target object and the virtual object in the image data is updated, so that the physical object can adjust the first pose based on the interaction state; wherein, the update strategy includes the magnitude of updating the interaction state; the magnitude of the update of the interaction state is inversely proportional to the distance between the physical object and the virtual object relative to the display device; the update strategy is determined based on a first distance and a second distance; wherein, the first distance includes the distance between the physical object and the virtual object in a first direction; the second distance includes the distance between the physical object and the virtual object in a second direction; the first direction is parallel to the plane where the display device displaying the image data is located; the second direction is perpendicular to the first direction; The interaction state includes the touch state between the target object and the virtual object; if the first distance is less than or equal to a third threshold and the second distance is less than or equal to the third threshold, the update strategy is determined to be: based on the first distance and the second distance, update the touch state between the first part and the second part; wherein, the first part includes at least one part of the physical object that touches the virtual object; the second part includes at least one part of the virtual object that touches the first part.
2. The method according to claim 1, wherein, The step of updating the interaction state between the target object and the virtual object in the image data based on the first pose and the update strategy includes: Based on the first pose, the relative positional relationship between the physical object and the virtual object is determined; The first distance and the second distance are determined based on the relative positional relationship; Based on the first distance and the second distance, determine the update strategy; Based on the update strategy, the interaction state between the target object and the virtual object in the image data is updated.
3. The method according to claim 2, wherein, The interaction state includes the occlusion state between the target object and the virtual object; determining the update strategy based on the first distance and the second distance includes: If the first distance is less than or equal to the first threshold, the update strategy is determined to be: update the occlusion state between the target object and the virtual object based on the second distance.
4. The method according to claim 2, wherein, The interaction state includes the occlusion state between the target object and the virtual object; determining the update strategy based on the first distance and the second distance includes: If the second distance is less than or equal to the second threshold, the update strategy is determined to be: update the occlusion state between the target object and the virtual object based on the first distance and the second distance.
5. The method according to claim 2, wherein, Determining the relative positional relationship between the physical object and the virtual object based on the first pose includes: Obtain the initial relative positional relationship between the physical object and the virtual object; The relative position relationship is determined based on the first pose and the initial relative position relationship.
6. The method according to claim 5, wherein, The step of determining the relative position relationship based on the first pose and the initial relative position relationship includes: Determine the second pose of the virtual object based on the first pose; The initial relative position relationship is updated based on the first movement amplitude and the second movement amplitude to obtain the relative position relationship; wherein, the first movement amplitude includes the movement amplitude of at least one part of the physical object corresponding to the first pose; and the second movement amplitude includes the movement amplitude of at least one part of the virtual object corresponding to the second pose.
7. The method according to claim 1, wherein, The method further includes: Obtain the environmental parameters of the environment in which the physical object is located; Based on the environmental parameters, determine the display parameters; Based on the display parameters, the target object and the virtual object after updating their interactive state are displayed in the image data.
8. The method according to claim 1, wherein, The acquisition of image data containing the target object and the virtual object includes: The feature data of the collected physical object are processed to obtain first image data containing the physical object; Obtain second image data containing the virtual object; Obtain the relative positional relationship between the physical object and the virtual object; Based on the relative positional relationship, the first image data and the second image data are fused to obtain the image data.
9. An interactive state update device, wherein, The device includes: The acquisition module is used to acquire the first pose of the physical object; acquire image data containing the target object and the virtual object; wherein the target object corresponds to the physical object and contains the image features of the physical object; An update module is configured to update the interaction state between the target object and the virtual object in the image data based on the first pose and an update strategy, so that the physical object can adjust the first pose based on the interaction state; wherein, the update strategy includes the magnitude of updating the interaction state; the magnitude of the update of the interaction state is inversely proportional to the distance between the physical object and the virtual object relative to the display device; the update strategy is determined based on a first distance and a second distance; wherein, the first distance includes the distance between the physical object and the virtual object in a first direction; the second distance includes the distance between the physical object and the virtual object in a second direction; the first direction is parallel to the plane where the display device displaying the image data is located; the second direction is perpendicular to the first direction; The interaction state includes the touch state between the target object and the virtual object; if the first distance is less than or equal to a third threshold and the second distance is less than or equal to the third threshold, the update strategy is determined to be: based on the first distance and the second distance, update the touch state between the first part and the second part; wherein, the first part includes at least one part of the physical object that touches the virtual object; the second part includes at least one part of the virtual object that touches the first part.
Citation Information
Patent Citations
Group photo image generation method and device, electronic equipment and storage medium
CN112906467A
