Remove shadows from image - best approach


I have an 8 images of the same object taken in the same position. The only difference in the images is that a different LED is on when the image is taken. There are 8 LEDs in total and only 1 is on at any one time. The 8 LEDs are at fixed intervals surrounding the camera. (Think of them like a clock where they are at 12:00, 1:30, 3:00, 4:30, 6:00, 7:30, 9:00, 10:30 positions)

They are not binary image but 8 bit mono images.

I am trying to remove all the shadows in the image so that I am just left with one image that is exactly what is common to all 8 images. (basically any parts of the image that are changing I want to remove) What’s the best way to accomplish this?

Assume only the shadows are changing in the image

Could I just AND all the images - I believe this only works for binary images? Are there better alternatives?

Thanks in advance