# Normalised Diffusion Cosine Similarity and Its Use for Image Segmentation

### Jan Gaura, Eduard Sojka

#### Abstract

In many image-segmentation algorithms, measuring the distances is a key problem since the distance is often used to decide whether two image points belong to a single or, respectively, to two different image segments. The usual Euclidean distance need not be the best choice. Measuring the distances along the surface that is defined by the image function seems to be more relevant in more complicated images. Geodesic distance, i.e. the shortest path in the corresponding graph, or the k shortest paths can be regarded as the simplest methods. It might seem that the diffusion distance should provide the properties that are better since all the paths (not only their limited number) are taken into account. In this paper, we firstly show that the diffusion distance has the properties that make it difficult to use it image segmentation, which extends the recent observations of some other authors. Afterwards, we propose a new measure called normalised diffusion cosine similarity that is more suitable. We present the corresponding theory as well as the experimental results.

#### References

- Babic, D., Klein, D. J., Lukovits, I., Nikoli, S., and Trinajsti, N. (2002). Resistance-distance matrix: A computational algorithm and its application. International Journal of Quantum Chemistry, 90(1):166-176.
- Brand, M. (2005). A random walks perspective on maximizing satisfaction and profit. In Proceedings of the 2005 SIAM International Conference on Data Mining, pages 12-19. SIAM.
- Coifman, R. R. and Lafon, S. (2006). Diffusion maps. Applied and Computational Harmonic Analysis, 21(1):5-30.
- Eppstein, D. (1998). Finding the k shortest paths. SIAM J. Computing, 28(2):652-673.
- Fouss, F., Pirotte, A., Renders, J.-M., and Saerens, M. (2007). Random-walk computation of similarities between nodes of a graph with application to collaborative recommendation. IEEE Trans. on Knowl. and Data Eng., 19(3):355-369.
- Grady, L. (2006). Random walks for image segmentation. IEEE Trans. Pattern Anal. Mach. Intell., 28(11):1768- 1783.
- Huang, H., Yoo, S., Qin, H., and Yu, D. (2011). A robust clustering algorithm based on aggregated heat kernel mapping. In Cook, D. J., Pei, J., 0010, W. W., Zaane, O. R., and Wu, X., editors, ICDM, pages 270-279. IEEE.
- Klein, D. J. and Randic, M. (1993). Resistance distance. Mathematical Chemistry, 12(1):81-95.
- Lafon, S. and Lee, A. B. (2006). Diffusion maps and coarsegraining: A unified framework for dimensionality reduction, graph partitioning and data set parameterization. IEEE Transactions on Pattern Analysis and Machine Intelligence, 28:1393-1403.
- Lipman, Y., Rustamov, R. M., and Funkhouser, T. A. (2010). Biharmonic distance. ACM Trans. Graph., 29(3):27:1-27:11.
- Martin, D., Fowlkes, C., Tal, D., and Malik, J. (2001). A database of human segmented natural images and its application to evaluating segmentation algorithms and measuring ecological statistics. In in Proc. 8th Intl Conf. Computer Vision, pages 416-423.
- Nadler, B., Lafon, S., Coifman, R. R., and Kevrekidis, I. G. (2005). Diffusion maps, spectral clustering and eigenfunctions of fokker-planck operators. In in Advances in Neural Information Processing Systems 18, pages 955-962. MIT Press.
- Papadimitriou, C. H. (1985). An algorithm for shortest-path motion in three dimensions. Information Processing Letters, 20(5):259 - 263.
- Qiu, H. and Hancock, E. R. (2007). Clustering and embedding using commute times. IEEE Trans. Pattern Anal. Mach. Intell., 29(11):1873-1890.
- Sharma, A., Horaud, R., Cech, J., and Boyer, E. (2011). Topologically-Robust 3D Shape Matching Based on Diffusion Geometry and Seed Growing. In CVPR 7811 - IEEE Conference on Computer Vision and Pattern Recognition, pages 2481-2488, Colorado Springs, United States. IEEE Computer Society Press.
- Sinop, A. K. and Grady, L. (2007). A seeded image segmentation framework unifying graph cuts and random walker which yields A new algorithm. In IEEE 11th International Conference on Computer Vision, ICCV 2007, Rio de Janeiro, Brazil, October 14-20, 2007, pages 1-8. IEEE.
- Surazhsky, V., Surazhsky, T., Kirsanov, D., Gortler, S. J., and Hoppe, H. (2005). Fast exact and approximate geodesics on meshes. ACM Trans. Graph., 24(3):553- 560.
- Tenenbaum, J. B., de Silva, V., and Langford, J. C. (2000). A global geometric framework for nonlinear dimensionality reduction. Science, 290(5500):2319.
- von Luxburg, U., Radl, A., and Hein, M. (2014). Hitting and commute times in large random neighborhood graphs. Journal of Machine Learning Research, 15:1751-1798.
- Yen, L., Fouss, F., Decaestecker, C., Francq, P., and Saerens, M. (2007). Graph nodes clustering based on the commute-time kernel. In Proceedings of the 11th Pacific-Asia Conference on Advances in Knowledge Discovery and Data Mining, PAKDD'07, pages 1037-1045, Berlin, Heidelberg. Springer-Verlag.

#### Paper Citation

#### in Harvard Style

Gaura J. and Sojka E. (2015). **Normalised Diffusion Cosine Similarity and Its Use for Image Segmentation** . In *Proceedings of the International Conference on Pattern Recognition Applications and Methods - Volume 1: ICPRAM,* ISBN 978-989-758-076-5, pages 121-129. DOI: 10.5220/0005220601210129

#### in Bibtex Style

@conference{icpram15,

author={Jan Gaura and Eduard Sojka},

title={Normalised Diffusion Cosine Similarity and Its Use for Image Segmentation},

booktitle={Proceedings of the International Conference on Pattern Recognition Applications and Methods - Volume 1: ICPRAM,},

year={2015},

pages={121-129},

publisher={SciTePress},

organization={INSTICC},

doi={10.5220/0005220601210129},

isbn={978-989-758-076-5},

}

#### in EndNote Style

TY - CONF

JO - Proceedings of the International Conference on Pattern Recognition Applications and Methods - Volume 1: ICPRAM,

TI - Normalised Diffusion Cosine Similarity and Its Use for Image Segmentation

SN - 978-989-758-076-5

AU - Gaura J.

AU - Sojka E.

PY - 2015

SP - 121

EP - 129

DO - 10.5220/0005220601210129