Results 1 to 14 of 14
  1. #1
    GhosT's Avatar
    GhosT is offline Member
    Join Date
    Sep 2008
    Location
    Dhaka, Bangladesh
    Posts
    37
    Rep Power
    0

    Default Comparing two images

    how can i compare two images in java? its not like 100% pixel match but something like detecting a person. I take a persons photo and compare it with the database photo to check for a certain threshold. how it can be done? any code or any idea/suggestions?

    If image is not possible/too hard i can also use signature but i think it will make things worse.

    please help me.

    i think i will need JAI packages...

  2. #2
    zoomix is offline Member
    Join Date
    Oct 2008
    Location
    Sweden, Gothenburg
    Posts
    21
    Rep Power
    0

    Default

    Uhm... Yeah..

    I took a couple of course at the university to get an idea on how to do this. It is very very complicated to do even for a basic set of no more than 20-30 photos in perfect condition. The courses were, amongst others, Artificial Intelligence, Neural Networks, Advanced Image Transforms and math-classes out of my a*se. They were all great fun and I recommend them.

    The point I'm trying to make here is that this is a very complex task and you are unlikely to find a generic API in java of the kind:
    boolean Image.kind_of_looks_like(Image image)

  3. #3
    GhosT's Avatar
    GhosT is offline Member
    Join Date
    Sep 2008
    Location
    Dhaka, Bangladesh
    Posts
    37
    Rep Power
    0

    Default

    lolz...got ur point...i dont need a perfect algorithm...i need something i can start to work with...i can start from the beginning but i dont have time...:S...

    n e ways thanx for ur suggestion...i have a working algorithm that has an accuracy of 50% (:D) so i have to work hard i think.

  4. #4
    Eranga's Avatar
    Eranga is offline Moderator
    Join Date
    Jul 2007
    Location
    Colombo, Sri Lanka
    Posts
    11,371
    Blog Entries
    1
    Rep Power
    20

    Default

    You should study about how to read and write Java image. Then try to implement your own way. If you can read the image, you should able to find a pattern to compare images.

  5. #5
    GhosT's Avatar
    GhosT is offline Member
    Join Date
    Sep 2008
    Location
    Dhaka, Bangladesh
    Posts
    37
    Rep Power
    0

    Default

    I know how to read and write java image, can u provide me any algorithm that does the comparing effeciently??

  6. #6
    Eranga's Avatar
    Eranga is offline Moderator
    Join Date
    Jul 2007
    Location
    Colombo, Sri Lanka
    Posts
    11,371
    Blog Entries
    1
    Rep Power
    20

  7. #7
    Norm's Avatar
    Norm is online now Moderator
    Join Date
    Jun 2008
    Location
    Eastern Florida
    Posts
    17,816
    Rep Power
    25

    Default

    compare two images
    What is the expected results of comparing two images?
    For example:
    image 1 is the same size as image 2
    image 1 is a subsection of image 2 (ie it is contained with it)
    image 1 uses same amount of color red as image 2
    The location of the dark intensity colors in the two images has an agreement of > xx%

  8. #8
    nithiyanandam is offline Member
    Join Date
    Apr 2009
    Posts
    1
    Rep Power
    0

    Default

    how to compare two images that to say its equal or not?

  9. #9
    Eranga's Avatar
    Eranga is offline Moderator
    Join Date
    Jul 2007
    Location
    Colombo, Sri Lanka
    Posts
    11,371
    Blog Entries
    1
    Rep Power
    20

    Default

    Quote Originally Posted by nithiyanandam View Post
    how to compare two images that to say its equal or not?
    As we discuss previously, we can do this is several ways. Each image has a header, and contain lots of details. Some of them are specific, and some of them are common to each same type.

    What's the way you want to compare those images?

  10. #10
    OrangeDog's Avatar
    OrangeDog is offline Senior Member
    Join Date
    Jan 2009
    Location
    Cambridge, UK
    Posts
    838
    Rep Power
    6

    Default

    This is one of the so-called "AI-Complete" problems - i.e. it is incredibly difficult. I suggest you look up some recent academic papers on computer vision and face recognition. You'll probably be dealing with wavelets, DCTs, eigenfaces, inference-based choice engines, etc.
    If you do manage to create an efficient working solution, I'm sure a number of international governments would be interested in talking to you.
    Don't forget to mark threads as [SOLVED] and give reps to helpful posts.
    How To Ask Questions The Smart Way

  11. #11
    Eranga's Avatar
    Eranga is offline Moderator
    Join Date
    Jul 2007
    Location
    Colombo, Sri Lanka
    Posts
    11,371
    Blog Entries
    1
    Rep Power
    20

    Default

    I agreed with your. But in lots of applications, I seen that reading the header and comparing some basic details compared the images. Actually those are not advance level application. And I don't think once you edit an image quite similar to the other one, headers are given different details though. Like the color depth and so on. So I think for low level applications it's not a bad selection.

  12. #12
    toadaly is offline Senior Member
    Join Date
    Jan 2009
    Posts
    671
    Rep Power
    6

    Default

    Quote Originally Posted by GhosT View Post
    how can i compare two images in java?
    This question is about artificial intelligence, not Java. If you need to know how to load/write images, manipulate pixles, display images, etc...this is the place. But it isn't the place for "how do you create a truly intelligent machine" type questions.

  13. #13
    Fubarable's Avatar
    Fubarable is offline Moderator
    Join Date
    Jun 2008
    Posts
    19,316
    Blog Entries
    1
    Rep Power
    26

    Default

    Seriously, the question is too vague to be answered correctly at here or at any site..

  14. #14
    Revenge is offline Member
    Join Date
    Apr 2009
    Posts
    1
    Rep Power
    0

    Default

    Hi all,

    I think he needs something like OpenCV (wrapped with Swig) or AForge (but it is for .Net) using Image Similarity and Computer Vision

    I'm interested in this argument too

    could anyone help us?

    Thanks in advance

    Revenge

Similar Threads

  1. Comparing Images
    By shaungoater in forum Advanced Java
    Replies: 0
    Last Post: 03-17-2008, 11:38 AM
  2. Comparing problem
    By mcal in forum New To Java
    Replies: 1
    Last Post: 01-24-2008, 04:56 AM
  3. Comparing Strings
    By Java Tip in forum Java Tip
    Replies: 0
    Last Post: 12-03-2007, 10:44 AM
  4. comparing
    By Feng in forum New To Java
    Replies: 2
    Last Post: 11-23-2007, 10:40 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •