剔除低对比度特征点中的矩阵求导公式推导

剔除低对比度特征点中的矩阵求导公式推导

假定
x = [ x 1 , x 2 ] T , Δ x = [ Δ x 1 , Δ x 2 ] T \mathbf{x} = [x_1,x_2]^T,\Delta \mathbf{x} = [\Delta x_1,\Delta x_2]^T x=[x1,x2]T,Δx=[Δx1,Δx2]T
泰勒展开式:
D ( x + Δ x ) = D ( x ) + ( ∂ D ∂ x ) T Δ x + 1 2 Δ x T ∂ 2 D ∂ x ∂ x T Δ x D(\mathbf{x}+\Delta\mathbf{x}) = D(\mathbf{x}) + (\frac{\partial D}{\partial \mathbf{x}})^T \Delta\mathbf{x} + \frac{1}{2} \Delta \mathbf{x}^T \frac{\partial^2 D}{\partial \mathbf{x} \partial \mathbf{x}^T} \Delta \mathbf{x} D(x+Δx)=D(x)+(xD)TΔx+21ΔxTxxT2DΔx
其中

∂ D ∂ x = [ ∂ D ∂ x 1 , ∂ D ∂ x 2 ] T ∂ 2 D ∂ x ∂ x T = [ ∂ 2 D ∂ x 1 2 ∂ 2 D ∂ x 1 ∂ x 2 ∂ 2 D ∂ x 2 ∂ x 1 ∂ 2 D ∂ x 2 2 ] = [ ∂ 2 D ∂ x 1 2 ∂ 2 D ∂ x 1 ∂ x 2 ∂ 2 D ∂ x 1 ∂ x 2 ∂ 2 D ∂ x 2 2 ] \frac{\partial D}{\partial \mathbf{x}} = [\frac{\partial D}{\partial x_1},\frac{\partial D}{\partial x_2}]^T \\ \frac{\partial^2 D}{\partial \mathbf{x} \partial \mathbf{x}^T} = \left[ \begin{array}{cc} \frac{\partial^2 D}{\partial x_1^2} & \frac{\partial^2 D}{\partial x_1\partial x_2} \\ \frac{\partial^2 D}{\partial x_2 \partial x_1} & \frac{\partial^2 D}{\partial x_2^2} \end{array} \right] =\left[ \begin{array}{cc} \frac{\partial^2 D}{\partial x_1^2} & \frac{\partial^2 D}{\partial x_1\partial x_2} \\ \frac{\partial^2 D}{\partial x_1 \partial x_2} & \frac{\partial^2 D}{\partial x_2^2} \end{array} \right] xD=[x1D,x2D]TxxT2D=[x122Dx2x12Dx1x22Dx222D]=[x122Dx1x22Dx1x22Dx222D]

Δ x \Delta \mathbf{x} Δx求导

∂ D ( x + Δ x ) ∂ Δ x = ∂ D ( x ) ∂ Δ x + ∂ ∂ Δ x [ ( ∂ D ∂ x ) T Δ x ] + ∂ ∂ Δ x [ 1 2 Δ x T ∂ 2 D ∂ x ∂ x T Δ x ] \frac{\partial D(\mathbf{x}+\Delta\mathbf{x})}{\partial \Delta \mathbf{x}} = \frac{\partial D(\mathbf{x})}{\partial \Delta \mathbf{x}} + \frac{\partial}{\partial \Delta \mathbf{x}} [(\frac{\partial D}{\partial \mathbf{x}})^T \Delta \mathbf{x}] + \frac{\partial}{\partial \Delta \mathbf{x}}[\frac{1}{2} \Delta \mathbf{x}^T \frac{\partial^2 D}{\partial \mathbf{x} \partial \mathbf{x}^T} \Delta \mathbf{x}] ΔxD(x+Δx)=ΔxD(x)+Δx[(xD)TΔx]+Δx[21ΔxTxxT2DΔx]

其中

∂ D ( x ) ∂ Δ x = 0 ∂ ∂ Δ x [ ( ∂ D ∂ x ) T Δ x ] = ∂ D ∂ x ∂ ∂ Δ x [ 1 2 Δ x T ∂ 2 D ∂ x ∂ x T Δ x ] = 1 2 [ ∂ 2 D ∂ x ∂ x T + ( ∂ 2 D ∂ x ∂ x T ) T ] Δ x = ∂ 2 D ∂ x ∂ x T Δ x \frac{\partial D(\mathbf{x})}{\partial \Delta \mathbf{x}} = 0 \\ \frac{\partial}{\partial \Delta \mathbf{x}} [(\frac{\partial D}{\partial \mathbf{x}})^T \Delta \mathbf{x}] = \frac{\partial D}{\partial \mathbf{x}} \\ \frac{\partial}{\partial \Delta \mathbf{x}}[\frac{1}{2} \Delta \mathbf{x}^T \frac{\partial^2 D}{\partial \mathbf{x} \partial \mathbf{x}^T} \Delta \mathbf{x}] = \frac{1}{2}[\frac{\partial^2 D}{\partial \mathbf{x} \partial \mathbf{x}^T}+(\frac{\partial^2 D}{\partial \mathbf{x} \partial \mathbf{x}^T})^T]\Delta \mathbf{x} = \frac{\partial^2 D}{\partial \mathbf{x} \partial \mathbf{x}^T} \Delta \mathbf{x} ΔxD(x)=0Δx[(xD)TΔx]=xDΔx[21ΔxTxxT2DΔx]=21[xxT2D+(xxT2D)T]Δx=xxT2DΔx

用到的知识点:1. ∂ ( A B ) ∂ B = A T \frac{\partial(AB)}{\partial B} = A^T B(AB)=AT;2. ∂ ( x T A x ) ∂ x = 1 2 ( A + A T ) x \frac{\partial(\mathbf{x}^T A \mathbf{x})}{\partial \mathbf{x}} = \frac{1}{2}(A+A^T) \mathbf{x} x(xTAx)=21(A+AT)x;3. ∂ 2 D ∂ x ∂ x T \frac{\partial^2 D}{\partial \mathbf{x} \partial \mathbf{x}^T} xxT2D是对称矩阵,所以 ∂ 2 D ∂ 2 x ∂ x T = ( ∂ 2 D ∂ x ∂ x T ) T \frac{\partial^2 D}{\partial^2 \mathbf{x} \partial \mathbf{x}^T}=(\frac{\partial^2 D}{\partial \mathbf{x} \partial \mathbf{x}^T})^T 2xxT2D=(xxT2D)T

那么
∂ D ( x + Δ x ) ∂ Δ x = ∂ D ∂ x + ∂ 2 D ∂ x ∂ x T Δ x \frac{\partial D(\mathbf{x}+\Delta\mathbf{x})}{\partial \Delta \mathbf{x}} = \frac{\partial D}{\partial \mathbf{x}} + \frac{\partial^2 D}{\partial \mathbf{x} \partial \mathbf{x}^T} \Delta x ΔxD(x+Δx)=xD+xxT2DΔx
令上面求导等于0,求出 Δ x \Delta \mathbf{x} Δx
Δ x = − ( ∂ 2 D ∂ x ∂ x T ) − 1 ∂ D ∂ x \Delta \mathbf{x} = - (\frac{\partial^2 D}{\partial \mathbf{x} \partial \mathbf{x}^T})^{-1} \frac{\partial D}{\partial \mathbf{x}} Δx=(xxT2D)1xD
把求得的 Δ x \Delta\mathbf{x} Δx代入泰勒展开式
D ( x ^ ) = D ( x + Δ x ) = D ( x ) + ( ∂ D ∂ x ) T Δ x − 1 2 ( ∂ D ∂ x ) T [ ( ∂ 2 D ∂ x ∂ x T ) − 1 ] T ∂ 2 D ∂ x ∂ x T Δ x = D ( x ) + ( ∂ D ∂ x ) T Δ x − 1 2 ( ∂ D ∂ x ) T [ ( ∂ 2 D ∂ x ∂ x T ) T ] − 1 ∂ 2 D ∂ x ∂ x T Δ x = D ( x ) + ( ∂ D ∂ x ) T Δ x − 1 2 ( ∂ D ∂ x ) T ( ∂ 2 D ∂ x ∂ x T ) − 1 ∂ 2 D ∂ x ∂ x T Δ x = D ( x ) + ( ∂ D ∂ x ) T Δ x − 1 2 ( ∂ D ∂ x ) T Δ x = D ( x ) + 1 2 ( ∂ D ∂ x ) T Δ x = D ( x ) − 1 2 ( ∂ D ∂ x ) T ( ∂ 2 D ∂ x ∂ x T ) − 1 ∂ D ∂ x \begin{aligned} D(\hat{\mathbf{x}}) = D(\mathbf{x}+\Delta\mathbf{x}) &= D(\mathbf{x}) + (\frac{\partial D}{\partial \mathbf{x}})^T \Delta\mathbf{x} - \frac{1}{2} (\frac{\partial D}{\partial \mathbf{x}})^T [(\frac{\partial^2 D}{\partial \mathbf{x} \partial \mathbf{x}^T})^{-1}]^T \frac{\partial^2 D}{\partial \mathbf{x} \partial \mathbf{x}^T} \Delta \mathbf{x} \\ &= D(\mathbf{x}) + (\frac{\partial D}{\partial \mathbf{x}})^T \Delta\mathbf{x} - \frac{1}{2} (\frac{\partial D}{\partial \mathbf{x}})^T [(\frac{\partial^2 D}{\partial \mathbf{x} \partial \mathbf{x}^T})^T]^{-1} \frac{\partial^2 D}{\partial \mathbf{x} \partial \mathbf{x}^T} \Delta \mathbf{x} \\ &= D(\mathbf{x}) + (\frac{\partial D}{\partial \mathbf{x}})^T \Delta\mathbf{x} - \frac{1}{2} (\frac{\partial D}{\partial \mathbf{x}})^T (\frac{\partial^2 D}{\partial \mathbf{x} \partial \mathbf{x}^T})^{-1} \frac{\partial^2 D}{\partial \mathbf{x} \partial \mathbf{x}^T} \Delta \mathbf{x} \\ &= D(\mathbf{x}) + (\frac{\partial D}{\partial \mathbf{x}})^T \Delta\mathbf{x} - \frac{1}{2} (\frac{\partial D}{\partial \mathbf{x}})^T \Delta \mathbf{x} \\ &= D(\mathbf{x}) + \frac{1}{2} (\frac{\partial D}{\partial \mathbf{x}})^T \Delta \mathbf{x} \\ &= D(\mathbf{x}) - \frac{1}{2} (\frac{\partial D}{\partial \mathbf{x}})^T (\frac{\partial^2 D}{\partial \mathbf{x} \partial \mathbf{x}^T})^{-1} \frac{\partial D}{\partial \mathbf{x}} \end{aligned} D(x^)=D(x+Δx)=D(x)+(xD)TΔx21(xD)T[(xxT2D)1]TxxT2DΔx=D(x)+(xD)TΔx21(xD)T[(xxT2D)T]1xxT2DΔx=D(x)+(xD)TΔx21(xD)T(xxT2D)1xxT2DΔx=D(x)+(xD)TΔx21(xD)TΔx=D(x)+21(xD)TΔx=D(x)21(xD)T(xxT2D)1xD

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值