Data generation method and apparatus, electronic device, and computer-readable medium
By generating target background representation data and adjusting object brightness, the problem of the single environment of VR image data is solved, natural light distribution under the target background is achieved, and the limitation of VR image data being unable to meet the needs of diverse application scenarios is overcome.
Patent Information
- Application Number
- PCT/CN2024/084022
- Authority / Receiving Office
- WO · WO
- Patent Type
- Applications
- Current Assignee / Owner
- Priority Date
- 2023-04-21
- Filing Date
- 2024-03-27
- Publication Date
- 2024-10-24
AI Technical Summary
Due to its simple environment, VR image data cannot meet the background requirements of diverse application scenarios, limiting its development potential.
By obtaining the target environment map and the data to be processed, the target background representation data is generated, and the target object is subjected to brightness adjustment processing to generate the target data so that it has a coordinated brightness state under the target background.
It achieves the generation of data that conforms to the target background light distribution without changing the brightness state of the target object, solves the problem of single background of VR image data, and improves the background replacement effect.
Smart Images

Figure CN2024084022_24102024_PF_FP_ABST
Abstract
Description
Data generation method, device, electronic device, and computer-readable medium
[0001] This disclosure claims priority to Chinese Patent Application No. 202310436249.6 filed on April 21, 2023, and the contents of the above-mentioned Chinese patent application disclosure are hereby incorporated by reference in their entirety as part of this disclosure. Technical Field
[0002] The present disclosure relates to a data generation method, device, electronic device, and computer-readable medium. Background Art
[0003] With the popularization of virtual reality (VR) technology, VR image data has more and more application scenarios (for example, live broadcast scenarios, etc.).
[0004] At present, VR image data usually needs to be shot in a room where VR shooting equipment is pre-arranged. However, because the environment of the room is relatively simple or single, the background involved in the VR image data is also relatively simple or single, which makes the VR image data unable to meet the background requirements of some application scenarios, thus affecting the development potential of VR image data.
[0005] Summary of the Invention
[0006] The present disclosure provides a data generation method, device, electronic device, and computer-readable medium that can overcome the adverse effects caused by the inability of VR image data to meet the background requirements of some application scenarios.
[0007] In order to achieve the above objectives, the technical solutions provided by the present disclosure are as follows:
[0008] The present disclosure provides a data generation method, the method comprising:
[0009] Obtaining a target environment map and data to be processed; the data to be processed includes at least one image data; the data to be processed is used to describe the state of the target object in the original background;
[0010] generating target background representation data corresponding to the data to be processed by using the target environment map; the target background described by the target background representation data is different from the original background;
[0011] According to the target environment map, brightness adjustment processing is performed on the target object in the data to be processed to obtain adjusted data; the brightness state of the target object in the adjusted data is different from the brightness state of the target object in the data to be processed;
[0012] Target data is generated based on the target background characterization data and the adjusted data; the target data is used to describe the state of the target object under the target background; the brightness state of the target object in the target data is consistent with the brightness state of the target object in the adjusted data.
[0013] In a possible implementation manner, performing brightness adjustment processing on the target object in the data to be processed based on the target environment map to obtain adjusted data includes:
[0014] Converting the light information recorded in the target environment map into a light map;
[0015] Performing normal estimation processing on the data to be processed to obtain a normal estimation result;
[0016] The adjusted data is determined according to the normal estimation result, the data to be processed, and the light map.
[0017] In one possible implementation, determining the adjusted data according to the normal estimation result, the data to be processed, and the light map includes:
[0018] Determining first light ray brightness representation information from the light map according to the normal estimation result;
[0019] Performing brightness adjustment processing on the data to be processed according to the first light brightness representation information to obtain a first adjustment result;
[0020] The adjusted data is determined according to the first adjustment result.
[0021] In a possible implementation manner, before determining the adjusted data according to the first adjustment result, the method further includes:
[0022] performing object position determination processing on the data to be processed to obtain object position representation data;
[0023] The determining the adjusted data according to the first adjustment result includes:
[0024] The adjusted data is determined according to the object position representation data and the first adjustment result, so that the adjusted brightness corresponding to the target object is recorded in the adjusted data.
[0025] In one possible implementation, the adjusted data is virtual reality (VR) image data; the data to be processed is image data converted from the original VR image data;
[0026] The determining the adjusted data according to the object position representation data and the first adjustment result includes:
[0027] converting the first adjustment result into first VR image data;
[0028] converting the object position representation data into second VR image data;
[0029] The adjusted data is determined according to the first VR image data and the second VR image data.
[0030] In one possible implementation manner, before determining the adjusted data based on the normal estimation result, the data to be processed, and the light map, the method further includes:
[0031] performing object position determination processing on the data to be processed to obtain object position representation data;
[0032] The determining the adjusted data according to the normal estimation result, the data to be processed, and the light map includes:
[0033] The adjusted data is determined according to the object position representation data, the normal estimation result, the data to be processed, and the light map.
[0034] In one possible implementation, determining the adjusted data according to the normal estimation result, the data to be processed, and the light map includes:
[0035] extracting object representation data from the data to be processed according to the object position representation data;
[0036] extracting an object normal result from the normal estimation result according to the object position representation data;
[0037] The adjusted data is determined according to the object normal result, the object representation data, and the light map.
[0038] In one possible implementation, determining the adjusted data according to the object normal result, the object representation data, and the light map includes:
[0039] Determining second light brightness representation information from the light map according to the object normal result;
[0040] performing brightness adjustment processing on the object representation data according to the second light brightness representation information to obtain a second adjustment result;
[0041] The adjusted data is determined according to the second adjustment result.
[0042] In a possible implementation manner, the data to be processed, the object position representation data, and the normal estimation result are all image sequences;
[0043] The method further comprises:
[0044] Using a preset smoothing algorithm, smoothing adjacent frames in the object position representation data;
[0045] and / or,
[0046] Adjacent frames in the normal estimation result are smoothed using a preset smoothing algorithm.
[0047] In one possible implementation, the data to be processed is data converted from original VR image data;
[0048] The process of obtaining the data to be processed includes:
[0049] Performing object detection processing on the original VR image data to obtain an object detection result;
[0050] According to the object detection result, the original VR image data is subjected to object region interception processing to obtain region representation data;
[0051] Projection dedistortion processing is performed on the region representation data to obtain the data to be processed.
[0052] In one possible implementation, the target background representation data, the adjusted data, and the target data are all VR image data;
[0053] Generating target data according to the target background representation data and the adjusted data includes:
[0054] The target background representation data and the adjusted data are fused to obtain the target data.
[0055] In one possible implementation, the data to be processed is image data converted from original VR image data;
[0056] The original VR image data is monocular panoramic image data, binocular panoramic image data, monocular semi-panoramic image data or binocular semi-panoramic image data.
[0057] In a possible implementation, the target environment map is a high dynamic range imaging HDR environment map.
[0058] In one possible implementation, obtaining the target environment map and the data to be processed includes:
[0059] receiving a background replacement request triggered by a target user for original VR image data; the background replacement request carries the target environment map and the original VR image data;
[0060] The original VR image data is transformed to obtain the data to be processed.
[0061] The present disclosure provides a data generation device, comprising:
[0062] An information acquisition unit is used to acquire a target environment map and data to be processed; the data to be processed includes at least one image data; the data to be processed is used to describe the state of the target object in the original background;
[0063] A background generating unit, configured to generate target background representation data corresponding to the data to be processed using the target environment map; the target background described by the target background representation data is different from the original background;
[0064] an object relighting unit, configured to perform brightness adjustment processing on the target object in the data to be processed based on the target environment map to obtain adjusted data; wherein the brightness state of the target object in the adjusted data is different from the brightness state of the target object in the data to be processed;
[0065] A data generation unit is used to generate target data based on the target background characterization data and the adjusted data; the target data is used to describe the state of the target object under the target background; the brightness state of the target object in the target data is consistent with the brightness state of the target object in the adjusted data.
[0066] The present disclosure provides an electronic device, the device comprising: a processor and a memory;
[0067] The memory is used to store instructions or computer programs;
[0068] The processor is configured to execute the instructions or computer programs in the memory so that the electronic device executes the data generation method provided by the present disclosure.
[0069] The present disclosure provides a computer-readable medium having instructions or a computer program stored therein. When the instructions or the computer program are executed on a device, the device executes the data generation method provided by the present disclosure.
[0070] The present disclosure provides a computer program product, which includes a computer program carried on a non-transitory computer-readable medium, wherein the computer program contains program code for executing the data generation method provided by the present disclosure. BRIEF DESCRIPTION OF THE DRAWINGS
[0071] In order to more clearly illustrate the technical solutions of the embodiments of the present disclosure, the following briefly introduces the drawings required for use in the description of the embodiments. Obviously, the drawings described below are only some embodiments recorded in the present disclosure. For ordinary technicians in this field, other drawings can be obtained based on these drawings without any creative work.
[0072] FIG1 is a flow chart of a data generation method provided by an embodiment of the present disclosure;
[0073] FIG2 is a schematic diagram of a process of background replacement processing and object relighting processing provided by an embodiment of the present disclosure;
[0074] FIG3 is a schematic structural diagram of a data generating device provided by an embodiment of the present disclosure; and
[0075] FIG4 is a schematic structural diagram of an electronic device provided by an embodiment of the present disclosure. DETAILED DESCRIPTION
[0076] The following will be combined with the drawings in the embodiments of the present disclosure to enable those skilled in the art to better understand the solutions of the present disclosure. The technical solutions in the embodiments of the present disclosure will be clearly and completely described in combination with the drawings in the embodiments of the present disclosure. Obviously, the described embodiments are only part of the embodiments of the present disclosure, not all of the embodiments. Based on the embodiments of the present disclosure, all other embodiments obtained by ordinary technicians in this field without making creative efforts shall fall within the scope of protection of the present disclosure.
[0077] To better understand the technical solutions provided by the present disclosure, the data generation method provided by the present disclosure is described below with reference to some figures. As shown in Figure 1, the data generation method provided by the embodiment of the present disclosure includes the following S1-S4. Figure 1 is a flow chart of a data generation method provided by the embodiment of the present disclosure.
[0078] S1: Obtain a target environment map and data to be processed; the data to be processed includes at least one image data; the data to be processed is used to describe the state of the target object in the original background.
[0079] The data to be processed refers to image data (e.g., a frame of image data or an image sequence including multiple frames of image data) that requires background replacement processing. In other words, the data to be processed can refer to a single image data or an image sequence (e.g., a video).
[0080] In addition, the present disclosure does not limit the implementation of the above-mentioned data to be processed. For example, in some application scenarios (e.g., image background replacement scenario), the data to be processed may be a frame of image data. In another example, in other application scenarios (e.g., video background replacement scenario), the data to be processed may be video data (for example, the data to be processed may be an ordinary video of a portrait as shown in FIG2 ).
[0081] In addition, for the above-mentioned data to be processed, the data to be processed can be used to describe the state of a target object in the original background (for example, movement state, brightness state, etc.). The original background refers to the scenery that appears in the data to be processed and is used to set off the target object; and the present disclosure does not limit the original background. For example, in some application scenarios (for example, the video background replacement scenario of VR live video), the original background may refer to other scenery in the live broadcast room besides the anchor. The target object refers to the object described by the data to be processed (for example, a person, an animal, an object, etc.); and the present disclosure does not limit the target object. For example, in some application scenarios (for example, the video background replacement scenario of VR live video), the target object may refer to the anchor.
[0082] In addition, the present disclosure does not limit the implementation methods of the above-mentioned data to be processed. For example, in some application scenarios, the data to be processed may include at least one ordinary image. Among them, ordinary image refers to image data that conforms to the real reality style. The real reality style refers to the image style of image data obtained by using an ordinary camera to capture the real world. In addition, the ordinary image can be used to define a plane (for example, the plane refers to the plane composed of the right side of the screen of the ordinary camera as the positive direction of the X axis, the top of the screen as the positive direction of the Y axis, and the direction from the screen to the photographer as the positive direction of the Z axis).
[0083] It can be seen that in one possible implementation, the data to be processed can be implemented using ordinary images, or the data to be processed can also be implemented using ordinary videos (for example, the ordinary video of a portrait shown in FIG2 ). The ordinary video refers to an image sequence composed of multiple ordinary images.
[0084] Furthermore, the present disclosure does not limit the method for obtaining the above-mentioned data to be processed. For example, in some application scenarios (such as converting an ordinary live video into a VR live video with a changed background), if the data to be processed belongs to an ordinary video, then the process of obtaining the data to be processed can be specifically: the video data captured by an ordinary camera (for example, an ordinary live video recorded by an ordinary camera for a host in a live broadcast room, etc.) is directly determined as the data to be processed.
[0085] For example, in other application scenarios (for example, background replacement processing for a VR live video or VR image), if the data to be processed is ordinary data (for example, ordinary video or ordinary image), then the data to be processed may refer to data converted from the original VR image data, and the process of obtaining the data to be processed may specifically include steps 11 to 13 below.
[0086] Step 11: After obtaining the original VR image data, perform object detection processing on the original VR image data to obtain an object detection result.
[0087] The original VR image data refers to VR image data that requires background replacement processing (e.g., a frame of VR image data or a VR image sequence including multiple frames of VR image data, similar to VR video data, etc.). For example, the original VR image data may refer to a VR live video recorded by a VR camera for a host in a live broadcast room.
[0088] In addition, the present disclosure does not limit the implementation method of the above-mentioned original VR image data. For example, in some application scenarios (for example, scenarios such as background replacement processing for VR images), the original VR image data can be a frame of VR image. For example, in other application scenarios (for example, scenarios such as background replacement processing for VR videos), the original VR image data can be a VR video (for example, the original VR image data can be the VR live video shown in Figure 2). In this case, the VR image or VR video is captured by means of pre-arranged VR shooting equipment.
[0089] In addition, the present disclosure does not limit the implementation method of the above-mentioned original VR image data. For example, in some application scenarios, the original VR image data can be implemented using monocular panoramic image data, binocular panoramic image data, monocular semi-panoramic image data or binocular semi-panoramic image data (for example, binocular semi-panoramic image data with a resolution of 7680×8404).
[0090] In addition, the present disclosure does not limit the method for obtaining the above-mentioned original VR image data. For example, it can be collected with the help of pre-arranged VR shooting equipment.
[0091] Object detection processing is used to detect objects (e.g., humans, animals, etc.) in VR image data (e.g., a frame of VR image data or a VR image sequence, etc.); and the present disclosure is not limited to the object detection processing. For example, in some application scenarios (e.g., background replacement processing for VR live video, etc.), the object detection processing can be portrait detection processing.
[0092] The object detection result is used to describe the area occupied by the target object in the original VR image data. The present disclosure does not limit the representation method of the object detection result. For example, the object detection result can use a rectangular box to represent the area occupied by the target object in the original VR image data.
[0093] Based on the relevant content of step 12 above, it can be known that in some application scenarios (for example, scenarios such as background replacement processing for VR live video), if it is necessary to perform background replacement processing on a certain VR live video (for example, the VR live video shown in Figure 2, etc.), then in order to ensure that the video data after the background replacement is more natural, not only the background image of the VR live video needs to be replaced, but also the portrait in the VR live video (for example, the anchor portrait, etc.) needs to be re-lighted to ensure that the light brightness of the portrait in the video data after the background replacement is coordinated with the light brightness of its background, thereby ensuring that the brightness distribution in the video data after the background replacement is relatively natural (that is, not abrupt). Therefore, in order to better realize the re-lighting processing of the portrait, it is necessary to first perform portrait detection processing on the VR live video, so that the VR live video can be converted into an ordinary video (for example, the ordinary portrait video shown in Figure 2) based on the detection results, so that the re-lighting processing can be completed with the help of the ordinary video.
[0094] Step 12: According to the above object detection results, the original VR image data is processed to extract the object region and obtain the region representation data.
[0095] The region representation data is used to represent the region occupied by the target object in the original VR image data. Furthermore, this disclosure does not limit the implementation of the region representation data. For example, when the "original VR image data" is a frame of VR image, the region representation data is a frame of image data. For another example, when the "original VR image data" is a VR image sequence (e.g., VR video), the region representation data is an image sequence (e.g., video data).
[0096] In addition, the present disclosure does not limit the information carried by the above region representation data. For example, the region representation data may include the object and part of the background, so that the result of subsequent normal estimation based on the region representation data is more accurate.
[0097] Based on the relevant content of step 12 above, it can be known that in some application scenarios (for example, background replacement processing for VR live video, etc.), if it is necessary to perform background replacement processing on a certain VR live video (for example, the VR live video shown in Figure 2, etc.), then after obtaining the object detection result for the VR live video (for example, the portrait detection result), the original VR image data can be subjected to object area interception processing according to the object detection result to obtain area representation data, so that the area representation data can represent the area occupied by the above target object in the original VR image data with the help of at least one image data, so that the VR live video can be converted into an ordinary video (for example, the ordinary portrait video shown in Figure 2) with the help of the area representation data, so that the re-lighting processing can be completed with the help of the ordinary video.
[0098] Step 13: Perform projection dedistortion processing on the above regional representation data to obtain the data to be processed.
[0099] It should be noted that the present disclosure does not limit the implementation method of the "projection dedistortion processing" in step 13. For example, it can be implemented using any method that can perform projection dedistortion processing on a VR image, and the embodiments of the present disclosure are not limited to this.
[0100] It should also be noted that the present disclosure does not limit the implementation method of the "data to be processed" in step 13. For example, when the above "original VR image data" is implemented using binocular semi-panoramic image data with a resolution of 7680×8404, the data to be processed can be implemented using ordinary image data with a resolution of 1280×2176.
[0101] Based on the relevant content of step 13 above, it can be known that in some application scenarios (for example, background replacement processing for VR live video, etc.), if it is necessary to perform background replacement processing on a certain VR live video (for example, the VR live video shown in Figure 2, etc.), then after cutting out the regional representation data corresponding to the portrait from the VR live video, projection dedistortion processing is performed on the regional representation data to obtain an ordinary video (for example, the ordinary video of the portrait shown in Figure 2). In this way, the purpose of converting a VR video into an ordinary video can be achieved, so that the re-lighting processing can be completed with the help of the ordinary video later.
[0102] Based on the relevant content of steps 11 to 13 above, it can be seen that in one possible implementation, if the original VR image data is a VR image, then the data to be processed is a normal image, and the data to be processed refers to the normal image converted from the original VR image data. In another possible implementation, if the original VR image data is a VR video, then the data to be processed is a normal video, and the data to be processed refers to the normal video converted from the original VR image data.
[0103] Based on the relevant content of the "data to be processed" above, it can be known that the data to be processed can include one or more ordinary images, and the data to be processed can represent the state of the target object under the original background, so that the data to be processed can be used to complete the re-lighting processing of the target object in the future, so that the brightness state of the target object after the re-lighting processing conforms to the light distribution law recorded in the target environment map above, which is conducive to improving the background replacement effect.
[0104] The target environment map refers to the environment map used as a reference when performing background replacement processing on the data to be processed. Furthermore, the scene state (e.g., scene type, scene pose, scene brightness, etc.) represented by the target environment map is different from the scene state represented by the original background. It should be noted that the present disclosure does not limit the implementation method of the environment map. For example, the environment map can be implemented using a panoramic image, a spherical environment map, or a cubic environment map.
[0105] In addition, the present disclosure does not limit the implementation of the above target environment map. For example, as shown in FIG. 2 , it can be implemented using a high dynamic range (HDR) environment map.
[0106] Based on the relevant content of S1 above, it can be known that in some application scenarios (for example, background replacement processing for VR live video, etc.), if it is necessary to perform background replacement processing on a certain VR live video (for example, the VR live video shown in Figure 2, etc.), it is necessary not only to convert the VR live video into an ordinary video (for example, the ordinary portrait video shown in Figure 2), but also to obtain the target environment map (for example, the HDR environment map shown in Figure 2) so that the target environment map can provide new background and light information for the background replacement process of the VR live video.
[0107] S2: Generate target background representation data corresponding to the data to be processed using the target environment map; the target background described by the target background representation data is different from the original background.
[0108] Among them, the target background characterization data is used to characterize the background required for background replacement processing of the above-mentioned data to be processed; and the present disclosure does not limit the implementation method of the target background characterization data. For example, if the above-mentioned "data to be processed" is a frame of image data, then the target background characterization data is also a frame of image data. For another example, if the above-mentioned "data to be processed" is an image sequence (for example, video data), then the target background characterization data is also an image sequence. For another example, if the above-mentioned "data to be processed" is ordinary image data converted from original VR image data (for example, the VR live video shown in Figure 2), then the target background characterization data belongs to VR image data (for example, the VR virtual background shown in Figure 2).
[0109] The above-mentioned “target background” refers to the background represented by the above-mentioned target background representation data; and the target background is determined based on the above-mentioned target environment map so that the scene state represented by the target background is consistent with the scene state represented by the target environment map, thereby making the target background different from the original background.
[0110] In addition, the present disclosure does not limit the implementation of S2 above. For example, it can be implemented by any method of generating a VR virtual background using an environment map. For example, in some application scenarios (for example, background replacement processing for binocular panoramic image data or binocular semi-panoramic image data), since the left and right eyes of the human visual system have parallax, it is necessary to generate a virtual background with parallax to simulate the three-dimensional sense of the VR scene. Based on this, it can be seen that according to some visual laws (for example, the distance between the left and right eyes of humans is about 6 cm, the angular time difference between the left and right eyes when humans observe objects 3 cm away is about 1.15 degrees, etc.), the virtual background corresponding to the left and right eyes can be horizontally translated and adjusted according to the size of the HDR environment map (that is, the "target environment map" above), and the present disclosure does not make specific limitations on this.
[0111] Based on the relevant content of S2 above, it can be known that in some application scenarios (for example, background replacement processing for VR live video, etc.), if it is necessary to perform background replacement processing for a certain VR live video (for example, the VR live video shown in Figure 2, etc.) based on the HDR environment map, a virtual background of the VR live video (for example, the VR virtual background shown in Figure 2) can be generated according to the HDR environment map, so that the virtual background can be used to replace the existing background in the VR live video later.
[0112] S3: performing brightness adjustment processing on the target object in the data to be processed according to the target environment map to obtain adjusted data; the brightness state of the target object in the adjusted data is different from the brightness state of the target object in the data to be processed.
[0113] Among them, the adjusted data refers to the brightness adjustment processing result of the target object in the processed data, so that the brightness state of the target object in the adjusted data conforms to the light distribution law recorded in the above target environment map, so that the brightness state of the target object in the adjusted data is better coordinated with the brightness state of the above "target background representation data", so that when the target object is fused with the target background representation data, a more natural light distribution state can be presented.
[0114] Furthermore, the present disclosure does not limit the implementation of the "adjusted data" described above. For example, in some application scenarios, the adjusted data may include at least one ordinary image. In other application scenarios, the adjusted data may include at least one VR image. This disclosure does not limit the VR image; for example, it may be a panoramic image or a semi-panoramic image.
[0115] In addition, in one possible implementation, if the above data to be processed is a frame of image data, then the above adjusted data is also a frame of image data; however, if the data to be processed is an image sequence (for example, video data), then the adjusted data is also an image sequence (for example, video data).
[0116] Based on the above two paragraphs, it can be seen that in some application scenarios (for example, converting an ordinary image into a VR image with a changed background, converting an ordinary video into a VR video with a changed background, performing background replacement processing on a VR image, or performing background replacement processing on a VR video, etc.), the adjusted data above can be implemented using VR images or VR videos.
[0117] In addition, the embodiment of the present disclosure does not limit the determination process of the above “adjusted data”, for example, it may include the following steps 21 to 23.
[0118] Step 21: Convert the light information recorded in the target environment map into an irradiance map.
[0119] Among them, the light map is used to describe the light information recorded in the target environment map above.
[0120] In addition, the light map is essentially a panoramic image, so that the light map records the sum of all light energies in each direction; and this sum can be determined with the help of the following formula (1).
[0121] Where φ represents the longitude; θ represents the latitude; L(φ,θ) represents the light brightness at the point where the longitude is φ and the latitude is θ, as recorded in the target environment map above; and c represents a preset value.
[0122] In addition, the present disclosure does not limit the implementation of the above step 21. For example, it can be implemented by using any method that can convert light information recorded in an environment map into an irradiance map.
[0123] Based on the relevant content of step 21 above, it can be known that in some application scenarios (for example, background replacement processing for VR live video, etc.), if it is necessary to perform background replacement processing for a certain VR live video (for example, the VR live video shown in Figure 2, etc.) based on an HDR environment map (for example, the HDR environment map shown in Figure 2), then after obtaining the HDR environment map, the light information recorded in the HDR environment map can be directly converted into a light map, so that the light map can be used to perform relighting processing later.
[0124] Step 22: Perform normal estimation processing on the above data to be processed to obtain the normal estimation result.
[0125] The normal estimation result is used to represent the directional characteristics of each pixel point in the above-mentioned data to be processed; and the present disclosure does not limit the implementation method of the normal estimation result. For example, it can be implemented using a normal map.
[0126] In addition, the present disclosure does not limit the data type of the normal estimation result. For example, when the data to be processed is a frame of image data, the normal estimation result is also a frame of image data. For another example, when the data to be processed is an image sequence (e.g., video data), the normal estimation result is also an image sequence (e.g., video data).
[0127] In addition, the present disclosure does not limit the implementation of the "normal estimation processing" in step 22. For example, it can be implemented using any method that can perform normal estimation processing on an image data (for example, based on a Pix2Pix network, etc.).
[0128] In addition, when the above normal estimation result is an image sequence (for example, video data), in order to better improve the temporal stability of the normal estimation result, the present disclosure also provides a possible implementation method of the above "normal estimation result" determination process, which may specifically include: first performing normal estimation processing on the data to be processed to obtain a normal estimation result; then using a preset smoothing algorithm to smooth the adjacent frames in the normal estimation result. The preset smoothing algorithm is used to smooth a time-series image sequence; and the present disclosure is not limited to the preset smoothing algorithm. For example, it can be implemented using any method that can smooth an image sequence arranged in time sequence (for example, an optical flow algorithm or a Raft algorithm). For ease of understanding, the optical flow algorithm is used as an example for explanation below.
[0129] As an example, when the data to be processed above includes N frames of ordinary images arranged in a preset order, and the preset smoothing algorithm above is an optical flow algorithm (for example, Dense Inverse Search Optical Flow, DISOptical Flow, etc.), the determination process of the above "normal estimation result" can specifically include the following steps 31-32.
[0130] Step 31: Perform normal estimation on the data to be processed to obtain a normal estimation result, such that the normal estimation result includes a normal map corresponding to N frames of normal images. The normal map corresponding to the nth frame of normal image is used to represent the directional characteristics of each pixel in the nth frame of normal image. Where n is a positive integer, n≤N, and N is a positive integer.
[0131] Step 32: Determine the optical flow between any adjacent frames in the data to be processed.
[0132] It should be noted that the present disclosure does not limit the method for obtaining the “optical flow” in step 32 . For example, it can be implemented by any method that can calculate the optical flow for two image data.
[0133] Step 33: Using the optical flow between the n-1th frame of the normal image and the nth frame of the normal image, warp the normal map corresponding to the n-1th frame of the normal image to obtain the normal estimation result corresponding to the nth frame of the normal image, where n is a positive integer, 2≤n≤N, and N is a positive integer.
[0134] It should be noted that the present disclosure does not limit the implementation method of the "warping processing" in step 33. For example, it can be implemented by using the warping processing involved in any optical flow algorithm (for example, adding the optical flow between the n-1th frame ordinary image and the nth frame ordinary image, and the normal map corresponding to the n-1th frame ordinary image, etc.).
[0135] Step 34: Perform a weighted average of the normal estimation result corresponding to the n-th frame of the normal image and the normal map corresponding to the n-th frame of the normal image to obtain a final normal map corresponding to the n-th frame of the normal image, where n is a positive integer, 2≤n≤N, and N is a positive integer.
[0136] Based on the relevant content of steps 31 to 34 above, it can be seen that in one possible implementation method, after obtaining the data to be processed, normal estimation processing can be performed on the data to be processed to obtain a normal estimation result; then the optical flow algorithm is used to smooth the adjacent frames in the normal estimation result to obtain the final normal estimation result corresponding to the data to be processed, so that the normal estimation result has better temporal stability, which is conducive to improving the relighting effect.
[0137] Based on the relevant content of step 22 above, it can be known that in some application scenarios (for example, background replacement processing for VR live video, etc.), if it is necessary to perform background replacement processing on a certain VR live video (for example, the VR live video shown in Figure 2, etc.), then after converting the VR live video into an ordinary video (for example, the ordinary portrait video shown in Figure 2), normal estimation processing can be performed on the ordinary video first to obtain a normal estimation result; then the optical flow algorithm is used to smooth the adjacent frames in the normal estimation result to obtain the final normal estimation result corresponding to the data to be processed, so that the normal estimation result has better temporal stability, so that subsequent re-lighting processing can be achieved based on the normal estimation result.
[0138] Step 23: Determine the adjusted data based on the normal estimation result, the data to be processed, and the light map.
[0139] It should be noted that the present disclosure does not limit the implementation of step 23. For ease of understanding, two possible implementations are described below.
[0140] In a possible implementation, the above step 23 may specifically include the following steps 231 to 233.
[0141] Step 231: Determine first light brightness representation information from the above light map based on the normal estimation result.
[0142] The first light brightness representation information is used to record the irradiance corresponding to each pixel point in the above to-be-processed data in the above target environment map.
[0143] In addition, the present disclosure does not limit the implementation of step 231 .
[0144] Based on the relevant content of step 231 above, it can be known that after obtaining the above light map, the normal recorded for each pixel point in the above normal estimation result can be used to index the light map to obtain the irradiance corresponding to each pixel point, so that the irradiance corresponding to each pixel point can be used subsequently to adjust the brightness of the corresponding pixel point in the above data to be processed.
[0145] Step 232 : performing brightness adjustment processing on the data to be processed according to the first light brightness representation information to obtain a first adjustment result.
[0146] The first adjustment result is a brightness adjustment result of the pointer data to be processed, so that the first adjustment result is used to record the brightness after relighting corresponding to each pixel point in the data to be processed.
[0147] In addition, the present disclosure does not limit the implementation method of the "brightness adjustment processing" in the above step 232. For example, it can be specifically: multiplying the irradiance corresponding to a pixel point with the brightness of the pixel point in the above processed data to obtain the brightness after re-lighting corresponding to the pixel point.
[0148] Step 233: Determine the adjusted data according to the first adjustment result.
[0149] It should be noted that the present disclosure does not limit the implementation of step 233. For example, it can specifically be: directly determining the first adjustment result as the adjusted data. In this case, because the data to be processed is ordinary data (for example, an ordinary image or an ordinary video), the first adjustment result obtained by adjusting the data to be processed is also ordinary data, and thus the adjusted data is also ordinary data.
[0150] In fact, the above data to be processed not only contains the target object, but also contains some background areas that are relatively close to the target object. Therefore, in order to avoid interference caused by the background area, the present disclosure also provides a possible implementation method of the process of determining the above adjusted data, which may specifically include the following steps 41-42.
[0151] Step 41: performing object position determination processing on the above data to be processed to obtain object position representation data.
[0152] The object position representation data is used to represent the position of the target object in the data to be processed. The present disclosure does not limit the implementation method of the object position representation data. For example, it can be implemented by matting a portrait.
[0153] Furthermore, the present disclosure does not limit the data type of the object position representation data. For example, when the data to be processed is a frame of image data, the object position representation data is also a frame of image data. For another example, when the data to be processed is an image sequence (e.g., video data), the object position representation data is also an image sequence (e.g., video data).
[0154] In addition, the present disclosure does not limit the implementation method of the "object position determination processing" in step 41. For example, it can be implemented using any method that can perform object matting estimation processing on an image data (for example, based on MobileNetV3+ASPP network, etc.).
[0155] Furthermore, when the object position representation data described above is an image sequence (e.g., video data), in order to better improve the temporal stability of the object position representation data, the present disclosure further provides a possible implementation of the process for determining the "object position representation data" described above. This implementation may specifically include: first performing object position determination processing on the data to be processed to obtain object position representation data; and then using a preset smoothing algorithm to smooth adjacent frames in the object position representation data. It should be noted that the relevant content of the preset smoothing algorithm can be found in the relevant content of step 22 above, and for the sake of brevity, it will not be repeated here.
[0156] It can be seen that in one possible implementation method, after the data to be processed is obtained, the object position determination processing can be performed on the data to be processed to obtain object position representation data; then the optical flow algorithm is used to smooth the adjacent frames in the object position representation data to obtain the final object position representation data corresponding to the data to be processed, so that the object position representation data has better temporal stability, which is conducive to improving the relighting effect.
[0157] Based on the relevant content of step 41 above, it can be known that in some application scenarios (for example, background replacement processing for VR live video, etc.), if background replacement processing is required for a certain VR live video (for example, the VR live video shown in Figure 2, etc.), after converting the VR live video into an ordinary video (for example, the portrait ordinary video shown in Figure 2), the object position determination processing (for example, portrait matting estimation processing) can be performed on the ordinary video first to obtain object position representation data (for example, portrait matting results); then the optical flow algorithm is used to smooth the adjacent frames in the object position representation data to obtain the final object position representation data corresponding to the data to be processed, so that the object position representation data has better temporal stability, so that the subsequent re-lighting processing can be achieved based on the object position representation data.
[0158] It should be noted that the present disclosure does not limit the execution time of step 41 . For example, it can be executed earlier than the execution time of step 42 below.
[0159] Step 42: determining adjusted data according to the object position representation data and the first adjustment result, so that the adjusted data records the adjusted brightness corresponding to the target object.
[0160] It should be noted that the present disclosure does not limit the implementation of step 42. For example, it may specifically be: according to the above object position representation data, extracting adjusted data from the above first adjustment result, so that the adjusted data only records the brightness after relighting corresponding to the target object. For ease of understanding, the following is an example.
[0161] As an example, when the adjusted data above is virtual reality VR image data, and the data to be processed above is image data converted from the original VR image data (for example, an ordinary image data or an ordinary video, etc.), the above step 42 may specifically include the following steps 421-423.
[0162] Step 421: Convert the first adjustment result into first VR image data.
[0163] The first VR image data refers to the first adjustment result represented in a VR image data format. The present disclosure does not limit the process for determining the first VR image data. For example, the process may include performing a reverse reprojection process on the first adjustment result to obtain the first VR image data, so that the first VR image data conforms to the VR image data format (in particular, conforms to the image data format of the "original VR image data" described above). The "reverse reprojection process" and the "projection dedistortion process" described above are two opposite processes. The present disclosure does not limit the implementation method of the "reverse reprojection process."
[0164] For example, in some application scenarios, the process of determining the first VR image data described above may specifically include converting the first adjustment result described above into the first VR image data according to a preset VR image data format, so that the first VR image data conforms to the preset VR image data format. The preset VR image data format is determined based on the format requirements of the target data described below; the preset VR image data format may be pre-set, for example, the same as the image data format of the "original VR image data" described above.
[0165] Based on the relevant content of step 421 above, it can be known that in some application scenarios (for example, background replacement processing for VR live video, etc.), if background replacement processing is required for a certain VR live video (for example, the VR live video shown in Figure 2, etc.), then when the VR live video is converted into an ordinary video (for example, the ordinary portrait video shown in Figure 2), and the first adjustment result corresponding to the ordinary video is obtained (for example, the output data of the "normal estimation and relighting" module shown in Figure 2), the first adjustment result is reversely reprojected to obtain a VR video in the video format that conforms to the above "original VR video", so that the VR video can better represent the first adjustment result according to the VR video format.
[0166] Step 422: Convert the above object position representation data into second VR image data.
[0167] Among them, the second VR image data refers to the above-mentioned object position representation data represented in the VR image data format; and the present disclosure does not limit the determination process of the second VR image data to be similar to the above-mentioned "determination process of the first VR image data". For ease of understanding, the following is explained with examples.
[0168] As an example, the "second VR image data determination process" described above may specifically include: performing reverse reprojection processing on the object position representation data to obtain the second VR image data, so that the second VR image data conforms to a VR image data format (particularly, conforms to the image data format of the "original VR image data" described above). This "reverse reprojection process" and the "projection dedistortion process" described above are two opposite processes; and this disclosure does not limit the implementation of this "reverse reprojection process."
[0169] Based on the relevant content of step 422 above, it can be known that in some application scenarios (for example, background replacement processing for VR live video, etc.), if background replacement processing is required for a certain VR live video (for example, the VR live video shown in Figure 2, etc.), then when the VR live video is converted into an ordinary video (for example, the portrait ordinary video shown in Figure 2), and the object position representation data corresponding to the ordinary video is obtained (for example, the output data of the "portrait cutout" module shown in Figure 2), the object position representation data is reversely reprojected to obtain a VR video in the video format that conforms to the above "original VR video", so that the VR video can better represent the object position representation data according to the VR video format.
[0170] Step 423: Determine adjusted data based on the first VR image data and the second VR image data.
[0171] In the present disclosure, after obtaining the above-mentioned first VR image data and the above-mentioned second VR image data, adjusted data can be determined based on the first VR image data and the second VR image data (for example, the first VR image data and the second VR image data are fused to obtain the adjusted data; or, according to the second VR image data, the first VR image data is cut out to obtain the adjusted data), so that the adjusted data can represent the re-lit target object according to the image data format of the above-mentioned "original VR image data", so that the brightness state of the target object in the adjusted data is different from the brightness state of the target object in the data to be processed.
[0172] It should be noted that the present disclosure does not limit the implementation method of the "fusion processing" in step 423. For example, it can be implemented by any method that can fuse two VR image data.
[0173] Based on the relevant content of steps 231 to 233 above, it can be known that in some application scenarios, after obtaining the normal estimation result, the normal estimation result can be used to index the corresponding irradiance from the above light map, and use the irradiance to perform brightness adjustment processing on the above data to be processed to obtain a first adjustment result, so that the adjusted data corresponding to the data to be processed can be determined based on the first adjustment result, so that the brightness state of the target object in the adjusted data is different from the brightness state of the target object in the data to be processed.
[0174] Based on the relevant contents of steps 21 to 23 above, it can be known that in some application scenarios (for example, background replacement processing for VR live video, etc.), if it is necessary to perform background replacement processing on a VR live video (for example, the VR live video shown in Figure 2, etc.) based on the HDR environment map, then after converting the VR live video into an ordinary video (for example, the ordinary portrait video shown in Figure 2), the ordinary video can be first subjected to portrait matting estimation processing and normal estimation processing; then, using the normal estimation result, the corresponding irradiance is indexed from the light map corresponding to the HDR environment map, and the irradiance is multiplied by the brightness in the ordinary video to obtain the re-lighting result; then, the portrait matting estimation results (that is, the above) are respectively The "object position representation data") and the relighting result are respectively inversely mapped and projected to the video format of the above VR live video to obtain the VR video corresponding to the portrait matting estimation result (that is, the "second VR video" above) and the VR video corresponding to the relighting result (that is, the "first VR video" above); finally, the VR video corresponding to the portrait matting estimation result and the VR video corresponding to the relighting result are fused to obtain the portrait relighting VR video corresponding to the VR live video (that is, the "adjusted data" above), so that the brightness state of the portrait in the portrait relighting VR video is different from the brightness state of the portrait in the VR live video, so that the purpose of relighting an object in a VR video can be achieved.
[0175] In fact, the present disclosure also provides another possible implementation of the process of determining the above “adjusted data”, which may specifically include the following steps 51 to 54.
[0176] Step 51: Convert the light information recorded in the target environment map into an irradiance map.
[0177] It should be noted that for the relevant content of step 51, please refer to step 21 above.
[0178] Step 52: Perform normal estimation processing on the above data to be processed to obtain a normal estimation result.
[0179] It should be noted that for the relevant content of step 51, please refer to step 22 above.
[0180] Step 53: Perform object position determination processing on the above data to be processed to obtain object position representation data.
[0181] It should be noted that for the relevant content of step 53, please refer to step 41 above.
[0182] Step 54: Determine adjusted data based on the above object position representation data, the above normal estimation result, the above data to be processed, and the above light map.
[0183] It should be noted that the present disclosure does not limit the implementation of step 54. For example, it may specifically include the following steps 541 to 543.
[0184] Step 541: extracting object representation data from the data to be processed according to the above object position representation data.
[0185] The object representation data is used to represent the state of the target object in the data to be processed (for example, its position, brightness, etc.).
[0186] In addition, the present disclosure does not limit the implementation method of the above step 541. For example, when the above object position representation data and the above data to be processed both belong to video data, step 541 can specifically be: fusing the object position representation data with the data to be processed to obtain the object representation data, so that the object representation data also belongs to video data, thereby enabling the object representation data to represent the target object recorded in the data to be processed.
[0187] Step 542: extracting an object normal result from the normal estimation result according to the object position characterization data, wherein the object normal result is used to characterize the normal state of the target object in the data to be processed.
[0188] Step 543: Determine adjusted data based on the above object normal result, the above object representation data, and the above light map.
[0189] It should be noted that the present disclosure does not limit the implementation of the above step 543. For example, it may specifically include the following steps 5431 to 5433.
[0190] Step 5431: Determine the second light brightness representation information from the above light map based on the above object normal result.
[0191] The second light brightness representation information is used to record the irradiance corresponding to each pixel in the above object representation data (ie, each pixel in the area occupied by the target object in the above to-be-processed data) in the above target environment map.
[0192] In addition, the present disclosure does not limit the implementation of step 5431.
[0193] Based on the relevant content of step 5431 above, it can be known that after obtaining the above light map, the normal recorded for each pixel point in the area occupied by the target object in the above object normal result can be used to index the light map to obtain the irradiance corresponding to each pixel point, so that the irradiance corresponding to each pixel point can be used subsequently to adjust the brightness of the corresponding pixel point in the above object representation data.
[0194] Step 5432: Based on the second light brightness representation information, perform brightness adjustment processing on the object representation data to obtain a second adjustment result.
[0195] The second adjustment result refers to the brightness adjustment processing result for the above object characterization data (ie, the target object), so that the second adjustment result is used to record the brightness after relighting corresponding to each pixel point in the area occupied by the target object.
[0196] In addition, the present disclosure does not limit the implementation of the "brightness adjustment process" in step 5432 above to being similar to the implementation of the "brightness adjustment process" in step 232 above.
[0197] Step 5433: Determine the adjusted data based on the second adjustment result above.
[0198] It should be noted that the present disclosure does not limit the implementation of step 5433. For example, it may specifically be: directly determining the second adjustment result as the adjusted data, so that the adjusted data is ordinary data (for example, an ordinary image or an ordinary video). In another example, it may specifically be: performing reverse reprojection processing on the second adjustment result to obtain the adjusted data, so that the adjusted data is VR image data (for example, a VR image or a VR video).
[0199] For example, when the second adjustment result above is a frame of image data or an image sequence (for example, a video), the above step 5433 can specifically be: according to the preset VR image data format, the second adjustment result is converted into adjusted data so that the adjusted data conforms to the preset VR image data format.
[0200] Based on the relevant contents of steps 51 to 54 above, it can be seen that in some application scenarios (for example, scenarios such as background replacement processing for VR live video), if it is necessary to perform background replacement processing on a VR live video (for example, the VR live video shown in Figure 2) based on the HDR environment map, then after converting the VR live video into an ordinary video (for example, the ordinary portrait video shown in Figure 2), portrait matting estimation processing and normal estimation processing can be first performed on the ordinary video; then, using the portrait matting estimation result (that is, the "object position representation data" above), portrait extraction processing is performed on the ordinary video and the normal estimation result to obtain object representation data and object normal result; then, with the help of the object representation data, the object normal result, and the light map corresponding to the HDR environment map, the portrait relighting VR video corresponding to the VR live video (that is, the "adjusted data" above) is directly determined, so that the brightness state of the portrait in the portrait relighting VR video is different from the brightness state of the portrait in the VR live video, thereby achieving the purpose of relighting the object in a VR video.
[0201] Based on the relevant content of S3 above, it can be known that in some application scenarios (for example, scenarios such as background replacement processing for VR live video), if it is necessary to perform background replacement processing on a certain VR live video (for example, the VR live video shown in Figure 2, etc.) based on the HDR environment map, then after converting the VR live video into an ordinary video (for example, the ordinary portrait video shown in Figure 2), the light information recorded by the HDR environment map can be used to relight the portrait in the ordinary video to obtain a relighted VR video of the portrait corresponding to the VR live video (that is, the "adjusted data" above), so that the brightness state of the portrait in the relighted VR video conforms to the light distribution law recorded in the HDR environment map, so that the brightness state of the portrait in the relighted VR video is different from the brightness state of the portrait in the VR live video, thereby achieving the purpose of relighting an object in a VR video.
[0202] S4: Generate target data based on the target background characterization data and the adjusted data; the target data is used to describe the state of the target object under the target background; the brightness state of the target object in the target data is consistent with the brightness state of the target object in the adjusted data.
[0203] The target data refers to the background replacement result of the above data to be processed, so that the target data is used to describe the state of the above target object in the above target background.
[0204] In fact, for the target data mentioned above, there are not only differences between the target data and the data to be processed mentioned above as shown in ①-② below, but also similarities as shown in ③-④ below.
[0205] ① Difference point 1: The background used by the target data (that is, the target background mentioned above) is different from the background used by the data to be processed (that is, the original background mentioned above).
[0206] ② The second difference: the brightness state of the target object in the target data is different from the brightness state of the target object in the above-mentioned data to be processed.
[0207] ③ Common point 1: The object described by the target data is the same as the object described by the data to be processed above, both of which are the target objects mentioned above.
[0208] ④ Common point 2: The number of images in the target data is the same as the number of images in the data to be processed above, that is, if the data to be processed is a frame of image data, then the target data is also a frame of image data; if the data to be processed belongs to video data (that is, an image data sequence), then the target data also belongs to video data.
[0209] Based on ① to ④ above, it can be seen that compared with the above data to be processed, the above target data not only replaces the background, but also adjusts the brightness of the target object, so that the brightness state of the target object in the target data is more coordinated with the brightness state of the background in the target data. This can effectively ensure that the target data presents a more natural light distribution, thereby effectively improving the background replacement effect.
[0210] Furthermore, this disclosure does not limit the implementation of the target data described above; for example, the target data may include at least one VR image. Thus, in one possible implementation, the target data may be a frame of VR image data or a VR image sequence (e.g., a VR video), and this disclosure does not specifically limit this.
[0211] In addition, the present disclosure does not limit the above target data determination process. For ease of understanding, two cases are described below.
[0212] Case 1: In some application scenarios, when the above target background representation data, the above adjusted data, and the above target data all belong to VR image data, the target data determination process can be specifically: the target background representation data and the adjusted data are fused to obtain the target data.
[0213] It can be seen that in one possible implementation method, after obtaining the above target background representation data and the above adjusted data, if it is determined that the target background representation data and the adjusted data both belong to VR image data, and the above target data also belongs to VR image data, then it can be determined that the target data can be generated with the help of the fusion process of the two VR image data, so the target background representation data and the adjusted data can be directly fused to obtain the target data, so that the target data can comprehensively represent the background represented by the target background representation data and the re-lighting result of the target object represented by the adjusted data in accordance with the VR image data format.
[0214] Case 2: In some application scenarios, when the above target background representation data and the above target data both belong to VR image data, but the above adjusted data belongs to ordinary image data, the target data determination process may specifically include the following steps 61-62.
[0215] Step 61: Convert the adjusted data into third VR image data.
[0216] The third VR image data is used to describe the relighting result of the target object according to the VR image data format.
[0217] In addition, the present disclosure does not limit the implementation of the above step 61. For example, it can be implemented using any implementation of the above step 421.
[0218] Step 62: Fusing the target background representation data with the third VR image data to obtain target data.
[0219] It should be noted that the present disclosure does not limit the implementation method of the "fusion processing" in step 62. For example, it can be implemented by any method that can fuse two VR image data.
[0220] Based on the relevant contents of steps 61 to 62 above, it can be known that, in one possible implementation mode, after obtaining the above target background representation data and the above adjusted data, if it is determined that the image data format of the target background representation data is different from the image data format of the adjusted data, then the target background representation data or the adjusted data can be subjected to image data format conversion processing based on the image data format requirements of the above target data, so that the target data can be subsequently determined by means of a fusion of two image data with the same image data format, which is conducive to better meeting the format requirements of the target data.
[0221] Based on the relevant contents of S1 to S4 above, it can be known that for the data to be processed (for example, a VR image data) including at least one image data, the background replacement process for the data to be processed is specifically as follows: after obtaining the target environment map (for example, HDR environment map), first use the target environment map to generate target background representation data corresponding to the data to be processed, so that the target background described by the target background representation data conforms to the scene presentation state (for example, scene posture, scene brightness state, etc.) in the target environment map, so that the target background described by the target background representation data is different from the scene presentation state (for example, scene posture, scene brightness state, etc.) in the target environment map. The original background appearing in the processing data is processed, and according to the target environment map, the brightness of the target object in the data to be processed is adjusted to obtain adjusted data, so that the brightness state of the target object in the adjusted data conforms to the light distribution law recorded in the target environment map, so that the brightness state of the target object in the adjusted data is different from the brightness state of the target object in the data to be processed; and then, according to the target background characterization data and the adjusted data, target data is generated, so that the brightness state of the target object in the target data is consistent with the brightness state of the target object in the adjusted data. Among them, because the brightness state of the target object in the target data and the brightness state of the background in the target data both conform to the light distribution law recorded in the target environment map, the brightness state of the target object in the target data and the brightness state of the background in the target data are relatively coordinated (for example, the brightness transition is relatively natural), so that the target data can more naturally describe the state of the target object under the target background (for example, the light brightness state), so as to achieve the purpose of background replacement under the premise of ensuring that the object and the background light are coordinated, so as to overcome the adverse effects caused by the inability of VR image data to meet the background requirements of some application scenarios.
[0222] In addition, the present disclosure does not limit the execution subject of the data generation method provided in the embodiments of the present disclosure. For example, the data generation method provided in the embodiments of the present disclosure can be applied to devices with data processing functions such as terminal devices or servers. For another example, the data generation method provided in the embodiments of the present disclosure can also be implemented with the help of a data communication process between different devices (for example, a terminal device and a server, two terminal devices, or two servers). Among them, the terminal device can be a smart phone, a computer, a personal digital assistant (PDA) or a tablet computer, etc. The server can be a stand-alone server, a cluster server or a cloud server.
[0223] In addition, the present disclosure does not limit the application scenarios of the data generation method. For ease of understanding, the following description is combined with two scenarios.
[0224] Scenario 1: The data generation method provided in the present disclosure can be applied to a VR live broadcast scenario, and the implementation process in this scenario can include the following steps 71 to 73.
[0225] Step 71: Receive a background replacement request triggered by a target user for original VR image data; the background replacement request carries a target environment map and the original VR image data.
[0226] The target user refers to the person who triggered the request; and this disclosure does not limit the target user. For example, when the original VR image data above is VR live broadcast image data or VR live broadcast video data, the target user can refer to the live broadcast publisher (for example, the live broadcast host or other staff in the live broadcast room) to meet the live broadcast publisher's need to change the live broadcast background. For another example, when the original VR image data above is VR live broadcast image data or VR live broadcast video data, the target user can refer to the live broadcast viewer to meet the live broadcast viewer's need to change the live broadcast background.
[0227] The background replacement request is used to request that the original background in the original VR image data be replaced with the target background described by the target environment map. The original VR image data is used to describe the state of the target object in the original background.
[0228] In addition, the present disclosure does not limit the triggering method of the above-mentioned background replacement request. For example, it can be specifically: after the target user sets the original VR image data as the image data that needs to be processed for background replacement through some operations, and sets the target environment map as the target background to be used for background replacement processing through other operations, the target user can trigger the background replacement request by performing a preset operation (for example, clicking the "background replacement" button, etc.).
[0229] Step 72: Perform conversion processing on the original VR image data to obtain data to be processed.
[0230] It should be noted that the process of obtaining the “data to be processed” in step 72 is described above.
[0231] Step 73: Based on the data to be processed and the target environment map carried by the background replacement request, background replacement processing and object relighting processing are performed on the original VR image data described by the background replacement request to obtain target data, so that the target data can describe the state of the target object under the target background, thereby enabling the target data to meet the background replacement needs of the target user.
[0232] It should be noted that the process of obtaining the “target data” in step 73 (ie, the background replacement process and the object relighting process) can be found in S1-S4 above, and will not be described again for the sake of brevity.
[0233] Based on the relevant content of steps 71 to 73 above, it can be seen that for VR image data in a VR live broadcast scene (for example, VR live video), the user can perform background replacement processing and object re-lighting processing on the recorded VR image data, so that the processed VR image data can more naturally represent the state of the live broadcast object in the new background, so that the VR live broadcast image data is no longer restricted to the real background in the VR live broadcast recording scene, which can effectively overcome the adverse effects caused by the inability of VR image data to meet some live broadcast background requirements.
[0234] Scenario 2: The data generation method provided in the present disclosure can be applied to a binocular scenario, and the implementation process in this scenario can include the following steps 81 to 83.
[0235] Step 81: If the original VR image data is binocular data (for example, binocular panoramic image data or binocular semi-panoramic image data), then after obtaining the original VR image data, the original VR image data is converted into binocular data to be processed, so that the binocular data to be processed includes left-eye data to be processed and right-eye data to be processed (for example, left-eye ordinary image data + right-eye ordinary image data).
[0236] Step 82: After obtaining the target environment map, use the target environment map to generate binocular target background representation data corresponding to the data to be processed, so that the binocular target background representation data includes target background representation data corresponding to the left eye and target background representation data corresponding to the right eye.
[0237] Step 83: After obtaining the target environment map, brightness adjustment processing is performed on the target object in the binocular data to be processed based on the target environment map to obtain binocular adjusted data, so that the binocular adjusted data includes the adjusted data corresponding to the left eye + the adjusted data corresponding to the right eye.
[0238] Step 84: Generate binocular target data based on the binocular target background representation data and the binocular adjusted data (for example, generate target data corresponding to the left eye based on the target background representation data corresponding to the left eye and the adjusted data corresponding to the left eye, and generate target data corresponding to the right eye based on the target background representation data corresponding to the right eye and the adjusted data corresponding to the right eye). The target data corresponding to the left eye is used to describe the state of the target object within the target background from the perspective of the left eye; the target data corresponding to the right eye is used to describe the state of the target object within the target background from the perspective of the right eye.
[0239] It should be noted that for steps 81 to 84 above, the data corresponding to the left eye and the data corresponding to the right eye can be determined using the data processing process shown in S1 to S4 above for the data. For the sake of brevity, they will not be repeated here.
[0240] Based on the relevant contents of steps 81 to 84 above, it can be known that for binocular scenes, after obtaining the binocular VR image data, the VR image data of the left eye can be processed to obtain a series of data corresponding to the left eye (for example, target background representation data, adjusted data, target data), and the VR image data of the right eye can be processed to obtain a series of data corresponding to the right eye (for example, target background representation data, adjusted data, target data), so that the final generated binocular target data can be determined based on these data, so that the binocular target data can represent the state of the target object under the target background under the binocular perspective, thereby realizing background replacement processing and object relighting processing in the binocular scene.
[0241] Based on the data generation method provided in the embodiments of the present disclosure, the embodiments of the present disclosure also provide a data generation device, which is explained and illustrated below in conjunction with Figure 3. Figure 3 is a schematic diagram of the structure of a data generation device provided in the embodiments of the present disclosure. It should be noted that for the technical details of the data generation device provided in the embodiments of the present disclosure, please refer to the relevant content of the data generation method above.
[0242] As shown in FIG3 , the data generation device 300 provided in an embodiment of the present disclosure includes:
[0243] The information acquisition unit 301 is configured to acquire a target environment map and data to be processed; the data to be processed includes at least one image data; the data to be processed is used to describe the state of the target object in the original background;
[0244] The background generation unit 302 is configured to generate target background representation data corresponding to the data to be processed using the target environment map; the target background described by the target background representation data is different from the original background;
[0245] The object relighting unit 303 is configured to perform brightness adjustment processing on the target object in the to-be-processed data according to the target environment map to obtain adjusted data; the brightness state of the target object in the adjusted data is different from the brightness state of the target object in the to-be-processed data;
[0246] The data generation unit 304 is configured to generate target data based on the target background characterization data and the adjusted data; the target data is used to describe the state of the target object under the target background; the brightness state of the target object in the target data is consistent with the brightness state of the target object in the adjusted data.
[0247] In a possible implementation, the object relighting unit 303 includes:
[0248] an information conversion subunit, configured to convert light information recorded in a target environment map into a light map;
[0249] The normal estimation subunit is configured to perform normal estimation processing on the data to be processed to obtain a normal estimation result;
[0250] The first determining subunit is configured to determine the adjusted data according to the normal estimation result, the data to be processed, and the light map.
[0251] In one possible implementation manner, the first determining subunit includes:
[0252] A first determining subunit is configured to determine first light brightness representation information from the light map based on the normal estimation result;
[0253] The first adjustment subunit is configured to perform brightness adjustment processing on the data to be processed according to the first light brightness representation information to obtain a first adjustment result;
[0254] The second determining subunit is configured to determine adjusted data according to the first adjustment result.
[0255] In a possible implementation manner, the data generating device 300 further includes:
[0256] A position determination unit is configured to perform object position determination processing on the data to be processed to obtain object position representation data;
[0257] The second determining subunit is specifically configured to determine the adjusted data according to the object position representation data and the first adjustment result, so that the adjusted data records the adjusted brightness corresponding to the target object.
[0258] In one possible implementation, the adjusted data is virtual reality (VR) image data; the data to be processed is image data converted from the original VR image data;
[0259] The second determining subunit is specifically configured to: convert the first adjustment result into first VR image data; convert the object position representation data into second VR image data; and determine the adjusted data based on the first VR image data and the second VR image data.
[0260] In a possible implementation manner, the data generating device 300 further includes:
[0261] A position determination unit is configured to perform object position determination processing on the data to be processed to obtain object position representation data;
[0262] The first determining subunit is specifically configured to determine the adjusted data according to the object position representation data, the normal estimation result, the data to be processed, and the light map.
[0263] In one possible implementation manner, the first determining subunit includes:
[0264] a first extraction subunit, configured to extract object representation data from the data to be processed according to the object position representation data;
[0265] a second extraction subunit, configured to extract an object normal result from the normal estimation result according to the object position representation data;
[0266] The third determining subunit is configured to determine adjusted data according to the object normal result, the object representation data, and the light map.
[0267] In one possible implementation, the third determination subunit is specifically configured to: determine second light brightness representation information from the light map based on the object normal result; perform brightness adjustment processing on the object representation data based on the second light brightness representation information to obtain a second adjustment result; and determine the adjusted data based on the second adjustment result.
[0268] In one possible implementation, the data to be processed, the object position representation data, and the normal estimation result are all image sequences;
[0269] The data generating device 300 further includes:
[0270] a first smoothing unit configured to smooth adjacent frames in the object position representation data using a preset smoothing algorithm;
[0271] and / or,
[0272] The second smoothing unit is configured to use a preset smoothing algorithm to smooth adjacent frames in the normal estimation result.
[0273] In one possible implementation, the data to be processed is data converted from original VR image data;
[0274] The information acquisition unit 301 includes:
[0275] The object detection subunit is configured to perform object detection processing on the original VR image data to obtain an object detection result;
[0276] A region interception subunit is configured to perform object region interception processing on the original VR image data according to the object detection result to obtain region representation data;
[0277] The projection processing subunit is configured to perform projection dedistortion processing on the regional representation data to obtain data to be processed.
[0278] In one possible implementation, the target background representation data, the adjusted data, and the target data are all VR image data;
[0279] The data generating unit 304 is specifically configured to: fuse the target background representation data with the adjusted data to obtain target data.
[0280] In one possible implementation, the data to be processed is image data converted from original VR image data; the original VR image data is monocular panoramic image data, binocular panoramic image data, monocular semi-panoramic image data, or binocular semi-panoramic image data.
[0281] In one possible implementation, the target environment map is a high dynamic range imaging HDR environment map.
[0282] In one possible implementation, the information acquisition unit 301 is specifically configured to: receive a background change request triggered by a target user for original VR image data; the background change request carries a target environment map and original VR image data; and convert the original VR image data to obtain data to be processed.
[0283] Based on the relevant content of the above-mentioned data generating device 300, it can be known that for the data to be processed (for example, a VR image data or a VR video data) including at least one image data, after obtaining the target environment map (for example, an HDR environment map), the target environment map is first used to generate target background representation data corresponding to the data to be processed, so that the target background described by the target background representation data conforms to the scene presentation state (for example, the scene posture, the brightness state of the scene, etc.) in the target environment map, so that the target background described by the target background representation data is different from the original background appearing in the data to be processed, and based on the target environment map, the target object in the data to be processed is brightness adjusted to obtain adjusted data, so that the brightness state of the target object in the adjusted data conforms to the light distribution law recorded in the target environment map, so that the brightness state of the target object in the adjusted data is different from the brightness state of the target object in the data to be processed; then, based on the target background representation data and the adjusted data, target data is generated, so that the brightness state of the target object in the target data is consistent with the brightness state of the target object in the adjusted data. Among them, because the brightness state of the target object in the target data and the brightness state of the background in the target data both conform to the light distribution law recorded in the target environment map, the brightness state of the target object in the target data and the brightness state of the background in the target data are relatively coordinated (for example, the brightness transition is relatively natural), so that the target data can more naturally describe the state of the target object under the target background (for example, the light brightness state), so as to achieve the purpose of background replacement under the premise of ensuring that the object and the background light are coordinated, so as to overcome the adverse effects caused by the inability of VR image data to meet the background requirements of some application scenarios.
[0284] In addition, an embodiment of the present disclosure also provides an electronic device, which includes a processor and a memory: the memory is configured to store instructions or computer programs; the processor is configured to execute the instructions or computer programs in the memory, so that the electronic device executes any implementation of the data generation method provided in the embodiment of the present disclosure.
[0285] Referring to FIG4 , a schematic diagram of the structure of an electronic device 400 suitable for implementing embodiments of the present disclosure is shown. Terminal devices in embodiments of the present disclosure may include, but are not limited to, mobile terminals such as mobile phones, laptop computers, digital broadcast receivers, PDAs (personal digital assistants), PADs (tablet computers), PMPs (portable multimedia players), in-vehicle terminals (e.g., in-vehicle navigation terminals), and fixed terminals such as digital TVs and desktop computers. The electronic device shown in FIG4 is merely an example and should not limit the functionality or scope of use of embodiments of the present disclosure.
[0286] As shown in Figure 4, electronic device 400 may include a processing device (e.g., a central processing unit, a graphics processing unit, etc.) 401, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 402 or a program loaded from a storage device 408 into a random access memory (RAM) 403. Various programs and data required for the operation of electronic device 400 are also stored in RAM 403. Processing device 401, ROM 402, and RAM 403 are connected to each other via a bus 404. An input / output (I / O) interface 405 is also connected to bus 404.
[0287] Typically, the following devices may be connected to the I / O interface 405: an input device 406 including, for example, a touch screen, a touchpad, a keyboard, a mouse, a camera, a microphone, an accelerometer, a gyroscope, etc.; an output device 407 including, for example, a liquid crystal display (LCD), a speaker, a vibrator, etc.; a storage device 408 including, for example, a magnetic tape, a hard disk, etc.; and a communication device 409. The communication device 409 may allow the electronic device 400 to communicate with other devices wirelessly or by wire to exchange data. Although FIG4 shows the electronic device 400 with various devices, it should be understood that not all of the devices shown are required to be implemented or present. More or fewer devices may alternatively be implemented or present.
[0288] In particular, according to an embodiment of the present disclosure, the process described above with reference to the flowchart can be implemented as a computer software program. For example, an embodiment of the present disclosure includes a computer program product, which includes a computer program carried on a non-transitory computer-readable medium, and the computer program includes a program code for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from the network through the communication device 409, or installed from the storage device 408, or installed from the ROM 402. When the computer program is executed by the processing device 401, the above-mentioned functions defined in the method of the embodiment of the present disclosure are performed.
[0289] The electronic device provided by the embodiment of the present disclosure and the method provided by the above embodiment belong to the same inventive concept. For technical details not fully described in this embodiment, please refer to the above embodiment, and this embodiment has the same beneficial effects as the above embodiment.
[0290] The embodiments of the present disclosure further provide a computer-readable medium, in which instructions or computer programs are stored. When the instructions or computer programs are executed on a device, the device executes any implementation of the data generation method provided in the embodiments of the present disclosure.
[0291] It should be noted that the computer-readable medium mentioned above in the present disclosure may be a computer-readable signal medium or a computer-readable storage medium, or any combination of the two. A computer-readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device, or component, or any combination of the above. More specific examples of computer-readable storage media may include, but are not limited to: an electrical connection with one or more wires, 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), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In the present disclosure, a computer-readable storage medium may be any tangible medium that contains or stores a program that can be used by or in conjunction with an instruction execution system, device, or component. In the present disclosure, a computer-readable signal medium may include a data signal propagated in baseband or as part of a carrier wave, which carries computer-readable program code. Such a propagated data signal may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. A computer-readable signal medium may also be any computer-readable medium other than a computer-readable storage medium that can transmit, propagate, or transport a program for use by or in conjunction with an instruction execution system, apparatus, or device. The program code contained on the computer-readable medium may be transmitted using any suitable medium, including but not limited to wires, optical cables, RF (radio frequency), etc., or any suitable combination thereof.
[0292] In some embodiments, the client and server can communicate using any currently known or later developed network protocol, such as HTTP (Hypertext Transfer Protocol), and can be interconnected with any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include a local area network ("LAN"), a wide area network ("WAN"), an internet (e.g., the Internet), and a peer-to-peer network (e.g., an ad hoc peer-to-peer network), as well as any currently known or later developed network.
[0293] The computer-readable medium may be included in the electronic device, or may exist independently without being incorporated into the electronic device.
[0294] The computer-readable medium carries one or more programs. When the one or more programs are executed by the electronic device, the electronic device can perform the method.
[0295] Computer program code for performing the operations of the present disclosure may be written in one or more programming languages, or a combination thereof, including, but not limited to, object-oriented programming languages such as Java, Smalltalk, C++, and conventional procedural programming languages such as "C" or similar programming languages. The program code may be executed entirely on the user's computer, partially on the user's computer, as a stand-alone software package, partially on the user's computer and partially on a remote computer, or entirely on the remote computer or server. In cases involving a remote computer, the remote computer may be connected to the user's computer through 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., through the Internet using an Internet service provider).
[0296] The flowcharts and block diagrams in the accompanying drawings illustrate the possible implementation architecture, functions and operations of the systems, methods and computer program products according to various embodiments of the present disclosure. In this regard, each box in the flowchart or block diagram can represent a module, program segment, or a part of code, and the module, program segment, or a part of code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the box can also occur in a different order than that marked in the accompanying drawings. For example, two boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram and / or flowchart, and the combination of the boxes in the block diagram and / or flowchart, can be implemented with a dedicated hardware-based system that performs the specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.
[0297] The units involved in the embodiments described in this disclosure may be implemented in software or hardware, wherein the name of a unit / module does not, in some cases, limit the unit itself.
[0298] The functions described above herein may be performed, at least in part, by one or more hardware logic components. For example, and without limitation, exemplary types of hardware logic components that may be used include: field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on chip (SOCs), complex programmable logic devices (CPLDs), and the like.
[0299] In the context of the present disclosure, a machine-readable medium can be a tangible medium that can contain or store a program for use by or in conjunction with an instruction execution system, device or equipment. A machine-readable medium can be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium can include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or equipment, or any suitable combination of the foregoing. A more specific example of a machine-readable storage medium can include an electrical connection based on one or more lines, 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), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
[0300] It should be noted that the various embodiments in this specification are described in a progressive manner, with each embodiment focusing on the differences from other embodiments. Reference can be made to the common and similar parts between the various embodiments. For the systems or devices disclosed in the embodiments, since they correspond to the methods disclosed in the embodiments, the description is relatively simple, and the relevant parts can be referred to the method description.
[0301] It should be understood that in the present disclosure, "at least one (item)" refers to one or more, and "plurality" refers to two or more. "And / or" is used to describe the association relationship of associated objects, indicating that three relationships may exist. For example, "A and / or B" can mean: only A exists, only B exists, and A and B exist at the same time, 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, "a and b", "a and c", "b and c", or "a and b and c", where a, b, c can be single or multiple.
[0302] It should also be noted that, in this document, relational terms such as first and second, etc., are used only to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "comprises," "comprising," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or device comprising a series of elements includes not only those elements, but also other elements not explicitly listed, or elements inherent to such process, method, article, or device. In the absence of further limitations, an element defined by the phrase "comprising a ..." does not exclude the presence of additional identical elements in the process, method, article, or device comprising the element.
[0303] The steps of the methods or algorithms described in conjunction with the embodiments disclosed herein may be implemented directly using hardware, a software module executed by a processor, or a combination of the two. The software module may be placed in a random access memory (RAM), internal memory, read-only memory (ROM), electrically programmable ROM, electrically erasable programmable ROM, registers, a hard disk, a removable disk, a CD-ROM, or any other form of storage medium known in the art.
[0304] The above description of the disclosed embodiments is intended to enable one skilled in the art to implement or use the present disclosure. Various modifications to these embodiments will be readily apparent to one skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the present disclosure. Therefore, the present disclosure is not limited to the embodiments shown herein, but is intended to be construed in the widest manner consistent with the principles and novel features disclosed herein.
Claims
1. A data generation method, include: Acquire a target environment map and data to be processed, wherein the data to be processed includes at least one image data, and the data to be processed is used to describe the state of the target object in the original background; Using the target environment map, generating target background representation data corresponding to the data to be processed, wherein the target background described by the target background representation data is different from the original background; According to the target environment map, a brightness adjustment process is performed on the target object in the data to be processed to obtain adjusted data, wherein the brightness state of the target object in the adjusted data is different from the brightness state of the target object in the data to be processed; Target data is generated according to the target background characterization data and the adjusted data, wherein the target data is used to describe the state of the target object under the target background, and the brightness state of the target object in the target data is consistent with the brightness state of the target object in the adjusted data.
2. The method according to claim 1, in, The step of performing brightness adjustment processing on the target object in the data to be processed according to the target environment map to obtain adjusted data includes: Converting the light information recorded in the target environment map into a light map; Performing normal estimation processing on the data to be processed to obtain a normal estimation result; The adjusted data is determined according to the normal estimation result, the data to be processed, and the light map.
3. The method according to claim 2, in, The step of determining the adjusted data according to the normal estimation result, the data to be processed, and the light map includes: Determining first light brightness representation information from the light map according to the normal estimation result; According to the first light brightness representation information, brightness adjustment processing is performed on the data to be processed to obtain a first adjustment result; The adjusted data is determined according to the first adjustment result.
4. The method according to claim 3, in, Before determining the adjusted data according to the first adjustment result, the method further includes: Performing object position determination processing on the data to be processed to obtain object position representation data; The determining the adjusted data according to the first adjustment result includes: The adjusted data is determined according to the object position representation data and the first adjustment result, so that the adjusted brightness corresponding to the target object is recorded in the adjusted data.
5. The method according to claim 4, in, The adjusted data belongs to virtual reality VR image data; the data to be processed is image data converted from the original VR image data; The step of determining the adjusted data according to the object position representation data and the first adjustment result includes: Converting the first adjustment result into first VR image data; converting the object position representation data into second VR image data; The adjusted data is determined according to the first VR image data and the second VR image data.
6. The method according to claim 2, in, Before determining the adjusted data according to the normal estimation result, the data to be processed and the light map, the method further includes: Performing object position determination processing on the data to be processed to obtain object position representation data; The step of determining the adjusted data according to the normal estimation result, the data to be processed, and the light map includes: The adjusted data is determined according to the object position representation data, the normal estimation result, the data to be processed, and the light map.
7. The method according to claim 6, in, The step of determining the adjusted data according to the object position representation data, the normal estimation result, the data to be processed, and the light map includes: Extracting object representation data from the data to be processed according to the object position representation data; extracting an object normal result from the normal estimation result according to the object position characterization data; The adjusted data is determined according to the object normal result, the object representation data, and the light map.
8. The method according to claim 7, in, The determining the adjusted data according to the object normal result, the object representation data and the light map comprises: Determining second light brightness representation information from the light map according to the object normal result; According to the second light brightness representation information, performing brightness adjustment processing on the object representation data to obtain a second adjustment result; The adjusted data is determined according to the second adjustment result.
9. The method according to claim 4 or 6, in, The data to be processed, the object position representation data, and the normal estimation result are all image sequences; The method further comprises: Using a preset smoothing algorithm, smoothing adjacent frames in the object position representation data; and / or, Adjacent frames in the normal estimation result are smoothed using a preset smoothing algorithm.
10. The method according to claim 1, in, The data to be processed is data converted from original VR image data; The process of obtaining the data to be processed includes: Performing object detection processing on the original VR image data to obtain an object detection result; According to the object detection result, the original VR image data is subjected to object region interception processing to obtain region representation data; Projection dedistortion processing is performed on the region representation data to obtain the data to be processed.
11. The method according to claim 1, in, The target background representation data, the adjusted data, and the target data are all VR image data; The generating target data according to the target background characterization data and the adjusted data includes: The target background representation data and the adjusted data are fused to obtain the target data.
12. The method according to claim 1, in, The data to be processed is image data converted from original VR image data; The original VR image data is monocular panoramic image data, binocular panoramic image data, monocular semi-panoramic image data or binocular semi-panoramic image data.
13. The method according to claim 1, in, The target environment map is a high dynamic range imaging HDR environment map.
14. The method according to claim 1, in, The step of obtaining the target environment map and the data to be processed includes: receiving a background replacement request triggered by a target user for original VR image data, wherein the background replacement request carries the target environment map and the original VR image data; The original VR image data is transformed to obtain the data to be processed.
15. A data generating device, include: An information acquisition unit is configured to acquire a target environment map and data to be processed, wherein the data to be processed includes at least one image data, and the data to be processed is used to describe the state of the target object in the original background; A background generating unit is configured to generate target background representation data corresponding to the data to be processed using the target environment map, wherein the target background described by the target background representation data is different from the original background; an object relighting unit, configured to perform brightness adjustment processing on the target object in the data to be processed according to the target environment map to obtain adjusted data, wherein the brightness state of the target object in the adjusted data is different from the brightness state of the target object in the data to be processed; and A data generating unit is configured to generate target data according to the target background characterization data and the adjusted data, wherein the target data is used to describe the state of the target object under the target background; and the brightness state of the target object in the target data is consistent with the brightness state of the target object in the adjusted data.
16. An electronic device, include: a memory configured to store instructions or computer programs; as well as A processor is configured to execute the instructions or computer programs in the memory so that the electronic device performs the method according to any one of claims 1 to 14.
17. A computer readable medium, in, The computer-readable medium stores instructions or computer programs, and when the instructions or computer programs are executed on a device, the device executes the method according to any one of claims 1 to 14.
Citation Information
Patent Citations
Illumination effect processing method and device, electronic equipment and storage medium
CN109887066A
Image processing method, image processing device and mobile terminal
CN110113534A
Image generation method and device, electronic equipment and storage medium
CN115082639A
