Jump into concepts and practice - no test required
or
Recommended
Test this pattern10 questions across easy, medium, and hard to know if this pattern is strong
Recall & Review
beginner
What is optical flow in the context of indoor positioning for drones?
Optical flow is the pattern of apparent motion of objects, surfaces, and edges in a visual scene caused by the relative motion between a drone and its environment. It helps drones estimate their movement indoors where GPS signals are weak or unavailable.
Click to reveal answer
beginner
Why is optical flow useful for indoor drone positioning?
Indoor environments often block GPS signals, so drones use optical flow to track how the ground or walls move relative to the drone’s camera. This helps estimate speed and position without GPS.
Click to reveal answer
intermediate
Name two common sensors used alongside optical flow for better indoor positioning accuracy.
1. Inertial Measurement Unit (IMU) - measures acceleration and rotation.
2. Ultrasonic or Lidar sensors - measure distance to nearby surfaces.
Click to reveal answer
intermediate
What is a common challenge when using optical flow for indoor positioning?
Low texture or uniform surfaces (like plain walls or floors) make it hard for optical flow algorithms to detect movement, causing inaccurate position estimates.
Click to reveal answer
beginner
How does a drone use optical flow data to maintain stable flight indoors?
The drone’s software compares changes in the camera image over time to calculate velocity and position changes. It then adjusts motors to keep steady or follow a path.
Click to reveal answer
What does optical flow measure for indoor drone navigation?
AMovement of visual features between frames
BGPS coordinates indoors
CBattery level of the drone
DTemperature of the drone's motors
✗ Incorrect
Optical flow measures how visual features move between camera frames to estimate motion.
Why is GPS often unreliable for indoor drone positioning?
AGPS signals are blocked or weak indoors
BGPS is too fast indoors
CGPS only works underwater
DGPS drains the drone battery quickly
✗ Incorrect
Buildings block or weaken GPS signals, making it unreliable indoors.
Which sensor is commonly combined with optical flow to improve indoor positioning?
ABarometer
BThermometer
CMicrophone
DInertial Measurement Unit (IMU)
✗ Incorrect
IMU sensors measure acceleration and rotation, helping improve position estimates.
What problem can uniform surfaces cause for optical flow?
AThey cause overheating
BThey reflect GPS signals
CThey provide few features to track movement
DThey increase battery consumption
✗ Incorrect
Uniform surfaces lack distinct visual features, making it hard for optical flow to detect motion.
How does optical flow help a drone maintain stable flight indoors?
ABy increasing battery power
BBy estimating velocity from camera images to adjust motor speed
CBy sending signals to GPS satellites
DBy measuring air pressure
✗ Incorrect
Optical flow estimates velocity changes so the drone can adjust motors and stay stable.
Explain how optical flow helps a drone navigate indoors without GPS.
Think about how the drone sees movement around it.
You got /4 concepts.
Describe challenges optical flow faces in indoor environments and how drones can overcome them.
Consider what makes visual tracking hard indoors.
You got /4 concepts.
Practice
(1/5)
1. What is the main purpose of using optical flow in indoor drone positioning?
easy
A. To track the drone's movement by analyzing camera images
B. To connect the drone to GPS satellites
C. To control the drone's battery usage
D. To measure the drone's altitude using sound waves
Solution
Step 1: Understand optical flow concept
Optical flow uses camera images to detect movement by comparing changes between frames.
Step 2: Identify its use in indoor positioning
Since GPS doesn't work well indoors, optical flow helps track position by visual movement detection.
Final Answer:
To track the drone's movement by analyzing camera images -> Option A
Quick Check:
Optical flow = movement tracking indoors [OK]
Hint: Optical flow tracks movement visually, not with GPS indoors [OK]
Common Mistakes:
Confusing optical flow with GPS tracking
Thinking optical flow measures altitude
Assuming optical flow controls battery
2. Which of the following is the correct Python syntax to calculate optical flow using OpenCV's calcOpticalFlowPyrLK function?
easy
A. flow = cv2.calcOpticalFlowPyrLK(prev_img, next_img, prev_pts, None)
B. flow = cv2.calcOpticalFlowPyrLK(prev_pts, prev_img, next_img, None)
C. flow = cv2.calcOpticalFlowPyrLK(next_img, prev_img, None, prev_pts)
D. flow = cv2.calcOpticalFlowPyrLK(None, prev_img, prev_pts, next_img)
Solution
Step 1: Recall function parameter order
The function calcOpticalFlowPyrLK expects parameters in order: previous image, next image, previous points, and next points (usually None to compute).
Step 2: Match parameters to options
flow = cv2.calcOpticalFlowPyrLK(prev_img, next_img, prev_pts, None) matches this order correctly; others mix parameter positions incorrectly.
Final Answer:
flow = cv2.calcOpticalFlowPyrLK(prev_img, next_img, prev_pts, None) -> Option A
C. Incorrect indexing of prev_pts causing IndexError
D. Using subtraction instead of addition
Solution
Step 1: Check indexing of prev_pts
prev_pts is a 2D array; prev_pts[0] is [100, 150], but prev_pts[1] does not exist (index error).
Step 2: Identify cause of error
Accessing prev_pts[1] causes an IndexError; correct indexing should be prev_pts[0][1].
Final Answer:
Incorrect indexing of prev_pts causing IndexError -> Option C
Quick Check:
Indexing 2D arrays needs two indices [OK]
Hint: Use two indices for 2D arrays like prev_pts[0][1] [OK]
Common Mistakes:
Using single index on 2D numpy arrays
Confusing dx and dy calculations
Ignoring numpy import errors
5. You want to improve indoor drone positioning by combining optical flow displacement with altitude data from a barometer. Which approach best integrates these two data sources in Python?
hard
A. Store altitude as a separate variable and never update position
B. Create a dictionary with keys 'x', 'y', 'altitude' updated each frame
C. Use optical flow data only and ignore altitude for simplicity
D. Replace optical flow with barometer readings entirely
Solution
Step 1: Understand data integration needs
Combining horizontal movement (optical flow) and vertical position (altitude) requires a unified data structure.
Step 2: Choose appropriate data structure
A dictionary with keys 'x', 'y', and 'altitude' allows updating all position components together each frame.
Final Answer:
Create a dictionary with keys 'x', 'y', 'altitude' updated each frame -> Option B
Quick Check:
Combine data in one structure for full 3D position [OK]
Hint: Use one dictionary to track x, y, and altitude together [OK]