How muzairzahid/content-based-image-retrieval works
Project Type and Purpose
• This is a full-stack MATLAB application with a GUI front-end for querying a local image database.
File Structure
• CBIR.fig + CBIR.m — GUI definition and controller code
• Extract_features.m — feature-extraction engine (offline + online)
• images/ (implied) — local dataset folder of raw images
• README.md — detailed algorithm description (HSV histograms, auto-correlograms, wavelets, etc.)
README for Architecture Insights
• Two main stages: Offline indexing (extract and store features for entire dataset) and Online querying (extract features of user image, compute distances, rank, display).
• Similarity = normalized distance measure.
Main Components
a. GUI Layer (CBIR.fig / CBIR.m)
b. Controller Logic (callback routines that orchestrate offline vs. online flows)
c. Feature Extraction Module (Extract_features.m)
d. Feature Database (serialized MAT-files or inverted index for 1,000 images)
e. Raw Image Store (“images” folder)
f. Similarity Engine (distance calculator)
g. Output Renderer (GUI result panel)
Relationships and Data Flow
• Offline Path (one-time or on dataset update):
1. Read each image from images/
2. Pass to Feature Extraction Module
3. Store feature vectors in Feature Database
• Online Path (per query):
1. User selects image in GUI
2. Controller calls Extract_features on query
3. Query vector + Feature Database → Similarity Engine
4. Top-10 matches returned → GUI display
Architectural Patterns and Principles
• MVC-like separation:
– View = GUI (.fig file)
– Controller = CBIR.m callbacks
– Model = image store + feature database
• Offline/online pipeline split (batch indexing vs. interactive query)
Technologies and Frameworks
• MATLAB GUI framework (.fig + .m)
• Core MATLAB functions for image I/O, histogram, Gabor, wavelet transforms
• .mat file storage for precomputed features
Essential Elements
• Call out any config files or parameters (e.g., quantization bins: H=8,S=2,V=2).