原型基于颜色的图像检索及MATLAB

合集下载
相关主题
  1. 1、下载文档前请自行甄别文档内容的完整性,平台不提供额外的编辑、内容补充、找答案等附加服务。
  2. 2、"仅部分预览"的文档,不可在线预览部分如存在完整性等问题,可反馈申请退款(可完整预览的文档不适用该条件!)。
  3. 3、如文档侵犯您的权益,请联系客服反馈,我们会尽快为您处理(人工客服工作时间:9:00-18:30)。
Prototyping Color-based Image Retrieval with MATLAB
Petteri Kerminen1
1Tampere University of Technology
2Tampere University of Technology
Abstract
Content-based retrieval of (image) databases hasbee more popular than before. Algorithm develop-ment for this purpose requires testing/simulation tools,but there are no suitable mercial tools on themarket.
For some color systems it is possible to make thesefunctions dynamic,i.e. dynamic histogram calculation.Every color system / bin bination requires its ownhistograms and these can be made only with anexhaustive method (pixel by pixel). Histogramcalculation takes½- 5 minutes per image,each
The functions have been named so that the namescontain information of the color space used,thepurpose of the functions and the number of used bins.Some functions,for example image_pos,have beenused by many or all main functions and these functionshave not been named as described above.
A simulation environment for retrieving images fromdatabase according histogram similarities is presentedin this paper. This environment allows the use ofdifferent color spaces and numbers of bins. Thealgorithms areimplemented with MATLAB. Each colorsystem has its own m-files.
2.2 Functions
At this moment there are functions implemented forfour color spaces: HSV,L*a*b*,RGB and XYZ [7].Each color space has from 2 to 4 implementations fordifferent numbers of bins. There are altogether 14 mainfunctions.
A reference book is a suitable option,if the imagesare arranged with a usefulmethod,for example: 1)categories: animals,flags,etc,2) names (requires agood naming technique) or 3) dates. An experienceduser can use these systems as well as textual searches(keywords have to be inserted in a database)efficiently. There are situations when a multi-languagesystem has to be used. There a language independentsearch system’s best properties can be utilized. A toolwhich is based on the images’properties can be made
2. System development
MATLAB is an efficient program for vector and matrixdata processing. It contains ready functions for matrixmanipulations and image visualization and allows aprogram to have modular structure. Because of these factsMATLAB has been chosen as prototyping software.
The main function checks,if the function call iscorrect. If the query image’s name doesn’t contain apath,the function assumes that the image is situated inthe database directory. In addition to this,the mainfunction checks,if the query image already has ahistogram in the currently used database. If therequired histogram is not there,the image read (forexample hs27read) function is called. This functionalso normalizes pixel values and arranges image matrixdata to a vector format. After that stage a color spaceconversion function (if needed) is called. Finally aquantization function builds thehistogram with thecorrect number of bins.
color system has a main function of its own andvariable number (2–3) ofsub-functions. If there is noneed for color space conversion there are 2functions,otherwise 3 functions on the first branch of the functionchart.
The function call of the main function is:matches=tesths27(imagen,directory,num)
The variableimagenspecifies the query image’s nameand path. Thedirectoryis a path of the image databaseandnumis a desired number of retrieved images.
language independent. These properties can be forexample color,shape,texture,spatial location of shapeetc.
In the MuVi-project [1] this kind of tool is underconstruction. It will cover the properties presented above.Research work on content-based image retrieval has beendone in [2–6]. The system,which is presented in thispaper,is a simulation environment,where MuVi’s colorcontent based retrieval has been developed and tested.
The phases of the software building process are pre-sented from system design to graphical user interface(GUI). The functionality is described with snapshots ofGUI.
Hale Waihona Puke Baidu
Figure 1: Function chart for HSV color spacewith 27 bins histogram.
Tesths27 is the main function for this color systemand this number of bins. It calls other functions(hs27read,dif_hsv and image_pos) when needed. Each
1. Introduction
Nowadays there are thousands or hundreds ofthousands of digital images in an image database. If theuser wants to find a suitable image for his/herpurposes,he/she has to go through the database untilthe correct image has been found or use a referencebook or some“intelligent”program. Video on demand(VoD) services also requires an intelligent searchsystem for end-users. VoD systems’search methodsdiffer slightly from image database’s methods.
approximately 320×240 pixels,depending on theplexity of the color space on 150 MHz Pentium.Thus it is not reasonable to let the user select a binnumber freely,especially in the case of large databases.
2.1 System design
Before any m-files have been written,the system designhas been done. A system design for the HSV (hue,saturation and value) color system based retrieval processis presented in Figure 1. Similar design has been done forall used color systems.
相关文档
最新文档