Bird
0
0

You want to save an image only when motion is detected using Raspberry Pi camera and OpenCV. Which approach is best?

hard🚀 Application Q8 of 15
Raspberry Pi - Camera Module
You want to save an image only when motion is detected using Raspberry Pi camera and OpenCV. Which approach is best?
ASave every frame regardless of motion
BCompare consecutive frames, save frame if difference exceeds threshold
CSave image only when PIR sensor is off
DSave image every 10 seconds without checking motion
Step-by-Step Solution
Solution:
  1. Step 1: Understand motion detection logic

    Comparing consecutive frames detects motion by measuring pixel differences.
  2. Step 2: Save image conditionally

    Saving only when difference exceeds threshold avoids unnecessary storage.
  3. Final Answer:

    Compare consecutive frames, save frame if difference exceeds threshold -> Option B
  4. Quick Check:

    Save images only on motion detection [OK]
Quick Trick: Save images only when frame difference is significant [OK]
Common Mistakes:
MISTAKES
  • Saving all frames wastes storage
  • Ignoring PIR sensor state
  • Saving on fixed timer without motion check

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Raspberry Pi Quizzes