JAVA codes for Image Comparison

Hi.. Am looking for appropriate java codes for Comparing images.. I searched thru net but no apt codes related 2 it.. Anybody 2 help me out thre???😔


  • Reya
    You mean to compare two images whether they are equal?
    Yup.. Irrespective of size of the image, I need to write a JAVA code, where it'l compare the image given as an input with another image already contained in my database and return true if comparison matches. For Eg., if I give an image of computer, my code should be able to compare with images of computer in my database and return the o/p.. Database codin part, leave it upto me. I just need help in, how Java compares two images..
  • Ankita Katdare
    Ankita Katdare
    Hi Gulnaz,

    I searched for your query on the net and found this result:

    Mind Meat: Java Image Comparison / Motion Detection

    Does that help?
  • Ankita Katdare
    Ankita Katdare
    Here is some information about processing pixels in an image using Java :

  • Morningdot Hablu
    Morningdot Hablu
    Sorry for late reply actually i am busy in exams.
    Well i have an idea how to compare two images check this code.
    Use it to compare two images hope it works.But it's just an idea you can edit it on your own way.
    import javax.swing.*;
    import java.awt.*;
    import java.awt.event.*;
    public class comp extends JApplet implements ActionListener
    Button b;
    String str,str1;
    public void init()
    b=new Button("submit");
    setLayout(new FlowLayout());
    public void actionPerformed(ActionEvent e)
    byte b1[]=new byte[60000];
    byte b2[]=new byte[60000];
    int i=0;
    FileInputStream f1=new FileInputStream("kk.jpg");;
    FileInputStream f2=new FileInputStream("kk1.jpg");;
    while(b1!=3 || b2!=3)
    str="not matched";
    catch(Exception ee)
    System.out.println("Exception caught");
    public void paint(Graphics g)

You are reading an archived discussion.

Related Posts

Hi all, Just yesterday i had unknowingly formatted my external hard drive! (that is 450 GB of data which includes office works, personal stuff, music, movies and all). I was...
Puzzle Taken From: Puzzles and Tests Once upon a time, Mars, the God of war, intended to test the IQ of the goddess Minerva. So, showing his shield, he told...
1. Ashland is north of East Liverpool and west of Coshocton. 2. Bowling green is north of Ashland and west of Fredericktown. 3. Dover is south and east of Ashland....
Hi guys. Please, help me to find any circuit diagram for LED display module. In this module is applied a drivers MBI5030GF for each 16 LEDs CPLD: EPM3064Ati100-10N and HC245....
Is there any IC to be used as a DAC converter?? regards