Lecture 7 - Feature Detection Flashcards
(38 cards)
What are Features?
Features include corners, edges, blobs, circles, ellipses, lines.
What are feature used for?
They are used for:
* Matching two images (e.g., image stitching)
* Face and object recognition
* Structure from Motion (SfM)
* Stereo correspondence
Why not use raw pixels?
Because pixel values vary with lighting, color, viewpoint, and camera settings.
What are the properties of good features?
- 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
What are the Two Steps of Feature Extraction?
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
What are the Applications of Feature Extraction and Matching?
- Image alignment/stitching
- 3D Structure from Motion (SfM)
- Motion tracking
- Robot navigation
- Image retrieval
- Face and object recognition
- Human action recognition
What is Image alignment/stitching?
Alignment: aligning the image so they match (have the same orientation)
Stitching: Combining two images together at a given point
What is 3D Structure from Motion (SfM)?
Matching feature points in unordered image collections
What is Motion tracking?
Using artifical markers to allow detection and tracking of movement/motion
What is Face Detection?
Detecting whether an image is a face using points of interest or facial components
What are Haar Features?
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 does Haar Features work?
- 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)
What are the types of Haar Features?
- 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.
What is the purpose of Haar Features?
- 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.
What are the applications of Haar Features?
Faces
Stop signs
Any object basically
What are integral images?
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
What is feature descriptor?
It is a simplified representation of the image that contains only the most important information about the image.
What are some example of feature descriptors?
Histogram of Orientated Gradients (HOG)
What is Histogram of Orientated Gradients (HOG)?
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
What are the steps to do HOG?
- Preprocess the data (64x128)
- Calculate the Gradients
- Calculate the magnitude and orientation
- Calculate the histogram of gradient in 8x8
- Normalise the gradients in 16x16
- Generate the feature of the complete image (combine all blocks)
Understanding the step of HOG: Step 1 - Preprocess the data (64x128)
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
Understanding the step of HOG: Step 2 - Calculate the Gradients
Do this for every pixel, we are calculating Gx and Gy
- Find the change in x direction
- Find the change in y direction
Understanding the step of HOG: Step 3 - Calculate the magnitude and orientation
Using Gx and Gy calculate magnitude and orientation
maginitude = [(Gx)^2 + (Gy)^2) ^0.5
orientation = atan(Gy/Gx)
REFER TO SLIDES FOR EXAMPLE
Understanding the step of HOG: Step 4 - Calculate the histogram of gradient in 8x8
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.