AR-based interactive method, device and electronic device

By performing a three-dimensional reconstruction of the user's hand-drawn two-dimensional logo on the client and integrating it into the real-life image for display, the problem of the lack of ornamental value in the two-dimensional logo display is solved, the user experience and willingness to participate are improved, and the development cost of the AR engine is reduced. .

CN114821002BActive Publication Date: 2024-09-03ALIPAY (HANGZHOU) INFORMATION TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202210383916.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-04-12
Publication Date
2024-09-03
Estimated Expiration
2042-04-12

AI Technical Summary

Technical Problem

Two-dimensional logos drawn by users are usually displayed in two-dimensional form in the existing technology, which lacks viewing and interest, affects the user experience, and reduces the user's willingness to participate in interaction.

Method used

The user's hand-drawn two-dimensional logo is obtained through the client, the image processing engine is called to perform three-dimensional reconstruction, the corresponding three-dimensional logo is obtained, and the AR engine is used to integrate the three-dimensional logo into the real scene for enhanced display.

Benefits of technology

It improves the viewing and fun of the user experience, increases the user's interest in and willingness to participate in interaction, and at the same time reduces the development cost of the AR engine.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114821002B
    Figure CN114821002B
Patent Text Reader

Abstract

One or more embodiments of the present specification provide an AR-based interactive method, device and electronic device, which are applied to a client; the client is equipped with an image processing engine; the image processing engine is used to perform three-dimensional modeling on a two-dimensional logo hand-drawn by a user; the method comprises: obtaining a two-dimensional logo hand-drawn by a user; calling the image processing engine to perform three-dimensional modeling on the obtained two-dimensional logo to obtain a three-dimensional logo corresponding to the two-dimensional logo; calling an AR engine connected to the image processing engine to integrate the three-dimensional logo into the real scene captured by the client for enhanced display.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] One or more embodiments of the present specification relate to the field of computer application technology, and in particular, to an AR-based interactive method, device, and electronic device. Background Art

[0002] Augmented Reality (AR) technology is a technology that superimposes the virtual world and the real environment into the same image or space.

[0003] With the development of computer technology and the increasing maturity of digital media technology, AR technology has gradually been applied to many scenarios such as game interaction, intelligent sports, media exhibitions, stage performances, etc. By applying computer vision processing technology and multimedia projection display technology, AR technology can create a dynamic and realistic interactive experience for participants. Through the interaction between the participant's body movements and the projected image, the AR system can produce various special effects, allowing the experiencer to enter a wonderful world where virtual and reality are integrated and it seems real and illusory. Summary of the invention

[0004] One or more embodiments of this specification provide the following technical solutions:

[0005] This specification provides an AR-based interactive method, which is applied to a client; the client is equipped with an image processing engine; the image processing engine is used to perform three-dimensional modeling on a two-dimensional logo hand-drawn by a user; the method includes:

[0006] Get the user's hand-drawn 2D logo;

[0007] Calling the image processing engine to perform three-dimensional modeling on the acquired two-dimensional mark to obtain a three-dimensional mark corresponding to the two-dimensional mark;

[0008] The AR engine connected to the image processing engine is called to fuse the three-dimensional mark into the real scene picture taken by the client for enhanced display.

[0009] This specification also provides an AR-based interactive device, which is applied to a client; the client is equipped with an image processing engine; the image processing engine is used to perform three-dimensional modeling on a two-dimensional mark hand-drawn by a user; the device includes:

[0010] An acquisition module is used to acquire a two-dimensional logo drawn by a user;

[0011] A first calling module calls the image processing engine to perform three-dimensional modeling on the acquired two-dimensional mark to obtain a three-dimensional mark corresponding to the two-dimensional mark;

[0012] The second calling module calls the AR engine connected to the image processing engine to integrate the three-dimensional logo into the real scene picture taken by the client for enhanced display.

[0013] This specification also provides an electronic device, including:

[0014] processor;

[0015] a memory for storing processor-executable instructions;

[0016] The processor implements the steps of any of the above methods by running the executable instructions.

[0017] The present specification also provides a computer-readable storage medium on which computer instructions are stored. When the instructions are executed by a processor, the steps of any of the methods described above are implemented.

[0018] In the above technical solution, when the client obtains the two-dimensional logo hand-drawn by the user, it can first call the image processing engine to perform three-dimensional reconstruction on the two-dimensional logo to obtain a three-dimensional logo corresponding to the two-dimensional logo, and then call the AR engine connected to the image processing engine to merge the three-dimensional logo into the real scene captured by the client for enhanced display.

[0019] By adopting the above method, on the one hand, the user's hand-drawn logo can be displayed to the user in a three-dimensional form, which improves the viewing experience and fun, enhances the user experience, and thus increases the user's interest in the interaction and willingness to participate; on the other hand, the image processing engine can perform three-dimensional reconstruction, and the AR engine can directly use the three-dimensional logo obtained by the image processing engine and integrate it into the real scene for enhanced display, which can reduce the development cost of the AR engine. BRIEF DESCRIPTION OF THE DRAWINGS

[0020] Figure 1 It is a hardware architecture diagram of an AR-based interactive system shown in an exemplary embodiment of this specification.

[0021] Figure 2 It is a schematic diagram of an activity interface shown in an exemplary embodiment of this specification.

[0022] Figure 3 It is a schematic diagram of an interactive interface shown in an exemplary embodiment of this specification.

[0023] Figure 4 It is a schematic diagram of an AR-based interactive method shown in an exemplary embodiment of this specification.

[0024] Figure 5 It is a schematic diagram of a two-dimensional mark shown in an exemplary embodiment of this specification.

[0025] Figure 6 It is a schematic diagram of a three-dimensional mark shown in an exemplary embodiment of this specification.

[0026] Fig. 7A It is a software architecture diagram of an AR-based interactive system shown in an exemplary embodiment of this specification.

[0027] Figure 7B It is a software architecture diagram of another AR-based interactive system shown in an exemplary embodiment of this specification.

[0028] Figure 8 It is a hardware structure diagram of an electronic device where an AR-based interactive device is located, shown as an exemplary embodiment of this specification.

[0029] Fig. 9 It is a block diagram of an AR-based interactive device shown as an exemplary embodiment of this specification. DETAILED DESCRIPTION

[0030] Exemplary embodiments will be described in detail herein, examples of which are shown in the accompanying drawings. When the following description refers to the drawings, the same numbers in different drawings represent the same or similar elements unless otherwise indicated. The implementations described in the following exemplary embodiments do not represent all implementations consistent with one or more embodiments of this specification. Instead, they are merely examples of devices and methods consistent with some aspects of one or more embodiments of this specification as detailed in the appended claims.

[0031] It should be noted that: in other embodiments, the steps of the corresponding method are not necessarily performed in the order shown and described in this specification. In some other embodiments, the steps included in the method may be more or less than those described in this specification. In addition, a single step described in this specification may be decomposed into multiple steps for description in other embodiments; and multiple steps described in this specification may be combined into a single step for description in other embodiments.

[0032] With the development of network technology, various ways of allocating virtual resources have emerged.

[0033] Taking the distribution of virtual resources in the form of "red envelopes" as an example, users can put electronic greeting cards, gifts, etc. into "red envelopes" and set the collection rights of "red envelopes". Users can distribute red envelopes to another user or to a group. When another user or a member of the group obtains the collection rights, they can receive the "red envelope".

[0034] In actual applications, in addition to users configuring a certain number of virtual resources (for example, a virtual red envelope including a certain amount of gift money) and distributing the configured virtual resources to other users, they can also pre-configure a virtual resource collection including a certain number of virtual resources in the server (for example, a virtual red envelope pool including a certain amount of bonus money), and the server will allocate virtual resources to users from the virtual resource collection.

[0035] In some virtual resource allocation scenarios, users can collect electronic vouchers of multiple categories. When the number of categories of collected electronic vouchers reaches a preset threshold, the user can obtain the right to collect virtual resources in the preset virtual resource set, and obtain additional virtual resources when collecting additional electronic vouchers. For users with the right to collect, the server can allocate virtual resources to the user from the virtual resource set, that is, the user can collect virtual resources in the virtual resource set.

[0036] For example, the virtual resource may be a virtual red envelope, and the virtual resource set may be a virtual red envelope pool. In a red envelope distribution scenario of "collecting five lucky points for a grand prize" shown, the electronic voucher may include five types of virtual lucky cards, namely "patriotic lucky", "friendly lucky", "rich and strong lucky", "harmonious lucky" and "dedicated lucky". Users can collect virtual lucky cards through various channels, and after collecting these five types of virtual lucky cards, they obtain the right to receive virtual red envelopes, and the server distributes virtual red envelopes from the virtual red envelope pool to users with the right to receive virtual red envelopes.

[0037] In actual applications, in order to increase the user's interest and willingness to participate in collecting electronic certificates, the client can first output an interactive interface including a hand-drawn area to the user, and obtain the hand-drawn logo of the user in the hand-drawn area of ​​the interactive interface. Subsequently, if the hand-drawn logo of the user is a specific logo (for example, the word "Fu"), the electronic certificate can be allocated to the user, and the logo can be displayed to the user as an icon corresponding to the electronic certificate. In this way, the user can obtain his own electronic certificate by designing and drawing the logo by himself.

[0038] However, in the related art, the hand-drawn logos are usually displayed to users in a two-dimensional form, which lacks ornamentality and interest, affects the user experience, and reduces the user's willingness to participate in the interaction.

[0039] This specification provides an interactive solution based on AR. When a client obtains a two-dimensional logo hand-drawn by a user, it can first call an image processing engine to perform three-dimensional reconstruction on the two-dimensional logo to obtain a three-dimensional logo corresponding to the two-dimensional logo, and then call an AR engine connected to the image processing engine to merge the three-dimensional logo into the real scene captured by the client for enhanced display.

[0040] In a specific implementation, the client may first obtain the two-dimensional mark drawn by the user. For example, the client may output an interactive interface to the user, so that the user may draw the two-dimensional mark in the interactive interface. The client may obtain the two-dimensional mark drawn by the user in the interactive interface.

[0041] When the client obtains the two-dimensional mark hand-drawn by the user, it can call the image processing engine to perform three-dimensional reconstruction on the two-dimensional mark to obtain a three-dimensional mark corresponding to the two-dimensional mark.

[0042] When the client obtains the three-dimensional mark through three-dimensional reconstruction, it can call the AR engine connected to the image processing engine to merge the three-dimensional mark into the real scene captured by the client for enhanced display. That is, the AR engine realizes the superposition of the three-dimensional mark in the virtual world and the real scene captured by the client in the same image or space.

[0043] By adopting the above method, on the one hand, the user's hand-drawn logo can be displayed to the user in a three-dimensional form, which improves the viewing experience and fun, enhances the user experience, and thus increases the user's interest in the interaction and willingness to participate; on the other hand, the image processing engine can perform three-dimensional reconstruction, and the AR engine can directly use the three-dimensional logo obtained by the image processing engine and integrate it into the real scene for enhanced display, which can reduce the development cost of the AR engine.

[0044] Please refer to Figure 1 , Figure 1 It is a hardware architecture diagram of an AR-based interactive system shown in an exemplary embodiment of this specification.

[0045] like Figure 1 As shown, the AR-based interactive system may include a network 10, a server 11, and several electronic devices, such as a mobile phone 12, a mobile phone 13, and a mobile phone 14.

[0046] The server 11 may be a physical server including an independent host, or the server 11 may be a virtual server, a cloud server, etc. hosted by a host cluster. Mobile phones 12 to 14 are just one type of electronic device that a user may use. In fact, a user may also use electronic devices such as tablet devices, laptop computers, PDAs (Personal Digital Assistants), wearable devices (such as smart glasses, smart watches, etc.), etc., and one or more embodiments of this specification do not limit this. The network 10 may include various types of wired or wireless networks.

[0047] In practical applications, the client can run on mobile phones 12 to 14, and the server can run on server 11. For the client, different clients can be used by different users or the same user.

[0048] Users can hand-draw identifiers and collect electronic vouchers through their corresponding clients. The client can maintain the electronic vouchers collected by the user; alternatively, the client can send the electronic vouchers collected by the user to the server, and the server can maintain the electronic vouchers collected by the user. The server can maintain a preset virtual resource set and allocate virtual resources for users from this virtual resource set.

[0049] Specifically, the above-mentioned client can output an interactive interface to the above-mentioned user, and the user can hand-draw and input an identifier (which can be called a target identifier) in this interactive interface.

[0050] Among them, the above-mentioned interactive interface can refer to the operation interface provided by the client for the user; this interactive interface can include a hand-drawing area for the user to draw the target identifier. For example, when the target identifier is a Chinese character, this hand-drawing area can be a "rice" grid. The above-mentioned target identifier can refer to any identifier drawn by the user, and this identifier can be a graphic, character (such as: English letters or Chinese characters), etc. For example, in the "Collect Five Blessings and Win Big Prizes" activity, this identifier can be the Chinese character "Fu".

[0051] In some examples, the above-mentioned client can provide an entrance for the above-mentioned user to participate in the hand-drawing identifier activity, and the user can perform relevant operations on this entrance to obtain the above-mentioned interactive interface.

[0052] Among them, the above-mentioned entrance can be a user option for the user to operate. The client can output this user option in the activity interface corresponding to the electronic voucher, and when detecting the trigger operation of the above-mentioned user on this user option, in response to this trigger operation, output the above-mentioned interactive interface to the user.

[0053] In practical applications, when the above-mentioned client first outputs the above-mentioned interactive interface to the above-mentioned user, it can display the relevant operation instructions for obtaining electronic vouchers by hand-drawing identifiers to facilitate the user's understanding of how to draw identifiers and how to obtain electronic vouchers.

[0054] In addition, the above-mentioned interactive interface can also include an option (which can be called a font option) for the user to select the font of the above-mentioned target identifier. The user can, in this interactive interface, by triggering a certain font option, select to complete the drawing of the target identifier in the above-mentioned hand-drawing area in the font corresponding to this font option.

[0055] Among them, the fonts corresponding to the above font options may include free style, running script, official script, young round and other fonts. For example, when the above user selects free style, the user can complete the drawing of the above target logo in the above hand-painted area according to the writing method he is accustomed to without being restricted by the font; when the user selects running script, the above client can output a specific logo in the form of running script in the above hand-painted area (for example: in the "Collect Five Fortune Points Grand Prize" activity, the specific logo can be the word "Fu") to assist the user to complete the drawing of the target logo in the hand-painted area according to the writing method of running script.

[0056] Further, the client can save the logos drawn by the user in different fonts. In this case, the user can compare the logos drawn in different fonts and select the most satisfactory logo.

[0057] The above interactive interface may also include a rewrite option and / or an undo option. When the above user is not satisfied with the currently drawn mark, a trigger operation may be performed on the rewrite option to trigger the redrawing of the mark; or a trigger operation may be performed on the undo option to trigger the undoing of the most recently drawn step.

[0058] Please refer to Figure 2 , Figure 2 is a schematic diagram of an activity interface shown in an exemplary embodiment of this specification; please refer to Figure 3 , Figure 3 It is a schematic diagram of an interactive interface shown in an exemplary embodiment of this specification.

[0059] Continuing with the above-mentioned "Collect Five Fortune Points Grand Prize" red envelope distribution scenario as an example, Figure 2 As shown, the activity interface corresponding to the electronic voucher may specifically be a "Collect Five Fortune Points Grand Prize" interface; Figure 3 As shown, the above-mentioned interactive interface can specifically be a "write blessing character" interface.

[0060] When the user participates in the "Collect Five Fortune Points Grand Prize" activity, the client can output the following to the user: Figure 2 The activity interface shown in the figure. The activity interface may include a "My Fortune Card" button, a "Scan Fortune Character" button, a "Write Fortune Character" button, etc. Among them, the "Write Fortune Character" button is the above-mentioned user option.

[0061] The user can click on the "My Fortune Card" button, the "Scan Fortune Character" button, or the "Write Fortune Character" button. When the client detects the user's click on the "Write Fortune Character" button, it can respond to the click and output the following to the user: Figure 3 The “Write the word ‘Fu’” interface shown.

[0062] In the above-mentioned "write blessing character" interface, the above-mentioned client can output a hand-drawn area for the above-mentioned user to perform the operation of writing blessing characters at a preset position (for example: the center of the interface), and output the above-mentioned font options such as "free style" button, "regular style" button, "running script" button, "official script" button, and "young round" button at other preset positions (for example: above the hand-drawn area). The user can click the "free style" button to choose to write the word "blessing" in the hand-drawn area according to the writing method he is accustomed to; the user can also click the "running script" button to choose to write the word "blessing" in the hand-drawn area according to the writing method of running script; and so on. In addition, the word "blessing" drawn in the corresponding font can be displayed in each font option for the user's reference.

[0063] Please refer to Figure 4 , Figure 4 It is a flowchart of an AR-based interactive method shown in an exemplary embodiment of this specification.

[0064] The above AR-based interactive method can be applied to a client, which can run on a computer such as Figure 1 The handsets 12 to 14 are shown.

[0065] In this embodiment, the client may be equipped with an image processing engine, which may be used to perform three-dimensional modeling on a two-dimensional mark hand-drawn by a user.

[0066] The above-mentioned AR-based interactive method may include the following steps:

[0067] Step 402: Obtain the two-dimensional logo hand-drawn by the user.

[0068] In this embodiment, the client may first obtain a two-dimensional mark hand-drawn by a user.

[0069] Specifically, the client can output an interactive interface to the user, so that the user can hand-draw a two-dimensional mark in the interactive interface. The client can obtain the two-dimensional mark hand-drawn by the user in the interactive interface.

[0070] Continue as Figure 3 Taking the "write blessing" interface shown as an example, the user can write the word "blessing" in the "write blessing" interface. At this time, the "blessing" written by the user is the two-dimensional mark hand-painted by the user.

[0071] It should be noted that, for a two-dimensional logo, it is composed of a plurality of lines and a texture filled in the area divided by the plurality of lines.

[0072] Please refer to Figure 5 , Figure 5 It is a schematic diagram of a two-dimensional mark shown in an exemplary embodiment of this specification.

[0073] As shown Figure 5 in the figure, the character "two" as a two-dimensional identifier may be composed of multiple lines and diagonal-line patterns of textures filled in the upper and lower rectangular areas divided by these multiple lines.

[0074] Step 404: Invoke the image processing engine to perform 3D modeling on the obtained two-dimensional identifier to obtain a 3D identifier corresponding to the two-dimensional identifier.

[0075] In this embodiment, when the above client obtains a hand-drawn two-dimensional identifier of a user, it may invoke the above image processing engine to perform 3D reconstruction on the two-dimensional identifier to obtain a 3D identifier corresponding to the two-dimensional identifier.

[0076] Continuing with the example of the "writing the character 'fu'" interface as shown Figure 3 in the figure, when the above client obtains the character 'fu' written by the user in the "writing the character 'fu'" interface, it may invoke the above image processing engine to perform 3D reconstruction on the character 'fu' to obtain a 3D identifier corresponding to the character 'fu'.

[0077] Please refer to Figure 6 , Figure 6 which is a schematic diagram of a 3D identifier shown in an exemplary embodiment of this specification.

[0078] As shown Figure 6 in the figure, the 3D identifier corresponding to the character 'fu' may be a 3D model corresponding to the character 'fu'. Figure 6 Pictures of the 3D model from different perspectives are shown.

[0079] Step 406: Invoke the AR engine docked with the image processing engine to fuse the 3D identifier into the real scene picture captured by the client for enhanced display.

[0080] In this embodiment, when the above client obtains the above 3D identifier through 3D reconstruction, it may invoke the AR engine docked with the above image processing engine to fuse the 3D identifier into the real scene picture captured by the above client for enhanced display. That is, the AR engine realizes the superposition of the 3D identifier in the virtual world and the real scene picture in the real world captured by the client onto the same image screen or space.

[0081] Next, from the parts of obtaining the hand-drawn two-dimensional identifier of the user, performing 3D reconstruction on the two-dimensional identifier, and fusing the 3D identifier into the real scene picture, the embodiment as shown Figure 4 in the figure will be described in detail.

[0082] (1) Obtaining the hand-drawn two-dimensional identifier of the user

[0083] In one embodiment shown, the image processing engine may specifically include a graphics engine and a rendering engine. The rendering engine may provide an API (Application Programming Interface) interface (hereinafter referred to as a first API interface) for visual rendering.

[0084] In practical applications, the above-mentioned graphics engine may include the Oasis engine, which is a high-performance web graphics engine that prioritizes mobile terminals.

[0085] The rendering engine may include the Paladin engine, which is a mobile rendering framework that performs rendering based on WebGL (Web Graphics Library); WebGL is a 3D drawing protocol that allows JavaScript and OpenGL ES 2.0 to be combined together. By adding JavaScript binding to OpenGL ES 2.0, WebGL can provide hardware 3D accelerated rendering for HTML5 Canvas.

[0086] When the client obtains the two-dimensional mark drawn by the user, it can first call the graphics engine to draw the user's hand-drawn trajectory, and then the graphics engine calls the first API interface provided by the rendering engine to perform visual rendering on the hand-drawn trajectory to generate a two-dimensional mark corresponding to the hand-drawn trajectory.

[0087] In practical applications, a frame drawing and area filling can be performed based on the hand-drawn trajectory to generate a two-dimensional mark corresponding to the hand-drawn trajectory. For example, a frame drawing can be performed on the hand-drawn trajectory first to process a line used to represent the hand-drawn trajectory into a closed figure composed of multiple lines, and then the closed figure can be area filled to fill the texture in the area divided by the closed figure.

[0088] In one embodiment shown, when the client calls the graphics engine to draw the user's hand-drawn trajectory, the client can specifically call the graphics engine to monitor the user's hand-drawn operation on the drawing interface provided by the client (for example: the interactive interface output to the user) to obtain the user's hand-drawn data, and draw the user's hand-drawn trajectory based on the monitored hand-drawn data.

[0089] In actual applications, the above-mentioned graphics engine can monitor the touch position and touch interval duration of the above-mentioned user in the above-mentioned drawing interface, and use all the monitored touch positions and touch interval durations as the user's hand-drawn data. Among them, the touch position can be represented by data in the form of coordinates, and the touch interval duration can be represented by data in the form of numerical values. Subsequently, the graphics engine can connect the adjacent touch positions whose touch interval duration does not exceed the preset threshold based on the monitored hand-drawn data to form multiple lines, and these multiple lines are the hand-drawn trajectories of the user drawn.

[0090] For example, assuming that by monitoring the touch positions and touch intervals of the above-mentioned user in the above-mentioned drawing interface, 6 touch positions are monitored, namely position 1, position 2, position 3, position 4, position 5, and position 6, among which the touch duration intervals between position 1 and position 2, position 2 and position 3, position 4 and position 5, and position 5 and position 6 do not exceed the preset threshold, and the touch duration interval between position 3 and position 4 exceeds the preset threshold, then position 1, position 2, and position 3 can be connected, and position 4, position 5, and position 6 can be connected to form two lines, and these two lines are the hand-drawn trajectories drawn by the user.

[0091] Alternatively, when the above-mentioned client obtains the user's hand-drawn data, it can also record the hand-drawn data, and when the user shares the two-dimensional identifier corresponding to the hand-drawn data or the three-dimensional identifier corresponding to the two-dimensional identifier with other users, the user's hand-drawn data can be sent to the clients corresponding to other users.

[0092] Accordingly, the client can receive hand-drawn data corresponding to the two-dimensional mark drawn by other users, which is shared to the client by other users through their clients. In this case, the client can call the graphics engine to draw a hand-drawn track based on the received hand-drawn data, and the hand-drawn track drawn at this time is actually the hand-drawn track of other users.

[0093] In one embodiment shown, the rendering engine may specifically be a rendering engine container.

[0094] Container technology is a kernel-lightweight virtualization technology for the operating system layer. Taking Docker container technology as an example, Docker is an open source application container engine that allows the application files and the corresponding dependent files of the application to be packaged into a portable image, and the image can be published to any device running the Linux operating system or Windows operating system to achieve virtualization.

[0095] For containers, containers are relatively independent operating environments. Containers completely use the sandbox mechanism, and there are no interfaces between them. In addition, within the container, the impact on the outside world should be minimized, for example: resource control for the container, that is, the host cannot use all the resources in the container.

[0096] The container contains a complete operating environment. In addition to the application files contained in the application itself, the dependent files required to run the application can be packaged into the image. By packaging the application itself and its dependencies, the underlying operating system and related environment can be abstracted.

[0097] Containers have an independent file system. Because containers use system resources, there is no need to have kernel-related code or tools in an independent file system. As long as the set of files in the image is available, the container created based on the image can run.

[0098] Therefore, the rendering engine container may be built into the graphics engine. That is, the image processing engine may specifically include a graphics engine and a rendering engine container built into the graphics engine.

[0099] In practical applications, the graphics engine may include an Oasis engine, and the rendering engine may include a Paladin engine container built into the Oasis engine.

[0100] (2) 3D reconstruction of 2D logo

[0101] In one embodiment shown, the rendering engine may also provide an API interface for obtaining modeling information of the two-dimensional mark (hereinafter referred to as the second API interface). The graphics engine may provide an API interface for three-dimensional modeling (hereinafter referred to as the third API interface).

[0102] When the client calls the image processing engine to perform three-dimensional modeling on the two-dimensional logo and obtains a three-dimensional logo corresponding to the two-dimensional logo, the graphics engine can first call the second API interface provided by the rendering engine to collect texture information of the two-dimensional logo, and process the texture information into modeling data for three-dimensional modeling, and then call the third interface provided by the graphics engine to perform three-dimensional modeling based on the modeling data to obtain a three-dimensional logo corresponding to the two-dimensional logo.

[0103] In one embodiment shown, when the texture information is processed into modeling data for three-dimensional modeling, the texture information can be converted into vector data, and the converted vector data can be stretched to generate Mesh data.

[0104] For the above texture information, the pixels in the image texture are usually called texels, which are different from the pixels on the screen. By applying the projection equation to the points in space, a set of numerical values ​​about the texture called parameter space values ​​can be obtained, and then one or more mapping functions can be used to convert the parameter space values ​​into texture space values.

[0105] For the above-mentioned vector graphics data, vector graphics are also called object-oriented images or drawing images, which are images represented by geometric primitives such as points, lines or polygons based on mathematical equations in computer graphics. Vector graphics will not be distorted after being enlarged, reduced or rotated.

[0106] The above-mentioned Mesh data is a data structure used in computer graphics to build models for various irregular objects. Intuitively, the surfaces of objects in the real world are composed of curved surfaces. In the computer world, since only discrete data structures can be used to simulate continuous objects in reality, the curved surfaces in the real world are actually composed of countless small polygonal patches in the computer world. The collection of these patches is Mesh.

[0107] In practical applications, the texture information can be converted into vector data based on any vector graphics conversion algorithm supported by the rendering engine, and the converted vector graphics data can be stretched and transformed to generate Mesh data based on the open source JavaScript framework trude-geometry.

[0108] Accordingly, when three-dimensional modeling is performed based on the above-mentioned modeling data, the three-dimensional modeling can be specifically performed based on the generated Mesh data.

[0109] (3) Integrate 3D logos into real-life images

[0110] In one embodiment shown, the AR engine may provide an API interface for detecting a preset target in the real scene captured by the client (hereinafter referred to as the fourth API interface), and an API interface for tracking the position of the preset target (hereinafter referred to as the fifth API interface). The preset target may be a physical entity in the real world, such as a person, or an object such as a table, a vase, or a wall.

[0111] In practical applications, the graphics engine may include the Oasis engine, the rendering engine may include the Paladin engine or a Paladin engine container built into the Oasis engine, and the AR engine may include the ARSession engine. The ARSession engine is an AR framework that provides functions such as camera, target recognition, and target tracking for AR technology.

[0112] When the above-mentioned client calls the above-mentioned AR engine to merge the above-mentioned three-dimensional logo into the real scene captured by the client for enhanced display, on the one hand, the above-mentioned rendering engine can specifically call the above-mentioned fourth API interface provided by the above-mentioned AR engine to perform target detection on the preset target in the real scene captured by the client, and based on the detected position of the preset target in the real scene, merge the three-dimensional logo into the real scene for enhanced display.

[0113] On the other hand, specifically, first, the rendering engine calls the fifth API interface provided by the AR engine to track the position of the preset target, and based on the tracked position change of the preset target, synchronously adjusts the display position of the three-dimensional logo in the real scene.

[0114] In practical applications, the target detection and / or position tracking may not be performed on the preset target. For example, the three-dimensional mark may be directly integrated into the center of the real scene for enhanced display, that is, the three-dimensional mark is displayed at the center of the real scene, and the display position of the three-dimensional mark in the real scene is fixed.

[0115] In one embodiment shown, the AR platform may be a cross-platform AR engine. In this case, the code supported by the AR engine may be in a different programming language than the native code of the rendering engine. Therefore, the rendering engine may include a parser corresponding to the code supported by the AR engine.

[0116] It should be noted that the ARSession engine is usually based on the JavaScript programming language. That is, the above-mentioned AR engine may include an ARSession engine based on the JavaScript programming language. Since the Paladin engine and the Oasis engine are usually not based on the JavaScript programming language, for example: the Paladin engine and the Oasis engine may be based on the C++ programming language. In this case, the above-mentioned rendering engine may include a Paladin engine that supports the JavaScript programming language, or a Paladin engine container that supports the JavaScript programming language and is built into the Oasis engine.

[0117] The Paladin engine or Paladin engine container can bind and adapt the API provided by the ARSession engine. For example, the API provided by the ARSession engine can be bound and adapted through JavaScript bridge or JavaScript binding, so that the Paladin engine or Paladin engine container can call the API interface provided by the ARSession engine (the ARSession engine can also be regarded as running in the Paladin engine or Paladin engine container), and convert the JavaScript code corresponding to the API interface provided by the ARSession engine to the native code layer for execution, and the Oasis engine can also call the API provided by the ARSession engine through the Paladin engine.

[0118] Please refer to Fig. 7A , Figure 7B , Fig. 7A , Figure 7B They are respectively software architecture diagrams of an AR-based interactive system shown in an exemplary embodiment of this specification.

[0119] like Fig. 7A , Figure 7B As shown, in the case where the image processing engine includes the graphics engine and the rendering engine, the AR engine can specifically be connected to the rendering engine.

[0120] In one embodiment shown, in order to reduce the computing pressure of the client, the AR engine can be deployed on the server corresponding to the client. That is, the AR engine can include an AR engine deployed locally on the client, or an AR engine deployed on the server corresponding to the client.

[0121] In the above technical solution, when the client obtains the two-dimensional logo hand-drawn by the user, it can first call the image processing engine to perform three-dimensional reconstruction on the two-dimensional logo to obtain a three-dimensional logo corresponding to the two-dimensional logo, and then call the AR engine connected to the image processing engine to merge the three-dimensional logo into the real scene captured by the client for enhanced display.

[0122] By adopting the above method, on the one hand, the user's hand-drawn logo can be displayed to the user in a three-dimensional form, which improves the viewing experience and fun, enhances the user experience, and thus increases the user's interest in the interaction and willingness to participate; on the other hand, the image processing engine can perform three-dimensional reconstruction, and the AR engine can directly use the three-dimensional logo obtained by the image processing engine and integrate it into the real scene for enhanced display, which can reduce the development cost of the AR engine.

[0123] Corresponding to the aforementioned embodiments of the AR-based interactive method, this specification also provides embodiments of an AR-based interactive device.

[0124] The embodiments of the AR-based interactive device in this specification can be applied to electronic devices. The device embodiments can be implemented through software, hardware, or a combination of software and hardware. Taking software implementation as an example, as a device in a logical sense, it is formed by the processor of the electronic device in which it is located reading the corresponding computer program instructions in the non-volatile memory into the memory and running them. From the hardware level, if Figure 8 The figure is a hardware structure diagram of the electronic device where the AR interactive device is located in this manual, except Figure 8 In addition to the processor, memory, network interface, and non-volatile memory shown, the electronic device in which the device in the embodiment is located may also include other hardware according to the actual function of the AR-based interaction, which will not be described in detail.

[0125] Please refer to Fig. 9 , Fig. 9 It is a block diagram of an AR-based interactive device shown as an exemplary embodiment of this specification.

[0126] The above AR-based interactive device can be applied to Figure 8 The electronic device shown in the figure can be used as a client; the client is equipped with an image processing engine; the image processing engine is used to perform three-dimensional modeling on a two-dimensional mark hand-drawn by a user. The device may include:

[0127] An acquisition module 901 is used to acquire a two-dimensional mark drawn by a user;

[0128] A first calling module 902 calls the image processing engine to perform three-dimensional modeling on the acquired two-dimensional mark to obtain a three-dimensional mark corresponding to the two-dimensional mark;

[0129] The second calling module 903 calls the AR engine connected to the image processing engine to integrate the three-dimensional mark into the real scene picture taken by the client for enhanced display.

[0130] Optionally, the image processing engine includes a graphics engine and a rendering engine; the rendering engine provides a first API interface for performing visual rendering;

[0131] The acquisition module 901:

[0132] Calling the graphics engine to draw the hand-drawn trajectory of the user;

[0133] The graphics engine calls the first API interface provided by the rendering engine to perform visual rendering on the hand-drawn trajectory to generate a two-dimensional mark corresponding to the hand-drawn trajectory.

[0134] Optionally, the image processing engine includes a graphics engine and a rendering engine container built into the graphics engine.

[0135] Optionally, the acquisition module 901:

[0136] Calling the graphics engine to monitor the hand-drawing operation of the user on the drawing interface provided by the client to obtain the hand-drawing data of the user, and drawing the hand-drawing trajectory based on the monitored hand-drawing data; or

[0137] Receive hand-drawn data corresponding to the two-dimensional mark hand-drawn by other users shared to the user through their clients, and call the graphics engine to draw the hand-drawn trajectory based on the received hand-drawn data.

[0138] Optionally, the rendering engine further provides a second API interface for obtaining modeling information of the two-dimensional mark; the graphics engine provides a third API interface for performing three-dimensional modeling;

[0139] The first calling module 902:

[0140] The graphics engine calls the second API interface provided by the rendering engine to collect texture information of the two-dimensional mark, and processes the texture information into modeling data for three-dimensional modeling;

[0141] The third API interface provided by the graphics engine is called to perform three-dimensional modeling based on the modeling data to obtain a three-dimensional logo corresponding to the two-dimensional logo.

[0142] Optionally, the first calling module 902:

[0143] The graphics engine calls the second API interface provided by the rendering engine to collect texture information of the two-dimensional logo, processes the texture information into vector graphics data, and performs stretching transformation on the vector graphics data to generate Mesh data;

[0144] The third API interface provided by the graphics engine is called to perform three-dimensional modeling based on the Mesh data to obtain a three-dimensional logo corresponding to the two-dimensional logo.

[0145] Optionally, the AR engine provides a fourth API interface for performing target detection on a preset target in the real scene captured by the client, and a fifth API interface for performing position tracking on the preset target;

[0146] The second calling module 903:

[0147] The rendering engine calls the fourth API interface provided by the AR engine to perform target detection on a preset target in the real scene captured by the client, and based on the detected position of the preset target in the real scene, fuses the three-dimensional mark into the real scene for enhanced display;

[0148] The rendering engine calls the fifth API interface provided by the AR engine to track the position of the preset target, and based on the tracked position changes of the preset target, synchronously adjusts the display position of the three-dimensional logo in the real scene.

[0149] Optionally, the AR engine is a cross-platform AR engine; and the rendering engine includes a parser corresponding to the code supported by the AR engine.

[0150] Optionally, the graphics engine includes an Oasis engine; the rendering engine includes a Paladin engine that supports the JavaScript programming language, or a Paladin engine container built into the Oasis engine; and the AR engine includes an ARSession engine based on the JavaScript programming language.

[0151] Optionally, the AR engine includes an AR engine deployed locally on the client, or an AR engine deployed on a server corresponding to the client.

[0152] For the device embodiment, it basically corresponds to the method embodiment, so the relevant parts can be referred to the partial description of the method embodiment.

[0153] The device embodiments described above are merely illustrative, wherein the modules described as separate components may or may not be physically separated, and the components displayed as modules may or may not be physical modules, i.e., they may be located in one place, or may be distributed on multiple network modules. Some or all of the modules may be selected according to actual needs to achieve the purpose of the technical solution of this specification.

[0154] The systems, devices, modules or units described in the above embodiments may be implemented by computer chips or entities, or by products with certain functions. A typical implementation device is a computer, which may be in the form of a personal computer, a laptop computer, a cellular phone, a camera phone, a smart phone, a personal digital assistant, a media player, a navigation device, an email transceiver, a game console, a tablet computer, a wearable device or a combination of any of these devices.

[0155] In a typical configuration, a computer includes one or more processors (CPU), input / output interfaces, network interfaces, and memory.

[0156] The memory may include non-permanent storage in a computer-readable medium, random access memory (RAM) and / or non-volatile memory in the form of read-only memory (ROM) or flash RAM. The memory is an example of a computer-readable medium.

[0157] Computer-readable media include permanent and non-permanent, removable and non-removable media that can be used to store information by any method or technology. Information can be computer-readable instructions, data structures, program modules or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technology, compact disc read-only memory (CD-ROM), digital versatile disc (DVD) or other optical storage, magnetic cassettes, disk storage, quantum memory, graphene-based storage media or other magnetic storage devices or any other non-transmission media that can be used to store information that can be accessed by a computing device. As defined herein, computer-readable media does not include temporary computer-readable media (transitory media), such as modulated data signals and carrier waves.

[0158] It should also be noted that the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, commodity or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, commodity or device. In the absence of more restrictions, the elements defined by the sentence "comprises a ..." do not exclude the existence of other identical elements in the process, method, commodity or device including the elements.

[0159] The above is a description of a specific embodiment of the present specification. Other embodiments are within the scope of the appended claims. In some cases, the actions or steps recorded in the claims can be performed in an order different from that in the embodiments and still achieve the desired results. In addition, the processes depicted in the drawings do not necessarily require the specific order or continuous order shown to achieve the desired results. In some embodiments, multitasking and parallel processing are also possible or may be advantageous.

[0160] The terms used in one or more embodiments of this specification are only for the purpose of describing specific embodiments, and are not intended to limit one or more embodiments of this specification. The singular forms of "a", "said" and "the" used in one or more embodiments of this specification and the appended claims are also intended to include plural forms, unless the context clearly indicates other meanings. It should also be understood that the term "and / or" used herein refers to and includes any or all possible combinations of one or more associated listed items.

[0161] It should be understood that although the terms first, second, third, etc. may be used to describe various information in one or more embodiments of this specification, these information should not be limited to these terms. These terms are only used to distinguish the same type of information from each other. For example, without departing from the scope of one or more embodiments of this specification, the first information may also be referred to as the second information, and similarly, the second information may also be referred to as the first information. Depending on the context, the word "if" as used herein may be interpreted as "at the time of" or "when" or "in response to determining".

[0162] The above description is merely a preferred embodiment of one or more embodiments of the present specification and is not intended to limit one or more embodiments of the present specification. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of one or more embodiments of the present specification shall be included in the scope of protection of one or more embodiments of the present specification.

Claims

1. An AR-based interactive method, applied to a client; the client is equipped with an image processing engine; the image processing engine is used to perform three-dimensional modeling on a two-dimensional mark hand-drawn by a user; the image processing engine includes a graphics engine and a rendering engine; the rendering engine is connected to an AR engine; the AR engine is a cross-platform AR engine; the rendering engine includes a parser corresponding to a code supported by the AR engine; the graphics engine includes an Oasis engine; the rendering engine includes a Paladin engine supporting the JavaScript programming language, or a Paladin engine container built into the Oasis engine; The AR engine includes an ARSession engine based on the JavaScript programming language; the method includes: Get the user's hand-drawn 2D logo; Calling the image processing engine to perform three-dimensional modeling on the acquired two-dimensional mark to obtain a three-dimensional mark corresponding to the two-dimensional mark; The AR engine connected to the image processing engine is called to fuse the three-dimensional mark into the real scene picture taken by the client for enhanced display.

2. According to the method of claim 1, the rendering engine provides a first API interface for performing visual rendering; The step of obtaining the two-dimensional mark hand-drawn by the user includes: Calling the graphics engine to draw the hand-drawn trajectory of the user; The graphics engine calls the first API interface provided by the rendering engine to perform visual rendering on the hand-drawn trajectory to generate a two-dimensional mark corresponding to the hand-drawn trajectory.

3. The method according to claim 2, wherein calling the graphics engine to draw the hand-drawn trajectory of the user comprises: Calling the graphics engine to monitor the hand-drawing operation of the user on the drawing interface provided by the client to obtain the hand-drawing data of the user, and drawing the hand-drawing trajectory based on the monitored hand-drawing data; or Receive hand-drawn data corresponding to the two-dimensional mark hand-drawn by other users shared to the user through their clients, and call the graphics engine to draw the hand-drawn trajectory based on the received hand-drawn data.

4. According to the method of claim 2, the rendering engine further provides a second API interface for obtaining modeling data of the two-dimensional mark; the graphics engine provides a third API interface for performing three-dimensional modeling; The calling of the image processing engine to perform three-dimensional modeling on the acquired two-dimensional mark to obtain a three-dimensional mark corresponding to the two-dimensional mark includes: The graphics engine calls the second API interface provided by the rendering engine to collect texture information of the two-dimensional mark, and processes the texture information into modeling data for three-dimensional modeling; The third API interface provided by the graphics engine is called to perform three-dimensional modeling based on the modeling data to obtain a three-dimensional logo corresponding to the two-dimensional logo.

5. The method according to claim 4, wherein processing the texture information into modeling data for three-dimensional modeling comprises: Processing the texture information into vector data, and performing stretching transformation on the vector data to generate Mesh data; The performing three-dimensional modeling based on the modeling data includes: Three-dimensional modeling is performed based on the Mesh data.

6. According to the method of claim 2, the AR engine provides a fourth API interface for detecting a preset target in the real scene captured by the client, and a fifth API interface for tracking the position of the preset target; The calling of the AR engine connected to the image processing engine to fuse the three-dimensional mark into the real scene picture taken by the client for enhanced display includes: The rendering engine calls the fourth API interface provided by the AR engine to perform target detection on a preset target in the real scene captured by the client, and based on the detected position of the preset target in the real scene, fuses the three-dimensional mark into the real scene for enhanced display; The rendering engine calls the fifth API interface provided by the AR engine to track the position of the preset target, and based on the tracked position changes of the preset target, synchronously adjusts the display position of the three-dimensional logo in the real scene.

7. According to the method of claim 1, the AR engine includes an AR engine deployed locally on the client, or an AR engine deployed on a server corresponding to the client.

8. An AR-based interactive device, applied to a client; the client is equipped with an image processing engine; the image processing engine is used to perform three-dimensional modeling on a two-dimensional mark hand-drawn by a user; the image processing engine includes a graphics engine and a rendering engine; the rendering engine is connected to an AR engine; the AR engine is a cross-platform AR engine; the rendering engine includes a parser corresponding to the code supported by the AR engine; the graphics engine includes an Oasis engine; the rendering engine includes a Paladin engine that supports the JavaScript programming language, or a Paladin engine container built into the Oasis engine; The AR engine includes an ARSession engine based on the JavaScript programming language; the device includes: An acquisition module is used to acquire a two-dimensional logo drawn by a user; A first calling module calls the image processing engine to perform three-dimensional modeling on the acquired two-dimensional mark to obtain a three-dimensional mark corresponding to the two-dimensional mark; The second calling module calls the AR engine connected to the image processing engine to integrate the three-dimensional logo into the real scene picture taken by the client for enhanced display.

9. An electronic device, comprising: processor; a memory for storing processor-executable instructions; The processor implements the method according to any one of claims 1 to 7 by running the executable instructions.

10. A computer-readable storage medium having computer instructions stored thereon, wherein the instructions are executed by a processor to implement the method according to any one of claims 1 to 7.