I am looking for a C++ or Python library to compare two JPEG or BMP formatted Images. Here, I want to compare them pixel wise. For instance assume we have Image1 = 500 pixels, Image2 = 500 pixels; now i need to know the color values ie (RGB, R = 24, G = 15, B = 4) for each pixel and compare the same with image2 at the same location.
I also need to have tolerance values acting upon them, if they still have difference crossing this tolerance then i need to have the total percentage difference.
Is there a library out there ? If so please point me to that or give me any suggestions to start with.