Post Details
feature extraction
Feature Extraction Techniques : –
1. SIFT β Scale-Invariant Feature Transform
Idea: Find strong, unique points in an image that stay the same even if the image gets bigger, smaller, or rotated.
Example: You zoom into a building photo β windows & corners remain detectable.
Original Image: π Zoomed Image: π Rotation: πβ€Ύ (Same strong points found each time)
2. SURF β Speeded-Up Robust Features
Idea: Like SIFT but **faster**. It finds strong features quickly using a quicker algorithm.
Example: Fast motion video footage β SURF detects object corners quickly.
SIFT: πππ (slow but accurate) SURF: β‘πβ‘ (faster, still strong features)
3. BRISK β Binary Robust Invariant Scalable Keypoints
Idea: A fast, lightweight method using binary patterns to detect keypoints. Great for **real-time** or mobile apps.
Example: Face recognition on a smartphone β BRISK is fast and low power.
BRISK uses 0-1 binary patterns: [1100101] β feature pattern Very fast and light!
Quick to Remember
- SIFT β accurate super detective (works even when zoomed/rotated)
- SURF β SIFT on turbo mode (faster)
- BRISK β fast binary ninja for mobile and real-time applications
Summary Table
| Method | Key Idea | Best For | Memory Trick |
|---|---|---|---|
| SIFT | Finds stable unique points | High accuracy, zoom/rotation changes | Smart detective |
| SURF | Fast SIFT-like features | Speed-required vision tasks | SIFT on turbo |
| BRISK | Binary fast feature detection | Mobile, real-time, low-power | Binary ninja |
************************************************
SIFT β Easy Guide π΅οΈββοΈ
Step 1: Look at the image in different zooms π
Idea: Blur the image at different levels to simulate zooming. Helps detect points that stay strong at any zoom.
Original
Blur1
Blur2
Blur3
Blur4
Memory: βDetective looks at all zoomed pictures to find clues that never disappear.β
Step 2: Find strong points π΄βͺ
Idea: Detect corners or blobs that are visible in multiple zooms.
Detected Keypoints
Memory: βOnly strong corners survive the detective test πͺ.β
Step 3: Give each point a direction β
Idea: Assign an arrow showing the main edge direction. Handles rotated images.
Arrow = orientation
Memory: βDetective rotates compass π§ to match image rotation.β
Step 4: Make a fingerprint π
Idea: Measure small edge directions around each point β create unique pattern (fingerprint).
Patch gradients β fingerprint
Memory: βFingerprint π tells the detective which clue is which.β
(
After Keypoints Are Found in Multiple Zooms
-
Filter Out Weak Points
-
Not all points are useful. Some may be caused by noise or small details.
-
SIFT keeps only strong, stable keypoints that appear in multiple zoom levels.
-
Memory trick: βDetective ignores weak clues β, keeps only strong clues π.β
-
-
Assign Orientation (Rotation Handling)
-
Each keypoint gets a direction arrow based on the main edge direction around it.
-
Why? If the image is rotated, the keypoint can still be recognized because its arrow rotates with the image.
-
Example: Window corner rotates β arrow rotates β still the same keypoint.
-
Memory trick: βDetective rotates compass π§ to match the scene.β
-
-
Create Descriptor (Fingerprint of Keypoint)
-
Around each keypoint, SIFT looks at edges and their directions in a small window.
-
Converts this information into a unique pattern of numbers (like a fingerprint).
-
Purpose: This fingerprint is used to match the same point in other images, even if rotated or zoomed.
-
Memory trick: βDetective takes a fingerprint π for every clue so he can recognize it anywhere.β
-
-
Matching Between Images
-
Take the fingerprints of keypoints from two images and compare them.
-
If fingerprints match β itβs the same point in the real world.
-
Can be used for: object detection, panorama stitching, or tracking.
-
)
Multiple Zoom Keypoints π
β
Filter Strong Keypoints β
β
Assign Orientation β
β
Create Fingerprint π
β
Match Points Across Images π
Quick Summary π
| Step | Action | Why |
|---|---|---|
| 1 | Zoom/blur | Find clues stable at any size |
| 2 | Keypoints | Pick strong corners/blobs |
| 3 | Orientation | Handle rotation |
| 4 | Fingerprint | Recognize same point |
Memory Story π§
Detective SIFT: zooms in/out π, keeps strong clues π΄βͺ, rotates compass π§, makes fingerprints π, matches clues across images β
*********************************************************************
SURF β Speeded-Up Robust Features
Definition
It detects strong feature points but runs much faster, making it suitable for real-time applications.
Key Features
- Faster than SIFT
- Scale & rotation invariant
- Uses box filters (fast convolution)
- Strong against blur & lighting changes
Simple Logic
Comparison Example
SIFT: πππ (Accurate but slower) SURF: β‘πβ‘ (Fast + strong features)
Applications
- Real-time video analysis
- Traffic and surveillance
- Gesture and face detection
- Robotics & drones
***********************************************
BRISK
Every computation shown: sample values β comparisons β bits β descriptors β Hamming distance. You can copy the numbers and re-run by hand.
We’ll use 12 sample points around a keypoint (I1..I12). BRISK compares a selected set of pairs (predefined). For each pair (Ia, Ib): if Ia > Ib β bit = 1, else bit = 0.
We’ll compute a 16-bit example descriptor from those comparisons for two patches (A and B), then compute the Hamming distance between descriptors (how many bits differ).
Step 1 β Sample intensities (grayscale) at 12 positions
| Sample | I1 | I2 | I3 | I4 | I5 | I6 | I7 | I8 | I9 | I10 | I11 | I12 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Patch A (values) | 220 | 198 | 134 | 120 | 90 | 80 | 95 | 140 | 180 | 205 | 215 | 230 |
| Patch B (values β slightly different / noisy) | 218 | 195 | 138 | 125 | 85 | 82 | 100 | 136 | 178 | 200 | 217 | 228 |
Notes: Patch B simulates small image noise or slight illumination change. These values are realistic grayscale numbers you might extract from pixels or averaged local patches.
Step 2 β The chosen comparisons (pair list)
| Bit # | Compare (A vs B) | Meaning |
|---|---|---|
| 1 | I1 > I4 | Is sample 1 brighter than sample 4? |
| 2 | I2 > I7 | 2 vs 7 |
| 3 | I3 > I8 | 3 vs 8 |
| 4 | I5 > I12 | 5 vs 12 |
| 5 | I6 > I11 | 6 vs 11 |
| 6 | I9 > I2 | 9 vs 2 |
| 7 | I10 > I3 | 10 vs 3 |
| 8 | I8 > I5 | 8 vs 5 |
| 9 | I12 > I1 | 12 vs 1 |
| 10 | I11 > I4 | 11 vs 4 |
| 11 | I7 > I10 | 7 vs 10 |
| 12 | I2 > I5 | 2 vs 5 |
| 13 | I3 > I6 | 3 vs 6 |
| 14 | I4 > I9 | 4 vs 9 |
| 15 | I1 > I11 | 1 vs 11 |
| 16 | I7 > I8 | 7 vs 8 |
You can choose a different comparison set; BRISK defines robust pairs in its design. Here we’ve chosen 16 to make a compact example.
Step 3 β Compute each bit for Patch A (show numeric comparison)
| Bit # | Pair | Value (left) | Value (right) | Comparison | Bit |
|---|---|---|---|---|---|
| 1 | I1 > I4 | 220 | 120 | 220 > 120 β true | 1 |
| 2 | I2 > I7 | 198 | 95 | 198 > 95 β true | 1 |
| 3 | I3 > I8 | 134 | 140 | 134 > 140 β false | 0 |
| 4 | I5 > I12 | 90 | 230 | 90 > 230 β false | 0 |
| 5 | I6 > I11 | 80 | 215 | 80 > 215 β false | 0 |
| 6 | I9 > I2 | 180 | 198 | 180 > 198 β false | 0 |
| 7 | I10 > I3 | 205 | 134 | 205 > 134 β true | 1 |
| 8 | I8 > I5 | 140 | 90 | 140 > 90 β true | 1 |
| 9 | I12 > I1 | 230 | 220 | 230 > 220 β true | 1 |
| 10 | I11 > I4 | 215 | 120 | 215 > 120 β true | 1 |
| 11 | I7 > I10 | 95 | 205 | 95 > 205 β false | 0 |
| 12 | I2 > I5 | 198 | 90 | 198 > 90 β true | 1 |
| 13 | I3 > I6 | 134 | 80 | 134 > 80 β true | 1 |
| 14 | I4 > I9 | 120 | 180 | 120 > 180 β false | 0 |
| 15 | I1 > I11 | 220 | 215 | 220 > 215 β true | 1 |
| 16 | I7 > I8 | 95 | 140 | 95 > 140 β false | 0 |
Concatenate bits in order 1β16 to create descriptor A.
Step 4 β Compute each bit for Patch B (numeric comparison)
| Bit # | Pair | Value (left) | Value (right) | Comparison | Bit |
|---|---|---|---|---|---|
| 1 | I1 > I4 | 218 | 125 | 218 > 125 β true | 1 |
| 2 | I2 > I7 | 195 | 100 | 195 > 100 β true | 1 |
| 3 | I3 > I8 | 138 | 136 | 138 > 136 β true | 1 |
| 4 | I5 > I12 | 85 | 228 | 85 > 228 β false | 0 |
| 5 | I6 > I11 | 82 | 217 | 82 > 217 β false | 0 |
| 6 | I9 > I2 | 178 | 195 | 178 > 195 β false | 0 |
| 7 | I10 > I3 | 200 | 138 | 200 > 138 β true | 1 |
| 8 | I8 > I5 | 136 | 85 | 136 > 85 β true | 1 |
| 9 | I12 > I1 | 228 | 218 | 228 > 218 β true | 1 |
| 10 | I11 > I4 | 217 | 125 | 217 > 125 β true | 1 |
| 11 | I7 > I10 | 100 | 200 | 100 > 200 β false | 0 |
| 12 | I2 > I5 | 195 | 85 | 195 > 85 β true | 1 |
| 13 | I3 > I6 | 138 | 82 | 138 > 82 β true | 1 |
| 14 | I4 > I9 | 125 | 178 | 125 > 178 β false | 0 |
| 15 | I1 > I11 | 218 | 217 | 218 > 217 β true | 1 |
| 16 | I7 > I8 | 100 | 136 | 100 > 136 β false | 0 |
Step 5 β Hamming distance (Descriptor A vs Descriptor B)
What happened?
- Only bit #3 differed between A and B (A had 0; B had 1). All other bits matched.
- Because BRISK uses many comparisons, a few small intensity changes produce only a few bit flips β descriptors remain robust.
Step 6 β Quick demo: rotation & reindexing (why orientation normalization matters)
| Sample index | Original Patch A value | Rotated indexing (shift +2) |
|---|---|---|
| I1 | 220 | value now at position I3 (134) |
| I2 | 198 | value now at position I4 (120) |
| I3 | 134 | β I5 (90) |
| I4 | 120 | β I6 (80) |
| I5 | 90 | β I7 (95) |
| I6 | 80 | β I8 (140) |
| I7 | 95 | β I9 (180) |
| I8 | 140 | β I10 (205) |
| I9 | 180 | β I11 (215) |
| I10 | 205 | β I12 (230) |
| I11 | 215 | β I1 (220) |
| I12 | 230 | β I2 (198) |
Quick practical tips (for exams & implementation)
- Write down the sample values (I1..IN) first β that’s the raw input for BRISK comparisons.
- List the comparison pairs explicitly (as we did). For each pair, compute left_value > right_value β 1 or 0.
- Concatenate bits in a fixed order to build the descriptor (order matters).
- For matching, XOR the two binary strings and count 1s (popcount) β that’s the Hamming distance.
- Rotation invariance: BRISK computes an orientation and reindexes samples; scale invariance: use multi-scale detection.