Layering images so only identical areas are visible

Discussion of Photoshop Scripting, Photoshop Actions and Photoshop Automation in General

Moderators: Tom, Kukurykus

Nickps

Layering images so only identical areas are visible

Post by Nickps »

A colleague of mine has a set of 8 images, created during a scientific experiment. These images consist of a grey background with white dots on them.

They want to use photoshop to merge the images so that only the white areas that are the same in each image remain visible. Everything else should be left grey or some other colour.

This merged image can then be loaded into another piece of software we already have which counts the white dots.

So; Can anyone suggest a method of doing this. It doesn't even need to be a script - I'm just trying to think of ways of achieving this.

Professional AI Audio Generation within Adobe Premiere Pro - Download Free Plugin here

Mike Hale

Layering images so only identical areas are visible

Post by Mike Hale »

If you have Photoshop Extended use the 'Load File into Stack' script to get all the images in one doc as layers. Select all the layers and create a smart object. Then from the menu choose 'Layer-Smart Object-Stack Mode-Minimum'. Only the areas of the layers that are white in the same pixel location will appear white. The rest of the image should be whatever the darkest background color is.

That assumes the 'white dots' are all the same color otherwise they will be the color of the darkest dot. Also the dot has to be in the same place in all the layers. If for example 7 of your images have white dots in the same place but one does not you will only see the background.
Nickps

Layering images so only identical areas are visible

Post by Nickps »

Thanks Mike. This sounds like it could work. But the problem I have is that the "white dots" are not necessarily exactly the same colour code in each image - there is a small amount of variation.

The images are photographs of cells (the "white dots") taken every hour under a microscope. We want to see only those cells/dots that did not move (meaning they must have stuck onto the plastic). However, because they are photographs there is some inevitable colour variation between pictures. Would this technique still work?
Mike Hale

Layering images so only identical areas are visible

Post by Mike Hale »

I thought it would be something like that. The way stack mode-minimum works is it show the darkest pixel of all the layers. So overlapping light areas will be the darkest of those light areas with the rest the darkest of the background. So it should work even if the images are photographic and have some minor variations.

If it is allowed, you could use adjustment layers to normalize the layers in the smart object or just to the smart object itself.

But I would think that if using stack mode would create an acceptable image would be up to the researcher. I would think that only he/she can say if it is acceptable.

I have done some work for medical students and know that what they have to meet guidelines for their research. Some have had more flexibility in how they could edit images and the final results.
Nickps

Layering images so only identical areas are visible

Post by Nickps »

Thanks Mike, I've just tested it out and this seems to work. I'm a medical student but this is for a PhD student.

I'm not sure how experimentally robust this will be considered, as it has no basis in the literature. However, it appears to work and as far as I'm concerned these scientific image analysis packages are only doing what photoshop is already capable of, and usually not nearly as well as photoshop can do it.
Mike Hale

Layering images so only identical areas are visible

Post by Mike Hale »

I help one PhD med student at the Medical University of South Carolina where her images where heavily edited. Her advisor signed off on the editing because the images were just used as illustrations.