0
0
Computer Visionml~20 mins

Optical flow concept in Computer Vision - Practice Problems & Coding Challenges

Choose your learning style9 modes available
Challenge - 5 Problems
🎖️
Optical Flow Mastery
Get all challenges correct to earn this badge!
Test your skills under time pressure!
🧠 Conceptual
intermediate
1:30remaining
What does optical flow represent in video analysis?
In simple terms, what does optical flow describe when analyzing a video sequence?
AThe color changes of objects over time
BThe pattern of apparent motion of objects between consecutive frames
CThe brightness level of each pixel in a single frame
DThe audio signal associated with the video
Attempts:
2 left
💡 Hint
Think about how objects move from one frame to the next in a video.
Predict Output
intermediate
2:00remaining
Output of Optical Flow Calculation Code
What is the shape of the output array from the following optical flow calculation using OpenCV's calcOpticalFlowFarneback function?
Computer Vision
import cv2
import numpy as np
prev_frame = np.zeros((100, 100), dtype=np.uint8)
next_frame = np.zeros((100, 100), dtype=np.uint8)
flow = cv2.calcOpticalFlowFarneback(prev_frame, next_frame, None, 0.5, 3, 15, 3, 5, 1.2, 0)
output_shape = flow.shape
A(100, 100, 2)
B(100, 100)
C(2, 100, 100)
D(100, 2)
Attempts:
2 left
💡 Hint
Optical flow returns a vector for each pixel indicating motion in x and y directions.
Model Choice
advanced
2:30remaining
Choosing a Model for Dense Optical Flow Estimation
Which model architecture is best suited for estimating dense optical flow between two images?
AA convolutional neural network designed to output a 2-channel flow field for each pixel
BA simple feedforward network with a single output neuron
CA recurrent neural network designed for text generation
DA clustering algorithm like K-means
Attempts:
2 left
💡 Hint
Dense optical flow requires per-pixel motion vectors.
Hyperparameter
advanced
2:00remaining
Effect of Pyramid Scale Parameter in Optical Flow Calculation
In the Farneback optical flow algorithm, what is the effect of increasing the pyramid scale parameter (pyr_scale)?
AIt decreases the number of pyramid levels, reducing accuracy
BIt controls the threshold for motion vector magnitude
CIt changes the color space of the input images
DIt increases the resolution of the image pyramid, allowing finer motion detection but increasing computation time
Attempts:
2 left
💡 Hint
Think about how image pyramids help detect motion at different scales.
Metrics
expert
3:00remaining
Evaluating Optical Flow Accuracy with Endpoint Error
Given ground truth flow vectors and predicted flow vectors, how is the average endpoint error (EPE) calculated?
ABy measuring the correlation coefficient between predicted and true flow magnitudes
BBy counting the number of pixels where predicted flow equals ground truth exactly
CBy computing the average Euclidean distance between predicted and true flow vectors over all pixels
DBy calculating the mean squared error of pixel intensities
Attempts:
2 left
💡 Hint
Endpoint error measures how far off the predicted motion vectors are from the true ones.