telling images apart with AI / image recognition ?

  • Thread starter Mad Scientist Jr
  • Start date
M

Mad Scientist Jr

Has anyone worked with code that can look at two JPG images (I am
talking about relatively small ones, 40x40 pixels or less) and quickly
analyzing them to see how similar or different they are? Is bitmap
comparison supported by .net's graphics libraries? Initially I could
compare JPG or BMP file size to see if the images are different, but I
would like the code to be able to discern HOW different two images are
- ie image A and B are 50% different. Maybe to start it could look at
each pixel and depending on some threshold decide it is on or off
(monochromatic) and build a percentage of matches based on that. But
for a RGB image it would get more complicated. Has anyone done or seen
anything like this or have any ideas?
 
A

alejandro lapeyre

I have the same interest, but have not started the project yet.
The first thing to consider is what you want to find.
I want to find identical images? similar images? the same image saved with
different compression levels?
One idea is to convert the image to gray scale first.
Another idea is take advantage of Jpeg compression. That is compress both
images a lot and compare the compressed images.
But you have to define first what you want to find.

Regards,
Alejandro Lapeyre.
 
S

Simon Green

What you describe would be suited to Beyesian or Support Vector Machine
software.

Have a search for these on google (plus "Kernal machines" or "machine
learning") and you should get plenty of hits.

There is a blog here that may be of interest too:
http://blogs.mit.edu/tsou

I downloaded a .NET sample app that demonstrated using SVM for
handwriting recognition (just digits but it may be enough for what you
need). Sorry I don't have a direct link to hand but it was from that
blog or a site linked from it.

Regards

- Simon Green
InteSoft.NET
http://www.intesoft.net

ASPAccelerator.NET - speed up your website and save bandwidth.
ASPRedirector.NET - put a friendly face on your website.
 
A

Ahmed Qurashi

Hi,

There was a post regarding image differention not too long ago, you can try
searching for it on Groups.

To reiterate I would use Exocortex.DSP - A Digital Signal Processing Library
for .NET.
http://www.exocortex.org/dsp/

Generate 2d FFT arrays from your base images and then compare against a
threshold. You can generate all kinds of statistics form the array sets. See
gamedev for more info:
http://www.gamedev.net/reference/articles/article2007.asp

ok,
aq
 
R

Ricola !

I was looking at some Postscript API software yesterday.

Perhaps by converting the image to Postscript, and then being able to do
textual analysis ( with Baysian, as others have suggested ) would be of
interest.

Here's a commercial product that can do the conversion

ImageGlue
http://www.websupergoo.com/helpig5net/source/2-concepts/5-advanced_topics/5-postscript.htm



Has anyone worked with code that can look at two JPG images (I am
talking about relatively small ones, 40x40 pixels or less) and quickly
analyzing them to see how similar or different they are? Is bitmap
comparison supported by .net's graphics libraries? Initially I could
compare JPG or BMP file size to see if the images are different, but I
would like the code to be able to discern HOW different two images are
- ie image A and B are 50% different. Maybe to start it could look at
each pixel and depending on some threshold decide it is on or off
(monochromatic) and build a percentage of matches based on that. But
for a RGB image it would get more complicated. Has anyone done or seen
anything like this or have any ideas?


--
Texeme Textcasting Technology
http://texeme.com

Indie Pop Rocks @ SomaFM
http://somafm.com/
 
M

Mad Scientist Jr

Thanks for your reply. I thought about the grayscale idea, and that
would be a good start. I don't need to compare colors too much -
although I would like the option of being able to tell that "image x is
mostly red" (say basic colors red,blue,green,yellow, orange,etc.) I
think 16 shades of gray would be fine. I'm new at .net graphics - to
start, can someone post code that can read the 8-bit grayscale value
(or luminescence) of a single pixel in a JPG file or bitmap at pixel
position x,y ? Thanks again.
 
M

Mad Scientist Jr

Generating statistics - this sounds like some intense stuff. I will
give it a look. Thanks.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top