Next Article in Journal
Targeted Molecular Imaging Probes Based on Magnetic Resonance Imaging for Hepatocellular Carcinoma Diagnosis and Treatment
Next Article in Special Issue
Ensem-HAR: An Ensemble Deep Learning Model for Smartphone Sensor-Based Human Activity Recognition for Measurement of Elderly Health Monitoring
Previous Article in Journal
Bead Number Effect in a Magnetic-Beads-Based Digital Microfluidic Immunoassay
Previous Article in Special Issue
Wearable Devices for Physical Monitoring of Heart: A Review
 
 
Font Type:
Arial Georgia Verdana
Font Size:
Aa Aa Aa
Line Spacing:
Column Width:
Background:
Article

Solving Color Reproducibility between Digital Devices: A Robust Approach of Smartphones Color Management for Chemical (Bio)Sensors

by
Pablo Cebrián
1,
Leticia Pérez-Sienes
2,
Isabel Sanz-Vicente
1,
Ángel López-Molinero
1,
Susana de Marcos
1 and
Javier Galbán
1,*
1
Analytical Biosensors Group (GBA), Analytical Chemistry Department, Faculty of Sciences, INMA, University of Zaragoza, 50009 Zaragoza, Spain
2
Complex Systems Group, Polytechnic University of Madrid, ETSI Agronomy, Food and Biosystems, 28040 Madrid, Spain
*
Author to whom correspondence should be addressed.
Biosensors 2022, 12(5), 341; https://doi.org/10.3390/bios12050341
Submission received: 25 March 2022 / Revised: 7 May 2022 / Accepted: 9 May 2022 / Published: 17 May 2022
(This article belongs to the Special Issue Smartphone-Based Sensors for Biomedical Applications)

Abstract

:
In the past twelve years, digital image colorimetry (DIC) on smartphones has acquired great importance as an alternative to the most common analytical techniques. This analysis method is based on fast, low-cost, and easily-accessible technology, which can provide quantitative information about an analyte through the color changes of a digital image. Despite the fact that DIC is very widespread, it is not exempt from a series of problems that are not fully resolved yet, such as variability of the measurements between smartphones, image format in which color information is stored, power distribution of the illuminant used for the measurements, among others. This article proposes a methodology for the standardization and correction of these problems using self-developed software, together with the use of a 3D printed light box. This methodology is applied to three different colorimetric analyses using different types and brands of smartphones, proving that comparable measurements between devices can be achieved. As color can be related to many target analytes, establishing this measurement methodology can lead to new control analysis applicable to diverse sectors such as alimentary, industrial, agrarian, or sanitary.

1. Introduction

The determination of chemical and biochemical compounds in complex samples is usually based on separation techniques, mainly gas chromatography (GC) or high-pressure liquid chromatography (HPLC), linked to several types of detectors. However, these determinations require fast, low-cost, and easily-accessible methods in many cases. In this case, the methods must be based on portable devices and as smartphones are very widespread, they can become the ideal tool for this task, as long as they can carry out the determinations [1].
According to a study conducted and compiled by two online marketing and communication agencies, We are Social and Hootsuite, in the report Digital 2021 in January 2021 [2], there are about 5.22 billion mobile phone users, which covers 66.6% of the world population. These data show the ubiquity of smartphones and explain why the use of these devices as an analytical tool has grown significantly in the last twelve years [3] (Figure 1). The versatility and ease with which a smartphone is used have led to the development of numerous control analyses: mercury, nitrites, or fluoride in water samples, iron (III) in bioethanol fuel, and formaldehyde in cosmetic products, among many others [4,5,6,7,8,9,10,11,12].
All of these methods share the use of the color generated in a chemical or biochemical reaction, as the analytical signal, through digital images, for the determination of the corresponding compound.
In a quantitative determination, a certain concentration of a dye dispersed or dissolved in a specific support (cellulose sheet, paper strips, etc.) is formed during the development of the method. This concentration corresponds to a specific color, that is, an RGB value. Therefore, any chemical or biochemical colorimetric reaction can be traced with digital still cameras (DSCs).
The ideal situation would be that the information associated with a color was independent of the smartphone used for the measurement. However, as our own experience has suggested in various experiments [13,14], this is never the case.
In a very simplified way, DSCs integrated into a smartphone take images through three steps: (1) The DSC focuses on the object that wants to be captured through the camera lens, (2) The light enters the lens, passes through a color filter (usually a Bayer mosaic filter, see Supplementary Material S1) and the sensor gathers this light through the photodiodes, (3) the hardware of the device processes the light information of the photodiodes, generating and storing a digital image that can be displayed on the screen of the device.
Although this is the general procedure of taking an image by a DSC, color measurements taken in the same lighting conditions are unlikely to be comparable between devices. This is because both filter and sensor are different from one device to another.
In addition, digital image colorimetry (DIC) is subjected to a series of variables [15,16,17], such as the intensity of the light source used for the measurements, type of illuminant, etc. All these variables make the color measurements not comparable among different mobile devices and induce systematical errors.
Another problem arises when the hardware of the device transforms the light information into a digital image. It has to transform the sensor gathered information from analogical to digital. This process is carried out using mathematical formulae [18,19] according to the selected image format in which the device stores the image. By default, every DSC can take images in the JPEG format (Joint Photographic Experts Group), which reproduces color in the sRGB (standard Red Green Blue color space), using D65 illuminant as reference [20,21]. The mathematical formulae for the sRGB color space associated with the JPEG format are described in Supplementary Material S2. Despite the fact that the mathematical transformation for JPEG format is constant to every device, the information gathered by the sensor is not, that is what causes the differences in color measurements between devices. All the images used in this article are taken in this format. Once the image is stored, the device displays the image by illuminating the diodes on the screen of the device.
Furthermore, it is essential to use programs, such as Light Room or Photoshop, to extract the color information from an image [22,23] so it can be treated and represented in any of the color models that exist [24] (see Supplementary Material S3). Although these programs are very useful and powerful tools, they focus more on improving the visual quality of the image than on the information it may contain and the use that can be made of it. Other programs or apps, such as Image J or Photometrix, focus on treating the information contained in the image for qualitative/quantitative measurements of color. However, this information still depends on the initial conditions in which the images were taken and cannot be related between devices. That is why all the possibilities of the DIC for color-based control tests have not yet been exploited.
This article presents a methodology that aims to solve these problems so that the measurements between different smartphones can be comparable. Two strategies are used. The first strategy is to design software using Python® programming language that references all color samples to specific lighting measurement conditions. This software will compare and minimize the differences between the RGB values of a referenced color system (RAL Classic® Color Chart, also specified by the manufacturer in sRGB color space and D65 illuminant [25]) and the smartphone RGB measurements. To do so, two data sets in .csv format (a kind of spreadsheet for Microsoft Excel) are needed: one with the RGB values of the RAL Classic® Color Chart specified by the manufacturer and another with its analogs, measured with the smartphone. The program displays the correlation between the data sets and the absolute errors. Since the color values are not exactly the same, the program will generate two matrices to minimize these errors by means of a linear least-squares fit. The first matrix (3 × 3) corrects the chromatic differences between the data sets, while the second matrix (1 × 3) corrects the intensity differences. This is intended to solve the problem caused by the filters and sensors of smartphones.
The second strategy is to develop a light box in which lighting conditions are more homogeneous and adequate for the color measurements. This is achieved by establishing fixed illumination conditions, controlling the intensity/emission geometry of the light source, and the distance between the smartphone and the color sample.
The RGB values of the RAL Classic® samples will be obtained and analyzed from the photographs taken with each DSC through Image J software. Apart from the RGB color space, the CIE Lab color space will be used to treat and quantify the color measurements [26].
The CIE Lab is a color space based on the human visual system, defined by the International Commission on Illumination (abbreviated CIE) in 1976, developed with the intent of creating a standard for color communication so the properties of the color could be quantified and numerical differences between shades could be determined due to the fact that, unlike RGB color space, CIE Lab is device-independent, which means that the coordinates used to specify a color will produce the same color wherever they are applied. To quantify these differences, mathematical equations will be applied in the CIE Lab color space, known as CIE∆E2000 (kL:kC:kH) [27], to establish the differences and tolerance limits between the measured colors and the colorimetric reference system.
As proof of concept, this methodology has been applied to the determination of H2O2 (test strips enzymatic biosensors) and pH (colorimetric test strips). These two applications have been chosen because they represent the two types of calibration models most frequently obtained using these devices. In the biosensor, the same color with different intensities and polynomial calibration is obtained; in the pH, a change in a color gamut is observed, and an s-shape calibration line. The determinations were made using several smartphones, obtaining comparable results between them.

2. Materials and Methods

2.1. Digital Imaging Devices

Different devices were used to measure color: HP Scanjet G2410 Flatbed Scanner (Charged-coupled device with a resolution from 12 dpi to 999,999 enhanced dpi at 100 percent scaling) (HP Inc., Palo Alto, CA, USA), Xiaomi Redmi 6A (13 MPx Camera, CMOS-Sony IMX486 Exmor RS sensor, f/2.2 aperture) (Xiaomi Inc., Beijing, China), Xiaomi Redmi 4A (13 MPx Camera, ISOCELL-Samsung S5K3L8 sensor, f/2.2 aperture) (Xiaomi Inc., Beijing, China), Xiaomi Redmi 5 Plus (12 MPx Camera, CMOS-Omnivision OV12A10 sensor, f/2.2 aperture) (Xiaomi Inc., Beijing, China), Xiaomi Mi A2 (12 MPx Camera, CMOS-Sony IMX464 Exmor RS sensor, f/1.5 aperture) (Xiaomi Inc., Beijing, China), Huawei P30 Lite (40 MPx Camera, CMOS BSI-Sony IMX650 Exmor RS sensor, f/1.8 aperture) (Huawei Technologies Co, Guangdong, China), Apple iPhone SE (12 MPx Camera, CMOS BSI-Apple iSight Camera sensor, f/2.2 aperture) (Apple Inc., Cupertino, CA, USA) and Apple iPhone 8 (12 MPx Camera, CMOS BSI-Apple iSight Camera sensor, f/1.8 aperture) (Apple Inc., Cupertino, CA, USA) [28].

2.2. Digital Imaging Software

The RGB values of the photographic files (JPEG) were analyzed with Image J (LOCI, University of Wisconsin, Madison, WI, USA) [29,30]. (https://imagej.nih.gov, accessed on 28 February 2022). The RGB values were processed and treated with self-developed Python software (version 3.9) in the online platform Project Jupyter [31] (see Supplementary Material S4). Factorial analysis and data treatment were performed with Microsoft Excel 2010™ [32].

2.3. Light Box

A light box was designed with AutoCAD software and manufactured with a Zortrax M200 3D Printer to measure the color samples. A polylactic acid (PLA) thermoplastic filament (Black Z-PLA filament) was chosen for the structure of the model due to its physical and mechanical properties [33], which made it perfect for portable systems. The use of 3D technology allowed to manufacture and modify the light box at a relatively low cost [34].
Our design is a cubic shape light box with external dimensions of 10 cm × 10 cm × 7 cm and an internal hole of 6 cm × 6 cm × 6 cm. The main piece has an upper part hole where an illuminant, powered with 4 AA batteries, is placed. The smartphone will rest on a complimentary piece working as a lid on the main piece.
The color samples are located on the lower open part of the light box. The focal length between the smartphone and the color sample is 12 cm (Figure 2).

2.4. Reagents and Solutions

Britton–Robinson buffer solution (0.04 M borate, 0.04 M phosphate, and 0.04 M acetate, pH 7.0) was prepared from H3BO3, H3PO4, and CH3COOH and titrated to the desired pH with 2 M NaOH. The different pH solutions were prepared from the Britton–Robinson buffer titrated to the desired pH with 2M NaOH and HCl 2M. All reagents were supplied by Sigma-Aldrich. Hydrogen peroxide stock solution (33% w/v) was supplied by Panreac (131077.1211). Different concentration solutions were made from this one.

2.5. Illuminants

Indirect constant artificial lighting was used for the color measurement: Genie Esaver Bulp by Philips (Amsterdam, The Netherlands) (11 W), Master TL-D Fluorescent by Philips (The Netherlands) (36 W), 6500 K warm white dimmable LED by EGLO (Austria) (7.5 W) and 5050 K white LED by YJHSMT (China) (8 W). Their spectral power distributions (SPD) were characterized in the range of 380–780 nm and measured with an arrangement composed of an optical fiber (Ocean Optics QP600-1-sR) and a compact monochromator (Ocean Optics QE-65,000).

2.6. RAL Classic® Reference Colorimetric System

RAL Classic® color chart (was used to standardize the color measurements. This chart is a collection of 213 colors, each of them named with a 4-digit number in combination with the letter “RAL” (it was defined by Deutsches Institut für Gütesicherung und Kennzeichnung; RAL is the acronym of Reichsausschuß für Lieferbedingungen und Gütesicherung The first digit determines the hue of the color (yellow, orange, violet, etc.). The remaining three digits are chosen sequentially. This color chart is referenced in the sRGB color space and D65 illuminant conditions.
For the contrast analysis between the chart and the RGB values obtained with the devices, 96 RAL color samples were characterized and measured initially in the range 380–780 nm with a spectrophotometer CM-2600d (Konica Minolta, Osaka, Japan). The spectrophotometer uses pulsed Xenon lamps to illuminate the samples and gathers their reflectance spectra. Then this information is transformed mathematically into the desired color space and can be compared with the measurements of the device. The 96 color samples from the chart were chosen so a homogeneous distribution of all types of colors could be introduced to the studies. This was achieved by randomly selecting RAL samples with different hues whose R, G, or B coordinates were different from 0 or 255. As the RGB system range goes from 0 to 255, a value of 0 implies that the sensor has not captured enough light to generate a signal in any of the RGB channels (underexposure) and a value of 255 implies that the sensor has captured too much light (overexposure), with its respective irreversible information loss.
A USB Dino-Lite AM2111 microscope was used to evaluate the integrity of the color samples’ surfaces. A defect in the color of the surface causes an erroneous measurement because the light does not reflect homogenously. To evaluate the integrity of the surfaces, each color sample was inspected individually using the USB microscope. If the surface showed any kind of defect, the sample was considered as “unsuitable” and was discarded. The microscope was placed directly on the surface of each color sample and visualized using the Dino Capture 2.0 program, adjusting the focal length with the microscope to 60 mm.

2.7. Procedure

To evaluate the DSC’s initial RGB values and apply the correction method, several steps are necessary. The first step corresponds to the initial evaluation of the color samples and it is where more time is spent within the methodology (about an hour) as the images of the RAL chart have to be taken individually with the smartphone, measured, and filed on a CSV spreadsheet. Once this step has been completed, this part does not have to be repeated anymore (i.e., every time the smartphone is used for a color measurement). The rest of the procedure is very fast as they are carried out with the program that we have designed in Python (Steps 2 and 3, about 5 min overall) and the application in real samples is also implemented in an Excel macro (Step 4, less than 1 min for each measurement). All the steps are outlined in Figure 3.

2.7.1. Initial Evaluation of Color Samples in Digital Images (Step 1)

Firstly, JPEG format photographs were taken with the different devices from each individual color sample. The photographs were imported to the Image J program and a 500 kpixel area was selected to obtain the mean of the RGB values (named as R0, G0, and B0, respectively) with their standard deviation. Then, RGB values were imported to Excel for further analysis. To evaluate the initial differences between the photography color samples and their references, RGB values must be transformed into the CIE Lab color space through a series of mathematical equations [18,26,35] (see Supplementary Material S5).
To quantify the differences between the CIE Lab measured color values and their references, a series of mathematical formulae called CIE∆E2000 (kL:kC:kH) is used, being kL, kC, and kH correction magnitudes associated with the observation conditions of the sample (see Supplementary Material S6). If each color, measured and referenced, is placed in the CIE Lab 3D color space, this mathematical formula calculates the Euclidian distance between these two colors. This distance is called ∆E. Low ∆E values indicate greater accuracy between the displayed color and the original color standard of the input content, while high ∆E values indicate a significant mismatch.
For this work, CIE∆E2000 (2:1:1) is used, in contrast to what is usually used, which is CIE∆E2000 (1:1:1), as it has a better performance when it comes to color comparison in controlled lighting essays [36,37].
As a general guide, ∆E values greater than 5 are considered unacceptable in most processes since they indicate that the color difference is especially evident. If ∆E approaches 2.3, we would be talking about the JND or “just noticeable difference,” a very hardly noticeable difference between colors used as a criterion for evaluating color differences acceptability [38]. As the screening ∆E value is dictated by the development of different industries in which it is used, for the first experiments in this work, the JND criteria are chosen and all color samples with an ∆E ≥ 2.3 are considered as inaccurate and are discarded.

2.7.2. Correction Matrices Generation (Step 2)

The second part of the procedure is focused on the correction of the color differences between the DSCs and reference color samples. To correct these differences, a code written in Python®, based on a linear fit using least squares, was used. This code generates two matrices through the comparison of the device’s measured color values and the standards so that the differences are minimized. A general equation of this correction (Equation (1)) is expressed as follows, being [RGB]0 the initial color values and [RGB]c the corrected color values:
[RGB]c = [M1]·[RGB]0 + [M2]

2.7.3. Color Calibration (Step 3)

The next step is to evaluate whether the methodology used has worked. The initial color values are corrected with the Python-generated matrices, transformed again to the CIE Lab system, and the ∆E values are recalculated. If the ∆E mean of all color samples is lower than 2.3, the correction method and the matrices generated can be applied to real samples.

2.7.4. Application of the Methodology and Matrices in Real Samples (Step 4)

Finally, the methodology and the matrices generated previously will be applied to real samples to correct and reference these samples to specific lighting conditions. To do this, a photograph of the color involved in a chemical or biochemical reaction is taken in the same conditions as the RAL Classic® Color samples. Once the initial RGB values are imported to Excel, through all the processes already mentioned, the correction matrices are applied, and the color measurements can be compared between different smartphones.

3. Results and Discussion

3.1. Characterization of the RAL Classic® Color Chart Using a CM-2600d Spectrophotometer (Konica Minolta)

The RAL Classic® Color Chart will be used as a reference (96 samples, whose color coordinates are provided by the commercial company). The first study was to characterize them to ensure that they could be used as a reference. For this, we used a Spectrophotometer (Konica Minolta, CM-2600d) (see Section 2.6) and the CIE Lab color sample values obtained were then compared with the references. The comparison showed that all 96 samples had ∆E < 5, but 15 of them did not meet the criteria of JND (∆E < 2.3), as it is shown in Supplementary Material S7. Using a USB Dino-Lite AM2111 microscope (see Section 2.7), imperfections or deterioration in their surface were found (due to the use of the color chart) (see Supplementary Material S8), so they were discarded, having 81 color samples for the next study.

3.2. Correction Method for Images Taken with an HP Scanjet G2410 Flatbed Scanner

An HP ScanJet G2410 flatbed scanner was first considered as a starting point to evaluate the possibilities of the correction method in a digital system as it was constructed to have controlled lighting conditions. This is achieved by: fixed measurement distance and angle, constant background, and fixed illuminance.
First, a scan of the 81 RAL color samples was performed to evaluate the differences between the RGB values of the device and the referenced ones. All automatic correction functions associated with the software bundled with the scanner were disabled to ensure that the RGB values of the samples were not manipulated. Once the images were taken, all of those color samples whose R, G, or B coordinates were equal to 0 or 255 were discarded (see Supplementary Material S9). Later, each RAL color sample was analyzed and evaluated individually with CIE∆E2000. The results were given using the average values of L, a, b, and ∆E2000 belonging to the 55 RAL (Table 1 Without Correction). As it can be seen, ∆E2000 has a value of 6.88 ± 0.45, which does not meet the JND standard.
After this first evaluation, the RGB values of the device of all samples were introduced in the Python software and corrected. Then, the new RGB values were transformed into CIE LAB and evaluated again with CIE∆E2000 (Table 1 With Correction), so the results with and without the correction could be compared.
As it can be seen, the application of the proposed correction method makes ∆E2000 less than 2.3 for the average of the samples (∆E2000 = 1.95 ± 0.24). This shows that the color coordinates measured with the digital device correspond to the referenced ones and the influence of the sensor and lighting on the measurement could be corrected.
The 55 samples that remained will be used to implement the methodology on smartphones, which is the next step.

3.3. Study of the Lighting Effect on Colors of Digital Images Taken with a Smartphone

One of the main problems in reproducing color is the lighting conditions under which the color sample is measured [39]. The illuminant used to measure a color determines the RGB values that the photography has, so when a digital image is taken and whenever possible, the lighting conditions must be specified to reproduce color on another device. Each light source has a different spectral power distribution, affecting the amount of light that a color sample will absorb and reflect. Another problem is generated by the directional differences in the color sample. This is caused by the relative position between the illuminant, the sample, and the instrument, causing color variations on the surface of a sample.
In the previous study, this problem did not exist as the digital images were taken under controlled lighting conditions, but that is not the situation in which one works with a Smartphone.
In this study, we will address the effect of different types of illuminants on color reproduction and how they affect the generation of the correction matrices. Figure 4 shows the differences in the spectral power distribution of all illuminants compared to the referenced illuminant, D50.
The photographs of the RAL Classic® Color Chart samples were taken using a Xiaomi Redmi 6A Smartphone and subsequently treated. Table 2 shows the different results obtained before and after the correction method. The device was placed directly above the sample at a distance of 12 cm and 50 cm from the illuminant.
The results in Table 2 show that despite the spectral power distribution differences of the illuminants, the correction method can be applied to any kind of illuminants, achieving better results with those assumed to have a spectral power distribution more similar to the D50 illuminant in our case, the “YJHSMY White LED Strip.” A complementary study was made to prove these similarities, the Spectral Similarity Index method (SSI) [40,41] (see Supplementary Material S10). Based on the results, the “YJHSMY White LED Strip” illuminant will be used for the rest of the experiments in this article.
It is observed that, although it improves in all cases, ∆E2000 is more major than 2.3, probably due to the fact that there is no controlled lighting environment, which is what is studied in the following section.

3.4. Controlled Lighting Conditions with a Light Box

Despite the good results in the previous study with the “YJHSMY White LED Strip” Illuminant, all the color samples presented relatively high standard deviation values (SD) in each RGB channel compared to the ones obtained with the flatbed scanner (Table 3). These differences are associated with the fact that the flatbed scanner measurements are taken under fixed lighting conditions due to a light box structure, avoiding the influence of external illuminants and light gradients.
To verify these problems, a light box was designed and manufactured (see Section 2.3) with a 3D printer so that it could be adapted to smartphones. Three studies were made: (1) a graphical representation of each RGB channel individually, or histogram, to evaluate the differences in the results by means of a light box; (2) a 3D surface plot of a selected area in the image, to evaluate light gradients and, (3) the effect of external illumination inside the light box (see Supplementary Material S11). Once confirmed that the use of a light box eliminates the influence of external lighting on the measurements and that the light gradients can be corrected, a new SD study of the RGB channels was made. All the studies were performed using the Image J software, comparing the Xiaomi Redmi 6A results before and after using the light box (Table 4). As it can be seen, the standard deviation values have been considerably reduced in all channels.
These new results obtained with the Xiaomi Redmi 6A are consistent with the ones obtained with the HP Scanjet G2410. The use of a light box minimizes the variability of the measurements, achieving more precise color measurements.
The light box results were also compared using the CIE∆E2000, as shown in Table 5, demonstrating once again the need to carry out color measurements under fixed lighting conditions. As it can be seen, the value of ∆E2000 that was obtained in Table 2, with the YJHSMY White LED Strip illuminant (2.61 ± 0.27), has been reduced to (2.01 ± 0.22) using the light box.
The rest of the studies in this article will be performed using the light box.

3.5. Study of Color Reproducibility between Devices. Qualitative Method

The last problem to be solved in color measurements is related to the sensors among smartphones. Each device is manufactured under the specifications of the commercial house, which means that the sensor it uses is unique, making color measurements between devices not comparable due to differences in light gathering.
The objective of this study is to check if both corrections and methodology used so far decrease the variability of the measurements between devices, making them comparable. If this is the case, this methodology will be applied to colorimetric reactions for control analysis.
The first step was to generate the matrices of each individual device, using the 55 RAL and the light box, and apply the correction method. The CIE∆E2000 values were evaluated before and after the correction through the photographs taken by each device (see Supplementary Material S12). The results showed that the initial measurements of color are not comparable between devices, which is consistent with the use of different sensors.
Once the corrections were evaluated, 10 RAL samples were chosen unrelated to those used for the correction method. After taking the corresponding photographs with each device, the colors were analyzed and corrected with the matrices. Once corrected, they were compared to each other and with the referenced RGB values before and after the correction method (Table 6). This table shows the RAL value provided by the manufacturer of the RAL chart (Reference) as well as the RAL value obtained without correction (WOC) and once the correction has been applied (WC). Match (Yes/No) means if there is an agreement with the reference value. The results were implemented with a macro developed on an Excel Spreadsheet.
As it can be seen, before applying the correction, there is only correspondence with two RAL (4011 using Xiaomi Redmi 4A and 8025 using iPhone SE). Once the correction is made, there is a correspondence of 4 RAL (2008, 4011, 6010, and 8025) in the three devices. Despite the fact that the rest of the color samples do not correspond with the color chart, they present it between devices (1018, 3016, 5007, 7001, and 9017) except the RAL 9010.
This is because some colors on the chart have very similar RGB values and the color measurements have certain errors associated with them; therefore, the concordance between colors is not perfect.
Finally, 5 samples from the 10 chosen for the study were randomly chosen (Samples 1, 3, 6, 7, and 9), and the RGB values of each device were represented on a box and whisker plot, comparing these values before and after the correction so that the variability of the measurements could be noticed (Figure 5a–c). This process will allow evaluation of the validity of the correction method and, if it is feasible, to apply it to real color samples.
Since the methodology has been proven to work and comparable measurements between devices can be achieved, the next step is to focus on chemical colorimetric reactions for control analysis.
Two applications are studied: in the first one, there are changes in the intensity of the same color for different concentrations of analyte (H2O2), and in the second, there are different colors for different analyte concentrations (H+).

3.6. Measurement of H2O2 in Various Solutions Using 3,3′,5,5′-Tetramethylbenzydine (TMB) as the Reaction Colorant. Quantitative/Qualitative Method on Test Strips

The first study was centered on the determination of H2O2 in various solutions. Numerous brands of peroxide test strips are commercially available. For this study, Quantofix Peroxide 25® test strips will be used. These strips contain a Horseradish Peroxidase-like enzyme to catalyze the reaction and 3,3′,5,5′-Tetramethylbenzydine, which acts as the colorant of the redox reaction. (see Supplementary Material S13).
The color changes produced on the strips occur between 0 to 25 mg/L of H2O2, generating the graduation of a cyan-like color.
For the determination of peroxides in these strips, 12 solutions of known concentration were prepared and measured to generate a calibration plot, representing R0-R/R0 vs. the peroxide concentration values (Figure 6). The R coordinate of the RGB system was chosen as an indicator of the color differences between measures due to the capacity of the colorant to absorb at the wavelength of 650 nm. As was previously demonstrated in previous papers [13,14], a second-order degree polynomial relationship between (R0-R)/R0 and the concentration of the chromophore is theoretically expected.
Each solution was injected onto the strips and measured after 15 s with the Xiaomi Redmi6A Smartphone, as specified in the strip instructions. Then the RGB values were corrected and used for the calibration.
Then, four peroxide solutions of unknown concentration were prepared to interpolate into the Xiaomi Redmi 6A calibration plot applying the corresponding correction with different smartphones, Table 7. Each solution was measured three times with each smartphone. All the procedure was carried out with a macro developed in Microsoft Excel, as in the previous study, so that the value of the corrected concentration was displayed. At present, a mobile application is being developed to implement all of this methodology into several colorimetric reactions to make this kind of measurement easier.
This study proved that a single calibration with a smartphone can be related to other devices’ measurements and that these measurements can be interpolated in the same graph obtaining good results. It also showed that in all cases, the correction method decreases the relative errors significantly and the variability between measurements (see Supplementary Material S14), which corroborated the importance of using this method. Sample 4 was the only sample in which the initial interpolation could not be applicable, but this problem was solved after the correction. For the rest of the measurements, the relative errors are comparable to those of a semi-quantitative method. Previous studies of this reaction in the laboratory [14] showed that the color values of the measurements are dependent on time, so the stabilization of the color in this reaction will be considered in further studies to improve these results.

3.7. Determination of the Different pH Colors of Various Solutions Using Universal Indicator Test Strips

The second study was centered on the determination of the pH color of various solutions. For the analytical application, the pH strips of the PanReac AppliChem® brand were chosen. These strips change their color depending on the pH of the solution due to the variety of indicators they are made of, typically a mixture of thymol blue, methyl orange, methyl red, bromothymol blue, and phenolphthalein [42].
First, 12 different solutions in the range of 2 to 14 in pH were prepared from a Britton-Robinson buffer so their colorimetric reaction with the pH strip could be used as a reference for the determination. The strips were immersed for one second in each solution and after 15 s, their color was measured. The generated colors were measured with a Xiaomi Redmi 6A smartphone. The RGB values of the different pH solutions are shown in Table 8.
These measurements showed that there was not an evident dependence of any RGB coordinate with the pH values (see Supplementary Material S15), so another color space, the CIE xy, was considered for the determination. This 2D space is related to the predominant wavelengths of color, can easily be related to the RGB color space through a series of mathematical formulas (see Supplementary Material S5), and, as there is a wide color gamut, it is perfect for this kind of determinations. From the two coordinates of this color space, the x coordinate was chosen because it could be related to the pH values by means of a logistic function, as seen in Figure 7. For this article, the Xiaomi Redmi 6A pH calibration will be used to compare the quantitative measurements of three different devices.
To do so, first, the logistic function was established (Equation (2)), which can be expressed in a general way as
y = A + B A 1 + ( pH C ) D
This function can be linearized as follows:
y = A + B A 1 + ( x C ) D B A y A 1 = ( pH C ) D log ( B A y A 1 ) = D log pH D log C
Once the logistic and the linearized form functions of the measurements were obtained (Figure 8a,b), 4 different buffer solutions were selected from the laboratory to determine their pH value. Each buffer was measured 3 times with 3 different smartphones. The study results (Table 9) were obtained by interpolating the x value of the CIE xy system of each sample in the linearized form of the logistic function.
This study proved once more that a single calibration with a smartphone can be related to other devices’ measurements and that these measurements can be interpolated in the same graph, obtaining precise and with low uncertainty results, even better than in the peroxide determination. It also showed that the relative errors decreased significantly after the correction method in all cases, achieving values lower than 2.3% in samples 1, 2, and 3, which are comparable to a quantitative method. The relative error of sample 4, lower than 16%, is consistent with the area in which the sample is interpolated on the logistic function, which has no variation of the x coordinate despite the pH. The variability of the measurements between samples also decreased (see Supplementary Material S16), except for sample 4, which could not be initially interpolated on the graph.

4. Conclusions

The use of smartphones for colorimetric detection has become the main focus of low-cost analytical measurements. This article proposed a color correction method to make measurements between smartphones comparable in such a way that when future colorimetric studies are developed, the results obtained are reliable and independent of the type of smartphone used.
To achieve comparable colorimetric measurements between devices, a calibration pattern is needed to correct the variance that generates the sensor of the camera. It is also important to characterize the illuminant used in this type of study to know which wavelengths are predominant and what can be expected from the correction method. The use of a light box for collecting color data is essential to have constant lighting conditions and avoid errors in the measurements.
As shown in the article, the correction method proposed is a very suitable approach for the color correction of measurements taken with different mobile devices. In every experiment, the correction method standardizes each measurement to a common and well-defined system, the sRGB color system, but it also significantly reduces the relative errors of the measurements and the variance between smartphones, making the measurements comparable. As color can be related to the concentration of many different compounds, many different quantitative methods using smartphones can be considered.
Despite being such a useful methodology, it presents certain limitations that must be improved. For better quantitative results, other types of illuminants will have to be considered, so the initial lighting conditions are more similar to the reference color system. Regarding the Light Box, it should be redesigned to improve the light distribution among the samples, reducing the errors associated with light gradients or the glare produced on the surface of the sample. Currently, a new light box and a mobile application are being developed by our group so that this methodology can be implemented in an easier and more intuitive way. Our goal is to make analytical color measurements with DSCs more accessible to all users, hoping that in the future, these measurements can be compared with those of, for example, a spectrophotometer.

Supplementary Materials

The following supporting information [21,35,37,38,39,40,41,42,43,44] can be downloaded at: https://www.mdpi.com/article/10.3390/bios12050341/s1, Supplementary Material S1: Figure S1. The Bayer arrangement of color filters on the pixel array of an image sensor. The right part of the image shows the side-view of color photosites; Supplementary Material S2: sRGB color space transformation; Supplementary Material S3: Table S1. Application Areas of Color Models; Supplementary Material S4: Developed software; Supplementary Material S5: Figure S2. Different color spaces and their numerical representation. (a) RGB color space. (b) CIE XYZ color space. (c) CIE xy color space (d) CIE Lab color space; Supplementary Materials S6: Table S2. Parametric Factors using CIE∆E2000; Supplementary Materials S7: Table S3. Validation of 96 color samples with a CM-2600d Spectrophotometer; Supplementary Materials S8: Figure S3. Photographs of two RAL color sample surfaces were taken with the Dino-Lite AM2111 Microscope. (a) RAL 5004 surface. As the surface has deteriorated due to its use, the RGB values of this sample will be less accurate than in a sample with a homogeneous surface. (b) RAL 7004 surface. The surface is more homogeneous compared with the RAL 5004 surface; Supplementary Materials S9: Table S4. Validation of 81 color samples with an HP Scanjet G2410 Flatbed Scanner; Supplementary Materials S10: Figure S4. Spectral Similarity Index of two different illuminants used in the “lighting effect on colors of digital images taken with a Smartphone study.” (a) Variance of a Philips Genie Esaver Bulp and a D50 Illuminant. (b) Variance of a YJHSMY White LED Strip and a D50 Illuminant; Table S5. Comparison of the SSI of four illuminants with the CIE∆E2000 values before (WOC) and after (WC) the correction method is applied; Supplementary Materials S11: Figure S5. Histogram comparison of the RAL 6018 RGB channels with/without the use of a Light box. (a) Red channel histogram with/without the use of a Light box. (b) Green channel histogram with/without the use of a Light box. (c) Blue channel histogram with/without the use of a Light box; Figure S6. (a) Digital 3.5 Mpixel Image in JPEG format of RAL 6018 taken in non-controlled light conditions. (b) Relative intensities in 1000 × 500 pixel area of a RAL 6018 digital image in non-controlled Light conditions. (c) Digital 3.5 Mpixel Image in JPEG format of RAL 6018 taken in controlled Light conditions (Light Box). (d) Relative intensities in a 1000 × 500 pixel area of a RAL 6018 digital image in controlled Light conditions (Light Box); Figure S7. (a) Disposition of the Light source and the light box to evaluate the external light effect on color samples inside the box. (b) Normalized spectral power distribution plot of external illuminant inside the light box; Supplementary Materials S12: Table S6. Evaluation of 55 RAL color samples with the CIE∆E2000 (2:1:1) criterion using 3 different Smartphones with/without the correction method under controlled lighting conditions (Light Box), CI (95%); Supplementary Materials S13: Figure S8. Colorimetric reaction of the Quantofix Peroxide 25® test strips. The oxidized form of the 3,3’,5,5’-Tetramethylbenzydine generates a cyan-like color; Supplementary Materials S14: Figure S9. Box and Whisker Plot of four samples before and after the correction method. The plot shows that in every case, the [H2O2] before the correction are higher than the ones after the correction and have more variability; Supplementary Materials S15: Figure S10. A graph of the dependence of each RGB channel on the pH. The R Channel shows better sensibility than the other channels, but there are no significant differences in the R coordinate in the range 2–7 of pH nor in the range 10–14; Supplementary Materials S16: Figure S11. Box and Whisker Plot of three samples before and after the correction method. The plot shows that the pH values before the correction have more variability in every case.

Author Contributions

Conceptualization, P.C., I.S.-V., J.G., Á.L.-M. and S.d.M.; methodology, P.C., I.S.-V., J.G. and Á.L.-M.; software, P.C. and L.P.-S.; validation, P.C. and L.P.-S.; formal analysis, P.C.; investigation, P.C.; data curation, P.C.; writing, P.C., Á.L.-M., I.S.-V. and J.G.; supervision, I.S.-V., J.G., Á.L.-M. and S.d.M. All authors have read and agreed to the published version of the manuscript.

Funding

This work is part of the I + D + i project PID2019-105408GB-I00 supported by MCIN/AEI/10.13039/501100011033; the project PDC2021-121224-I00 supported by MICIN/AEI/Next Generation EU, and the founding to research groups of the DGA-FEDER (E25_20R).

Conflicts of Interest

The authors declare no conflict of interest.

References

  1. Quesada-González, D.; Merkoçi, A. Mobile phone-based biosensing: An emerging “diagnostic and communication” technology. Biosens. Bioelectron. 2017, 92, 549–562. [Google Scholar] [CrossRef] [PubMed] [Green Version]
  2. Data Reportal. Digital 2021: Global Overview Report. Available online: https://datareportal.com/reports/digital-2021-global-overview-report (accessed on 28 February 2022).
  3. Google Scholar Research Gate. Key Word Searched: “Smartphone Analytical Determination”. Available online: https://scholar.google.com/ (accessed on 28 February 2022).
  4. Vidal, E.; Lorenzetti, A.S.; Lista, A.G.; Domini, C.E. Micropaper-based analytical device (μPAD) for the simultaneous determination of nitrite and fluoride using a smartphone. Microchem. J. 2018, 143, 467–473. [Google Scholar] [CrossRef]
  5. João, A.F.; Squissato, A.L.; Fernandes, G.M.; Cardoso, R.M.; Batista, A.D.; Muñoz, R.A. Iron (III) determination in bioethanol fuel using a smartphone-based device. Microchem. J. 2019, 146, 1134–1139. [Google Scholar] [CrossRef]
  6. Lamarca, R.S.; da Costa Luchiari, N.; Bonjorno, A.F.; Passaretti Filho, J.; Cardoso, A.A.; de Lima Gomes PC, F. Determination of formaldehyde in cosmetic products using gas-diffusion microextraction coupled with a smartphone reader. Anal. Methods 2019, 11, 3697–3705. [Google Scholar] [CrossRef]
  7. Jarujamrus, P.; Meelapsom, R.; Pencharee, S.; Obma, A.; Amatatongchai, M.; Ditcharoen, N.; Chairam, S.; Tamuang, S. Use of a smartphone as a colorimetric analyzer in paper-based devices for sensitive and selective determination of mercury in water samples. Anal. Sci. 2018, 34, 75–81. [Google Scholar] [CrossRef] [Green Version]
  8. Yang, X.; Sun, M.; Wang, T.; Wong, M.W.; Huang, D. A smartphone-based portable analytical system for on-site quantification of hypochlorite and its scavenging capacity of antioxidants. Sens. Actuators B Chem. 2019, 283, 524–531. [Google Scholar] [CrossRef]
  9. Lay, W.Q.; Chang, Y.F.; Chou, F.N.; Yang, D.M. Portable FRET-based biosensor device on-site lead detection. Biosensors 2022, 12, 157. [Google Scholar] [CrossRef]
  10. Soda, Y.; Bakker, E. Quantification of colorimetric data for paper-based analytical devices. ACS Sens. 2019, 4, 3093–3101. [Google Scholar] [CrossRef]
  11. Liu, T.; Zhang, S.; Liu, W.; Zhao, S.; Lu, Z.; Wang, Y.; Zhao, Q.; Rao, H. Smartphone based platform for ratiometric fluorometric and colorimetric determination H2O2 and glucose. Sens. Actuators B Chem. 2020, 305, 127524. [Google Scholar] [CrossRef]
  12. Amirjani, A.; Fatmehsari, D.H. Colorimetric detection of ammonia using smartphones based on localized surface plasmon resonance of silver nanoparticles. Talanta 2018, 176, 242–246. [Google Scholar] [CrossRef]
  13. Oliver, S.; de Marcos, S.; Sanz-Vicente, I.; Cebolla, V.; Galbán, J. Direct minimally invasive enzymatic determination of tyramine in cheese using digital imaging. Anal. Chim. Acta 2021, 1164, 338489. [Google Scholar] [CrossRef] [PubMed]
  14. Sanz-Vicente, I.; López-Molinero, Á.; de Marcos, S.; Navarro, J.; Cebrián, P.; Arruego, C.; Visiedo, V.; Galbán, J. Smartphone-interrogated test supports for the enzymatic determination of putrescine and cadaverine in food. Anal. Bioanal. Chem. 2020, 412, 4261–4271. [Google Scholar] [CrossRef] [PubMed]
  15. Fan, Y.; Li, J.; Guo, Y.; Xie, L.; Zhang, G. Digital image colorimetry on smartphone for chemical analysis: A review. Measurement 2021, 171, 108829. [Google Scholar] [CrossRef]
  16. Bratuž, N.; Javoršek, D.; Gabrijelčič Tomc, H. Defining optimal conditions of colors in 3D space in dependence on gamma values, illumination, and background color. J. Imaging Sci. Technol. 2015, 59, 40503-1. [Google Scholar] [CrossRef]
  17. Schelkens, P.; Skodras, A.; Ebrahimi, T. (Eds.) The JPEG 2000 Suite; John Wiley & Sons: Hoboken, NJ, USA, 2009. [Google Scholar]
  18. International Organization for Standardization. Graphic Technology and photography-Viewing Conditions; International Organization for Standardization: Geneva, Switzerland, 2009. [Google Scholar]
  19. Böck, F.C.; Helfer, G.A.; da Costa, A.B.; Dessuy, M.B.; Ferrão, M.F. PhotoMetrix and colorimetric image analysis using smartphones. J. Chemom. 2020, 34, e3251. [Google Scholar] [CrossRef]
  20. Barthel, K.U. 3D-data representation with ImageJ. In Proceedings of the ImageJ Conference, Public Research Centre Henri Tudor, Luxembourg, 18–19 May 2006. [Google Scholar]
  21. Ibraheem, N.A.; Hasan, M.M.; Khan, R.Z.; Mishra, P.K. Understanding color models: A review. ARPN J. Sci. Technol. 2012, 2, 265–275. [Google Scholar]
  22. RAL Color Chart. Available online: https://www.ralcolorchart.com/ (accessed on 1 March 2022).
  23. Connolly, C.; Fleiss, T. A study of efficiency and accuracy in the transformation from RGB to CIELAB color space. IEEE Trans. Image Processing 1997, 6, 1046–1048. [Google Scholar] [CrossRef]
  24. Luo, M.R.; Cui, G.; Rigg, B. The development of the CIE 2000 colour-difference formula: CIEDE2000. In Color Research & Application; The Colour Group (Great Britain), Canadian Society for Color, Color Science Association of Japan, Dutch Society for the Study of Color, The Swedish Colour Centre Foundation, Colour Society of Australia, Centre Français de la Couleur: Vienna, Austria, 2001; Volume 26, pp. 340–350. [Google Scholar]
  25. Kimovil Database. Available online: https://www.kimovil.com/es/ (accessed on 1 March 2022).
  26. Image, J. Fiji 1.8.0_172, version using Java 6; Public Domain Software for Image Processing; LOCI; University of Wisconsin: Madison, WI, USA, 2021. [Google Scholar]
  27. Abràmoff, M.D.; Magalhães, P.J.; Ram, S.J. Image processing with ImageJ. Biophotonics Int. 2004, 11, 36–42. [Google Scholar]
  28. Project Jupyter. Free Software, Open Standards and Web Services for Interactive Computing across All Programming Languages. Available online: https://jupyter.org/ (accessed on 1 March 2022).
  29. Microsoft Excel 2010, version 14.0; Software for Factorial Analysis and Data Treatment; Microsoft: Redmond, WA, USA, 2010.
  30. Farah, S.; Anderson, D.G.; Langer, R. Physical and mechanical properties of PLA, and their functions in widespread applications—A comprehensive review. Adv. Drug Deliv. Rev. 2016, 107, 367–392. [Google Scholar] [CrossRef] [Green Version]
  31. Baran, E.H.; Erbil, H.Y. Surface modification of 3D printed PLA objects by fused deposition modeling: A review. Colloids Interfaces 2019, 3, 43. [Google Scholar] [CrossRef] [Green Version]
  32. SCCS—TUM´s Informatic Department. Available online: https://www5.in.tum.de/lehre/vorlesungen/graphik/info/csc/COL_6.htm (accessed on 2 March 2022).
  33. Ghinea, R.; Herrera, L.J.; Ionescu, A.M.; Pomares, H.; Pulgar, R.; Paravina, R.D. Dental ceramics: A CIEDE2000 acceptability thresholds for lightness, chroma and hue differences. J. Dent. 2011, 39, e37–e44. [Google Scholar]
  34. Pecho, O.E.; Ghinea, R.; Alessandretti, R.; Pérez, M.M.; Della Bona, A. Visual and instrumental shade matching using CIELAB and CIEDE2000 color difference formulas. Dent. Mater. 2016, 32, 82–92. [Google Scholar] [CrossRef] [PubMed]
  35. Mokrzycki, W.S.; Tatol, M. Colour difference ∆ E-A survey. Mach. Graph. Vis. 2011, 20, 383–411. [Google Scholar]
  36. Brill, M.H. The relation between the color of the illuminant and the color of the illuminated object. Color Res. Appl. 1995, 20, 70–76. [Google Scholar] [CrossRef]
  37. Holm, J.; Maier, T.; Debevec, P.; LeGendre, C.; Pines, J.; Erland, J.; Joblove, G.; Dyer, S.; Sloan, B.; di Gennaro, J.; et al. A Cinematographic Spectral Similarity Index. In Proceedings of the SMPTE 2016 Annual Technical Conference and Exhibition, Hollywood, CA, USA, 25–27 October 2016; pp. 1–36. [Google Scholar] [CrossRef]
  38. Academy Spectral Similarity Index (SSI) Calculator (BETA). Available online: http://ssi-calculator.oscars.org/ (accessed on 2 March 2022).
  39. Universal Indicator Composition. Available online: https://himedialabs.com/TD/I013.pdf (accessed on 2 March 2022).
  40. Furtner, U. Image.Processing Products Manager at MATRIX Vision GbH. Color Processing with Bayer Mosaic Sensors. 2001. Available online: https://www.3dhistech.com/data/pssm/website/Descriptions/Files_/3DH/art_bayermosaic_en.pdf (accessed on 28 February 2022).
  41. The Bayer Sensor Strategy. Bayer Array Image. Available online: https://www.red.com/red-101/bayer-sensor-strategy (accessed on 2 March 2022).
  42. Bruce Linbloom Website. Useful Color Equations. Available online: http://www.brucelindbloom.com/ (accessed on 2 March 2022).
  43. Ford, A.; Roberts, A. Colour Space Conversions; Westminster University: London, UK, 1998; pp. 1–31. [Google Scholar]
  44. Melgosa, M. CIE/ISO New Standard: CIEDE2000. In CIEDE Workshop; University of Leeds: West Yorkshire, UK, 2013. [Google Scholar]
Figure 1. The self-developed graph shows the number of publications related to the use of smartphones for analytical purposes by year. The data was compiled by searching the keywords “Smartphone analytical determinations” in the Google Scholar Research Gate. The graph shows a significant increase in the published articles in the last twelve years.
Figure 1. The self-developed graph shows the number of publications related to the use of smartphones for analytical purposes by year. The data was compiled by searching the keywords “Smartphone analytical determinations” in the Google Scholar Research Gate. The graph shows a significant increase in the published articles in the last twelve years.
Biosensors 12 00341 g001
Figure 2. Scheme of the color measurement system used for this article. First, the LED strip is accommodated inside the light box. Second, the complementary piece is mounted on the upper part of the light box. Finally, the color sample is placed behind the light box and the photography is taken with the smartphone.
Figure 2. Scheme of the color measurement system used for this article. First, the LED strip is accommodated inside the light box. Second, the complementary piece is mounted on the upper part of the light box. Finally, the color sample is placed behind the light box and the photography is taken with the smartphone.
Biosensors 12 00341 g002
Figure 3. Flowchart for the correction of color samples. The methodology is based on a four-step process: (1) Initial evaluation of the color samples using CIE∆E2000, (2) Correction matrices generation with the Python-based software, (3) Color calibration by applying the matrices generated to the color samples, (4) Application of the methodology and matrices in real samples.
Figure 3. Flowchart for the correction of color samples. The methodology is based on a four-step process: (1) Initial evaluation of the color samples using CIE∆E2000, (2) Correction matrices generation with the Python-based software, (3) Color calibration by applying the matrices generated to the color samples, (4) Application of the methodology and matrices in real samples.
Biosensors 12 00341 g003
Figure 4. Normalized spectral power distribution of four different illuminants with respect to their maximum wavelength. The individual spectral power distribution of the illuminants is compared with the D50 Illuminant represented at the back of the graphic.
Figure 4. Normalized spectral power distribution of four different illuminants with respect to their maximum wavelength. The individual spectral power distribution of the illuminants is compared with the D50 Illuminant represented at the back of the graphic.
Biosensors 12 00341 g004
Figure 5. Box and Whisker plot of 5 RAL samples chosen randomly, associated with their RGB values. The lighter colors are the RGB values before the correction and the darker ones are after the correction. (a) Red channel values of five samples before/after the correction. (b) Green channel values of five samples before/after the correction. (c) Blue channel values of five samples before/after the correction.
Figure 5. Box and Whisker plot of 5 RAL samples chosen randomly, associated with their RGB values. The lighter colors are the RGB values before the correction and the darker ones are after the correction. (a) Red channel values of five samples before/after the correction. (b) Green channel values of five samples before/after the correction. (c) Blue channel values of five samples before/after the correction.
Biosensors 12 00341 g005
Figure 6. Calibration of 12 solutions of different concentrations of peroxide hydrogen. The plot was adjusted to a second-degree polynomial equation.
Figure 6. Calibration of 12 solutions of different concentrations of peroxide hydrogen. The plot was adjusted to a second-degree polynomial equation.
Biosensors 12 00341 g006
Figure 7. pH calibration of 12 solutions in the range of 2 to 14 in pH. This plot shows the color transition for the PanReac AppliChem®pH strips between the pH values measured with the Xiaomi Redmi 6A Smartphone.
Figure 7. pH calibration of 12 solutions in the range of 2 to 14 in pH. This plot shows the color transition for the PanReac AppliChem®pH strips between the pH values measured with the Xiaomi Redmi 6A Smartphone.
Biosensors 12 00341 g007
Figure 8. pH measurements with a Xiaomi Redmi 6A Smartphone. (a) Logistic function of the color measurements. (b) Linearized form of the logistic function for the color measurements. For the best-linearized fit, the values of pH 2, 3, 4, and 14 were discarded.
Figure 8. pH measurements with a Xiaomi Redmi 6A Smartphone. (a) Logistic function of the color measurements. (b) Linearized form of the logistic function for the color measurements. For the best-linearized fit, the values of pH 2, 3, 4, and 14 were discarded.
Biosensors 12 00341 g008
Table 1. Evaluation of 55 RAL color samples with the CIE∆E2000 (2:1:1) criterion, CI (95%).
Table 1. Evaluation of 55 RAL color samples with the CIE∆E2000 (2:1:1) criterion, CI (95%).
Without Correction∆L∆a∆b∆E2000
Mean7.82 ± 0.8111.27 ± 1.518.18 ± 1.436.88 ± 0.45
With Correction∆L∆a∆b∆E2000
Mean1.31 ± 0.291.99 ± 0.362.25 ± 0.391.95 ± 0.24
Table 2. Evaluation of 55 RAL color samples with the CIE∆E2000 (2:1:1) criterion using different illuminants, CI (95%).
Table 2. Evaluation of 55 RAL color samples with the CIE∆E2000 (2:1:1) criterion using different illuminants, CI (95%).
IlluminantWithout Correction∆L∆a∆b∆E2000
EGLO RGB LED StripMean10.93 ± 1.385.03 ± 1.2024.48 ± 2.9415.87 ± 2.19
Philips Genie Esaver Bulp5.34 ± 1.1310.10 ± 2.0227.76 ± 3.2413.30 ± 1.35
Philips Master TL-D Fluorescent6.08 ± 1.114.63 ± 0.8314.00 ± 1.588.33 ± 0.78
YJHSMY White LED Strip5.83 ± 0.999.97 ± 1.669.77 ± 1.506.65 ± 0.58
IlluminantWith Correction∆L∆a∆b∆E2000
EGLO RGB LED StripMean3.86 ± 0.673.56 ± 0.813.67 ± 0.764.12 ± 0.53
Philips Genie Esaver Bulp2.29 ± 0.432.47 ± 0.635.32 ± 1.043.76 ± 0.56
Philips Master TL-D Fluorescent2.90 ± 0.582.79 ± 0.773.02 ± 0.752.98 ± 0.45
YJHSMY White LED Strip2.35 ± 0.462.44 ± 0.582.63 ± 0.542.61 ± 0.27
Table 3. Standards deviation mean of the RGB channels between devices that have controlled and non-controlled lighting conditions (n = 55).
Table 3. Standards deviation mean of the RGB channels between devices that have controlled and non-controlled lighting conditions (n = 55).
DeviceLighting ConditionsRSDGSDBSD
Xiaomi Redmi 6ANon-controlled3.683.753.93
HP Scanjet G2410Controlled1.911.891.94
Table 4. Standards deviation mean of the RGB channels of a Xiaomi Redmi 6A Smartphone using/not using a light box, (n = 55).
Table 4. Standards deviation mean of the RGB channels of a Xiaomi Redmi 6A Smartphone using/not using a light box, (n = 55).
DeviceLighting ConditionsRSDGSDBSD
Xiaomi Redmi 6ANon-controlled3.683.753.93
Controlled1.171.101.33
Table 5. Evaluation of 55 RAL color samples with the CIE∆E2000 (2:1:1) criterion using/not using a Light Box, CI (95%).
Table 5. Evaluation of 55 RAL color samples with the CIE∆E2000 (2:1:1) criterion using/not using a Light Box, CI (95%).
Without Correction∆L∆a∆b∆E2000
Without Light Box5.83 ± 0.999.97 ± 1.669.77 ± 1.506.65 ± 0.58
With Light Box5.52 ± 0.988.01 ± 1.447.25 ± 1.385.82 ± 0.46
With Correction∆L∆a∆b∆E2000
Without Light Box2.35 ± 0.462.44 ± 0.582.63 ± 0.542.61 ± 0.27
With Light Box1.90 ± 0.382.05 ± 0.461.93 ± 0.402.01 ± 0.22
Table 6. Evaluation of 10 color samples with three different smartphones. Comparison and matching on the RAL Chart with correction (WC) and without correction (WOC).
Table 6. Evaluation of 10 color samples with three different smartphones. Comparison and matching on the RAL Chart with correction (WC) and without correction (WOC).
SmartphoneNº SampleReferenceWOCMatchWCMatch
Xiaomi Redmi 6A1RAL 1018RAL 1016NoRAL 1032No
2RAL 2008RAL 2011NoRAL 2008Yes
3RAL 3016RAL 3020NoRAL 3020No
4RAL 4011RAL 4005NoRAL 4011Yes
5RAL 5007RAL 5002NoRAL 5023No
6RAL 6010RAL 6037NoRAL 6010Yes
7RAL 7001RAL 7033NoRAL 7030No
8RAL 8025RAL 8028NoRAL 8025Yes
9RAL 9010RAL 9002NoRAL 9010Yes
10RAL 9017RAL 9005NoRAL 9005No
Xiaomi Redmi 4A1RAL 1018RAL 1016NoRAL 1032No
2RAL 2008RAL 2011NoRAL 2008Yes
3RAL 3016RAL 3013NoRAL 3000No
4RAL 4011RAL 4011YesRAL 4011Yes
5RAL 5007RAL 5000NoRAL 5023No
6RAL 6010RAL 6002NoRAL 6010Yes
7RAL 7001RAL 7046NoRAL 7042No
8RAL 8025RAL 8028NoRAL 8025Yes
9RAL 9010RAL 7047NoRAL 9001No
10RAL 9017RAL 9005NoRAL 9011No
iPhone SE1RAL 1018RAL 1016NoRAL 1032No
2RAL 2008RAL 1033NoRAL 2008Yes
3RAL 3016RAL 2002NoRAL 3000No
4RAL 4011RAL 4008NoRAL 4011Yes
5RAL 5007RAL 5002NoRAL 5007Yes
6RAL 6010RAL 6017NoRAL 6010Yes
7RAL 7001RAL 7045NoRAL 7042No
8RAL 8025RAL 8025YesRAL 8025Yes
9RAL 9010RAL 9001NoRAL 9002No
10RAL 9017RAL 9005NoRAL 9005No
Table 7. Evaluation of five solutions of different concentrations of H2O2 (n = 3) with three different devices with correction (WC) and without correction (WOC).
Table 7. Evaluation of five solutions of different concentrations of H2O2 (n = 3) with three different devices with correction (WC) and without correction (WOC).
SmartphoneNº SampleReal [H2O2]
(mg/L)
WOC
(mg/L)
WC
(mg/L)
Relative Error
WOC (%)
Relative Error
WC (%)
Xiaomi Redmi 6A11.363.60 ± 0.191.69 ± 0.13164.8924.08
27.8211.47 ± 0.368.88 ± 0.3046.7913.56
313.621.22 ± 0.7216.81 ± 0.5956.0623.65
420.4N/A21.29 ± 0.47N/A4.37
Xiaomi Mi A211.362.35 ± 0.061.95 ± 0.0773.2743.47
27.829.30 ± 0.278.92 ± 0.4219.0214.09
313.618.00 ± 0.3416.96 ± 0.1732.3824.76
420.4N/A21.32 ± 0.47N/A4.54
iPhone 811.362.53 ± 0.131.75 ± 0.1586.2829.06
27.829.91 ± 0.218.84 ± 0.1826.7513.11
313.618.98 ± 0.3216.97 ± 0.2039.5624.77
420.425.54 ± 1.1021.21 ± 0.5325.193.99
Table 8. RGB Values of the Xiaomi Redmi 6A measurements. Range of measurement: pH 2–14.
Table 8. RGB Values of the Xiaomi Redmi 6A measurements. Range of measurement: pH 2–14.
pHColorCorrected RGB
(Xiaomi Redmi 6A)
2 204,93,68
3 (230,118,57) 1
4 (238,124,58) 1
5 (247,134,61) 1
6 (249,149,65) 1
7 (246,162,68) 1
8 (202,157,64) 1
9 152,134,71
10 83,105,70
11 76,100,76
12 74,95,80
13 65,85,75
14 57,67,68
1 These measurements had a value of 0 in the blue channel before the correction so they have an initial error associated.
Table 9. Evaluation of four sample buffers (n = 3) of different pH with three different devices, the data are shown with and without the correction method applied (WC, WOC), CI 95%.
Table 9. Evaluation of four sample buffers (n = 3) of different pH with three different devices, the data are shown with and without the correction method applied (WC, WOC), CI 95%.
SmartphoneNº SampleReal pHWOC pHWC pHRelative Error
WOC (%)
Relative Error
WC (%)
Xiaomi Redmi 6A17.356.62 ± 0.237.28 ± 0.119.890.84
28.748.98 ± 0.038.76 ± 0.052.810.24
39.839.99 ± 0.229.85 ± 0.141.700.30
45.11N/A5.87 ± 0.24N/A14.94
Xiaomi Redmi 5 Plus17.358.07 ± 0.027.27 ± 0.039.871.09
28.749.15 ± 0.048.91 ± 0.044.762.06
39.839.91 ± 0.159.80 ± 0.100.850.32
45.117.40 ± 0.025.63 ± 0.3344.8010.17
Huawei P30 Lite17.357.14 ± 0.087.23 ± 0.062.771.57
28.749.03 ± 0.148.93 ± 0.143.362.26
39.839.60 ± 0.049.83 ± 0.062.250.03
45.11N/A5.91 ± 0.12N/A15.79
Publisher’s Note: MDPI stays neutral with regard to jurisdictional claims in published maps and institutional affiliations.

Share and Cite

MDPI and ACS Style

Cebrián, P.; Pérez-Sienes, L.; Sanz-Vicente, I.; López-Molinero, Á.; de Marcos, S.; Galbán, J. Solving Color Reproducibility between Digital Devices: A Robust Approach of Smartphones Color Management for Chemical (Bio)Sensors. Biosensors 2022, 12, 341. https://doi.org/10.3390/bios12050341

AMA Style

Cebrián P, Pérez-Sienes L, Sanz-Vicente I, López-Molinero Á, de Marcos S, Galbán J. Solving Color Reproducibility between Digital Devices: A Robust Approach of Smartphones Color Management for Chemical (Bio)Sensors. Biosensors. 2022; 12(5):341. https://doi.org/10.3390/bios12050341

Chicago/Turabian Style

Cebrián, Pablo, Leticia Pérez-Sienes, Isabel Sanz-Vicente, Ángel López-Molinero, Susana de Marcos, and Javier Galbán. 2022. "Solving Color Reproducibility between Digital Devices: A Robust Approach of Smartphones Color Management for Chemical (Bio)Sensors" Biosensors 12, no. 5: 341. https://doi.org/10.3390/bios12050341

Note that from the first issue of 2016, this journal uses article numbers instead of page numbers. See further details here.

Article Metrics

Back to TopTop