Matching Pixels Using Co-Occurrence Statistics

Rotal Kat, Roy Josef Jevnisek, Shai AvidanCVPR 2018

Abstract

We propose a new error measure for matching pixels that is based on co-occurrence statistics. The measure relies on a co-occurrence matrix that counts the number of times pairs of pixel values co-occur within a window. The error incurred by matching a pair of pixels is inverse proportional to the probability that their values co-occur together, and not their color difference. This measure also works with features other than color, e.g. deep features. We show that this improves the state-of-the-art performance of template matching on standard benchmarks. We then propose an embedding scheme that maps the input image to an embedded image such that the Euclidean distance between pixel values in the embedded space resembles the co-occurrence statistics in the original space. This lets us run existing vision algorithms on the embedded images and enjoy the power of co-occurrence statistics for free. We demonstrate this on two algorithms, the Lucas-Kanade image registration and the Kernelized Correlation Filter (KCF) tracker. Experiments show that performance of each algorithm improves by about 10%.

Introduction

Measuring similarity between pixels is a foundational task in computer vision, underpinning applications from stereo matching to object tracking. Traditionally, the Sum-of-Squared Differences (SSD) has been the standard metric, relying on the Euclidean distance between pixel intensities. However, SSD is notoriously sensitive to noise, small deformations, and outliers. While patch-level descriptors like SIFT or deep features offer greater robustness, they often sacrifice the precise localization required for high-fidelity pixel matching. This paper introduces a novel approach that shifts the focus from raw intensity differences to the statistical relationships between pixel values.

Methodology

Co-occurrence Statistics and PMI

The core premise is that pixel values belonging to the same object or texture will co-occur frequently within a local spatial window. The method begins by constructing a Co-occurrence Matrix ($C$), which counts these spatial pairings across the image. To prevent common background colors (like a clear sky) from dominating the statistics, the matrix is normalized into a Pointwise Mutual Information (PMI) matrix ($M$).

The PMI matrix $M$ captures the statistical relationships between pixel values, penalizing common background colors and rewarding unique co-occurrences.

This normalization ensures that the metric rewards pairs that specifically co-occur—such as the distinct orange and black patterns of a tiger—while penalizing ubiquitous values. The resulting Co-Occurrence Template Matching (CoTM) algorithm maximizes the sum of these PMI scores rather than minimizing intensity differences.

Statistical Embedding

A key contribution of this work is an embedding scheme that enables the use of co-occurrence statistics with existing vision frameworks. By applying Multi-Dimensional Scaling (MDS), the original image is mapped into a $d$-dimensional space where the standard Euclidean distance between pixels approximates their co-occurrence cost. This "plug-and-play" capability allows legacy algorithms, such as Lucas-Kanade registration or modern KCF trackers, to benefit from co-occurrence statistics without internal modification.

Experimental Results

Performance Benchmarks

The proposed method was evaluated on subsets of the Object Tracking Benchmark (OTB). On a challenging 105-pair subset featuring occlusions and non-rigid deformations, CoTM using simple RGB values achieved an Area Under Curve (AUC) of 0.62, outperforming standard SSD on deep features (0.55). When combined with deep features, the performance reached an AUC of 0.67.

Localization and Robustness

Qualitative analysis reveals that CoTM produces significantly sharper and more localized matching heatmaps compared to other state-of-the-art methods. This precision is maintained even across temporal gaps, as demonstrated in tests with frame intervals up to 100 frames.

Comparison of matching heatmaps showing the high localization precision of the co-occurrence based approach.

Furthermore, applying the embedding scheme to the Lucas-Kanade (LK) registration and the Kernelized Correlation Filter (KCF) tracker resulted in a consistent 10% performance improvement across the board.

Conclusion and Limitations

By leveraging global co-occurrence statistics, this method provides a robust alternative to Euclidean-based pixel matching that excels at capturing texture-like relationships. While highly effective for color images, the method currently faces limitations with grayscale data due to insufficient statistical "bins." Future work may address challenges related to significant illumination changes and the computational overhead of the initial quantization and embedding steps.

Summary updated

BibTeX
@inproceedings{kat2018matching,
  author = {Rotal Kat and Roy Josef Jevnisek and Shai Avidan},
  title = {{Matching Pixels Using Co-Occurrence Statistics}},
  booktitle = {IEEE/CVF Conference on Computer Vision and Pattern Recognition},
  year = {2018},
  url = {https://openreview.net/forum?id=HyZuTC-_WB},
}
Figure