Color alignment method and device and storage medium
By providing color alignment methods in the virtual shooting system, users can automatically calculate and align colors by selecting color sampling areas in virtual and real scenes, solving the problem of color inconsistency, improving efficiency and ensuring alignment effect.
Patent Information
- Application Number
- CN202510051674.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-01-13
- Publication Date
- 2025-04-25
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
During virtual shooting, the colors of the same type or the same object in the real scene and the virtual scene are inconsistent, resulting in a misunderstanding. The existing technology relies on manual color modification, which is inefficient and difficult to guarantee.
A color alignment method is provided. By displaying the target image captured by the image acquisition device, the user can select the color sampling area in the virtual scene and the real scene. The system automatically calculates the color difference and aligns it to generate the color alignment image.
Users do not need to rely on experience to judge color differences. Color alignment can be achieved through simple color sampling area selection, which improves efficiency and ensures alignment effect.
Smart Images

Figure CN119893308A_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to the technical field of virtual shooting, and in particular to a color alignment method, device and storage medium. Background Art
[0002] When performing virtual shooting, the colors of the same type or the same object in the real scene and the virtual scene in the picture taken by the image acquisition device need to be consistent, otherwise there will be a mismatch. In related technologies, users can modify the color of the object in the virtual scene based on experience to align the color in the real scene; however, the manual modification method is inefficient and the color alignment effect is difficult to guarantee. Summary of the invention
[0003] In view of this, the present disclosure proposes a color alignment method, device, storage medium, electronic device, and computer program product.
[0004] According to one aspect of the present disclosure, a color alignment method is provided, the method comprising:
[0005] In response to a first operation of the user, a target image captured by the image acquisition device is displayed; wherein the target image includes a picture portion of a virtual scene and a picture portion of a real scene;
[0006] In response to a second operation of the user on the target image, a first color sampling area and a second color sampling area in the target image are highlighted; the first color sampling area and the second color sampling area are respectively located in a screen portion of a virtual scene and a screen portion of a real scene in the target image;
[0007] Display a color-aligned image; wherein the color-aligned image is an image obtained by color-aligning at least a portion of the picture portion of the virtual scene in the target image with at least a portion of the picture portion of the real scene based on the first color sampling area and the second color sampling area.
[0008] In a possible implementation, the method further includes:
[0009] Display the color value of the first color sampling area and the color value of the second color sampling area, and / or
[0010] The difference value between the color value of the first color sampling area and the color value of the second color sampling area is displayed.
[0011] In a possible implementation, the first color sampling area is located at a first object in the screen portion of the virtual scene, and the second color sampling area is located at a second object in the screen portion of the real scene, wherein the first object and the second object correspond to the same object or the same type of object.
[0012] In a possible implementation manner, the second operation includes an operation of selecting a color sampling area;
[0013] In response to the user's second operation on the target image, highlighting the first color sampling area and the second color sampling area in the target image includes:
[0014] In response to a user selecting the first color sampling area in a screen portion of the virtual scene, highlighting the first color sampling area;
[0015] In response to the user selecting the second color sampling area in the screen portion of the real scene, the second color sampling area is highlighted.
[0016] In a possible implementation manner, the second operation includes an operation of selecting a color sampling area;
[0017] In response to the user's second operation on the target image, highlighting the first color sampling area and the second color sampling area in the target image includes:
[0018] In response to a user selecting the first color sampling area in a screen portion of the virtual scene, highlighting the first color sampling area;
[0019] The second color sampling area is highlighted, wherein the second color sampling area matches the first color sampling area.
[0020] In a possible implementation, the method further includes:
[0021] Obtaining the color value of the first color sampling area and the color value of the second color sampling area;
[0022] Calculating a color difference value based on the color value of the first color sampling area and the color value of the second color sampling area;
[0023] Based on the color difference value, the colors of at least a partial area in the picture part of the virtual scene in the target image and at least a partial area in the picture part of the real scene are aligned to generate the color-aligned image.
[0024] In a possible implementation, the color difference value indicates a color difference between the first color sampling area and the second color sampling area; the first color sampling area is located in a screen portion of the virtual scene;
[0025] The step of aligning the colors of at least a partial area of the picture portion of the virtual scene in the target image with at least a partial area of the picture portion of the real scene based on the color difference value comprises:
[0026] Based on the color difference value, the color of rendering the first color sampling area or an object associated with the first color sampling area is adjusted.
[0027] In a possible implementation, the calculating the color difference value based on the color value of the first color sampling area and the color value of the second color sampling area includes: performing color space conversion on the color value of the first color sampling area and the color value of the second color sampling area based on a preset mapping relationship; wherein the preset mapping relationship is a mapping relationship between the color space used by the image acquisition device and the color space used for rendering the virtual scene; and calculating the color difference value based on the color values of the first color sampling area and the second color sampling area after the color space conversion.
[0028] According to another aspect of the present disclosure, a color alignment device is provided, the device comprising:
[0029] A display module, configured to display a target image captured by the image acquisition device in response to a first operation of the user; wherein the target image includes a picture portion of a virtual scene and a picture portion of a real scene;
[0030] A sampling module, configured to highlight a first color sampling area and a second color sampling area in the target image in response to a second operation of the user on the target image; the first color sampling area and the second color sampling area are respectively located in a screen portion of a virtual scene and a screen portion of a real scene in the target image;
[0031] An alignment module is used to display a color-aligned image; wherein the color-aligned image is an image obtained by color-aligning at least a portion of the image portion of the virtual scene in the target image with at least a portion of the image portion of the real scene based on the first color sampling area and the second color sampling area.
[0032] According to another aspect of the present disclosure, an electronic device is provided, comprising: a processor; and a memory for storing processor-executable instructions; wherein the processor is configured to implement the above method when executing the instructions stored in the memory.
[0033] According to another aspect of the present disclosure, a non-volatile computer-readable storage medium is provided, on which computer program instructions are stored, wherein the computer program instructions implement the above method when executed by a processor.
[0034] According to another aspect of the present disclosure, a computer program product is provided, including a computer-readable code, or a non-volatile computer-readable storage medium carrying the computer-readable code. When the computer-readable code runs in a processor of an electronic device, the processor in the electronic device executes the above method.
[0035] Through various aspects of the present disclosure, in response to a first operation of a user, a target image captured by an image acquisition device is displayed; wherein the target image includes a screen portion of a virtual scene and a screen portion of a real scene; in response to a second operation of the user on the target image, a first color sampling area and a second color sampling area in the target image are highlighted; the first color sampling area and the second color sampling area are respectively located in the screen portion of the virtual scene and the screen portion of the real scene in the target image; a color-aligned image is displayed; wherein the color-aligned image is an image after color alignment of at least a portion of the screen portion of the virtual scene in the target image and at least a portion of the screen portion of the real scene based on the first color sampling area and the second color sampling area. In this way, the user only needs to select a color sampling area in the target image captured by the image acquisition device to achieve color alignment, and the user does not need to judge the color difference value of the object in the real scene and the virtual scene based on experience, which reduces the experience requirements of the user and improves the efficiency of color alignment. As an example, the user can select multiple color sampling areas on the electronic device and perform color alignment of multiple objects at the same time, further improving the efficiency of color alignment.
[0036] Further features and aspects of the present disclosure will become apparent from the following detailed description of exemplary embodiments with reference to the attached drawings. BRIEF DESCRIPTION OF THE DRAWINGS
[0037] The accompanying drawings, which are incorporated in and constitute a part of the specification, illustrate exemplary embodiments, features, and aspects of the disclosure and, together with the description, serve to explain the principles of the disclosure.
[0038] Figure 1 A structural diagram of a virtual shooting system according to an embodiment of the present disclosure is shown.
[0039] Figure 2 A schematic diagram showing a process of manually performing color alignment according to an embodiment of the present disclosure is shown;
[0040] Figure 3 A schematic diagram of a process of performing color alignment according to an embodiment of the present disclosure is shown;
[0041] Figure 4 A flow chart of a color alignment method according to an embodiment of the present disclosure is shown;
[0042] Figure 5 A schematic diagram showing a color alignment interface according to an embodiment of the present disclosure is shown;
[0043] Figure 6 A flow chart of a color alignment method according to an embodiment of the present disclosure is shown;
[0044] Figure 7 A schematic diagram showing a color alignment interface according to an embodiment of the present disclosure is shown;
[0045] Figure 8 A schematic diagram showing the structure of a color alignment device according to an embodiment of the present disclosure is shown;
[0046] Fig. 9 A block diagram of an electronic device 1900 according to an embodiment of the present disclosure is shown. DETAILED DESCRIPTION
[0047] Various exemplary embodiments, features and aspects of the present disclosure will be described in detail below with reference to the accompanying drawings. The same reference numerals in the accompanying drawings represent elements with the same or similar functions. Although various aspects of the embodiments are shown in the accompanying drawings, the drawings are not necessarily drawn to scale unless otherwise specified.
[0048] References to "one embodiment" or "some embodiments" etc. described in this specification mean that a particular feature, structure or characteristic described in conjunction with the embodiment is included in one or more embodiments of the present application. Thus, the phrases "exemplary", "in one embodiment", "in some other embodiments", "in some other embodiments", etc. appearing in different places in this specification do not necessarily all refer to the same embodiment, but mean "one or more but not all embodiments", unless otherwise specifically emphasized in other ways. The terms "including", "comprising", "having" and their variations all mean "including but not limited to", unless otherwise specifically emphasized in other ways.
[0049] In the present application, "at least one" means one or more, and "plurality" means two or more. "And / or" describes the association relationship of associated objects, indicating that three relationships may exist. For example, A and / or B can mean: including the existence of A alone, the existence of A and B at the same time, and the existence of B alone, where A and B can be singular or plural. The character " / " generally indicates that the previous and next associated objects are in an "or" relationship. "At least one of the following items" or similar expressions refers to any combination of these items, including any combination of single items or plural items. For example, at least one of a, b, or c can mean: a, b, c, ab, ac, bc, or abc, where a, b, c can be single or multiple.
[0050] In addition, in order to better illustrate the present disclosure, numerous specific details are given in the following specific embodiments. It should be understood by those skilled in the art that the present disclosure can also be implemented without certain specific details. In some examples, methods, means, components and circuits well known to those skilled in the art are not described in detail in order to highlight the subject matter of the present disclosure.
[0051] Figure 1 FIG. 4 shows a structural diagram of a virtual shooting system according to an embodiment of the present disclosure; Figure 1 As shown, the virtual shooting system may include: a main control machine 101, a screen display machine 102, a broadcast control processor 103, a display screen 104, an image acquisition device 105, and an editing machine 106; wherein the number of various types of equipment can be flexibly configured according to actual needs, and there is no limitation on this; in addition, in actual applications, other devices can be configured in the virtual shooting system as needed, and one or more devices in the virtual shooting system can be integrated into one device as needed, for example, the main control machine 101, the screen display machine 102, and the editing machine 106 can be integrated into one device.
[0052] Exemplarily, the main control machine 101 can be connected to the upper screen machine 102, for example, it can be connected by wire or wirelessly through a local area network or the Internet, and can use a network transmission protocol for communication; the main control machine 101 can send a variety of control instructions to the upper screen machine 102, and the upper screen machine 102 can render an image that meets the requirements in response to the control instructions of the main control machine 101; wherein, the upper screen machine 102 can be deployed with a rendering engine (Unreal Engine, UE), which builds a virtual environment consistent with the real shooting environment by rendering images in real time; as an example, the upper screen machine 102 can be deployed with a high-performance multi-screen display management system nDisplay based on UE.
[0053] Exemplarily, the screen machine 102 can be connected to the broadcast control processor 103 through DP (DisplayPort, a digital display interface standard) connection, HDMI (High-Definition Multimedia Interface, a high-definition digital audio and video interface standard), etc. The broadcast control processor 103 is used to control and manage the display screen 104 connected thereto. As an example, the broadcast control processor 103 can be used for data transmission and decoding, such as the broadcast control processor 103 can receive the image rendered by the screen machine 102 and decode it into a format suitable for display on the display screen 104; it can also be used for display control, such as overall control and scheduling of the display screen 104, including brightness adjustment, color correction, grayscale control, display partition management, etc. Exemplarily, the display screen 104 can be of the type of LED screen, LCD screen, etc., and can be of the structure of curved screen or flat screen, etc.; the type, quantity, size, resolution, etc. of the display screen 104 can be customized according to actual needs, and there is no limitation on this.
[0054] Exemplarily, the main control machine 101 can also be connected to the image acquisition device 105, for example, through a wired connection such as HDMI or SDI (Serial Digital Interface, a digital video transmission standard), or through a wireless connection such as Wi-Fi (Wireless Fidelity) or RF (Radio Frequency). The main control machine 101 can obtain the signal of the image acquisition device 105 and encode the signal to obtain the image captured by the image acquisition device 105. Exemplarily, the image acquisition device 105 can be a telephoto camera, a wide-angle camera, etc.
[0055] For example, the editing machine 106 can be connected to the upper screen machine 102. The editing machine 106 is used by users (such as asset operators) to create assets, and can also perform real-time modification operations on the attributes of assets (such as color, material, etc.), where the assets include: various object models built in the virtual space. The editing machine 106 can send the assets created and modified by the user to the upper screen machine 102.
[0056] During the virtual shooting process, the main control machine 101 in the virtual shooting system controls the screen-mounting machine 102 to render the image. The screen-mounting machine 102 renders the image based on the control instructions and the assets sent by the editing machine 106, and displays the rendered image on the display screen 104 through the broadcast control processor 103. At the same time, the actors can perform in front of the display screen 104. A real scene can be built in front of the display screen 104. The main control machine 101 controls the image acquisition device 105 to shoot. The real scene where the actors are located is the foreground of the shot image, and the virtual scene on the display screen is the background, thereby completing the virtual shooting.
[0057] During the virtual shooting process, the colors of the same or similar objects in the images captured by the image acquisition device 105 may be inconsistent in the virtual scene and the real scene. There are several reasons for this phenomenon: 1. The color accuracy of the asset concept map initially obtained by the user is not enough, resulting in deviations in the colors of the produced assets. 2. The objects built in the real scene have color deviations due to process, cost, and production cycle. 3. The colors of the same or similar objects in the real scene and the virtual scene are inconsistent due to lighting and material properties.
[0058] Faced with this phenomenon, in the related art, users (such as asset operators) need to modify the color attributes of the assets based on their own experience, and then view the color difference of the same object in the virtual scene and the real scene through the images captured by the image acquisition device 105. Figure 2 FIG. 4 is a schematic diagram showing a process of manually performing color alignment according to an embodiment of the present disclosure; Figure 2 As shown, the picture taken by the image acquisition device 105 is transmitted to the monitoring screen for display. The user manually judges the color difference between the same object in the virtual scene and the real scene based on the picture in the monitoring screen, and then manually adjusts the color of the asset corresponding to the object through the editing machine 106. The screen machine 102 re-renders according to the adjusted color and displays it on the display screen 104. Then, the user judges whether the adjustment direction is correct based on the new picture taken by the image acquisition device 105. This cycle is repeated many times until the color of the same object in the virtual scene and the real scene are aligned. However, this method of manual color alignment requires the user to judge the color difference based on experience, and then manually adjust the color of the asset corresponding to the object. Since the color of the asset and the color of the object in the picture taken by the image acquisition device 105 seen by the human eye undergo nonlinear changes, the requirements for the user are very high, it is difficult to ensure the color alignment effect, and the efficiency is low.
[0059] In order to solve the above technical problems, the embodiment of the present disclosure proposes a color alignment method in a virtual shooting scene. Exemplarily, the method can be executed on an electronic device (such as a tablet computer, a smart phone, a PDA, a portable wearable device, etc.). Figure 3 A schematic diagram of a process for color alignment according to an embodiment of the present disclosure is shown. Figure 3As shown, the upper screen machine 102 renders the virtual scene image to the display screen 104 for display; the image acquisition device 105 takes pictures, the main control machine 101 acquires the image signal of the image acquisition device 105 and sends it to the electronic device after encoding; the electronic device executes the color alignment method in the embodiment of the present disclosure; as an example, the electronic device displays the image taken by the image acquisition device 105, the user selects a color sampling area on the image, the electronic device modifies the rendered color through the editing machine 106 based on the color sampling area selected by the user, and then sends the modified color to the upper screen machine 102, the upper screen machine 102 re-renders the image according to the modified color, and displays the re-rendered image on the display screen 104 through the broadcast control processor 103; in this way, the user does not need to judge the color difference value of the object in the real scene and the virtual scene based on experience, the user only needs to perform the color sampling area selection operation in the picture taken by the image acquisition device 105, so as to achieve color alignment with one click.
[0060] Figure 4 A flow chart of a color alignment method according to an embodiment of the present disclosure is shown as follows: Figure 4 As shown, the method may include:
[0061] Step 401: In response to a first operation of a user, a target image captured by an image acquisition device is displayed; wherein the target image includes a picture portion of a virtual scene and a picture portion of a real scene.
[0062] Exemplarily, a color alignment interface may be displayed on a display screen of an electronic device, and a user may perform a first operation on the color alignment interface. In response to the first operation, the electronic device may obtain a target image captured in real time from an image acquisition device and display the target image on the color alignment interface. Exemplarily, the user may perform the first operation on the color alignment interface by voice, button, gesture, etc.
[0063] It is understandable that when the image acquisition device is shooting, it can simultaneously shoot the real scene in front of the display screen and the virtual scene displayed on the display screen; wherein, the screen portion of the virtual scene in the target image is the virtual scene displayed on the display screen that is shot, and the screen portion of the real scene is the real scene that is shot. Exemplarily, the screen portion of the virtual scene in the target image can be distinguished from the screen portion of the real scene. For example, the screen portion of the virtual scene in the target image can be distinguished from the screen portion of the real scene by a dividing line. Among them, the screen portion of the virtual scene in the target image and the screen portion of the real scene can be automatically distinguished by a machine learning method, or they can be distinguished manually, without limitation.
[0064] Exemplarily, the displayed target image may be an original image taken by the image acquisition device, or the image taken by the image acquisition device may be displayed in the form of a preview image or a thumbnail, etc., which is not limited to this.
[0065] Step 402: In response to a second operation of the user on the target image, a first color sampling area and a second color sampling area in the target image are highlighted; the first color sampling area and the second color sampling area are respectively located in a screen portion of a virtual scene and a screen portion of a real scene in the target image.
[0066] Exemplarily, the second operation includes an operation of selecting a color sampling area; for example, the user may select the color sampling area in the target image by voice, button, gesture, etc. Exemplarily, the color alignment interface may be provided with a functional plug-in for color sampling, and may also display prompt messages, such as text prompts, pop-up prompts, etc., to help the user select the color sampling area more conveniently and quickly. As an example, the user may slide on the target image with a finger or a mouse, and the electronic device determines the corresponding color sampling area in the target image based on the sliding trajectory.
[0067] The number of the first color sampling area and the number of the second color sampling area can be one or more. Exemplarily, the number of the first color sampling area and the number of the second color sampling area are the same, and the first color sampling area and the second color sampling area have a one-to-one association relationship, wherein one first color sampling area and one second color sampling area having an association can be called a pair of color sampling areas.
[0068] The shapes and sizes of the first color sampling area and the second color sampling area may be the same or different, and there is no limitation on this. For example, the shapes of the first color sampling area and the second color sampling area may be different to facilitate distinction. For example, when the user selects multiple pairs of color sampling areas, the display frames corresponding to the pairs of color sampling areas may be represented by different colors to distinguish them.
[0069] Figure 5 A schematic diagram of a color alignment interface according to an embodiment of the present disclosure is shown as follows: Figure 5As shown, the color alignment interface includes: a first sampling area and a second sampling area; wherein the first sampling area is used to display the screen portion of the virtual scene in the target image, and the second sampling area is used to display the screen portion of the real scene in the target image; there is a dividing line between the first sampling area and the second sampling area, wherein a plurality of first color sampling areas are highlighted in the first sampling area, and a plurality of second color sampling areas are highlighted in the second sampling area, the number of the first color sampling areas is the same as the number of the second color sampling areas, the shape of the first color sampling areas is an ellipse, and the shape of the second color sampling areas is a square.
[0070] In a possible implementation, the first color sampling area is located at a first object in the screen portion of the virtual scene, and the second color sampling area is located at a second object in the screen portion of the real scene, wherein the first object and the second object correspond to the same object or the same type of object.
[0071] Exemplarily, the first object and the second object may be whole objects such as people, animals, plants, the ground, the sky, etc., or parts of objects such as human body parts, plant leaves, clouds in the sky, etc. For example, in a virtual shooting scene, a lunar soil rendering picture is displayed on the display screen, and lunar simulated soil is laid in front of the display screen to create a realistic feeling that the actors are on the moon. The target image captured by the image acquisition device includes a picture part of the lunar soil rendering picture and a picture part of the lunar simulated soil. The first object may be the lunar soil in the picture part of the lunar soil rendering picture, and the second object may be the lunar soil in the picture part of the lunar simulated soil. In this way, the first object and the second object correspond to the same object (i.e., lunar soil). For another example, in a virtual shooting scene, a forest rendering image is displayed on the display screen, and multiple simulated trees are built in front of the display screen to create a realistic feeling that the actors are walking through the forest. The target image captured by the image acquisition device includes a screen portion of the forest rendering image and a screen portion of the multiple simulated trees. The first object may be a tree in the screen portion of the forest rendering image, and the second object may be a tree in the screen portion of the multiple simulated trees. In this way, the first object and the second object correspond to the same type of object (i.e., a tree).
[0072] It is understandable that, when the user selects multiple first color sampling areas and second color sampling areas, the objects located in different first color sampling areas may be different, the objects located in different second color sampling areas may also be different, and the object located in the first color sampling area and the object located in the second color sampling area in the same pair of color sampling areas correspond to the same object or the same type of object.
[0073] The user can select the first color sampling area and the second color sampling area based on needs. For example, when the user observes that the first color sampling area and the second color sampling area have color difference and need to be aligned, or when the user wants to align the color of a certain category or a certain object, the second operation can be performed.
[0074] In a possible implementation, in response to the second operation of the user on the target image, highlighting the first color sampling area and the second color sampling area in the target image includes: in response to the user selecting the first color sampling area in the screen portion of the virtual scene, highlighting the first color sampling area; in response to the user selecting the second color sampling area in the screen portion of the real scene, highlighting the second color sampling area. In this way, the user can select the first color sampling area and the second color sampling area, so that the user can determine a pair of color sampling areas through the operation of selecting the color sampling areas twice, and highlight the pair of color sampling areas in the color alignment interface.
[0075] Exemplarily, in response to a user selecting a first color sampling area in a screen portion of a virtual scene, the object corresponding to the object where the first color sampling area is located can be determined, and in response to a user selecting a second color sampling area in a screen portion of a real scene, the object corresponding to the object where the second color sampling area is located can be determined; further, it can be determined whether the object corresponding to the object where the second color sampling area is located and the object corresponding to the object where the first color sampling area is located are the same object or the same type of object. If not, a prompt message can be sent to the user to remind the user that the first color sampling area and the second color sampling area cannot be a pair of color sampling areas, so that the user can reselect the color sampling area.
[0076] For example, the user can select the color sampling area multiple times in the screen part of the virtual scene and the screen part of the real scene in turn, thereby determining multiple pairs of color sampling areas. Figure 5Taking the operation of selecting a color sampling area in the color alignment interface shown as an example, the user can first select a first color sampling area in the first sampling area, and the color alignment interface highlights the first color sampling area with an oval with a red frame. Then, the user can select a second color sampling area in the second sampling area, and the color alignment interface highlights the second color sampling area with a square with a red frame, thereby completing the selection of a pair of color sampling areas; similarly, the user can continue to select another first color sampling area in the first sampling area, and the color alignment interface highlights the first color sampling area with an oval with a blue frame. Then, the user can select another second color sampling area in the second sampling area, and the color alignment interface highlights the second color sampling area with a square with a blue frame, thereby completing the selection of another pair of color sampling areas; and so on, the user can select multiple pairs of color sampling areas in sequence as needed, and the color alignment interface highlights these color sampling areas accordingly.
[0077] For example, after the user selects a color sampling area in both the screen part of the virtual scene and the screen part of the real scene, a prompt message may be sent to the user so that the user can confirm whether to use the two color sampling areas as a pair of color sampling areas, and then, in response to the user's confirmation operation, the two color sampling areas are used as a pair of color sampling areas. Alternatively, after the user selects multiple color sampling areas in both the screen part of the virtual scene and the screen part of the real scene, a prompt message may be sent to the user so that the user can confirm the two color sampling areas that are used as a pair of color sampling areas, and in response to the user's multiple confirmation operations, a color sampling area selected by the user in the screen part of the virtual scene and a color sampling area selected by the user in the screen part of the real scene are sequentially used as a pair of color sampling areas.
[0078] In a possible implementation, in response to the user's second operation on the target image, highlighting the first color sampling area and the second color sampling area in the target image includes: in response to the user selecting the first color sampling area in the screen portion of the virtual scene, highlighting the first color sampling area; highlighting the second color sampling area, wherein the second color sampling area matches the first color sampling area. In this way, the user can select the first color sampling area as needed, and the electronic device can automatically determine the second color sampling area that matches it, thereby enabling the user to perform a color sampling area selection operation once to determine a pair of color sampling areas, and highlighting the pair of color sampling areas in the color alignment interface.
[0079] For example, the user may select the first color sampling area multiple times in sequence in the screen portion of the virtual scene, and the electronic device may automatically determine the second color sampling area matching each color sampling area, thereby determining multiple pairs of color sampling areas.
[0080] As an example, take the user in the above Figure 5 Taking the operation of selecting a color sampling area in the color alignment interface shown as an example, the user can first select a first color sampling area in the first sampling area, and the color alignment interface highlights the first color sampling area with an oval with a red frame. Then, the electronic device automatically selects a second color sampling area that matches it, and the color alignment interface highlights the second color sampling area with a square with a red frame, thereby completing the selection of a pair of color sampling areas; similarly, the user can continue to select another first color sampling area in the first sampling area, and the color alignment interface highlights the first color sampling area with an oval with a blue frame. The electronic device automatically selects a second color sampling area that matches it, and the color alignment interface highlights the second color sampling area with a square with a blue frame, thereby completing the selection of another pair of color sampling areas; and so on, the user can select multiple pairs of color sampling areas in sequence as needed, and the color alignment interface highlights these color sampling areas accordingly.
[0081] Exemplarily, the electronic device can automatically identify a second color sampling area matching the first color sampling area in a screen portion other than the screen portion where the first color sampling area is located in the target image based on the first color sampling area selected by the user. For example, if the first color sampling area is located in a screen portion of a virtual scene, the electronic device can automatically identify a second color sampling area matching the first color sampling area in a screen portion of a real scene. As an example, a pre-trained machine learning recognition model can be used, and the model can automatically identify the second color sampling area based on the features of the first color sampling area; for example, the screen portion other than the screen portion where the first color sampling area is located can be divided into different areas, and the model can extract the texture, color and other features of the divided different areas and the first color sampling area, and then perform similarity matching based on the extracted features, and use the area of the divided different areas that is most similar to the first color sampling area as the second color sampling area.
[0082] Exemplarily, the electronic device can automatically identify a second object matching the first object in a screen portion other than the screen portion where the first color sampling area is located in the target image based on the first object where the first color sampling area is located; and then select an area in the second object as the second color sampling area matching the first color sampling area. As an example, a pre-trained machine learning recognition model can be used, and the model can automatically identify the second object based on the features of the first object; for example, the model can extract the objects in the screen portion other than the screen portion where the first color sampling area is located in the target image and the features of the shape, color, texture, etc. of the first object, and then perform similarity matching based on the extracted features, and select the object that is most similar to the first object among the objects as the second object, and then randomly select an area in the second object as the second color sampling area.
[0083] Step 403, displaying the color-aligned image; wherein the color-aligned image is an image obtained by color-aligning at least a portion of the picture portion of the virtual scene in the target image with at least a portion of the picture portion of the real scene based on the first color sampling area and the second color sampling area.
[0084] For example, the original image after color alignment can be displayed on the color alignment interface, or the image after color alignment can be displayed in the form of a preview image or thumbnail, etc. In this way, the user can preview the effect of the image after color alignment in real time, and can continue to select other color sampling areas for color alignment as needed.
[0085] Exemplarily, color alignment of at least a portion of a picture portion of a virtual scene in a target image with at least a portion of a picture portion of a real scene based on a first color sampling area and a second color sampling area may include: color alignment of the first color sampling area and the second color sampling area in the target image, so that, in the image after color alignment, there is no color difference between the first color sampling area and the second color sampling area; wherein, in the case where multiple pairs of color sampling areas are selected as described above, color alignment may be performed based on the multiple pairs of color sampling areas, so that in the image after color alignment, there is no color difference between the same pair of color sampling areas.
[0086] Exemplarily, color alignment of at least a portion of a picture portion of a virtual scene in a target image with at least a portion of a picture portion of a real scene based on a first color sampling area and a second color sampling area may include: color alignment of a first object in the target image where the first color sampling area is located with a second object in the target image where the second color sampling area is located, so that there is no color difference between the first object and the second object in the color-aligned image.
[0087] Exemplarily, color alignment of at least a portion of a virtual scene portion of a target image with at least a portion of a real scene portion of a target image based on a first color sampling area and a second color sampling area may include: color alignment of the same object or the same type of object corresponding to a first object in the first color sampling area and a second object in the second color sampling area. For example, at a virtual shooting scene, a forest rendering image is displayed on a display screen, and a plurality of simulated trees are built in front of the display screen. Both the first object and the second object correspond to trees, and each tree in the forest rendering image may be color aligned with each simulated tree built in front of the display screen. Other portions of the image that are not color aligned may keep their original colors unchanged. However, as needed, color alignment may also be extended to other ranges other than the above.
[0088] In the embodiment of the present disclosure, in response to a first operation of a user, a target image captured by an image acquisition device is displayed; wherein the target image includes a screen portion of a virtual scene and a screen portion of a real scene; in response to a second operation of the user on the target image, a first color sampling area and a second color sampling area in the target image are highlighted; the first color sampling area and the second color sampling area are respectively located in the screen portion of the virtual scene and the screen portion of the real scene in the target image; and a color-aligned image is displayed; wherein the color-aligned image is an image after color alignment of at least a portion of the screen portion of the virtual scene in the target image and at least a portion of the screen portion of the real scene based on the first color sampling area and the second color sampling area. In this way, the user only needs to select a color sampling area in the target image captured by the image acquisition device to achieve color alignment, and the user does not need to judge the color difference value of the object in the real scene and the virtual scene based on experience, thereby reducing the experience requirements of the user and improving the efficiency of color alignment. As an example, the user can select multiple color sampling areas on the electronic device and perform color alignment of multiple objects at the same time, further improving the efficiency of color alignment.
[0089] In the disclosed embodiment, color alignment can be performed by adjusting the color of the screen portion of the virtual scene in the target image, or by adjusting the color of the screen portion of the real scene in the target image. Exemplarily, adjusting the color of the screen portion of the virtual scene involves modifying the color of the rendered virtual scene, while adjusting the color of the screen portion of the real scene involves remaking and building the real scene, which is more difficult and labor-intensive. Therefore, color alignment can be performed by adjusting the color of the screen portion of the real scene in the target image.
[0090] Figure 6A flow chart of a color alignment method according to an embodiment of the present disclosure is shown as follows: Figure 6 As shown, the method may include:
[0091] Step 601: In response to a first operation of a user, a target image captured by an image acquisition device is displayed; wherein the target image includes a picture portion of a virtual scene and a picture portion of a real scene.
[0092] This step is similar to the above Figure 4 The step 401 is the same as that in the above step and will not be described again.
[0093] Step 602: In response to a second operation of the user on the target image, a first color sampling area and a second color sampling area in the target image are highlighted; the first color sampling area and the second color sampling area are respectively located in a screen portion of a virtual scene and a screen portion of a real scene in the target image.
[0094] This step is similar to the above Figure 4 The same as step 402 in FIG. 1 and will not be repeated here.
[0095] Step 603: Obtain the color value of the first color sampling area and the color value of the second color sampling area.
[0096] Exemplarily, the color values of the first color sampling area and the second color sampling area may be the average color values of all pixels in the corresponding color sampling area, or may be the color value of one or more pixels in the corresponding color sampling area. The color value may be any one of RGB color value, HSV color value, CMYK color value, LAB color value, etc. As an example, the color value may be an RGB color value, that is, represented by three color channel components of red (R), green (G) and blue (B), wherein the value range of each color channel component is 0 to 255.
[0097] Exemplarily, the color value of the color sampling area can be the RAW data of the image acquisition device, and the color space corresponding to the color value is the color space of the RAW data supported by the image acquisition device itself, for example, it can be: sRGB, DCI-P3, Rec.2020, Adobe RGB and other color spaces.
[0098] In a possible implementation, while highlighting the first color sampling area and the second color sampling area, the color value of the first color sampling area and the color value of the second color sampling area are displayed. In this way, by objectively displaying the color value of the first color sampling area and the color value of the second color sampling area, it is convenient for users to view color differences more objectively.
[0099] Exemplarily, an undo function button may be displayed in the color alignment interface, and the user may independently determine whether it is necessary to continue to perform color alignment based on the pair of color sampling areas based on the color value of the first color sampling area and the color value of the second color sampling area, and may abandon the color alignment based on the pair of color sampling areas by triggering the undo function button; for example, the user may trigger the undo function button when the difference between the color value of the first color sampling area and the color value of the second color sampling area is small.
[0100] Step 604: Calculate a color difference value based on the color value of the first color sampling area and the color value of the second color sampling area.
[0101] Considering that the color space used by the image acquisition device (i.e., the color space of the RAW data supported by the image acquisition device itself) may be different from the color space used for rendering the virtual scene, exemplarily, it can be determined whether the color space used for rendering the virtual scene is consistent with the color space used by the image acquisition device. If not, the color values of the first color sampling area and the second color sampling area can be converted into color spaces. In a possible implementation, the color difference value is calculated based on the color value of the first color sampling area and the color value of the second color sampling area, including: based on a preset mapping relationship, the color value of the first color sampling area and the color value of the second color sampling area are converted into color space; wherein the preset mapping relationship is the mapping relationship between the color space used by the image acquisition device and the color space used for rendering the virtual scene; the color difference value is calculated based on the color values of the first color sampling area and the second color sampling area after the color space conversion. Exemplarily, the mapping relationship between the color space used by the image acquisition device and the color space used for rendering the virtual scene can be a conversion matrix between the two color spaces, and the conversion matrix can be obtained by an existing method. In this way, the color values of the first color sampling area and the second color sampling area can be converted from the color space used by the image acquisition device to the color space used for rendering the virtual scene.
[0102] Exemplarily, a difference between a color value of the first color sampling area and a color value of the second color sampling area may be calculated as the color difference value.
[0103] In a possible implementation, the difference between the color value of the first color sampling area and the color value of the second color sampling area, that is, the color difference value, is displayed. Exemplarily, when the difference between the color value of the first color sampling area and the color value of the second color sampling area is less than a preset threshold, a prompt message may be issued to the user to remind the user that the color difference between the first color sampling area and the second color sampling area is small, and whether to continue color alignment. Then, the user may choose to continue color alignment based on the pair of color sampling areas, or cancel the selected pair of color sampling areas as needed.
[0104] Step 605: Based on the color difference value, align the colors of at least a partial area in the picture portion of the virtual scene in the target image with the colors of at least a partial area in the picture portion of the real scene to generate a color-aligned image.
[0105] For example, based on the color difference value, the colors of the first color sampling area and the second color sampling area can be aligned, or the colors of the first object where the first color sampling area is located and the second object where the second color sampling area is located can be aligned, or the colors of the same or the same type of objects corresponding to the first object where the first color sampling area is located and the second object where the second color sampling area is located can be aligned.
[0106] In a possible implementation, the color difference value represents a color difference between the first color sampling area and the second color sampling area; the first color sampling area is located in a screen portion of the virtual scene; and aligning the colors of the screen portion of the virtual scene and the screen portion of the real scene in the target image based on the color difference value includes: adjusting the color of rendering the first color sampling area or an object associated with the first color sampling area based on the color difference value.
[0107] The object associated with the first color sampling area is the first object where the first color sampling area is located. Exemplarily, the electronic device can subtract the color difference value from the original rendering color of the first color sampling area or the object associated with the first color sampling area to obtain an adjusted rendering color value, and then render based on the adjusted rendering color value, and display the rendered image on the display screen of the virtual shooting scene, and the image acquisition device captures a new image, which is the color-aligned image.
[0108] Step 606, displaying the color-aligned image; wherein the color-aligned image is an image obtained by color-aligning at least a portion of the picture portion of the virtual scene in the target image with at least a portion of the picture portion of the real scene based on the first color sampling area and the second color sampling area.
[0109] This step is similar to the above Figure 4 The same as step 403 in the above description will not be repeated here.
[0110] In a possible implementation, while displaying the color-aligned image, the color value of the first color sampling area and the color value of the second color sampling area are displayed, and / or the difference between the color value of the first color sampling area and the color value of the second color sampling area is displayed. In this way, by displaying the color value of the first color sampling area and the color value of the second color sampling area in real time, the effect of color alignment is objectively demonstrated, providing a more objective reference for the user, thereby avoiding the deviation caused by the user's judgment of whether the colors are consistent by subjective factors such as the naked eye.
[0111] As an example, Figure 7 A schematic diagram of a color alignment interface according to an embodiment of the present disclosure is shown as follows: Figure 7 As shown in the above Figure 5 On the basis of the color alignment interface shown, the color value of each color sampling area after the color alignment is displayed, so as to more objectively display the effect of the color alignment.
[0112] In the embodiment of the present disclosure, in response to a first operation of a user, a target image captured by an image acquisition device is displayed; in response to a second operation of a user on the target image, a first color sampling area and a second color sampling area in the target image are highlighted; a color value of the first color sampling area and a color value of the second color sampling area are obtained, and a color difference value is calculated based on the color value of the first color sampling area and the color value of the second color sampling area; based on the color difference value, the color of at least a part of the image part of the virtual scene in the target image is aligned with the color of at least a part of the image part of the real scene, and a color-aligned image is generated; and the color-aligned image is displayed. In this way, the user only needs to select a color sampling area in the target image captured by the image acquisition device, and the electronic device analyzes the color data of the first color sampling area and the second color sampling area, calculates the color difference value and performs color alignment, thereby realizing color alignment with one click. As an example, the color value of the color sampling area can be displayed after color alignment, so that by providing the quantitative data after alignment, the alignment effect can be objectively displayed, avoiding the subjective judgment difference caused by the color alignment effect perceived by the naked eye.
[0113] Based on the same inventive concept of the above method embodiment, the embodiment of the present disclosure further provides a color alignment device, which can be used to execute the technical solution described in the above method embodiment.
[0114] Figure 8A schematic diagram of the structure of a color alignment device according to an embodiment of the present disclosure is shown as follows: Figure 8 As shown, the device may include: a display module 801, for displaying a target image captured by an image acquisition device in response to a first operation of a user; wherein the target image includes a screen portion of a virtual scene and a screen portion of a real scene; a sampling module 802, for highlighting a first color sampling area and a second color sampling area in the target image in response to a second operation of the user on the target image; the first color sampling area and the second color sampling area are respectively located in the screen portion of the virtual scene and the screen portion of the real scene in the target image; an alignment module 803, for displaying a color-aligned image; wherein the color-aligned image is an image obtained by color-aligning at least a portion of the screen portion of the virtual scene in the target image with at least a portion of the screen portion of the real scene based on the first color sampling area and the second color sampling area.
[0115] In the embodiment of the present disclosure, in response to a first operation of a user, a target image captured by an image acquisition device is displayed; wherein the target image includes a screen portion of a virtual scene and a screen portion of a real scene; in response to a second operation of the user on the target image, a first color sampling area and a second color sampling area in the target image are highlighted; the first color sampling area and the second color sampling area are respectively located in the screen portion of the virtual scene and the screen portion of the real scene in the target image; and a color-aligned image is displayed; wherein the color-aligned image is an image after color alignment of at least a portion of the screen portion of the virtual scene in the target image and at least a portion of the screen portion of the real scene based on the first color sampling area and the second color sampling area. In this way, the user only needs to select a color sampling area in the target image captured by the image acquisition device to achieve color alignment, and the user does not need to judge the color difference value of the object in the real scene and the virtual scene based on experience, thereby reducing the experience requirements of the user and improving the efficiency of color alignment. As an example, the user can select multiple color sampling areas on the electronic device and perform color alignment of multiple objects at the same time, further improving the efficiency of color alignment.
[0116] In a possible implementation, the alignment module 803 is further used to: display the color value of the first color sampling area and the color value of the second color sampling area, and / or display the difference value between the color value of the first color sampling area and the color value of the second color sampling area.
[0117] In a possible implementation, the first color sampling area is located at a first object in the screen portion of the virtual scene, and the second color sampling area is located at a second object in the screen portion of the real scene, wherein the first object and the second object correspond to the same object or the same type of object.
[0118] In a possible implementation, the second operation includes an operation of selecting a color sampling area; the sampling module 802 is further used to: in response to a user selecting the first color sampling area in a screen portion of the virtual scene, highlight the first color sampling area; in response to a user selecting the second color sampling area in a screen portion of the real scene, highlight the second color sampling area.
[0119] In a possible implementation, the second operation includes an operation of selecting a color sampling area; the sampling module 802 is further used to: in response to a user selecting the first color sampling area in a screen portion of the virtual scene, highlight the first color sampling area; and highlight the second color sampling area, wherein the second color sampling area matches the first color sampling area.
[0120] In a possible implementation, the alignment module 803 is further used to: obtain the color value of the first color sampling area and the color value of the second color sampling area; calculate a color difference value based on the color value of the first color sampling area and the color value of the second color sampling area; and align the color of at least a partial area in the picture portion of the virtual scene in the target image with the color of at least a partial area in the picture portion of the real scene based on the color difference value to generate the color-aligned image.
[0121] In a possible implementation, the color difference value represents the color difference between the first color sampling area and the second color sampling area; the first color sampling area is located in the screen portion of the virtual scene; the alignment module 803 is further used to: based on the color difference value, adjust the color of rendering the first color sampling area or the object associated with the first color sampling area.
[0122] In a possible implementation, the alignment module 803 is further used to: perform color space conversion on the color values of the first color sampling area and the color values of the second color sampling area based on a preset mapping relationship; wherein the preset mapping relationship is a mapping relationship between the color space used by the image acquisition device and the color space used for rendering the virtual scene; and calculate the color difference value based on the color values of the first color sampling area and the second color sampling area after the color space conversion.
[0123] In some embodiments, the functions or modules included in the device provided by the embodiments of the present disclosure can be used to execute the method described in the above method embodiments. The specific implementation can refer to the description of the above method embodiments, and for the sake of brevity, it will not be repeated here.
[0124] The embodiment of the present disclosure also provides a computer-readable storage medium on which computer program instructions are stored, and the computer program instructions implement the above method when executed by a processor. The computer-readable storage medium can be a volatile or non-volatile computer-readable storage medium.
[0125] An embodiment of the present disclosure further proposes an electronic device, comprising: a processor; and a memory for storing instructions executable by the processor; wherein the processor is configured to implement the above method when executing the instructions stored in the memory.
[0126] The embodiments of the present disclosure also provide a computer program product, including a computer-readable code, or a non-volatile computer-readable storage medium carrying the computer-readable code. When the computer-readable code runs in a processor of an electronic device, the processor in the electronic device executes the above method.
[0127] Fig. 9 FIG. 1 is a block diagram of an electronic device 1900 according to an embodiment of the present disclosure. For example, the electronic device 1900 may be provided as a server or a terminal device. Fig. 9 , the electronic device 1900 includes a processing component 1922, which further includes one or more processors, and a memory resource represented by a memory 1932 for storing instructions executable by the processing component 1922, such as an application. The application stored in the memory 1932 may include one or more modules, each corresponding to a set of instructions. In addition, the processing component 1922 is configured to execute instructions to perform the above method.
[0128] The electronic device 1900 may also include a power supply component 1926 configured to perform power management of the electronic device 1900, a wired or wireless network interface 1950 configured to connect the electronic device 1900 to a network, and an input / output interface 1958 (I / O interface). The electronic device 1900 may operate based on an operating system stored in the memory 1932, such as Windows Server 2003. TM , Mac OS X TM , Unix TM ,Linux TM , FreeBSD TM or similar.
[0129] In an exemplary embodiment, a non-volatile computer-readable storage medium is also provided, such as a memory 1932 including computer program instructions, which can be executed by the processing component 1922 of the electronic device 1900 to perform the above method.
[0130] The present disclosure may be a system, a method and / or a computer program product. The computer program product may include a computer-readable storage medium carrying computer-readable program instructions for causing a processor to implement various aspects of the present disclosure.
[0131] A computer-readable storage medium may be a tangible device that can hold and store instructions used by an instruction execution device. A computer-readable storage medium may be, for example, but not limited to, an electrical storage device, a magnetic storage device, an optical storage device, an electromagnetic storage device, a semiconductor storage device, or any suitable combination of the foregoing. More specific examples of computer-readable storage media (a non-exhaustive list) include: a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), a static random access memory (SRAM), a portable compact disk read-only memory (CD-ROM), a digital versatile disk (DVD), a memory stick, a floppy disk, a mechanical encoding device, such as a punch card or a raised structure in a groove on which instructions are stored, and any suitable combination of the foregoing. As used herein, a computer-readable storage medium is not to be interpreted as a transient signal per se, such as a radio wave or other freely propagating electromagnetic wave, an electromagnetic wave propagating through a waveguide or other transmission medium (e.g., a light pulse through a fiber optic cable), or an electrical signal transmitted through a wire.
[0132] The computer-readable program instructions described herein can be downloaded from a computer-readable storage medium to each computing / processing device, or downloaded to an external computer or external storage device via a network, such as the Internet, a local area network, a wide area network, and / or a wireless network. The network can include copper transmission cables, optical fiber transmissions, wireless transmissions, routers, firewalls, switches, gateway computers, and / or edge servers. The network adapter card or network interface in each computing / processing device receives the computer-readable program instructions from the network and forwards the computer-readable program instructions for storage in the computer-readable storage medium in each computing / processing device.
[0133] The computer program instructions for performing the operation of the present disclosure may be assembly instructions, instruction set architecture (ISA) instructions, machine instructions, machine-related instructions, microcode, firmware instructions, state setting data, or source code or object code written in any combination of one or more programming languages, including object-oriented programming languages, such as Smalltalk, C++, etc., and conventional procedural programming languages, such as "C" language or similar programming languages. Computer-readable program instructions may be executed completely on a user's computer, partially on a user's computer, as an independent software package, partially on a user's computer, partially on a remote computer, or completely on a remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer via any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., using an Internet service provider to connect via the Internet). In some embodiments, an electronic circuit, such as a programmable logic circuit, a field programmable gate array (FPGA), or a programmable logic array (PLA), may be customized by utilizing the state information of the computer-readable program instructions, and the electronic circuit may execute the computer-readable program instructions, thereby realizing various aspects of the present disclosure.
[0134] Various aspects of the present disclosure are described herein with reference to the flowcharts and / or block diagrams of the methods, devices (systems) and computer program products according to the embodiments of the present disclosure. It should be understood that each box in the flowchart and / or block diagram and the combination of each box in the flowchart and / or block diagram can be implemented by computer-readable program instructions.
[0135] These computer-readable program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing device, thereby producing a machine, so that when these instructions are executed by the processor of the computer or other programmable data processing device, a device that implements the functions / actions specified in one or more boxes in the flowchart and / or block diagram is generated. These computer-readable program instructions can also be stored in a computer-readable storage medium, and these instructions cause the computer, programmable data processing device, and / or other equipment to work in a specific manner, so that the computer-readable medium storing the instructions includes a manufactured product, which includes instructions for implementing various aspects of the functions / actions specified in one or more boxes in the flowchart and / or block diagram.
[0136] Computer-readable program instructions may also be loaded onto a computer, other programmable data processing apparatus, or other device so that a series of operating steps are performed on the computer, other programmable data processing apparatus, or other device to produce a computer-implemented process, thereby causing the instructions executed on the computer, other programmable data processing apparatus, or other device to implement the functions / actions specified in one or more boxes in the flowchart and / or block diagram.
[0137] The flow chart and block diagram in the accompanying drawings show the possible architecture, function and operation of the system, method and computer program product according to multiple embodiments of the present disclosure. In this regard, each square box in the flow chart or block diagram can represent a part of a module, program segment or instruction, and a part of the module, program segment or instruction includes one or more executable instructions for realizing the specified logical function. In some alternative implementations, the function marked in the square box can also occur in a sequence different from that marked in the accompanying drawings. For example, two continuous square boxes can actually be executed substantially in parallel, and they can sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each square box in the block diagram and / or flow chart, and the combination of the square boxes in the block diagram and / or flow chart can be implemented with a dedicated hardware-based system that performs the specified function or action, or can be implemented with a combination of special hardware and computer instructions.
[0138] The embodiments of the present disclosure have been described above, and the above description is exemplary, not exhaustive, and is not limited to the disclosed embodiments. Many modifications and changes will be apparent to those of ordinary skill in the art without departing from the scope and spirit of the described embodiments. The selection of terms used herein is intended to best explain the principles of the embodiments, practical applications, or technical improvements in the market, or to enable other persons of ordinary skill in the art to understand the embodiments disclosed herein.
Claims
1. A color alignment method, characterized in that: The method comprises: In response to a first operation of the user, a target image captured by the image acquisition device is displayed; wherein the target image includes a picture portion of a virtual scene and a picture portion of a real scene; In response to a second operation of the user on the target image, a first color sampling area and a second color sampling area in the target image are highlighted; the first color sampling area and the second color sampling area are respectively located in a screen portion of a virtual scene and a screen portion of a real scene in the target image; Display a color-aligned image; wherein the color-aligned image is an image obtained by color-aligning at least a portion of the picture portion of the virtual scene in the target image with at least a portion of the picture portion of the real scene based on the first color sampling area and the second color sampling area.
2. The method according to claim 1, characterized in that The method further comprises: Display the color value of the first color sampling area and the color value of the second color sampling area, and / or The difference value between the color value of the first color sampling area and the color value of the second color sampling area is displayed.
3. The method according to claim 1, characterized in that The first color sampling area is located at a first object in the screen portion of the virtual scene, and the second color sampling area is located at a second object in the screen portion of the real scene, wherein the first object and the second object correspond to the same object or the same type of object.
4. The method according to claim 1, characterized in that: The second operation includes an operation of selecting a color sampling area; In response to the user's second operation on the target image, highlighting the first color sampling area and the second color sampling area in the target image includes: In response to a user selecting the first color sampling area in a screen portion of the virtual scene, highlighting the first color sampling area; In response to the user selecting the second color sampling area in the screen portion of the real scene, the second color sampling area is highlighted.
5. The method according to claim 1, characterized in that The second operation includes an operation of selecting a color sampling area; In response to the user's second operation on the target image, highlighting the first color sampling area and the second color sampling area in the target image includes: In response to a user selecting the first color sampling area in a screen portion of the virtual scene, highlighting the first color sampling area; The second color sampling area is highlighted, wherein the second color sampling area matches the first color sampling area.
6. The method according to claim 1, characterized in that The method further comprises: Obtaining the color value of the first color sampling area and the color value of the second color sampling area; Calculating a color difference value based on the color value of the first color sampling area and the color value of the second color sampling area; Based on the color difference value, the colors of at least a partial area in the picture part of the virtual scene in the target image and at least a partial area in the picture part of the real scene are aligned to generate the color-aligned image.
7. The method according to claim 6, characterized in that The color difference value indicates a color difference between the first color sampling area and the second color sampling area; the first color sampling area is located in a screen portion of the virtual scene; The step of aligning the colors of at least a partial area of the picture portion of the virtual scene in the target image with at least a partial area of the picture portion of the real scene based on the color difference value comprises: Based on the color difference value, the color of rendering the first color sampling area or an object associated with the first color sampling area is adjusted.
8. The method according to claim 6, characterized in that The calculating the color difference value based on the color value of the first color sampling area and the color value of the second color sampling area includes: Based on a preset mapping relationship, color space conversion is performed on the color values of the first color sampling area and the color values of the second color sampling area; wherein the preset mapping relationship is a mapping relationship between the color space used by the image acquisition device and the color space used for rendering the virtual scene; The color difference value is calculated based on the color values of the first color sampling area and the second color sampling area after color space conversion.
9. A color alignment device, characterized in that: The device comprises: A display module, configured to display a target image captured by the image acquisition device in response to a first operation of the user; wherein the target image includes a picture portion of a virtual scene and a picture portion of a real scene; A sampling module, configured to highlight a first color sampling area and a second color sampling area in the target image in response to a second operation of the user on the target image; the first color sampling area and the second color sampling area are respectively located in a screen portion of a virtual scene and a screen portion of a real scene in the target image; An alignment module is used to display a color-aligned image; wherein the color-aligned image is an image obtained by color-aligning at least a portion of the image portion of the virtual scene in the target image with at least a portion of the image portion of the real scene based on the first color sampling area and the second color sampling area.
10. An electronic device, characterized in that: include: processor; a memory for storing processor-executable instructions; The processor is configured to implement the method described in any one of claims 1 to 8 when executing the instructions stored in the memory.
11. A non-volatile computer-readable storage medium having computer program instructions stored thereon, characterized in that: When the computer program instructions are executed by a processor, the method according to any one of claims 1 to 8 is implemented.
Citation Information
Patent Citations
Virtual object adjustment method and device, storage medium and augmented reality equipment
CN111415422A
Image processing method, image processing device, storage medium and electronic equipment
CN115239550A
Color correction method and device for virtual shooting and storage medium
CN117221460A
Virtual and real material color alignment method and device, equipment and storage medium
CN117560577A
Cited By
Method and device for determining alignment area in virtual and real light alignment, virtual and real light alignment method and device and medium
CN121544671A
Alignment region determination in virtual-real light alignment and virtual-real light alignment method, device and medium
CN121544671B