An algebra for local histograms

Jon Sporring, Sune Darkner

Abstract

Local overlapping histograms are fundamental tools in computer vision, yet the mathematical constraints imposed by their overlaps are rarely formalized. This paper introduces a rigorous "algebra" for local histograms, treating them as finitely-additive set functions. By partitioning overlapping domains into disjoint sub-domains, we provide a method to quantify the "metameric classes"—sets of distinct functions that share identical histogram signatures. We further present a recursive "sifting algorithm" to reconstruct these functions. Our results demonstrate that even dense overlapping histograms can preserve multiple distinct images, highlighting the inherent information loss in statistical feature representations.

Introduction

In image processing and computer vision, local descriptors like SIFT or HOG represent image regions using histograms. Because these local windows typically overlap, they share underlying pixels, making the resulting histograms interdependent. A change in a single pixel value can constrain or alter multiple neighboring histograms. This paper addresses the theoretical limits of this representation: given a set of overlapping histograms, how many degrees of freedom remain? Understanding this relationship is essential for determining how much information is preserved when data is reduced to local statistical features.

Methods

The authors approach the problem through three primary stages: domain partitioning, the definition of a histogram algebra, and the development of a reconstruction algorithm.

Domain Partitioning

To manage overlaps, the authors employ a powerset-based method to repartition overlapping domains into a set of unique, non-overlapping (disjoint) sub-domains. This step is critical because histograms on disjoint sets are additive ($h_{A \cup B} = h_A + h_B$).

Figure 1: The naming convention for generating unique, non-overlapping domain parts from overlapping sets.

Histogram Algebra

By formalizing histograms as finitely-additive set functions, the authors can apply set-theoretic logic to statistical data. The number of functions sharing a single histogram is calculated using a multinomial coefficient. When windows overlap, the total number of functions is the product of the multinomial coefficients of the underlying disjoint parts.

The Sifting Algorithm

To identify the actual functions that match a set of histograms, the authors developed a recursive "sifting algorithm" implemented in F#. The algorithm iteratively updates a list of candidate functions as it "sweeps" through the local histograms, discarding any candidates that violate the histogram constraints.

Figure 2: Recursive evaluation of the sifting algorithm. Nodes represent (j, k) pairs, where j is the index of the histogram value and k is the number of values still to be decided.

Results

The paper provides both theoretical proofs and proof-of-concept reconstructions.

  • Exact Counting: The authors provide a closed-form equation to calculate the number of unique functions for a given set of histograms.
  • Reconstruction: The sifting algorithm successfully identifies all possible images for a set of constraints. In one test case involving a $10 \times 10$ image and $3 \times 3$ windows, the algorithm found exactly two distinct images that shared the same local histograms.
  • Complexity Bounds: The search space for these problems is vast. For a $10 \times 10$ image with an alphabet of 3 colors and $3 \times 3$ windows, there are over $1.3 \times 10^{14}$ possible hypotheses, illustrating the computational intensity of the reconstruction process.

Discussion and Limitations

While the algebra provides a formal foundation for local histograms, scalability remains a significant hurdle. The number of hypotheses grows exponentially with image size, alphabet size, or window size, making the current sifting algorithm impractical for high-resolution data without further optimization. Additionally, the work is limited to discrete domains and assumes noise-free histograms. Future work is required to bridge these results to continuous signals and real-world scenarios involving statistical noise or binning errors.

Summary updated

BibTeX
@article{sporring2022algebra,
  author = {Jon Sporring and Sune Darkner},
  title = {{An algebra for local histograms}},
  journal = {Frontiers of Computer Science},
  year = {2022},
  doi = {10.3389/fcomp.2022.939563},
}

Loading related content...

Figure