Experiments in Example-based Image Filter Retrieval

Pedro Torres, Simon Colton, Stefan M. RügerCIAEM 2008

Abstract

Identifying the specific digital filter applied to an image is a computationally expensive task when using traditional brute-force methods. This paper introduces the RETRIEVE algorithm, an efficient example-based retrieval system that identifies filters by comparing image features against a pre-computed database of "landmark" images. Our approach achieves over 92% accuracy in identifying the correct filter from a library of 1,000 candidates in under 300 milliseconds, representing a significant improvement over naïve search methods.

Introduction

In fields such as graphic design and medical imaging, users frequently encounter filtered images and wish to replicate the specific visual effect. Modern image editing software, such as Adobe Photoshop, contains thousands of filters, each with numerous parameters, making manual identification nearly impossible. The "naïve" approach—applying every available filter to an original image to find a match—is computationally prohibitive, potentially taking hours for large libraries. This paper addresses the need for a near-instantaneous search mechanism by shifting the computational burden to an offline pre-computation phase.

Methodology: The RETRIEVE Algorithm

The authors propose the RETRIEVE algorithm, which utilizes a pre-filtered database of 50 "landmark" images to facilitate rapid search.

Offline Phase

Every filter in the 1,000-entry library is applied to all 50 landmark images. These resulting images are then "annotated" into mathematical feature vectors. The system uses a weighted combination of four features: Gabor filters for texture, HSV and RGB histograms for color, and Tamura features for granularity and directionality.

Online Retrieval

When a user provides an original image ($I_U$) and its filtered counterpart ($I'_U$), the system performs the following:

  1. Identifies $N$ landmark images most similar to $I_U$.
  2. Examines the pre-computed filtered versions of these specific landmarks.
  3. Determines which filters produced changes in the landmarks that most closely mirror the transformation between $I_U$ and $I'_U$.
Example of a procedurally generated filter tree and its visual effect on a portrait image.

Experimental Setup and Datasets

The study utilized 50 diverse images from the Corel Stock Photo Library, including portraits, cityscapes, and landscapes. The filter library consisted of 1,000 procedurally generated filters. These filters were constructed as trees of operations, combining fundamental transforms (e.g., inverse, median, threshold) with various compositors (e.g., add, fade, multiply). On average, each filter tree contained 13.6 nodes, representing complex visual transformations.

Key Results and Insights

The RETRIEVE algorithm demonstrated high efficiency and accuracy across several experimental configurations.

Performance and Accuracy

The system achieved a 92.8% probability of including the correct filter within the top 10 results. In terms of speed, the algorithm performed searches in 10 to 300 milliseconds, a stark contrast to the approximately 7 minutes required by a naïve approach on contemporary hardware.

Performance analysis of the RETRIEVE algorithm across various parameters, showing high probability of correct retrieval and low computational time.

Parameter Sensitivity

  • The "N=3" Sweet Spot: Interestingly, increasing the number of landmark images for comparison beyond 2 or 3 actually degraded performance. This suggests that noise from less-relevant image content outweighs the benefits of additional data points.
  • Feature Importance: Analysis revealed that color-based features (RGB and HSV histograms) were significantly more predictive of filter behavior than texture-based features like Tamura.
  • Blind Retrieval: In scenarios where the original image was unavailable, the system could still identify the correct filter with ~91% probability within the top 50 results.

Conclusion

The RETRIEVE algorithm successfully reduces a massive image-processing problem into a simple vector-distance calculation. By leveraging pre-computed annotations on landmark images, the system provides a scalable and fast solution for filter identification. Future work will explore larger database scales, industry-standard filter sets, and the use of machine learning to optimize distance metrics based on user aesthetic preferences.

Summary updated

BibTeX
@inproceedings{torres2008experiments,
  author = {Pedro Torres and Simon Colton and Stefan M. Rüger},
  title = {{Experiments in Example-based Image Filter Retrieval}},
  booktitle = {CIAEM},
  year = {2008},
}
Figure