Segmentation and Measuring starch particles

Does somebody have an idea how i could identify the starch particles in these pictures?
I´ve been trying to segment the particles with Ilastik first and then used the following pipeline, but I am not happy with the results yet.

link to the pictures and the ilastik classifier:

Thanks in advance for your help,

pipeline project.cpproj (557.9 KB)

Hello there,

Did you try first correct the illumination discrepancy , export corrected images, and subsequently use either CP or ilastik to do segmentation on correct ones?

CP has a built in CorrectIlluminationCalculate and CorrectIlluminationApply to do such correction.


Thanks for the fast answer. I tried it now and it is a little bit better, but still not satisfying :frowning:
Do you have an other idea?

I updated the pipeline:
pipeline test.cpproj (79.4 KB)

Hi there,

You were close, but should have ColorToGray first, then CorrectIllumination

Here is the modified pipeline starch.cpproj (642.8 KB)

Hope it helps

looks very good, but it unfortunately doesn’t work on my computer
I don’t get a corrected image:

but on some pictures it works:

Can you please check in those pictures that “don’t work”, is it:

  • The display setting of CorrectIllumination was too dark (log normalize the image to check), and the downstream IdentifyObjectPrimary can still do the segmentation
    IdentifyObjectPrimary doesn’t work either?

The images were taken by manual bright field illumination (non-fluorescent) am I correct? It seems to me brightness is not equal across every images. You may have to fix that intensity difference (by rescale intensity)


Hi again

i can’t understand why it doesn’t, because if i hover over the picture in the CorrectIlluminationApply-window it shows me the intensities but there are no particles:
in the picture my mouse was over the pixel in the final image CorrBlue and it shows the intensity 1.5177

I tried also to log normalize the picture:

The pictures were taken with fluorescent Confocal Laser Scanning microscopy.
I hope this helps to solve the problem.

Thanks and best regards

Hi there,

My primitive idea for this issue is to use RescaleIntensity, in which you “Stretch” the range of the intensity of every single image to the range 0-1.
Then do all the downstream modules on this rescaled image (Correct Illumination, Identify Objects etc…)

Also, please adjust the CorrectIllumination smoothing size not to overkill.

Other users may have better suggestions in this though.


Even with RescaleIntensity the display setting is too dark. But it works quite well with just IdentifyPrimaryObjects :slight_smile:

A last question: how can i convert the measurements from pixels to micrometer?

Thanks a lot for a all your help!

best regards


Nice to hear that at least some of the suggestions work for you.

To convert from pixels to micrometer:

  • Try to check with ImageJ > Image Properties > to see the pixel size of your image.
  • If your images don’t contain this information, you would need to look at the settings of your microscope (the software that accompanies and control your microscope). It may also be termed “configuration” or “calibration” .
    For e.g. pixel size = 0.245 x 0.25 micron


I already know the calibration of the microscope, but is there a method with which I get the measurements directly in micrometer?

You can use CalculateMath in CellProfiler to do the multiplication of (pixel size in micron) x (size of particle in pixel)
But in my opinion, it’s easier to just convert it afterward in spreadsheet (Excel).


1 Like

yes you were right its easier to do it in spreadsheet.

Thanks again for the help!
best regards