Along with @AmberWise, @Damarquis, @Pagyebo, I've been working to make and document a method of analyzing SEM stub passive particle monitors with visible light microscopy in order to determine PM2.5-10 pollution.
As we've begun working with the samples we've identified a number of issues with imaging, issues we believe will be easier to solve with automated analysis and imaging stages. This note describes some of the issues and challenges we've defined, and solutions we're pursuing.
Imaging time and analysis evaluation
To complicate matters further, the analysis depends on lighting conditions in the thresholding stage. Thresholding divides the image into a high-contrast black and white image. If the particles in the light section are less dark than the background of the dark section, thresholding can't be targeted:
To solve these two issues, we're seeking to get an automated microscope and script ImageJ to process images automatically. I recently brainstormed a bit about ImageJ scripting goals and workflows with @SimonPyle from Public Lab's Chicago chapter about ImageJ, and the different problems and successes @Pagybo has had with taking evenly lit microscope images. This note will focus on good images for use in ImageJ, and the ImageJ scripting workflow.
Read our development plan.
Vignetting & uneven lighting
Vignetting is when an image is darker at the edges. It causes the same problem as uneven lighting, which is also present in this 20X image:
Here are a variety of different thresholds, they all either miss the translucent particles on the left or the solid particles on the right:
Lessons Learned in Imaging
Thresholding can highlight noise, especially "one pixel particles" that are just image artifacts. Some filter for particles below a certain size will have to be implemented.
Getting rid of uneven lighting is ideal. This seems possible through adjustment of the camera and lighting setup. Here is an image with better camera white balance adjustment and a tuned light: 10_26_15_PG1_6_20x.tif
Thresholding is much more successful hear over a range of particle sizes, particle types, and thresholding settings:
Still, some effects from the background lighting unevenness remain.
Challenges and Checks
A challenge will be automating image analysis while accounting for image-to-image thresholding discrepancies and discarding poorly thresholded images. We think being able to check automated particle counting by eye can accomplish this. @SimonPyle suggested we use the tiling (or "montage" in ImageJ") functions to put images on to the same page, like in the image above. This would let whoever is analyzing samples to quickly check the computer's work.
A second challenge is verifying the perimeters of particles are determined correctly. Two comparisons seem helpful. Hand-measured particle perimeters can be compared to computer measured particle perimeters. We will also co-locate our monitors with FEM & FRM monitors for verification.
Batch processing in ImageJ and output goals
Scripting ImageJ to walk through the sample processing stages automatically for a samples' entire image set would allow rapid iteration on the thresholding and sizing steps. Luckily, ImageJ has an Macro Recorder that can record the menu steps of analysis for batch processing. While ImageJ can be scripted in a variety of languages, we'd like to stick to its native scripting language for ease.
Our goals are to create a script that outputs a whole image set to a single tiled image for visual verification. As the script steps through the analysis steps of thresholding, filling, perimeter measurement, and circularity calculation, it would save a tiled image of each step with each particle numbered uniquely. These numbers would be in the output CSV file.
Time to get scripting!