**1. Introduction**

Smartphone-based analysis has recently emerged as a useful tool, and it has been found to be promising in several fields including point-of-care analyses [1], chemical and biological sensing [2], microscopy and healthcare diagnostics [3], water quality sensing for environment [4–6], leaf color analysis for agriculture [7], pH [8, 9] and glucose [10] sensing, fluorescent imaging [11], imaging cytometry [12], electrochemical sensing [13], and immunoassays [14].

With recent advances on camera and sensor technologies, current smartphones are equipped with a low-power high-performance processor with up to 2.5 GHz operating frequencies; built-in high-resolution digital camera, generally above 5 Mpixels and up to 40 Mpixels; and built-in single or dual LEDs, which allow capturing an image

even in low-light conditions [15]. Moreover, they are provided with advanced onboard sensors such as moisture sensors, proximity sensors, electromagnetic compasses, accelerometers, and gyroscopes [16]. These sensors generally provide fast response, being portable and of low cost, and the ability to be used in the field without extensive training [17]. Therefore, smartphones have become a tool as powerful as low-cost computers, which lead them to be valuable instruments in the analysis.

Over the last decade, smartphones have been increasingly used in a variety of scientific fields as spectrometers [18–22] and colorimeters [23–25]. Smartphone spectrometers use the wavelength components, which give spectral information, of the collimated light from the optical source which is dispersed after interaction with samples [18]. The color spectrum image is transformed into various color spaces for the extraction of quantitative data. The wavelength of the spectrum generally changes between 400 and 700 nm because of the optical filters set in front of the camera in the manufacturing process. Spectral information has been used in many applications including water monitoring [6], gas detection [26], and food quality control [27]. Smartphone colorimeters are commonly used instruments that quantify the concentration of the samples based on color changes due to concentration (like peroxide amount [28]) or time (methylene blue degradation [6]). In the colorimetric analysis, features of the referenced images need to be extracted for training the system, mostly created with machine learning or neural networks, which perform the quantitative analysis for the test images. Smartphone colorimeters have applications in both solid samples like paper-based test and liquid samples like colored solutions [29]. Both smartphone spectrometers and colorimeters are powerful tools for rapid qualitative and quantitative analyses due to the fact that they can be used in conditions where sophisticated tools or time-consuming steps cannot be used. They are rapid and lowcost tools that require less sample consumption and provide portability to perform the analysis in remote locations or locations with poor infrastructure [17].

While smartphones offer an attractive alternative to sophisticated tools for imaging and analysis in the field, there are some concerns about their suitability for quantitative analysis [1]. First, unlike scientific cameras, smartphone cameras have mostly limited control of camera parameters like exposure time, shutter speed, ISO, and color balance, and no access to raw image data which has a linear relationship with scene radiation. In addition, image processing algorithms, such as demosaicing, noise reduction, edge sharpening, white balance, and image compression, are applied automatically and vary significantly across smartphones. These methods corrupt the linearity of the pixel intensity values which causes loss of information that can be used in quantitative analysis. So, it is difficult to set and maintain imaging parameters to get accurate and repeatable information for analysis [30]. Second, ambient light conditions are hard to control during imaging in uncontrolled environments. Last, small color changes cannot be detected in an analysis as the red, green, and blue (RGB) intensity values may not be sufficient. These aforementioned concerns make smartphones questionable for quantitative analysis. Early studies in smartphone-based colorimetric analysis for medical and scientific applications pointed out these concerns and concluded that smartphones are incapable of pathology [31] or limited due to their image quality [32].

However, subsequent researchers have proposed a smartphone camera-based microscope which captures qualitatively relevant features of malaria and tuberculosis [33]. These counter conclusions and also advancements in camera and sensors together with the increasing capability in computer processing prove that smartphones are more portable, cost-efficient, and user-friendly platforms which make them alternatives to sophisticated and high-cost devices in quantitative analysis.

For instance, it was shown that a smartphone by itself is capable of quantifying colorimetric test strips without any external attachments [1, 34]. In [35], water

**67**

*From Sophisticated Analysis to Colorimetric Determination: Smartphone Spectrometers…*

as a light source and a compact disk for the reflection grating.

reference image which was captured and processed initially.

[49], microscopy [50], and cytometry [51].

monitoring was implemented with a simple holding attachment. With the help of 3D printing, housing and optical components were integrated into a colorimetric plate reader for enzyme-linked immunosorbent assay (ELISA) [36]. A 3D printed custom cradle including various optical components and an external broadband source, was demonstrated in [37] for biomarker absorption analysis. To detect miRNA sequences in a liquid-based assay, a smartphone-based fluorimeter system was designed using an external laser as the source [21]. Due to precise light confinement and flexible nature, optical fibers were integrated to smartphone spectrometer and applied for food quality monitoring [18]. To have more portable and cheap spectrometers, new designs were proposed without external electrical and optical components. A fiber optical bench was assembled on top of the smartphone without external LEDs to design a surface plasmon resonance-based refractive index sensor [38]. A spectrometer system was reported in [10] to detect glucose and troponin-I using built-in flash

In the colorimetric analysis, color information could be obtained with paper-based sensors to quantify the color variation in different color spaces such as RGB, HSV, and L\*a\*b\* [24, 39–41]. In [25], alcohol concentration in saliva was detected using paperbased test converting images from RGB to HSV color space. This was the conventional approach which needs only a smartphone camera to capture and process an image. Besides the conventional approach, non-conventional approaches were applied on liquid samples in vials for detection of chlorine in water [42], and ripeness estimation of fruits [7]. Here, quantification was calculated using analytical formulas extracted from color space parameters. However, it is prone to deviation due to the disadvantages of JPEG images such as low bit depth and heavy post-processing (white balance, contrast, and brightness adjustment) [43, 44]. On the other hand, it was shown in [28, 41] that JPEG images could be used in the colorimetric analysis when advanced algorithms like machine learning were used to process the images. Unfortunately, advanced algorithms need more computational power as they need much larger datasets for training and testing the images. To address this issue, it was reported to use local database referenced with a single image for the quantification of the concentration level of solutions [45]. The proposed design was applied on nitrite, phosphate, chromium, and phenol solutions to quantify the concentration value using a single

In literature, there are many lab-on-a-chip designs proposed for various applications [17, 46]. Bisphenol-A (BPA) detection in distilled and commercial water samples was demonstrated in [29] where a plastic fiber-based smartphone spectrometer with a custom-designed immersion probe and a cradle were used. The smartphone spectrometer was converted to a reflection probe spectrometer working within the visible spectrum. Explosive types were detected in [17] with the paper-based test using hierarchical clustering analysis and principal component analysis (PCA) regarding the color discrimination of the explosives. A closed chamber was used to eliminate ambient light conditions during imaging. Linear correlation and PCA methods were employed, respectively, for univariate and multivariate analyses [46]. It was reported that univariate analysis did not give statistically significant results due to ambient light conditions as imaging was not performed in a controlled environment. However, multivariate analysis gave promising results running PCA methods on eight different color spaces and clustering methods including red, green, blue, hue, saturation, value, lightness, and intensity parameters. A smartphone-based colorimetric reader for ELISA was proposed in [47] where imaging was performed in a controlled environment illuminated from the bottom. Ozcan and his research group [12, 14, 48–51] had many designs for specific applications such as food allergen testing [48], urine [14] and blood [12] analysis, immunoassays

*DOI: http://dx.doi.org/10.5772/intechopen.82227*

*From Sophisticated Analysis to Colorimetric Determination: Smartphone Spectrometers… DOI: http://dx.doi.org/10.5772/intechopen.82227*

monitoring was implemented with a simple holding attachment. With the help of 3D printing, housing and optical components were integrated into a colorimetric plate reader for enzyme-linked immunosorbent assay (ELISA) [36]. A 3D printed custom cradle including various optical components and an external broadband source, was demonstrated in [37] for biomarker absorption analysis. To detect miRNA sequences in a liquid-based assay, a smartphone-based fluorimeter system was designed using an external laser as the source [21]. Due to precise light confinement and flexible nature, optical fibers were integrated to smartphone spectrometer and applied for food quality monitoring [18]. To have more portable and cheap spectrometers, new designs were proposed without external electrical and optical components. A fiber optical bench was assembled on top of the smartphone without external LEDs to design a surface plasmon resonance-based refractive index sensor [38]. A spectrometer system was reported in [10] to detect glucose and troponin-I using built-in flash as a light source and a compact disk for the reflection grating.

In the colorimetric analysis, color information could be obtained with paper-based sensors to quantify the color variation in different color spaces such as RGB, HSV, and L\*a\*b\* [24, 39–41]. In [25], alcohol concentration in saliva was detected using paperbased test converting images from RGB to HSV color space. This was the conventional approach which needs only a smartphone camera to capture and process an image. Besides the conventional approach, non-conventional approaches were applied on liquid samples in vials for detection of chlorine in water [42], and ripeness estimation of fruits [7]. Here, quantification was calculated using analytical formulas extracted from color space parameters. However, it is prone to deviation due to the disadvantages of JPEG images such as low bit depth and heavy post-processing (white balance, contrast, and brightness adjustment) [43, 44]. On the other hand, it was shown in [28, 41] that JPEG images could be used in the colorimetric analysis when advanced algorithms like machine learning were used to process the images. Unfortunately, advanced algorithms need more computational power as they need much larger datasets for training and testing the images. To address this issue, it was reported to use local database referenced with a single image for the quantification of the concentration level of solutions [45]. The proposed design was applied on nitrite, phosphate, chromium, and phenol solutions to quantify the concentration value using a single reference image which was captured and processed initially.

In literature, there are many lab-on-a-chip designs proposed for various applications [17, 46]. Bisphenol-A (BPA) detection in distilled and commercial water samples was demonstrated in [29] where a plastic fiber-based smartphone spectrometer with a custom-designed immersion probe and a cradle were used. The smartphone spectrometer was converted to a reflection probe spectrometer working within the visible spectrum. Explosive types were detected in [17] with the paper-based test using hierarchical clustering analysis and principal component analysis (PCA) regarding the color discrimination of the explosives. A closed chamber was used to eliminate ambient light conditions during imaging. Linear correlation and PCA methods were employed, respectively, for univariate and multivariate analyses [46]. It was reported that univariate analysis did not give statistically significant results due to ambient light conditions as imaging was not performed in a controlled environment. However, multivariate analysis gave promising results running PCA methods on eight different color spaces and clustering methods including red, green, blue, hue, saturation, value, lightness, and intensity parameters. A smartphone-based colorimetric reader for ELISA was proposed in [47] where imaging was performed in a controlled environment illuminated from the bottom. Ozcan and his research group [12, 14, 48–51] had many designs for specific applications such as food allergen testing [48], urine [14] and blood [12] analysis, immunoassays [49], microscopy [50], and cytometry [51].

*Color Detection*

even in low-light conditions [15]. Moreover, they are provided with advanced onboard sensors such as moisture sensors, proximity sensors, electromagnetic compasses, accelerometers, and gyroscopes [16]. These sensors generally provide fast response, being portable and of low cost, and the ability to be used in the field without extensive training [17]. Therefore, smartphones have become a tool as powerful as low-cost

Over the last decade, smartphones have been increasingly used in a variety of scientific fields as spectrometers [18–22] and colorimeters [23–25]. Smartphone spectrometers use the wavelength components, which give spectral information, of the collimated light from the optical source which is dispersed after interaction with samples [18]. The color spectrum image is transformed into various color spaces for the extraction of quantitative data. The wavelength of the spectrum generally changes between 400 and 700 nm because of the optical filters set in front of the camera in the manufacturing process. Spectral information has been used in many applications including water monitoring [6], gas detection [26], and food quality control [27]. Smartphone colorimeters are commonly used instruments that quantify the concentration of the samples based on color changes due to concentration (like peroxide amount [28]) or time (methylene blue degradation [6]). In the colorimetric analysis, features of the referenced images need to be extracted for training the system, mostly created with machine learning or neural networks, which perform the quantitative analysis for the test images. Smartphone colorimeters have applications in both solid samples like paper-based test and liquid samples like colored solutions [29]. Both smartphone spectrometers and colorimeters are powerful tools for rapid qualitative and quantitative analyses due to the fact that they can be used in conditions where sophisticated tools or time-consuming steps cannot be used. They are rapid and lowcost tools that require less sample consumption and provide portability to perform the

computers, which lead them to be valuable instruments in the analysis.

analysis in remote locations or locations with poor infrastructure [17].

are incapable of pathology [31] or limited due to their image quality [32].

However, subsequent researchers have proposed a smartphone camera-based microscope which captures qualitatively relevant features of malaria and tuberculosis [33]. These counter conclusions and also advancements in camera and sensors together with the increasing capability in computer processing prove that smartphones are more portable, cost-efficient, and user-friendly platforms which make them alternatives to sophisticated and high-cost devices in quantitative analysis. For instance, it was shown that a smartphone by itself is capable of quantifying colorimetric test strips without any external attachments [1, 34]. In [35], water

While smartphones offer an attractive alternative to sophisticated tools for imaging and analysis in the field, there are some concerns about their suitability for quantitative analysis [1]. First, unlike scientific cameras, smartphone cameras have mostly limited control of camera parameters like exposure time, shutter speed, ISO, and color balance, and no access to raw image data which has a linear relationship with scene radiation. In addition, image processing algorithms, such as demosaicing, noise reduction, edge sharpening, white balance, and image compression, are applied automatically and vary significantly across smartphones. These methods corrupt the linearity of the pixel intensity values which causes loss of information that can be used in quantitative analysis. So, it is difficult to set and maintain imaging parameters to get accurate and repeatable information for analysis [30]. Second, ambient light conditions are hard to control during imaging in uncontrolled environments. Last, small color changes cannot be detected in an analysis as the red, green, and blue (RGB) intensity values may not be sufficient. These aforementioned concerns make smartphones questionable for quantitative analysis. Early studies in smartphone-based colorimetric analysis for medical and scientific applications pointed out these concerns and concluded that smartphones

**66**
