Ch-6 Computer Vision
Ch-6 Computer Vision
Key Assumptions:
2. Small Motion: The motion of objects between two frames is small enough to
approximate the change linearly.
3. Spatial Coherence: Neighboring pixels in the same object move in a coherent manner.
I(x, y, t) = I(x + u, y + v, t + 1)
Where:
Using Taylor series expansion and neglecting higher-order terms, the equation simplifies to:
Ix u + Iy v + It = 0
Where:
This equation is called the Optical Flow Constraint Equation. Since there is one equation but
two unknowns (u and v ), additional constraints are required to solve it.
1/12
1. Lucas-Kanade Method:
2. Horn-Schunck Method:
Applications:
By using the optical flow algorithm, it becomes possible to analyze motion patterns
effectively in various real-world scenarios.
Equation:
I(x, y, t) = I(x + u, y + v, t + 1)
Where:
2/12
(u, v): Displacement or motion vector of the pixel in the next frame.
t + 1: The next time frame.
Explanation:
The equation assumes that as an object moves, its appearance (intensity) does not
change. Only its position changes in the image over time.
It forms the basis for optical flow calculation by relating spatial and temporal changes in
intensity.
Simplification:
Using Taylor series expansion and ignoring higher-order terms, the equation is
approximated as:
Ix u + Iy v + It = 0
Where:
This equation is used to compute motion in a scene, but additional constraints are needed
since it has one equation with two unknowns (u and v ).
Motion Parallax
Definition:
Motion parallax is a depth cue that arises when an observer moves relative to a scene.
Objects at different distances from the observer appear to move at different relative speeds
and directions, providing depth information.
Key Concepts:
1. Relative Motion:
3/12
2. Direction of Motion:
Objects closer than the focal point appear to move in the opposite direction to the
observer's motion.
Objects farther than the focal point appear to move in the same direction as the
observer.
3. Depth Perception:
The rate and direction of relative motion help the brain estimate the depth and spatial
arrangement of objects in the scene.
Example:
When you look out of a moving car:
Trees near the road seem to move rapidly in the opposite direction.
Mountains far away seem to move slowly in the same direction as your car.
Applications:
Computer Vision: Used in 3D scene reconstruction and depth estimation.
Motion parallax is a natural and powerful depth cue utilized by humans and machines to
understand 3D space.
Key Assumptions:
1. Brightness Constancy: The intensity of a moving pixel remains constant over time.
2. Small Motion: The movement between two frames is small and smooth.
4/12
Optical Flow Constraint Equation:
The algorithm uses the brightness constancy assumption:
Ix u + Iy v + It = 0
Where:
This equation has one equation but two unknowns (u, v ), requiring additional constraints to
solve.
Common Methods:
1. Lucas-Kanade Method: Assumes motion is constant in small regions and solves using
least squares.
Applications:
Motion Tracking: Tracks moving objects in videos.
Optical flow algorithms are fundamental for understanding and analyzing motion in
computer vision systems.
5/12
video or image sequence to estimate motion. These techniques focus on sparse motion
estimation rather than dense motion at every pixel.
2. Feature Matching:
Methods:
Nearest-Neighbor Search: Finds the closest matching feature in the next frame.
u: Horizontal displacement.
v : Vertical displacement.
4. Outlier Removal (Optional):
6/12
Example:
Consider tracking the motion of a car in a video:
1. Feature Detection: Identify edges, corners, or other key points on the car.
3. Motion Vector Calculation: Compute the motion vectors for these points to determine
the car's direction and speed.
Advantages:
Efficiency: Focuses on specific features, making it computationally faster than dense
motion estimation.
Robustness: Works well for tracking prominent objects and motion in noisy images.
Limitations:
Sparsity: Only estimates motion at feature points, not for every pixel.
Occlusion Issues: Features may disappear when occluded, leading to incomplete motion
tracking.
Applications:
Object Tracking: Follows moving objects in video sequences (e.g., vehicles, people).
Robot Navigation: Helps robots estimate motion and navigate through environments.
7/12
What is optical flow? Discuss optical flow in motion analysis.
Optical Flow
Definition:
Optical flow is the apparent motion of objects, edges, or regions in a visual scene, caused by
the relative movement between the camera and the scene. It represents the distribution of
motion vectors, which indicate how pixels in an image frame move to corresponding pixels in
the next frame.
Key Concepts:
1. Motion Vectors:
Optical flow calculates motion as a vector field, where each vector describes the
displacement of a pixel between two frames.
Ix u + Iy v + It = 0
Where:
Dense Optical Flow: Estimates motion for every pixel (e.g., Horn-Schunck method).
Sparse Optical Flow: Tracks motion at specific feature points (e.g., Lucas-Kanade
method).
8/12
Applications in Motion Analysis:
1. Object Tracking:
Optical flow is used to track moving objects across frames in a video sequence, such as
pedestrians, vehicles, or animals.
2. Action Recognition:
Motion patterns derived from optical flow help classify human activities, such as walking,
running, or jumping.
3. Video Stabilization:
Detects and compensates for unwanted camera movements to produce stable video
output.
4. 3D Scene Reconstruction:
Uses motion analysis to infer depth and reconstruct 3D environments.
5. Autonomous Driving:
Helps detect obstacles, estimate object speeds, and predict motion in self-driving
vehicles.
Example:
In a video of a car driving down a road, optical flow can:
Advantages:
Captures detailed motion information.
Limitations:
Sensitive to lighting changes and noise.
9/12
In motion analysis, optical flow provides a robust framework for understanding and
interpreting motion dynamics, making it a cornerstone in fields like robotics, surveillance,
and augmented reality.
When dealing with rigid objects, the motion field is determined by the motion of the
observer and the geometric properties of the scene.
Key Concepts:
1. Rigid Object Motion:
Each point in the 3D scene projects onto a corresponding point in the 2D image
plane.
The velocity of these points on the image plane constitutes the motion field.
3D Motion of a Point:
10/12
Let a 3D point in the scene be represented as (X, Y , Z). If the camera has a translational
velocity T = (Tx , Ty , Tz ) and a rotational velocity Ω = (Ωx , Ωy , Ωz ), the 3D velocity V of
V =T+Ω×P
Where:
For a point projecting onto the image plane at (x, y), the motion field (u, v) is expressed as:
Tx xTz
u=− + + xyΩx − (1 + x2 )Ωy + yΩz
Z Z
Ty yTz
v=− + + (1 + y 2 )Ωx − xyΩy − xΩz
Z Z
Where:
Observations:
1. Effect of Depth (Z ):
2. Direction of Motion:
The direction and magnitude of motion depend on the translation T and rotation Ω
of the camera relative to the object.
11/12
Applications:
1. Depth Estimation: By analyzing the motion field, the depth (Z ) of objects in the scene
can be estimated.
2. Object Tracking: The motion field helps track rigid objects across image sequences.
4. Egomotion Estimation: Estimates the motion of the observer (camera) relative to the
environment.
Summary:
The motion field of rigid objects provides a mathematical description of how 3D motion
translates into observable 2D image motion. Using equations based on translation, rotation,
and depth, it enables critical tasks such as depth estimation, scene reconstruction, and
object tracking in computer vision.
12/12