NivaarExam PrepOfficial exam papers ↗

20-Bio-B4 Robotics · May 2015

Question 4 of 6: Image Matching

Nivaar worked solution (AI-drafted; not reviewed by a licensed engineer)

Notes on this paper

Paper format: National Exams, May 2015 — 04-Bio-B4 Image Processing. Three hours, open book (any paper notes or textbooks permitted, but no calculator or computer). Six questions of equal value (20 marks each); five constitute a complete paper and only the first five appearing in the answer book are marked. All six are solved here, because this set is a study resource rather than an examination script. Every question is essay/descriptive (definitions, algorithm design, system design); the only quantitative content is the computational-complexity discussion in Question 3(f)/(g).

Reference texts (the books a candidate should have reviewed for this subject):

Question 4: Image Matching (20 marks)

Question text not reproduced: the examination questions are © Engineers and Geoscientists BC. Open the official past paper (linked at the top of this page) to read the question, then follow the worked solution below.

(a) Why image search is harder than text search

Text has an explicit, discrete symbolic vocabulary, so a query can be matched to a document by exact (or lightly stemmed) keyword comparison. An image is a continuous, high-dimensional array of pixel intensities with no built-in semantic tokens: two pixel-wise very different images (a sunset photographed from different angles, times, or cameras) can be semantically identical, while two pixel-wise similar images can be semantically unrelated. This "semantic gap" between low-level pixel statistics and high-level meaning means similarity has to be inferred from features rather than matched exactly, and that inference must also be robust to viewpoint, scale, illumination, and compression changes that have no analogue in text.

(b) Problem statements

Similar-image search: given a query image $q$ and a database $D$, find the images $I \in D$ that minimize a perceptual/semantic distance $d_{\text{sem}}(q, I)$ computed from global content descriptors (colour, texture, learned embeddings), and return the top-$k$ by ascending distance. This is inherently an approximate, subjective notion of similarity. Matching-image search (near-duplicate detection): given $q$, find images $I \in D$ such that $I \approx T(q)$ for some geometric/photometric transform $T$ (crop, resize, rotate, recompress, colour-adjust) plus noise — a much more precisely defined problem, typically solved by finding a sufficient number of corresponding local keypoints between $q$ and $I$ and verifying they are consistent with a single transform $T$ (e.g. via RANSAC).

(c) Query parameters

For similar-image search: category/tag keywords, a reference colour palette or dominant colour, a texture-coarseness preference, and relative weights between colour/shape/texture in the distance metric. For matching-image search: the tolerance to scale/rotation/crop, the minimum number of verified inlier keypoint correspondences required to declare a match, and whether a partial (cropped) match should count as a hit.

(d) Features

Similar-image search needs global descriptors that summarize overall scene content: colour histograms/moments, texture statistics (e.g. GIST), bag-of-visual-words histograms, or a deep CNN embedding vector — effective because holistic similarity depends on the overall distribution of colour/texture/content, not on exact pixel correspondence. Matching-image search needs local, geometrically invariant keypoint descriptors (SIFT/SURF/ORB, per Question 1(g)) followed by geometric verification — effective because near-duplicates must be identified via corresponding local structure that survives cropping, resizing, and rotation, which a single global descriptor cannot localize or verify.

(e) Efficient search strategies

For similar-image search: index the (often high-dimensional) global descriptor vectors with approximate nearest-neighbour structures (locality-sensitive hashing, or product-quantized inverted files as in FAISS), optionally after PCA dimensionality reduction, so a query only compares against a small candidate shortlist rather than the whole database. For matching-image search: use a cheap perceptual hash (e.g. pHash) as a fast pre-filter to bucket likely near-duplicates before running expensive keypoint extraction/matching, and build an inverted file over quantized visual words (bag-of-visual-words with TF-IDF weighting) so a query's keypoints retrieve a short candidate list before full RANSAC geometric verification is run only on those candidates.