Image retrieval - Query by Example Demo

This demo provides a simple query by image example method, based on HSV values.
33.8K 次下载
更新时间 2008/11/8

查看许可证

编者注: Popular File 2014

Content-based image retrieval is the task of searching images in databases by analyzing the image contents. In this demo, a simple image retrieval method is presented, based on the color distribution of the images. The user simply provides an "example" image and the search is based upon that example (query by image example). For this first version of the demo no relevance feedback is used.

Almost 1000 images have been used for populating the database. For each image a 3-D histogram of it's HSV values is computed. At the end of the training stage, all 3D HSV histograms are stored in the same .mat file.
In order to retrieve M (user-defined) query results, the following steps are executed:

The 3D (HSV) histogram of the query image is computed. Then, the number of bins in each direction (i.e., HSV space)is duplicated by means of interpolation.
For each image i in the database:
Load its histogram Hist(i).
Use interpolation for duplicating the number of bins in each direction.
For each 3-D hist bin, compute the distance (D) between the hist of the query image and the i-th database image.
Keep only distances (D2) for which, the respective hist bins of the query image are larger than a predefined threshold T (let L2 the number of these distances).
Use a 2nd threshold: find the distance (D3) values which are smaller than T2, and let L3 be the number of such values.
The similarity measure is defined as: S(i) = L2 * average(D3) / (L3^2).
Sort the similarity vector and prompt the user with the images that have the M smaller S values.

引用格式

Theodoros Giannakopoulos (2024). Image retrieval - Query by Example Demo (https://www.mathworks.com/matlabcentral/fileexchange/22030-image-retrieval-query-by-example-demo), MATLAB Central File Exchange. 检索时间: .

MATLAB 版本兼容性
创建方式 R2007b
兼容任何版本
平台兼容性
Windows macOS Linux
类别
Help CenterMATLAB Answers 中查找有关 Get Started with Image Processing Toolbox 的更多信息

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!
版本 已发布 发行说明
1.0.0.0