English

Indexing and querying color sets of images

Data Structures and Algorithms 2016-08-30 v1

Abstract

We aim to study the set of color sets of continuous regions of an image given as a matrix of mm rows over nmn\geq m columns where each element in the matrix is an integer from [1,σ][1,\sigma] named a {\em color}. The set of distinct colors in a region is called fingerprint. We aim to compute, index and query the fingerprints of all rectangular regions named rectangles. The set of all such fingerprints is denoted by F{\cal F}. A rectangle is {\em maximal} if it is not contained in a greater rectangle with the same fingerprint. The set of all locations of maximal rectangles is denoted by L.\mathcal{L}. We first explain how to determine all the L|\mathcal{L}| maximal locations with their fingerprints in expected time O(nm2σ)O(nm^2\sigma) using a Monte Carlo algorithm (with polynomially small probability of error) or within deterministic O(nm2σlog(Lnm2+2))O(nm^2\sigma\log(\frac{|\mathcal{L}|}{nm^2}+2)) time. We then show how to build a data structure which occupies O(nmlogn+L)O(nm\log n+\mathcal{|L|}) space such that a query which asks for all the maximal locations with a given fingerprint ff can be answered in time O(f+loglogn+k)O(|f|+\log\log n+k), where kk is the number of maximal locations with fingerprint ff. If the query asks only for the presence of the fingerprint, then the space usage becomes O(nmlogn+F)O(nm\log n+|{\cal F}|) while the query time becomes O(f+loglogn)O(|f|+\log\log n). We eventually consider the special case of squared regions (squares).

Keywords

Cite

@article{arxiv.1608.07847,
  title  = {Indexing and querying color sets of images},
  author = {Djamal Belazzougui and Roman Kolpakov and Mathieu Raffinot},
  journal= {arXiv preprint arXiv:1608.07847},
  year   = {2016}
}

Comments

20 pages, 5 figures