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.
Similar content being viewed by others
References
Ashikhmin, M.: Synthesizing natural textures. In: Proceedings of the 2001 Symposium on Interactive 3D Graphics, pp. 217–226 (2001)
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)
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)
Sivaks, E., Lischinski, D.: On neighbourhood matching for texture-by-numbers. Comput. Graph. Forum 30, 127–138 (2011)
Wei, L.Y., Lefebvre, S., Kwatra, V., Turk, G.: State of the art in example-based texture synthesis. In: Eurographics, pp. 93–117 (2009)
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)
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)
Efros, A.A., Freeman, W.T.: Image quilting for texture synthesis and transfer. In: Proceedings of SIGGRAPH, vol. 1, pp. 341–346 (2001)
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)
Kwatra, V., Essa, I., Bobick, A., Kwatra, N.: Texture optimization for example-based synthesis. ACM Trans. Graph. 24, 795–802 (2005)
Risser, E., Han, C., Dahyot, R., Grinspun, E.: Synthesizing structured image hybrids. ACM Trans. Graph. 29, 85 (2010)
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)
Ma, C., Wei, L.Y., Tong, X.: Discrete element textures. ACM Trans. Graph. 30, 62 (2011)
Busto, P.P., Eisenacher, C., Lefebvre, S., Stamminger, M.: Instant texture synthesis by numbers. In: Vision, Modeling and Visualization 2010, pp. 81–85 (2010)
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)
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)
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)
Ramanarayanan, G., Bala, K.: Constrained texture synthesis via energy minimization. IEEE Trans. Vis. Comput. Graph. 13, 167–178 (2007)
Mount, D.M., Arya, S.: ANN: A library for approximate nearest neighbor searching. In: CGC 2nd Annual Fall Workshop on Computational Geometry (1997)
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)
Lefebvre, S., Hoppe, H.: Parallel controllable texture synthesis. ACM Trans. Graph. 24, 777–786 (2005)
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)
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)
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)
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)
Barnes, C., Shechtman, E., Finkelstein, A., Goldman, D.B.: PatchMatch: a randomized correspondence algorithm for structural image editing. ACM Trans. Graph. 28, 24 (2009)
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)
Lefebvre, S., Hoppe, H.: Appearance-space texture synthesis. ACM Trans. Graph. 25, 541–548 (2006)
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
Corresponding author
Rights 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
Published:
Issue Date:
DOI: https://doi.org/10.1007/s00371-012-0701-4