Image analysis of alginate capsules/beads

A007 - 20200722_123807 142.bmp (3.5 MB) ## A007 - 20200722_123807 142.bmp (3.5 MB) # Sample image and/or code

I have prepared some capsules of alginate which are around 2mm in diameter. In core part is oil and shell part alginate. I have to analyse hundred of these images.

I have taken images of capsules with my mobile. Most of the images are without the scale.

My analysis goal is to determine circularity/sphericity of whole capsules as well as core, diameter of capsule and core, area of shell and core, volume of core and shell.

Dear @rajanikant_savant,
If you take some images with a mobile phone and without a graduated scale it will be very difficult to estimate the size of your objects.

  • Workflow with Fiji:
  1. open your data
  2. use color threshold (example:
// Color Thresholder 2.1.0/1.53c
// Autogenerated macro, single images only!
min=newArray(3);
max=newArray(3);
filter=newArray(3);
a=getTitle();
call("ij.plugin.frame.ColorThresholder.RGBtoLab");
run("RGB Stack");
run("Convert Stack to Images");
selectWindow("Red");
rename("0");
selectWindow("Green");
rename("1");
selectWindow("Blue");
rename("2");
min[0]=0;
max[0]=255;
filter[0]="pass";
min[1]=0;
max[1]=255;
filter[1]="pass";
min[2]=158;
max[2]=255;
filter[2]="pass";
for (i=0;i<3;i++){
  selectWindow(""+i);
  setThreshold(min[i], max[i]);
  run("Convert to Mask");
  if (filter[i]=="stop")  run("Invert");
}
imageCalculator("AND create", "0","1");
imageCalculator("AND create", "Result of 0","2");
for (i=0;i<3;i++){
  selectWindow(""+i);
  close();
}
selectWindow("Result of 0");
close();
selectWindow("Result of Result of 0");
rename(a);
// Colour Thresholding-------------

  1. watershed
  2. set Measurements…
    click on Shape descriptors (for circularity, roundness etc…)
    click on Fit elipse (for major and minor diameters)
  3. Analyze particles…
    click on display results
    clear results
    Add to manager

    kind regards,
1 Like

Dear Alex,
First of all, Thank you and sorry for late reply.
I am new to image analysis and slow learner.
min=newArray(3);
max=newArray(3);
filter=newArray(3);
a=getTitle();
I did not understand this and
min[0]=0;
max[0]=255;
filter[0]=“pass”;
min[1]=0;
max[1]=255;
filter[1]=“pass”;
min[2]=158;
max[2]=255;
filter[2]=“pass”;
for (i=0;i<3;i++){
selectWindow(""+i);
setThreshold(min[i], max[i]);
run(“Convert to Mask”);
if (filter[i]==“stop”) run(“Invert”);
}
imageCalculator(“AND create”, “0”,“1”);
imageCalculator(“AND create”, “Result of 0”,“2”);
for (i=0;i<3;i++){
selectWindow(""+i);
close();
}
selectWindow(“Result of 0”);
close();
selectWindow(“Result of Result of 0”)
this part.
could you tell your gmail id so we could communicate more efficiently.
thank you,
Rajanikant

Dear @rajanikant_savant,
The script / macro I send is just the result of the color threshold plugin.
Please follow the workflow 1 to 5 and adjust the settings for the color threshold base on your needs.

The color threshold need to be record in a macro
see the recorder function and the macro.

color threshold

28.2.5 Color Threshold…

Thresholds 24-bit RGB images based on Hue Saturation and Brightness (HSB), Red Green and Blue (RGB), CIE Lab or YUV components. Ranges of the filters can be set manually or based on the pixel value components of a user-defined ROI. This command, implemented in version 1.43l, is an experimental built-in version of the Threshold Colour plugin [20] and is not yet fully integrated into ImageJ.

figure images/ThresholdColor.png

Figure 21 Segmentation of DAPI stained nuclei using Image▷Adjust▷Color Threshold…↑

Pass If checked, values within range are thresholded and displayed (band-pass filter), otherwise, values outside the selected range are thresholded (band-reject filter).

Thresholding Method Allows any of the 16 different automatic thresholding methods to be selected ( see Threshold… [T]↑).

Threshold Color Selects the threshold color: either Red , Black , White or Black & White ( see Threshold… [T]↑).

Color space Selects the color space: HSB , RGB , CIE Lab or YUV ( see Color Spaces and Color Separation↑).

Dark background To be checked when features are lighter than the background ( see 23: Interpreting Binary Images↓). The state of the checkbox is remembered across restarts.

Original Restores the original image and updates the buffer when switching to another image.

Filtered Shows the filtered image. Note that the final thresholded image type is RGB, not 8-bit gray ( see Image Types and Formats↑).

Select Creates a ROI selection based on the current settings. The selection is made according to the settings defined in the Process▷Binary▷Options…↓ dialog.

Sample (Experimental) Sets the ranges of the filters based on the pixel value components in a user-defined ROI.

Stack Processes the remaining slices of the stack (if any) using the current settings.

Macro Creates a macro based on the current settings which is sent to the Macro Recorder window (Plugins▷Macros▷Record…↓), if open.

Help Opens the built-in help dialog.

1 Like