I have two different images for the same object. Each one was taken from different device (scanner, mobile camera, professional camera ..etc). the process of registeration one of them to the other was done correctly. Now I need to do a subtraction between to them for comparison purpose. The problem that is the contrast and brightness are pretty different. I tried these two methods (I tried them on the whole image(globally) and on pairs of the two images (locally)):
ImageB= ImageA * (Mean_Of(ImageA)/Mean_Of(ImageB));
Color method: Convert it to HSV then:
ImageB[S]= ImageA[S] * (Mean_Of(ImageA[S])/Mean_Of(ImageB[S])); ImageB[V]= ImageA[V] * (Mean_Of(ImageA[V])/Mean_Of(ImageB[V]));
return to RGB again
However, the two methods did not give me the results I want. They are good and work well on many images but not in all cases.
Any suggestions? Many thanks