What I want to do
I want to document the manual steps of processing the images of passive particle monitors, stepping through the first part of the process outlined in my previous note on analysis. See also: imaging passive particle monitors, replicating passive particle monitors, research background
the goal is to take a full-color microscope image and:
- Set the scale
- convert to a high-contrast black and white image through "thresholding"
- fill any "holes" in the high contrast particles
- measure the particles' perimeter and area
My attempt and results
I used Fiji, a distribution of ImageJ with a nice interface and easier scripting capabilities all ready to use.
Setting the Scale
I found instructions in the Fiji help for setting the scale.
First, draw a line of a known length (preferably on top of a calibrated scale) on one of the images using the Line Selection tool
Now go to the menu Analyze > Set Scale.
- Set unit length to μm (you an type um)
- check "global"
- this will make it apply to all the other images opened
You can find and check this calibration under Plugins > Utilities > Image Properties
Thresholding the image
Thresholding makes everything on one side of a color or lightness threshold a single color. We are going to do it on a greyscale image to get a black and white image that is "binary," i.e. every pixel is either black or white.
First, convert the image to greyscale by going to Image > Type > 8 bit
Now we want to threshold the image to a binary image. Go to Image > Adjust > Threshold
There are a variety of available modes, all of them seem to produce a decent binary image if the brightness is adjusted correctly. It is an open question as to which we should use.
select a threshold that isolates particles without including noise. This should be the same threshold used universally during processing, so some testing is called for.
Now to make sure there aren't any greyscale elements left by using the command Process > Binary > Make Binary
You should have something like this:
While thresholding gave us a good high-contrast image, somewhat transparent or reflective particles have "holes" inside them (left) that we want to fill (right):
Go to Process > Binary > Fill Holes
Now our image is ready to analyze. We first need to set the measurements that will be taken. Go to Analyze > Set Measurements and check off:
- Shape Descriptors
Shape Descriptors will give us the "circularity" factor needed for our volume calculations.
Now go to Analyze > Analyze Particles
ImageJ has now calculated the area and perimeter of the particles and represents them as idealized ovals.
We also have a .xls (Excel spreadsheet) file that we can use to run the volumetric equivalents described previously.
Questions and next steps
The manual procedure will be useful in helping us make decisions about how best to image the particles and what thresholding system to use. ultimately though, we want to create an automated script.
Also see @Damarquis's note on using MaxEntropy https://publiclab.org/notes/Damarquis/10-20-2015/using-imagej-to-analyze-threshold-and-saving-results-on-windows-10
Reply to this comment...
Log in to comment
Login to comment.