Muscle fibre segmentation

Hi, I have been having a look through the forums and cant seem to find what I am looking for. I have a large number of images of muscle fibers from fish. Unlike mammals the fibers are constantly being recruited and enlarged. I am looking to measure all of the fibers in each image so that I can compare between fish that have been exposed to different treatments.

I have included an example of what the images look like. Sometimes there is some white between the cells from shrinkage like in the top left of the image but this is not always the case. I have the original images as true tif files so separating out each channel is easy.

Last time I did this exercise I manually traced round each cell and then scanned and analyzed particles which worked very well but I am keen to avoid the weeks of tracing if possible.

Many thanks for any suggestions.

Hi @noah472

This looks like an interesting segmentation task! Some idea which might work:

  • Apply a Gabor Filter
  • Do a maximum projection of the filter results
  • Threshold the projection

If you can upload the tif I could try some stuff and maybe come up with a better segmentation.


Good day,

the main problem with this image is the varying contrast of the cell membranes. If your TIFF-images are spatially better resolved, reliable segmentation may be possible.



Hi, thanks a lot for the quick replies!!

The tifs have a lot more detail, I will upload one and you can see.

Thanks a lot!

I cant seem to upload (New users cant upload) so I have put it on dropbox: or


here is a first attempt (not perfect) that may help you with the segmentation task.

The image part I’ve investigated (I judge it being not the easiest to segment):

And here is the result from “Analyze Particles”:

The preprocessing was in two steps, starting with “Minimum”-Filtering (3 pixel) and then applying “Color Threshold” (HSB Default) with blue passing (202).

I hope this gets you started



Dear Herbie,

that is looking good thanks for your help! I am pretty new to imagej and image analysis in general (as is no doubt obvious). How did you remove the smaller dots from the thresholded image? Do you think I will be able to set this up to batch process a lot of images?



my answer to

“Do you think I will be able to set this up to batch process a lot of images?”

is no. The parameters will turn out to be slightly different for images taken from different tissue at different times, except you are very lucky and the imaging conditions are identical. The latter must be doubted according to your protocol.

Good luck


The little dots are disregarded if you choose appropriate sizes in “Analyze Particles”.

Dear Herbie,

I got quite a similar problem, just that I cannot easily seperate the muscle fibres by selecting for blue passing via the colour thresholding - irrespective of using the minimum filter beforehand. Often I can only guess the boundaries between the muscle fibres that I want to quantify. Is there any way how I could do that with imageJ?

Thanks a lot! and here s an examplary picture


even by eye I have difficulties to recognize or better to imagine certain cell membranes. In such cases there is little to no chance for machine analysis.

What may be possible is to separate the two types of cells, based on their different textures. Within each class however, there are cells that appear hardly separable.

Please accept that the eye seems to recognize better but the machine is more objective!



Thanks - that s what I was afraid of…

Best, Cleo