How do you know that the pattern difference is cause solely by the background intensity and not due to the polarization state which might be different in those two locations? If it were due solely to an overall illuminance then I think it would just make the disk brighter or darker, if it changes it at all. I would not think it would change or invert the pattern, but because it does I think it's more than a background illumination problem. I think the polarization is interacting with the disk differently in the two locations somehow.
And you certainly can't have the "intensity preserved" if you don't care whether the pattern in inverted. Of course if the pattern is inverted, the intensity will change. Is there a location in between those two locations where there is virtually no pattern at all?
To find out where your image is different than your background, you can just subtract the background. That will find the disk and the wrench. Then you can try to extract out the disk from the wrench using morphological methods.
Also, I'm not sure what your Step 5 is saying. "Make changes to original code if 5 is not satisfied." That is a recursive step!