• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Compare images in Cocoa
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Compare images in Cocoa


  • Subject: Re: Compare images in Cocoa
  • From: Jean-Daniel Dupas <email@hidden>
  • Date: Fri, 31 Oct 2008 17:09:42 +0100


Le 31 oct. 08 à 16:56, Brian Stern a écrit :


On Oct 30, 2008, at 11:21 PM, Pierce Freeman wrote:

Hi everyone. I am wondering if there is some way to compare two images in
Cocoa, and then somehow spit out a percent of how similar they are. The only
way I could think of is comparing every pixel, but this seems like it would
take a long time, and even so I have no idea how to go about doing that.


Thanks for your help.

You don't say what you want this number for. Are you trying to tell if two images of faces are of the same person? Two images of buildings are of the same building? Two images have similar colors in them?


FWIW, iterating over all the pixels in an image and doing some kind of simple math on the pixel values will not be very time-consuming. There are lots of Photoshop filters that do this and are very fast.

One thought that comes to mind is to calculate the histogram for the two images and compare them. This could give a kind of simplistic % difference.


One usage of image comparaison is "cut detection" in movie. There's an article about it on wikipedia that presents some image comparaison technics (histogram is one of them):


http://en.wikipedia.org/wiki/Cut_detection


_______________________________________________

Cocoa-dev mailing list (email@hidden)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


References: 
 >Compare images in Cocoa (From: Pierce Freeman <email@hidden>)
 >Re: Compare images in Cocoa (From: Brian Stern <email@hidden>)

  • Prev by Date: How to read proxy username and password?
  • Next by Date: Re: windowDidExpose: When called?
  • Previous by thread: Re: Compare images in Cocoa
  • Next by thread: Re: Compare images in Cocoa
  • Index(es):
    • Date
    • Thread