OpenCV MCQ
15 Questions
Time: ~25 mins
Beginner
OpenCV MCQ
The de facto open-source CV toolkit—load images, filter pixels, detect features, and grab video frames.
Easy: 5 Q
Medium: 6 Q
Hard: 4 Q
OpenCV
Library
imread
BGR Mat
process
blur / edge
VideoCapture
Frames
OpenCV essentials
OpenCV provides optimized implementations for image I/O, color conversion, geometric transforms, filtering, morphology, feature detection, and video capture. Python's cv2 wraps C++ for speed; BGR is default for historical reasons—not RGB.
BGR vs RGB
cv2.imread stores color images as BGR; swap channels before sending to libraries expecting RGB.
Key ideas
cv2.imread / imwrite
Load/save; flags control color vs grayscale.
cvtColor
BGR↔RGB, BGR↔HSV, grayscale conversions.
resize / warp
Geometry and camera-like remaps.
GaussianBlur / Canny
Smoothing and edge pipelines.
Minimal script
import cv2 → img = cv2.imread(path) → process → cv2.imshow / VideoCapture loop
Pro tip: Use cv2.waitKey for window events; release VideoCapture to avoid camera locks.