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

how to reach a RAW image in smartphones. Although most semi-professional and professional cameras have access to reach the images in a RAW format, it is unconventional for smartphones. With recent developments, the latest smartphones offer access to images in the RAW format [55]. The RAW images could be found in three extensions such as ".NEF" (Nikon), "CR2" (Canon), and ".DNG." The most used format is ".DNG" as it has a common open format. Currently, no app is available to process the ".DNG" images in a smartphone yet. Therefore, free DCRAW software [18] can be used to convert ".DNG" image to tagged image file format (TIFF) for easier extraction of the R, G, and B values of the image.

RGB is the most commonly used color model in image processing. However, it can be converted to other models such as hue, saturation, and value (HSV); hue, saturation, and lightness (HSL); hue, saturation, and intensity (HSI); and lightness, green-red, and blue-yellow (L\*a\*b\*). Hue is defined with the color portion of the color model and described with a number from 0 to 360°. Saturation is defined with the amount of gray in the color, from 0 to 100%. Value, lightness, or intensity is the brightness or intensity of the color, from 0 to 100% where black is represented with 0 while 100 is the brightest.

After the image acquisition, numerous image processing methods can be employed to improve the image visualization so that better features can be extracted from the image. The feature extraction plays a critical role in some methods like PCA, convolutional neural network, and machine learning, which interpret multiple types of information contained in an image using these features [46].

The performance of these methods was investigated with RAW and JPEG image formats with different color spaces such as RGB, HSV, and L\*a\*b\*. RAW and JPEG image formats were studied in [6, 29] after converting images from RGB to HSV. Absorbance experiments were employed based on V components of HSV and it was reported that RAW format outperforms the JPEG formats in absorbance measurements. On the other hand, [41] showed that JPEG images gave a similar performance with RAM image if least-squares support-vector machine (LS-SVM) was employed in creating the learning model. Based on this conclusion, RGB, HSV, and L\*a\*b\* color spaces were investigated using JPEG formats for quantifying peroxide content based on machine learning classifiers [28]. JPEG images were also used in [45] where the images were converted from RGB to L\*a\*b\* color space. Instead of machine learning algorithms, color matching algorithms such as deltaE and color correlation methods were employed due to their simplicity. It was reported that deltaE showed superior performance with L\*a\*b color space for colorimetric water quality detection.
