Bird
Raised Fist0
Computer Visionml~20 mins

ORB features in Computer Vision - Practice Problems & Coding Challenges

Choose your learning style10 modes available

Start learning this pattern below

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
Challenge - 5 Problems
🎖️
ORB Feature Master
Get all challenges correct to earn this badge!
Test your skills under time pressure!
🧠 Conceptual
intermediate
1:30remaining
Understanding ORB Feature Detection

What is the main advantage of using ORB (Oriented FAST and Rotated BRIEF) features in computer vision tasks?

AORB features are invariant to scale and rotation while being computationally efficient.
BORB features require deep learning models to extract meaningful descriptors.
CORB features are only useful for color image segmentation tasks.
DORB features are slower than SIFT and SURF but provide better accuracy.
Attempts:
2 left
💡 Hint

Think about what makes ORB suitable for real-time applications compared to older methods.

Predict Output
intermediate
1:30remaining
Output of ORB Keypoint Detection Code

What will be the output of the following Python code snippet using OpenCV's ORB detector?

Computer Vision
import cv2
import numpy as np
img = np.zeros((100, 100), dtype=np.uint8)
cv2.circle(img, (50, 50), 20, 255, -1)
orb = cv2.ORB_create()
keypoints = orb.detect(img, None)
print(len(keypoints))
A0
B1
CRaises an error because image is empty
DMore than 5
Attempts:
2 left
💡 Hint

Consider that the white circle on black background creates edges and corners for ORB to detect.

Model Choice
advanced
2:00remaining
Choosing the Best Descriptor for ORB Keypoints

You want to match features between two images using ORB keypoints. Which descriptor type should you use for best performance and compatibility?

AHOG descriptors
BBRIEF descriptors
CORB descriptors
DSIFT descriptors
Attempts:
2 left
💡 Hint

Consider which descriptor is designed to work with ORB keypoints and is binary for fast matching.

Hyperparameter
advanced
1:30remaining
Effect of Changing ORB's nfeatures Parameter

In OpenCV's ORB_create function, what is the effect of increasing the nfeatures parameter?

AIt adjusts the threshold for FAST corner detection.
BIt increases the maximum number of keypoints detected.
CIt changes the size of the image pyramid levels.
DIt modifies the descriptor size from 256 to 512 bits.
Attempts:
2 left
💡 Hint

Think about how many keypoints ORB tries to keep after detection.

Metrics
expert
2:30remaining
Evaluating ORB Feature Matching Accuracy

You matched ORB features between two images and want to evaluate the quality of matches. Which metric best measures the accuracy of these matches?

ARatio of correct matches to total matches using ground truth correspondences
BMean Squared Error (MSE) between matched keypoint coordinates
CConfusion matrix of keypoint classifications
DCross-entropy loss between descriptor vectors
Attempts:
2 left
💡 Hint

Think about how to measure how many matches are actually correct compared to all matches found.

Practice

(1/5)
1. What is the main purpose of ORB features in computer vision?
easy
A. To find important points and describe them in images
B. To increase the resolution of images
C. To convert images to grayscale
D. To compress images for storage

Solution

  1. Step 1: Understand ORB's role

    ORB is designed to detect key points (important points) in images and create descriptors that describe these points.
  2. Step 2: Compare options

    The other options describe unrelated image processing tasks, not feature detection and description.
  3. Final Answer:

    To find important points and describe them in images -> Option A
  4. Quick Check:

    ORB = key points + descriptors [OK]
Hint: Remember ORB finds and describes key points fast [OK]
Common Mistakes:
  • Confusing ORB with image enhancement
  • Thinking ORB compresses images
  • Assuming ORB changes image colors
2. Which of the following is the correct way to create an ORB detector in OpenCV with 500 features?
easy
A. orb = cv2.ORB_create(nfeatures=500)
B. orb = cv2.ORB(500)
C. orb = cv2.createORB(500)
D. orb = cv2.ORB_create(features=500)

Solution

  1. Step 1: Recall ORB creation syntax

    The correct OpenCV function to create an ORB detector is cv2.ORB_create(), and the parameter to set number of features is nfeatures.
  2. Step 2: Check options

    orb = cv2.ORB_create(nfeatures=500) uses correct function and parameter name. The other options use incorrect function names or parameter names.
  3. Final Answer:

    orb = cv2.ORB_create(nfeatures=500) -> Option A
  4. Quick Check:

    Use ORB_create with nfeatures [OK]
Hint: Use cv2.ORB_create(nfeatures=...) to set features [OK]
Common Mistakes:
  • Using wrong function name like ORB()
  • Using incorrect parameter name like features
  • Missing parentheses in function call
3. Given the code below, what is the type of the variable kp after running kp, des = orb.detectAndCompute(img, None)?
import cv2
img = cv2.imread('image.jpg', 0)
orb = cv2.ORB_create(nfeatures=1000)
kp, des = orb.detectAndCompute(img, None)
medium
A. A numpy array of descriptors
B. A list of keypoint objects
C. A single keypoint object
D. An integer count of keypoints

Solution

  1. Step 1: Understand detectAndCompute output

    The detectAndCompute method returns two values: keypoints and descriptors. Keypoints are returned as a list of keypoint objects.
  2. Step 2: Match variable types

    Here, kp receives the keypoints list, des receives the descriptors numpy array.
  3. Final Answer:

    A list of keypoint objects -> Option B
  4. Quick Check:

    kp = list of keypoints [OK]
Hint: detectAndCompute returns (list, array) [OK]
Common Mistakes:
  • Thinking kp is a numpy array
  • Assuming kp is a single keypoint
  • Confusing descriptors with keypoints
4. What is wrong with this code snippet for detecting ORB features?
import cv2
img = cv2.imread('image.jpg')
orb = cv2.ORB_create(nfeatures=300)
kp, des = orb.detectAndCompute(img, None)
print(len(kp))
medium
A. detectAndCompute requires a mask argument
B. nfeatures parameter is invalid
C. Image is not read in grayscale, causing detectAndCompute to fail
D. print(len(kp)) is incorrect syntax

Solution

  1. Step 1: Check image reading mode

    ORB works best with grayscale images. The code reads the image without specifying grayscale, so img is color (3 channels).
  2. Step 2: Understand impact on detectAndCompute

    detectAndCompute expects a single channel image; passing a color image can cause incorrect or no keypoints detected.
  3. Final Answer:

    Image is not read in grayscale, causing detectAndCompute to fail -> Option C
  4. Quick Check:

    Read image with cv2.imread('image.jpg', 0) [OK]
Hint: Always read images in grayscale for ORB [OK]
Common Mistakes:
  • Ignoring image color channels
  • Thinking nfeatures is invalid
  • Assuming mask is mandatory
5. You want to match ORB features between two images but notice very few matches. Which change is most likely to improve the number of good matches?
hard
A. Use a different color space like HSV for detection
B. Decrease the image resolution before detecting features
C. Set the mask parameter to None explicitly
D. Increase the nfeatures parameter when creating the ORB detector

Solution

  1. Step 1: Understand nfeatures impact

    nfeatures controls how many keypoints ORB tries to find. Increasing it allows more keypoints to be detected, increasing chances of matches.
  2. Step 2: Evaluate other options

    Decreasing resolution reduces detail, hurting matches. Changing color space doesn't affect ORB which works on grayscale. Mask None is default and doesn't affect matches.
  3. Final Answer:

    Increase the nfeatures parameter when creating the ORB detector -> Option D
  4. Quick Check:

    More features = more matches [OK]
Hint: More features means more chances to match [OK]
Common Mistakes:
  • Reducing image size to get more features
  • Changing color space for ORB detection
  • Misunderstanding mask parameter role