Sections

Post Details

Digimatx Logo

feature extraction

Share: Facebook Twitter LinkedIn Email

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)
Memory Trick: β€œSIFT = Smart detective β€” finds stable keypoints even when zoomed or rotated.”

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)
Memory Trick: β€œSURF = SIFT on a speed bike.”

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!
Memory Trick: β€œBRISK = super fast binary features for phones and real-time apps.”

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

  1. 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 πŸ’Ž.”

  2. 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.”

  3. 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.”

  4. 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

SURF is a fast feature extraction technique inspired by SIFT.
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

SURF uses a fast filter technique to find corners and blobs quickly, just like scanning with turbo zoom.

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.

Overview:
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

These numbers are example grayscale intensities (0 = black, 255 = white).
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)

BRISK uses a pre-selected set of robust comparison pairs. For this example we will use 16 pairs chosen from the 12 samples. Each row below is one comparison that produces one output bit.
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)

For each pair: compare numeric values. If left > right β†’ bit = 1; else 0. We show the computation for all 16 bits.
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.

Descriptor A (bits 1..16): 1 1 0 0 0 0 1 1 1 1 0 1 1 0 1 0
We can show as grouped bytes: 11000011 11011010 (just grouping for readability).

Step 4 β€” Compute each bit for Patch B (numeric comparison)

Repeat the same comparisons using Patch B values.
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
Descriptor B (bits 1..16): 1 1 1 0 0 0 1 1 1 1 0 1 1 0 1 0
Grouped: 11100011 11011010

Step 5 β€” Hamming distance (Descriptor A vs Descriptor B)

We compare descriptors bit-by-bit and count differences (XOR then popcount). Show explicit XOR result and count.
Descriptor A:
11000011 11011010
Descriptor B:
11100011 11011010
XOR (A XOR B) β€” 1 if bits differ, 0 if same:
00100000 00000000
Popcount (count ones in XOR) = 1
Hamming distance = 1 β†’ descriptors are almost identical β†’ good match.

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)

If the patch rotates, the sample indices shift. BRISK finds dominant orientation and reindexes the samples so descriptor stays stable. Here we simulate a rotation that shifts sample indexes by +2 (circular shift).
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)
If we naively compute comparisons on the rotated indexing (without normalization) we would get different bits. BRISK estimates the dominant angle and re-aligns the sampling ring (re-indexing) back to canonical order before forming bits β€” restoring the original descriptor.

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.
If you want, I can provide this same walkthrough but with: 32-bit descriptor, XOR computations shown in binary bytes, or downloadable PNGs of the tables.
Tip: You can copy the numeric tables into a spreadsheet to practiceβ€”change values and watch which bits flip.

 

© 2025 Digimatx | Privacy Policy