Optical Flow: Motion in the Image
A ball moves across a video frame, and its pixels shift.
Optical Flow: Motion in the Image explained visually
A ball moves across a video frame, and its pixels shift. English captions are optional and start off. The complete transcript follows the written lesson.
What you will learn
A ball moves across a video frame, and its pixels shift.
Track appearance changes
A ball moves across a video frame, and its pixels shift. Optical flow estimates apparent motion between images. The output is often a displacement vector at selected points or across a dense grid. It describes changes in image appearance, which may come from object motion, camera motion, or both.
Understand the local ambiguity
Many classical methods assume that corresponding points keep approximately the same brightness and that motion can be estimated over a local neighborhood. These assumptions can fail under changing illumination, reflections, or occlusion. A straight edge creates another problem: locally, motion along the edge may be ambiguous. This is often called the aperture problem. Corners and textured patches usually provide stronger two-dimensional motion evidence.
Check difficult motion
Large displacements are often handled with a coarse-to-fine image pyramid. Motion is estimated on a reduced image and refined at higher resolutions. Even then, fast motion, blur, or an object leaving the image can break correspondence. Check forward-and-backward consistency and identify invalid regions rather than treating every vector as equally trustworthy. Optical flow is a useful motion cue, but it does not by itself provide a persistent object identity.
A worked example
If a feature moves from x equals one hundred, y equals fifty to x equals one hundred and six, y equals forty-eight, its image displacement is six pixels right and two pixels up. Converting that displacement into meters per second requires timing and scene geometry, not just the vector.
Worked example
If a feature moves from x equals 100, y equals 50 to x equals 106, y equals 48, its image displacement is six pixels right and two pixels up. Converting that displacement into meters per second requires timing and scene geometry, not just the vector.
Quick check: test your understanding
Try it yourself: Why can a moving reflection produce optical flow even when the physical surface stays still?
Check the reasoning
Optical flow follows apparent image changes. A reflection can move across the surface and violate the assumption that appearance stays attached to a physical point.
Does optical flow automatically distinguish camera motion from object motion?
No. Additional modeling or reference information is needed to separate them.
How would you solve the practice case?
Optical flow follows apparent image changes. A reflection can move across the surface and violate the assumption that appearance stays attached to a physical point.
What does the worked example show?
If a feature moves from x equals 100, y equals 50 to x equals 106, y equals 48, its image displacement is six pixels right and two pixels up. Converting that displacement into meters per second requires timing and scene geometry, not just the vector.
Further reading
Programming Computer Vision with Python — Jan Erik Solem.
Original ToolsInVision teaching examples. Editorial approach · Suggest a correction
Accessible referenceLesson 7 transcript230 words · Video transcript · Matches the published narration and captionsOpen transcript
A ball moves across a video frame, and its pixels shift. Optical flow estimates apparent motion between images. The output is often a displacement vector at selected points or across a dense grid. It describes changes in image appearance, which may come from object motion, camera motion, or both.
Many classical methods assume that corresponding points keep approximately the same brightness and that motion can be estimated over a local neighborhood. These assumptions can fail under changing illumination, reflections, or occlusion. A straight edge creates another problem: locally, motion along the edge may be ambiguous. This is often called the aperture problem. Corners and textured patches usually provide stronger two-dimensional motion evidence.
Large displacements are often handled with a coarse-to-fine image pyramid. Motion is estimated on a reduced image and refined at higher resolutions. Even then, fast motion, blur, or an object leaving the image can break correspondence. Check forward-and-backward consistency and identify invalid regions rather than treating every vector as equally trustworthy. Optical flow is a useful motion cue, but it does not by itself provide a persistent object identity.
If a feature moves from x equals one hundred, y equals fifty to x equals one hundred and six, y equals forty-eight, its image displacement is six pixels right and two pixels up. Converting that displacement into meters per second requires timing and scene geometry, not just the vector.