Self-Referencing Method for Relative Color Intensity Analysis Using Mobile-Phone ()
1. Introduction
Colorimetric test have been widely used on several application such as industrial control [1] , immunoassays [2] , food industry [3] , water quality evaluation [4]. Color evaluations are mainly performed by exploring optical absorption or reflection spectroscopy techniques, which may require expensive devices, controlled illumination and the use of color calibrators. However, in a real world scenario there are several applications demanding color’s evaluation in an imperfect illumination environment, with no available calibrated reference color object. On that context, mobile-phones could be explored as an important tool for colorimetric analysis [5] [6]. Several mobile-phones applications (Apps) are available to perform a roughly color evaluation of objects, as Catch Color Free (developed by CeSnow), Color Grab (by Loomatix), LifeDropper (by Bitjutsu Software). However, the color analysis of an object using distinct cell-phones and Apps leads to disparate results [6]. The popularization of mobile-phones and the improvement of their components allowed the implementation of different colorimetric analysis techniques in several areas such as forensic science [7] , biotechnology [8] [9] , and life sciences [10]. Colorimeters base on mobile-phone can be classified as: 1) applications with hardware components and 2) standalone devices [11]. Colorimetric systems classified in this first category require external tailor-made apparatus for each device, as LED light sources, are powered by a battery to maintain constant illumination. These types of applications have as main advantage the control of ambient light, which may enable continuous monitoring of color changes of a particular sample. As an example, mobile-phone based colorimetric readers for enzyme-linked immunosorbent assays (ELISA) have recently been developed, requiring the use of mechanical platform and illumination set-up [12] [13]. Moreover, the feasibility of a colorimetric biosensor based on a smartphone spectrometer with an integrated grating was demonstrated [14]. The need of external apparatus may limit the use of the mobile system (first category). On the other hand, standalone devices have the advantage that they do not require external media such as housings, light sources or batteries. Moreover, they usually explore correction algorithm to minimize the variable light condition. Mobile colorimeters with a standalone application designed to process color information are an excellent low-cost alternative to expensive commercial color readers. Several applications of standalone colorimetric systems are described in the literature, such as: To quantify the concentrations of pH, glucose, and protein [15]; to evaluate the presence of albumin in urine [16]; to monitor chlorine concentration and pH in water [17] [18]; and to estimate the level of hemoglobin present in blood [19]. Usually, to establish a precise color analysis with standalone mobile-phone devices, calibration procedures are required. To overcome this limitation, the determination of the absolute color value of an object can be overlooked and a relative color value determined [8] [17] [18] [20]. However, in addition to the restrictions regarding the type of ambient lighting, different built-in image systems and acquisition configuration of cell-phones may limit the color analysis accuracy. In this work we establish a new approach for relative color intensity evaluation based on mobile-phone imaging. An algorithm to determine relative color values of an image is proposed. The standalone spectroscopic method has been evaluated under the use of four distinct cell-phones and different illumination conditions. The capability to distinguish different color shades exploring the self-referenced relative color intensity technique is also appraised. Moreover, the potential use of the method is demonstrated evaluating chemical-adsorption process of Cysteamine molecules on gold nanoparticle surfaces.
2. Materials and Methods
2.1. Relative Color
Images, obtained by cell-phones, usually provide color information on RGB space. Even under same illumination, different image capture devices can lead to distinct color output information (RGB values) [6]. Therefore, an accurate color analysis requires a calibration procedure, that is performed exploring a reference object with know RGB values [21]. Moreover, even the evaluation of color differences of two regions in a single image can be device dependent. In many cases, the relation between the input and output signal strength of a given device is characterized by a non-linear equation. The output color information of an image capture devices maybe described as
, (1)
where C is the real object color,
is the colorimage output and γ is known as the correction gamma factor [22] [23]. Therefore, if two or more cell phones have approximately the same value of γ, the color perception at the output of these devices will be similar. However, if γ values are different, the output values of the measured color will be distinct. In a first approximation, γ also carries the information of the illumination source. Moreover, as color is described on a RGB space, Equation (1) can be express as
(2)
where (R, G, B) and (R', G', B') are respectively the real object color and the cell-phone color output. On the color evaluation of two different regions in a single image, we define the relative color parameters (r, g, b) as:
(3)
(4)
(5)
where the index i and r denotes the two different regions of an image, the region of interest and the reference region, respectively. Notices that the relative colors are independent of γ, and therefore they are only dependent of the real colors of the object.
2.2. Spectroscopic Measurements
Two homemade color patterns, shown in Figure 1, were used in this study. The pattern in Figure 1(a) comprised four areas with four different colors (red, green, blue and white). The pattern in Figure 1(b) presents 15 distinct areas
![]()
Figure 1. Patterns (a) with different colors and (b) with different shades of red.
with different shades of red color. All color patterns areas were determined using a CR-400 colorimeter from Konica Minolta. However, the CR-400 colorimeterprovides color information in the XYZ-CIE space and is required to convert these values to the RGB color space. For this, a code in Mathlab was used considering the CIE standard illuminant D65. Images of the patterns were obtained using 4 different cell-phones (CP1: LG Optmus L3; CP2: iPhone 4s; CP3: Samsung Galaxy J3; CP4: Microsoft Lumia 640). The CP1 device has Android operating system, 3.1 MP camera and 2048 × 1533 pixels image resolution. CP2 has iOS 9 operating system, 8 MP camera and 3264 × 2448 pixels image resolution. The CP3 phone features Android operating system, 8MP camera and 3264 × 2448 pixels image resolution. Finally, CP4 runs Windows Phone 8.1 platform, 8 MP camera and 1280 × 721 pixels image resolution. Despite these technical differences, the color images recorded by these devices are True Color type, meaning that each pixel of the RGB image has 24 bits color information. Therefore each of the three-color components (red, green, blue) has a value ranging from 0 to 255 (8 bits).
Pictures were taken without flash and at approximately 30 cm away from the target. Automatic focus was also explored on the image capture procedure. An Android application (App), developed on the Android Studio platform, was developed to evaluate the relative color intensity (Equation (3), (4) and (5)) of two different regions of the same picture. Images captured using the App were saved in PNG format. The developed smartphone application features an intuitive interface, ability to zoom the images and allows the evaluation of images taken by other devices (stored in the mobile-phone).
The color evaluation procedure was also explored on the analysis of molecule adsorption on metallic nanoparticles. A 0.01 g of Cysteamine, from Sigma-Aldrich, was added to 1.3 ml of a gold colloidal solution, with 50 nm nanospheres, from Sigma-Aldrich. Photographs of the colloid were taken before and after the addition of Cysteamine. Absorption spectra were also obtained by using a spectrometer (USB2000 Ocean Optics).
3. Results and Discursion
By imaging the color pattern on Figure 1(a) with all four different mobile-phones, significant difference on the output color image were identified. The images were taken under the same illumination condition (under fluorescent light, with 200 Lux) and the color evaluations were performed on an 80 × 80 pixels area. In addition, all color areas on Figure 1(a) were also examined using the colorimeter. Table 1 shows the RGB color vales for three-color areas of this color pattern. The mobile-phones RGB mean values and the standard deviations were obtained by analyzing 16 images (4 pictures from 4 cell-phones). Huge differences were observed on the RGB colors values obtained by the colorimeter and by the mobile-phones. Those discrepancies are expected since the colorimeter explores an internal light source with optical characteristics distinct from the illumination used on the cell-phone analysis. As shown in Table 1, variations on RGB value, obtained from the mobile-phones images, have reached over 28%. Furthermore, one can notice that the evaluation of the R color component of the red color area, and the G component of the green area, and the B color component of the blue area have presented the smaller standard deviations (11.38%, 12.41% and 5.70% respectively).
![]()
Table 1. RGB values of color regions (red, green and blue) using colorimeter and mobile-phones.
![]()
Table 2. The relative color values of the Figure 1(a) red region using different mobile-phones. White area was used as the reference region.
To evaluate the performance of proposed method to distinguish different color shades, the color pattern of Figure 1(b) was imaged and analyzed, using Equation (3). Figure 2 shows the values of the relative color intensity r of different areas of Figure 1(b). In Figure 2, the |Ri − Rr| values of abscissa axis were obtained by measuring the R-color component of the red shades areas with the colorimeter. Figure 2 indicates that the proposed self-referenced colorimetric method can distinguish two different color shades areas with |Ri − Rr| > 5, establishing a relative red color threshold, rt, of ~1.02. Similar analyses were performed to identify the limitation of the proposed method in the evaluation of regions with green and blue tonalities. The measured relative green and blue color thresholds were gt ~ 1.00 and bt ~ 1.03.
The relative color values of Table 2 and Figure 2 were obtained taking photographs under the same illumination condition. However the real color of an object is greatly dependent of the illumination light source. Relative color
![]()
Figure 2. Relative rcolor intensity values of the Figure 1(b) red shades areas as function of the color differences (|Ri − Rr|), measured with the colorimeter. The solid line is a guide to the eye.
intensity analysis can also reduce the illumination dependence of the spectroscopic evaluation. Figure 3 shows the normalized average relative color intensity values of the red shades areas (using regions 1 and 2 from Figure 1(b)) under different illuminations. Here a fluorescent lamp (175 Lux), an incandescent lamp (33 Lux) and a white LED (5 Lux) were used as light source. Sunlight (355 Lux) was also explored on the illumination of the color pattern. The relative color average value obtained under sun illumination was used to normalize all the measured values. The smallest deviation (0.53%) of the measured average relative color values was observed using the proposed method (Equation (3)), under different illumination conditions. The proposed self-referenced relative color intensity method reduces the mobile-phone spectroscopic evaluation dependence on the illumination source.
To demonstrate the potential use of the method, the chemical-adsorption of a molecule on nanoparticle surface was evaluated, using a mobile-phone (CP3). Optical properties (scattering and absorption) of metallic nanoparticle maybe changed by the adsorption of molecules on the metal surface [26]. In particular, 50 nm gold sphere colloid presents a faint pink color, with an extinction spectrum characterized by a peak (Plasmon peak) at 523.94 nm, and FWHM of 69.13 nm. The addition of Cystemaine to colloid volume and it adsorption on nanostructures induces a read shift of the Plasmon peak to 544.91 nm. Figure 4 presents the extinction spectra of gold colloid with and without Cysteamine. The interaction of Cysteamine’ sthiol group with the gold surface is well described in the literature [27] [28]. Thiol-gold interaction establishes the basis to the develop robust self-assembled monolayers for several applications, as optical biosensors
![]()
Figure 3. Dependence of the relative color parameters as a function of the light source.
![]()
Figure 4. Extinction spectra of the 50 nmAu sphere colloid with (red) and without (black) Cysteamine. Inset: Mobile-phone image of the colloid with and without Cysteamine (Cys).
[29] [30] [31]. The inset of Figure 4 shows a picture of the two solutions (colloid with and without Cysteamine) in 1 cm optical length glass cuvettes. The color difference of the samples is hardly noticed.
The colloids relative color value was determined using the developed mobile-phone application, installed on the CP3 mobile phone. For that, the colloid without Cysteamine image was chosen to be the reference region and an area of the gold-Cysteamine solution image was selected as the interested region. The App interface with the processing result for a given image is shown in Figure 5. After taking a photo with the mobile-phone application, the image is shown on the display of the device with two regions markers (black and red). The black marker was positioned over the region of the image used as a color reference, while the red marker was placed on the region of interest. The color analysis was performed by selecting the render button (process) of the App.
The time behavior of the Cysteamine adsorption on the gold surface was evaluated with the self-referenced relative color assay. Figure 6 shows the time evolution of the sample’s red component of the relative color value with the addition of Cysteamine in the gold colloid and the peak shift in the spectrum due to the presence of the Cysteamine. Although the method cannot precisely identify color changes smaller than rt, we were able to verify that the adsorption process takes approximately 40 min to be complete established. A good correlation (a2 = 0.9824) between the red component of the relative color and the corresponding extinction peak wavelength were identified, as shown in the inset of Figure 6. The measured r value change (r = 1.013), associated to the colloid color modification, was close to the relative color threshold value, rt, determined on Figure 2, indicating the capability of the method to distinguish slight colors changes. Moreover we were able, with a mobile-phone, to identify a 20.99 nm spectrum shift of a 69.13 nm FWHM spectrum band.
4. Conclusion
The color analysis of an object using distinct mobile-phones can lead to disparate results. To overcome this obstacle a mobile-phone based standalone spectroscopic method, without calibration procedures, to determine relative color values of an image was proposed and evaluated. On the analysis of a color pattern, no more than 3.5% of deviation was observed on the relative color values obtained by four different mobile-phones, indicating that the proposed color
![]()
Figure 5. Picture of the mobile-phone running the self-referencing colorimetric App. The black and red-circled areas indicate the region of interest and the reference region.
![]()
Figure 6. Time evolution of the goldcolloid extinction spectrum peak (red) and red component of the relative color intensity value (blue), with the addition of Cysteamine. The inset shows a linear correlation (a2 = 0.9824) of the r and the colloid extinction peak.
evaluation procedure is weakly dependent of the image device used. The proposed self-referenced spectroscopic method can distinguish 2% (|Ri − Rr| > 5) difference on the R-color component of red shades areas. We also demonstrated that relative color analysis could also reduce the illumination dependence on the spectroscopic evaluation. Under different illumination conditions we observed a 0.53% deviation of the measured relative color values of a color pattern. Moreover, the method allowed identifying a 20.99 nm spectrum shift of a 69.13 nm FWHM spectrum band of colloidal gold, due to the Cysteamine adsorption on the metal surface. The proposed self-referenced technique leads to relative color intensity values that are weakly dependent of the illumination condition and mobile-phone used. Therefore the color analysis method can improve and expand the use of cell-phones in standalone spectroscopic applications. Moreover, mobile-phones spectroscopic
platforms can contribute to the democratization of diagnostics technologies globally, by offering high sensitivity cost-effective sensors [32].
Acknowledgements
The authors acknowledge the financial support from the Brazilian agency CAPES/PNPD, FACEPE, CNPq and the National Institute of Photonics.