You are on page 1of 13

MINDANAO STATE UNIVERSITY-ILIGAN INSTITUTE OF TECHNOLOGY

COLLEGE OF SCIENCE AND MATHEMATICS

DEPARTMENT OF PHYSICS

Activity 1
Area Measurement and Particle Counting using
ImageJ

Presented by:
Yvonne Levin H. Cericos
Bachelor of Science in Physics

A laboratory manual presented to


Prof. Eli Christopher Enobio
Department of Physics
CSM, MSU-IIT

March 2023
Introduction
ImageJ is a Java-based image processing program that was designed with an open
architecture that provides extensibility through Java plugins and recordable macros. ImageJ can
display, edit, analyze, process, save, and print 8-bit color and grayscale, 16-bit integer and
32-bit floating point images. It can read many image file formats as well as raw formats.
ImageJ’s built-in editor and a Java compiler can develop custom acquisition, analysis and
processing plugins. User-written plugins make it possible to solve many image processing and
analysis problems.
Objectives:
● To be able to analyze images using ImageJ.
● To determine the area measurements of a complex object. In this case, a leaf is being
analyzed.
● To count and determine the size distribution of particles. Pebbles are used for this
laboratory experiment.

Materials used:
● 1 bond paper for background
● Leaf (Complex Object)
● Pebbles (Particles)
● Ruler

Methodology
For Area Measurements of a Complex Object (Leaf):

ImageJ will be the main application for this laboratory experiment. To use the said
application, we need to first open ImageJ on the computer. After it is opened, we then load the
photo of our complex object, which in this case is a leaf. We also need to put a ruler beside the
object for us to use in our calibration after loading the picture in ImageJ. To open the picture of
our chosen subject, we click File - Open - Click on the file name of your chosen image. Next we
need to convert the scanned color image of the leaf to grayscale by clicking Image -Type - 8-bit.
After the image is converted, we need to set the measurement scale. This step is crucial
in calibrating our measurements. In order to do this, we draw a line over the 50mm section of
the ruler by clicking the *Straight* button. You can also zoom in to better view the lines and
numbers on the ruler. You need to click on the two points of the ruler with a 1cm distance then
click Analyze - Set scale. The Set Scale window will pop out after clicking set scale. We enter 50
in the ‘Known Distance’ box and also set the ‘Unit of Length’ box to mm. Click the box beside
the word ‘Global’ afterwards then lastly, click ‘Ok’.

We can also make sure our measurements are correct by drawing a new line and
confirming it by looking at the Set Scale window again. Next we threshold the leaf using the
automated routine by clicking on Process - Binary - Make Binary. The automated threshold only
includes the green area of the leaf. You can also crop out the ruler to focus better on the leaf.
The image should look like this:
Next we now calculate the area of the leaf (green portion of the image) by clicking on the
Rectangular selection button and enclosing the leaf inside the rectangle. We then click on
Analyze - Analyze Particles. A window will pop out then enter 50-infinity in the Size (mm^2) box,
click the box beside ‘Show’, a drop box will appear then click Outlines. Lastly, tick the box
beside ‘Display Results’ then click ‘Ok’. A Data Window will appear along with an outlined
picture of the leaf. Here, we can see the area of the leaf which is 58,176.123 mm^2.

Another way to measure the area of the leaf is by thresholding the new image of the leaf
using manual setting. First, we Image - Adjust - Threshold then adjust the sliders until all the
area of the leaf is colored red and click ‘Apply’. The manual threshold setting includes all areas
of the leaf.
To calculate the area of the entire leaf we first need to enclose the leaf in a rectangle by
using the Rectangular Selection tool then click Analyze - Analyze Particles. A window will pop
out then enter 50-infinity in the Size (mm^2) box, click the box beside ‘Show’, a drop box will
appear then click Outlines. Lastly, tick the box beside ‘Display Results’ then click ‘Ok’. The
outlined drawing of the leaf will appear again along with the data window giving us the area of
the leaf which is 58,259.715 mm^2.

An alternative way for measuring the area is by clicking on Analyze - Set Measurements.
A window will pop up then tick the box beside ‘Limit to threshold’ then click ‘Ok’. You need to
convert the picture to a binary image by clicking on Process - Binary - Make Binary then select
Analyze - Measure. Only the data window will appear where the area of the leaf is shown which
is 59,458.122 mm^2.
For Particle Counting and Analysis (Pebbles):

First, we need to open our selected image (peanuts) by clicking on File - Open - click on
filename of the image. We then calibrate the measurements by drawing a line on the ruler with a
distance of 1 cm and clicking on Analyze - Set Scale. The set scale window will appear where
you need to type in 10 in the ‘Known distance’ box and set the unit of length to mm then press
‘Ok’.

Next we convert the image into grayscale by clicking on Image - Type - 8-bit. We can
now crop out the ruler since we are done setting the scale and will no longer be needed.
We then threshold the image using the automated routine by clicking on Process- Binary
- Make Binary.

We can now analyze the particles by clicking on Analyze - Analyze Particles. A window
will appear where we need to type in 20-infinity in the Size (mm^2) box, select ‘Outlines’ in the
Show box then tick on the box beside ‘Display Results’, ‘Summarize', and ‘Record Starts’ then
click ‘Ok’. An outlined drawing of the particles will appear along with the Results window and
Summary window where the Area of each Particle, Number of Particles (7), Total Area (104.693
mm^2), Average Size (93.278), Area Fraction (6.738%) is shown.
For Area Measurement of SEM:

First we need to calibrate the measurements by drawing a line on the scale bar then
clicking on Analyze - Set Scale. A window will pop out on the screen then we will enter 100 in
the ‘Known Distance’ box and set the Unit of Length to nm.

Next we need to remove the outliers by clicking on Process - Noise - Remove Outliers -
Ok. We then use the Wand Tool to adjust the tolerance until the SEM is enclosed by double
clicking on the Wand tool then a window will appear where you can change the tolerance by
moving the sliders.
SEM IMAGE 1:
SEM IMAGE 2:

SEM IMAGE 3:
SEM IMAGE 4:

SEM IMAGE 5:
SEM IMAGE 6:

SEM IMAGE 7:
Results and Discussion

There are 3 ways in getting the area measurement of a complex object all three with
similar results. For the first method where we threshold the leaf image using the automated
routine, the analyzed area of the leaf is 58,176.123 mm^2. The second method where we
threshold the image using manual settings shows us that the area of the leaf is 58259.715
mm^2 while the alternative method shows us that the area of the leaf is 59,458.122 mm^2. The
percent difference between the first and second method is 0.14%, the percent difference
between the first and third method is 2.2% and the percent difference between the second and
third method is 2.1%. Both the first method and second method show an outlined drawing along
with the Results window of the leaf while the third method only shows the Results window with
no outline drawing. As for analyzing the particles, the Results window along with the Summary
window shows that the Area for each particle (shown in table below), Number of Particles is 7,
Total Area is 104.693 mm^2, Average Size is 93.278 and the Area Fraction is 6.738%.

Particle Area

1 184.791

2 63.818

3 61.300

4 101.657

5 60.593

6 48.164

7 99.359

We can also find the Area measurement of an SEM through the Wand tool. The analysis
is shown in a table below.
SEM AREA

1 6959.940

2 6167.538

3 4889.535

4 3393.154

5 2644.218

6 1821.173

7 759.420
Conclusion

The 3 ways in analyzing the area measurement display different results. In my opinion,
the most accurate way of measuring the area in ImageJ is the second method because you can
manually adjust what area to include in analyzing the area of the leaf. The third method is the
least accurate since it displays the area with the largest percent difference when compared to
the first and second method which is 2.2% and 2.1% respectively. Both the first and second
method show an outline drawing of the leaf which are very similar to each other and can be
useful. Sadly, when light reflects on the complex object, the first and third method do not include
the area with the reflected light which can affect the accuracy of the area. I used flash when
taking the first picture of my leaf and later realized that the area where the light reflected was
not included so I had to retake a picture as a sample. This is why I highly recommend the
second method where we can manually adjust the area covered in analyzing the area
measurements. The second method provides us with the freedom to include which parts should
be analyzed which is why I can say it is more accurate. As for particle counting and analysis,
though it provides us with the detailed result, the particles should be far apart enough for
ImageJ to recognize them as two separate particles. The first image I used as a sample were
near each other resulting in two particles being analyzed as one so instead of having 7 pebbles,
ImageJ only counted 6 since two pebbles were too close to each other. I had to retake my
picture where the particles are far apart so the app can analyze them as two separate particles.
I noticed that the area of the SEM is getting smaller and smaller. The bigger the area covered,
the bigger the area analyzed. Also, the farther the particle is, the smaller the resulting area is. It
is convenient to know the area of a particle by just adjusting the tolerance. This means that this
is a faster way of getting the area measurement.

You might also like