The size and shape of particles in activated sludge are important parameters that are measured using varying methods. Inaccuracies arise from non-representative sampling, suboptimal images, and subjective analysis parameters. To minimize these errors and ease measurement, we present a protocol specifying every step, including an open source software pipeline.
Experimental bioreactors, such as those treating wastewater, contain particles whose size and shape are important parameters. For example, the size and shape of activated sludge flocs can indicate the conditions at the microscale, and also directly affect how well the sludge settles in a clarifier.
Particle size and shape are both misleadingly 'simple' measurements. Many subtle issues, often unaddressed in informal protocols, can arise when sampling, imaging, and analyzing particles. Sampling methods may be biased or not provide enough statistical power. The samples themselves may be poorly preserved or undergo alteration during immobilization. Images may not be of sufficient quality; overlapping particles, depth of field, magnification level, and various noise can all produce poor results. Poorly specified analysis can introduce bias, such as that produced by manual image thresholding and segmentation.
Affordability and throughput are desirable alongside reproducibility. An affordable, high throughput method can enable more frequent particle measurement, producing many images containing thousands of particles. A method that uses inexpensive reagents, a common dissecting microscope, and freely-available open source analysis software allows repeatable, accessible, reproducible, and partially-automated experimental results. Further, the product of such a method can be well-formatted, well-defined, and easily understood by data analysis software, easing both within-lab analyses and data sharing between labs.
We present a protocol that details the steps needed to produce such a product, including: sampling, sample preparation and immobilization in agar, digital image acquisition, digital image analysis, and examples of experiment-specific figure generation from the analysis results. We have also included an open-source data analysis pipeline to support this protocol.
The purpose of this method is to provide a well-defined, repeatable, and partially-automated method for determining size and shape distributions of particles in bioreactors, particularly those containing activated sludge flocs and aerobic granules1,2. The rationale behind this method were to enhance the affordability, simplicity, throughput, and repeatability of our existing in-house protocols3,4, ease particle measurement for others, and facilitate sharing and comparison of data.
There are two broad categories of particle measurement analysis – direct imaging and inferential methods using such qualities as light scattering5. Although inferential methods can be automated and have large throughput, the equipment is expensive. In addition, while inferential methods can accurately determine the equivalent size of a particle6, they do not provide detailed shape information7.
Because of the need for shape data, we have based our method on direct imaging. While some high-throughput imaging methods exist, they have traditionally required either expensive commercial hardware or custom built solutions8,9. Our method has been developed to employ common, affordable hardware and software that, although suffering from a reduction in throughput, produces far more particle images than the minimum needed for many analyses10.
Existing protocols may not specify important sampling and image acquisition steps. Other protocols may specify manual steps that introduce subjective bias (such as ad hoc thresholding11). A well-defined method that specifies sampling, immobilization and image acquisition steps combined with freely available analysis software will enhance both within-lab image analysis and comparisons between labs. A major goal of this protocol is to provide a workflow and tools that should lead to reproducible results from different labs for the same sample.
Apart from normalizing the image analysis process, the data produced by this pipeline is recorded in a well-defined, well-formatted file12 suitable for use by popular data analysis packages13,14, easing experiment specific analyses (such as custom figure generation) and facilitating data sharing between labs.
This protocol is especially suggested for researchers who require particle shape data, do not have access to inferential methods, do not wish to develop their own image analysis pipeline, and wish to share their data easily with others
1. Collect samples for particle analysis
2. Prepare agar plates of stained, immobilized particles
3. Acquire particle images using a stereomicroscope and digital camera
4. Measure and analyze particle silhouettes
Files Generated
The process illustrated in Figure 1 will produce two files per image analyzed. The first file is a comma separated value (CSV) text file where each row corresponds to an individual particle and the columns describe various particle metrics such as area, circularity, and solidity and defined in the ImageJ manual17. Example CSV files are included as supplemental information and in the examples/data directory.
Figure 1: Graphical workflow describing the four major steps of the protocol. Please click here to view a larger version of this figure.
The second file is intended for use in quality control (QC) and is a GIF image file which overlays the original image with semi-opaque regions representing identified particles, as in Figure 2. The quality of particle identification and segmentation can then be quickly manually evaluated. Although no particle thresholding method is perfect18, Figure 2 is presented as an example of an acceptable result. Poor quality images can either be retaken, or if sufficient data is available, simply removed from further processing.
Figure 2: Example of a Quality Control (QC) gif generated by the image analysis pipeline. Magnification of main image 15x. Excerpt is digitally zoomed to show numbers identifying individual particles in the image. Please click here to view a larger version of this figure.
When evaluating QC images, there are three common errors found:
1. failure to accurately conform to the particle boundaries
2. failure to identify particles
3. artifact inclusion due either to: non-particle components (e.g., bubbles), or errors in thresholding
Examples of these errors are illustrated in Figure 3. Poor particle boundary identification and segmentation between particles often is a result of over-dying, as seen in Figure 3a. Poor illumination can lead to both failure to identify particles (Figure 3b, blue solid circle) and artefact false particles (Figure 3b, red dashed circle). Non-particle matter, such as bubbles, protozoa, fungi, and metazoans, such as the tardigrade in Figure 3c can also be spuriously identified as particles.
Figure 3: Common errors detected during QC analysis. (a) Poor particle boundary detection. (b) spurious particles (red dashed ellipse) and unsegmented particles (blue solid ellipse). (c) Foreign non-particle object. Magnification 15x. Please click here to view a larger version of this figure.
It is easiest to reject the entire image. However, it is possible to use the particle identifier in the QC image (Figure 2, inset) to reject individual particles. This approach is particularly useful when there are a handful of issues in an otherwise useful image (such as the inclusion of non-particles) Figure 3c. Examples of doing so in a reproducible and reportable manner are included in the examples/censoring directory of the github repository.
When a small minimum diameter is specified (<10 pixels), image noise may be spuriously identified as a particle. In those cases, the image may be still be accepted when further downstream analysis is removes their presence. As a guideline, shape data should be treated with skepticism when particles are composed of less than ~200 pixels19.
Figure Generation
The CSV files resulting from the image analysis are Tidy12 and may be easily combined and analyzed in the researcher's preferred software package (such as pandas20 with seaborn21 in Python or dplyr22 with ggplot223 in R). However, the exact figure type required will necessarily vary with research questions and result. An example of a possible figure is included below (Figure 4) and the corresponding code to generate it from the CSV files is available on github16.
Figure 4: Example of experiment-specific figure generated from CSV data produced by the image pipeline. In this example, the particle distributions between two experimental reactors over time are displayed and combined with qualitative metadata noted by the researcher. See examples/figures/R for the generating code and data. Please click here to view a larger version of this figure.
Although the image analysis system is fairly robust and QC steps are taken to ensure poor images are removed, proper attention to specific issues in sampling, plate preparation, and image acquisition can improve both the accuracy of the data and the proportion of images passing QC.
Sampling concentration
Assuming a representative sample has been taken, the most important step is to ensure that sufficient particles are present for representative9 and efficient analysis while not so concentrated that particles overlap.
This has corresponded to approximately 0.5 to 2 mL of mixed liquor over a wide range of total suspended solids, but experiment-specific determination may be necessary. Examples of overly concentrated, overly -diluted, and appropriate particle concentrations are shown in Figure 5 as a reference. Staining is also affected by particle concentration. Over-dilution can result in overly stained, blurry particles while under-dilution may not produce particles with sufficient contrast for optimum thresholding.
Figure 5: Reference images showing particle concentrations which are too concentrated, acceptable, and overly-diluted. Magnification 15x. Please click here to view a larger version of this figure.
Dye concentration
The amount of stain added to the sample is crucial and the correct amount may vary between sludges. Approximately 5 µL of 1% (w/v) methylene blue per 0.5 to 2 mL of sample provides sufficient contrast for thresholding without causing 'bleeding' and obscuring the particle's shape.
There is no single ideal concentration; a balance between contrast and clarity must be chosen. Figure 6 illustrates this tradeoff in three samples stained with 5, 25 and 50 µL of 1% methylene blue per 2 mL of sludge. When weighing this tradeoff, the occasional poorly contrasting particle (Figure 6a) is preferred over poorly resolvable blobs (Figure 6c).
Figure 6: Increased stain concentration improves particle contrast, but also distorts the observed boundary. Magnification 15x. Please click here to view a larger version of this figure.
Plate storage
After immobilization, plates can be stored under refrigeration (4 °C) for at least 3 days. This is a conservative period during which it is unlikely that contaminating growth and dye diffusion will occur. Plates not showing any of the issues described below may still be imaged after 3 days. When stored for too long, existing particles may continue to grow and will appear in the focal plane of other particles while retaining the hue of the stain, as can be seen in Figure 7a. Surface contaminants, such as fungal spores, may also grow after long periods of storage. These generally will not take up the color of the stain and will appear in a different focal plane, as can be seen in Figure 7b. In some cases, it is unclear whether overgrowth or diffusion of the stain has occurred, such as in the bottom of Figure 7b and center of Figure 7c. Regardless of the cause, spots such as those indicate the plate has aged beyond its useful lifetime
Figure 7: Reference images illustrating overgrowth signaling that a plate has been stored beyond its useful lifetime. Magnification 15x. Please click here to view a larger version of this figure.
Plate preparation
There are two issues associated with physically preparing the agar plates – overly thick agar and excessive swirling. In the first case (Figure 8), the particles become suspended at various depths, making it difficult to acquire images with the majority of particles in focus.
Figure 8: Using excessive amounts of agar will produce a sample thicker than the focal plane, resulting in blurry particles. Magnification 15x. Please click here to view a larger version of this figure.
In the second case, swirling produces a non-uniform distribution of particles (Figure 9a), biasing results from different sections of the plate (Figure 9b,c. Generally, no more than 7 mL of agar is required to cover a 100 mm Petri dish and only gentle hand motions are needed to evenly cover the dish.
Figure 9: Overly-vigorous swirling during plate preparation will appear as non-uniform particle distributions (a), biasing sections of the plate towards larger (b) and smaller (c) particle distributions. Plate is 100 mm diameter, micrographs magnified 15x. Please click here to view a larger version of this figure.
Microscopic imaging
There are two major image acquisition issues affecting quality. The first issue is ensuring that the majority of particles are in the focal plane. Even at low magnification, the size of many activated sludge particles is such that without minor adjustments to coarse focus, many particles will be slightly out of focus, introducing inaccurate particle measurement. No image will contain 100% perfectly focused particles; Figure 8 and Figure 5b are respective examples of poor and acceptable focus.
Exposure levels constitute the second major issue. Poorly exposed images result in lost data and poor segmentation11. Further, the high contrast of the dye can produce a narrow histogram, reducing the effective dynamic range of the data. The upper and lower bounds of the histogram may be adjusted prior to capturing an image to both prevent poor exposure and increase the dynamic range. Examples of over, under, and acceptable exposures are included below in Figure 10.
Figure 10: Reference images showing poor and acceptable image exposures. Please click here to view a larger version of this figure.
This method's advantages are that it provides specific criteria encompassing the entire process. Further, we have provided a software pipeline easing within-lab analysis and promoting comparable between-lab data. The major limitation of this method is that the requirement to keep all particles focused prevents high magnifications, limiting its utility for particles with small minor dimensions – notably filamentous structures. Future directions of this method could incorporate advanced image analysis techniques (specifically noise reduction24,25, high dynamic range imaging, focus stacking26,27, and machine-learning assisted thresholding, segmentation, and classification28. The major image acquisition improvement would incorporate software to control mechanical stages8 and produce 'whole plate' mosaic archives.
The authors have nothing to disclose.
This work was supported by a grant from the National Science Foundation CBET 1336544.
The FIJI, R, and Python logos are used with the in accordance with the following trademark policies:
Python: https://www.python.org/psf/trademarks/
R: https://www.r-project.org/Logo/ , as per the CC-BY-SA 4.0 license listed at: https://creativecommons.org/Licenses/by-sa/4.0/
Fiji: https://imagej.net/Licensing
10% Bleach solution | Chlorox | 31009 | For workspace disinfection. |
15 mL centrifuge tube with cap | Corning | 430790 | Per sample. |
50 mL Erlenmeyer flask | Corning | 4980-50 | Other vessels are suitable so long as they can contain > 40 mL of sample and allow mixing |
500 mL Kimax Bottle | Kimble-Chase | 14395-50 | Or otherwise sufficient for agar handling |
Agar | BD | 214010 | Solid, to prepare 7.5% gel. 7 mL per sample. |
Data analysis software | N/A | N/A | R or Python are suggested |
Deionized water | N/A | N/A | Sufficient to prepare stain and agar. If unavailable, tap should be fine. |
Desktop computer | N/A | N/A | Image analysis is not CPU intensive, any 'ordinary' desktop computer circa 2017 should be sufficient. |
External hard drive | Seagate | STEB5000100 | Not fully required, but extremely useful given the number an size of images. 2 or more TB of storage suggested. |
FIJI | NIH | version 1.51d | Version is ImageJ core. Plugins are updated as of writing. Available at: https://imagej.net/Fiji/Downloads |
GIT | Open Source | version 2.19.1 or later | Available at: https://git-scm.com/ |
Image capture software | ToupView | version 3.7.5177 | Any compatible with camera, may come with camera. Should allow saving TIFF images with spatial calibration data. |
Mechanical (X/Y) Stage | OMAX | A512 | Not fully required, but greatly aids image acquisition. |
Methylene blue | Fisher | M291-100 | Solid, to prepare 1% w/v solution. 5 uL solution per sample. |
Microscope camera | OMAX | A35140U | Any digitial camera compatible with microscope. Resolution providing at least 5 um per pixel at 10x magnification and a dynamic range of at least 8 bits per pixel per color channel is suggested. |
Optical Stage Micrometer | OMAX | A36CALM1 | Or otherwise sufficient for spatial calibration. |
Petri dish, 100 mm | Fisher | FB0875712 | 1 per sample. |
PPE | N/A | N/A | Standard lab coat, gloves, and eyewear. |
Sparmoria macro | NCSU | version 0.2.1 | Available at github repository : https://github.com/joeweaver/SParMorIA-Sludge-Particle-Morphological-Image-Analysis |
Stereo/dissecting microscope | Nikon | SMZ-2T | Should provide 10 to 20x magnficiation and allow digital photos either with a buit-in camera or profide a mounting point for a CCD. |