Search

CN-116128777-B - Image synthesis method, device, equipment and medium

CN116128777BCN 116128777 BCN116128777 BCN 116128777BCN-116128777-B

Abstract

The embodiment of the specification provides an image synthesis method, an image synthesis device and an image synthesis medium. The image synthesis method comprises the steps of decomposing a background image to obtain a plurality of background intrinsic images and background illumination information, wherein each background intrinsic image corresponds to one intrinsic image type, decomposing a foreground image to obtain a plurality of foreground intrinsic images corresponding to the intrinsic image type, respectively fusing the background intrinsic images and the foreground intrinsic images corresponding to the same intrinsic image type to obtain a plurality of fused intrinsic images, and synthesizing an image according to the fused intrinsic images and the background illumination information. The synthesized image has better visual effect.

Inventors

  • WANG CHUN
  • ZHOU XUNYI
  • JIANG NING

Assignees

  • 马上消费金融股份有限公司

Dates

Publication Date
20260512
Application Date
20220927

Claims (10)

  1. 1. An image synthesizing method, characterized by comprising: Decomposing a background image to obtain a plurality of background eigen images and background illumination information, wherein each background eigen image corresponds to one eigen image category, and the eigen image category comprises a distance depth image category, an albedo image category and a normal image category; Decomposing the foreground image to obtain a plurality of foreground eigen images corresponding to the eigen image types; Respectively fusing the background eigenvectors and the foreground eigenvectors corresponding to the same eigenvector class to obtain a plurality of fused eigenvectors; And synthesizing an image according to the plurality of fusion eigen graphs and the background illumination information.
  2. 2. The method according to claim 1, wherein the fusion of the background eigenmap and the foreground eigenmap corresponding to the same eigenimage class is performed by: and fusing the foreground intrinsic images corresponding to the same intrinsic image category to the same target area of the background intrinsic image to obtain a fused intrinsic image.
  3. 3. The method of claim 2, wherein prior to fusing the background eigenmap and the foreground eigenmap, respectively, corresponding to the same eigenimage class to obtain a plurality of fused eigenmaps, further comprising: Each foreground eigenmap is respectively subjected to the same transformation operation, wherein the transformation operation comprises scaling and/or position transformation.
  4. 4. The method of claim 2, wherein the background eigenmap comprises a background distance depth map and the foreground eigenmap comprises a foreground distance depth map, wherein the fused eigenmap comprises a fused distance depth map, wherein the fusing the foreground eigenmaps corresponding to the same eigenimage class to the same target area of the background eigenmap to obtain a fused eigenmap comprises: Extracting a distance depth subgraph of the target area in the background distance depth map; Determining a reference depth corresponding to the foreground distance depth map according to the distance depth subgraph; and fusing the foreground distance depth map to the target area of the background distance depth map based on the reference depth to obtain the fused distance depth map.
  5. 5. The method of claim 2, wherein the background eigenmap comprises a background albedo map, wherein the foreground eigenmap comprises a foreground albedo map, wherein the fused eigenmap comprises a fused albedo map, wherein fusing foreground eigenmaps corresponding to the same eigenimage class to the same target region of the background eigenmap to obtain a fused eigenmap comprises: And fusing the front Jing Fanzhao rate map to the target area of the background albedo map to obtain the fused albedo map.
  6. 6. The method of claim 2, wherein the background eigenmap comprises a background normal map, wherein the foreground eigenmap comprises a foreground normal map, wherein the fused eigenmap comprises a fused eigenmap, wherein fusing foreground eigenmaps corresponding to the same eigenimage class to the same target area of the background eigenmap to obtain a fused eigenmap comprises: and fusing the foreground normal line graph to the target area of the background normal line graph to obtain the fused normal line graph.
  7. 7. The method of claim 1, wherein the foreground image comprises a three-dimensional foreground image, decomposing the foreground image into a plurality of foreground eigen-maps corresponding to the eigen-image class, comprising: Determining a target viewing angle of the three-dimensional foreground image relative to the background image, wherein the target viewing angle represents a viewing angle at which the three-dimensional foreground image can be observed after placing an object represented by the three-dimensional foreground image in a space represented by the background image; Rendering the three-dimensional foreground image with the target view angle corresponding to the intrinsic image class to generate a plurality of foreground intrinsic images.
  8. 8. An image synthesizing apparatus, comprising: The background decomposition unit is used for decomposing a background image to obtain a plurality of background eigen images and background illumination information, wherein each background eigen image corresponds to one eigen image category which comprises a distance depth image category, an albedo image category and a normal image category; the construction unit is used for decomposing the foreground image to obtain a plurality of foreground intrinsic images corresponding to the intrinsic image types; the fusion unit is used for respectively fusing the background intrinsic images and the foreground intrinsic images corresponding to the same intrinsic image category to obtain a plurality of fused intrinsic images; and the synthesis unit is used for synthesizing an image according to the plurality of fusion eigen diagrams and the background illumination information.
  9. 9. An electronic device, the electronic device comprising: a memory, and one or more processors communicatively coupled to the memory; Stored in the memory are instructions executable by the one or more processors to cause the one or more processors to implement the method of any one of claims 1 to 7.
  10. 10. A computer storage medium storing a computer program which, when executed by a processor, implements the method of any one of the preceding claims 1 to 7.

Description

Image synthesis method, device, equipment and medium Technical Field The embodiment in the specification relates to the technical field of image processing, in particular to an image synthesis method, an image synthesis device and an image synthesis medium. Background Currently, in the field of image processing, it is involved to process two or more images to synthesize a new image. Specifically, for example, an image a may have a tree, and an image B may have a grassland. It may be necessary to put this tree in image a as a foreground object into the B image, resulting in a composite image. Therefore, in the related art, a final image is generally synthesized by putting a foreground image in a specified position of a background image and performing adaptive editing. However, the visual effect between the foreground and background images of the final image resulting from this way of image synthesis is often not sufficiently harmonious. Disclosure of Invention Various embodiments in the present specification provide an image synthesis method, apparatus, device, and medium. A composite image with a better visual effect can be generated. An embodiment of the specification provides an image synthesis method, which comprises the steps of decomposing a background image to obtain a plurality of background eigen images and background illumination information, wherein each background eigen image corresponds to one eigen image category, decomposing a foreground image to obtain a plurality of foreground eigen images corresponding to the eigen image category, respectively fusing the background eigen images and the foreground eigen images corresponding to the same eigen image category to obtain a plurality of fused eigen images, and synthesizing an image according to the fused eigen images and the background illumination information. One embodiment of the specification provides an image synthesis device which comprises a background decomposition unit, a construction unit, a fusion unit and a synthesis unit, wherein the background decomposition unit is used for decomposing a background image to obtain a plurality of background eigen images and background illumination information, each background eigen image corresponds to one eigen image category, the construction unit is used for corresponding to the eigen image category, decomposing a foreground image to obtain a plurality of foreground eigen images, the fusion unit is used for respectively fusing the background eigen images and the foreground eigen images corresponding to the same eigen image category to obtain a plurality of fused eigen images, and the synthesis unit is used for synthesizing an image according to the fused eigen images and the background illumination information. An embodiment of the present specification provides an electronic device comprising a memory and one or more processors communicatively coupled to the memory, the memory having stored therein instructions executable by the one or more processors to cause the one or more processors to implement the method of any of the previous embodiments. An embodiment of the present specification provides a computer storage medium storing a computer program which, when executed by a processor, implements a method according to any of the preceding embodiments. According to the embodiments, the background intrinsic image of the background image and the foreground intrinsic image of the foreground image are respectively fused, and then the fused intrinsic image obtained by fusion is rendered according to background illumination information of the background image, so that a synthesized image is obtained. As the illumination information of the background image is uniformly adopted in the final synthesized image, the synthesized image has better consistency in light and shadow between the foreground and the background, so that the synthesized image is more harmonious in vision, and the visual effect of the synthesized image is improved. Drawings Fig. 1 is a schematic flow chart of an image synthesizing method according to an embodiment of the present disclosure. Fig. 2 is a schematic diagram of an image synthesis process according to an embodiment of the present disclosure. Fig. 3 is a schematic block diagram of an image synthesizing apparatus according to an embodiment of the present disclosure. Fig. 4 is a schematic diagram of an electronic device according to an embodiment of the present disclosure. Detailed Description Image composition may refer to combining two or more images into one image. Specifically, among the two or more images, there may be one image designated as a foreground image or one image designated as a background image. In the related art, a foreground image can be simply attached to a background image. At this time, the resulting synthesized image tends to be visually insufficiently harmonious. Specifically, for example, there is visual dissonance in colors, shadows, and the like of the f