• Post Reply Bookmark Topic Watch Topic
  • New Topic

Compare Two Images  RSS feed

 
Rodricks george
Ranch Hand
Posts: 97
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Dear Sir,

I have two png images. I want to compare the two images whether it is identical or not... How to proceed. Please give some idea

-Rodricks
 
Ulf Dittmer
Rancher
Posts: 42972
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If you need to know if the images are pixel-by-pixel copied of one another, then you can use the javax.imageio.ImageIO class to create BufferedImage objects of both images, and then compare their pixel values.

If by "identical" you mean "looking similar (or identical) to the human eye", then things get a lot more complicated.
 
Rodricks george
Ranch Hand
Posts: 97
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thank you sir

-Rodricks
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!