Facilitated endospore detection for Bacillus spp. through automated algorithm‐based image processing

Abstract Bacillus spp. endospores are important dormant cell forms and are distributed widely in environmental samples. While these endospores can have important industrial value (e.g. use in animal feed as probiotics), they can also be pathogenic for humans and animals, emphasizing the need for effective endospore detection. Standard spore detection by colony forming units (CFU) is time‐consuming, elaborate and prone to error. Manual spore detection by spore count in cell counting chambers via phase‐contrast microscopy is less time‐consuming. However, it requires a trained person to conduct. Thus, the development of a facilitated spore detection tool is necessary. This work presents two alternative quantification methods: first, a colorimetric assay for detecting the biomarker dipicolinic acid (DPA) adapted to modern needs and applied for Bacillus spp. and second, a model‐based automated spore detection algorithm for spore count in phase‐contrast microscopic pictures. This automated spore count tool advances manual spore detection in cell counting chambers, and does not require human overview after sample preparation. In conclusion, this developed model detected various Bacillus spp. endospores with a correctness of 85–89%, and allows an automation and time‐saving of Bacillus endospore detection. In the laboratory routine, endospore detection and counting was achieved within 5–10 min, compared to up to 48 h with conventional methods. The DPA‐assay on the other hand enabled very accurate spore detection by simple colorimetric measurement and can thus be applied as a reference method.


INTRODUCTION
Bacterial endospores are widely distributed metabolically dormant cell forms that guarantee population maintenance under harsh environmental conditions and withstand stress, such as heat, UV radiation or high pressure [1,2]. Bacillus spp. form endospores under nutrient depletion or environmental stress, involving a complex biochemical process resulting in the lysis of the mother cell and release of an endospore [3,4]. During endospore maturation, a high content (5-15% dry mass) of dipicolinic acid (pyridine-2,6-dicarboxylic acid, DPA) is formed intracellular [5]. The dicarbonic acid DPA chelates with Ca 2+ and primarily confers the extreme heat-resistance of endospores [6,7]. The matured condensed endospores show a high self-reflection in phase-contrast microscopy mainly due to the DPA content [8]. Furthermore, DPA only occurs in spores, making it a well-suited biomarker for endospore detection [9]. Bacillus spp. endospores are used in biotechnological products such as probiotics or other nutritional supplements [10], but can also pose a possible health threat due to pathogenic strains. Therefore, an efficient endospore detection tool in a biotechnological process or as potential contamination control is of great importance. A standardized method for spore detection, often used for quality control, is the determination of colony forming units (CFU). Nonetheless, this approach is prone to errors by dilution, sampling, and interpretation of the results. Moreover, the growth of plated bacteria and their morphology, density and motility lead to an underestimation of CFU and consequently to a decreased bacterial cell count. CFU determination is a time-consuming and elaborate method for spore detection due to sample preparation and incubation time [11][12][13]. Furthermore, endospores can also be marked by staining techniques such as Schaeffer-Fulton to distinct between vegetative cells and endospores [14,15]. As mentioned before, DPA acts as a suitable biomarker and is often used for the spore detection as well [9]. DPA can either be detected by a historic colorimetric assay from the 1950-1960s, using ammonium iron(II) sulfate [16,17] or in more recent publications with lanthanides such as europium(III) or terbium(III) [18][19][20][21][22]. Those assays have no special technical requirements and lead to a significant time-saving compared to CFU. The ammonium iron(II) sulfate assay has the advantage that the used chemicals are inexpensive and can be disposed of easily. Nonetheless, it has sunk into oblivion, maybe due to poor applicability and reproducibility caused by the inept antioxidant ascorbic acid. DPA assays with lanthanides are more expensive and need a separate disposal. Lanthanide assays are better suitable for low DPA concentrations, making it a more sensitive method than the ammonium iron(II) sulfate assay [21].

PRACTICAL APPLICATION
The detection of endospores can be timeconsuming and often impedes real-time detection. So far, the current state-of-the-art method for spore quantification is the elaborate CFU determination. In this work, two methods, namely an historical assay for the dipicolinic acid (DPA) content determination adapted to fit modern requirements and a novel automated counting model are presented, which both shorten the time and workload of Bacillus endospore detection. Particularly, the counting model facilitates the spore determination in the laboratory routine with minimal technical effort. Additionally, this counting model could be used as an at-line automation tool for running bioprocesses or spore production monitoring. In the future, the developed counting model could be coupled with deep learning of artificial intelligence (AI) to further improve its spore detection performance further. The adapted DPA-assay on the other hand, also showed also high accuracy. Thus, it can generally serve as a suitable fast applicable reference method for spore detection rather than CFU determination.
In fact, the most obvious form of endospore detection may be microscopy, specifically after Schaeffer-Fulton staining or by phase-contrast microscopy [23,30]. Microscopic detection of spores is an easy method requiring minimal technical effort. However, this method relies on personnel that manually performs laborious cell counting in a cell counting chamber. To overcome the existing hurdles of conventional endospore detection tools, as explained above, innovative solutions are needed. For example, automated microscopic methods could simplify and speed up spore detection and also minimize the workload and human-sourced errors [31]. A semi-automated fungus spore detection method was developed by Li et al. using an algorithm-based automatic spore counter combined with a human oversight element resulting in a correct spore detection of 90% [32]. For Bacillus subtilis, a semi-automated image processing algorithm was devel-oped for purity control of spore samples. Here, a combination of Schaeffer-Fulton staining and bright-field as well as fluorescence microscopy was used for spore detection [33]. Fully automated microscopy spore detection algorithms were reported for fungi by Lei et al. [34], Korsnes et al. [35] and Gao et al. [36] based on microscopy spore detection.
In this work, an image processing model for spore cell detection and counting from phase-contrast optical micrographs was developed and applied through the development of a fully automated image processing algorithm. This algorithm detects and counts Bacillus spp. endospores within 5-10 min and is thus likely to tremendously expedite and facilitate spore detection in comparison to conventional methods such as CFU determination.  The strains present as spray dried powder were activated by suspending and swelling the cell pellet in 500 μL 0.9% w/v sterile saline solution for 30 min. The suspensions then were diluted 1:10 in media and were treated accordingly as described above for the cultivation of the bacteria.

Petroff cell counting chamber
The total cell count and the number of endospores were determined using a Petroff chamber (depth 0.02 mm). If necessary, samples were diluted with 0.9% w/v saline solution. For the cell count at least four counting chambers with each five large squares consisting of 16 small squares were counted. Endospores and vegetative cells were counted using the same sample to generate the total cell count. For the detection of endospores and vegetative cells a phase-contrast microscope (microscope: Olympus CX41RF and condenser: CX-PCD) was used with a 40 × magnification. The cell number was calculated as depicted in Equation (1).

Colony forming units
The

Ammonium iron(II) sulfate assay
The modification of the assay was based on the publications of Janssen et al. [16] and Rotman et al. [17]. After cultivating Bacillus spp., the samples were autoclaved for 20 min at 121 • C. Subsequently a centrifugation step (15,000 × g, 15 min, 4 • C) was added to release DPA from the cells and separate the DPA in the supernatant from cell debris. For the assay buffer, an acetate buffer (0.05 mol L −1 , pH 4.6) was prepared. Additionally, a cysteine stock solution was freshly prepared (50 g L −1 , 0.1% w/v). The composition for 1 mL of assay buffer consists of 980 μL acetate buffer and 20 μL cysteine stock solution, which is used as a blank for the detection as well. Lastly 10 mg mL −1 ammonium iron(II) sulfate (1% w/v) were freshly added to the assay buffer. The DPA stock solution contains 1 g L -1 and can be prepared in saline solution or purified water. Using the DPA stock solution, a calibration series in the range between 0 and 200 μg mL −1 DPA was prepared. Samples were measured in 96-well plates at 440 nm, each well containing 160 μL prepared sample or DPA calibration solution and 40 μL assay buffer. The calculation of the DPA concentration based on the ammonium iron(II) sulfate assay is depicted in Equation (2).

DPA concentration
The limit of detection (LOD) was calculated as depicted in Equation (3). (3)

Ammonium iron(II) sulfate assay
Initial experiments were based on the historic publication by Janssen et al. [16] using ascorbic acid as an antioxidant in the ammonium iron(II) sulfate assay. An occurring precipitation and reddish discoloration, led to the exploration of the ammonium iron(II) sulfate assay by Rotman and Fields [17]. In this assay, cysteine was used as an antioxidant and a lower pH of the acetate buffer was set, resulting in a yellow chelate complex formed by DPA and ammonium iron(II) sulfate in purified water. First, the modification of the assay for Bacillus spp. was focused on the detection of pure DPA in purified water. A linear range for the detection of DPA in purified water measured at 440 nm was found between 0-200 μg mL -1 (R 2 = 0.9997) and is depicted in Figure 1.
A screening for the optimal wavelength between 390-550 nm for the measurement confirmed the stated wavelength of 440 nm by Rotman and Fields [17] as the optimum for this assay. Additionally, the calculated limit of detection (LOD) for pure DPA dissolved in water was LOD H2O = 1.44 μg mL -1 DPA. Consequently, the assay was initially tested using B. coagulans to determine the cell number by using the concentration of DPA. Therefore, it is necessary to compare established methods for the determination of cell numbers to this assay. In this work, the determination of CFU and cell counting using a Petroff counting chamber were used as established methods. The results for this can be found in Table 1. The determination of the cell count by counting chamber was set as 100% due to its reliability as an established method. The CFU determination only depicts germinated endospores and thus cannot display the total cell count. Nonetheless, CFU determination can be prone to errors as seen in the results (Table 1). Only 45% of the initial spore count by counting chamber was found using the CFU determination. By applying the ammonium iron(II) sulfate assay, Bacillus spp. endospores were successfully detected and the DPA content was calculated.

Spore detection by algorithm
Additionally, the cell count can be determined by phasecontrast microscopy. Phase-contrast microscopy depicts spores as highly reflective and round structures, which can be distinguished from the vegetative cells by their shape and reflection. The development of a counting model for spore detection can simplify the detection of endospores of Bacillus spp. In Figure 2, an overview of the developed counting model is concluded.
First, a Flat-field correction was applied to minimize an occurring light gradient caused by the microscope apparatus. To improve the image, a copy of the original image was created and a fivefold Gaussian blur filter with a size of 21 and a σ-value of 5 was applied to edit the images. For the application of the Flat-field correction, an empty image is usually used. The Gaussian blur filter was applied due to the lines of the counting chamber and resulted in the blurring of the lines to generate a nearly empty image. Subsequently, the lighting conditions were factored out by subtraction. Additionally, the Gaussian blur filter improved the edge detection in the following Canny edge detection. This detection method depicted the edges as one-pixel-width edges. The parameters for the detection were: lower threshold = 20, upper threshold = 41 and σ = 1.4. A detection of the edges, using Canny edge detection, is necessary to improve the following Hough line transformation. This transformation serves to find the lines in the image. For this, a fitting linear equation was generated for every white pixel. In this procedure, a Hess normal form was used to calculate the parameters radius and θ. The resulting accumulation of parameters (frequency for a calculated combination of the two parameters) was shown in a matrix, also known as a parameter space. The local maxima represent possible linear slopes [37]. Subsequently, the detected lines were sorted out over the angle and distance to each other. For spore detection, the preprocessed image was processed with a Bradley local thresh-TA B L E 2 Spore count determination of B. coagulans, B. licheniformis, and B. subtilis by counting chamber (manual count, set as 100%), model-based automated cell count, ammonium iron(II) sulfate assay and CFU determination old. To do so, the window size was set to 7 and the σvalue to 0. Most endospores can be easily detected with this procedure, as a dark ring surrounds them. Then, the image was checked for objects that had a certain size. Pixels were added to an object, if they were located in its socalled Moore neighborhood (8-connected-neighborhood).
Since the endospores have a round shape, they were then sorted out based on their compactness and eccentricity. Due to a high amount of background noise, objects that are not endospores were also detected. Because of this, a method was inserted that makes use of the dark ring around endospores. This method, here referred to as FDR (Find Dark Rings), generates 16 lines that run out from the center of the object. Then, each pixel on a line was compared with the darkest pixel of the object. If there is a darker pixel, this concludes that the dark ring has been found correctly. In the algorithm images, this correct finding was indicated as a green line. If at least 75% of the lines of an object are marked green, it is recognized as an endospore. Finally, the detected objects were assigned to the respective counting chamber squares. The position of the detected object was compared to the straight line and was divided into a class. Each class equals a small square and was assigned a different color. The endospore number in each class was counted and displayed. The developed model was tested by comparing its resulted spore count to a manual count in a counting chamber, a CFU determination and the application of the ammonium iron(II) sulfate assay. For these experiments three Bacillus strains were used, namely B. coagulans, B. licheniformis, B. subtilis. The results of the spore count determination by using four different methods are depicted in Table 2.
The three Bacillus species were successfully detected by the automated cell count resulting in a correct recognition of 85.11% (±5.21%) for B. licheniformis, 89.23% (±3.31%) for B. coagulans and 86.35% (±2.90%) for B. subtilis. Furthermore, the ammonium iron(II) sulfate assay showed comparable results to the manually counted spore number. As expected, the CFU determination showed the largest deviation from the manual cell count by counting chamber. Figure 3 summarizes the estimated expenditure of time and necessary preparation steps for the four different spore count methods (CFU, ammonium iron(II) sulfate assay [16,17], counting chamber, and cell count by algorithm), respectively.

DISCUSSION
In this work, the historical ammonium iron(II) sulfate assay by Janssen et al. and Rotman et al. [16,17] was modified and applied to three different Bacillus spp. Subsequently, a linear range for the detection of DPA could be confirmed as well as the used wavelength. To establish this method in the laboratory routine, the ammonium iron(II) sulfate assay was performed and compared to CFU determination as well as the manual cell count by counting chamber. In these experiments, the ammonium iron(II) sulfate assay showed well comparable results for the endospore detection as the standard method (counting chamber). Nonetheless, this work also underlined the expenditure of time and workload as well as the immense error quota of the CFU determination. By using this method, only viable germinated endospores are detected, which results in a significantly lower and false spore count [38]. The ammonium iron(II) sulfate assay accelerates endospore detection, especially in relation to CFU determination. This method is particularly interesting for an overall screening of endospores as a contamination in various samples. However, the detection limit entails the application for food or soil samples, as endospore numbers are much lower in such samples [21,39]. Other assay methods, such as Terbium(III) assays provide a better fit for these areas of application, but are of limited application due to the use of rare earth elements [39,40]. A further possible source of friction can be media components, which are affecting the turbidity. These circumstances make it necessary to transfer the sample to saline.
Additionally in this work, a new algorithm for the detection of endospores in phase-contrast microscopy was developed. Here, the basic approach utilizes the fact that bacterial endospores are highly reflecting round structures compared to the rod-shaped vegetative cells of Bacillus spp. The algorithm was integrated into a pre-existing microscopy software to automate the spore count at-line. For this detection method, a counting chamber is used and the algorithm processes each small square defined by the edges and lines of the chamber. Per image, the algorithm needs 8 s to detect and calculate the spore count. For the application of the counting model in the laboratory routine, a comparison between the CFU, manual cell count by counting chamber and ammonium iron(II) sulfate assay were conducted for three different Bacillus species. The average detection percentage has been between 85-89%. The developed counting model enables accelerated endospore counting based on one of the most reliable methods for cell counting. Therefore, this method can be established quickly and effectively into the laboratory routine. In the laboratory routine, only a counting chamber, phase-contrast microscope and the developed software are necessary to apply this method. In addition, this method can be used to monitor and adapt an ongoing bioprocess as an at-line measurement. Furthermore, workload and expenditure of time for plating, counting or evaluation of results are minimized. Only the set up of the counting chamber and possible dilution are necessary for pre-processing. The application is however limited by a false-positive spore count and can be further optimized. Motile vegetative bacteria can convey a spore-like image as a highly reflective structure in images due to its position in the counting chamber if vertical to line of sight. These false-positive endospores could be eliminated by generating multiple images with a certain period of time between recordings. In this case, the motile vegetative cells should not be detected over multiple timed images. Further research could be conducted in the processing of the images resulting in a total cell count (including vegetative cells). Moreover, this model can result in an automated spore and vegetative cell count and could be included atline or real-time in a bioprocess. Further development of the algorithm could also lead to a deep-learning model feeding an AI as described by Gao et al. for fungal spore detection [36].
The application of the two presented methods on environmental samples could be limited. For example, samples containing high concentrations of Calcium can potentially interfere with the colorimetric detection of DPA. In environmental samples, the developed counting model can also provide conclusive results due to the unique size and depiction of endospores in phase-contrast microscopy. Problematic for the detection of endospores in environmental samples by the counting model could be other sample components with a high reflection and same size.
In this work, an ammonium iron(II) sulfate assay was successfully modified for the facilitated detection of bacterial endospores of Bacillus spp., which shortens the workload and preparation time compared to a CFU determination. Moreover, an automated counting model for the microscopical detection of endospores using phasecontrast microscopy was developed. The application of this counting model results in a time-saving of multiple hours up to days compared to the standardized CFU determination and improves the laboratory routine time-and error wise. A combination of these two methods can facilitate the endospore detection in biological samples. Possible applications can be the monitoring of spore production, e.g. in probiotics, bioprocess control or contamination monitoring.

A C K N O W L E D G M E N T
The authors would like to thank the Open Access fund of Leibniz University Hannover for the funding of the publication of this article. Open Acces funding enabled and organized by Projekt DEAL.

C O N F L I C T O F I N T E R E S T
The authors declare no conflict of interest.

D ATA AVA I L I B I L I T Y S TAT E M E N T
The data that support the findings of this study are available from the corresponding author upon request.

D E D I C AT I O N
This article is dedicated to Prof. Dr. Thomas Scheper, Professor for Technical Chemistry and outstanding scientist with manifold research interests, who has carried out substantial biotechnological research with his exceptional expertise. With his entry into his well-deserved retirement, the scientific community will lack from now on one of the last representatives being able to cover the whole multifacetted discipline of biotechnology.

N O M E N C L AT U R E σ
[-] Standard deviation of the Gaussian distribution Angle of the Hess normal form