Microalgal biomass quantification from the non-invasive technique of image processing through red–green–blue (RGB) analysis

Continuous monitoring of biomass concentration in microalgae cultures is essential and one of the most important parameters to measure in this field. This study aims at digital image processing in RGB and greyscale models, being a simple and low-cost method for cell estimation. Images obtained from different photobioreactors with wastewater and at different conditions for the cultivation of Chlorella vulgaris were analyzed. The results suggested that this technique is very effective under controlled lighting conditions, in contrast to photobioreactors placed outdoors and of different design, presenting a lower linearity. The accuracy of the method could be improved with a high-quality charge-coupled device (CCD) camera. The development of efficient methods to assess biomass concentration is an important and necessary step towards large-scale microalgae cultivation. The colour analysis technique has a great potential to meet the needs of monitoring cultures in a cost-effective and automated way using simple and cheap instruments.


Introduction
Microalgae are considered an important raw material in a number of promising biotechnological applications, as well as offering advantages in reducing the environmental impact of industrial pollution. Consequently, a large majority of studies on microalgae have focused on investigating primarily processes such as harvesting, strain selection, and obtaining and converting the final products (biodiesel) (Havlik et al., 2013). However, monitoring the growth of microalgae in cultures is another key parameter for algal biomass production, especially to improve the industrial scale. Good crop monitoring could improve production rates by allowing timely decisions regarding growing medium, e.g. decisions on fertilization, harvesting, light intensity and temperature, thus avoiding economic losses and optimizing the process (Sandnes et al., 2006). Moreover, these changes in microalgae culture, unlike in conventional agriculture which have a time window of days, must be taken in a few hours if a total loss of the crop is to be avoided (Gitelson et al., 2000). For this reason, an ideal biomass concentration measurement device would be based on a non-invasive methodology, in real time, with stable and low-cost sensors; it would also be fast, accurate and easy to apply (Lazcano-Hernández et al., 2019).
At present, the conventional methods most commonly used to estimate biomass concentration are varied, with advantages and disadvantages depending on the technique. Based on a classification of offline and online measurements, offline measurements are slow and invasive of the culture medium, having to extract a sample and analyze it in the laboratory, which complicates monitoring and delays measurement frequencies (Lazcano-Hernández et al., 2019). Among the best known offline methods is dry weight determination, which is problematic for small volume systems containing few cells (Chioccioli et al., 2014), and microscopic cell counting, which is time consuming and depends on the operator performing the count (Uyar, 2013). On the other hand, within online biomass estimation or with the possibility of becoming online, we mainly find the measurement of optical density (OD) by a spectrophotometer, in situ microscopy , flow cytometry (FC) (Hyka et al., 2013), fluorometry (2D) and infrared spectroscopy (NIR). Among all of them, the OD is the most widely used to measure various biological variables such as cell mass concentration, absorbance, turbidity or fluorescence of the culture suspension (Jia et al., 2015). However, OD measurement can introduce inaccuracies in the estimation of biomass concentration when cells change their morphology and composition, that is, their optical properties (Griffiths et al., 2011;Chioccioli et al., 2014). For this reason, experts recommend OD in cases where the microalgal biomass to be measured is at low cell concentrations (Lu et al., 2017), limiting its use outside the laboratory scale. In general terms, the problems related to the other online measurement techniques mentioned above are the time involved in the analysis; the cost, due to the amount of material needed or its maintenance (Benavides et al., 2015); and the fact that they can be invasive and destructive of the culture medium.
That said, the focus of this study is to evaluate a simple and low-cost method for cell estimation using digital image analysis. For this purpose, experiments were carried out with cultures of the microalga Chlorella vulgaris in an artificial wastewater medium. The application of the colour analysis was carried out in three photobioreactors (PBR) at different scales and external conditions (controlled and uncontrolled). The transparency of the photobioreactors allows visual monitoring of the bioreactor contents from the outside, making digital imaging techniques very useful in these systems for bioprocess analysis and evaluation. The image analysis technique used was through colour, the red-green-blue (RGB) and grey model that allows finding a direct relationship with algal concentration, requiring only image analysis software and a digital camera (Sarrafzadeh et al., 2015a;2015b). The colour of microalgae changes significantly with increasing concentration or thickness, which is easily detectable with the naked eye; this quality allows the study of cell concentration, size distribution (thickness) and cell morphology Asgharnejad et al., 2021). In addition, recent studies have shown that RGB analysis, together with thickness and colour variation, can determine three-dimensional topography with satisfactory accuracy from digital images of biofilms. This would allow, in a very novel way, to calculate quantitative parameters, such as biomass yield and biomass thickness, at each specific point of the biofilm (Asgharnejad et al., 2021). Other applications found, such as those shown by Murphy et al. (2014), give more value to the technique by colour analysis. In this work, the invasion of Chlorella sp. cultures by Anabaena variabilis was successfully detected in their experiments, taking advantage of the difference in spectral signatures between the two strains.
The limitations produced in open ponds prevent a transition to a large-scale uncontrolled culture system; however, it is not excluded that this analysis technique could evolve and be adapted to new culture systems in the future (Murphy et al., 2014). This makes it interesting to experiment with the colour analysis technique in both controlled and uncontrolled photobioreactors. In short, RGB image analysis of microalgae cultures can result to be one of the easiest and most economical techniques to apply for monitoring the most decisive parameters, especially in large-scale production.

Microalgal strain
Chlorella vulgaris was from the Algae Collection of the University of Vigo at Marine Science Station (ECIMAT) (Vigo, Spain). The alga was cultured in a nutrient medium with artificial illumination of 14-/10-h light/dark periods and temperature of 21 ± 1 °C. The composition of the nutrient medium used and its concentrations are shown in Table 1. This medium was developed in-house by the strain supplier of the Toralla Marine Science Station (ENCIMAT).

Experiment conditions
The experiments were performed on different scales in three types of photobioreactor (PBR). The PBR 1 was a laboratory 33 cm (diameter) × 69 cm (height) cylindrical reactor with working volume of 5.5 L. In this type of photobioreactor, light/dark periods of 14/10 h were applied under light intensity of 50 µmol photons m −2 s −1 and temperature of 25 ± 3 °C. The second photobioreactor type, PBR 2, was located outdoors under ambient conditions. The dimensions of this reactor were 79 cm (diameter) × 210 cm (height) with a capacity of 80 L. The average temperature recorded during the culture period was 25 ± 9 °C. The PBR 3 were plastic bag system located outdoors. The working volume of this rectangular reactor was 400 L. All reactors were continuously aerated to facilitate the homogenization of culture and equipped with pH-meter. To provide this adequate aeration and agitation of the cultures, the photobioreactors contained cylinders 1-2 cm long and 0.5 cm in diameter, as well as to remove dirt from the walls. This is an important step when cultures are grown in large volumes, to ensure that light and air reach the cells homogeneously (Priyadarshani et al., 2014).

Biomass concentration
The biomass concentration was determined by dry cell weight measurement (DCW). For this, 25 mL of algal suspension was filtered through a previously dried (105 °C, 1 h) and weighed glassfiber filter (Millipore nominal pore size 0.45 µm) using a precision balance (Sartorius CPA64). The samples were washed with 50 mL of distilled water for elimination of salts. Then, they were dried at 105 °C for 24-48 h to constant weight. Samples were cooled in a desiccator and then weighed.

Image processing and analysis
To carry out the analysis by image processing, it was necessary to capture digital images of the three types of photobioreactors during the days of cultivation. For this, the digital images were taken via a smartphone camera (Sony IMX214, sensor size 1/3″, CMOS sensor, aperture f/1.8) placed in the same position and from continuous measurements (video) for higher accuracy. The size of the captured images was 4,160 × 3,120 pixels. Then, they were sent to the computer to be processed in grey tones and RGB values using MATLAB. A schematic of the experimental setup is shown in Fig. 1. The camera was fixed on a support to keep it stable, taking the images from the lateral side. A photo taken from above would make it impossible for the light beam to pass through. For image processing, the program captured and the RGB values of a region of interest (ROI) consisting of 120 × 60 pixels were filtered. From the RGB colour, the greyscale was calculated using MATLAB's rgb2gray function, which converts RGB colour images into greyscale values, generating a weighted sum of the red, green and blue colour components (R, G and B). The algorithm used to compress the greyscale images is shown in Eq. 1 (Taha et al., 2014): Thus, each pixel in the image had a grey value between 0 (black) and 255 (white) (Kumar and Verma, 2010). The mode, median and mean were calculated for the greyscale and related to algal biomass. The main reason why greyscale representations are often used to extract descriptors instead of operating directly on colour images is that greyscale simplifies the algorithm and reduces the computational requirements (Winata et al., 2019). Firstly, it is observed that the three parameters measured (median, mean and mode) in the 5-L photobioreactor (Fig. 2) have very similar values for each image without any significant difference between them. Furthermore, it can be observed that the decomposition of the images into reds and greens is more correlated with the data collected in the DCW count. The median, mean and mode values of these image decompositions progressively decrease over time as the density of cells in the PBR increases. The decreasing value of these parameters means that the amount of this colour in the microalgae is increasing. The reduction of the red and green colours was faster than that of blue, being the colour least indicative of algae growth and always remaining at very low values of colour intensity between 0 and 20. Based on the coefficients of determination of the trend lines, it was determined that the red and green data are really reliable since we have coefficients between 0.95 and 0.97 for the three studied parameters of the images.
In Fig. 3, like the previous case, it is confirmed that the parameters studied do not have significant differences. In contrast to the previous PBR, a reduction in the coefficient of determination can be seen in the red and green colours, with values between 0.53-0.66 and 0.67-0.81 respectively. If we focus on the blue decomposition, the relationship between biomass concentration and colour intensity increased. This could be directly related to the location of the PBR and the light conditions to which the algae were exposed.
Observing the decompositions, it can be stated that these are not as satisfactory for monitoring the growth of the microalgae as they were under controlled conditions, because there is a greater dispersion between the values obtained in the image processing. The most similar decomposition is the green decomposition, with the correlation coefficient of the trend line quite high in the mean and median parameters. It can be concluded that the decomposition of the images in the RGB model for PBR 2 was less accurate in determining the growth process of C. vulgaris, but acceptable considering the crop situation.
The representation shown in Fig. 4 shows that, as in the other PBRs, the median, mean and mode parameters produce a very small variation in the values obtained from the images in their processing. Visually, it can be seen that the trend line of the red, green and blue colour decompositions of the growth process images follows a downward trend where the values are dispersed. If we focus on the blue colour decomposition, we can see that the values are not as dispersed as before with coefficients between 0.75 and 0.86. Again, uncontrolled outdoor conditions could influence this result.
Image analysis using the greyscale was also performed (Sarrafzadeh et al., 2015a;2015b). Greyscale is a conversion commonly used to change the RGB space to a single parameter space (Asgharnejad and Sarrafzadeh, 2020); in this way, another approach to the evolution of algal growth was also studied. For this, greyscale images were converted from RGB images through rgb2gray function. Figure 5 relates the brightness/lightness to the cell density through values between 0 (black) and 255 (white).
Focusing on the greyscale representation in Fig. 5, it can be seen that, as in the red, green and blue decomposition of the RGB model, as the number of days of cultivation increases, the amount of black in the image increases. This is normal, because as the days pass, the cell density increases and with it the degree of colour saturation. In Fig. 1 Imaging acquisition system for the three photobioreactors PBR 1, there is a strong relationship between the DCW count and the darkening of the shade of grey in the images. The coefficient of determination ranges between 0.96 and 0.97; therefore, it is observed that the data extracted from digital image processing is quite accurate for this PBR. The trend line of the grey images in PBR 2 has a coefficient of determination of around 0.74, so it is observed that the data extracted from digital image processing is quite accurate. As with the RGB model, it seems that the results obtained would improve considerably under controlled conditions. In short, it can be affirmed that there is a certain relationship between the increase in colour saturation and the increase in cell density of the culture in its growth process for this PBR.
Finally, for the greyscale transformation of the RGB images obtained from the growth process in PBR 3, it was confirmed that there is no appreciable relationship between this process and the decomposition of the images in any of the parameters analyzed. Furthermore, the values obtained are very imprecise, as can be seen in the correlation

Discussion
The present study demonstrates that the analysis of algal biomass from colour analysis has a great potential to cover algal crop monitoring requirements in an inexpensive and automated way. Alternative methods are destructive, slow and more costly as they require complex equipment or the use of a larger number of materials, as well as technical staff to constantly supervise the installations. The image processing technology in the microalgae cultivation system allows us, in our case with a simple smartphone and MATLAB software, to estimate the biomass concentration in situ from digital photographs using the RGB colour model (Wood et al., 2020). On the other hand, studies on RGB colour analysis are limited. More studies are needed that, besides using this type of analysis, apply this methodology to different culture media, such as those presented in this article. In order to obtain more information and to be able to progress in transition from the laboratory scale to a large scale, more sustainable microalgae biofactories or open cultures, with the capacity to produce sufficient biomass (Kiran and Venkata Mohan, 2021). Future studies should therefore focus on assessing the performance of this technique in different large-scale cultures and on time-lapse imaging for productivity monitoring (Murphy et al., 2013).
It should be noted that this study determined that the decomposition of the RGB model is useful to confirm that the analysis of the growth process of the C. vulgaris species is suitable. Therefore, in order to apply this method to other strains of microalgae, it would be necessary to carry out the respective experiments in order to confirm that it is a good method for estimating the algal population of interest. The RGB models will be different for each microalgae species according to the difference in pigment content, making them different to the naked eye. For example Chlorella is  (Murphy et al., 2014). Furthermore, we can also find species that in stressful situations may experience colour changes. Cultures of the green microalga Chlorococcum can change colour from green to orange under stress conditions due to the accumulation of secondary carotenoids in their cells (Ambati et al., 2019). There may also be cases where the colour remains stable throughout growth, preventing accurate and correct measurement with this method.
Regarding our results, the mean, median and mode values of these image decompositions progressively decrease as time passes and cell density increases in the three PBRs. The decreasing value of the red and green component means that over time, as the cell density in the PBR increases, the amount of these colours in the microalgae increases and Fig. 5 Mean, median and mode of grey values versus DCW (dry cell weight) in a 5-L (a), 80-L (b) and 400-L (c) photobioreactor darkens the microalgae. The same trend was detected by other studies, such as the analysis of Winata et al. (2021) where the values of red and green correlate linearly with the concentration of microalgae, while blue was found to be the most unstable (Winata et al., 2021). On the other hand, Sarrafzadeh et al. (2015a) through a controlled culture method (BG-11 medium) incubated three types of microalgae: Chlorella sp., Botryococcus sp. and Ettlia sp. The conditions were at a temperature of 24 ± 1 °C and with an average illumination of 100 μmol photons m −2 s −1 on the wall surface of 3-L culture flasks. The results obtained were a similar pattern in the relationship between DCW and RGB values for the three species, which revealed the potential of this technique for biomass quantification of different microalgae (Sarrafzadeh et al., 2015a;2015b). However, and in contrast to our results, they suggest that RGB analysis based simply on blue colour was more accurate than red and green, showing a higher correlation.
This trend of progressive decrease with increasing biomass concentrations is interrupted in PBR 2 exposed to the outside. The increase of blue colour in the RGB model with increasing biomass may be due to exposure to solar radiation. C. vulgaris has one of the highest chlorophyll contents found in nature (Seyfabadi et al., 2011). Light intensity is one of the main factors directly influencing chlorophyll biosynthesis, showing that high contents of the pigment are observed under conditions of limited illumination. In contrast, cell growth is favourable at high light intensities but reduces the chlorophyll content (photoacclimatisation) (Danesi et al., 2004). That said, knowing that higher intensities increase growth, prolonged exposure to excess light can lead to a decrease in photosynthetic activity (photoinhibition), followed by chlorosis -bleaching of chlorophylls (Lingvay et al., 2020). This decrease in photosynthetic activity has already been experienced in other work based on colour analysis, where the decrease in photosynthetic yield coincided with an increase in the red and blue values of the culture image (Murphy et al., 2014). The same work used red and blue values as a possible indicator of crop health, which would suggest that changes in colour trend may be due to the invasion of a monoculture of one organism by another organism, provided that the two organisms have different red-green-to-blue ratios. These hypotheses could explain this change in trend, since the outdoor conditions show more variation in irradiance and day length. This also explains why PBRs 2 and 3 show a greater dispersion of the points.
Other important factors in outdoor photobioreactors are the design and the material. In an outdoor photobioreactor with specific characteristics, the light will not illuminate the surface symmetrically and homogeneously, conditioning where the photo will be taken from. For example, Jung and Lee (2006) used a vertical tubular photobioreactor for their work, where they found that depending on the diameter of the tube and where the light source was applied the correlation could vary. For this reason, it is interesting to study the lighting conditions in more detail to minimize errors. Thus, photobioreactors 2 and 3 could be affected by both their design and differences in outdoor illumination (Murphy et al., 2013).
Considering that the composition and texture of photobioreactor 3 (plastic bag) is different from photobioreactors 1 and 2 (methacrylate), we cannot confirm that it affected directly in the colour analysis, as well as the external conditions and design. Taking pictures with this bag system under controlled conditions would be desirable, although the results provided by Córdoba-Matson et al. (2010) seem to indicate that this is not as decisive a factor in the image analysis as the location of the culture. In contrast to this work, they used a plastic bag culture system under controlled conditions for the species Isochrysis galbana, providing better results with higher correlation coefficients between R-G-B values of 0.920, 0.986 and 0.996, respectively, thus giving a good model fit. The same was observed for the greyscale conversion results (Córdoba-Matson et al., 2010).
With this, it is determined that the photobioreactor under controlled conditions has a couple of advantages, the main one being that an intensified and controlled biomass production is obtained with very low environmental impact (water can be reused) (Pruvost, 2019). However, there are also disadvantages in terms of wasting solar energy for biomass production and lower costs for large-scale cultivation (Esbroeck, 2018).
The use of the different sensors for colour analysis is currently a topic of debate where no common agreement can be found. Depending on the application, CMOS (complementary metal-oxide semiconductor) cameras offer advantages over CCD (charge-coupled device) cameras and vice versa. CMOS imagers are chosen for high-volume and space-limited applications where image quality requirements are low. However, CCDs offer superior image quality and flexibility at the expense of system size (Litwiller, 2001). That said, CCD cameras are preferred for most scientific and medical applications requiring sensitivity or dynamic range, and are the most common in these types of studies (Ander, 2021). However, both types of image chip are equally reliable in most applications, especially nowadays when CMOS sensors with high resolutions and image quality are being developed specifically for scientific applications. CMOS and CCD image sensors do not have significantly different costs.

Conclusion
In this work, digital image processing using the RGB and greyscale models is proposed for the cell measurement of the microalga C. vulgaris in different culture media. Good adjustments between biomass concentration and parameters derived from the image processing (mean, median or mode) were recorded for RGB and greyscale models. Of the three different cultivation systems used, the highest level of accuracy was obtained for the photobioreactor at controlled conditions in the greyscale calibration curve in conjunction with the RGB model, obtaining an approximate R 2 = 0.97. Concluding that this technique is suitable for photobioreactors exposed to controlled lighting conditions. The accuracy of the method could be improved with a high-quality CCD camera and a good image isolation from outdoor lightning picture taking system.