Next Article in Journal
Enabling the ActiGraph GT9X Link’s Idle Sleep Mode and Inertial Measurement Unit Settings Directly Impacts Data Acquisition
Previous Article in Journal
Optimized Replication of ADC-Based Particle Counting Algorithm with Reconfigurable Multi-Variables in Pseudo-Supervised Digital Twining of Reference Dust Sensor Systems
Previous Article in Special Issue
A Real-Time Detection Device for the Rapid Quantification of Skin Casual Sebum Using the Oil Red O Staining Method
 
 
Font Type:
Arial Georgia Verdana
Font Size:
Aa Aa Aa
Line Spacing:
Column Width:
Background:
Communication

Smartphone-Enabled Colorimetry

by
Leonardo Ciaccheri
*,
Barbara Adinolfi
,
Andrea Azelio Mencaglia
and
Anna Grazia Mignani
CNR—Istituto di Fisica Applicata “Nello Carrara”, 50019 Sesto Fiorentino, FI, Italy
*
Author to whom correspondence should be addressed.
Sensors 2023, 23(12), 5559; https://doi.org/10.3390/s23125559
Submission received: 3 May 2023 / Revised: 1 June 2023 / Accepted: 3 June 2023 / Published: 14 June 2023
(This article belongs to the Special Issue Colorimetric Sensors)

Abstract

:
A smartphone is used as a colorimeter. The performance characterization for colorimetry is presented using both the built-in camera and a clip-on dispersive grating. Certified colorimetric samples provided by Labsphere® are considered as test samples. Color measurements directly performed utilizing the smartphone camera only are obtained using the RGB Detector app, downloaded from the Google Play Store. More precise measurements are achieved using the commercially available GoSpectro grating and related app. In both cases, to quantify the reliability and sensitivity of smartphone-based color measurements, the CIELab color difference ΔE between the certified and smartphone-measured colors is calculated and is reported in this paper. In addition, as an example of a practical application of interest for the textile industry, several samples of cloth fabrics with a palette of the most common colors are measured, and the comparison with the certified color values is presented.

1. Introduction

1.1. Why Use a Smartphone for Colorimetry?

The ubiquitous and exponentially increasing use of smartphones has inspired a wide community of scientists to use them as platforms for analytics based on colorimetry. In fact, there are several advantages offered by a smartphone-enabled colorimeter, such as: (i) portability—smartphones are small, lightweight portable devices that can be easily carried around for on-the-go fieldwork or outdoor measurements; (ii) cost-effectiveness—that makes colorimetry accessible to a wider range of users who may not have the budget for specialized equipment; (iii) a high-quality camera that can capture images with high resolution and a good color accuracy—this makes them suitable for capturing and analyzing color values, particularly for applications where a high level of detail is required; (iv) easy to use: smartphones are user-friendly, and most people already know how to operate them; (v) integration with other features such as internet connectivity, GPS, and voice recording—these options can be easily integrated with colorimetric measurements, for example, to automatically save location data with each measurement, or to record voice notes or images alongside the results.
Indeed, the most important feature of the smartphone for colorimetry is that it has a built-in white LED light and a digital camera. Hence, by simply shining the LED light on a sample and detecting the reflected light, it is possible to achieve a good colorimetric assessment. More precise colorimetric measurements can be achieved by adding in front of the camera a dispersive grating while using the smartphone camera as a detector.
Recently, several reviews and their references showed the state of the art of smartphone-based colorimeters used as a general spectrophotometer for analytical chemistry and biochemistry [1,2,3,4,5,6], or modified for the readout of biosensors either for healthcare [7,8,9], including paper-based transducers [10], microfluidic devices for point-of-care applications [11,12,13], immunosensors for personalized medicine [14], and for food quality and safety monitoring [15,16], for the detection of hazardous substances [17], and for environmental applications [18,19].

1.2. Scope of This Paper

While colorimetry by smartphones has its benefits, it is important to note that the accuracy of measurements may not be as high as that of specialized equipment. The scope of this paper is to assess to what extent the colorimetric performance of a smartphone can be improved by using a clip-on dispersive grating. For this purpose, we selected as test samples certified color tiles, and we characterized the smartphone colorimeter in two cases:
  • using the built-in white LED and camera as a source and detector, respectively, and
  • using a dispersive grating clipped onto the camera for more precise measurements.
In both cases, the colorimetric coordinates obtained by the smartphone are compared with the certified values to evaluate the measurement precision and the color resolution. Additionally, as a practical example which is of interest for quality control in the textile industry, some cloth fabrics with the most common colors are measured, and the comparison with the previously certified color coordinates are given.

2. Materials and Methods

2.1. Samples for Color Measurements

Eight colorimetric tiles certified by Labsphere® were considered as test samples, with the following colors: violet, purple, blue, cyan, green, yellow, orange, and red. Moreover, twelve samples of cloth fabrics with a palette of the most common colors were considered as test samples for a straightforward application in the textile industry. In fact, to optimize the use of pigments and their mixture, the textile industry frequently needs a quick color check during the dyeing process. In addition, fashion stylists like to communicate to the dying industry the colors they occasionally see, and a smartphone grabbing of the selected color then converted to chromatic coordinates by an app is a quick and effective method.
All measured tiles and cloth fabrics are shown in Figure 1 while Table 1 mentions the short codes we used for their identification. A Spectralon tile was used as a reference for all color measurements. The certified spectra of tiles were available from Labsphere®, and the cloth fabrics were previously certified by means of conventional spectrophotometric measurements. In practice, the reference tristimulus coordinates XYZ were available for all samples so that it was possible to compare the smartphone-measured values with the certified ones.

2.2. Setups for Color Measurements

Figure 2 shows the setups used for reflection measurements, making use of the smartphone camera alone, or equipped by the commercially available clip-on GoSpectro grating [20]. This small component costs about EUR 400. The smartphone is a Huawei “P smart 2019” model, operated by Android 12. A 3D-printed plastic case is used to hold the smartphone with the same sample–smartphone distance during the color measurements, also allowing us to use the touch screen for operation.

2.3. Colorimetric Characterization

When the reflection measurements were carried out by using the smartphone camera alone, the red, green, and blue outputs of the video camera were converted into RGB coordinates by the RGB Detector app, downloaded from the Google Play Store. This app is supposed to have auto-calibrating capability, providing RGB coordinates independently of the model of camera used. They were then transformed into tristimulus XYZ coordinates by means of a conversion matrix shown in Equation (1) (conversion coefficients rounded up to the third decimal digit) [21].
Instead, for reflection measurements carried out using the GoSpectro grating, the column of CCD array on which the light was focused determined the wavelength. The wavelength scale was calibrated by using the spectral lines of a fluorescent lamp, and the red, green, and blue outputs of the whole CCD column were summed up to obtain the corresponding intensity. The XYZ tristimulus coordinates were obtained from the reflectance spectra by Equation (2).
[ X Y Z ] = [ 0.412 0.358 0.180 0.213 0.715 0.072 0.019 0.119 0.950 ]   [ R G B ]
X = K   780 380 L ( λ )   x ( λ )   d λ Y = K     780 380 L ( λ )   y ( λ )   d λ Z = K   780 380 L ( λ )   z ( λ )   d λ
where x(λ), y(λ), and z(λ) are the CIE color functions for calculating the tristimulus coordinates, and L(λ) is the luminance spectrum given by Equation (3):
L ( λ ) = T ( λ )   L D 65 ( λ )
being T the transmittance (reflectance) spectrum, and LD65 the luminance spectrum of D65 standard illuminance. D65 illuminant is a theoretical standard illuminant spectrum used by the Commission Internationale de l’Éclairage (CIE), which corresponds roughly to the midday light in Western/Northern Europe under a clear sky. Real sources can only approximate to the D65 spectrum. This is the reason why reflectance spectra (which only depend on samples) are used for calculating tristimulus coordinates. The spectrum of D65 and the color functions can be downloaded from the CIE website [22]. The K constant is calculated so that Y = 100 for the white Spectralon reference. Because the transmittance spectrum is calculated as the ratio between sample and reference spectra, it is independent of camera characteristics.
For both setups, all measurements were performed five times and the average and standard deviations were calculated.
Finally, in both cases, by considering the average values of the measurements, the CIELab coordinates L* (clarity), a* (red–green balance), b* (blue–yellow balance) were calculated by formulas in Equation (4).
L * = 116   ( Y Y n ) 1 / 3 16
a * = 500   [ ( X X n ) 1 / 3 ( Y Y n ) 1 / 3 ] b * = 500   [ ( Y Y n ) 1 / 3 ( Z Z n ) 1 / 3 ]
Equation (4) gives the nonlinear transformation equation from the tristimulus to CIELab 1976 color space, in accordance with CIE directives [22]. The color differences ΔE were computed by Equations (5) and (6):
Δ E * = ( Δ L * 2 + Δ a * 2 + Δ b * 2 ) 1 / 2
Δ L * = L 2 * L 1 * Δ a * = a 2 * a 1 * Δ b * = b 2 * b 1 *
being ( L 1 * ,   a 1 * ,   b 1 * ) and ( L 2 * ,   a 2 * ,   b 2 * ) the CIELab vectors of the reference and measured colors, respectively. Additionally, the resolution of the color measurements, δE*, was computed as Equation (7):
δ E * = (   δ L * 2 + δ a * 2 + δ b * 2   ) 1 / 2
where δL*, δa*, and δb* are three times the standard deviations of L*, a*, and b*.

3. Results and Discussion

Figure 3 shows the spectra of tiles and cloth fabrics measured using the GoSpectro grating, and Table 2 summarizes the results achieved. As expected, the best results were obtained by using the grating. However, when we also used the smartphone camera alone, acceptable results were obtained, especially considering that simply using the smartphone gives us a very basic measurement, and that in many cases a quick color evaluation is more than sufficient. When we used the grating, yellow and cyan tiles showed the smallest color differences, while the biggest differences were for purple and red tiles.
The main reason why the smartphone camera alone provided worse results is that the RGB to XYZ conversion matrix requires the RGB measurement to be made by using a standard D65 illuminant, which is usually not the case. On the contrary, the measurements achieved by using the GoSpectro grating do not suffer from this problem because the reflectance spectrum does not depend on the light source. Multiplying this reflectance spectrum by the spectrum of the D65 illuminant, which can be downloaded from the CIE website (together with XYZ functions), we can calculate the correct tristimulus coordinates.
A source of error when using the GoSpectro grating comes from the fact that the 380–400 nm and 700–780 nm bands are not adequately covered by the CCD detectors. The pixels of the smartphone camera are coated by band–pass filters for the red, green, and blue bands. The transmittance of these filters drastically drops outside the 400–700 nm band, as it appears in the spectra of Figure 3. However, this should not be the main cause because the tristimulus functions have little weights in these bands. Another error could be caused by the white reference spectrum. In fact, if it does not have a truly flat spectrum, it could distort the reflectance spectrum. Moreover, an excessive illumination could bring some parts of the CCD array close to saturation, determining a nonlinear response. This problem affects both the GoSpectro and the RGB Detector apps. Further studies are currently ongoing on this point.

4. Conclusions

A smartphone was used for colorimetry, using the built-in camera only, and by means of a commercially available clip-on grating. Certified color standards and cloth fabrics were measured, and the color differences with respect to the certified values were presented.
Although measurements with the same precision as a spectrophotometer could not be achieved, surely noteworthy is the importance of having in the pocket an instrument that allows us to obtain a good colorimetric assessment in practice at no cost. Indeed, using a smartphone for colorimetry opens up new solutions for a wide class of problems in many industrial, environmental, and agricultural applications as well as for artisans and consumers who need to obtain quick information on the composition or nature of various materials: varnishes, dyes, bricolage, and many others.
In addition, because almost everyone has a smartphone in their pocket, colorimetric-based measurements enable new applications in citizen science. Indeed, the participation of the population in scientific experiments is expected to grow in the coming years, and simple tools are required by the community for data collection and volunteer mapping. A straightforward example could be the data collection for marine and environmental research addressed at the protection of the ecosystem by means of an integrated and synergic scientist–citizen action. Particularly for these applications where the interest of the population is high, spectroscopy by smartphones is an open field for exploring new types of measurement campaigns, while also influencing and driving the environmental policies of the future.

Author Contributions

Conceptualization, L.C. and A.G.M.; methodology, L.C., B.A. and A.G.M.; experimental, L.C., B.A. and A.A.M.; formal analysis, L.C.; writing: all authors equally contributed to drafting and writing. All authors have read and agreed to the published version of the manuscript.

Funding

This research received no external funding.

Data Availability Statement

All data can be obtained from corresponding author at request.

Acknowledgments

The textile division of Beste Group (https://beste.it/en/fabric/beste, accessed on 1 April 2023) is acknowledged for providing the samples of cloth fabrics and their reference colorimetric data.

Conflicts of Interest

The authors declare no conflict of interest.

References

  1. 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]
  2. Alawi, T.; Proietti Mattia, G.; Al-Bawi, Z.; Beraldi, R. Smartphone-based colorimetric sensor application for measuring biochemical material concentration. Sens. Bio.-Sens. Res. 2021, 32, 100404. [Google Scholar] [CrossRef]
  3. Di Nonno, S.; Ulber, R. Smartphone-based optical analysis systems. Analyst 2021, 146, 2749–2768. [Google Scholar] [CrossRef] [PubMed]
  4. Martins Fernandes, G.; Silva, W.R.; Nunes Barreto, D.; Lamarca, R.S.; Lima Gomes, P.C.F.; da S Petruci, J.F.; Batista, A.D. Novel approaches for colorimetric measurements in analytical chemistry—A review. Anal. Chim. Acta 2020, 1135, 187–203. [Google Scholar] [CrossRef] [PubMed]
  5. Rezazadeh, M.; Seidi, S.; Lid, M.; Pedersen-Bjergaard, S.; Yamini, Y. The modern role of smartphones in analytical chemistry. TrAC Trends Anal. Chem. 2019, 118, 548–555. [Google Scholar] [CrossRef]
  6. Azzazy, H.M.E.; Elbehery, A.H.A. Clinical laboratory data: Acquire, analyze, communicate, liberate. Clin. Chim. Acta 2015, 438, 186–194. [Google Scholar] [CrossRef] [PubMed]
  7. Chen, W.; Yao, Y.; Chen, T.; Shen, W.; Tang, S.; Lee, H.K. Application of smartphone-based spectroscopy to biosample analysis: A review. Biosens. Bioelectron. 2021, 172, 112788. [Google Scholar] [CrossRef] [PubMed]
  8. Pham, A.T.T.; Wallace, A.; Zhang, X.; Tohl, D.; Fu, H.; Chuah, C.; Reynolds, K.J.; Ramsey, C.; Tang, Y. Optical-based biosensors and their portable healthcare devices for detecting and monitoring biomarkers in body fluids. Diagnostics 2021, 11, 1285. [Google Scholar] [CrossRef] [PubMed]
  9. Balbach, S.; Jiang, N.; Moreddu, R.; Dong, X.; Kurz, W.; Wang, C.; Dong, J.; Yin, Y.; Butt, H.; Brischwein, M.; et al. Smartphone-based colorimetric detection system for portable health tracking. Anal. Methods 2021, 13, 4361–4369. [Google Scholar] [CrossRef] [PubMed]
  10. Karim, K.; Amine, A. Paper-based optical sensors paired with smartphones for biomedical analysis. J. Pharm. Biomed. Anal. 2023, 225, 115207. [Google Scholar] [CrossRef] [PubMed]
  11. Xing, G.; Ai, J.; Wang, N.; Pu, Q. Recent progress of smartphone-assisted microfluidic sensors for point of care testing. TrAC Trends Anal. Chem. 2022, 157, 116792. [Google Scholar] [CrossRef]
  12. Dutta, S. Point of care sensing and biosensing using ambient light sensor of smartphone: Critical review. TrAC Trends Anal. Chem. 2019, 110, 393–400. [Google Scholar] [CrossRef]
  13. Ong, D.S.Y.; Poljak, M. Smartphones as mobile microbiological laboratories. Clin. Microbiol. Infect. 2020, 26, 421–424. [Google Scholar] [CrossRef] [PubMed]
  14. Kholazad-Kordasht, H.; Hasanzadeh, M.; Seidi, F. Smartphone based immunosensors as next generation of healthcare tools: Technical and analytical overview towards improvement of personalized medicine. TrAC Trends Anal. Chem. 2021, 145, 116455. [Google Scholar] [CrossRef]
  15. Abdelbasset, W.K.; Savina, S.V.; Mavalaru, D.; Shichiyakh, R.A.; Bokov, D.O.; Musfata, Y.F. Smartphone based aptasensors as intelligent biodevice for food contamination detection in food and soil samples: Recent advances. Talanta 2023, 252, 123769. [Google Scholar] [CrossRef] [PubMed]
  16. Nelis, J.L.D.; Tsagkaris, A.S.; Dillon, M.J.; Hajslova, J.; Elliott, C.T. Smartphone-based optical assays in the food safety field. TrAC Trends Anal. Chem. 2020, 129, 115934. [Google Scholar] [CrossRef] [PubMed]
  17. Kangas, M.J.; Burks, R.M.; Atwater, J.; Lukowicz, R.M.; Williams, P.; Holmes, A.E. Colorimetric sensor arrays for the detection and identification of chemical weapons and explosives. Crit. Rev. Anal. Chem. 2016, 47, 138–153. [Google Scholar] [CrossRef] [PubMed] [Green Version]
  18. Chen, Z.; Zhang, Z.; Qi, J.; You, J.; Ma, J.; Chen, L. Colorimetric detection of heavy metal ions with various chromogenic materials: Strategies and applications. J. Hazard. Mater. 2023, 441, 129889. [Google Scholar] [CrossRef] [PubMed]
  19. Zhao, T.; Liang, X.; Guo, X.; Yang, X.; Guo, J.; Zhou, X.; Huang, X.; Zhang, W.; Wang, Y.; Liu, Z.; et al. Smartphone-based colorimetric sensor array using gold nanoparticles for rapid distinguishment of multiple pesticides in real samples. Food Chem. 2023, 404, 134768. [Google Scholar] [CrossRef] [PubMed]
  20. GoSpectro. Available online: https://gospectro.eu/gospectro-2/ (accessed on 20 April 2023).
  21. Ocean Optics Web Book. Available online: https://www.oceanopticsbook.info/view/photometry-and-visibility/from-xyz-to-rgb (accessed on 20 April 2023).
  22. International Commission on Illumination. Available online: https://cie.co.at/node/2 (accessed on 20 April 2023).
Figure 1. Test samples: LabSphere® color standards (left), and cloth fabrics (right).
Figure 1. Test samples: LabSphere® color standards (left), and cloth fabrics (right).
Sensors 23 05559 g001
Figure 2. Setups for color measurements: using the smartphone alone (left), the clip-on grating (center), and the GoSpectro grating (right).
Figure 2. Setups for color measurements: using the smartphone alone (left), the clip-on grating (center), and the GoSpectro grating (right).
Sensors 23 05559 g002
Figure 3. Spectra of tiles (left), and cloth fabrics (right) measured using the GoSpectro grating.
Figure 3. Spectra of tiles (left), and cloth fabrics (right) measured using the GoSpectro grating.
Sensors 23 05559 g003
Table 1. Short codes identifying color samples.
Table 1. Short codes identifying color samples.
Color StandardsCodeColor FabricsCode
RedRDDark RedDR
GreenGNDark OrangeOR
BlueBLMustardMU
YellowYWGreenGR
CyanCYElectric BlueEB
OrangeORDark PinkDP
PurplePUBrick RedBR
VioletVIBrownBW
TortoraTO
BlueBL
BlackBK
Light BeigeLB
Table 2. Differences between certified and smartphone-based color measurements.
Table 2. Differences between certified and smartphone-based color measurements.
TilesCloth Fabrics
Code-ColorRGBGoSpectroCode-ColorRGBGoSpectro
ΔE* δE* ΔE* δE* ΔE* δE* ΔE* δE*
RD-Red858.0331.1BK-Black795.1261.8
GN-Green853.3281.1BL-Blue755.7380.5
BL-Blue864.0310.9BR-Brick Red775.4431.5
YW-Yellow713.2101.0BW-Brown658.1361.2
CY-Cyan783.0170.8DP-Dark Pink704.3412.2
OR-Orange696.3260.5DR-Dark Red7415.0391.4
PU-Purple943.6391.5EB-Electric Blue688.8461.2
VI-Violet908.4260.9GR-Green7310.0431.7
LB-Light Blue673.3392.2
MU-Mustard6242.0560.8
OR-Dark Orange7122.0531.9
TO-Tortora735.3421.9
Mean82.25.026.21.0 71.211.241.81.5
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content.

Share and Cite

MDPI and ACS Style

Ciaccheri, L.; Adinolfi, B.; Mencaglia, A.A.; Mignani, A.G. Smartphone-Enabled Colorimetry. Sensors 2023, 23, 5559. https://doi.org/10.3390/s23125559

AMA Style

Ciaccheri L, Adinolfi B, Mencaglia AA, Mignani AG. Smartphone-Enabled Colorimetry. Sensors. 2023; 23(12):5559. https://doi.org/10.3390/s23125559

Chicago/Turabian Style

Ciaccheri, Leonardo, Barbara Adinolfi, Andrea Azelio Mencaglia, and Anna Grazia Mignani. 2023. "Smartphone-Enabled Colorimetry" Sensors 23, no. 12: 5559. https://doi.org/10.3390/s23125559

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