Prototyping Color-Based Image Retrieval With MATLAB: Petteri Kerminen, Moncef Gabbouj
Prototyping Color-Based Image Retrieval With MATLAB: Petteri Kerminen, Moncef Gabbouj
1
Tampere University of Technology, Pori, Finland
2
Tampere University of Technology, Signal Processing Laboratory, Tampere, Finland
Abstract
In the MuVi-project [1] this kind of tool is under
Content-based retrieval of (image) databases has construction. It will cover the properties presented above.
become more popular than before. Algorithm develop- Research work on content-based image retrieval has been
ment for this purpose requires testing/simulation tools, done in [2 – 6]. The system, which is presented in this
but there are no suitable commercial tools on the paper, is a simulation environment, where MuVi’s color
market. content based retrieval has been developed and tested.
A simulation environment for retrieving images from
database according histogram similarities is presented 2. System development
in this paper. This environment allows the use of MATLAB is an efficient program for vector and matrix
different color spaces and numbers of bins. The data processing. It contains ready functions for matrix
algorithms are implemented with MATLAB. Each color manipulations and image visualization and allows a
system has its own m-files. program to have modular structure. Because of these facts
The phases of the software building process are pre- MATLAB has been chosen as prototyping software.
sented from system design to graphical user interface
(GUI). The functionality is described with snapshots of 2.1 System design
GUI.
Before any m-files have been written, the system design
has been done. A system design for the HSV (hue,
1. Introduction saturation and value) color system based retrieval process
is presented in Figure 1. Similar design has been done for
Nowadays there are thousands or hundreds of all used color systems.
thousands of digital images in an image database. If the
user wants to find a suitable image for his/her
purposes, he/she has to go through the database until tesths27 image_pos
the correct image has been found or use a reference
book or some “intelligent” program. Video on demand
(VoD) services also requires an intelligent search
system for end-users. VoD systems’ search methods
differ slightly from image database’s methods. hs27read dif_hsv
Figure 2: GUI before the search image selection. In a multi-level search two different color systems /
histograms are used. During the first loop the roughly
In Figure 3 the search screen is presented just before quantized histograms are used and during the second loop
starting a search. The user is shown a search image, the more accurate histograms are utilized for the best
and in this way he/she can be sure that the search will matches from the first loop. The color system on the
be made with the correct image. second loop can be either the same as on the first loop or a
different one. For queries with one-level search the
selection of a second color system is disabled. The user
can select the number of retrieved images at the final
stage. The software can be linked to many image databases
and the user can select a database where the query will be
directed.
The user can select a search image either from the same
database where the query will be directed to (default) or
from any directory in his/her PC. The selection will be
made with the file – open dialog, which is presented in
Figure 5. The form can be cleared with the “Reset” button.
A query is executed with the “Search” button. Finally the
results of the search will appear on the screen in a separate
window, as presented in Figure 6. Earlier [8] the software
opened each image in a separate window and
evaluating/saving the results is more difficult than after the
improvement. In the top left top corner is the original
query image. Below that image the best matches are
Figure 3: GUI just before running a query.
presented in a descending order of similarity from left to
right and from top to bottom. The user can select suitable
The results of the query will be presented on the screen images for further use with the “Copy selected” or the
in the format which is presented in Figure 6. “Print selected” buttons. The “New search” button closes
this form and goes back to the original search form. The
“Search similar” button executes a new search where a
3. Using the software query histogram is composed of histograms of the selected
The first screen has already been presented in Figure 2. images. If the user has selected a larger number than 21 as
The user can choose from pop-up menus (see Figure “Number of matching images”, the best matches will be
4), if the search is made with one a color system or as shown on multiple screens. The user can browse these
a multi-level search. In a one-level search a roughly pages with the “Previous page” and “Following page”
buttons.
Figure 5: The query image selection dialog. The
language of the dialog depends on the language of the
operating system used.
Petteri Kerminen
P.O. BOX 300
FIN-28101 PORI
Finland
[email protected]