I have a series of small, 20x20 BufferedImages, each one with a white background and black text on it, each BufferedImage containing a single digit, from 0 - 9.
What I want to do, is to simply compare the images to each other, and determine if they are duplicates (equal) or not. E.g, if I compare two images which both say '2', then I want that to be marked as a duplicate. If one of them says 5, then I want that to be marked as not a duplicate.
I'm thinking of simply looping over all the pixels of the image, getting their RBG values and storing them in a string, then compare the RBG strings of each image to determine if they are duplicates or not. Is that the best method, or is there any better / faster method?
The images are stored in memory and not on the file system, so I can't really md5 them, however if md5-ing them will give accurate results and will be fast, then I can have them stored.