Pre-process images for batch processing


I’m looking for room to improve in the way I’m pre-processing images for batch image analysis. The main drive is to get the contrast between pore (dark areas) and surface in order to get consistent segmentation down to the smallest visible pore (~3 pixels). One of the areas that probably needs to be addressed is to ensure consistent histogram information in order to obtain consistent segmentation.

I’ve written scripts to evaluate sample (example attached) surface porosity and pore size distribution. For a given sample, three locations are SEM imaged and saved. For a given set of three images for each sample, the following pre-process steps are applied:

  1. acquire scale information (scale bar)
  2. cropping
  3. FFT bandpass ( filter up to one and to 1000 pixels); autoscale / saturate
  4. percentile threshold (50%) and adjust to segment (<5%) pore areas
  5. binary image
  6. local thickness plug-in

Any input would be most welcome.


sample 1_3.tif (1.2 MB) applied for pore size distribution

For a question like this, it would probably be most helpful to include an example of what is not working, or you are unhappy with, in your current results.


Thanks for the input. Maybe I can state this way.

Due to slight variations in histograms, etc. from image to image, and the need to “normalize” so that thresholding is consistant, what other steps should I be applying to the images in batch mode.

So for instance should I be applying a histogram normalization and/or equialization on each of the images of a given sample, in order for the same thresholding can be used to separate pores from surface.