Click here to Skip to main content
14,607,021 members

Finding Similiar Images

Rate this:
3.46 (33 votes)
Please Sign up or sign in to vote.
3.46 (33 votes)
24 Sep 2002
This article gives an overview of Content-Based Image Retrieval

Image 1


Content-Based Image Retrieval (CBIR) should be the right title for this article. CBIR is a way to index or find a similarity between images in a multimedia database. There are methods such as Fourier Transform, Hough Transform, Wavelet Transform, Gabor Transform, Hadamard transform coefficients to be used as engine in CBIR system. Retrieval by image content has received great attention in the last decades. Several techniques have been proposed to the problem of finding or indexing images based on their contents. Each method used has strong and weak points.

In this article I try to give an overview view about CBIR because this kind of topics is the most frequently asked question in Digital Image Processing. Here I used CxImage library from Davide Pizzolato ( The latest version of CxImage library contain a function to transform an image into it's frequency domain that is FFT2 function. The technique I used here is not really efficient but at least this article will guide you to more advanced CBIR.

If you want more efficient method try to follow this links and

Finding Similiar Images

There are 4 steps to perform image retrieval based on the similarity:

  1. Load Query Image (Image we want to search for or find images similar to this) 
  2. Generate Signature of Key Image using Fourier Transform 
  3. For every images in the database Load and generate the signature 
  4. Calculate Euclidean Distance for Key Image Signature and Database Image Signature 
  5. Put the value in a auto-sorted listbox to make similarity investigation easier because smallest value stay in the top of the list and step down for similar images.

The image similarity depend on Euclidean Distance. The smaller the distance the image will get more similar. In measuring similarity, there are few famous math formulas such as Dice similarity coefficients, Jackard, Otsuka, Simpson, Manhattan, Robinson, and more.

The libraries used:

  1. CxImage (
  2. CTokenEx Written by Daniel Madden (
  3. CDirDialog (I forgot the creator)


This article has no explicit license attached to it but may contain usage terms in the article text or the download files themselves. If in doubt please contact the author via the discussion board below.

A list of licenses authors might use can be found here


About the Author

Danang Suharno Ngadinegaran
Web Developer
Indonesia Indonesia
No Biography provided

Comments and Discussions

QuestionThe code can not be compiled , There l cannot find ximage.h and any lib files. should I download these files ? 3x Pin
Member 443190029-Dec-13 15:37
MemberMember 443190029-Dec-13 15:37 
AnswerRe: The code can not be compiled , There l cannot find ximage.h and any lib files. should I download these files ? 3x Pin
Member 1083152320-May-14 2:08
MemberMember 1083152320-May-14 2:08 
Questioncompile Pin
Su-Jin Oh21-Feb-13 18:33
MemberSu-Jin Oh21-Feb-13 18:33 
QuestionPlease remember Pin
eRRaTuM22-Nov-11 0:29
MembereRRaTuM22-Nov-11 0:29 
GeneralMy vote of 1 Pin
eRRaTuM22-Nov-11 0:26
MembereRRaTuM22-Nov-11 0:26 
Generalcbir using color histogram MATLAB code Pin
wanlovewan18-Oct-10 12:10
Memberwanlovewan18-Oct-10 12:10 
Questioncannot upload images Pin
varshanth28-Jan-10 20:29
Membervarshanth28-Jan-10 20:29 
Generalto display images in matlab guide frame or listbox Pin
anjan kumar sahoo1-Dec-09 17:35
Memberanjan kumar sahoo1-Dec-09 17:35 
Generalupdate from cimage.lib Pin
xpjandy29-Oct-09 17:01
Memberxpjandy29-Oct-09 17:01 
QuestionHow to use this in RGB color space? Pin
czwarty20-Oct-09 8:02
Memberczwarty20-Oct-09 8:02 
GeneralI have the same problem is “unresolved external symbol "public: bool __thiscall CxImage::Load(unsigned short const *,unsigned long)" (?Load@CxImage@@QAE_NPBGK@Z)” Pin
liuyang_bnu11-May-09 21:26
Memberliuyang_bnu11-May-09 21:26 
RantPost an .exe-file Pin
andycpp3-May-09 8:38
Memberandycpp3-May-09 8:38 
GeneralLinks not found: PLS help Pin
Member 432247112-Mar-09 0:53
MemberMember 432247112-Mar-09 0:53 
Generalsame code in matlab Pin
pradyuvishal10-Mar-09 5:10
Memberpradyuvishal10-Mar-09 5:10 
GeneralRe: same code in matlab Pin
GAURAV JASWAL7-Dec-09 22:58
MemberGAURAV JASWAL7-Dec-09 22:58 
Generalmatlab Pin
maryam2222-Feb-09 8:36
Membermaryam2222-Feb-09 8:36 
GeneralCBIR Pin
eipro22-Dec-08 3:19
Membereipro22-Dec-08 3:19 
GeneralRe: CBIR Pin
Member 114112015-Mar-15 23:23
MemberMember 114112015-Mar-15 23:23 
QuestionCan I find the same system in Matlab Pin
alturkhomi15-Dec-08 17:40
Memberalturkhomi15-Dec-08 17:40 
Generali have build it successfully Pin
ahlawat.arun@gmail.com13-Nov-08 19:45
Memberahlawat.arun@gmail.com13-Nov-08 19:45 
GeneralRe: i have build it successfully Pin
adamdcg3-Dec-08 21:58
Memberadamdcg3-Dec-08 21:58 
GeneralRe: i have build it successfully Pin
adamdcg3-Dec-08 23:00
Memberadamdcg3-Dec-08 23:00 
GeneralRe: i have build it successfully Pin
cnbjliuaihua1-Jun-12 3:00
Membercnbjliuaihua1-Jun-12 3:00 
GeneralRe: i have build it successfully Pin
cnbjliuaihua1-Jun-12 17:10
Membercnbjliuaihua1-Jun-12 17:10 
GeneralRe: i have build it successfully Pin
jotsna Waghmare7-Mar-12 23:58
Memberjotsna Waghmare7-Mar-12 23:58 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.

Posted 24 Sep 2002


131 bookmarked