Download presentation
Presentation is loading. Please wait.
1
Fast multiresolution image querying CS474/674 – Prof. Bebis
2
Paper C. Jacobs, A. Finkelstein, and D. Salesin, “Fast multiresolution image quering”, Proceedings of SIGGRAPH, pp. 277-286, 1995
3
Problem Search an image database to retrieve images that are similar to a query image. “query by content” or “query by example” Typically, the K best matches are returned.
4
Challenges What features to use? How to tolerate image distortions? How to organize the data? How to search fast? How to reduce storage requirements?
5
Image Distortions This study considers two types of image distortion: –A low-resolution image from a scanner or video camera. –A rough sketch of the image painted by the user. paintedlow resolutiontarget
6
Traditional Metrics Traditional metrics based on the L 1 and L 2 norms cannot handle inexact matching and are time consuming. L1L1 L2L2 Q: query T: target Experiments using these metrics have shown that the target image is in the highest 1% of the retrieved images only 3% of the time.
7
Fast Retrieval Retrieval should be fast enough to handle tens of thousands of images at interactive rates. Efficient image representation Efficient database organization Fast metric computation
8
User Interface Can process a 128 x 128 image query on a database of 20,000 images in under 0.5 seconds *. Returns 20 highest- ranked targets at interactive rates! * Faster processing times should be possible using current technology!
9
Proposed Method: Key Ideas Multi-resolution image decomposition using Haar wavelets. Image similarity is based on a metric that compares how many significant wavelet coefficients the query has in common with potential targets. Organize data efficiently to facilitate fast computation of the metric and speed-up search.
10
Why using wavelets? The use of wavelets allows the resolutions of the query and target images to be different. Wavelet decompositions are fast to compute and yield a small number of coefficients. The signature can be extracted from a wavelet- compressed version of the image directly.
11
Color space Experimented with RGB, HSV, and YIQ color spaces. Wavelet transform was applied on each color channel separately. YIQ gave the best performance (i.e., for their data).
12
Wavelet Type Haar wavelets are the fastest to compute and simplest to implement. Other types of wavelets might give better results but at a higher cost.
13
Decomposition Type Experimented both with standard and non-standard decompositions for all three color spaces. Standard decomposition worked best (i.e., both for scanned and painted queries). Basis functions are normalized so they become orthonormal to each other (see lecture slides on wavelets).
14
Coefficient Truncation Keep only the coefficients with largest magnitude. –Improves speed and reduces storage requirements. –Improves discriminatory power of metric. 128 x 128 image 128 2 = 16,384 wavelet coefficients for each color channel. –The 60 largest coefficients in each channel worked best for painted queries. –The 40 largest coefficients in each channel worked best for scanned queries.
15
Coefficient Truncation (cont’d) wavelet decomposition truncated coefficients
16
Coefficient Quantization The mere presence or absence of these coefficients appears to be more important than their precise magnitudes. –Improves speed and reduces storage requirements. –Improves discriminatory power of metric. Quantize coefficients into three levels: +1, 0 and -1 –Large positive coefficients are quantized to +1 –Large negative coefficients are quantized to -1
17
Components of the metric (cont’d) truncated coefficients truncated and quantized coefficients
18
Wavelet-based metric Q and T represent a single color channel of the wavelet decomposition of the query and target images. Let Q[0, 0] and T[0, 0] be the scaling function coefficients (i.e., average intensity of that channel). Let and represent the truncated, quantized wavelet coefficients of Q and T (i.e., -1,0,1). w i,j : weights (determined statistically; allow for tuning the metric) Metric:
19
Simplifying the metric (1) Replace with (as effective as the original metric, faster to compute) (1 if true; 0 otherwise)
20
Simplifying the metric (cont’d) (2) Group terms together into "buckets" so that only a smaller number of weights w i,j needs to be determined. i,j
21
Simplifying the metric (cont’d) The function bin(i, j) groups different coefficients into a small number of bins (i.e., 6 bins per color channel): bin(i, j) = min(max(i, j), 5) Each bin is weighted by some constant w[b] –Weights were determined using a statistical test. 0 1 2 3 4 5
22
Simplifying the metric (cont’d) (3) Consider only the terms for which –Leads to even faster computations. –Allows for a query without much detail to match a very detailed target image. i,j
23
Simplifying the metric (cont’d) (4) Count the number of matching coefficients than the number of mismatching coefficients. –Use “search arrays” to implement this efficiently since the majority of database images will not match the query. (1 if true; 0 otherwise)
24
Simplifying the metric (cont’d)
25
The term does not depend on the target image and can be ignored: Final Metric:
26
Example
27
Search Arrays Use a set of six 2D arrays (i.e. search arrays) to organize the m coefficients from every target image T. There is an array for every combination of sign (+ or -) and color channel (Y, I, and Q): contains a list of all target images T having a large positive wavelet coefficient at [i,j] location, in color channel c. e.g.,
28
Search Arrays (cont’d) … T 1, T 9, T 22, … T 3, T 9, T 40, … … Compute a score for each target image found in T 1, T 22, T 98, …
29
Querying Using Search Arrays Steps (for each color channel c) (1)Compute the difference between the query’s average intensity Q c [0, 0] and those in the database. (2) For each of the m nonzero, truncated wavelet coefficients Q c [i, j], go through the list corresponding to D c + [i, j] or D c - [i, j] (i.e., depending on the sign of Q c [i, j]). (3) Update the score of each target image found in those lists.
30
Algorithm Preprocessing (1)Perform a standard 2D Haar wavelet decomposition of every image in the database. (2) Store T[0,0] for each color channel as well as the indices and signs of the m largest wavelet coefficients.
31
Algorithm (cont’d) Querying (1)Perform a standard 2D Haar wavelet decomposition on the query image. (2) Compute T[0,0] for each color channel as well as the indices and signs of the m largest wavelet coefficients (3) Compute the score of each target image using: (4) Return 20 highest-ranked target images
32
Examples Query examples using painted/scanned queries (ranks for database sizes: 1093 | 20,558)
33
Examples (cont’d) (ranks for database sizes: 1093 | 20,558) Interactive query examples using painted queries:
34
Success Rate L q : proposed metric Percentage of queries whose correct target was ranked among the top 1% of images in a database of 1093 images.
35
Time requirements L q : proposed metric Average times to match a single query in a database of 1093/20,558 images.
36
Extension V. Nikulin and G. Bebis, "Multiresolution Image Retrieval Through Fusion", SPIE Electronic Imaging (Storage and Retrieval Methods and Applications for Multimedia), San Jose, January 2004.
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.