Scusate, di certo avete ragione. E' la prima volta che scrivo nel blog, credevo più semplice parlare del problema, invece di scrivere direttamente codice...cmq grazie del consiglio, e dunque ecco il mio codice:

//AL MOMENTO IL METODO CONTROLLA TUTTI I COLORI DI UNA IMMAGINE
//DEVO TROVARE IL MODO DI CONFRONTARE SOLO I BORDI PER
//ATTACCARE UN IMMAGINE SIMILE.

import java.io.*;
import java.awt.*;
import java.awt.image.*;
import javax.imageio.*;

public class Terzo2
{

public static BufferedImage openImage(String path) throws IOException
{
BufferedImage img = ImageIO.read(new File(path));
return img;
}

/*public static void saveImage(BufferedImage img, String fileName)
throws IOException {
ImageIO.write(img, fileName.substring(fileName.lastIndexOf(".")+1),
new File(fileName));
}*/

public static void main(String[] args)
{

try

{
BufferedImage input = openImage("1.jpg");
BufferedImage input1 = openImage("2.jpg");
Color oldColor, newColor,oldColor1,newColor1;
int width = input.getWidth();
int height = input.getHeight();
int width1 = input.getWidth();
int height1 = input.getHeight();
int type = input.getType();
int type1 = input1.getType();
BufferedImage output;
output = new BufferedImage(width, height, input.TYPE_INT_RGB);
BufferedImage output1;
output1 = new BufferedImage(width, height, input.TYPE_INT_RGB);

for (int y=0; y<height; y++)

{
newColor=null;
newColor1=null;

for (int x=0; x<width; x++)

{
oldColor = new Color(input.getRGB(x, y), true);
oldColor1 = new Color(input.getRGB(x, y), true);
newColor = new Color((int) oldColor.getRed(), (int) oldColor.getGreen(),(int) oldColor.getBlue());
newColor1 = new Color((int) oldColor1.getRed(), (int) oldColor1.getGreen(),(int) oldColor1.getBlue());
output.setRGB(x, y, newColor.getRGB());
output1.setRGB(x, y, newColor1.getRGB());
//System.out.println(oldColor);
//System.out.println(oldColor1);
}

if (newColor==newColor1)
{
System.out.println("Uguali");
}
else
{
System.out.println("Diversi");
}
}
// saveImage(output,"Copia1.jpg");
}

catch (IOException e)
{
System.out.println(e.getMessage());
}
}
}