Virtual shooting method, video processing method and device

By alternately displaying frames of virtual scenes and solid color areas in virtual shooting, combined with post-processing, the problems of unnatural traditional shooting effects and insufficient virtual shooting performance are solved, and high-quality shooting effects are achieved.

CN119011998APending Publication Date: 2024-11-22DIVINE VISION (SHENZHEN) CULTURE TECH CO LTD

Patent Information

Application Number
CN202410954880.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-07-16
Publication Date
2024-11-22

AI Technical Summary

Technical Problem

Traditional blue-green screen shooting cannot reflect natural effects. Virtual shooting has limitations such as high computing power requirements, reduced rendering resolution and moiré phenomenon, and cannot achieve high-quality movie effects.

Method used

By alternately displaying normal frames and reference frames during virtual shooting, the normal frames are virtual scenes and the reference frames are pictures with partial areas as solid color areas, video frames are obtained and post-processed, replacing the pending video frames to achieve natural diffuse reflection Effect and high-quality background replacement.

Benefits of technology

It effectively reduces the limitations of virtual shooting, expands applicable scenes, and achieves high-quality filming effects at the film level.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119011998A_ABST
    Figure CN119011998A_ABST
Patent Text Reader

Abstract

The invention relates to a virtual shooting method and device and a video processing method and device, and the virtual shooting method comprises the steps: obtaining a normal frame and a reference frame; wherein a picture in the normal frame is a picture of a virtual scene; the picture in the reference frame is a picture of which at least partial region is a pure color region; alternately displaying the normal frame and the reference frame on a display screen for virtual shooting according to a preset alternate mode; a shot video is obtained, and the video comprises a video frame with the picture in the normal frame or the picture in the reference frame as the background and an entity object as the foreground. According to the method and the device, the defects of green screen shooting and virtual shooting can be overcome at the same time by combining the modes of green screen shooting and virtual shooting, so that the virtual shooting achieves a movie-level high-quality effect.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to the technical field of virtual shooting, and in particular to a virtual shooting method, a video processing method and a device. Background Art

[0002] In traditional blue-green screen shooting, the blue-green background cannot reflect a realistic and natural effect. At the same time, the color of the blue-green screen may be reflected on the physical object, especially when the physical object is close to the blue-green background, which will cause unnatural blue or green outlines on the edge of the physical object. For physical objects with reflective surfaces, such as glasses, metal, etc., the color of the blue-green screen will be reflected on these surfaces, and it is challenging to handle these reflected colors.

[0003] In recent years, virtual shooting (also known as LED virtual shooting) has developed rapidly. Although virtual shooting can overcome the diffuse reflection and other problems caused by blue and green screen shooting, virtual shooting also has various limitations. For example, virtual shooting requires huge computing power. In some very realistic scenes, it cannot meet the requirements of real-time rendering, so the rendering resolution can only be reduced, resulting in a decrease in shooting quality. For example, in virtual shooting, it is impossible to focus on the display screen, otherwise moiré will appear, which limits many shooting techniques. These limitations make it impossible for virtual shooting to achieve movie-level high-quality effects. Summary of the invention

[0004] In view of this, the present disclosure proposes a virtual shooting method, a video processing method, a virtual shooting device, a video processing device, an electronic device and a storage medium.

[0005] According to one aspect of the present disclosure, a virtual shooting method is provided, the method comprising:

[0006] Acquire a normal frame and a reference frame; wherein the picture in the normal frame is a picture of a virtual scene; and the picture in the reference frame is a picture in which at least a part of the area is a pure color area;

[0007] Alternatingly displaying the normal frame and the reference frame on a display screen used for virtual shooting in a preset alternating manner;

[0008] A captured video is obtained, wherein the video includes a video frame with a picture in the normal frame or a picture in the reference frame as a background and a physical object as a foreground.

[0009] In a possible implementation manner, in a video frame with a picture in the reference frame as a background and the physical object as a foreground, the physical object is located in the pure color area.

[0010] In a possible implementation manner, the picture in the reference frame is a pure color picture.

[0011] In a possible implementation manner, the pure color area is a green area.

[0012] In a possible implementation manner, the preset alternation manner includes: alternating one normal frame with one reference frame or alternating multiple normal frames with one reference frame.

[0013] In a possible implementation manner, acquiring a normal frame and a reference frame includes:

[0014] Acquire normal frame data to be rendered, and corresponding reference frame data to be rendered, wherein the normal frame data to be rendered corresponds to a picture of a virtual scene, and the reference frame data to be rendered corresponds to a picture at least part of which is a pure color area;

[0015] splicing the normal frame data to be rendered and the reference frame data to be rendered in accordance with the preset alternating manner to obtain fused frame data to be rendered;

[0016] Rendering the to-be-rendered fused frame data at a preset rendering frame rate to obtain a rendered fused frame;

[0017] The fused frame is split according to the preset alternating method to obtain the normal frame and the reference frame; wherein the display frame rate of the normal frame on the display screen and the display frame rate of the reference frame on the display screen are both integer multiples of the preset rendering frame rate.

[0018] In a possible implementation, the obtaining corresponding reference frame data to be rendered includes:

[0019] Determining the relative position relationship between the physical object and the display screen, and the size of the physical object;

[0020] Based on the relative position relationship and the size of the physical object, determine the position and size of the target pure color area in the picture where at least a part of the area corresponding to the reference frame data to be rendered is a pure color area;

[0021] The target pure color area is merged with the picture of the virtual scene corresponding to the normal frame data to be rendered, so as to obtain a picture in which at least a part of the area corresponding to the reference frame data to be rendered is a pure color area.

[0022] In a possible implementation, the obtaining corresponding reference frame data to be rendered includes:

[0023] If the shutter used to shoot the video is a rolling shutter, color analysis is performed on the image of the virtual scene corresponding to the normal frame data to be rendered to determine the main color of the image of the virtual scene corresponding to the normal frame data to be rendered, and the main color is determined as the color of the target pure color area in the image in which at least a portion of the area corresponding to the reference frame data to be rendered is a pure color area.

[0024] In a possible implementation, if the shutter used to shoot the video is a global shutter, the display frame rate of the normal frame on the display screen and / or the display frame rate of the reference frame on the display screen are both at least twice the preset rendering frame rate.

[0025] According to another aspect of the present disclosure, a video processing method is provided, the method comprising:

[0026] Acquire a video frame to be processed; the video frame to be processed has a picture of a virtual scene as a background and a physical object as a foreground;

[0027] Acquire a reference video frame corresponding to the video frame to be processed, wherein a picture in the reference video frame has a picture with at least a part of a solid color area as a background and the physical object as a foreground;

[0028] The reference video frame is adjusted, and the adjusted video frame is used to replace the to-be-processed video frame.

[0029] In a possible implementation manner, adjusting the reference video frame and replacing the to-be-processed video frame with the adjusted video frame includes:

[0030] Separating the foreground and background of the picture in the reference video frame to obtain a background part and a foreground part;

[0031] The target picture is used to replace the background part, and the replaced background part is merged with the foreground part, and the merged video frame is used to replace the to-be-processed video frame.

[0032] In a possible implementation manner, the to-be-processed video frame and the reference video frame are video frames in a video shot according to the above-mentioned virtual shooting method.

[0033] According to another aspect of the present disclosure, a virtual shooting device is provided, the device comprising:

[0034] An acquisition module, used to acquire a normal frame and a reference frame; wherein the picture in the normal frame is a picture of a virtual scene; and the picture in the reference frame is a picture at least part of which is a pure color area;

[0035] A display module, used for alternately displaying the normal frame and the reference frame in a preset alternating manner on a display screen used for virtual shooting;

[0036] The acquisition module is further used to acquire the captured video, wherein the video includes a video frame with the picture in the normal frame or the picture in the reference frame as the background and the physical object as the foreground.

[0037] According to another aspect of the present disclosure, a video processing device is provided, the device comprising:

[0038] An acquisition module is used to acquire a video frame to be processed; the video frame to be processed has a picture of a virtual scene as a background and a physical object as a foreground;

[0039] The acquisition module is further used to acquire a reference video frame corresponding to the video frame to be processed, wherein the reference video frame has a picture with at least a part of a solid color area as the background and the physical object as the foreground;

[0040] The adjustment module is further used to adjust the reference video frame and use the adjusted video frame to replace the to-be-processed video frame.

[0041] 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.

[0042] 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.

[0043] 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.

[0044] In the disclosed embodiment, the disadvantages of green screen shooting and virtual shooting can be overcome by combining green screen shooting and virtual shooting. In the virtual shooting process, normal frames and reference frames are alternately displayed on a display screen used for virtual shooting in a preset alternating manner; the picture in the normal frame is a picture of a virtual scene; the picture in the reference frame is a picture of which at least part of the area is a pure color area, and a shot video is obtained, wherein the video includes a video frame with the picture in the normal frame or the picture in the reference frame as the background and a physical object as the foreground; then, when performing video processing in the later stage, for the video frame to be processed in the video, a reference video frame corresponding to the video frame to be processed is obtained, and then the reference video frame is adjusted, and the video frame to be processed is replaced by the adjusted video frame; in this way, the deficiencies in the virtual shooting process are compensated, the restrictions on the virtual shooting process are effectively reduced, the applicable scenarios of virtual shooting are more extensive, and virtual shooting can achieve movie-level high-quality effects.

[0045] 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

[0046] 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.

[0047] Figure 1 A structural diagram of a virtual shooting system according to an embodiment of the present disclosure is shown;

[0048] Figure 2 A flowchart of a virtual shooting method according to an embodiment of the present disclosure is shown;

[0049] Figure 3 A flowchart of acquiring a normal frame and a reference frame according to an embodiment of the present disclosure is shown;

[0050] 4(a)-(b) are schematic diagrams showing a picture of a virtual scene corresponding to normal frame data A to be rendered and a picture corresponding to reference frame data A' to be rendered, at least part of which is a pure color area;

[0051] Figure 5 A schematic diagram showing a method of determining the color of a target pure color area according to an embodiment of the present disclosure is shown;

[0052] 6(a)-(b) are schematic diagrams showing a picture corresponding to fused frame data to be rendered according to an embodiment of the present disclosure;

[0053] Figure 7 A schematic diagram showing a picture in fused frame data to be rendered according to an embodiment of the present disclosure;

[0054] Figure 8 A schematic diagram showing a method of alternately displaying a normal frame and a reference frame according to an embodiment of the present disclosure is shown;

[0055] Fig. 9 A schematic diagram showing another method of alternately displaying normal frames and reference frames according to an embodiment of the present disclosure is shown;

[0056] Fig.10 A flowchart of a video processing method according to an embodiment of the present disclosure is shown;

[0057] Fig.11 A schematic diagram showing a video processing method according to an embodiment of the present disclosure;

[0058] Fig.12 A schematic structural diagram of a virtual shooting device according to an embodiment of the present disclosure is shown;

[0059] Fig.13 A schematic diagram showing a structure of video processing according to an embodiment of the present disclosure is shown;

[0060] Fig.14 is a block diagram of an electronic device 1900 according to an exemplary embodiment. DETAILED DESCRIPTION

[0061] 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.

[0062] 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.

[0063] 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.

[0064] 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.

[0065] 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 rendering device 102, a broadcast control processing device 103, a display screen 104 (three display screens are shown in the figure: display screen 1041, display screen 1042 and display screen 1043), and a shooting device 105; wherein, the number of each type of equipment can be flexibly configured according to actual needs, and there is no limitation on this; in addition, in actual applications, other devices may be configured in the virtual shooting system as needed, such as a mobile terminal or a network device, etc.; one or more devices in the virtual shooting system may also be integrated into one device as needed, for example, the main control machine 101, the rendering device 102, and the broadcast control processing device 103 may be integrated into one device.

[0066] Exemplarily, the host 101 can be connected to the rendering device 102, and the specific connection method can be selected according to actual needs and device compatibility. For example, a wired or wireless connection can be made through a local area network or the Internet, and a network transmission protocol can be used for communication. The host 101 can send a variety of control instructions to the rendering device 102 connected thereto to control the rendering device 102 to render a desired image. As an example, the host 101 can be deployed with nDisplay, a high-performance multi-screen display management system based on UE (Unreal Engine).

[0067] Exemplarily, the rendering device 102 can be connected to the broadcast control processing device 103; the specific connection method can be selected according to actual needs and device compatibility. For example, it can include DP (DisplayPort, a digital display interface standard) connection, HDMI (High-Definition Multimedia Interface, a high-definition digital audio and video interface standard), etc. The rendering device 102 can render an image that meets the requirements in response to the control instructions of the main control machine 101, and can send the rendered image to the broadcast control processing device 103 connected thereto. As an example, the rendering device 102 can be deployed with a rendering engine, which constructs a virtual environment consistent with the real shooting environment by rendering images in real time; for example, the rendering engine can be UE (Unreal Engine).

[0068] Exemplarily, the broadcast control processing device 103 can be connected to the display screen 104; the specific connection method can be selected according to actual needs and device compatibility. For example, it can include DP or HDMI connection, and can also include USB (Universal Serial Bus) or network connection, etc. The broadcast control processing device 103 can be used to control and manage the display screen 104 connected to it. As an example, the broadcast control processing device 103 can be used for data transmission and decoding, such as the broadcast control processing device 103 can receive images from the rendering device 102 and decode them into a format suitable for display on the display screen; 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, etc.; it can also be used for partition management of the display screen 104, and the display screen can be divided into multiple independent areas, each area can display different content.

[0069] Exemplarily, the display screen 104 may be an LED screen, an LCD screen, or the like, and may be a curved screen or a flat screen, or the like; the type, quantity, size, resolution, etc. of the display screen in the virtual shooting system may be customized according to actual needs, and there is no limitation on this.

[0070] Exemplarily, the host computer 101 can be connected to the shooting device 105, wherein the specific connection mode can be selected according to actual needs and the compatibility of the device. For example, it can include wired connections such as HDMI or SDI (Serial Digital Interface, a digital video transmission standard), and can also include wireless connections such as Wi-Fi (Wireless Fidelity) or RF (Radio Frequency).

[0071] Exemplarily, the shooting device 105 can transmit the shot video to the main control machine 101. The disclosed embodiment does not limit the type of the shooting device 105; as an example, according to different lenses used, the shooting device 105 can be a telephoto camera, a wide-angle camera, etc.; as another example, according to different shutters used, the shooting device 105 can be a rolling camera, a global camera, etc.; wherein the rolling camera is equipped with a rolling shutter, and the rolling shutter captures image data line by line in a sequential manner; the global camera is equipped with a global shutter, and the global shutter allows all pixels on the image to be exposed at the same time.

[0072] During the virtual shooting process, the main control machine 101 in the virtual shooting system controls the rendering device 102 to render the image, and the broadcast control processing device 103 displays the rendered image on the display screen 104. At the same time, the actor can perform in front of the display screen 104, and the main control machine 101 controls the shooting device 105 to shoot. The shot video uses the actor as the foreground and the picture on the display screen as the background, thereby completing the virtual shooting.

[0073] In the virtual shooting process, the virtual scene constructed by the rendering device 102 is used to replace the real scene, which reduces the dependence of film and television shooting on locations and scenery, and greatly reduces the shooting cost; it overcomes the shortcomings of unnatural diffuse reflection effect and unrealistic video scenes when shooting with traditional blue-green screen technology. However, although virtual shooting can achieve a relatively natural shooting effect, there are many limitations in shooting. For example, virtual shooting requires huge computing power. For some very realistic scenes, the rendering device 103 usually cannot meet the requirements of real-time rendering, so it can only reduce the rendering resolution, resulting in a decrease in the quality of the shot video; for another example, in order to avoid the moiré phenomenon in virtual shooting, the shooting device 105 usually cannot focus on the display screen, which limits many shooting techniques; these limitations make it impossible for virtual shooting to achieve movie-level high-quality effects.

[0074] In order to solve the above technical problems, the embodiments of the present disclosure propose a virtual shooting method and a video processing method, which can overcome the shortcomings of green screen shooting and virtual shooting by combining green screen shooting and virtual shooting. In the virtual shooting process, normal frames and reference frames are alternately displayed on a display screen used for virtual shooting in a preset alternating manner; the picture in the normal frame is the picture of the virtual scene; the picture in the reference frame is a picture of which at least part of the area is a pure color area, and the shot video is obtained, and the picture in each video frame of the shot video has the picture in the normal frame or the picture in the reference frame as the background and the physical object as the foreground; then, when performing video processing in the later stage, for the video frame to be processed in the video, a reference video frame corresponding to the video frame to be processed is obtained, and then the reference video frame is adjusted, and the video frame to be processed is replaced by the adjusted video frame; in this way, the shortcomings in the virtual shooting process are compensated, the restrictions on the virtual shooting process are effectively reduced, the applicable scenarios of virtual shooting are more extensive, and virtual shooting can achieve movie-level high-quality effects.

[0075] The virtual shooting method proposed in this application is described in detail below.

[0076] Figure 2 FIG. 1 is a flowchart of a virtual shooting method according to an embodiment of the present disclosure. Figure 1 The virtual shooting system shown or one or more components in the virtual shooting system are executed, such as Figure 2 As shown, the method may include the following steps:

[0077] Step 201, obtaining a normal frame and a reference frame; wherein the picture in the normal frame is a picture of a virtual scene; and the picture in the reference frame is a picture in which at least a part of the area is a pure color area.

[0078] Normal frames and reference frames can be Figure 1 The frame data rendered by the rendering device 102 is obtained by the broadcast control processing device 103 so as to be displayed on the display screen 104 and photographed by the photographing device 105. The number of normal frames and reference frames can be set according to the requirements, and the number of normal frames and reference frames can be the same or different; as an example, the number of normal frames and reference frames is the same, and there is a one-to-one correspondence between the normal frames and the reference frames; as another example, the number of normal frames and reference frames is different, and there is a correspondence between multiple normal frames and one reference frame; wherein, the two frames with a corresponding relationship are displayed on the display screen 104 adjacently or close to each other in time.

[0079] The images of the virtual scene can be set according to the requirements, and then a normal frame is displayed on the display screen 104 to construct a virtual environment consistent with the real shooting environment.

[0080] The color, size, position, shape, etc. in the pure color area can be set as needed without limitation, for example, it can be green, blue, red, etc. Exemplarily, the pure color area is a green area; since the green background can provide a more obvious reflectance ratio and avoid the photosensitive effect of some physical objects, the process of matting and adding computer special effects is easier to operate, which effectively improves the convenience of post-production.

[0081] As an example, the picture in the reference frame is a solid color picture; that is, the picture in the reference frame is a picture with a solid color area in all areas. In this way, the whole area of ​​the reference frame picture is set to a solid color, and the solid color picture is used as the background in the virtually shot video, so that when the video is processed later, the solid color picture can be easily separated from the physical object to replace a background picture with higher quality or more in line with user needs. Among them, the physical object can be an actor, prop, scenery, etc. in front of the display screen 104 during the virtual shooting process.

[0082] As another example, the picture in the reference frame is a non-pure color picture, that is, part of the picture in the reference frame is a pure color area. In this way, part of the picture in the reference frame is set to a pure color, and when the virtually shot video is processed later, the pure color area can be easily separated from other areas in the video to replace the pure color area with a higher quality picture or a picture that better meets user needs. Exemplarily, the area in the picture of the reference frame corresponding to the physical object can be set to a pure color area, and when the virtually shot video is processed later, the physical object in the pure color area can be replaced with other physical objects.

[0083] Exemplarily, the size and position of the pure color area are such that during the virtual shooting process, the pure color area in the reference frame image captured by the shooting device can cover (or include) the physical object. In this way, while facilitating the subsequent cutout processing, the pure color area is small enough to reduce the flickering effect caused by the display screen 104 alternately displaying the normal frame and the reference frame. Exemplarily, the pure color area can be a rectangle or a human shape, for example, the pure color area is a human shape, so that the pure color area is small while covering the physical object.

[0084] Exemplarily, in the case of multiple reference frames, the sizes of the pure color regions in the pictures of all the reference frames may be the same or different. For example, the pictures in all the reference frames are pure color pictures; for another example, the pictures in some reference frames are pure color pictures, while parts of the pictures in the remaining reference frames are pure color areas; for another example, parts of the pictures in all the reference frames are pure color areas.

[0085] Figure 3 A flowchart of obtaining a normal frame and a reference frame according to an embodiment of the present disclosure is shown. Figure 3 As shown, the following steps 301-304 may be included:

[0086] Step 301 : obtaining normal frame data to be rendered and corresponding reference frame data to be rendered, wherein the normal frame data to be rendered corresponds to a picture of a virtual scene, and the reference frame data to be rendered corresponds to a picture of which at least part of the area is a pure color area.

[0087] The normal frame data to be rendered and the reference frame data to be rendered can be obtained by the rendering device 102. The image of the virtual scene corresponding to the normal frame data to be rendered is a normal view cone image, which can accurately reflect the virtual scene range determined by the position and viewing angle of the shooting device, ensuring that the rendered virtual scene is consistent with the intention of the user such as the photographer or director. Figure 1 To.

[0088] Exemplarily, the normal frame data to be rendered may be frame data of images of all virtual scenes that the corresponding user plans to shoot, wherein each reference frame data to be rendered may correspond to one or more normal frame data to be rendered, and the reference frame data to be rendered corresponding to different normal frame data to be rendered may be the same or different.

[0089] Among them, each normal frame data to be rendered is used to generate a normal frame, and the picture of the virtual scene corresponding to the normal frame data to be rendered is the picture in the normal frame; each reference frame data to be rendered is used to generate a reference frame, and the picture of at least a part of the area corresponding to the reference frame data to be rendered is the picture in the reference frame. For any normal frame data to be rendered, and its corresponding reference frame data to be rendered, the picture of the virtual scene corresponding to the normal frame data to be rendered and the picture of at least a part of the area corresponding to the reference frame data to be rendered is a pure color area are displayed on the display screen 104 adjacently or close in time, and the picture of at least a part of the area corresponding to the reference frame data to be rendered is a pure color area can be used to adjust the picture of the virtual scene corresponding to the normal frame data to be rendered. Exemplarily, the pure color area in the picture of at least a part of the area corresponding to the reference frame data to be rendered is a pure color area can be used to adjust the picture of the virtual scene corresponding to the normal frame data to be rendered.

[0090] In a possible implementation, the obtaining of the corresponding reference frame data to be rendered includes: using a target pure color area to replace an area at a corresponding position in a picture of a virtual scene corresponding to the normal frame data to be rendered, obtaining a picture in which at least a part of the area is a pure color area, thereby generating the reference frame data to be rendered corresponding to the normal frame data to be rendered. For each normal frame data to be rendered, the method of generating the corresponding reference frame data to be rendered can be determined according to a preset alternating method.

[0091] As an example, the preset alternating method is to alternate between a normal frame and a reference frame, that is, each normal frame data to be rendered corresponds to a reference frame data to be rendered, and different normal frame data to be rendered correspond to different reference frame data to be rendered; for the picture of the virtual scene corresponding to each normal frame data to be rendered, a solid color area is used to replace the area at the corresponding position in the picture of the virtual scene, so as to obtain a picture in which at least part of the area is a solid color area, thereby generating the reference frame data to be rendered corresponding to the normal frame data to be rendered.

[0092] As another example, the preset alternation method is to alternate multiple normal frames with one reference frame, that is, each normal frame data to be rendered has a corresponding reference frame data to be rendered, and multiple normal frame data to be rendered correspond to the same reference frame data to be rendered; according to the images of virtual scenes that the user considers very important, or the images of virtual scenes that may be further adjusted later, the target normal frame data to be rendered corresponding to the images of these virtual scenes can be selected from the multiple normal frame data to be rendered corresponding to the same reference frame data to be rendered. For the image of the virtual scene corresponding to each target normal frame data to be rendered, a solid color area is used to replace the area at the corresponding position in the image of the virtual scene, so as to obtain an image in which at least part of the area is a solid color area, thereby generating the same reference frame data to be rendered corresponding to the multiple normal frame data to be rendered. For any normal frame data A to be rendered, and its corresponding reference frame data A' to be rendered, since the target pure color area in the picture corresponding to the reference frame data A' to be rendered is at least partially a pure color area, it can be used to adjust the picture of the virtual scene in the normal frame data A to be rendered. In the virtual shooting process, if the picture corresponding to the reference frame data A' to be rendered is displayed on the display screen 104 and at least partially a pure color area, and the physical object photographed by the shooting device 105 is located within the target pure color area, the area where the physical object is located in the picture of the virtual scene corresponding to the normal frame data A to be rendered can be conveniently adjusted through the target pure color area.

[0093] In a possible implementation, the obtaining of the corresponding reference frame data to be rendered includes: determining the relative position relationship between the physical object and the display screen, and the size of the physical object; based on the relative position relationship and the size of the physical object, determining the position and size of a target pure color area in a picture in which at least a portion of the area corresponding to the reference frame data to be rendered is a pure color area; and fusing the target pure color area with a picture of a virtual scene corresponding to the normal frame data to be rendered, to obtain a picture in which at least a portion of the area corresponding to the reference frame data to be rendered is a pure color area. Exemplarily, during the shooting process, the position of the physical object and the position of the display screen 104 can be determined with reference to the position and shooting angle of the shooting device 105, respectively, and then the relative position relationship between the physical object and the display screen 104, and the size of the physical object can be determined; taking the preset alternation method of alternating between a normal frame and a reference frame as an example, for any normal frame data A to be rendered, and the corresponding reference frame data A' to be rendered, since the image of the virtual scene corresponding to the normal frame data A to be rendered and the image of at least a part of the area corresponding to the reference frame data A' to be rendered as a pure color area are displayed on the display screen 104 adjacent or close to each other, the position and angle of the shooting device 105 when shooting the image of the virtual scene corresponding to the normal frame data A to be rendered and the target pure color area corresponding to the reference frame data A' to be rendered are almost the same. There is a change, therefore, based on the relative position relationship between the physical object and the display screen 104 determined as above and the size of the physical object, the position of the target pure color area in the picture in which at least part of the area is the pure color area and the size of the target pure color area can be determined, so that when the shooting device 105 shoots the target pure color area, the physical object is located in the target pure color area; and then the target pure color area is merged with the picture of the virtual scene corresponding to the normal frame data A to be rendered, so that the picture in which at least part of the area corresponding to the reference frame data A' to be rendered is the pure color area and the picture of the virtual scene corresponding to the normal frame data A to be rendered, except for the target pure color area, the other parts are the same, that is, it is equivalent to replacing the area at the corresponding position in the picture of the virtual scene with the target pure color area, so as to obtain a picture in which at least part of the area is the pure color area.

[0094] For example, Figure 4(a)-(b) shows a schematic diagram of a picture of a virtual scene corresponding to normal frame data A to be rendered and a picture corresponding to reference frame data A' to be rendered, in which at least a portion of the area is a solid color area according to an embodiment of the present disclosure, wherein Figure 4(a) is a picture of a virtual scene, and Figure 4(b) is a corresponding picture in which at least a portion of the area is a solid color area, and the actor is located in the solid color area; exemplarily, the solid color area is a green area.

[0095] For any normal frame data to be rendered, considering that the image of the virtual scene corresponding to the normal frame data to be rendered and the image of the reference frame data to be rendered whose at least part of the area is a pure color area are alternately displayed on the display screen 104, and the display time is adjacent or close, therefore, in order to reduce the problem of flickering and eye discomfort caused by the alternating display of the images; the color of the image of the virtual scene corresponding to the normal frame data to be rendered and the image of the reference frame data to be rendered whose at least part of the area is a pure color area can be configured to be as close as possible to reduce the flickering. In a possible implementation, the acquisition of the corresponding reference frame data to be rendered includes: if the shutter used to shoot the video is a rolling shutter, then color analysis is performed on the image of the virtual scene corresponding to the normal frame data to be rendered, determining the main color of the image of the virtual scene corresponding to the normal frame data to be rendered, and determining the main color as the color of the target pure color area in the image of the reference frame data to be rendered whose at least part of the area is a pure color area.

[0096] For example, Figure 5 A schematic diagram showing a method of determining the color of a target pure color area according to an embodiment of the present disclosure is shown as follows: Figure 5 As shown, for the normal frame data A to be rendered and its corresponding reference frame data A' to be rendered; a main color analysis is performed on the picture of the virtual scene corresponding to the normal frame data A to be rendered to determine the main color in the picture of the virtual scene, that is, the color that occupies the largest proportion in the picture, and then the main color is used as the color of the target pure color area in the picture where at least a part of the area corresponding to the reference frame data A' to be rendered is a pure color area.

[0097] Step 302: splice the normal frame data to be rendered and the reference frame data to be rendered in accordance with the preset alternating manner to obtain fused frame data to be rendered.

[0098] The fused frame data to be rendered may be obtained by the rendering device 102 by splicing the normal frame data to be rendered and the reference frame data to be rendered in a preset alternating manner.

[0099] As an example, the preset alternating method is to alternate between a frame of normal frame and a frame of reference frame; for any normal frame data to be rendered and its corresponding reference frame data to be rendered; the rendering device 102 can splice the picture of the virtual scene corresponding to the normal frame data to be rendered and the picture corresponding to the reference frame data to be rendered, at least part of which is a solid color area, to generate corresponding fused frame data to be rendered; among the pictures corresponding to the fused frame data to be rendered, one part is the picture of the virtual scene, and the other part is the picture of at least part of which is a solid color area; or, for multiple normal frame data to be rendered and the reference frame data to be rendered corresponding to each normal frame data to be rendered; the rendering device 102 can splice the picture of the virtual scene corresponding to the multiple normal frame data to be rendered and the picture of at least part of which is a solid color area corresponding to the multiple reference frame data to be rendered, to generate corresponding fused frame data to be rendered; wherein the number of normal frame data to be rendered to be spliced ​​can be determined according to the preset resolution corresponding to the picture of the virtual scene, and the higher the preset resolution, the smaller the number of normal frame data to be rendered to be spliced. For example, FIG6(a)-(b) shows a schematic diagram of a screen corresponding to a to-be-rendered fusion frame data according to an embodiment of the present disclosure. As shown in FIG6(a), for the to-be-rendered normal frame data A and its corresponding to-be-rendered reference frame data A', the screen of the virtual scene corresponding to the to-be-rendered normal frame data A and the screen corresponding to the to-be-rendered reference frame data A', at least part of which is a solid color area, are spliced ​​to obtain the corresponding to-be-rendered fusion frame data, wherein half of the screen corresponding to the to-be-rendered fusion frame data is a screen of the virtual scene, and the other half is a screen at least part of which is a solid color area. Exemplarily, the screen at least part of which is a solid color area can be a green screen screen with all of which is a green area. As shown in Figure 6(b), for the normal frame data A to be rendered and its corresponding reference frame data A' to be rendered, the normal frame data B to be rendered and its corresponding reference frame data B' to be rendered; they are spliced ​​in order of a picture a of the virtual scene corresponding to the normal frame data A to be rendered, a picture b of the reference frame data A' to be rendered, in which at least part of the area is a pure color area, the picture c of the virtual scene corresponding to the normal frame data B to be rendered, and a picture d of the reference frame data B' to be rendered, in which at least part of the area is a pure color area, to obtain the corresponding fused frame data to be rendered. The picture corresponding to the fused frame data to be rendered is divided into four areas, namely, a picture a of the virtual scene, a picture b of at least part of the area is a pure color area, a picture c of the virtual scene, and a picture d of at least part of the area is a pure color area.

[0100] As another example, the preset alternation method is to alternate multiple normal frames with one reference frame; for multiple normal frame data to be rendered corresponding to the same reference frame data to be rendered, the rendering device 102 can splice the images of the virtual scenes corresponding to the multiple normal frame data to be rendered with the images corresponding to the reference frame data to be rendered, where at least part of the area is a solid color area, to generate corresponding fused frame data to be rendered, wherein, in the image corresponding to the fused frame data to be rendered, the images of the virtual scenes corresponding to the multiple normal frame data to be rendered and the images corresponding to the reference frame data to be rendered, where at least part of the area is a solid color area, are arranged in sequence, and the images of the virtual scenes corresponding to each normal frame data to be rendered can be arranged before or after the image corresponding to the reference frame data to be rendered, where at least part of the area is a solid color area. For example, Figure 7 A schematic diagram showing a picture corresponding to fused frame data to be rendered according to an embodiment of the present disclosure is shown as follows: Figure 7 As shown, for normal frame data A to be rendered, normal frame data B to be rendered, normal frame data C to be rendered and their corresponding reference frame data D to be rendered; in the order of picture a of the virtual scene corresponding to the normal frame data A to be rendered, picture b of the virtual scene corresponding to the normal frame data B to be rendered, picture c of the virtual scene corresponding to the normal frame data C to be rendered, and picture d of which at least part of the area is a pure color area corresponding to the reference frame data D to be rendered, they are spliced ​​to obtain corresponding fused frame data to be rendered, and the picture corresponding to the fused frame data to be rendered is divided into four areas, namely picture a of the virtual scene, picture b of the virtual scene, picture c of the virtual scene, and picture d of which at least part of the area is a pure color area.

[0101] Step 303: Render the fused frame data to be rendered at a preset rendering frame rate to obtain a rendered fused frame.

[0102] The rendering may be performed by the rendering device 102. For example, the rendering device 102 may perform rendering according to a preset rendering frame rate. The preset rendering frame rate may be set according to demand and is not limited thereto. For example, taking the preset rendering frame rate as 25 FPS as an example, the rendering device 102 may render 25 fused frames per second. The rendered images in each fused frame include an image of at least one virtual scene and at least one image of a solid color area in at least a portion of the area.

[0103] Exemplarily, the resolution of the virtual scene in the rendered fusion frame and the resolution of the picture of which at least part of the area is a solid color area both meet the corresponding preset resolutions. The preset resolution can be set according to demand and is not limited to this. For example, the preset resolution corresponding to the picture of the virtual scene can be set to a higher value, and the preset resolution corresponding to the picture of which at least part of the area is a solid color area can be set to a lower value.

[0104] Step 304: split the fused frame in the preset alternating manner to obtain the normal frame and the reference frame, wherein the display frame rate of the normal frame on the display screen and the display frame rate of the reference frame on the display screen are both integer multiples of the preset rendering frame rate.

[0105] The broadcast control processing device 103 can split the fused frame rendered by the rendering device 102 in a preset alternating manner. For any fused frame, the resolutions of the split normal frame and the reference frame meet the corresponding preset resolutions. The split normal frame and the reference frame can be displayed on the display screen 104 according to the corresponding preset resolutions.

[0106] Exemplarily, splitting the fused frame to obtain the normal frame and the reference frame may include: for any fused frame, the fused frame may be split according to the preset alternating method corresponding to the generated target fused frame data to be rendered; wherein the target fused frame data to be rendered is the fused frame data used to render the fused frame. That is, the frame may be split according to the splicing order of the virtual scene image and the image of at least a part of the area being a pure color area to obtain the normal frame and the reference frame, wherein the part corresponding to each virtual scene image in the fused frame is split into a normal frame, and the part of each image of at least a part of the area being a pure color area is split into a reference frame; that is, for a fused frame, the image in the split normal frame is the image of the virtual scene in the fused frame, and the image in the split reference frame is the image of at least a part of the area being a pure color area in the fused frame.

[0107] Exemplarily, the display frame rate of the normal frame on the display screen can be determined according to the number of images of the virtual scene in the fused frame and the preset rendering frame rate. For example, the display frame rate of the normal frame on the display screen can be the product of the number of images of the virtual scene in the fused frame and the preset rendering frame rate. Exemplarily, the display frame rate of the reference frame on the display screen can be determined according to the number of images of at least a portion of the fused frame being a solid color area and the preset rendering frame rate. For example, the display frame rate of the reference frame on the display screen can be the product of the number of images of at least a portion of the fused frame being a solid color area and the preset rendering frame rate. For example, in the fused frame generated by rendering the fused frame data to be rendered in FIG. 6(a) above, the images include a virtual scene image and a solid color image of at least a portion of the area. The display frame rates of the normal frame and the reference frame split from the fused frame on the display screen are the same as the preset rendering frame rate. For another example, when rendering the fused frame data to be rendered in FIG. 6(b) above, the fused frame includes two virtual scene images and two images of at least partial areas of pure color areas, and the display frame rates of the normal frame and the reference frame split from the fused frame on the display screen are both twice the preset rendering frame rate. Figure 7The fused frame generated by rendering the fused frame data to be rendered includes images of three virtual scenes and a image of a solid color area in which at least part of the area is a pure color area. The display frame rate of the normal frames split from the fused frame on the display screen is three times the preset rendering frame rate, and the display frame rate of the reference frame on the display screen is the same as the preset rendering frame rate.

[0108] In a possible implementation, if the shutter used to shoot the video is a global shutter, the display frame rate of the normal frame on the display screen and / or the display frame rate of the reference frame on the display screen are both at least twice the preset rendering frame rate; thereby effectively reducing the flickering problem of the alternating display screen. Correspondingly, in the above-mentioned process of splicing the normal frame data to be rendered and the reference frame data to be rendered to generate the fused frame data to be rendered, multiple normal frame data to be rendered can be spliced ​​with the corresponding multiple reference frame data to be rendered, so that when the rendered fused frame is split, multiple normal frames and multiple reference frames can be obtained, thereby ensuring that the display frame rate of the normal frame on the display screen and the display frame rate of the reference frame on the display screen are both at least twice the preset rendering frame rate.

[0109] Step 202: Alternately display the normal frame and the reference frame on a display screen used for virtual shooting in a preset alternating manner.

[0110] In a possible implementation, the preset alternating mode includes: alternating one normal frame with one reference frame or alternating multiple normal frames with one reference frame. Exemplarily, the broadcast control processing device 103 can control the display screen 104 to alternately display the above split normal frames and reference frames according to the preset alternating mode.

[0111] As an example, a normal frame and a reference frame are alternately displayed on a display screen for virtual shooting; that is, the number of normal frames is the same as the number of reference frames, and a reference frame is displayed between any two normal frames. For example, there are M normal frames and M reference frames; then according to the preset display order of the M normal frames and the M reference frames, the first normal frame is first displayed on the display screen, and after the first normal frame is displayed, the first reference frame is displayed, after the first reference frame is displayed, the second normal frame is displayed, after the second normal frame is displayed, the second reference frame is displayed... and so on, until the M normal frames and the M reference frames are displayed.

[0112] As another example, multiple normal frames and one reference frame are alternately displayed on a display screen used for virtual shooting, that is, the number of normal frames is greater than the number of reference frames, and multiple normal frames are continuously displayed between any two reference frames; for example, in the order of the normal frames and reference frames split from each fused frame, first M2 normal frames split from the first fused frame are continuously displayed on the display screen, and after displaying the M2 normal frames, the reference frame split from the first fused frame is displayed, and after displaying the reference frame, M2 normal frames split from the second fused frame are displayed, and after displaying the M2 normal frames, the reference frame split from the second fused frame is displayed... and so on, until all the normal frames and reference frames split from all the fused frames are displayed.

[0113] Exemplarily, while the normal frame and the reference frame are alternately displayed on a display screen in a preset alternating manner, a physical object can be located in front of the display screen, and the physical object and the display screen can be photographed by a photographing device, so that virtual photography can be performed with the physical object as the foreground and the picture displayed on the display screen (i.e., the picture in the alternating normal frame and the reference frame) as the background.

[0114] Exemplarily, the normal frame and the reference frame may be displayed alternately according to the display frame rate of the normal frame on the display screen and the display frame rate of the reference frame on the display screen. Figure 8 A schematic diagram showing a method of alternately displaying normal frames and reference frames according to an embodiment of the present disclosure is shown as follows: Figure 8 As shown, taking the preset rendering frame rate as 25FPS and the fused frame data to be rendered as the fused frame data to be rendered shown in Figure 6(a) as an example, the fused frame rendered by the fused frame data to be rendered, the display frame rate of the normal frame obtained after splitting on the display screen and the display frame rate of the reference frame on the display screen are both 25FPS, that is, in one display cycle (40ms), a normal frame is displayed in the first 20ms, and a reference frame is displayed in the last 20ms. Fig. 9 A schematic diagram showing another method of alternately displaying normal frames and reference frames according to an embodiment of the present disclosure is shown as follows: Fig. 9 As shown, taking the preset rendering frame rate as 25FPS and the fused frame data to be rendered as shown in FIG6(b) as an example, the fused frame generated by the rendering of the fused frame data to be rendered, the display frame rate of the normal frame obtained after splitting on the display screen and the display frame rate of the reference frame on the display screen are both 50FPS, that is, four frames are displayed in sequence within one display cycle (40ms), wherein one frame of normal frame A is displayed for 10ms, one frame of reference frame B is displayed for 10ms, one frame of normal frame C is displayed for 10ms, and one frame of reference frame D is displayed for 10ms; in this way, the normal frame and the reference frame are alternately displayed on the display screen at a display frame rate of 50FPS, thereby effectively reducing the image flicker perceived by the human eye.

[0115] Step 203: Acquire the captured video, wherein the video includes a video frame with a picture in the normal frame or a picture in the reference frame as the background and a physical object as the foreground.

[0116] Exemplarily, in a video frame with a picture in a reference frame as the background and a physical object as the foreground, the physical object is located in a pure color area in the picture in the reference frame.

[0117] In this step, during the virtual shooting process, the normal frame and the reference frame are alternately displayed on the display screen 104 in a preset alternating manner, and the shooting device 105 shoots, and in the shot video, the normal frame and the reference frame are arranged in the alternating manner. Exemplarily, the video frames in the video are arranged in the manner of alternating one normal frame and one reference frame or alternating multiple normal frames and one reference frame.

[0118] Exemplarily, the preset alternation mode can be that when multiple normal frames and one reference frame are alternately displayed, the number of the multiple normal frames is set to be less than a preset value. In this way, when multiple normal frames and one reference frame are alternately displayed on the above-mentioned display screen, the number of continuously displayed normal frames is less than the preset value, so that there is no difference or a small difference in the foreground between any normal frame in the captured video and the reference frame closest to it, wherein the preset value can be set according to demand so that the reference frame can be used to adjust the picture of the normal frame later.

[0119] Exemplarily, the shooting frame rate of the shooting device is an integer multiple of the sum of the display frame rate of the normal frame on the display screen and the display frame rate of the reference frame on the display screen, for example, Figure 8 As shown, the display frame rate of the normal frame on the display screen is 25FPS, and the display frame rate of the reference frame on the display screen is 25FPS. The shooting frame rate of the shooting device is an integer multiple of 50FPS. For example, the shooting frame rate can be 50FPS. In this way, a normal frame and a reference frame are alternately displayed on the display screen, and a total of 25 normal frames and 25 reference frames are displayed per second, thereby ensuring that the complete normal frame and reference frame images can be captured. For another example, Fig. 9 As shown, the display frame rate of the normal frame on the display screen is 50FPS, and the display frame rate of the reference frame on the display screen is 50FPS, then the shooting frame rate of the shooting device is an integer multiple of 100FPS, for example, the shooting frame rate can be 100FPS, so as to ensure that the complete normal frame and the reference frame can be shot. As an example, a synchronization signal generator can be configured in the virtual shooting system, and the shooting device 105 is synchronized with the signal of the broadcast control processing device 103, so that when the broadcast control processing device 103 controls the display screen 104 to alternately display the normal frame and the reference frame, the shooting device 105 can completely shoot the normal frame and the reference frame.

[0120] In the virtual shooting method of the disclosed embodiment, a normal frame and a reference frame are obtained; wherein the picture in the normal frame is a picture of a virtual scene; the picture in the reference frame is a picture of a pure color area in at least a part; the normal frame and the reference frame are alternately displayed on a display screen used for virtual shooting in a preset alternating manner; and a shot video is obtained, wherein the video includes a video frame with the picture in the normal frame or the picture in the reference frame as the background and a physical object as the foreground. In this way, the shot video can be processed later to achieve a natural and realistic diffuse reflection effect in the foreground of the video, and the background can be replaced with higher quality picture content, so that the shortcomings of green screen shooting and virtual shooting can be overcome by combining green screen shooting and virtual shooting, and the deficiencies existing in the virtual shooting process can be compensated, and the restrictions on the virtual shooting process can be effectively reduced, so that the applicable scenes of virtual shooting are more extensive, and virtual shooting can achieve movie-level high-quality effects.

[0121] The present disclosure also provides a video processing method for processing the video through the above Figure 2 The video captured by the virtual shooting method shown is processed.

[0122] Fig.10 A flowchart of a video processing method according to an embodiment of the present disclosure is shown. Exemplarily, the method can be executed by an electronic device having data processing capability, for example, the above-mentioned Figure 1 In the virtual shooting system shown in FIG. Fig.10 As shown, the method comprises the following steps:

[0123] Step 1001, obtaining a video frame to be processed; the video frame to be processed has a picture of a virtual scene as the background and a physical object as the foreground.

[0124] It is understandable that through the above Figure 2 The video obtained by the virtual shooting method shown includes video frames with the picture in the normal frame as the background and the physical object as the foreground, and video frames with the picture in the reference frame as the background and the physical object as the foreground. Among them, the video frames with the picture in the normal frame as the background and the physical object as the foreground are the video frames planned to be shot; the video frames with the picture in the reference frame as the background and the physical object as the foreground are the added additional video frames. The video frames to be processed are the video frames with the picture in the normal frame as the background and the physical object as the foreground in the video shot by the virtual shooting that the user expects to adjust. For example, the shot video includes 25 frames of video frames with the picture in the normal frame as the background and the physical object as the foreground. The user expects to adjust the pictures in the 2nd frame and the 7th frame, then the 2nd normal frame and the 7th normal frame are both the video frames to be processed.

[0125] Step 1002: Obtain a reference video frame corresponding to the video frame to be processed, wherein the reference video frame has a picture with at least a portion of the picture being a pure color area as the background and the physical object as the foreground.

[0126] In a possible implementation, the to-be-processed video frame and the reference video frame are both based on the above Figure 2 The video frame in the video captured by the virtual shooting method described in . It can be understood that the reference video frame is a video frame in the captured video with the picture in the reference frame as the background and the physical object as the foreground.

[0127] In a possible implementation, according to the preset alternating mode of displaying normal frames and reference frames on the display screen during the virtual shooting process, video frames with the picture in the normal frame as the background and the physical object as the foreground, and video frames with the picture in the reference frame as the background and the physical object as the foreground in the shot video can be extracted. Then, the reference video frame corresponding to the to-be-processed video frame can be determined from the extracted video frames with the picture in the reference frame as the background and the physical object as the foreground; illustratively, the video frame with the picture in the target reference frame as the background and the physical object as the foreground can be used as the reference video frame, wherein the target reference frame and the target normal frame corresponding to the to-be-processed video frame are obtained by splitting the same fused frame; the video frame with the picture in the reference frame as the background and the physical object as the foreground can also be used as the reference video frame.

[0128] As an example, if during the virtual shooting process, a normal frame and a reference frame are alternately displayed on the display screen, the shot video can be separated into odd and even frames, so that the video frame with the picture in the normal frame as the background and the physical object as the foreground and the video frame with the picture in the reference frame as the background and the physical object as the foreground can be separated. For any video frame with the picture in the normal frame as the background and the physical object as the foreground that the user expects to adjust (i.e., the processed video frame), the video frame with the picture in the target reference frame as the background and the physical object as the foreground can be used as its corresponding reference video frame; wherein the target reference frame and the normal frame are obtained by splitting the same fused frame; the separated video frame with the picture in the reference frame as the background and the physical object as the foreground adjacent to the video frame to be processed can also be used as its corresponding reference video frame, for example, the video frame with the picture in the reference frame as the background and the physical object as the foreground arranged after or before the video frame to be processed can be used as its corresponding reference video frame.

[0129] As another example, if during the virtual shooting process, multiple normal frames and one reference frame are alternately displayed on the display screen, the video frames in the shot video can be separated according to the preset alternating display method, so that the video frames with the picture in the normal frame as the background and the physical object as the foreground and the video frames with the picture in the reference frame as the background and the physical object as the foreground can be separated. For any video frame with the picture in the normal frame as the background and the physical object as the foreground that the user expects to adjust (i.e., the processed video frame), the video frame with the picture in the target reference frame as the background and the physical object as the foreground can be used as its corresponding reference video frame; wherein the target reference frame and the normal frame are obtained by splitting the same fused frame; and the separated The video frame with the picture in the reference frame as the background and the physical object as the foreground that is closest to the video frame to be processed is taken as its corresponding reference video frame. For example, if the user expects to adjust video frame a, the video frames before and after video frame a are all video frames with the picture in the normal frame as the background and the physical object as the foreground, the nearest video frame b with the picture in the reference frame as the background and the physical object as the foreground arranged before video frame a is two video frames away from video frame a, and the nearest video frame c with the picture in the reference frame as the background and the physical object as the foreground arranged after video frame a is four video frames away from video frame a, then video frame b with the picture in the reference frame as the background and the physical object as the foreground can be taken as the reference video frame corresponding to video frame a.

[0130] Step 1003: adjust the reference video frame, and use the adjusted video frame to replace the to-be-processed video frame.

[0131] Since the shooting time of the reference video frame is close to that of the video frame to be processed, the foregrounds in the two video frames are the same or almost unchanged, that is, the physical objects in the pictures are the same or almost unchanged; while the backgrounds in the two video frames are different. In one possible implementation, the reference video frame is adjusted and the adjusted video frame is used to replace the video frame to be processed, including: separating the foreground and background of the picture in the reference video frame to obtain a background part and a foreground part; replacing the background part with the target picture, and merging the replaced background part with the foreground part, and replacing the video frame to be processed with the fused video frame. Since there is a pure color area in the reference video frame, the pure color area is more clearly distinguished from the physical object and the virtual scene. For example, the accurate separation of the foreground and background in the reference video frame can be conveniently achieved through the green subtraction technology. The target picture is the picture that you want to replace, for example, it can be a higher quality background; the target picture is fused with the foreground part to obtain a video frame with a physical object as the foreground and the target picture as the background, and the physical object is the same as or almost unchanged from the physical object of the video frame to be processed, and the video frame to be processed is replaced with the fused video frame to complete the processing of the video frame to be processed.

[0132] For example, Fig.11 A schematic diagram of a video processing method according to an embodiment of the present disclosure is shown as follows: Fig.11 As shown, in the video shot by the above virtual shooting method, the video frames with the picture in the normal frame as the background and the physical object as the foreground and the video frames with the picture in the reference frame as the background and the physical object as the foreground are arranged alternately; the video frames with the picture in the normal frame as the background and the physical object as the foreground and the video frames with the picture in the reference frame as the background and the physical object as the foreground in the video are separated; wherein the picture in the reference frame is a green picture; further, for any video frame with the picture in the normal frame as the background and the physical object as the foreground, if the quality or content is not satisfactory and needs to be adjusted, the next adjacent video frame can be used as a reference video frame, and the foreground and background of the reference video frame can be separated by the green subtraction technology, and then the separated background can be replaced with a higher quality background, so that the replaced higher quality background can be merged with the foreground, and the merged video frame replaces the video frame with the picture in the normal frame as the background and the physical object as the foreground, thereby achieving a higher picture effect, and the foreground also has a more natural diffuse reflection effect. For video frames with normal frames that meet the quality or content requirements and in which the picture is the background and the physical object is the foreground, they can be used directly without adjustment, thus taking into account both the quality and efficiency of virtual shooting.

[0133] The video processing method in the disclosed embodiment is as follows: obtaining a video frame to be processed; the picture in the video frame to be processed has a picture of a virtual scene as the background and a physical object as the foreground; obtaining a reference video frame corresponding to the video frame to be processed, the picture in the reference video frame has a picture of a solid color area as the background and the physical object as the foreground in at least a part of the area; adjusting the reference video frame, and using the adjusted video frame to replace the video frame to be processed. In this way, for the video frame to be processed in the video collected in the early stage, the reference video frame corresponding to the video frame to be processed is adjusted, and the video frame to be processed is replaced by the adjusted video frame; the deficiencies existing in the virtual shooting process are compensated, the restrictions on the virtual shooting process are effectively reduced, the applicable scenarios of virtual shooting are more extensive, and virtual shooting can achieve movie-level high-quality effects.

[0134] As an example, the requirements for the real-time rendering capability of the rendering device during the virtual shooting process are reduced. For the situation where the quality of the captured video frames is not high due to the weak rendering capability and the reduced rendering resolution, the above Figure 2 The virtual shooting method shown can be used to shoot, and then the video processing method can be used to process the low-quality video frames shot into high-quality video frames.

[0135] As another example, the restrictions on shooting techniques in the virtual shooting process are reduced. For example, the moiré phenomenon in the captured video frame caused by focusing on the display screen can be solved by the above Figure 2 The virtual shooting method is used to shoot, and then the video processing method is used to process the video frame with moiré patterns into a video frame without moiré patterns.

[0136] As another example, in the above Figure 2 After the virtual shooting method shown is completed, if the director and other personnel may need to further adjust the shot virtual picture, the picture of the reference video frame can be adjusted through the video processing method, and the adjusted reference video frame can be used to replace the video frame that the director expects to adjust (that is, the video frame to be processed), so that the director and other personnel can replace the background picture of the video frame later.

[0137] Based on the same inventive concept of the above method embodiments, the embodiments of the present disclosure further provide a virtual shooting device and a video processing device, which can be used to execute the technical solutions described in the above method embodiments.

[0138] Fig.12 A schematic diagram of the structure of a virtual shooting device according to an embodiment of the present disclosure is shown as follows: Fig.12 As shown, the device may include: an acquisition module 1201, used to acquire a normal frame and a reference frame; wherein the picture in the normal frame is a picture of a virtual scene; the picture in the reference frame is a picture of a solid color area with at least a part of the area; a display module 1202, used to alternately display the normal frame and the reference frame in a preset alternating manner on a display screen used for virtual shooting; the acquisition module 1201 is also used to acquire a shot video, wherein the video includes a video frame with the picture in the normal frame or the picture in the reference frame as the background and a physical object as the foreground.

[0139] In the disclosed embodiment, a normal frame and a reference frame are obtained; wherein the picture in the normal frame is a picture of a virtual scene; the picture in the reference frame is a picture of a solid color area at least in part; the normal frame and the reference frame are alternately displayed on a display screen used for virtual shooting in a preset alternating manner; and a shot video is obtained, wherein the video includes a video frame with the picture in the normal frame or the picture in the reference frame as the background and a physical object as the foreground. In this way, the shot video can be processed later to achieve a natural and realistic diffuse reflection effect in the foreground of the video, and the background can be replaced with higher quality picture content, so that the shortcomings of green screen shooting and virtual shooting can be overcome by combining green screen shooting and virtual shooting, and the deficiencies in the virtual shooting process can be compensated, and the restrictions on the virtual shooting process can be effectively reduced, so that the applicable scenes of virtual shooting are more extensive, and virtual shooting can achieve movie-level high-quality effects.

[0140] In a possible implementation manner, in a video frame with a picture in the reference frame as a background and the physical object as a foreground, the physical object is located in the pure color area.

[0141] In a possible implementation manner, the picture in the reference frame is a pure color picture.

[0142] In a possible implementation manner, the pure color area is a green area.

[0143] In a possible implementation manner, the preset alternation manner includes: alternating one normal frame with one reference frame or alternating multiple normal frames with one reference frame.

[0144] In a possible implementation, the acquisition module 1201 is also used to: acquire normal frame data to be rendered, and corresponding reference frame data to be rendered, wherein the normal frame data to be rendered corresponds to a picture of a virtual scene, and the reference frame data to be rendered corresponds to a picture of which at least part of the area is a solid color area; splice the normal frame data to be rendered and the reference frame data to be rendered in accordance with the preset alternating method to obtain fused frame data to be rendered; render the fused frame data to be rendered at a preset rendering frame rate to obtain a rendered fused frame; split the fused frame in accordance with the preset alternating method to obtain the normal frame and the reference frame; wherein the display frame rate of the normal frame on the display screen and the display frame rate of the reference frame on the display screen are both integer multiples of the preset rendering frame rate.

[0145] In a possible implementation, the acquisition module 1201 is also used to: determine the relative position relationship between the physical object and the display screen, and the size of the physical object; based on the relative position relationship and the size of the physical object, determine the position and size of the target pure color area in the picture in which at least a portion of the area corresponding to the reference frame data to be rendered is a pure color area; merge the target pure color area with the picture of the virtual scene corresponding to the normal frame data to be rendered, to obtain a picture in which at least a portion of the area corresponding to the reference frame data to be rendered is a pure color area.

[0146] In one possible implementation, the acquisition module 1201 is also used to: if the shutter used to shoot the video is a rolling shutter, perform color analysis on the picture of the virtual scene corresponding to the normal frame data to be rendered, determine the main color of the picture of the virtual scene corresponding to the normal frame data to be rendered, and determine the main color as the color of the target pure color area in the picture in which at least a part of the area corresponding to the reference frame data to be rendered is a pure color area.

[0147] In a possible implementation, if the shutter used to shoot the video is a global shutter, the display frame rate of the normal frame on the display screen and / or the display frame rate of the reference frame on the display screen are both at least twice the preset rendering frame rate.

[0148] Fig.13 A schematic diagram of a video processing structure according to an embodiment of the present disclosure is shown as follows: Fig.13 As shown, the device may include: an acquisition module 1301, used to acquire a video frame to be processed; the picture in the video frame to be processed has a picture of a virtual scene as the background and a physical object as the foreground; the acquisition module 1301 is also used to acquire a reference video frame corresponding to the video frame to be processed, and the picture in the reference video frame has a picture of at least a part of the area being a pure color area as the background and the physical object as the foreground; the adjustment module 1302 is also used to adjust the reference video frame and use the adjusted video frame to replace the video frame to be processed.

[0149] In the disclosed embodiment, a video frame to be processed is obtained; the picture in the video frame to be processed has a picture of a virtual scene as the background and a physical object as the foreground; a reference video frame corresponding to the video frame to be processed is obtained, and the picture in the reference video frame has a picture of a solid color area as the background and the physical object as the foreground in at least a part of the area; the reference video frame is adjusted, and the video frame after the adjustment is used to replace the video frame to be processed. In this way, for the video frame to be processed in the video collected in the early stage, the reference video frame corresponding to the video frame to be processed is adjusted, and the video frame to be processed is replaced with the adjusted video frame; the deficiencies in the virtual shooting process are compensated, the restrictions on the virtual shooting process are effectively reduced, the applicable scenarios of virtual shooting are more extensive, and virtual shooting can achieve movie-level high-quality effects.

[0150] In a possible implementation, the adjustment module 1302 is further used to: separate the foreground and background of the picture in the reference video frame to obtain a background part and a foreground part; replace the background part with the target picture, and merge the replaced background part with the foreground part, and replace the video frame to be processed with the merged video frame.

[0151] In a possible implementation manner, the to-be-processed video frame and the reference video frame are video frames in a video shot according to the above-mentioned virtual shooting method.

[0152] 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.

[0153] 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.

[0154] 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.

[0155] 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.

[0156] Fig.141 is a block diagram of an electronic device 1900 according to an exemplary embodiment. For example, the electronic device 1900 may be provided as a server or a terminal device. Fig.14 , 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.

[0157] 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.

[0158] 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.

[0159] 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.

[0160] 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.

[0161] 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.

[0162] 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.

[0163] 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.

[0164] 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.

[0165] 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.

[0166] 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.

[0167] 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 virtual shooting method, characterized in that: The method comprises: Acquire a normal frame and a reference frame; wherein the picture in the normal frame is a picture of a virtual scene; and the picture in the reference frame is a picture in which at least a part of the area is a pure color area; Alternatingly displaying the normal frame and the reference frame on a display screen used for virtual shooting in a preset alternating manner; A captured video is obtained, wherein the video includes a video frame with a picture in the normal frame or a picture in the reference frame as a background and a physical object as a foreground.

2. The method according to claim 1, characterized in that In a video frame with the picture in the reference frame as the background and the physical object as the foreground, the physical object is located in the pure color area.

3. The method according to claim 1, characterized in that The picture in the reference frame is a pure color picture.

4. The method according to claim 1, characterized in that The pure color area is a green area.

5. The method according to claim 1, characterized in that The preset alternating manner includes: alternating one normal frame with one reference frame or alternating multiple normal frames with one reference frame.

6. The method according to claim 1, characterized in that The obtaining of the normal frame and the reference frame comprises: Acquire normal frame data to be rendered, and corresponding reference frame data to be rendered, wherein the normal frame data to be rendered corresponds to a picture of a virtual scene, and the reference frame data to be rendered corresponds to a picture at least part of which is a pure color area; splicing the normal frame data to be rendered and the reference frame data to be rendered in accordance with the preset alternating manner to obtain fused frame data to be rendered; Rendering the to-be-rendered fused frame data at a preset rendering frame rate to obtain a rendered fused frame; The fused frame is split according to the preset alternating method to obtain the normal frame and the reference frame; wherein the display frame rate of the normal frame on the display screen and the display frame rate of the reference frame on the display screen are both integer multiples of the preset rendering frame rate.

7. The method according to claim 6, characterized in that The obtaining of corresponding reference frame data to be rendered includes: Determining the relative position relationship between the physical object and the display screen, and the size of the physical object; Based on the relative position relationship and the size of the physical object, determine the position and size of the target pure color area in the picture where at least a part of the area corresponding to the reference frame data to be rendered is a pure color area; The target pure color area is merged with the picture of the virtual scene corresponding to the normal frame data to be rendered, so as to obtain a picture in which at least a part of the area corresponding to the reference frame data to be rendered is a pure color area.

8. The method according to claim 6, characterized in that The obtaining of corresponding reference frame data to be rendered includes: If the shutter used to shoot the video is a rolling shutter, color analysis is performed on the image of the virtual scene corresponding to the normal frame data to be rendered to determine the main color of the image of the virtual scene corresponding to the normal frame data to be rendered, and the main color is determined as the color of the target pure color area in the image in which at least a portion of the area corresponding to the reference frame data to be rendered is a pure color area.

9. The method according to claim 6, characterized in that If the shutter used to shoot the video is a global shutter, the display frame rate of the normal frame on the display screen and / or the display frame rate of the reference frame on the display screen are both at least twice the preset rendering frame rate.

10. A video processing method, characterized in that: The method comprises: Acquire a video frame to be processed; the video frame to be processed has a picture of a virtual scene as a background and a physical object as a foreground; Acquire a reference video frame corresponding to the video frame to be processed, wherein a picture in the reference video frame has a picture with at least a part of a solid color area as a background and the physical object as a foreground; The reference video frame is adjusted, and the adjusted video frame is used to replace the to-be-processed video frame.

11. The method according to claim 10, characterized in that The step of adjusting the reference video frame and replacing the to-be-processed video frame with the adjusted video frame includes: Separating the foreground and background of the picture in the reference video frame to obtain a background part and a foreground part; The target picture is used to replace the background part, and the replaced background part is merged with the foreground part, and the merged video frame is used to replace the to-be-processed video frame.

12. The method according to claim 10, characterized in that The to-be-processed video frame and the reference video frame are video frames in a video shot by the virtual shooting method according to any one of claims 1 to 9.

13. 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 9 or any one of claims 10 to 12 when executing the instructions stored in the memory.

14. 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 described in any one of claims 1 to 9 or the method described in any one of claims 10 to 12 is implemented.

15. A computer program product, characterized in that The invention comprises a computer-readable code or a non-volatile computer-readable storage medium carrying the computer-readable code, wherein when the computer-readable code is executed in a processor of an electronic device, the processor in the electronic device executes the method described in any one of claims 1 to 9 or the method described in any one of claims 10 to 12.

Citation Information

Patent Citations

  • Image generation method

    CN104488024A

  • LED background and green screen shooting synthesis method and system

    CN113691746A

  • Augmented reality shooting method and system

    CN115134575A

  • Multi Background Image Capturing Video System

    US20180020167A1

  • Photographing method, electronic device, and storage medium

    US20230276136A1

Cited By

  • Picture processing method, electronic equipment, computer storage medium and computer program product

    CN119996846A

  • Display control method and device of LED screen, electronic equipment, storage medium and program product

    CN120281888A

  • Virtual production method and apparatus, and video processing method and apparatus

    WO2026016666A1