Skip to main content
Log in

An improved image analogy method based on adaptive CUDA-accelerated neighborhood matching framework

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

Abstract

The image analogy framework is especially useful to synthesize appealing images for non-homogeneous input and gives users creative control over the synthesized results. However, the traditional framework did not adaptively employ the searching strategy based on neighborhood’s different textural contents. Besides, the synthesis speed is slow due to intensive computation involved in neighborhood matching. In this paper we present a CUDA-based neighborhood matching algorithm for image analogy. Our algorithm adaptively applies the global search of the exact L 2 nearest neighbor and k-coherence search strategies during synthesis according to different textural features of images, which is especially usefully for non-homogeneous textures. To consistently implement the above two search strategies on GPU, we adopt the fast k nearest neighbor searching algorithm based on CUDA. Such an acceleration greatly reduces the time of the pre-process of k-coherence search and the synthesis procedure of the global search, which makes possible the adjustment of important synthesis parameters. We further adopt synthesis magnification to get the final high-resolution synthesis image for running efficiency. Experimental results show that our algorithm is suitable for various applications of the image analogy framework and takes full advantage of GPU’s parallel processing capability to improve synthesis speed and get satisfactory synthesis 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
Algorithm 1
Fig. 2
Fig. 3
Fig. 4
Fig. 5
Fig. 6
Fig. 7
Fig. 8
Fig. 9
Fig. 10

Similar content being viewed by others

References

  1. Ashikhmin, M.: Synthesizing natural textures. In: Proceedings of the 2001 Symposium on Interactive 3D Graphics, pp. 217–226 (2001)

    Chapter  Google Scholar 

  2. Lu, J., Georghiades, A.S., Glaser, A., Wu, H., Wei, L.Y., Guo, B., Dorsey, J., Rushmeier, H.: Context-aware textures. ACM Trans. Graph. 26, 3 (2007)

    Article  Google Scholar 

  3. Hertzmann, A., Jacobs, C.E., Oliver, N., Curless, B., Salesin, D.H.: Image analogies. In: Proceedings of the 28th Annual Conference on Computer Graphics and Interactive Techniques, pp. 327–340 (2001)

    Google Scholar 

  4. Sivaks, E., Lischinski, D.: On neighbourhood matching for texture-by-numbers. Comput. Graph. Forum 30, 127–138 (2011)

    Article  Google Scholar 

  5. Wei, L.Y., Lefebvre, S., Kwatra, V., Turk, G.: State of the art in example-based texture synthesis. In: Eurographics, pp. 93–117 (2009)

    Google Scholar 

  6. Efros, A.A., Leung, T.K.: Texture synthesis by non-parametric sampling. In: The Proceedings of the Seventh IEEE International Conference on Computer Vision, vol. 2, pp. 1033–1038 (1999)

    Chapter  Google Scholar 

  7. Wei, L.Y., Levoy, M.: Fast texture synthesis using tree-structured vector quantization. In: Proceedings of the 27th Annual Conference on Computer Graphics and Interactive Techniques, pp. 479–488 (2000)

    Google Scholar 

  8. Efros, A.A., Freeman, W.T.: Image quilting for texture synthesis and transfer. In: Proceedings of SIGGRAPH, vol. 1, pp. 341–346 (2001)

    Google Scholar 

  9. Kwatra, V., Schodl, A., Essa, I., Turk, G., Bobick, A.: Graphcut textures: image and video synthesis using graph cuts. ACM Trans. Graph. 22, 277–286 (2003)

    Article  Google Scholar 

  10. Kwatra, V., Essa, I., Bobick, A., Kwatra, N.: Texture optimization for example-based synthesis. ACM Trans. Graph. 24, 795–802 (2005)

    Article  Google Scholar 

  11. Risser, E., Han, C., Dahyot, R., Grinspun, E.: Synthesizing structured image hybrids. ACM Trans. Graph. 29, 85 (2010)

    Article  Google Scholar 

  12. Zhang, F.L., Cheng, M.M., Jia, J., Hu, S.M.: ImageAdmixture: putting together dissimilar objects from groups. In: IEEE Transactions on Visualization and Computer Graphics (2012)

    Google Scholar 

  13. Ma, C., Wei, L.Y., Tong, X.: Discrete element textures. ACM Trans. Graph. 30, 62 (2011)

    Article  Google Scholar 

  14. Busto, P.P., Eisenacher, C., Lefebvre, S., Stamminger, M.: Instant texture synthesis by numbers. In: Vision, Modeling and Visualization 2010, pp. 81–85 (2010)

    Google Scholar 

  15. Bonneel, N., Van de Panne, M., Lefebvre, S., Drettakis, G.: Proxy-guided texture synthesis for rendering natural scenes. In: Proceedings of Vision Modeling and Visualization (2010)

    Google Scholar 

  16. Rosenberger, A., Cohen-Or, D., Lischinski, D.: Layered shape synthesis: automatic generation of control maps for non-stationary textures. ACM Trans. Graph. 28, 107 (2009)

    Article  Google Scholar 

  17. Wang, B., Wang, W., Yang, H., Sun, J.: Efficient example-based painting and synthesis of 2d directional texture. IEEE Trans. Vis. Comput. Graph. 10, 266–277 (2004)

    Article  Google Scholar 

  18. Ramanarayanan, G., Bala, K.: Constrained texture synthesis via energy minimization. IEEE Trans. Vis. Comput. Graph. 13, 167–178 (2007)

    Article  Google Scholar 

  19. Mount, D.M., Arya, S.: ANN: A library for approximate nearest neighbor searching. In: CGC 2nd Annual Fall Workshop on Computational Geometry (1997)

    Google Scholar 

  20. Muja, M., Lowe, D.G.: Fast approximate nearest neighbors with automatic algorithm configuration. In: International Conference on Computer Vision Theory and Applications, pp. 331–340 (2009)

    Google Scholar 

  21. Lefebvre, S., Hoppe, H.: Parallel controllable texture synthesis. ACM Trans. Graph. 24, 777–786 (2005)

    Article  Google Scholar 

  22. Xiao, C., Liu, M., Yongwei, N., Dong, Z.: Fast exact nearest patch match for patch-based image editing and processing. IEEE Trans. Vis. Comput. Graph. 17(8), 1122–1134 (2011)

    Article  Google Scholar 

  23. Xu, K., Li, Y., Ju, T., Hu, S.M., Liu, T.Q.: Efficient affinity-based edit propagation using kd tree. ACM Trans. Graph. 28, 118 (2009)

    Google Scholar 

  24. Garcia, V., Debreuve, E., Barlaud, M.: Fast k nearest neighbor search using GPU. In: IEEE Computer Society Conference on Computer Vision and Pattern Recognition Workshops, pp. 1–6 (2008)

    Chapter  Google Scholar 

  25. Tong, X., Zhang, J., Liu, L., Wang, X., Guo, B., Shum, H.Y.: Synthesis of bidirectional texture functions on arbitrary surfaces. ACM Trans. Graph. 21, 665–672 (2002)

    Article  Google Scholar 

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

    Article  Google Scholar 

  27. Schmid, J., Iglesias Guitián, J.A., Gobbetti, E., Magnenat-Thalmann, N.: A GPU framework for parallel segmentation of volumetric images using discrete deformable models. Vis. Comput. 27, 85–95 (2011)

    Article  Google Scholar 

  28. Lefebvre, S., Hoppe, H.: Appearance-space texture synthesis. ACM Trans. Graph. 25, 541–548 (2006)

    Article  Google Scholar 

Download references

Acknowledgements

This work is supported by National Natural Science Foundation of China (61173097, 61003265), Zhejiang Natural Science Foundation of China (Z1090459, Y1080669), Zhejiang Science and Technology Planning Project of China (No. 2010C 33046), and Tsinghua–Tencent Joint Laboratory for Internet Innovation Technology.

Author information

Authors and Affiliations

Authors

Corresponding author

Correspondence to Jing Fan.

Rights and permissions

Reprints and permissions

About this article

Cite this article

Tang, Y., Shi, X., Xiao, T. et al. An improved image analogy method based on adaptive CUDA-accelerated neighborhood matching framework. Vis Comput 28, 743–753 (2012). https://doi.org/10.1007/s00371-012-0701-4

Download citation

  • Published:

  • Issue Date:

  • DOI: https://doi.org/10.1007/s00371-012-0701-4

Keywords

Navigation