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:
Image Comparison

Subject: Image Comparison

From: aravind`

Date: 10 Jan, 2012 09:06:07

Message: 1 of 7

Hello sir, Im doing project where i need to compare two image and find if they are similar. Initially im not taking any conditions i.e the images must be exactly similar to each other. Can you tell me how i can do this with the help of matlab. Thank you

Subject: Image Comparison

From: ImageAnalyst

Date: 10 Jan, 2012 12:58:04

Message: 2 of 7

On Jan 10, 4:06 am, "aravind` " <aravindan.ge...@gmail.com> wrote:
> Hello sir, Im doing project where i need to compare two image and find if they are similar. Initially im not taking any conditions i.e the images must be exactly similar to each other. Can you tell me how i can do this with the help of matlab. Thank you

---------------------------------------------------------------------------
aravind`:
"Exactly" and "similar" do not mean the same thing. If you want to
find out if they're exactly the same, subtract them and look for non-
zero values. For similarity, use something like SSIM (http://
en.wikipedia.org/wiki/Structural_similarity)
ImageAnalyst

Subject: Image Comparison

From: eige

Date: 10 Jan, 2012 14:59:50

Message: 3 of 7

On Jan 10, 7:58 am, ImageAnalyst <imageanal...@mailinator.com> wrote:
> On Jan 10, 4:06 am, "aravind` " <aravindan.ge...@gmail.com> wrote:
>
> > Hello sir, Im doing project where i need to compare two image and find if they are similar. Initially im not taking any conditions i.e the images must be exactly similar to each other. Can you tell me how i can do this with the help of matlab. Thank you
>
> ---------------------------------------------------------------------------
> aravind`:
> "Exactly" and "similar" do not mean the same thing.  If you want to
> find out if they're exactly the same, subtract them and look for non-
> zero values.  For similarity, use something like SSIM (http://
> en.wikipedia.org/wiki/Structural_similarity)
> ImageAnalyst

try,

norm(A-B)

Where A and B are the images for a single measure of how close they
are. However, what you really want to do will depend on what errors
you expect.

Subject: Image Comparison

From: aravind`

Date: 16 Jan, 2012 16:45:09

Message: 4 of 7

eige <jeicke@gmail.com> wrote in message <44ac0a35-3dc6-4ab7-a512-653bc02eaf1e@d8g2000vbb.googlegroups.com>...
> On Jan 10, 7:58 am, ImageAnalyst <imageanal...@mailinator.com> wrote:
> > On Jan 10, 4:06 am, "aravind` " <aravindan.ge...@gmail.com> wrote:
> >
> > > Hello sir, Im doing project where i need to compare two image and find if they are similar. Initially im not taking any conditions i.e the images must be exactly similar to each other. Can you tell me how i can do this with the help of matlab. Thank you
> >
> > ---------------------------------------------------------------------------
> > aravind`:
> > "Exactly" and "similar" do not mean the same thing.  If you want to
> > find out if they're exactly the same, subtract them and look for non-
> > zero values.  For similarity, use something like SSIM (http://
> > en.wikipedia.org/wiki/Structural_similarity)
> > ImageAnalyst
>
> try,
>
> norm(A-B)
>
> Where A and B are the images for a single measure of how close they
> are. However, what you really want to do will depend on what errors
> you expect.
>
>
Thank you for your reply sir,
Can you explain what norm(A-B) mean. And measuring how close they are ? how can we find if the images are same if i find the distance between them ? or what do u mean by distance ? i am not able to get you sir.

Subject: Image Comparison

From: ImageAnalyst

Date: 16 Jan, 2012 18:34:41

Message: 5 of 7

On Jan 16, 11:45 am, "aravind` " <aravindan.ge...@gmail.com> wrote:
> Thank you for your reply sir,
> Can you explain what norm(A-B) mean. And measuring how close they are ? how can we find if the images are same if i find the distance between them ? or what do u mean by distance ? i am not able to get you sir.

------------------------------------------------------------------------------------------------------
It's like the RMS difference. The square root of the sum of the
squares of the pixel differences. Like PSNR (http://en.wikipedia.org/
wiki/PSNR) a common way to assess how well an image survived a
compression/decompression process. It's good if the image is
essentially the same, just corrupted somehow. But it's not good if
the image is structurally different, like it it's been rotated
slightly or you're comparing two different things, like an image of a
maple tree to an ash tree, or one person's face to other peoples
faces.
ImageAnalyst

Subject: Image Comparison

From: aravind`

Date: 19 Jan, 2012 08:06:21

Message: 6 of 7

ImageAnalyst <imageanalyst@mailinator.com> wrote in message <ab8980a9-579d-4390-95c7-b460db66b64d@u20g2000yqb.googlegroups.com>...
> On Jan 10, 4:06 am, "aravind` " <aravindan.ge...@gmail.com> wrote:
> > Hello sir, Im doing project where i need to compare two image and find if they are similar. Initially im not taking any conditions i.e the images must be exactly similar to each other. Can you tell me how i can do this with the help of matlab. Thank you
>
> ---------------------------------------------------------------------------
> aravind`:
> "Exactly" and "similar" do not mean the same thing. If you want to
> find out if they're exactly the same, subtract them and look for non-
> zero values. For similarity, use something like SSIM (http://
> en.wikipedia.org/wiki/Structural_similarity)
> ImageAnalyst

Thank you sir,
"subtract them and look for non-
> zero values." ? Subtract their pixel values you mean ?

Subject: Image Comparison

From: ImageAnalyst

Date: 19 Jan, 2012 11:40:03

Message: 7 of 7

On Jan 19, 3:06 am, "aravind` " <aravindan.ge...@gmail.com> wrote:
> ImageAnalyst <imageanal...@mailinator.com> wrote in message <ab8980a9-579d-4390-95c7-b460db66b...@u20g2000yqb.googlegroups.com>...
> > On Jan 10, 4:06 am, "aravind` " <aravindan.ge...@gmail.com> wrote:
> > > Hello sir, Im doing project where i need to compare two image and find if they are similar. Initially im not taking any conditions i.e the images must be exactly similar to each other. Can you tell me how i can do this with the help of matlab. Thank you
>
> > ---------------------------------------------------------------------------
> > aravind`:
> > "Exactly" and "similar" do not mean the same thing.  If you want to
> > find out if they're exactly the same, subtract them and look for non-
> > zero values.  For similarity, use something like SSIM (http://
> > en.wikipedia.org/wiki/Structural_similarity)
> > ImageAnalyst
>
> Thank you sir,
> "subtract them and look for non-
> > zero values." ? Subtract their pixel values you mean ?
-------------------------------------------------------------------------------------------
Of course. Subtracting the images, subtracting the arrays,
subtracting the matrices, subtracting the pixel values -- they all
mean the same thing. I'm not sure why you were asking - is there some
difference in your mind between what's being subtracted?

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