In the field of computer vision,images are one of the most common core data,including a lot of visual information.In the application of images,it is often putting the characters in various landscape images,the image needs to be edited and synthesized.In a composite image,the foreground and background are filmed under different scenarios,such as different lighting conditions,causing inconsistency and reducing the overall realism of the image.In order to solve the color and light inharmony problem between the foreground and the background of the composite image,image harmonization technology is proposed.Image harmonization is an important problem in the field of computer vision,aims to generate visually realistic composite images by adjusting the foreground to the background style or domain while maintaining the structure,and enhance the authenticity of the image.It can be applied in many fields,such as image enhancement and image style transformation.Existing methods focus on adjusting the foreground object by directly training the foreground generation network,on the other hand,according to the definition of image harmonization,adjusting the background to generate harmonious images also conforms to the prospects.The factor that directly training image neglecting the different roles of the illumination and structure of the foreground in image harmonization.However,changing the foreground style may affect the structural information,which violates the original intention of the image harmonization.Due to the lack of paired data for supervised training,methods for adjusting background according to foreground get few focus on the background harmonization problem.In order to solve these problems,based on Cycle generative adversarial network,this paper has focused on the two tasks of the foreground and background harmonization in image harmonization.The main content is as follows:First,this paper proposes a framework based on CycleGAN for image harmonization,instead of ambiguously changing the foreground,it explores the illumination and structure of both the foreground and background.Background information is explored to assist in decomposing the illumination and structure of the foreground.Second,an illumination-consistent foreground harmonization cycle is developed to change the foreground illumination,while a structure-preserving cycle is designed to keep the foreground structure.Experimental results demonstrate that our method achieves better harmonious image quality than state-of-the-art methods,especially on an illumination-varying dataset.Third,this paper designs a background harmonization architecture under unpaired data supervision,which uses the foreground of composite images to change the background.The discriminator makes the foreground and background of the image in same domain,and makes the structure of the background is unchanged by constructing the cycle between backgrounds.The generated visual result images further show the feasibility of this method.Fourth,this paper proposes a real image dataset ICOCO based on the COCO2014 dataset.for improving the distinguish ability between real and fake data of the discriminator.In summary,this paper has proposed the structure-preserving and illumination-consistent cycle for the inadequate learning of illumination in the foreground image harmonization.And has proposed the unsupervised training models for lacking of supervision data in background image harmonization.Experiments demonstrate that our model improves the quality and accuracy of harmonized image. |