Lecture 7 - Feature Detection Flashcards

(38 cards)

1
Q

What are Features?

A

Features include corners, edges, blobs, circles, ellipses, lines.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

What are feature used for?

A

They are used for:
* Matching two images (e.g., image stitching)
* Face and object recognition
* Structure from Motion (SfM)
* Stereo correspondence

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

Why not use raw pixels?

A

Because pixel values vary with lighting, color, viewpoint, and camera settings.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

What are the properties of good features?

A
  • Repeatability
    – Should be detectable at the same locations in different images despite changes in viewpoint and illumination
  • Saliency (descriptiveness)
    – Same points in different images should have similar features
    – And vice-versa
  • Compactness (affects speed of matching)
    – Fewer features
    – Smaller features
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

What are the Two Steps of Feature Extraction?

A

Two Steps of Feature Extraction
a) Feature Detection: Identify where to extract features (e.g., corners). Not all locations are good
b) Feature Description: Orientation of the extraction window, what to encode in the feature

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

What are the Applications of Feature Extraction and Matching?

A
  • Image alignment/stitching
  • 3D Structure from Motion (SfM)
  • Motion tracking
  • Robot navigation
  • Image retrieval
  • Face and object recognition
  • Human action recognition
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

What is Image alignment/stitching?

A

Alignment: aligning the image so they match (have the same orientation)
Stitching: Combining two images together at a given point

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

What is 3D Structure from Motion (SfM)?

A

Matching feature points in unordered image collections

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

What is Motion tracking?

A

Using artifical markers to allow detection and tracking of movement/motion

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

What is Face Detection?

A

Detecting whether an image is a face using points of interest or facial components

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

What are Haar Features?

A

Haar features are simple rectangular patterns used to detect edges, lines, and textures in images and is sensitive to directionality
Computation cost of (NxM - 1) additions per pixel per filter scale25

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

How does Haar Features work?

A
  • Basic Idea:
    • Haar features consist of black and white rectangular regions.
    • You calculate the feature value as:
      Feature value=∑(white region pixels)−∑(black region pixels)
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

What are the types of Haar Features?

A
  • Types of Haar Features:
    • Two-rectangle: detects edges (e.g., vertical or horizontal changes).
    • Three-rectangle: detects line-like features.
    • Four-rectangle: detects checkerboard-like changes.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

What is the purpose of Haar Features?

A
  • Purpose:
    • When placed over a part of the image, these features highlight changes in intensity, making them useful for identifying objects like faces, eyes, etc.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

What are the applications of Haar Features?

A

Faces
Stop signs
Any object basically

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

What are integral images?

A

Is a data structure that allows you to quickly compute the sum of pixel values in any rectangular region of an image, in constant time. Used to speed up the computation of Haar Features

17
Q

What is feature descriptor?

A

It is a simplified representation of the image that contains only the most important information about the image.

18
Q

What are some example of feature descriptors?

A

Histogram of Orientated Gradients (HOG)

19
Q

What is Histogram of Orientated Gradients (HOG)?

A

Used to extract features from image data, by focusing on the structure or shape of an object
- The HOG feature descriptor counts the occurrences of gradient orientation in localized portions of an image

20
Q

What are the steps to do HOG?

A
  1. Preprocess the data (64x128)
  2. Calculate the Gradients
  3. Calculate the magnitude and orientation
  4. Calculate the histogram of gradient in 8x8
  5. Normalise the gradients in 16x16
  6. Generate the feature of the complete image (combine all blocks)
21
Q

Understanding the step of HOG: Step 1 - Preprocess the data (64x128)

A

We need to bring down the with to height ratio to 1:2 ratio and divide image into either 8x8 or 16x16 patches to extract features

22
Q

Understanding the step of HOG: Step 2 - Calculate the Gradients

A

Do this for every pixel, we are calculating Gx and Gy
- Find the change in x direction
- Find the change in y direction

23
Q

Understanding the step of HOG: Step 3 - Calculate the magnitude and orientation

A

Using Gx and Gy calculate magnitude and orientation
maginitude = [(Gx)^2 + (Gy)^2) ^0.5
orientation = atan(Gy/Gx)
REFER TO SLIDES FOR EXAMPLE

24
Q

Understanding the step of HOG: Step 4 - Calculate the histogram of gradient in 8x8

A

Note:
- The histograms created in the HOG feature descriptor are not generated for the whole image. Instead, the image is divided into 8×8 cells, and the histogram of oriented gradients is computed for each cell. Why do you think this happens?

  • By doing so, we get the features (or histogram) for the smaller patches which in turn represent the whole image. We can certainly change this value here from 8 × 8 to 16 × 16 or 32 × 32.
25
What are the method to create histograms using gradient and orientation?
1. Find the orientation of pixel and update frequency table 2. Change bin size to get different number of buckets 3. Use gradient magnitude 4. Use gradient magnitude, but add contribution of the pixels gradient to the bins as well
26
Understanding the step of HOG: Step 5 - Normalise the gradients in 16x16
Normalise the image as some parts my be brighter than others
27
Understanding the step of HOG: Step 6 - Generate the feature of the complete image (combine all blocks)
Gets the final extraction
28
What can you apply HOG to?
Dection of objects Pedestrian detection Action recognition
29
What is Local Binary Pattern (LBP)
Compare 8-connected neighborhood with center pixel * If pixel > center, replace with ‘1’ else ‘0’ * Construct a binary number by going clockwise * Replace the center pixel with the decimal value of the binary number
30
What is Local Binary Pattern sensitive to?
Binary number is sensitive to starting point – LBP is not rotation invariant * Rotate binary string to minimize decimal value for rotation invariance * Minor changes in illumination can change the decimal value * Partition image into cells and construct LBP histograms in each cell
31
Should we extract features from all points?
No—computationally expensive. Instead, detect key points or interest points, and extract features only around them.
32
What is Harris Corner Detection?
Detects corners by computing the change in intensity with small shifts
33
What is the Corner response (R) in Harris Corner Detection?
* R depends only on eigenvalues of M * R is large for a corner * R is negative with large magnitude for an edge * ∣R∣ is small for a flat region
34
What is the Algorithm for Harris Corner Detection?
Algorithm: Harris Corner Detector 1. Compute x and y derivatives Ix​ and Iy​ of the input image 2. Compute products of derivatives Ix*Ix, Ix*Iy, and Iy*Iy 3. For each pixel, compute the matrix M in a local neighbourhood 4. Compute the corner response R at each pixel 5. Threshold the value of R to select corners 6. Perform non-maximum suppression
35
What are the properties of Harris Corner Detection
Rotation Invariance - shape remains the same when rotated Not invariant to image scale - corner at one scale my not be a corner at another
36
What is SIFT (Scale-Invariant Feature Transform)
Generates image feature keypoints * Detects and describes key points invariant to: ○ Scale ○ Rotation ○ Illumination ○ Affine transformations
37
What are the type of invariance?
Illumination - done through normalise Scale - using pyramids Rotation - done by Rotating image to the most dominant direction” and “Assign canonical orientation at the peak of the smoothed histogram” Affine (view point change) Full perspective
38
What are the key step of SIFT (Scale-Invariant Feature Transform)
Key Steps: 1. Scale-space extrema detection using Difference of Gaussian. You are trying to find the points whose surrounding patches are distinctive 2. Key point localization: discard low-contrast or edge points. 3. Orientation assignment using dominant gradient. 4. Descriptor generation: ○ 16×16 patch ○ Divided into 4×4 grids ○ Each grid: 8-bin histogram ○ Total: 128-dimensional vector