I am trying to write this equations in TeXnic Center, but so far, I am not very successful. The equations I want to write are here: http://www.mathworks.com/help/vision/ref/vision.opticalflow-class.html - Horn&Schunk method.
The Horn-Schunk method, by assuming that the optical flow is smooth over the entire image, computes an estimate of the velocity field, that minimizes this equation:
\begin{flushleft}
\[
E = \int \!\!\! \int ($I_x$u + $I_y$v + $I_t$)^2 dxdy + \alpha \int \!\!\! \int (\frac{\partial \textit{u}}{\partial x}^2 + \frac{\partial \textit{u}}{\partial y}^2 + \frac{\partial \textit{v}}{\partial x}^2 + \frac{\partial \textit{v}}{\partial y}^2)dxdy
\]
\end{flushleft}
where \alpha is the smoothness term of the velocity field,
\[
\frac{\partial \textit{u}}{\partial x}
\]
and
\[
\frac{\partial \textit{v}}{\partial x}
\]
are the spatial derivatives of the optical velocity component \textit{u}. The \alpha regularization parameter controls the strength of the smoothness constraint and is usually selected heuristically. The Horn-Schunck method minimizes the previous equation to obtain the velocity field, [u v], for each pixel in the image, which is given by the following equations:
\[
\stackrel u{k+1}{x,y} = \stackrel u{-k}{x,y} - \frac{$I_x$[$I_x$\stackrel u{-k}{x,y} + $I_y$\stackrel v{-k}{x,y} + $I_t$]}{\alpha^2 + $I_x$^2 + $I_y$^2
\]
\[
\stackrel v{k+1}{x,y} = \stackrel v{-k}{x,y} - \frac{$I_y$[$I_x$\stackrel u{-k}{x,y} + $I_y$\stackrel v{-k}{x,y} + $I_t$]}{\alpha^2 + $I_x$^2 + $I_y$^2
\]
I am newbie in LateX, and when I compile, it doesn't puts out the expected result. Also, when I write \alpha, afterwards, the text gets formatted in a different way (see picture attached). Can someone help me?




\alphasaying it is a math mode command, and as you can see from the output everything after that is in math Use$\alpha$– David Carlisle Jul 13 '14 at 16:12$around\alphabut then you have incorrect$around variables that are already in math mode\int ($I_should be\int (I_with no$. But if you want someone to try your code make it start with\documentclassand end\end{document}– David Carlisle Jul 13 '14 at 16:18$within your displayed equations, remove them all. Your example code as poste is just a fragment so people can not try it, you should edit it in the question so it starts\documentclassand has (just) the packages needed for the example and ends\end{document}– David Carlisle Jul 13 '14 at 16:25$ends the math mode (and generates a TeX error) – David Carlisle Jul 13 '14 at 16:26\textitinside math (using it for variables is wrong, anyway), missing braces, missing arguments to\stackrel... – cgnieder Jul 13 '14 at 16:26