AR special effects display method, device, computer equipment and storage medium

By acquiring and processing the video frame image of the AR device, determining the environmental information and processing it accordingly, it solves the problem of insufficient clarity and brightness of the image captured by the AR device, improves the display effect of AR special effects, and is suitable for specific environment display.

CN112884909BActive Publication Date: 2024-09-13ZHEJIANG SENSETIME TECH DEV CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202110203047.8
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-02-23
Publication Date
2024-09-13
Estimated Expiration
2041-02-23

AI Technical Summary

Technical Problem

Existing AR devices have low clarity or insufficient brightness when shooting images, resulting in poor AR special effects display effects, and cannot meet the needs of specific environments, resulting in poor AR special effects display effects.

Method used

By obtaining the video frame images collected by the AR device, determine the target AR special effects and scene environment information, perform corresponding processing of the environmental information, including time, brightness, scene and weather information, and adjust the video frame images to suit the display of AR special effects.

Benefits of technology

The display effect of AR special effects has been improved, making it more suitable for display in specific environments, enhancing the clarity and brightness of images, and improving the integrated display effect of AR special effects.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN112884909B
    Figure CN112884909B
Patent Text Reader

Abstract

The present disclosure provides a display method, device, computer equipment and storage medium for AR special effects, wherein the method includes: obtaining a video frame image obtained by an AR device capturing a target scene; determining a target AR special effect based on the video frame image, and determining environmental information of the target scene based on the video frame image; processing the video frame image corresponding to the environmental information based on the environmental information, and displaying the processed video frame image and the target AR special effect through the AR device. The embodiments of the present disclosure process the video frame image so that the video frame image is more suitable for displaying AR special effects after processing, thereby improving the display effect of the AR special effect.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to the field of augmented reality (AR) technology, and in particular to a display method, device, computer equipment and storage medium for AR special effects. Background Art

[0002] Augmented Reality (AR) technology is a technology that cleverly integrates virtual information with the real world. Specifically, AR technology can calculate the posture information of the AR device in real time, and determine the AR special effects based on the posture information of the AR device, and then superimpose the corresponding AR special effects on the front end of the picture shot by the AR device for display.

[0003] Currently, how to improve the display effect of AR special effects in AR devices is an important issue in the industry. Summary of the invention

[0004] The embodiments of the present disclosure at least provide a method, apparatus, computer equipment, and storage medium for displaying AR special effects.

[0005] In a first aspect, an embodiment of the present disclosure provides a method for displaying AR special effects, the display method comprising: acquiring a video frame image obtained by an AR device capturing a target scene; determining a target AR special effect based on the video frame image, and determining environmental information of the target scene based on the video frame image; based on the environmental information, processing the video frame image corresponding to the environmental information, and displaying the processed video frame image and the target AR special effect through the AR device.

[0006] The disclosed embodiment acquires a video frame image of a target scene captured by an AR device, determines a target AR special effect based on the video frame image, and determines environmental information of the target scene based on the video frame image; then, the AR device processes the video frame image corresponding to the environmental information based on the environmental information, and fuses the processed video frame image and the target AR special effect for display, so that the image can be adjusted based on the original effect of the video frame image to enhance the display effect of the AR special effect fused image.

[0007] In an optional embodiment, the video frame image is at least one frame image in a video stream; the video frame image is processed corresponding to the environmental information, and the processed video frame image and the target AR special effect are displayed through the AR device, including: processing at least part of the image in the video stream corresponding to the environmental information, and displaying the processed at least part of the image and the target AR special effect through the AR device.

[0008] In this way, the display effect of the fusion of video and AR special effects can be improved by processing at least part of the images in the video stream corresponding to the environmental information.

[0009] In an optional implementation, the environmental information includes at least one of the following: time information, brightness information, scene information, and weather information.

[0010] In this way, by using at least one of the time information, brightness information, scene information, and weather information, it is determined whether the AR special effects can effectively have a better effect when fused with the image for display.

[0011] In an optional implementation, for the case where the environmental information includes time information, determining the environmental information of the target scene based on the video frame image includes: reading the system time, and determining the time information of the target scene based on the system time; and / or, for the case where the environmental information includes brightness information, determining the environmental information of the target scene based on the video frame image includes: determining the brightness information of the target scene based on the pixel value of each pixel in the video frame image; and / or, for the case where the environmental information includes scene information, determining the environmental information of the target scene based on the video frame image includes: performing scene detection processing on the video frame image using a pre-trained scene detection model to obtain scene information of the target scene; and / or, for the case where the environmental information includes weather information, determining the environmental information of the target scene based on the video frame image includes: performing weather detection processing on the video frame image using a pre-trained weather detection model to obtain weather information of the target scene; or, obtaining geographic location information of the AR device; and obtaining weather information of the target scene based on the geographic location information.

[0012] In this way, through the above different processes, the environmental information of the video frame image can be obtained.

[0013] In an optional implementation, determining the target AR special effect based on the video frame image includes: determining the first pose information of the AR device in the target scene based on the video frame image; determining the target AR special effect from the at least one AR special effect based on the first pose information and the second pose information of at least one AR special effect in the target scene.

[0014] In this way, a target AR special effect to be displayed in the AR device can be determined from multiple AR special effects in the target scene.

[0015] In an optional implementation, determining the first pose information of the AR device in the target scene based on the video frame image includes: performing key point recognition on the video frame image to obtain a first key point in the video frame image; based on the first key point, determining a target second key point that matches the first key point from the second key point of the three-dimensional model of the target scene, and determining the first pose information of the AR device in the scene coordinate system based on the three-dimensional coordinate value of the target second key point in the scene coordinate system.

[0016] In this way, the first position information of the AR device in the scene coordinate system can be accurately determined.

[0017] In an optional implementation, the determining the first pose information of the AR device in the scene coordinate system based on the three-dimensional coordinate value of the second key point of the target in the scene coordinate system includes: determining the first pose information of the AR device in the scene coordinate system based on the two-dimensional coordinate value of the first key point in the image coordinate system and the three-dimensional coordinate value of the second key point of the target in the scene coordinate system.

[0018] In an optional implementation, it also includes: determining the target environment information corresponding to the target AR special effect; based on the environment information, processing the video frame image corresponding to the environment information, including: processing the video frame image based on the environment information and the target environment information.

[0019] In this way, the video frame image can be adjusted according to the environmental information required by different AR special effects, and the effect is better when the video frame image and the AR special effects are integrated and displayed.

[0020] In an optional implementation, the video frame image is processed corresponding to the environmental information, including: performing at least one of the following processing on the video frame image: brightness adjustment processing, saturation adjustment processing, hue adjustment processing, and clarity adjustment processing.

[0021] In a second aspect, an embodiment of the present disclosure also provides a display device for AR special effects, the display device comprising: an acquisition module, used to acquire a video frame image obtained by an AR device capturing a target scene; a first determination module, used to determine a target AR special effect based on the video frame image, and to determine environmental information of the target scene based on the video frame image; a processing module, used to perform processing on the video frame image corresponding to the environmental information based on the environmental information, and to display the processed video frame image and the target AR special effect through the AR device.

[0022] In an optional embodiment, the video frame image is at least one frame image in a video stream; when the processing module processes the video frame image corresponding to the environmental information and displays the processed video frame image and the target AR special effect through the AR device, it is used to: process at least part of the image in the video stream corresponding to the environmental information, and display at least part of the processed image and the target AR special effect through the AR device.

[0023] In an optional implementation, the environmental information includes at least one of the following: time information, brightness information, scene information, and weather information.

[0024] In an optional implementation, for the case where the environmental information includes time information, the first determination module is specifically used to: read the system time, and determine the time information of the target scene based on the system time; and / or, for the case where the environmental information includes brightness information, determining the environmental information of the target scene based on the video frame image includes: determining the brightness information of the target scene based on the pixel value of each pixel in the video frame image; and / or, for the case where the environmental information includes scene information, determining the environmental information of the target scene based on the video frame image includes: performing scene detection processing on the video frame image using a pre-trained scene detection model to obtain scene information of the target scene; and / or, for the case where the environmental information includes weather information, determining the environmental information of the target scene based on the video frame image includes: performing weather detection processing on the video frame image using a pre-trained weather detection model to obtain weather information of the target scene; or, obtaining geographic location information of the AR device; obtaining weather information of the target scene based on the geographic location information.

[0025] In an optional embodiment, the first determination module includes: a first determination unit, used to determine the first posture information of the AR device in the target scene based on the video frame image; a second determination unit, used to determine the target AR special effect from the at least one AR special effect based on the first posture information and the second posture information of at least one AR special effect in the target scene.

[0026] In an optional embodiment, the first determination unit is specifically used to: perform key point recognition on the video frame image to obtain a first key point in the video frame image; based on the first key point, determine a target second key point that matches the first key point from the second key point of the three-dimensional model of the target scene, and determine the first position information of the AR device in the scene coordinate system based on the three-dimensional coordinate value of the target second key point in the scene coordinate system.

[0027] In an optional implementation, the first determination unit is further used to determine the first position information of the AR device in the scene coordinate system based on the two-dimensional coordinate value of the first key point in the image coordinate system and the three-dimensional coordinate value of the target second key point in the scene coordinate system.

[0028] In an optional implementation, it also includes: a second determination module, used to determine the target environment information corresponding to the target AR special effect; the processing module is specifically used to: process the video frame image based on the environment information and the target environment information.

[0029] In an optional implementation, the processing module is further used to perform at least one of the following processing on the video frame image: brightness adjustment processing, saturation adjustment processing, hue adjustment processing, and clarity adjustment processing.

[0030] In a third aspect, an optional implementation of the present disclosure further provides a computer device, a processor, and a memory, wherein the memory stores machine-readable instructions executable by the processor, and the processor is used to execute the machine-readable instructions stored in the memory, and when the machine-readable instructions are executed by the processor, the machine-readable instructions perform the steps of the above-mentioned first aspect, or any possible implementation of the first aspect.

[0031] In a fourth aspect, an optional implementation of the present disclosure further provides a computer-readable storage medium, on which a computer program is stored, and when the computer program is executed, the steps of the above-mentioned first aspect, or any possible implementation of the first aspect are executed.

[0032] In order to make the above-mentioned objectives, features and advantages of the present disclosure more obvious and easy to understand, preferred embodiments are specifically cited below and described in detail with reference to the attached drawings. BRIEF DESCRIPTION OF THE DRAWINGS

[0033] In order to more clearly illustrate the technical solutions of the embodiments of the present disclosure, the following is a brief introduction to the drawings required for use in the embodiments. The drawings herein are incorporated into the specification and constitute a part of the specification. These drawings illustrate embodiments consistent with the present disclosure and are used together with the specification to illustrate the technical solutions of the present disclosure. It should be understood that the following drawings only illustrate certain embodiments of the present disclosure and should not be regarded as limiting the scope. For ordinary technicians in this field, other relevant drawings can also be obtained based on these drawings without creative work.

[0034] Figure 1 A flowchart of a method for displaying AR special effects provided by an embodiment of the present disclosure is shown;

[0035] Figure 2 A schematic diagram of a display device for AR special effects provided by an embodiment of the present disclosure is shown;

[0036] Figure 3 A specific schematic diagram of a first determination module in the display device of AR special effects provided by an embodiment of the present disclosure is shown;

[0037] Figure 4 A schematic diagram showing another display device for AR special effects provided by an embodiment of the present disclosure is shown;

[0038] Figure 5 A schematic diagram of a computer device provided by an embodiment of the present disclosure is shown. DETAILED DESCRIPTION

[0039] In order to make the purpose, technical scheme and advantages of the embodiments of the present disclosure clearer, the technical scheme in the embodiments of the present disclosure will be clearly and completely described below in conjunction with the drawings in the embodiments of the present disclosure. Obviously, the described embodiments are only part of the embodiments of the present disclosure, rather than all of the embodiments. The components of the embodiments of the present disclosure generally described and shown in the drawings here can be arranged and designed in various different configurations. Therefore, the following detailed description of the embodiments of the present disclosure provided in the drawings is not intended to limit the scope of the present disclosure for protection, but merely represents the selected embodiments of the present disclosure. Based on the embodiments of the present disclosure, all other embodiments obtained by those skilled in the art without making creative work belong to the scope of protection of the present disclosure.

[0040] Research has found that due to the shortcomings of AR devices themselves, the images they capture may have low clarity or insufficient brightness, resulting in poor display effects when AR special effects are displayed in AR devices. In addition, some AR special effects require a specific environment when displayed, and the images obtained through AR devices in many cases cannot meet the display environment of AR special effects, which also causes the problem of poor display effects of AR special effects.

[0041] Based on the above research, an embodiment of the present disclosure provides a method for displaying AR special effects. By processing an image, the image is made more suitable for displaying AR special effects in the processed environment, thereby improving the display effect of AR special effects.

[0042] The defects existing in the above solutions are the results obtained by the inventor after practice and careful research. Therefore, the discovery process of the above problems and the solutions proposed by the present disclosure for the above problems below should be the contributions made by the inventor to the present disclosure during the disclosure process.

[0043] It should be noted that similar reference numerals and letters denote similar items in the following drawings, and therefore, once an item is defined in one drawing, further definition and explanation thereof is not required in subsequent drawings.

[0044] To facilitate understanding of this embodiment, a display method of an AR special effect disclosed in an embodiment of the present disclosure is first introduced in detail. The execution subject of the display method of the AR special effect provided in the embodiment of the present disclosure is generally a computer device with certain computing capabilities, and the computer device includes, for example: an AR device or a server or other processing device. The AR device can be a user equipment (User Equipment, UE), a mobile device, a user terminal, a terminal, a cellular phone, a cordless phone, a personal digital assistant (Personal Digital Assistant, PDA), a handheld device, a computing device, a vehicle-mounted device, a wearable device, etc. In some possible implementations, the display method of the AR special effect can be implemented by a processor calling a computer-readable instruction stored in a memory.

[0045] The following describes a method for displaying AR special effects provided by an embodiment of the present disclosure.

[0046] See also Figure 1 FIG. 1 is a flowchart of a method for displaying AR special effects provided in an embodiment of the present disclosure, wherein the method includes steps S101 to S103, wherein:

[0047] S101: Obtaining a video frame image obtained by an AR device capturing a target scene;

[0048] S102: Determine a target AR special effect based on the video frame image, and determine environmental information of the target scene based on the video frame image;

[0049] S103: Based on the environmental information, the video frame image is processed corresponding to the environmental information, and the processed video frame image and the target AR special effect are displayed through the AR device.

[0050] The disclosed embodiments obtain video frame images of a target scene acquired by an AR device, determine a target AR special effect based on the video frame images, determine environmental information of the target scene based on the video frame images, and based on the environmental information, process the video frame images corresponding to the environmental information, and display the processed video frame images and the target AR special effect through the AR device. By processing the video frame images, the video frame images are more suitable for displaying AR special effects after processing, thereby improving the display effect of the AR special effects.

[0051] The above S101 to S103 are described in detail below.

[0052] 1. In the above S101, the video frame image is, for example, at least one frame image captured from a video stream captured by an AR device.

[0053] The video stream may be one or more. For example, for different shooting angles, multiple video streams corresponding to different angles may be generated; or for different field of view ranges, multiple video streams corresponding to different fields of view may be generated.

[0054] Exemplarily, the video frame images may be multiple video frame images captured from multiple video streams, or may be video frame images captured for different times or target requirements. For example, for a target video stream, a frame of image may be captured every 1 second or 1 minute as a video frame image. Alternatively, when a change in the captured video is detected, for example, a change in the shooting environment is detected, such as a significant change in brightness or blur; or a change in the captured object is detected, for example, when a significant change in the gender, height, clothing, etc. corresponding to the captured object in the video stream is detected, a frame of image is captured as a video frame image.

[0055] In the disclosed embodiment, when the AR device acquires the video stream, it can use the camera set on the AR device to collect it, or use another camera set to collect it. When the video stream is collected by using the other camera, the camera is connected to the AR device in communication, and the collected video stream can be sent to the AR device.

[0056] In the case where the display method of AR special effects provided in the embodiment of the present disclosure is executed in an AR device, after the AR device obtains the video stream, it samples the video stream to obtain a video frame image; in the case where the display method of AR special effects provided in the embodiment of the present disclosure is executed in a server, after the AR device obtains the video stream and samples the video stream to obtain a video frame image, it sends the sampled video frame image to the server. The server receives the video frame image sent by the AR device and performs subsequent processing.

[0057] 2. In the above S102, the environmental information of the target scene determined based on the video frame image includes, for example, at least one of the following: time information, brightness information, scene information, and weather information. Exemplary:

[0058] (1) In case that the environmental information includes time information, determining the environmental information of the target scene based on the video frame image includes: reading system time, and determining the time information of the target scene based on the system time.

[0059] Specifically, if time information is involved in the entire display process, the system time can be read, and the read system time can be used as the time information of the target scene. Exemplarily, after reading the system time and determining the time information of the target scene, when the environment required for the display of the target AR special effect does not match the time information of the target scene, for example, when the target AR special effect is fireworks, the environment required for display is generally at night, or in dim light; if the time information of the target scene indicates that the target scene is at noon, the brightness of the video frame image obtained under normal lighting conditions is usually high and not suitable for displaying fireworks, then the brightness of the video frame image should be reduced accordingly so that the fireworks can be more clearly displayed in the graphical user interface of the AR device.

[0060] Here, for example, the corresponding brightness information can be determined based on the acquired time information. For example, if the current time is 10:00 am, the current corresponding brightness can be determined to be a higher value, and if the current time is 10:00 pm, the current corresponding brightness can be determined to be a lower value.

[0061] (2) In the case where the environmental information includes brightness information, determining the environmental information of the target scene based on the video frame image includes: determining the brightness information of the target scene based on the pixel value of each pixel point in the video frame image.

[0062] Specifically, the brightness of each pixel on the video frame image can be obtained; the average value of the brightness of each pixel is determined as the brightness information of the target scene; or, the video frame image is divided into multiple image areas, and the brightness information of each image area is obtained; the weighted average value of the brightness information of each image area is determined as the brightness information of the target scene. Of the above two methods for obtaining the brightness information of the video frame image, the former method pays more attention to the overall brightness of the image, and correspondingly, the latter method pays more attention to the brightness of the key areas of the image, and can be selected according to actual conditions.

[0063] (3) In case that the environmental information includes scene information, determining the environmental information of the target scene based on the video frame image includes: using a pre-trained scene detection model to perform scene detection processing on the video frame image to obtain scene information of the target scene.

[0064] The scene detection model is obtained by training with samples of multiple different scenes. The training samples may include training samples of different scenes corresponding to different time periods, various weather conditions, and different brightness.

[0065] Exemplarily, after the scene detection model training is completed, the acquired video frame image can be input into the scene detection model for scene detection processing, so that the scene information of the target scene corresponding to the video frame image can be obtained, and the AR special effects of the corresponding scene can be displayed.

[0066] Here, the specific content of the scene information can be set according to actual needs and will not be repeated here.

[0067] (4) In case that the environmental information includes weather information, determining the environmental information of the target scene based on the video frame image includes: using a pre-trained weather detection model to perform weather detection processing on the video frame image to obtain the weather information of the target scene; or obtaining the geographic location information of the AR device; and obtaining the weather information of the target scene based on the geographic location information.

[0068] In a possible embodiment, the scene detection model is trained using a plurality of samples of different weather conditions. The training samples may include training samples of different weather conditions corresponding to different time periods.

[0069] Exemplarily, after the weather detection model is trained, the acquired video frame image can be input into the weather detection model for weather detection processing, so that the weather information of the target scene corresponding to the video frame image can be obtained.

[0070] In another possible embodiment, corresponding weather information may be obtained based on the geographical location of the device, such as longitude and latitude or a natural geographical area, and the current time point.

[0071] Exemplarily, a small processor can be provided in the AR device, and the processor can send and obtain signals. For example, the AR device sends instructions for obtaining weather information and the geographical information where it is located, and then it can receive the weather information returned by the cloud server or the terminal server. After determining the weather information, if the environmental information does not match the AR special effect to be displayed, for example, when the AR special effect to be displayed is raindrops, if the detected weather information is sunny, the fusion display of the AR special effect and the video frame image will result in an unrealistic effect. At this time, the video frame image can be processed, such as reducing the brightness of the video frame image, blurring the video frame image to a certain extent, etc., so that when the processed video frame image and the AR special effect are fused and displayed, the display effect is more realistic.

[0072] The target AR special effect refers to the AR special effect to be displayed in the AR device; generally, the AR special effects can be set for different positions of the target scene; when the video frame image acquired by the AR device includes the position corresponding to the setting of the AR special effect, the AR special effect at the corresponding position will be used as the target AR special effect.

[0073] In the embodiments of the present disclosure, for example, the target AR special effect may be determined in the following manner:

[0074] Based on the video frame image, first pose information of the AR device in the target scene is determined. Based on the first pose information and second pose information of at least one AR special effect in the target scene, the target AR special effect is determined from the at least one AR special effect.

[0075] In a specific implementation, the first posture information includes the first three-dimensional coordinate value of the optical center of the image acquisition device deployed on the AR device in the scene coordinate system, and the optical axis orientation information of the image acquisition device; the optical axis orientation information may include, for example: the deflection angle and pitch angle of the optical axis of the image acquisition device in the scene coordinate system established based on the target scene; or the optical axis orientation information is, for example, a vector in the scene coordinate system.

[0076] In a possible implementation, when determining the first pose information of the AR device in the scene coordinate system corresponding to the target scene based on the video frame image acquired by the AR device, key point recognition can be performed on the video frame image to obtain the first key point in the video frame image; based on the first key point, a target second key point matching the first key point is determined from the second key points in the three-dimensional model established based on the target scene, and the first pose information of the AR device in the scene coordinate system is determined based on the three-dimensional coordinate value of the target second key point in the scene coordinate system.

[0077] In a specific implementation, the first key point includes, for example, at least one of the following: a key point representing contour information of an object contour, a key point representing color block information on the surface of an object, and a key point representing a texture change on the surface of an object.

[0078] After the key point recognition is performed on the video frame image and the first key point in the video frame image is obtained, it will be matched with the second key point in the pre-built three-dimensional model of the target scene, and the target second key point that can match the first key point is determined from the second key point. At this time, the object represented by the target second key point is the same object as the object represented by the first key point. Furthermore, the three-dimensional coordinate value of the second target key point in the three-dimensional model is the three-dimensional coordinate value of the first key point in the three-dimensional model.

[0079] Here, the three-dimensional model of the target scene can be obtained, for example, by any of the following methods: Simultaneous Localization and Mapping (SLAM) modeling, Structure-From-Motion (SFM) modeling.

[0080] Exemplarily, when constructing a three-dimensional model of a target scene, a three-dimensional coordinate system is established with a preset coordinate point as the origin; wherein the preset coordinate point can be a coordinate point of a building in the target scene or a coordinate point where a camera device is located when the camera captures the target scene.

[0081] The camera captures video images and constructs a three-dimensional model of the target scene by tracking a sufficient number of key points in the camera video frame; wherein the key points in the constructed three-dimensional model of the target scene also include the key point information of the above-mentioned objects, that is, the second key points.

[0082] The first key point is matched with a sufficient number of second key points in the three-dimensional model of the target scene, the target second key point is determined, and the three-dimensional coordinate value (x1, y1, z1) of the target second key point in the three-dimensional model of the target scene is read. Then, based on the three-dimensional coordinate value of the target second key point, the first position information of the AR device in the scene coordinate system is determined.

[0083] Specifically, when determining the first position information of the AR device in the scene coordinate system based on the three-dimensional coordinate value of the second key point of the target, for example, by utilizing the principle of camera imaging, the first position information of the AR device in the three-dimensional model is restored according to the three-dimensional coordinate value of the second key point of the target in the three-dimensional model.

[0084] Here, when using the camera imaging principle to restore the first pose information of the AR device in the three-dimensional model, for example, the target pixel point corresponding to the first key point in the video frame image can be determined; based on the two-dimensional coordinate value of the target pixel point in the image coordinate system and the three-dimensional coordinate value of the target second key point in the scene coordinate system, the first pose information of the AR device in the scene coordinate system is determined.

[0085] Specifically, an AR device can be used to construct a camera coordinate system; wherein the origin of the camera coordinate system is the point where the optical center of the image acquisition device in the AR device is located; the z-axis is the straight line where the optical axis of the image acquisition device is located; the plane perpendicular to the optical axis and where the optical center is located is the plane where the x-axis and the y-axis are located; the depth detection algorithm can be used to determine the depth values ​​corresponding to each pixel point in the video frame image; after the target pixel point is determined in the video frame image, the depth value h of the target pixel point in the camera coordinate system can be obtained; that is, the three-dimensional coordinate value of the first key point corresponding to the target pixel point in the camera coordinate system can be obtained; then, the three-dimensional coordinate value of the first key point in the camera coordinate system and the three-dimensional coordinate value of the first key point in the scene coordinate system are used to restore the coordinate value of the origin of the camera coordinate system in the scene coordinate system, that is, the position information of the AR device in the first position information in the scene coordinate system, and the z-axis of the camera coordinate system is used to determine the angle of the z-axis in the scene coordinate system relative to each coordinate axis of the scene coordinate system, and the posture information of the AR device in the first position information in the scene coordinate system is obtained.

[0086] For example, the three-dimensional coordinate value of the target pixel in the camera coordinate system is expressed as (x2, y2, h).

[0087] Based on the acquired three-dimensional coordinate value (x1, y1, z1) of the target second key point in the scene coordinate system and the determined three-dimensional coordinate value (x2, y2, h) of the target pixel point in the camera coordinate system, the first position information of the AR device in the scene coordinate system is determined according to the mapping relationship (x1, y1, z1)→(x2, y2, h).

[0088] In another possible implementation, when determining the first pose information of the AR device in the scene coordinate system corresponding to the target scene based on the video frame image acquired by the AR device, scene key points can be first identified on the video frame image to determine the target pixel points corresponding to at least one scene key point in the video frame image, and depth value prediction can be performed on the video frame image to determine the depth values ​​corresponding to each pixel point in the video frame image, and then the first pose information of the AR device can be determined based on the depth value corresponding to the target pixel point.

[0089] After determining the first pose information of the AR device in the scene coordinate system, the target AR special effect can be determined based on the first pose information in the scene coordinate system and the second pose information of the AR special effect in the target scene, for example, in the following manner.

[0090] Exemplarily, the target scene may include multiple objects; for at least some of the objects in the target scene, AR special effects corresponding to the objects in the target scene may be pre-set; the objects may include, for example, at least one of the following: scenic spots, museum exhibits, functional buildings, etc.

[0091] In a specific implementation, the target object refers to at least a portion of the object contained in the video frame image acquired by the AR device. The target object can be obtained, for example, in the following manner: performing key point recognition on the video frame image to obtain a first key point, based on the first key point, determining a target second key point matching the first key point from the second key point of the three-dimensional model of the target scene, and determining the object to which the second key point belongs as the target object.

[0092] Then, based on the target object and the association relationship between the target object and the AR special effect, the AR special effect associated with the target object is determined.

[0093] In a possible implementation, all AR special effects that can be associated with the target object are used as target AR special effects.

[0094] In another possible implementation, a target AR special effect may be determined from all AR special effects associated with the target object based on certain screening criteria.

[0095] For example, when setting an AR special effect for an object, second position information within the target scene can be determined for the AR special effect.

[0096] Among them, the second pose information of the AR special effect in the target scene, for example, is the second pose information of the AR special effect in the scene coordinate system, and the second pose information includes, for example: the AR special effect in the scene coordinate system, the three-dimensional coordinate value of the AR special effect, and the pose in the scene coordinate system.

[0097] After the target object is determined, the target AR special effect is determined based on the first posture information and the second posture information of the AR special effect corresponding to the target object in the scene coordinate system.

[0098] In another embodiment of the present disclosure, after determining the target AR special effect, third posture information of the target AR special effect relative to the AR device may also be determined.

[0099] The third posture information is used to determine the display position and display posture of the AR device to display the target AR special effect. In this way, the AR device can display the target AR special effect based on the third posture information, which can make the AR special effect have a richer display form.

[0100] With respect to the above S104, when the target object of the video frame image and the corresponding target AR special effect are associated and displayed through the AR device, when the display method of the AR special effect provided in the embodiment of the present disclosure is executed on the server side, the target AR special effect is sent to the AR device, so that the AR device associates and displays the target object and the corresponding target AR special effect. When the display method of the AR special effect provided in the embodiment of the present disclosure is executed on the AR device, after determining the target AR special effect, the AR device directly associates and displays the target AR special effect and the target object.

[0101] Taking the display of AR special effects in an AR device as an example, the AR device can identify the target object and its position in the video frame image from the acquired video frame image; based on the position, the corresponding target AR special effect and target object are associated and displayed.

[0102] In another embodiment of the present disclosure, it also includes determining target environment information corresponding to the target AR special effect.

[0103] Exemplarily, when adding AR special effects to a target scene, for example, target environment information can be pre-configured for the AR special effect; for example, if the AR special effect is fireworks, the target environment information set for it may be: the brightness is lower than a preset brightness threshold; for another example, if the AR special effect is snowflakes, the target environment information set for it may be: the brightness is lower than a preset brightness threshold, and the blurriness is greater than a preset blurriness threshold.

[0104] The target environment information added to the AR special effect can be added to each AR special effect in the form of a tag, and the tag and the AR special effect are associated and saved. When any AR special effect is determined as a target AR special effect, the tag associated with the target AR special effect can be read to obtain the target environment information of the target AR special effect.

[0105] After obtaining the target environmental information, the environmental information determined from the video frame image is matched with the target environmental information; when the two are inconsistent, the video frame image is adjusted so that the environmental information of the adjusted video frame image can be consistent with or close to the target environmental information, thereby making the adjusted video frame image more suitable for the display of the target AR special effects and improving the display effect.

[0106] Third, in the above S103, the video frame image is processed corresponding to the environmental information. For example, only the video frame image can be processed to obtain an image with a better fusion effect of AR special effects and video frame images; or at least part of the image in the video stream can be processed corresponding to the environmental information, and the processed at least part of the image and the target AR special effect can be displayed through the AR device.

[0107] Here, for example, at least part of the image to be processed may be determined in the following manner:

[0108] Part of the images in the video stream whose timestamps are later than the current video frame image and whose timestamps are earlier than the next video frame image are used as at least part of the images to be processed.

[0109] Processing at least part of the images in the video stream corresponding to the environmental information includes: performing at least one of the following processing on at least part of the images in the video stream: brightness adjustment processing, saturation adjustment processing, hue adjustment processing, and clarity adjustment processing.

[0110] For example, taking brightness adjustment processing as an example, if the target AR special effects are fireworks, lightning, snowflakes and other AR special effects, the required environmental information is usually of low brightness. If the brightness of the video frame image is high, the brightness of the image can be reduced to make the AR special effects more obvious.

[0111] Taking hue adjustment processing as an example, if the target AR special effect is a reddish special effect such as flame or sunset, and the corresponding image is a cold-toned image, in order to make the AR special effect better integrated with the environment, it is necessary to perform hue processing on the image. The hue of the image in the video stream changes toward warmer colors, so that the display of the AR special effect can be realistic.

[0112] The saturation adjustment processing and the clarity adjustment processing are both for improving the final display effect, which will not be elaborated here.

[0113] Those skilled in the art will appreciate that, in the above method of specific implementation, the order in which the steps are written does not imply a strict execution order and does not constitute any limitation on the implementation process. The specific execution order of the steps should be determined by their functions and possible internal logic.

[0114] Based on the same inventive concept, the embodiment of the present disclosure also provides a display device for AR special effects corresponding to the display method of AR special effects. Since the principle of solving the problem by the device in the embodiment of the present disclosure is similar to the display method of AR special effects in the embodiment of the present disclosure, the implementation of the device can refer to the implementation of the method, and the repeated parts will not be repeated.

[0115] Reference Figure 2 , Figure 3 , Figure 4 As shown, Figure 2 A schematic diagram of displaying an AR special effect provided by an embodiment of the present disclosure is shown. Figure 3 A specific schematic diagram of a first determination module in the display device of AR special effects provided in an embodiment of the present disclosure, Figure 4A schematic diagram of another display of AR special effects provided by an embodiment of the present disclosure. The display device includes: an acquisition module 210, a first determination module 220, and a processing module 230;

[0116] The acquisition module 210 is used to acquire a video frame image obtained by the AR device capturing the target scene;

[0117] A first determination module 220 is used to determine a target AR special effect based on the video frame image, and to determine environmental information of the target scene based on the video frame image;

[0118] The processing module 230 is used to process the video frame image corresponding to the environmental information based on the environmental information, and display the processed video frame image and the target AR special effect through the AR device.

[0119] The disclosed embodiments provide a method for optimizing and improving an image based on the original effect of a video frame image, thereby achieving the purpose of enhancing the display effect of an AR special effect fused image and improving the image shooting efficiency.

[0120] In an optional embodiment, the video frame image is at least one frame image in a video stream; when the processing module 230 processes the video frame image corresponding to the environmental information and displays the processed video frame image and the target AR special effect through the AR device, it is used to: process at least part of the image in the video stream corresponding to the environmental information, and display the processed at least part of the image and the target AR special effect through the AR device.

[0121] In an optional implementation, the environmental information includes at least one of the following: time information, brightness information, scene information, and weather information.

[0122] In an optional implementation manner, in the case where the environment information includes time information, the first determining module 220 is specifically configured to:

[0123] Reading the system time, and determining the time information of the target scene based on the system time;

[0124] and / or,

[0125] In the case where the environmental information includes brightness information, the first determining module is specifically configured to:

[0126] Determining brightness information of the target scene based on the pixel value of each pixel point in the video frame image;

[0127] and / or,

[0128] In the case where the environmental information includes scene information, the first determining module 220 is specifically configured to:

[0129] Using a pre-trained scene detection model, performing scene detection processing on the video frame image to obtain scene information of the target scene;

[0130] and / or,

[0131] In the case where the environmental information includes weather information, the first determining module is specifically configured to:

[0132] Using a pre-trained weather detection model, perform weather detection processing on the video frame image to obtain weather information of the target scene; or obtain geographic location information of the AR device; based on the geographic location information, obtain weather information of the target scene.

[0133] In an optional implementation, Figure 3 As shown, the first determination module 220 includes:

[0134] A first determining unit 221 is used to determine the first pose information of the AR device in the target scene based on the video frame image;

[0135] The second determining unit 222 is configured to determine the target AR special effect from the at least one AR special effect based on the first posture information and second posture information of the at least one AR special effect in the target scene.

[0136] In an optional implementation manner, the first determining unit 221 is specifically configured to:

[0137] Performing key point recognition on the video frame image to obtain a first key point in the video frame image;

[0138] Based on the first key point, determine the target second key point matching the first key point from the second key point of the three-dimensional model of the target scene, and determine the first pose information of the AR device in the scene coordinate system based on the three-dimensional coordinate value of the target second key point in the scene coordinate system.

[0139] In an optional implementation manner, the first determining unit 221 is further configured to:

[0140] Based on the two-dimensional coordinate value of the first key point in the image coordinate system and the three-dimensional coordinate value of the target second key point in the scene coordinate system, the first position information of the AR device in the scene coordinate system is determined.

[0141] In an optional implementation, Figure 4 As shown, the display device also includes:

[0142] A second determination module 240 is used to determine target environment information corresponding to the target AR special effect;

[0143] The processing module 230 is specifically used for:

[0144] The video frame image is processed based on the environmental information and the target environmental information.

[0145] In an optional implementation manner, the processing module 230 is further configured to:

[0146] Perform at least one of the following processing on the video frame image:

[0147] Brightness adjustment processing, saturation adjustment processing, hue adjustment processing, and sharpness adjustment processing.

[0148] For descriptions of the processing flow of each module in the display device and the interaction flow between each module, reference may be made to the relevant descriptions in the above method embodiment, which will not be described in detail here.

[0149] The present disclosure also provides a computer device, such as Figure 5 FIG. 1 is a schematic diagram of a computer device structure provided in an embodiment of the present disclosure, including:

[0150] A processor 11 and a memory 12; the memory 12 stores machine-readable instructions executable by the processor 11, and when the computer device is running, the machine-readable instructions are executed by the processor to implement the following steps:

[0151] Obtain the video frame image obtained by the AR device capturing the target scene;

[0152] Determining a target AR special effect based on the video frame image, and determining environmental information of the target scene based on the video frame image;

[0153] Based on the environmental information, the video frame image is processed corresponding to the environmental information, and the processed video frame image and the target AR special effect are displayed through the AR device.

[0154] In an optional embodiment, in the instructions executed by the processor 11, the video frame image is at least one frame image in a video stream; the video frame image is processed corresponding to the environmental information, and the processed video frame image and the target AR special effect are displayed through the AR device, including: processing at least part of the image in the video stream corresponding to the environmental information, and displaying the processed at least part of the image and the target AR special effect through the AR device.

[0155] In an optional implementation, in the instructions executed by the processor 11, the environmental information includes at least one of the following: time information, brightness information, scene information, and weather information.

[0156] In an optional implementation manner, in the instruction executed by the processor 11, for the case where the environmental information includes time information, determining the environmental information of the target scene based on the video frame image includes:

[0157] Reading the system time, and determining the time information of the target scene based on the system time;

[0158] and / or,

[0159] In the case where the environmental information includes brightness information, determining the environmental information of the target scene based on the video frame image includes:

[0160] Determining brightness information of the target scene based on the pixel value of each pixel point in the video frame image;

[0161] and / or,

[0162] In the case where the environmental information includes scene information, determining the environmental information of the target scene based on the video frame image includes:

[0163] Using a pre-trained scene detection model, performing scene detection processing on the video frame image to obtain scene information of the target scene;

[0164] and / or,

[0165] In the case where the environmental information includes weather information, determining the environmental information of the target scene based on the video frame image includes:

[0166] Using a pre-trained weather detection model, perform weather detection processing on the video frame image to obtain weather information of the target scene; or obtain geographic location information of the AR device; based on the geographic location information, obtain weather information of the target scene.

[0167] In an optional implementation manner, in the instructions executed by the processor 11, determining the target AR special effect based on the video frame image includes:

[0168] Based on the video frame image, determining first position information of the AR device in the target scene;

[0169] Based on the first pose information and second pose information of at least one AR effect in the target scene, the target AR effect is determined from the at least one AR effect.

[0170] In an optional implementation manner, in the instructions executed by the processor 11, determining the first pose information of the AR device in the target scene based on the video frame image includes:

[0171] Performing key point recognition on the video frame image to obtain a first key point in the video frame image;

[0172] Based on the first key point, determine the target second key point matching the first key point from the second key point of the three-dimensional model of the target scene, and determine the first pose information of the AR device in the scene coordinate system based on the three-dimensional coordinate value of the target second key point in the scene coordinate system.

[0173] In an optional implementation, in the instruction executed by the processor 11, determining the first pose information of the AR device in the scene coordinate system based on the three-dimensional coordinate value of the second key point of the target in the scene coordinate system includes:

[0174] Based on the two-dimensional coordinate value of the first key point in the image coordinate system and the three-dimensional coordinate value of the target second key point in the scene coordinate system, the first position information of the AR device in the scene coordinate system is determined.

[0175] In an optional implementation, the instructions executed by the processor 11 also include: determining the target environment information corresponding to the target AR special effect; based on the environment information, processing the video frame image corresponding to the environment information, including: processing the video frame image based on the environment information and the target environment information.

[0176] In an optional implementation, the video frame image is processed corresponding to the environmental information, including: performing at least one of the following processing on the video frame image: brightness adjustment processing, saturation adjustment processing, hue adjustment processing, and clarity adjustment processing.

[0177] The present disclosure also provides a computer-readable storage medium, on which a computer program is stored, and when the computer program is executed by a processor, the steps of the method for displaying AR special effects described in the above method embodiment are executed. The storage medium may be a volatile or non-volatile computer-readable storage medium.

[0178] The computer program product of the method for displaying AR special effects provided in the embodiments of the present disclosure includes a computer-readable storage medium storing program code, and the instructions included in the program code can be used to execute the steps of the method for displaying AR special effects described in the above method embodiments. For details, please refer to the above method embodiments, which will not be repeated here.

[0179] The present disclosure also provides a computer program, which implements any one of the methods of the aforementioned embodiments when executed by a processor. The computer program product can be implemented in hardware, software, or a combination thereof. In an optional embodiment, the computer program product is embodied as a computer storage medium, and in another optional embodiment, the computer program product is embodied as a software product, such as a software development kit (SDK), etc.

[0180] Those skilled in the art can clearly understand that, for the convenience and simplicity of description, the specific working process of the system and device described above can refer to the corresponding process in the aforementioned method embodiment, and will not be repeated here. In the several embodiments provided in the present disclosure, it should be understood that the disclosed system, device and method can be implemented in other ways. The device embodiments described above are merely schematic. For example, the division of the units is only a logical function division. There may be other division methods in actual implementation. For example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some communication interfaces, and the indirect coupling or communication connection of the device or unit can be electrical, mechanical or other forms.

[0181] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0182] In addition, each functional unit in each embodiment of the present disclosure may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit.

[0183] If the functions are implemented in the form of software functional units and sold or used as independent products, they can be stored in a non-volatile computer-readable storage medium that is executable by a processor. Based on this understanding, the technical solution of the present disclosure, or the part that contributes to the prior art or the part of the technical solution, can be embodied in the form of a software product, which is stored in a storage medium and includes several instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present disclosure. The aforementioned storage medium includes: various media that can store program codes, such as a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk.

[0184] Finally, it should be noted that the above-described embodiments are only specific implementation methods of the present disclosure, which are used to illustrate the technical solutions of the present disclosure, rather than to limit them. The protection scope of the present disclosure is not limited thereto. Although the present disclosure is described in detail with reference to the above-described embodiments, ordinary technicians in the field should understand that any technician familiar with the technical field can still modify the technical solutions recorded in the above-described embodiments within the technical scope disclosed in the present disclosure, or can easily think of changes, or make equivalent replacements for some of the technical features therein; and these modifications, changes or replacements do not make the essence of the corresponding technical solutions deviate from the spirit and scope of the technical solutions of the embodiments of the present disclosure, and should be included in the protection scope of the present disclosure. Therefore, the protection scope of the present disclosure should be based on the protection scope of the claims.

Claims

1. A method for displaying AR special effects, It is characterized in that The display method comprises: Obtain the video frame image obtained by the AR device capturing the target scene; Determine a target AR special effect based on the video frame image, and determine environmental information of the target scene based on the video frame image; the environmental information includes at least one of the following: time information, brightness information, scene information, and weather information; Based on the environmental information, the video frame image is processed corresponding to the environmental information, and the processed video frame image and the target AR special effect are displayed through the AR device; It also includes: determining target environment information corresponding to the target AR special effect; The processing of the video frame image corresponding to the environmental information based on the environmental information includes: Matching the environmental information determined from the video frame image with the target environmental information; if the two are inconsistent, adjusting the video frame image so that the environmental information of the adjusted video frame image can be consistent with or close to the target environmental information; The processing of the video frame image corresponding to the environmental information includes: Perform at least one of the following processing on the video frame image: Brightness adjustment processing, saturation adjustment processing, hue adjustment processing, and sharpness adjustment processing.

2. The display method according to claim 1, It is characterized in that The video frame image is at least one frame image in a video stream; Processing the video frame image corresponding to the environmental information, and displaying the processed video frame image and the target AR special effect through the AR device, including: Process at least a portion of the images in the video stream corresponding to the environmental information, and display the processed at least a portion of the images and the target AR special effect through the AR device.

3. The display method according to claim 1, It is characterized in that In case that the environmental information includes time information, determining the environmental information of the target scene based on the video frame image includes: Reading system time, and determining time information of the target scene based on the system time; and / or, In the case where the environmental information includes brightness information, determining the environmental information of the target scene based on the video frame image includes: Determining brightness information of the target scene based on the pixel value of each pixel point in the video frame image; and / or, In the case where the environmental information includes scene information, determining the environmental information of the target scene based on the video frame image includes: Using a pre-trained scene detection model, performing scene detection processing on the video frame image to obtain scene information of the target scene; and / or, In the case where the environmental information includes weather information, determining the environmental information of the target scene based on the video frame image includes: Using a pre-trained weather detection model, perform weather detection processing on the video frame image to obtain weather information of the target scene; or obtain geographic location information of the AR device; based on the geographic location information, obtain weather information of the target scene.

4. The display method according to any one of claims 1 to 3, It is characterized in that The determining a target AR special effect based on the video frame image includes: Based on the video frame image, determining first position information of the AR device in the target scene; Based on the first pose information and second pose information of at least one AR effect in the target scene, the target AR effect is determined from the at least one AR effect.

5. The display method according to claim 4, It is characterized in that The determining, based on the video frame image, first position information of the AR device in the target scene includes: Performing key point recognition on the video frame image to obtain a first key point in the video frame image; Based on the first key point, determine the target second key point that matches the first key point from the second key point of the three-dimensional model of the target scene, and determine the first pose information of the AR device in the scene coordinate system based on the three-dimensional coordinate value of the target second key point in the scene coordinate system.

6. The display method according to claim 5, It is characterized in that The determining, based on the three-dimensional coordinate value of the second key point of the target in the scene coordinate system, the first pose information of the AR device in the scene coordinate system includes: Based on the two-dimensional coordinate value of the first key point in the image coordinate system and the three-dimensional coordinate value of the target second key point in the scene coordinate system, the first position information of the AR device in the scene coordinate system is determined.

7. A display device for AR special effects, It is characterized in that The display device comprises: An acquisition module is used to acquire a video frame image obtained by an AR device capturing a target scene; A first determination module is used to determine a target AR special effect based on the video frame image, and to determine environmental information of the target scene based on the video frame image; the environmental information includes at least one of the following: time information, brightness information, scene information, and weather information; A processing module, configured to process the video frame image corresponding to the environmental information based on the environmental information, and display the processed video frame image and the target AR special effect through the AR device; Also included is: a second determination module for determining target environment information corresponding to the target AR special effect The processing module is specifically used to: match the environmental information determined from the video frame image with the target environmental information; if the two are inconsistent, adjust the video frame image so that the environmental information of the adjusted video frame image can be consistent with or close to the target environmental information; The processing module, when processing the video frame image corresponding to the environmental information, is used to: Perform at least one of the following processing on the video frame image: Brightness adjustment processing, saturation adjustment processing, hue adjustment processing, and sharpness adjustment processing.

8. A computer device, It is characterized in that include: A processor and a memory, wherein the memory stores machine-readable instructions executable by the processor, and the processor is used to execute the machine-readable instructions stored in the memory. When the machine-readable instructions are executed by the processor, the processor executes the steps of the method for displaying AR special effects as described in any one of claims 1 to 6.

9. A computer-readable storage medium, It is characterized in that The computer-readable storage medium stores a computer program. When the computer program is executed by a computer device, the computer device executes the steps of the method for displaying AR special effects according to any one of claims 1 to 6.