Horn-Schunck Method

Horn-Schunck method is a global method which introduces a global constraint of smoothness to solve the aperture problem in Optical Flow.

The flow is formulated as a global energy functional which is then sought to be minimized.

E ( u , v ) = ∫ ∫ [ ( I x u + I y v + I t ) 2 + α 2 ( ∣ ∣ ∇ u ∣ ∣ 2 + ∣ ∣ ∇ v ∣ ∣ 2 ) ] d x d y E(u,v) = \int \int [(I_x u + I_yv + I_t)^2 + \alpha^2(||\nabla u||^2 + ||\nabla v||^2)] dx dy E(u,v)=[(Ixu+Iyv+It)2+α2(u2+v2)]dxdy
Because
[ u v ] = f ( [ x y ] ) \begin{bmatrix} u \\ v \\ \end{bmatrix} = f(\begin{bmatrix} x \\ y \\ \end{bmatrix}) [uv]=f([xy])
By multi-dimensional Euler-Lagrange equation:
∂ L ∂ u − ∂ ∂ x ∂ L ∂ u x − ∂ ∂ y ∂ L ∂ u y = 0 \frac{\partial L}{\partial u} - \frac{\partial}{\partial x} \frac{\partial L}{\partial u_x} - \frac{\partial}{\partial y} \frac{\partial L}{\partial u_y} = 0 uLxuxLyuyL=0

∂ L ∂ v − ∂ ∂ x ∂ L ∂ v x − ∂ ∂ y ∂ L ∂ v y = 0 \frac{\partial L}{\partial v} - \frac{\partial}{\partial x} \frac{\partial L}{\partial v_x} - \frac{\partial}{\partial y} \frac{\partial L}{\partial v_y} = 0 vLxvxLyvyL=0

Because
L = ( I x u + I y v + I t ) 2 + α 2 ( u x 2 + u y 2 + v x 2 + v y 2 ) d x d y L = (I_x u + I_y v + I_t)^2 + \alpha^2(u_x^2 + u_y^2 + v_x^2 + v_y^2) dx dy L=(Ixu+Iyv+It)2+α2(ux2+uy2+vx2+vy2)dxdy

So we then have
I x ( I x u + I y v + I t ) − α 2 ( ∂ u x ∂ x + ∂ u y ∂ x ) = 0 I_x(I_x u + I_y v + I_t) - \alpha^2(\frac{\partial u_x}{\partial x} + \frac{\partial u_y}{\partial x}) = 0 Ix(Ixu+Iyv+It)α2(xux+xuy)=0

I y ( I x u + I y v + I t ) − α 2 ( ∂ v x ∂ x + ∂ v y ∂ x ) = 0 I_y(I_x u + I_y v + I_t) - \alpha^2(\frac{\partial v_x}{\partial x} + \frac{\partial v_y}{\partial x}) = 0 Iy(Ixu+Iyv+It)α2(xvx+xvy)=0

which leads to
I x ( I x u + I y v + I t ) − α 2 Δ u = 0 I y ( I x u + I y v + I t ) − α 2 Δ v = 0 \begin{aligned} I_x(I_x u + I_y v + I_t) - \alpha^2 \Delta u = 0 \\ I_y(I_x u + I_y v + I_t) - \alpha^2 \Delta v = 0 \\ \end{aligned} Ix(Ixu+Iyv+It)α2Δu=0Iy(Ixu+Iyv+It)α2Δv=0

Δ = ∂ 2 ∂ x 2 + ∂ 2 ∂ y 2 \Delta = \frac{\partial^2}{\partial x^2} + \frac{\partial^2}{\partial y^2} Δ=x22+y22 with the operator
[ 0 1 / 4 0 1 / 4 − 1 1 / 4 0 1 / 4 0 ] o r [ 0 − 1 / 4 0 − 1 / 4 1 − 1 / 4 0 − 1 / 4 0 ] \begin{bmatrix} 0 & 1/4 & 0 \\ 1/4 & -1 & 1/4 \\ 0 & 1/4 & 0\\ \end{bmatrix} or \begin{bmatrix} 0 & -1/4 & 0 \\ -1/4 & 1 & -1/4 \\ 0 & -1/4 & 0\\ \end{bmatrix} 01/401/411/401/40or01/401/411/401/40

i.e.
f x x + f y y = f c e n t e r − f a v e r a g e f_{xx} + f_{yy} = f_{center} - f_{average} fxx+fyy=fcenterfaverage

replace Δ u \Delta u Δu and Δ v \Delta v Δv, we get the discrete version
I x ( I x u + I y v + I t ) − α 2 ( u − u a v g ) = 0 I y ( I x u + I y v + I t ) − α 2 ( v − v a v g ) = 0 I_x(I_x u + I_y v + I_t) - \alpha^2 (u - u_{avg}) = 0 \\ I_y(I_x u + I_y v + I_t) - \alpha^2 (v - v_{avg}) = 0 \\ Ix(Ixu+Iyv+It)α2(uuavg)=0Iy(Ixu+Iyv+It)α2(vvavg)=0

Iteration

However, since the solution depends on the neighboring values of the flow field: Δ u , Δ v \Delta u, \Delta v Δu,Δv, it must be repeated once the neighbors have been updated. The following iterative scheme is derived:
在这里插入图片描述在这里插入图片描述
where the superscript k+1 denotes the next iteration, which is to be calculated and k is the last calculated result.

TODO

This is in essence a Matrix splitting method, similar to the Jacobi method, applied to the large, sparse system arising when solving for all pixels simultaneously.

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值