add two pixels Euclidean distance function