# Optical flow equation and real images

We know optical flow equation cannot be calculated without additional constraints. But what I cannot figure out is why it does not hold exactly for real images? This equation has gradient and so, it can be used to estimate the motion vectors by focusing on edges. Is it correct? How we add other constraints like smoothness into account? Thanks

• Hello, your question is not completely clear about what you're asking. I've tried to answer below, but please do not hesitate to edit your question to make it more explicit. – sansuiso Apr 7 '15 at 12:34

Writing the optical flow vector as $(u,v)$, then the optical flow equation only states that light is preserved. Basically, it states that variations in the observed light patterns (measured by the image derivative with respect to time) are explained by the motion of objects (smaller light patterns inside the image). Object motion is measured through spatial variations of the said light patterns:
$$\frac{\partial I}{\partial t} + u\cdot\frac{\partial I}{\partial x} + v\cdot\frac{\partial I}{\partial y} = 0$$
This problem is ill-posed for any image, be it synthetic or real. This is easy to see since 1 pixel provides 1 measurement $\frac{\partial I}{\partial t}$ only, while at the same time there are two unknowns $\left(u(x,y), v(x,y)\right)$.
As you said, since this equation involves image spatial gradients $\nabla I = (\frac{\partial I}{\partial x}, \frac{\partial I}{\partial y})$ it can be solved for edges (by tracking them). Other ways to overcome this issue: