Discover MakerZone

MATLAB and Simulink resources for Arduino, LEGO, and Raspberry Pi

Learn more

Discover what MATLAB® can do for your career.

Opportunities for recent engineering grads.

Apply Today

Thread Subject:
Distance between two images

Subject: Distance between two images

From: bogey4@gmail.com

Date: 14 Mar, 2007 12:50:08

Message: 1 of 5

Hi everyone,

I'm conducting an experiment which aims to evaluate numerous
binarization algorithms in Matlab. I've got about 25 algorithms up and
running now, although I'm still trying to find a way to measure their
results for comparison. I've got a "ground truth" image (drawn in
photoshop) which I then degraded with noise and blurring, and then
gave the degraded image to each binarization algorithm.

Now I'm looking for a way of measuring how close each algorithm gets
to producing the correct (ie ground truth) image. I've looked for m-
files that use the Hausdorff distance, although I can't seem to find
any, so I was wondering if anyone could suggest a metric/distance or
point me towards some source code that could be used to determine how
closely the binarized image matches the ground truth image?

Any help would be greatly appreciated,

Subject: Distance between two images

From: Dave Robinson

Date: 20 Mar, 2007 12:58:00

Message: 2 of 5

bogey4 wrote:
>
>
> Hi everyone,
>
> I'm conducting an experiment which aims to evaluate numerous
> binarization algorithms in Matlab. I've got about 25 algorithms up
> and
> running now, although I'm still trying to find a way to measure
> their
> results for comparison. I've got a "ground truth" image (drawn in
> photoshop) which I then degraded with noise and blurring, and then
> gave the degraded image to each binarization algorithm.
>
> Now I'm looking for a way of measuring how close each algorithm
> gets
> to producing the correct (ie ground truth) image. I've looked for
> m-
> files that use the Hausdorff distance, although I can't seem to
> find
> any, so I was wondering if anyone could suggest a metric/distance
> or
> point me towards some source code that could be used to determine
> how
> closely the binarized image matches the ground truth image?
>
> Any help would be greatly appreciated,
>
>

A quick and nasty method might be to simply exclusive 'OR' the image
resulting from your test and the ground truth image. Areas where they
are different will contain active pixels, and those that are correct
will be inactive. Simply counting the number of active pixels will
give you some measure of the closeness of match. Thus if the two
images are identical, you will have a completely black exclusive OR
and will result in a count of 0, if the two are completely different,
you would have a count equal to the number of pixels in the images.

A quick way of counting the images is simply finding the mean
intensity of the exclusive OR image, then multiply this by the number
of pixels in the image.

This is probably not what you are looking for, but as no one else
responded, I thought I might as well ;-)

Subject: Distance between two images

From: Vassili

Date: 20 Mar, 2007 14:57:44

Message: 3 of 5

bogey4 wrote:
>
>
> Hi everyone,
>
> I'm conducting an experiment which aims to evaluate numerous
> binarization algorithms in Matlab. I've got about 25 algorithms up
> and
> running now, although I'm still trying to find a way to measure
> their
> results for comparison. I've got a "ground truth" image (drawn in
> photoshop) which I then degraded with noise and blurring, and then
> gave the degraded image to each binarization algorithm.
>
> Now I'm looking for a way of measuring how close each algorithm
> gets
> to producing the correct (ie ground truth) image. I've looked for
> m-
> files that use the Hausdorff distance, although I can't seem to
> find
> any, so I was wondering if anyone could suggest a metric/distance
> or
> point me towards some source code that could be used to determine
> how
> closely the binarized image matches the ground truth image?
>
> Any help would be greatly appreciated

If I1 and I2 are two similar images and you want a distance between
them, why not norm(I1(:)-I2(:)) ?

Subject: Distance between two images

From: Nevine Jacob

Date: 20 Mar, 2007 19:34:53

Message: 4 of 5

May be you need to use the Mean Square Error

Subject: Distance between two images

From: a b

Date: 23 May, 2007 09:18:17

Message: 5 of 5

Nevine Jacob wrote:
>
>
> May be you need to use the Mean Square Error

Try mutual entropy, you'll need to look it up, but i think it's what
your looking for. I could be wrong though. However, you should find
the similarity measure section of the following notes helpful
nonetheless:
 <http://www.doc.ic.ac.uk/~gzy/teaching/vision/vision-s13.pdf>

Tags for this Thread

No tags are associated with this thread.

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.

Contact us