【数学】距离函数(未完)

文章目录

  • 一、声明
  • 二、无符号距离函数 (Unsigned Distance Function, UDF)
    • Wasserstein Distance / Earth Mover's Distance ☆
    • 欧氏距离 (Euclidean Distance)
    • 马氏距离 (Mahalanobis Distance)
    • 带权重的最近邻距离(Weighted Nearest Neighbor Distance)
    • Chamfer Distance
    • Hausdorff Distance
    • Chebyshev Distance
    • City Block (Manhattan) Distance
    • Correlation Distance
    • Cosine Distance
    • Jensen-Shannon Distance
    • Minkowski Distance
    • Standardized Euclidean Distance
    • Squared Euclidean Distance
    • 无名1
  • 三、有符号距离函数 (Signed Distance Function, SDF)
    • 最常见距离场
    • 截断有符号距离函数(Truncated Signed Distance Function, TSDF)
  • 四、参考文献

一、声明

  • 本帖持续更新中
  • 有纰漏还望指正!

二、无符号距离函数 (Unsigned Distance Function, UDF)

  无符号距离函数(Unsigned Distance Function)是计算物体表面距离的一种数学函数。它通常用于计算机图形学中的体素渲染、几何形状重建和碰撞检测等应用。图1是一些常见无符号距离场的原理示意图。
【数学】距离函数(未完)_第1张图片

图1:不同距离原理可视化对比 [1]

Wasserstein Distance / Earth Mover’s Distance ☆

D w a s ( x ) = 1 K ∑ p ∈ N k ( x ) ∥ x − p ∥ 2 D_{was}(x)=\sqrt{\frac{1}{K} \sum_{p \in N_k(x)} \Vert x-p \Vert^2} Dwas(x)=K1pNk(x)xp2
N k ( x ) : N_k(x): Nk(x): the set of K K K nearest neighbours to x x x
K K K: a tradeoff between robustness and accuracy
不够精确,只能用来确定大致的区域。

欧氏距离 (Euclidean Distance)

D E ( p , q ) = ( p − q ) 2 D_E(p,q) = \sqrt{(p-q)^2} DE(p,q)=(pq)2
p , q p,q p,q: they are two points from R N \mathbb{R}^N RN

马氏距离 (Mahalanobis Distance)

  • Distance between two probability measures
    W p ( μ , v ) = ( inf ⁡ γ ∈ Γ ( μ , v ) E ( x , y ) ∼ γ d ( x , y ) p ) 1 / p W_p(\mu, v) = \left( \inf_{\gamma \in \Gamma(\mu, v)} E_{(x,y) \sim \gamma } d(x,y)^p \right)^{1/p} Wp(μ,v)=(γΓ(μ,v)infE(x,y)γd(x,y)p)1/p
    μ , v \mu, v μ,v: two probability measures on M M M
    Γ ( μ , v ) \Gamma(\mu, v) Γ(μ,v): the set of all couplings of μ \mu μ and v v v

  • Distance between a point and one probability measure
    计算一个点 x \mathbf{x} x 到一个点集或分布 D D D 的马氏距离 D M ( x ) D_M(\mathbf{x}) DM(x) 的公式通常表达为:
    D M ( x ) = ( x − μ ) T Σ − 1 ( x − μ ) D_M(\mathbf{x}) = \sqrt{(\mathbf{x} - \mu)^T \Sigma^{-1} (\mathbf{x} - \mu)} DM(x)=(xμ)TΣ1(xμ)
    其中:
    x \mathbf{x} x: 是要计算的点。
    μ \mu μ: 是点集 D D D 的均值向量。
    Σ − 1 \Sigma^{-1} Σ1: 是点集 D D D 的协方差矩阵的逆, Σ = 1 n − 1 ( x − μ ) T ( x − μ ) \Sigma = \frac{1}{n-1}(\mathbf{x} - \mu)^T (\mathbf{x} -\mu) Σ=n11(xμ)T(xμ)
    T ^T T: 表示向量的转置。

带权重的最近邻距离(Weighted Nearest Neighbor Distance)

d ( p ) = ∑ j = 1 k ω i d ( p , p j ) d(p) = \sum_{j=1}^k \omega_i d(p, p_j) d(p)=j=1kωid(p,pj)
p p p: the query point
p i p_i pi: the j j j-th nearest neighbour of point p p p
d ( p , p j ) d(p,p_j) d(p,pj): the distance of point p p p and p j p_j pj
ω i \omega_{i} ωi: the weight of point p i p_i pi, it can be some common distance functions, e.g. ω i = − e d ( p , p i ) 2 2 σ 2 \omega_i = -e^{\frac{d(p, p_i)^2}{2\sigma^2}} ωi=e2σ2d(p,pi)2, σ ( p i ) = s ∑ j = 1 k ∥ p i − p i , j ∥ \sigma(p_i)= s \sum_{j=1}^k \Vert p_i - p_{i,j}\Vert σ(pi)=sj=1kpipi,j
k k k: the number of neighbours for calculating distance

Chamfer Distance

Hausdorff Distance

Chebyshev Distance

City Block (Manhattan) Distance

Correlation Distance

Cosine Distance

Jensen-Shannon Distance

Minkowski Distance

Standardized Euclidean Distance

Squared Euclidean Distance

无名1

源自文章
[1] 2011, Chazal et al., Geometric Inference for Probability Measures. Foundations of Computational Mathematics
[2] 2013, Noise-adaptive shape reconstruction from raw point sets. CGF

d μ , m 2 : R n → R , x ↦ 1 m ∫ B ( x , r μ , m ( x ) ) ∥ x − y ∥ 2 d μ ( y ) d_{\mu, m}^2: \mathbb{R}^n \to \mathbb{R}, x \mapsto \frac{1}{m} \int_{B(x, r_{\mu,m}(x))} \Vert x-y \Vert^2 d\mu(y) dμ,m2:RnR,xm1B(x,rμ,m(x))xy2dμ(y)
x : x: x: a query point
μ : \mu: μ: a probability distribution in R n \mathbb{R}^n Rn
r μ , m ( x ) : r_{\mu, m} (x): rμ,m(x): the minimum radius such that the ball centered at x x x with radius r r r encloses a mass of at least m m m.
m : m: m: m ∈ ( 0 , 1 ] m\in(0,1] m(0,1], a user-defined parameter.

三、有符号距离函数 (Signed Distance Function, SDF)

最常见距离场

Φ ( x ) = ( x − p i ) ⋅ n i \Phi(\bm{x})=(\bm{x}-\bm{p}_i) \cdot \bm{n}_i Φ(x)=(xpi)ni
x : \bm{x}: x:属于 R 3 \mathbb{R}^3 R3空间
p i : \bm{p}_i: pi:是点 x \bm{x} x的最近邻点
则表面为距离场 Φ \bm{\Phi} Φ的零等值面,该距离场对法向很敏感。

截断有符号距离函数(Truncated Signed Distance Function, TSDF)

四、参考文献

[1] [读论文]点云表面重建: SDF, TSDF, MLS, RBF

你可能感兴趣的:(数学理论,人工智能,机器学习,算法)