Color Space Conversion, Illumination Compensation, and Feature Matching in Visual Perception

Color Space Conversion: YCbCr to RGB

The YCbCr color space separates luminance (Y) from chrominance (Cb, Cr). Conversion to RGB is a linear transformation defined by the following matrix:

R = Y                         + 1.402   * (Cr - 128)
G = Y - 0.34414 * (Cb - 128) - 0.71414 * (Cr - 128)
B = Y + 1.772   * (Cb - 128)

Alternatively, using the matrix form:

[ Y ]   [ 0.299    0.587    0.114 ] [ R ]
[Cb] = [-0.1687  -0.3313   0.5   ] [ G ]
[Cr]   [ 0.5     -0.4187  -0.0813] [ B ]

Illumination Compensation

The perceived brightness is a logarithmic function of incident light intensity. A common compensation model is:

g(x,y) = 255 * (ln(f(x,y) - B) / (ln(E) - ln(B))) for B <= f(x,y) <= E g(x,y) = 0 for f(x,y) < B g(x,y) = 255 for f(x,y) > E

Where B and E are dynamically determined from the histogram:

  1. Compute the normalized histogram Pr(rk) = nk / N.
  2. Compute the cumulative sum Sk = sum(Pr(rk)).
  3. Find the gray level where Sk first exceeds 5% (with sufficient pixel count mk > 100) and set B to that level.
  4. Find the gray level where Sk first exceeds 95% (with mk > 100) and set E to that level.

Algorithm flow:

Input Image                Output Image
    |                           ^
    v                           |
RGB -> YCbCr               YCbCr -> RGB
    |                           ^
    v                           |
Histogram Equalization -> Adaptive Non-linear Transform

Evaluation Metrics for Multi-Object Tracking

Multi-object tracking (MOT) evaluation metrics:

  • MOTA: Multiple Object Tracking Accuracy – combines false positives, false negatives, and identity switches.
  • IDF1: Ratio of correctly identified detections over the average number of ground-truth and computed detections.
  • FP: False Positives.
  • FN: False Negatives.
  • MT: Mostly tracked trajectories (tracked for more than 80% of lifespan).
  • ML: Mostly lost trajectories (tracked for less than 20% of lifespan).
  • IDS: Number of identity switches.
  • FM: Number of fragmentations (track breaks).

Feature Matching Algorithms

SIFT (Scale-Invariant Feature Transform)

Steps:

  1. Scale-space extrema detection
  2. Keypoint localiztaion
  3. Orientation assignment
  4. Keypoint descriptor generation

Limitation: High computational cost, poor real-time performance.

SURF (Speeded-Up Robust Features)

Advantage: Faster than SIFT due to integral images and Hessian-based detection.

BRIEF (Binary Robust Independent Elementary Features)

Steps:

  1. Compute binary descriptors by comparing pixel intensities around keypoints.
  2. Match descriptors using Hamming distance (XOR operation).
  3. Use indexing and clustering to accelerate matching.

FAST (Features from Accelerated Segment Test)

Detects corners by comparing a pixel with a circle of surrounding pixels. A threshold controls the number of features.

Perceptual Hashing (pHash)

Process:

  1. Reduce image to 8x8 pixels (64 pixels) to discard high-frequency details.
  2. Convert to grayscale (64 levels).
  3. Compute the average gray value.
  4. Compare each pixel to the average: set to 1 if greater, 0 otherwise.
  5. Form a 64-bit hash (the fingerprint).
  6. Compare images using Hamming distance: distance < 5 indicates similarity.

Tags: color space conversion YCbCr RGB illumination compensation histogram equalization

Posted on Thu, 08 Oct 2026 16:27:20 +0000 by drock