Virtual and Real Material Color Alignment Method, Device, Equipment and Storage Medium

Automatically determine the virtual scene object and the real scene object through electronic devices, and adjust the virtual scene object based on the real scene color, solving the problem of low efficiency and low accuracy of material color adjustment in virtual shooting, achieving efficient and accurate material color alignment.

CN117560577BActive Publication Date: 2025-07-11DIVINE VISION (SHENZHEN) CULTURE TECH CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202311406175.8
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-10-26
Publication Date
2025-07-11
Estimated Expiration
2043-10-26

AI Technical Summary

Technical Problem

In the prior art, the material color adjustment of the unreal scene and actual scene during virtual shooting is low efficiency and low accuracy, and manual adjustment requires time-consuming and manual experience.

Method used

Through electronic devices in response to user interaction, they obtain real-time shooting screens and automatically determine the virtual scene objects and real scene objects. The color of the virtual scene objects is adjusted based on the color of the real scene objects to ensure the consistent viewing and feeling.

Benefits of technology

It improves the efficiency of color adjustment, saves user time, and improves the accuracy of color alignment, real and automatic alignment of virtual and real materials.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117560577B_ABST
    Figure CN117560577B_ABST
Patent Text Reader

Abstract

An embodiment of the present application provides a method, device, equipment and storage medium for aligning the material colors of virtual and real scenes. The method includes: the electronic device responds to the user's interaction operation, acquires and displays the real-time captured image; in the real-time captured image, determines the virtual scene object and the real scene object to be aligned; based on the first color of the real scene object, adjusts the color of the virtual scene object. In the present application, the electronic device displays the real-time captured image of the camera based on the user's interaction operation, determines the virtual scene object and the real scene object to be aligned in the real-time captured image, and then adjusts the color of the virtual scene object according to the first color of the real scene object to ensure that the virtual scene object and the real scene object have the same visual effect. In this way, the electronic device can automatically align the material colors of the real scene and the virtual scene in the virtual captured image, without the need for the user to manually perform color adjustment operations, improving the efficiency of color adjustment, saving the user's time, and also improving the accuracy of color alignment.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of computer technology, and in particular, to a method, apparatus, device, and storage medium for aligning virtual and real material colors. Background Art

[0002] With the continuous development of the Internet and artificial intelligence algorithms, etc., the application of virtual shooting technology is becoming more and more widespread. Virtual shooting technology may refer to a technology that displays an illusory scene through a display screen of a type such as a Light Emitting Diode (LED) at the shooting site and directly shoots a composite picture.

[0003] In order to ensure that the visual experience of the illusory scene is consistent with that of the actual scene, in the related art, users usually need to manually adjust the color of the assets of the illusory scene, such as performing picture rendering. This manual adjustment method has low efficiency, consumes a lot of time of users, and due to the fact that users make manual adjustments based on artificial experience, the accuracy is not high either. Summary of the Invention

[0004] Multiple aspects of this application provide a method, apparatus, device, and storage medium for aligning virtual and real material colors, so as to improve the efficiency of color adjustment, save the time of users, and improve the accuracy of color adjustment.

[0005] In a first aspect, an embodiment of this application provides a method for aligning virtual and real material colors, including:

[0006] In response to a user's interaction operation, obtain and display a real-time captured image;

[0007] In the real-time captured image, determine a virtual scene object and a real scene object to be aligned;

[0008] Based on the first color of the real scene object, adjust the color of the virtual scene object.

[0009] In a possible implementation manner, the obtaining and displaying a real-time captured image in response to a user's interaction operation includes:

[0010] In response to a user's start operation, display a preset color alignment control;

[0011] In response to a user's touch operation on the preset color alignment control, obtain and display a real-time captured image.

[0012] In a possible implementation manner, the determining a virtual scene object and a real scene object to be aligned in the real-time captured image includes:

[0013] In the real-time captured image, in response to a user's selection operation, determine the object to be aligned corresponding to the selection operation;

[0014] Determine the virtual scene object and the real scene object among the objects to be aligned.

[0015] In a possible implementation manner, determining the virtual scene object and the real scene object to be aligned in the real-time captured image includes:

[0016] In the real-time captured image, determine the objects to be aligned in the real-time captured image according to a preset image recognition algorithm;

[0017] Determine the virtual scene object and the real scene object among the objects to be aligned.

[0018] In a possible implementation manner, determining the virtual scene object and the real scene object among the objects to be aligned includes:

[0019] In response to the user's annotation operation, determine the virtual scene object or the real scene object among the objects to be aligned according to the annotation operation; or,

[0020] Modify the preset attributes of the virtual image, determine the object with the changed preset attributes among the objects to be aligned as the virtual scene object, and determine the object with the unchanged preset attributes among the objects to be aligned as the real scene object; restore the preset attributes of the virtual scene object.

[0021] In a possible implementation manner, the color adjustment of the virtual scene object based on the first color of the real scene object includes:

[0022] Set the virtual scene color of the virtual scene object to the first color value corresponding to the first color; or,

[0023] Add a color layer corresponding to the virtual scene object; the color value of the color layer is the first color value.

[0024] In a possible implementation manner, the method further includes:

[0025] Obtain the second color of the adjusted virtual scene object;

[0026] Determine the color difference between the first color and the second color;

[0027] In the case that the color difference is less than a preset threshold, determine the virtual scene object with the second color as the target virtual scene object;

[0028] In the case that the color difference is greater than or equal to the preset threshold, continue to adjust the color of the virtual scene object until the color difference is less than the preset threshold.

[0029] In a second aspect, an apparatus for aligning virtual and real material colors according to an embodiment of the present application includes:

[0030] A display module, configured to obtain and display a live-captured image in response to a user's interaction operation;

[0031] A determination module, configured to determine a virtual scene object and a real scene object to be aligned in the live-captured image;

[0032] An adjustment module, configured to adjust the color of the virtual scene object based on a first color of the real scene object.

[0033] In a possible implementation manner, the display module is specifically configured to:

[0034] Display a preset color alignment control in response to a user's start operation;

[0035] Obtain and display a live-captured image in response to a user's touch operation on the preset color alignment control.

[0036] In a possible implementation manner, the determination module is specifically configured to:

[0037] In the live-captured image, determine an object to be aligned corresponding to the selection operation in response to a user's selection operation;

[0038] Determine the virtual scene object and the real scene object in the object to be aligned.

[0039] In a possible implementation manner, the determination module is specifically configured to:

[0040] In the live-captured image, determine the object to be aligned in the live-captured image according to a preset image recognition algorithm;

[0041] Determine the virtual scene object and the real scene object in the object to be aligned.

[0042] In a possible implementation manner, the determination module is specifically configured to:

[0043] In response to a user's annotation operation, determine the virtual scene object or the real scene object in the object to be aligned according to the annotation operation; or,

[0044] Modify a preset attribute of a virtual image, determine an object with a changed preset attribute in the object to be aligned as the virtual scene object, and determine an object with an unchanged preset attribute in the object to be aligned as the real scene object; restore the preset attribute of the virtual scene object.

[0045] In a possible implementation manner, the adjustment module is specifically configured to:

[0046] Set a virtual scene color of the virtual scene object to a first color value corresponding to the first color; or,

[0047] Add a color layer corresponding to the virtual scene object; the color value of the color layer is the first color value.

[0048] In a possible implementation manner, the device is further configured to:

[0049] Obtain a second color of the adjusted virtual scene object;

[0050] Determine the color difference between the first color and the second color;

[0051] In the case that the color difference is less than a preset threshold, determine the virtual scene object with the second color as the target virtual scene object;

[0052] In the case that the color difference is greater than or equal to the preset threshold, continue to adjust the color of the virtual scene object until the color difference is less than the preset threshold.

[0053] In a third aspect, an embodiment of the present application provides an electronic device, including: a memory and a processor;

[0054] The memory stores computer-executable instructions;

[0055] The processor executes the computer-executable instructions stored in the memory, so that the processor executes the virtual-real material color alignment method according to any one of the first aspect.

[0056] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium, in which computer-executable instructions are stored, and when the computer-executable instructions are executed by a processor, they are used to implement the virtual-real material color alignment method according to any one of the first aspect.

[0057] In a fifth aspect, an embodiment of the present application provides a computer program product, including a computer program, and when the computer program is executed by a processor, it implements the virtual-real material color alignment method shown in any one of the first aspect.

[0058] In an embodiment of the present application, the electronic device obtains and displays a real-time captured image in response to a user's interaction operation; in the real-time captured image, a virtual scene object and a real scene object to be aligned are determined; and the virtual scene object is color-adjusted based on the first color of the real scene object. In the present application, the electronic device displays the real-time captured image of the camera based on the user's interaction operation, determines the virtual scene object and the real scene object to be aligned in the real-time captured image, and then adjusts the color of the virtual scene object according to the first color of the real scene object to ensure that the virtual scene object and the real scene object have a consistent visual effect. In this way, the electronic device can automatically align the material colors of the real scene and the virtual scene in the virtual captured image, without the need for the user to manually perform color adjustment operations, improving the efficiency of color adjustment, saving the user's time, and also improving the accuracy of color alignment. BRIEF DESCRIPTION OF THE DRAWINGS

[0059] The drawings described herein are used to provide a further understanding of the present application and form a part of the present application. The illustrative embodiments of the present application and their descriptions are used to explain the present application and do not constitute an improper limitation of the present application. In the drawings:

[0060] Figure 1 is a schematic diagram of an application scenario provided by an exemplary embodiment of the present application;

[0061] Figure 2 is a schematic flowchart of a method for aligning virtual and real material colors provided by an exemplary embodiment of the present application;

[0062] Figure 3 is a schematic flowchart of another method for aligning virtual and real material colors provided by an exemplary embodiment of the present application;

[0063] Figure 4 is a schematic structural diagram of a device for aligning virtual and real material colors provided by an exemplary embodiment of the present application;

[0064] Figure 5 is a schematic structural diagram of an electronic device provided by an exemplary embodiment of the present application. DETAILED DESCRIPTION OF THE EMBODIMENTS

[0065] To make the objectives, technical solutions, and advantages of this application clearer, the technical solutions of this application will be clearly and completely described below in conjunction with specific embodiments of this application and the corresponding drawings. Obviously, the described embodiments are only a part of the embodiments of this application, rather than all of them. Based on the embodiments in this application, all other embodiments obtained by those of ordinary skill in the art without creative efforts belong to the scope of protection of this application. The user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data for analysis, stored data, displayed data, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties. Moreover, the collection, use, and processing of relevant data need to comply with relevant laws, regulations, and standards of relevant countries and regions, and corresponding operation entrances are provided for users to choose to authorize or reject.

[0066] Traditional film and television production usually adopts the form of a green screen, that is, a green screen is used as the background during shooting, and the virtual scene of the Unreal Engine (UE) is synthesized into the shooting footage in the later process, that is, the green screen is replaced with a virtual scene. With the continuous development of technologies such as Internet technology and artificial intelligence, the application of virtual shooting technology is becoming more and more widespread. Virtual shooting refers to placing a screen (such as an LED screen, etc.) on-site during shooting and playing the asset materials corresponding to the UE virtual scene, so that the merged footage can be directly viewed and shot in real time.

[0067] In order to ensure the consistent visual experience between the virtual scene and the actual scene, in the related art, current crew members (i.e., users) usually need to adjust the color of the rendered images in the virtual scene. This manual adjustment method is inefficient, consuming a large amount of time of the user, and the accuracy is not high because the user makes manual adjustments based on manual experience or subjective feelings.

[0068] To solve the above problems, in this application, the electronic device displays the real-time shooting footage of the camera based on the user's interaction operation, determines the virtual scene object and the real scene object to be aligned in the real-time shooting footage, and then adjusts the color of the virtual scene object according to the first color of the real scene object to ensure that the virtual scene object and the real scene object have a consistent visual experience. In this way, the electronic device automatically processes the UE assets according to the camera shooting footage, modifies the UE rendering, so that the colors of the virtual and real objects in the shooting footage are aligned, achieving a consistent visual experience, improving the efficiency of color adjustment, saving the user's time, and also improving the accuracy of color alignment.

[0069] Figure 1 It is a schematic diagram of an application scenario provided for an exemplary embodiment of this application. As Figure 1As shown in the figure, it includes user 101 and electronic device 102. The electronic device 102 can be a device such as a mobile phone or a computer. In the related art, during virtual shooting, the user 101 usually manually adjusts the material color of the virtual scene. This color adjustment method has low efficiency, consumes a large amount of time of the user, and the accuracy of color adjustment is not high either.

[0070] In the embodiment of the present application, in response to the user's interaction operation, the electronic device 102 acquires a real-time shooting image and determines a real scene object and a virtual scene object to be aligned in the real-time shooting image. Then, the color of the virtual scene object can be adjusted based on the first color of the real scene object, so that automatic alignment of the virtual scene color and the real scene color in the virtual shooting scene can be achieved, without the need for the user to manually adjust the color. The adjustment efficiency is higher, the user's time is saved, and the accuracy of color adjustment is also higher.

[0071] The technical solution shown in the present application will be described in detail below through specific embodiments. It should be noted that the following several embodiments can exist independently or be combined with each other. For the same or similar content, it will not be repeated in different embodiments.

[0072] Figure 2 It is a flowchart of a method for aligning virtual and real material colors provided for an exemplary embodiment of the present application. Please refer to Figure 2 This method for aligning virtual and real material colors may include:

[0073] S201. In response to the user's interaction operation, acquire and display a real-time shooting image.

[0074] The execution subject of the embodiment of the present application can be an electronic device or a virtual and real material color alignment device provided in the electronic device. The virtual and real material color alignment device can be implemented by software or by a combination of software and hardware. For the sake of easy understanding, in the following, the execution subject is taken as an electronic device for illustration.

[0075] In the embodiment of the present application, the interaction operation may refer to the user's virtual and real material color alignment start operation, specifically, it may refer to the user's click operation, sliding operation on the electronic device display screen, or input operation based on input devices such as a mouse and a keyboard. The embodiment of the present application does not limit the specific type of the interaction operation. The real-time shooting image may refer to the real-time image captured by the camera in the virtual shooting scene. The real-time shooting image may include the virtual scene in the LED display screen, etc., and also includes the actual scene of the virtual shooting.

[0076] In this step, in the virtual shooting scene, the alignment of virtual and real material colors can be achieved through a UE plug-in in the electronic device. This UE plug-in can be specifically implemented based on programming languages such as C or C++. In UE, a material can refer to a class that expresses the appearance attributes of an object, usually including attributes such as base color, metallicity, and roughness. This file can be saved on the disk and reused. When the user needs to align the virtual and real material colors, the UE plug-in can be launched in the electronic device. The specific launch method can be, for example, launching by touching the plug-in icon or pressing a preset button (or a combination of preset buttons). The embodiments of this application do not limit this. In response to the user's launch operation, the electronic device can launch the UE plug-in. This UE plug-in can display a color alignment control. The user can touch this color alignment control to start the process of aligning virtual and real material colors. Correspondingly, the electronic device can obtain and display the real-time shooting image of the camera.

[0077] S202. In the real-time shooting image, determine the virtual scene object and the real scene object to be aligned.

[0078] In the embodiments of this application, the virtual scene object and the real scene object to be aligned can refer to the same object that exists both in the virtual scene played on the LED display screen and in the actual scene. Exemplarily, in the virtual shooting scene, the LED display screen plays a virtual scene, which may include virtual image backgrounds such as a desert. In the actual scene, there may usually be actual objects such as sand arranged correspondingly. For the desert in the virtual scene and the sand in the actual scene, it is necessary to ensure that their visual effects are consistent during the virtual shooting process. Therefore, color alignment is required. In this way, the virtual scene object in the virtual scene and the real scene object of the same object in the actual scene can be used as the virtual scene object and the real scene object to be aligned.

[0079] Specifically, in this step, the electronic device can automatically determine the virtual scene object and the real scene object to be aligned in the real-time shooting image through a preset image recognition algorithm, which can realize the automatic selection and determination of the objects to be aligned and improve the color adjustment efficiency. And / or, the electronic device can also respond to the user's selection operation to determine the objects to be aligned, and determine the virtual scene object and the real scene object among the objects to be aligned, which can better meet the actual needs of the user and simplify the user's operation to a certain extent.

[0080] S203. Adjust the color of the virtual scene object based on the first color of the real scene object.

[0081] In the embodiments of the present application, the first color may be the actual color in the real scene object, which may be specifically represented by RGB color values, etc. The embodiments of the present application do not limit the specific representation form of the first color. After determining the virtual scene object and the real scene object to be aligned, in order to ensure the consistent visual perception of the same object in the virtual and real scenes, the electronic device may align the color of the virtual scene object with the color of the real scene object. Since the color of the real scene object is fixed, the electronic device may adjust the color of the virtual scene object so that the color of the adjusted virtual scene object is consistent with the color of the real scene object.

[0082] Specifically, the electronic device may determine the first color of the real scene object and adjust the color of the virtual scene object. The specific adjustment method may be to directly set the color of the virtual scene object to the first color, or to add a light or layer of the first color to the virtual scene object, etc., so that the adjusted virtual scene object also presents the first color, ensuring the consistent color visual perception of the same object in the virtual and real scenes.

[0083] Based on the above embodiments, Figure 3 is a flowchart of another method for aligning virtual and real material colors provided by the exemplary embodiments of the present application. Please refer to Figure 3 This method for aligning virtual and real material colors may include:

[0084] S301. In response to the user's startup operation, display a preset color alignment control; in response to the user's touch operation on the preset color alignment control, obtain and display a real-time captured image.

[0085] In the embodiments of the present application, the startup operation may refer to the operation of the user starting the UE plugin, which may specifically refer to the user's touch operation on the UE plugin icon, the user's pressing of a physical button (or a combination of physical buttons), or the user's voice input operation, etc. The embodiments of the present application do not limit the specific type of the startup operation. The preset color alignment control may refer to a trigger control for color alignment set in advance.

[0086] In this step, when the user needs to align the colors of the virtual and real materials, the user may perform a startup operation in the electronic device to start the UE plugin. The electronic device responds to the user's startup operation, starts the UE plugin and displays the preset color alignment control; the user may touch the preset color alignment control to trigger the process of aligning the colors of the virtual and real materials. The electronic device responds to the user's touch operation on the preset color alignment control and may obtain and display the real-time captured image of the camera. Of course, the triggering method for aligning the colors of the virtual and real materials may also be other forms, and other trigger controls may be set accordingly. The embodiments of the present application do not limit this.

[0087] S302. In the real-time captured image, in response to a user's selection operation, determine the object to be aligned corresponding to the selection operation; or, in the real-time captured image, determine the object to be aligned in the real-time captured image according to a preset image recognition algorithm.

[0088] In the embodiments of the present application, the selection operation may refer to an interactive operation in which the user selects an object to be aligned. Specifically, it may refer to a click operation, a swipe operation, or an input operation based on an input device such as a mouse or a keyboard. The embodiments of the present application do not limit the specific type and specific operation form of the selection operation. The preset image recognition algorithm may refer to a pre-configured image recognition algorithm model, which can be used to implement the recognition of the same object in the real-time captured image. Specifically, it may refer to a convolutional neural network algorithm, a deep learning algorithm, etc. The embodiments of the present application do not limit the specific type of the preset image recognition algorithm.

[0089] The object to be aligned may refer to the same object that exists in both the virtual and real scenes and needs to be color-aligned, and may also be referred to as the object to be aligned. Exemplarily, in a virtual shooting scene, there is a desert in the virtual background, and there is also sand in the real scene to ensure the coherence of the virtual and real scenes. Since the colors of the sand in the virtual background and the real scene may be inconsistent, the electronic device may select the desert in the virtual background and the sand in the real scene as the objects to be aligned, and subsequently, the virtual scene object (i.e., the desert in the virtual background) and the real scene object (i.e., the sand in the real scene) in the objects to be aligned can be further determined.

[0090] In this step, when the electronic device determines the object to be aligned that needs to be color-aligned, it may be determined based on the user's selection operation, or the electronic device may automatically determine it based on the preset image recognition algorithm. Specifically, in a possible implementation manner, the user may perform a selection operation in the real-time captured image to select the object that needs to be color-aligned, and the electronic device, in response to the user's selection operation, may determine the object to be aligned corresponding to the user's selection operation. In another possible implementation manner, the electronic device may also automatically determine the object to be aligned in the real-time captured image based on the preset image recognition algorithm, which can improve the efficiency of determining the object to be aligned. Of course, the electronic device may also adopt the above two methods, that is, on the basis of the automatic recognition by the preset image recognition algorithm, the user can perform manual adjustment based on actual needs to further improve the flexibility of determining the object to be aligned. The embodiments of the present application do not limit this.

[0091] S303. Determine the virtual scene object and the real scene object in the object to be aligned.

[0092] In the embodiments of the present application, after determining the objects to be aligned, the electronic device can further determine the virtual scene objects and real scene objects in the objects to be aligned. The specific determination method can be determined based on the user's annotation operation, or the electronic device can determine based on the characteristics of the virtual scene. The embodiments of the present application do not limit this.

[0093] In a possible implementation manner, step S303 can be specifically implemented in the following way:

[0094] In response to the user's annotation operation, determine the virtual scene object or real scene object in the object to be aligned according to the annotation operation.

[0095] In the embodiments of the present application, the annotation operation may refer to the operation of the user adding labels to the virtual and real materials of the object to be aligned. After determining the object to be aligned, the electronic device can, in response to the user's annotation operation, determine the virtual scene object and real scene object in the object to be aligned based on this annotation operation.

[0096] In another possible implementation manner, step S303 can be specifically implemented in the following another way:

[0097] Modify the preset attributes of the virtual image, determine the object with the changed preset attributes in the object to be aligned as the virtual scene object, and determine the object with the unchanged preset attributes in the object to be aligned as the real scene object; restore the preset attributes of the virtual scene object.

[0098] In the embodiments of the present application, the preset attributes may refer to the attributes of the virtual image corresponding to the illusory scene played on the LED display screen, specifically, may refer to color, brightness, contrast, etc. In the virtual shooting scene, the attributes of the objects in the actual scene cannot be adjusted, while the attributes of the objects in the virtual image in the illusory scene can be adjusted. The electronic device can adjust the preset attributes of the object to be aligned, for example, adjust the color of the object to be aligned, etc. After that, the electronic device can determine the object with the changed preset attributes as the virtual scene object, and determine the object with the unchanged preset attributes as the real scene object, and then restore the preset attributes of the object to be aligned to the original state. In this way, by modifying and verifying the preset attributes of the object to be aligned, the electronic device determines the object with the changed preset attributes as the virtual scene object, which can improve the efficiency of determining the virtual scene object and real scene object and further simplify the user's operation.

[0099] It should be noted that the electronic device can also use other methods to determine the virtual scene objects and real scene objects in the objects to be aligned, such as using image detection algorithms, etc. The embodiments of the present application do not limit this.

[0100] S304. Adjust the color of the virtual scene object based on the first color of the real scene object.

[0101] In a possible implementation manner, step S304 can be specifically implemented in the following way:

[0102] Set the virtual scene color of the virtual scene object to the first color value corresponding to the first color; or,

[0103] Add a color layer corresponding to the virtual scene object; the color value of the color layer is the first color value.

[0104] In the embodiments of the present application, the first color value may refer to the specific value of the first color corresponding to the real scene object, specifically, it may be an RGB color value or a color value in other color spaces, etc. The embodiments of the present application do not limit the specific representation method of the first color value. Exemplarily, when the first color value is an RGB color value, the RGB color value may refer to a statistical value such as the average or mode of the RGB color values of all pixels in the real scene object, or may refer to the RGB color value of a certain pixel in the real scene object. The virtual scene color may refer to the color attribute value of the virtual scene object. The color layer may refer to a layer covered by the virtual scene object, which can make the virtual scene object present the color of the layer. When the electronic device adjusts the color of the virtual scene object, it can directly set the virtual scene color of the virtual scene object to the first color value corresponding to the first color, so that the adjusted virtual scene object is color-aligned with the real scene object. Specifically, when performing color adjustment, the electronic device can continuously iterate and adjust the base color of the virtual scene object using a gamma curve until the virtual scene object finally reaches the first color value; the electronic device can also use a 3D Look Up Table (LUT) and other methods for color replacement. The embodiments of the present application do not limit the specific method of color adjustment.

[0105] In addition, the electronic device can also add a color layer corresponding to the virtual scene object, and the color value of the color layer is the first color value. In this way, the virtual scene object covered by the color layer can also be color-aligned with the real scene object, ensuring the consistent visual experience of the virtual and real materials in the virtual shooting scene.

[0106] In another possible implementation manner, step S304 can be specifically implemented in the following another way:

[0107] Display the first color of the real scene object; in response to a touch operation of the user on the color adjustment control, determine the color parameter corresponding to the touch operation; and perform color adjustment on the virtual scene object based on the color parameter.

[0108] In the embodiments of the present application, the color adjustment control may refer to an interactive control for color adjustment set in advance. The color parameter may refer to the color value set by the user. Specifically, the electronic device may display the first color of the real scene object on the display screen. For example, it may display a color block of the first color or display the first color value corresponding to the first color, etc. The user may perform a touch operation on the color adjustment control based on the first color displayed on the display screen to input a color parameter. Correspondingly, the electronic device may adjust the color of the virtual scene object based on the color parameter. Specifically, it may directly set the virtual scene color of the virtual scene object to the color parameter, or add a color layer to the virtual scene object, etc. This can further improve the flexibility of color alignment, and the embodiments of the present application do not limit this.

[0109] S305. Obtain the second color of the adjusted virtual scene object; determine the color difference between the first color and the second color.

[0110] S306. When the color difference is less than the preset threshold, determine the virtual scene object with the second color as the target virtual scene object; when the color difference is greater than or equal to the preset threshold, continue to adjust the color of the virtual scene object until the color difference is less than the preset threshold.

[0111] In the embodiments of the present application, the second color may refer to the color of the adjusted virtual scene object. The color difference may refer to the color difference between the first color of the real scene object and the second color of the adjusted virtual scene object. Specifically, it may refer to the difference in color values between the first color and the second color, such as the RGB color difference, etc. Of course, the color difference may also be represented in other forms, and the embodiments of the present application do not limit this. The preset threshold may refer to the critical value of the color difference set in advance. When the color difference between the first color and the second color is less than the preset threshold, the electronic device may determine that the color impressions of the virtual scene object and the real scene object are consistent; when the color difference between the first color and the second color is not less than the preset threshold, the electronic device may determine that the color impressions of the virtual scene object and the real scene object are inconsistent. The target virtual scene object may refer to the finally determined virtual scene object whose color impression is consistent with that of the real scene object.

[0112] In this step, after the electronic device adjusts the color of the virtual scene object based on the first color, the screen rendering changes at this time, and the color of the virtual scene object displayed on the screen has been adjusted. For example, the virtual scene object after the color adjustment in step S304 can be re-rendered to the screen. The electronic device can determine the second color of the adjusted virtual scene object in the re-taken picture, and further determine the color difference between the second color of the virtual scene object and the first color of the real scene object. After that, the electronic device can compare this color difference with a preset threshold. If the color difference is less than the preset threshold, the electronic device can determine that the color perception of the adjusted virtual scene object and the real scene object is consistent. At this time, the adjusted virtual scene object with the second color can be determined as the final target virtual scene object. If the color difference is not less than the preset threshold, the electronic device can determine that the color perception of the adjusted virtual scene object and the real scene object is inconsistent. At this time, the electronic device can continue to perform the color alignment operation and adjust the virtual color of the virtual scene object again. For example, color iteration can be continued based on the gamma curve, or the second color value corresponding to the second color can be increased or decreased according to a preset step size, etc., until the color difference is less than the preset threshold.

[0113] In this way, by detecting the second color of the adjusted virtual scene object and comparing it with the first color of the real scene object, and determining whether to continue color alignment based on the comparison result of the color difference and the preset threshold, the electronic device can further improve the accuracy of color alignment of virtual and real materials and ensure that the color perception of the virtual scene object and the real scene object is consistent.

[0114] In addition, the final target virtual scene object can be considered to have the base color aligned with the real scene object. On this basis, other information such as depth of field, height, virtual lighting, etc. can be used to further adjust the color of the target virtual scene object to reflect the effects of light and shadow, height fluctuations, distance, etc. on the color, and special effects adjustments such as blurring can also be performed. Taking the desert as an example of the virtual scene object, after further adjustment, the color of the desert can be made to change with factors such as height fluctuations and distance, or special effects such as distant view blurring can also be formed. The target virtual scene object after further adjustment can be rendered to the screen for virtual shooting.

[0115] Figure 4 For a schematic structural diagram of a virtual-real material color alignment device provided by an exemplary embodiment of the present application, please refer to Figure 4 , the virtual-real material color alignment device 40 includes:

[0116] A display module 41, configured to obtain and display a real-time captured picture in response to a user's interaction operation;

[0117] A determination module 42, configured to determine a virtual scene object and a real scene object to be aligned in the real-time captured picture;

[0118] An adjustment module 43 for adjusting the color of a virtual scene object based on the first color of a real scene object.

[0119] In a possible implementation, the display module 41 is specifically configured to:

[0120] Respond to a user's start operation and display a preset color alignment control;

[0121] Respond to a user's touch operation on the preset color alignment control, and obtain and display a live captured image.

[0122] In a possible implementation, the determination module 42 is specifically configured to:

[0123] In the live captured image, respond to a user's selection operation and determine a to-be-aligned object corresponding to the selection operation;

[0124] Determine the virtual scene object and the real scene object in the to-be-aligned object.

[0125] In a possible implementation, the determination module 42 is specifically configured to:

[0126] In the live captured image, determine the to-be-aligned object in the live captured image according to a preset image recognition algorithm;

[0127] Determine the virtual scene object and the real scene object in the to-be-aligned object.

[0128] In a possible implementation, the determination module 42 is specifically configured to:

[0129] Respond to a user's annotation operation, and determine the virtual scene object or the real scene object in the to-be-aligned object according to the annotation operation; or,

[0130] Modify the preset attributes of the virtual image, determine the object whose preset attributes have changed in the to-be-aligned object as the virtual scene object, and determine the object whose preset attributes have not changed in the to-be-aligned object as the real scene object; restore the preset attributes of the virtual scene object.

[0131] In a possible implementation, the adjustment module 43 is specifically configured to:

[0132] Set the virtual scene color of the virtual scene object to the first color value corresponding to the first color; or,

[0133] Add a color layer corresponding to the virtual scene object; the color value of the color layer is the first color value.

[0134] In a possible implementation, the device 40 is further configured to:

[0135] Obtain the second color of the adjusted virtual scene object;

[0136] Determine the color difference between the first color and the second color;

[0137] When the color difference is less than a preset threshold, determine the virtual scene object of the second color as the target virtual scene object;

[0138] When the color difference is greater than or equal to the preset threshold, continue to adjust the color of the virtual scene object until the color difference is less than the preset threshold.

[0139] The virtual-real material color alignment device 40 provided by the embodiments of the present application can execute the technical solutions shown in the above method embodiments, and its implementation principle and beneficial effects are similar, which will not be elaborated here.

[0140] Figure 5 The following is a schematic structural diagram of an electronic device provided by an exemplary embodiment of the present application. Please refer to Figure 5 , the electronic device 50 may include a processor 51 and a memory 52. Exemplarily, the processor 51 and the memory 52 are interconnected with each other through a bus 53.

[0141] The memory 52 stores computer-executable instructions;

[0142] The processor 51 executes the computer-executable instructions stored in the memory 52, so that the processor 51 executes the virtual-real material color alignment method as shown in the above method embodiments.

[0143] Correspondingly, the embodiments of the present application provide a computer-readable storage medium, in which computer-executable instructions are stored, and when the computer-executable instructions are executed by a processor, they are used to implement the virtual-real material color alignment method in the above method embodiments.

[0144] Correspondingly, the embodiments of the present application can also provide a computer program product, including a computer program, and when the computer program is executed by a processor, the virtual-real material color alignment method shown in the above method embodiments can be implemented.

[0145] Those skilled in the art should understand that the embodiments of the present invention can be provided as a method, a system, or a computer program product. Therefore, the present invention can adopt the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware aspects. Moreover, the present invention can adopt the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk memories, CD-ROMs, optical memories, etc.) containing computer-usable program codes.

[0146] The present invention is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the invention. It should be understood that each flow and / or block in the flowchart illustrations and / or block diagrams, and combinations of flows and / or blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions executed by the processor of the computer or other programmable data processing apparatus create means for implementing the functions specified in the flowchart Figure 1 one flow or more flows and / or blocks Figure 1 or means for implementing the functions specified in one block or more blocks.

[0147] These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means that implement the functions specified in the flowchart Figure 1 one flow or more flows and / or blocks Figure 1 or one block or more blocks.

[0148] These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer-implemented process, so that the instructions executed on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart Figure 1 one flow or more flows and / or blocks Figure 1 or one block or more blocks.

[0149] In a typical configuration, a computing device includes one or more processors, an input / output interface, a network interface, and memory.

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

[0151] A computer-readable medium includes both permanent and non-permanent, removable and non-removable media and can implement information storage by any method or technology. The 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 technologies, compact disc read-only memory (CD-ROM), digital versatile disc (DVD) or other optical storage, magnetic cassette tapes, magnetic tape disk storage or other magnetic storage devices, or any other non-transitory medium that can be used to store information that can be accessed by a computing device. As defined herein, a computer-readable medium does not include transitory computer-readable media such as modulated data signals and carrier waves.

[0152] It should also be noted that the term "comprising", "including" or any other variant thereof is intended to cover non-exclusive inclusion, such that a process, method, article or apparatus comprising a series of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such process, method, article or apparatus. Without further limitation, an element defined by the statement "comprising an..." does not exclude the presence of additional identical elements in the process, method, article or apparatus comprising the element.

[0153] The above description is only for the embodiments of the present application and is not intended to limit the present application. For those skilled in the art, various changes and modifications can be made to the present application. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application shall be included within the scope of the claims of the present application.

Claims

1. A method for aligning virtual and real material colors, characterized in that, including: In response to a user's interaction operation, obtain and display a live capture screen; The live capture screen refers to a live image screen captured by a camera in a virtual shooting scene; The live capture screen includes an illusory scene and an actual scene on a display screen; In the live capture screen, determine a virtual scene object and a real scene object to be aligned, where the virtual scene object and the real scene object to be aligned refer to the same object that exists in both the illusory scene played on the display screen and the actual scene; Based on a first color of the real scene object, adjust the color of the virtual scene object; Obtain a second color of the adjusted virtual scene object; Determine a color difference between the first color and the second color; In the case where the color difference is less than a preset threshold, determine the virtual scene object with the second color as the target virtual scene object; In the case where the color difference is greater than or equal to the preset threshold, continue to adjust the color of the virtual scene object until the color difference is less than the preset threshold.

2. The method according to claim 1, characterized in that The "In response to a user's interaction operation, obtain and display a live capture screen" includes: In response to a user's startup operation, display a preset color alignment control; In response to a touch operation by the user on the preset color alignment control, obtain and display a live capture screen.

3. The method according to claim 1, characterized in that, The "In the live capture screen, determine a virtual scene object and a real scene object to be aligned" includes: In the live capture screen, in response to a user's selection operation, determine a to-be-aligned object corresponding to the selection operation; Determine a virtual scene object and a real scene object in the to-be-aligned object.

4. The method according to claim 1, wherein The "In the live capture screen, determine a virtual scene object and a real scene object to be aligned" includes: In the live capture screen, according to a preset image recognition algorithm, determine a to-be-aligned object in the live capture screen; Determine a virtual scene object and a real scene object in the to-be-aligned object.

5. The method according to claim 3 or 4, characterized in that, The "Determine a virtual scene object and a real scene object in the to-be-aligned object" includes: In response to a user's annotation operation, determine a virtual scene object or a real scene object in the to-be-aligned object according to the annotation operation; or, Modify a preset attribute of a virtual image, determine an object with a changed preset attribute in the to-be-aligned object as a virtual scene object, and determine an object with an unchanged preset attribute in the to-be-aligned object as a real scene object; restore the preset attribute of the virtual scene object.

6. The method according to claim 1, characterized in that, The "Based on a first color of the real scene object, adjust the color of the virtual scene object" includes: Set the virtual color of the virtual scene object to a first color value corresponding to the first color; or, Add a color layer corresponding to the virtual scene object; the color value of the color layer is the first color value.

7. A virtual-real material color alignment device, characterized in that, including: A display module for obtaining and displaying a live capture screen in response to a user's interaction operation; The live capture screen refers to a live image screen captured by a camera in a virtual shooting scene; The live capture screen includes an illusory scene and an actual scene on a display screen; A determination module, configured to determine a virtual scene object and a real scene object to be aligned in the real-time captured image, where the virtual scene object and the real scene object to be aligned refer to the same object existing in both the virtual scene played on the display screen and the actual scene; An adjustment module, configured to adjust the color of the virtual scene object based on the first color of the real scene object; The adjustment module is further configured to obtain the second color of the adjusted virtual scene object; determine the color difference between the first color and the second color; in the case where the color difference is less than a preset threshold, determine the virtual scene object with the second color as the target virtual scene object; in the case where the color difference is greater than or equal to the preset threshold, continue to adjust the color of the virtual scene object until the color difference is less than the preset threshold.

8. An electronic device, characterized in that, Comprising: A memory and a processor; The memory stores computer execution instructions; The processor executes the computer execution instructions stored in the memory, so that the processor executes the virtual-real material color alignment method according to any one of claims 1 to 6.

9. A computer-readable storage medium, characterized in that, Computer execution instructions are stored in the computer-readable storage medium, and when the computer execution instructions are executed by the processor, they are used to implement the virtual-real material color alignment method according to any one of claims 1 to 6.

10. A computer program product, comprising a computer program, characterized in that, When the computer program is executed by the processor, it implements the virtual-real material color alignment method according to any one of claims 1 to 6.

Citation Information

Patent Citations

  • Virtual object adjustment method and device, storage medium and augmented reality equipment

    CN111415422A