# optical flow Euler-Langrange equation

I have a problem understanding how optical flow functional is plugged into Euler-Lagrange equation. The functional is:

$\iint[(I_xu+I_yv+I_t)^2+\alpha^2(||\nabla u||^2 +||\nabla v ||^2)]dxdy$

Euler_Langrange equation is: $\frac{\partial L}{\partial f} - \frac {d}{dt} \frac {\partial L} {\partial f'} = 0$ and for two variables we have $\frac{\partial L}{\partial u} - \frac {d}{dx}\frac {\partial L}{\partial u_x} - \frac {d}{dy}\frac {\partial L}{\partial u_y}=0$ and the same for v. This becomes then

$I_x(I_x u+I_y v+I_t)-\alpha^2 \Delta u = 0$ where $\Delta u = \frac{\partial ^2}{\partial x^2} + \frac {\partial^2}{\partial y^2}$

I just can't understand how the terms in the last eqution have been generated, I would appreciate it if anyone can walk me throughout the steps.

Thanks in advance

## 1 Answer

Hint:

$$|| \nabla u ||^{2} = u_{x}^{2}+u_{y}^{2}$$ Where subscript denotes partial differetiation. Thus, taking the last two terms of the Euler-Lagrange equation \begin{eqnarray} -\frac{d}{dx}\frac{\partial L}{\partial u_{x}}-\frac{d}{dy}\frac{\partial L}{\partial u_{y}} &=& -\frac{d}{dx}(2u_{x})--\frac{d}{dy}(2u_{y}) \\ &=& -2u_{xx}-2u_{yy} \\ &=& -2\Delta u \end{eqnarray} Obviously I omitted the factor of $\alpha^{2}$ in my calculation. Carrying on throughon with the first term in the Euler-Lagrange equation; $$\frac{\partial L}{\partial u} = 2I_{x}(I_{x}u+I_{y}v+I_{t})$$ and then the Euler-Lagrange equation beomces the final line in your question.

• Thank you for your reply, adding the two partial derivatives of u w.r.t x and y together, isn't it the divergence ? in classical optical flow we try to minimize the gradient not the divergence, What am Imissing here ?. The second question which seems easy yet it is the cause of my problems, why there is a multiplication in the derivative of L w.r.t u ? shouldn't it just keep terms that has u, like Ix – Musaab Jun 4 '15 at 11:31
• The Gradient of a smooth function $\nabla f = (f_{x}, f_{y}, f_{z})$ for some smooth $C^{\infty}$ function $f=f(x, y, z)$. The divergence of a vector field is a scalar valued function $\nabla \cdot F = F_{x}+F_{y}+F_{z}$. – Autolatry Jun 4 '15 at 11:55