Skip to Main Content Skip to Search
Login
File Exchange
MATLAB Newsgroup
Link Exchange
  Blogs  
 Contest 
MathWorks.com

Thread Subject: How to find similar images

Subject: How to find similar images

From: Yair Altman

Date: 8 Aug, 2007 22:36:10

Message: 1 of 4

I have a large set of color images. I wish to find a
characteristic number for each of them, so closer numbers
would represent "similar" images (in very loose terms). I'd
like the characteristic to be tolerant to cropping &
resizing and if possible also to rotation, flipping &
saturation. If possible, I'd also like it to be computed
quickly (my set is very large).

The ultimate aim is to winnow down the large set to a much
smaller subset of potential matching images, that would then
be inspected manually.

Some simple functions that I thought of were the grayscale
rms/mode/std/kurtosis/skewness. Could anyone please comment
on which of these functions (or any other) would be best for
my needs?

(I'm not an imaging expert nor have the Image Processing
Toolbox...)

Thanks in advance,
Yair

Subject: How to find similar images

From: Yang Zhang

Date: 8 Aug, 2007 22:44:24

Message: 2 of 4

"Yair Altman" <altmanyDEL@gmailDEL.comDEL> wrote in message
<f9dggq$lu8$1@fred.mathworks.com>...
> I have a large set of color images. I wish to find a
> characteristic number for each of them, so closer numbers
> would represent "similar" images (in very loose terms). I'd
> like the characteristic to be tolerant to cropping &
> resizing and if possible also to rotation, flipping &
> saturation. If possible, I'd also like it to be computed
> quickly (my set is very large).
>
> The ultimate aim is to winnow down the large set to a much
> smaller subset of potential matching images, that would then
> be inspected manually.
>
> Some simple functions that I thought of were the grayscale
> rms/mode/std/kurtosis/skewness. Could anyone please comment
> on which of these functions (or any other) would be best for
> my needs?
>
> (I'm not an imaging expert nor have the Image Processing
> Toolbox...)
>
> Thanks in advance,
> Yair


Hi Yair,

Did you know PCA before? It may help you in this case.
Help: princomp

Also, k-means may be useful after you use PCA to reduce your
matrices size.

HTH,
Yang

Subject: How to find similar images

From: Dave Robinson

Date: 9 Aug, 2007 09:00:54

Message: 3 of 4

"Yair Altman" <altmanyDEL@gmailDEL.comDEL> wrote in message
<f9dggq$lu8$1@fred.mathworks.com>...
> I have a large set of color images. I wish to find a
> characteristic number for each of them, so closer numbers
> would represent "similar" images (in very loose terms).
I'd
> like the characteristic to be tolerant to cropping &
> resizing and if possible also to rotation, flipping &
> saturation. If possible, I'd also like it to be computed
> quickly (my set is very large).
>
> The ultimate aim is to winnow down the large set to a much
> smaller subset of potential matching images, that would
then
> be inspected manually.
>
> Some simple functions that I thought of were the grayscale
> rms/mode/std/kurtosis/skewness. Could anyone please
comment
> on which of these functions (or any other) would be best
for
> my needs?
>
> (I'm not an imaging expert nor have the Image Processing
> Toolbox...)
>
> Thanks in advance,
> Yair

The way that I achieved what you are looking for was

1) Split the colour image into an intensity + colour space
(e.g. h.s.i or amplitude and normalized rgb) and
histogrammed each plane.
2) Converted the histogram into a probability function by
dividing by the number of pixels in the image (the sum of
the histogram) so now I was size independent.
3) I bucketed the histogram into a 16 feature vector.
4) I undertook a texture analysis using the 'Laws'
convolution method (Have a Google - plenty of description)
on each plane, and undertook an identical histogram
operation on the texture images.

I concatenated all these 16 location probability vectors
into a single feature vector, and compared image similarity
using a simple Euclidean distance.

As I added in images I was able to calculate the mean and
standard deviation of the feature vector components, and
was able to undertake a full statistical comparison to
select the closest group that the latest image belonged to.

I did experiment with adding image entropy to my feature
vector, which improved its selectivity significantly, but
not massively.

Hope that helps

Dave Robinson

Subject: How to find similar images

From: Yair Altman

Date: 9 Aug, 2007 11:25:47

Message: 4 of 4

many thanks - this helps
Yair

Tags for this Thread

Everyone's Tags:

Add a New Tag:

Separated by commas
Ex.: root locus, bode

What are tags?

A tag is like a keyword or category label associated with each thread. Tags make it easier for you to find threads of interest.

Anyone can tag a thread. Tags are public and visible to everyone.

Tag Activity for This Thread
Tag Applied By Date/Time
image classification Dave Robinson 9 Aug, 2007 05:05:13
image processing Yang Zhang 8 Aug, 2007 18:45:25
rssFeed for this Thread

envelope graphic E-mail this page to a colleague

Public Submission Policy
NOTICE: Any content you submit to MATLAB Central, including personal information, is not subject to the protections which may be afforded information collected under other sections of The MathWorks, Inc. Web site. You are entirely responsible for all content that you upload, post, e-mail, transmit or otherwise make available via MATLAB Central. The MathWorks does not control the content posted by visitors to MATLAB Central and, does not guarantee the accuracy, integrity, or quality of such content. Under no circumstances will The MathWorks be liable in any way for any content not authored by The MathWorks, or any loss or damage of any kind incurred as a result of the use of any content posted, e-mailed, transmitted or otherwise made available via MATLAB Central. Read the complete Disclaimer prior to use.
Related Topics