ImageJ-Fiji allows you play with a single image in great detail, CellProfiler helps you to scale things up by pipelining your analysis modules. The next image analysis software that we will take a look at is ilastik that allows you to apply machine learning and computer vision algorithms to perform the fundamental visual recognition tasks.
Installing ilastik is pretty straightforward. You should be able to download the library and extract the executable file. After invoking the ilastik application, you shall see several different options. We shall choose the pixel classification workflow to segment the image into important classes.
Select Pixel Classification workflow and save your project file. It will be saved as .ilp format.
Click "Add New" and load your input image file
Get familiar with the ilastik working panel. On top you see the image information. Beneath in the image window you have options to rotate, transpose, zoom-in, zoom-out, and export the image. On left, there are the machine learning steps including feature selection to annotation, training and exporting results.
Features on ilastik are various filters that when applied to the image produce feature channels as big as the input image itself. One can select as many features (and as many parameters) as your system permits without getting too slow. When you click Ok the features appear on left side. Clicking on them will allow you to visualize the feature channels in the image window.
In this example we have defined three classes: Cell_1, Cell_2, and Background. You can double-click on the class names to change the names, and colored legends to change the colors. You can click "+ Add Label" to increase the number of classes. Select each class and scribble on the corresponding area in the image to generate ground truth.
Click on "Live Update". It will take few seconds to train and display the output. Keeping the "Live Update" on you can keep on adding annotation to improve the classifier. You will be able to see the output real time.
So far you are visualizing the class-wise probability scores overlaid on the image. When you are satisfied with the training output, check the Segmentation box to display the mask (produced by thresholding the probability scores).
You can go back to the training (i.e., more annotation) if required, otherwise it is time to export results. Click on "Prediction Export", review output folder information by clicking on "Choose Export Image Settings", and click "Export All". You can do batch processing on additional input images using the same trained model. But to keep things easy make sure your all input images come from the same folder (otherwise, ilastik would create the directory structures while saving the output).
Install the ilastik plugin in Fiji. Visit your ilastik-output directory to locate the HDF5 file (.h5) that ilastik produced. Follow Plugin > ilastik > Import HDF5 > Select the ilastik's output file. Now see the dataset info above on left side: (1024, 1344, 3) suggest an axis order of yxz (vertical-horizontal-classes). Hence correct the axis ordering as show on right: yxz. Click OK.
Initially Fiji would open the probability scores of three classes as stacked images of three. Follow Image > Stacks > Stacks to Images to split the three probabilities into separate images. We shall work on the background probability image and ignore the other two for now.
Select the background probability image and convert it to 8-bit (Image > Type > 8-bit). Then follow LUT > Invert LUT. Next apply Image>Adjust>Threshold. Click on Apply to produce masks.
You can do: Process > Binary > Erode till all small particles disappear. Next perform Process > Binary > Dilate couple of times to restore the receded boundary caused by erosion.
If the cells are touching each other apply Process > Binary > Watershed to split clubbed cells. Otherwise we are ready to perform image analytics to pull statistics: Analyze > Analyze Particles > Select Options as shown > Click OK. Save the Results in a CVS file for further analysis.