Skip to main content
Log in

Image copy-and-paste with optimized gradient

  • Original Article
  • Published:
The Visual Computer Aims and scope Submit manuscript

    We’re sorry, something doesn't seem to be working properly.

    Please try refreshing the page. If that doesn't work, please contact support so we can address the problem.

Abstract

This paper presents a novel approach to image copy-and-paste with optimized gradient. We improve the traditional gradient domain cloning by creating smooth transition from source patches to target images. We first specify a source patch and select its foreground region by strokes. Next, we create a gradient transition map in the cloning area. Finally, we reconstruct the gradient of the source patch according to the gradient transition map, and propose an interpolation based method to efficiently calculate the composition results, which avoids solving a large linear system. Experimental results demonstrate the effectiveness of our method, which can produce more natural and satisfying results.

This is a preview of subscription content, log in via an institution to check access.

Access this article

Price excludes VAT (USA)
Tax calculation will be finalised during checkout.

Instant access to the full article PDF.

Fig. 1
Fig. 2
Fig. 3
Fig. 4
Fig. 5
Fig. 6
Fig. 7

Similar content being viewed by others

References

  1. Barnes, C., Shechtman, E., Finkelstein, A., Goldman, D.B.: Patchmatch: a randomized correspondence algorithm for structural image editing. ACM Trans. Graph. 28(3), 24:1–24:11 (2009)

    Google Scholar 

  2. Bie, X., Wang, W., Sun, H., Huang, H., Zhang, M.: Intent-aware image cloning. Vis. Comput. 29(6–8), 599–608 (2013)

    Article  Google Scholar 

  3. Bie, X.H., Huang, H.D., Wang, W.C.: Free appearance-editing with improved poisson image cloning. J. Comput. Sci. Technol. 26(6), 1011–1016 (2011)

    Article  MATH  Google Scholar 

  4. Chen, T., Cheng, M.M., Tan, P., Shamir, A., Hu, S.M.: Sketch2photo: internet image montage. ACM Trans. Graph. 28(5), 124:1–124:10 (2009)

    Google Scholar 

  5. Chen, T., Tan, P., Ma, L.Q., Cheng, M.M., Shamir, A., Hu, S.M.: Poseshop: human image database construction and personalized content synthesis. IEEE Trans. Vis. Comput. Graph. 19(5), 824–837 (2013)

    Article  Google Scholar 

  6. Cheng, M.M., Zhang, G.X., Mitra, N.J., Huang, X., Hu, S.M.: Global contrast based salient region detection. In: IEEE Conference on Computer Vision and Pattern Recognition, pp. 409–416 (2011)

  7. Comaniciu, D., Meer, P.: Mean shift: a robust approach toward feature space analysis. IEEE Trans. Pattern Anal. Mach. Intell. 24(5), 603–619 (2002)

    Article  Google Scholar 

  8. Corporation, A.: Photoshop. http://helpx.adobe.com/photoshop.html (2012)

  9. Darabi, S., Shechtman, E., Barnes, C., Goldman, D.B., Sen, P.: Image melding: combining inconsistent images using patch-based synthesis. ACM Trans. Graph. 31(4), 82:1–82:10 (2012)

    Google Scholar 

  10. Ding, M., Tong, R.F.: Content-aware copying and pasting in images. Vis. Comput. 26(6–8), 721–729 (2010)

    Article  Google Scholar 

  11. Du, H., Jin, X.: Object cloning using constrained mean value interpolation. Vis. Comput. 29(3), 217–229 (2013)

    Article  Google Scholar 

  12. Farbman, Z., Hoffer, G., Lipman, Y., Cohen-Or, D., Lischinski, D.: Coordinates for instant image cloning. ACM Trans. Graph. 28(3), 67:1–67:9 (2009)

    Google Scholar 

  13. Gastal, E.S.L., Oliveira, M.M.: Shared sampling for real-time alpha matting. Comput. Graphics Forum. 29(2), 575–584 (2010)

    Google Scholar 

  14. He, K., Rhemann, C., Rother, C., Tang, X., Sun, J.: A global sampling method for alpha matting. In: IEEE Conference on Computer Vision and Pattern Recognition, pp. 2049–2056 (2011)

  15. He, K., Sun, J., Tang, X.: Fast matting using large kernel matting laplacian matrices. In: IEEE Conference on Computer Vision and Pattern Recognition, pp. 2165–2172 (2010)

  16. Hu, S.M., Chen, T., Xu, K., Cheng, M.M., Martin, R.R.: Internet visual media processing: a survey with graphics and vision applications. The Vis. Comput. 29(5), 393–405 (2013)

    Google Scholar 

  17. Jia, J., Sun, J., Tang, C.K., Shum, H.Y.: Drag-and-drop pasting. ACM Trans. Graph. 25(3), 631–637 (2006)

    Google Scholar 

  18. Kolmogorov, V., Zabih, R.: What energy functions can be minimized via graph cuts. IEEE Trans. Pattern Anal. Mach. Intell. 26(2), 147–159 (2004)

    Article  Google Scholar 

  19. Lalonde, J.F., Hoiem, D., Efros, A.A., Rother, C., Winn, J.M., Criminisi, A.: Photo clip art. ACM Trans. Graph. 26(3), 3:1–3:10 (2007)

    Google Scholar 

  20. Levin, A., Lischinski, D., Weiss, Y.: A closed-form solution to natural image matting. IEEE Trans. Pattern Anal. Mach. Intell. 30(2), 228–242 (2008)

    Article  Google Scholar 

  21. Liu, J., Sun, J., Shum, H.Y.: Paint selection. ACM Trans. Graph. 28(3), 69:1–7 (2009)

    Google Scholar 

  22. Pérez, P., Gangnet, M., Blake, A.: Poisson image editing. ACM Trans. Graph. 22(3), 313–318 (2003)

    Article  Google Scholar 

  23. Rother, C., Kolmogorov, V., Blake, A.: “grabcut”: interactive foreground extraction using iterated graph cuts. ACM Trans. Graph. 23(3), 309–314 (2004)

    Article  Google Scholar 

  24. Sun, X., Xie, G., Dong, Y., Lin, S., Xu, W., Wang, W., Tong, X., Guo, B.: Diffusion curve textures for resolution independent texture mapping. ACM Trans. Graph. 31(4), 74 (2012)

    Article  Google Scholar 

  25. Tong, R., Zhang, Y., Cheng, K.L.: Stereopasting: interactive composition in stereoscopic images. IEEE Trans. Vis. Comput. Graph. 19(8), 1375–1385 (2013)

    Article  Google Scholar 

  26. Wang, J., Cohen, M.F.: Optimized color sampling for robust matting. In: IEEE Conference on Computer Vision and Pattern Recognition (2007)

  27. Wang, R., Chen, W., Pan, M., Bao, H.: Harmonic coordinates for real-time image cloning. J. Zhejiang Univ. Sci. C. 11(9), 690–698 (2010)

    Article  Google Scholar 

  28. Xie, Z., Shen, Y., Ma, L., Chen, Z.: Seamless video composition using optimized mean-value cloning. Vis. Comput. 26(6–8), 1123–1134 (2010)

    Article  Google Scholar 

  29. Xue, S., Agarwala, A., Dorsey, J., Rushmeier, H.E.: Understanding and improving the realism of image composites. ACM Trans. Graph. 31(4), 84:1–84:10 (2012)

    Google Scholar 

  30. Yang, W., Zheng, J., Cai, J., Rahardja, S., Chen, C.W.: Natural and seamless image composition with color control. IEEE Tran. Image Process. 18(11), 2584–2592 (2009)

    Article  MathSciNet  Google Scholar 

  31. Zhang, F.L., Cheng, M.M., Jia, J., Hu, S.M.: Imageadmixture: putting together dissimilar objects from groups. IEEE Trans. Vis. Comput. Graph. 18(11), 1849–1857 (2012)

    Article  Google Scholar 

  32. Zhang, Y., Tong, R.: Environment-sensitive cloning in images. Vis. Comput. 27(6–8), 739–748 (2011)

    Article  Google Scholar 

Download references

Acknowledgments

We thank all anonymous reviewers for their valuable comments. This work was supported by National Basic Research Program of China (No. 2011CB302205), National High-Tech Research and Development Program of China (No. 2013AA013903), Zhejiang Provincial Natural Science Foundation of China (No. LY13F020036) and (No. LY12F02032).

Author information

Authors and Affiliations

Authors

Corresponding author

Correspondence to Yun Zhang.

Rights and permissions

Reprints and permissions

About this article

Cite this article

Zhang, Y., Ling, J., Zhang, X. et al. Image copy-and-paste with optimized gradient. Vis Comput 30, 1169–1178 (2014). https://doi.org/10.1007/s00371-013-0897-y

Download citation

  • Published:

  • Issue Date:

  • DOI: https://doi.org/10.1007/s00371-013-0897-y

Keywords

Navigation