Euclidean distance

formula for two-dimensional space

0ρ = √( (x1-x2)2+(y1-y2)2 ) || = √( x2 + y2 )

formula for three-dimensional space

0ρ = √( (x1-x2)2+(y1-y2)2+(z1-z2)2 ) || = √( x2 + y2 + z2 )

formula for n-dimensional space

The n -dimensional Euclidean space is a set of points, and each point X or vector of it can be represented as (x, x, ..., x[n]), where x[i](i = 1, 2, ..., n) is a real number called the ith coordinate of X.

The distance ρ(A,B) between two points A = (a,a,…,a[n]) and B = (b,b,…,b[n]) is defined as the following formula:

ρ(A,B) =√ [ ∑( a[i] - b[i] )2 ] (i = 1,2,…,n)

The natural length of a vector = (x, x, …, x[n]) || is defined as the following formula:

|| = √( x2 + x2 + … + x[n]2 )

The so-called Euclidean distance transformation means that for a binary image (again, we assume that white is the foreground color and black is the background color), the value of the pixel in the foreground is converted into the distance from the point to the nearest background point.

The Euclidean distance transform has a wide range of applications in digital image processing, especially for image skeleton extraction, it is a good reference.

Also known as Minkowski distance , it is a measure in Euclidean space and is regarded as a generalization of Euclidean distance.

定义式:ρ(A,B) = [ ∑( a[i] - b[i] )^p ]^(1/p) (i = 1,2,…,n)

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=325628006&siteId=291194637