Skip to main content
Digital Health logoLink to Digital Health
. 2023 Aug 30;9:20552076231197961. doi: 10.1177/20552076231197961

Accuracy of smartphone camera urine photo colorimetry as indicators of dehydration

Aida Bustam 1, Khadijah Poh 1, Siew Shuin Soo 1, Fathmath Sausan Naseem 1, Mohd Hafyzuddin Md Yusuf 1, Naseeha Ubaidi Hishamudin 2, Muhaimin Noor Azhar 1,
PMCID: PMC10474791  PMID: 37662675

Abstract

Objective

Direct urine color assessment has been shown to correlate with hydration status. However, this method is subject to inter- and intra-observer variability. Digital image colorimetry provides a more objective method. This study evaluated the diagnostic accuracy of urine photo colorimetry using different smartphones under different lighting conditions, and determined the optimal cut-off value to predict clinical dehydration.

Methods

The urine samples were photographed in a customized photo box, under five simulated lighting conditions, using five smartphones. The images were analyzed using Adobe Photoshop to obtain Red, Green, and Blue (RGB) values. The correlation between RGB values and urine laboratory parameters were determined. The optimal cut-off value to predict dehydration was determined using area under the receiver operating characteristic curve.

Results

A total of 56 patients were included in the data analysis. Images captured using five different smartphones under five lighting conditions produced a dataset of 1400 images. The study found a statistically significant correlation between Blue and Green values with urine osmolality, sodium, urine specific gravity, protein, and ketones. The diagnostic accuracy of the Blue value for predicting dehydration were “good” to “excellent” across all phones under all lighting conditions with sensitivity >90% at cut-off Blue value of 170.

Conclusions

Smartphone-based urine colorimetry is a highly sensitive tool in predicting dehydration.

Keywords: Urine colorimetry, smartphone, diagnostic accuracy, dehydration, RGB, dengue, urinalysis, mHealth, eHealth

Introduction

The advancement in mobile technology in the recent years has motivated researchers to take advantage of using smart phones and mobile health applications to improve healthcare for patients.13 One such potential smartphone application is in monitoring patient hydration status. Dehydration occurs in a myriad of clinical conditions and is associated with the clinical prognosis and outcome of patients. Detection of dehydration typically involves a thorough assessment in a clinical facility with laboratory tests. Obtaining blood samples to test for the biomarkers of hydration such as blood hematocrit and plasma osmolality requires venepuncture, and laboratory analysis has a long turnaround time. Urine samples, on the other hand, are easier to collect, and urine biomarkers such as specific gravity (USG) and osmolality (uOsm) have been shown to correlate with clinical dehydration.49

Urine color is determined by the concentration of the urinary pigment urobilin which varies according to the degree of dehydration.5,10 Analysis of urine color to detect dehydration can be performed by matching the urine color, or urine dipstick reagent strips against a urine color chart using direct visualization. These techniques produce rapid results but may be subject to inter- and intra-observer variability. 7 A more objective method to perform color assessment of urine is through analysing digital photos captured using readily available smartphone cameras.

Several studies have demonstrated the concept of using digital image-based colorimetry as an alternative to lab-based analysis.1113 Recently, Chew et al. 14 demonstrated strong correlation between the hydration status of dengue patients and colorimetry on urine images captured by a smartphone camera using the Red, Green, Blue (RGB) color coding, making it a potentially useful home assessment tool. The RGB color space is one of the most common and accurate system used to represent colors in digital images including on smartphones. 15 However, smartphone images undergo device-dependant algorithms to encode and improve the aesthetic results while compressing the image to optimize file size. 16 These processes may introduce variabilities in the representation of color values in images thus affecting the ability of the smartphone camera to provide consistent RGB values in urine colorimetry. Furthermore, ambient lighting conditions may also affect the RGB values measured by the smartphone cameras due to lighting and color casts.

To our knowledge, there are no studies comparing the diagnostic accuracy of urine colorimetry in predicting dehydration using different smartphones under different lighting conditions. This study aims to investigate the correlation of urine colorimetry using different smartphones under various lighting conditions with urinary laboratory indices and determine the optimal cut-off value to predict clinical dehydration.

Methods

Study design and setting

This was a prospective observational study conducted from October 2021 to January 2022 at the Emergency Department of a tertiary medical center. The Medical Research Ethics Committee of University Malaya Medical Centre approved the study protocol (MREC ID NO: 202133-9919) on 1 April 2021. All participants provided written informed consent prior to enrollment in the study. This research was conducted ethically in accordance with the World Medical Association Declaration of Helsinki.

Study subjects

Patients with probable or confirmed dengue fever based on World Health Organization diagnostic criteria 17 were included by convenience sampling. Patients with fever and two dengue symptoms were considered as having probable dengue fever, and patients with positive dengue NS1 antigen or IgM serology were considered as confirmed dengue. 17 Dengue patients were selected as assessment of dehydration is an important element of dengue management. Exclusion criteria were patients with diseases that may impair urine production or urine color, such as, end-stage renal failure, chronic kidney disease, or liver disease. Furthermore, patients were excluded if they were unable to provide a midstream urine sample. Following informed consent, clinical assessment, and management were completed by the attending physician.

Sample size

Sample size was calculated using the following formula to determine diagnostic accuracy of a test 18 :

n=Z2(Se)(1Se)(d2×Prev)

where: n = sample size; Z = 1.96 for confidence interval of 95%; Se = sensitivity of 0.9; d = margin of error of 0.08; Prev = prevalence of dehydration in dengue of 63%. 14 The calculated sample size inclusive of a 20% drop-out rate was 53.

Sample analysis

Urine samples were collected in hospital-standard plastic urine bottles within 1 hour of patient enrollment. Prior to sending the sample to the central lab for urine full examination and microscopic examination (UFEME), 10 ml of urine sample were syringed out for urine colorimetry. Parameters measured during UFEME were USG, uOsm, sodium, protein, ketones, bilirubin, urobilinogen, and hemoglobin.

Urine image capture setup

Figure 1 and Supplemental Figure 1 illustrate the setup for obtaining the urine images. The setup consisted of an enclosure, measuring 35 cm (height) × 38 cm (length) × 50 cm (width) made of white polystyrene to avoid color casts. An LED light source (Ulanzi VIJIM VL196 RGB light) was fixed at the roof of the box next to a mount designed for the placement of the smartphone camera array. This smartphone mount was aligned directly on top of the petri dish which contained the urine sample. Ten milliliters of urine sample were transferred into the Petri dish to a height of 0.5 cm. To prevent contamination, the petri dish (5.5 cm diameter × 1 cm height) was housed within a transparent acrylic box (8 cm length × 8 cm width × 10.5 cm height).

Figure 1.

Figure 1.

Urine image capture setup (schematic).

The characteristics of the smartphones are summarized in Table 1. The images were captured using the wide-angle rear lens of the built-in smartphone camera and set at: flash “off,” 24-bit JPEG format, and default resolution. To ensure adequate illumination, brightness of the LED light source was fixed at 1920 lm/m2. Prior to image acquisition, the camera focus and exposure were locked by tapping the phone screen at the center of the urine image.

Table 1.

Characteristics of the five smartphone cameras.

Phone Smartphone brand Sensor model Sensor type Sensor size (inch) Sensor pixel size (mm) Number of effective pixels (megapixels) Aperture (f)
1 iPhone 6S Sony Exmor RS IMX 315 CMOS 1/2.93 1.22 12 2.2
2 Samsung Galaxy Note 3 Sony Exmor RS IMX 135 CMOS 1/3.06 1.12 13 2.2
3 Oppo A94 Not specified Not specified 1/2 Not specified 48 (wide) 1.7
4 Realme Narzo 20 Pro Sony Exmor RS IMX 471 CMOS 1/3 1.0 48 (wide) 1.8
5 Huawei Mate 40 Pro Plus Sony Exmor RS IMX 700 CMOS 1/1.28 1.22 50 (wide) 1.9

CMOS: complementary metal-oxide-semiconductor.

The characteristics of the five different lighting conditions are summarized in Table 2. The LED light source were set to to 3200 and 6500 K, to approximate “Indoor” and “Outdoor” ambient lighting conditions, respectively. “Red,” “Yellow,” and “Blue” color casts were introduced by covering the interior walls of the photo box with painted mounting boards (Nippon Super Matex 363, 873, and 312). Images of the urine were captured consecutively using five different smartphones under the five lighting conditions within 5 min of urine sample collection.

Table 2.

Characteristics of the five lighting conditions.

Lighting condition Label Temperature (Kelvin) Nippon Super Matex paint code RGB value
1 Indoor 3200 None None
2 Outdoor 6500 None None
3 Red cast 6500 Red 363 150, 79, 76
4 Yellow cast 6500 Yellow 873 247, 227, 0
5 Blue cast 6500 Blue 312 147, 169, 209

RGB: Red, Green, Blue.

Urine colorimetry

RGB values of the urine images were measured in Adobe Photoshop CC 2021 (Adobe Systems Inc., San Jose, CA) for MacOS. The steps taken to measure the RGB values were: (1) select “Elliptical Marquee” tool, (2) select 100 × 100 pixels of urine image, (3) select “Filter” and then “Average,” and (4) place the “Eyedropper Tool” within the 100 × 100 pixels area to obtain the averaged RGB values. The RGB data were then transferred to SPSS for data analysis. Figure 2 shows a set of urine photos taken from one patient and the measured RGB values.

Figure 2.

Figure 2.

An example of a set of urine photos taken from one patient and the measured RGB values. L: lighting; RGB: Red, Green, Blue.

Data analysis

Fifty-six urine samples were analysed. Each phone captured 280 images under a specific lighting condition. Given five smartphones and five lighting conditions, the resulting dataset was a total of 1400 images. Data were analyzed using IBM SPSS statistics version 26 for MacOS. All continuous variables were tested for normality with Shapiro-Wilk test. Demographic data and urine indices were analyzed using descriptive statistics. Parametric variables were reported in mean and standard deviation, while nonparametric variables were reported in median and interquartile range. The correlation between RGB values and urinary indices were calculated with Spearman's rank correlation coefficient (rs) as the distribution of RGB values were nonparametric. Correlation coefficient was determined as “no correlation” (0.00–0.19), “weak” (0.20–0.39), “moderate” (0.40–0.59), “strong” (0.60–0.79), and “very strong” (0.80–1.00). 19 Dehydration was defined as either USG ≥ 1.020 or uOsm ≥ 700 mOsm/kgH2O. 8 The RGB component with the highest correlation coefficient with USG and uOsm was analyzed using the receiver operating characteristic (ROC) curve and cut-off values were identified based on sensitivity of 90% and above. The highest cut-off value among the five phones under the five lighting conditions was selected as the universal cut-off value to ensure sensitivity of at least 90%. The basis of selecting sensitivity of at least 90% was to ensure low probability of missing true dehydration. The values obtained from the area under the ROC curve (AUC) were considered “excellent” for values between 0.9 and 1.0, “good” for 0.8–0.9, “fair” for 0.7–0.8, “poor” for 0.6–0.7, and “failed” for 0.5–0.6. 20 The diagnostic accuracy of the Blue value to detect dehydration based on USG and uOsm were presented as positive predictive value (PPV), negative predictive value (NPV), positive likelihood ratio (+LR) and negative likelihood ratio (−LR).

Results

Fifty-eight patients were enrolled in the study. Two patients were excluded in the data analysis due to missing urinary indices. Out of these 56 patients, 30 were diagnosed with probable dengue and 26 with confirmed dengue. Table 3 displays the patient demography, clinical characteristics, and urinary indices. None of the patients consumed substances which can affect urine color such as rifampicin, indomethacin, metronidazole, chloroquine, phenazopyridine, promethazine, primaquine, vitamins B and C, beetroot, blackberries, favabeans, or rhubarb. Additionally, there was no difference in the Blue values between patients with probable and confirmed dengue (Supplemental Table 2).

Table 3.

Demographic data, clinical characteristics, and urinary indices.

Variables n = 56
Median age, year (IQR) 39 (22.0–63.0)
Male sex, n (%) 29 (51.8)
Diagnosis
 Probable dengue fever, n (%) 30 (53.6)
 Confirmed dengue fever, n (%) 26 (46.4)
Dengue severity
 Without warning signs, n (%) 29 (51.8)
 With warning signs, n (%) 26 (46.4)
 Severe dengue, n (%) 1(1.8)
Urinary indices
 USG, median (IQR) 1.015 (1.007–1.025)
 uOsm, mmol/kg, median (IQR) 432.0 (235.0–745.0)
 Sodium, mmol/L, median (IQR) 52.5 (30.0–97.0)
Protein, n (%)
 0 30 (53.6)
 Trace 1 (1.8)
 1+ 20 (35.7)
 2+ 5 (8.9)
Ketone, n (%)
 0 41 (73.2)
 1+ 7 (12.5)
 2+ 7 (12.5)
 3+ 1 (1.8)
Bilirubin, n (%)
 0 55 (98.2)
 1+ 1 (1.8)
Urobilinogen, n (%)
 0 51 (91.1)
 1+ 4 (7.1)
 2+ 1 (1.8)
Hemoglobin, n (%)
 0 34 (60.7)
 Trace 5 (8.9)
 1+ 4 (7.1)
 2+ 8 (14.3)
 3+ 5 (8.9)
Hydration status based on USG
 Well hydrated, n (%) 24 (42.9)
 Minimal dehydration, n (%) 12 (21.4)
 Significant dehydration, n (%) 15 (26.8)
 Serious dehydration, n (%) 5 (8.9)
Hydration status based on uOsm
 Hydrated, n (%) 42 (75.0)
 Dehydrated, n (%) 14 (25.0)

IQR: Interquartile range; uOsm: urine osmolality; USG: urine specific gravity.

Blue and Green values showed statistically significant correlation with uOsm, sodium, USG, protein and ketones except for between sodium and Green values for phone 3 under red and blue casts, and between sodium and Green values for phone 4 under blue cast (Supplemental Table 1). The correlations were “strong” to “very strong” between Blue values with USG and uOsm.

The accuracy of the Blue values for predicting dehydration based on USG and uOsm as reference were “good” to “excellent” for all phones under all lighting conditions as illustrated by Figures 3 and 4. The diagnostic accuracies of the Blue value for predicting dehydration at cut-off values of 160, 165, and 170 are summarized in Tables 4 and 5 based on USG and uOSM, respectively.

Figure 3.

Figure 3.

ROC curves for Blue values in predicting dehydration based on USG. B: Blue; L: lighting; P: phone; ROC: receiver operating characteristic; USG: urine specific gravity.

Figure 4.

Figure 4.

ROC curves for Blue values in predicting dehydration based on uOsm. B: Blue; L: lighting; uOsm: urine osmolality; P: phone; ROC: receiver operating characteristic.

Table 4.

Accuracy of predicting dehydration using USG with cut-off value for the Blue component.

Lighting Phone Cut-off value with 90% sensitivity Accuracy with cut-off value of: AUC (95% CI)
160 165 170
Blue value Sp (%) Se (%) Sp (%) Se (%) Sp (%) Se (%) Sp (%)
Indoor 1 137.0 88.9 95.0 72.2 95.0 61.1 95.0 52.8 0.907 (0.823–0.991)*
2 136.0 88.9 95.0 75.0 95.0 66.7 95.0 61.1 0.907 (0.823–0.991)*
3 167.5 88.9 75.0 91.7 80.0 88.9 90.0 89.9 0.909 (0.827–0.991)*
4 164.5 86.1 85.0 91.7 90.0 86.1 95.0 80.6 0.912 (0.831–0.993)*
5 161.0 88.9 85.0 89.9 90.0 86.1 90.0 80.6 0.904 (0.819–0.989)*
Outdoor 1 150.0 88.9 90.0 80.6 90.0 77.8 95.0 72.2 0.906 (0.821–0.990)*
2 151.5 88.9 95.0 89.9 95.0 83.3 95.0 80.6 0.913 (0.830–0.995)*
3 173.0 88.9 75.0 91.7 85.0 91.7 85.0 89.9 0.920 (0.843–0.998)*
4 169.5 86.1 80.0 86.1 85.0 86.1 90.0 86.1 0.881 (0.781–0.980)*
5 167.0 88.9 80.0 89.9 85.0 88.9 90.0 86.1 0.907 (0.824–0.990)*
Red cast 1 115.0 88.9 100.0 30.6 100.0 25.0 100.0 16.7 0.895 (0.807–0.983)*
2 120.5 88.9 100.0 41.7 100.0 36.1 100.0 22.2 0.897 (0.810–0.985)*
3 146.5 86.1 95.0 72.2 95.0 63.9 95.0 58.3 0.892 (0.797–0.988)*
4 158.0 83.3 90.0 83.3 90.0 77.8 95.0 75.0 0.918 (0.841–0.995)*
5 138.0 88.9 100.0 63.9 100.0 47.2 100.0 38.9 0.918 (0.841–0.995)*
Yellow cast 1 109.5 88.9 100.0 16.7 100.0 13.9 100.0 2.8 0.896 (0.805–0.986)*
2 91.5 91.7 100.0 2.8 100.0 0.0 100.0 0.0 0.910 (0.827–0.992)*
3 136.0 88.9 95.0 61.1 100.0 41.7 100.0 25.0 0.908 (0.824–0.991)*
4 140.0 83.3 100.0 55.6 100.0 41.7 100.0 36.1 0.912 (0.832–0.992)*
5 138.0 91.7 90.0 58.3 100.0 38.9 100.0 19.4 0.917 (0.839–0.995)*
Blue cast 1 125.0 88.9 100.0 44.4 100.0 36.1 100.0 25.0 0.903 (0.819–0.988)*
2 126.0 88.9 95.0 55.6 100.0 50.0 100.0 38.9 0.913 (0.831–0.994)*
3 153.0 86.1 95.0 83.3 95.0 77.8 95.0 72.2 0.899 (0.809–0.990)*
4 184.5 88.9 75.0 94.4 80.0 94.4 80.0 91.7 0.932 (0.859–1.000)*
5 144.5 88.9 95.0 72.2 95.0 66.7 100.0 55.6 0.917 (0.838–0.995)*

*p < 0.001. AUC: area under the receiver operating characteristic curve, CI: confidence interval; Se: sensitivity; Sp: specificity; USG: urine specific gravity.

Table 5.

Accuracy of predicting dehydration using uOsm with cut-off value for the Blue component.

Lighting Phone Cut-off value with 90% sensitivity Accuracy with cut-off value of: AUC (95% CI)
160 165 170
Blue value Sp (%) Se (%) Sp (%) Se (%) Sp (%) Se (%) Sp (%)
Indoor 1 118.0 85.7 95.0 72.2 95.0 61.1 95.0 52.8 0.884 (0.786–0.983)*
2 123.0 83.3 95.0 75.0 95.0 66.7 95.0 61.1 0.878 (0.777–0.978)*
3 165.5 81.0 75.0 91.7 80.0 88.9 90.0 88.9 0.879 (0.786–0.972)*
4 146.5 88.1 85.0 91.7 90.0 86.1 95.0 80.6 0.893 (0.797–0.988)*
5 151.0 83.3 85.0 88.9 90.0 83.3 90.0 80.6 0.879 (0.784–0.974)*
Outdoor 1 135.0 83.3 92.9 71.4 92.9 69.0 92.9 61.9 0.883 (0.785–0.980)*
2 137.5 85.7 92.9 76.2 92.9 71.4 92.9 69.0 0.880 (0.783–0.977)*
3 165.0 83.3 78.6 83.3 92.9 83.3 92.9 81.0 0.889 (0.800–0.978)*
4 169.5 76.2 85.7 78.6 85.7 76.2 92.9 76.2 0.855 (0.739–0.972)*
5 152.5 88.1 92.9 83.3 92.9 81.0 92.9 76.2 0.886 (0.791–0.981)*
Red cast 1 109.0 83.3 100.0 26.2 100.0 21.4 100.0 11.9 0.884 (0.793–0.976)*
2 114.0 81.0 100.0 35.7 100.0 31.0 100.0 19.0 0.883 (0.784–0.981)*
3 132.5 83.3 92.9 61.9 92.9 54.8 92.9 45.0 0.861 (0.746–0.975)*
4 129.5 90.5 92.9 73.8 92.9 69.0 92.9 64.3 0.906 (0.822–0.991)*
5 132.5 83.3 100.0 54.8 100.0 40.5 100.0 28.6 0.893 (0.804–0.982)*
Yellow cast 1 102.0 83.3 100.0 14.3 100.0 11.9 100.0 2.4 0.871 (0.765–0.977)*
2 91.5 81.0 100.0 2.4 100.0 0.0 100.0 0.0 0.884 (0.786–0.983)*
3 130.5 85.7 92.9 52.4 100.0 35.7 100.0 21.4 0.885 (0.790–0.980)*
4 143.5 69.0 100.0 47.6 100.0 35.7 100.0 26.2 0.879 (0.788–0.971)*
5 131.5 83.3 100.0 50.0 100.0 33.3 100.0 16.7 0.894 (0.806–0.982)*
Blue cast 1 113.5 85.7 100 38.1 100.0 31.0 100.0 21.4 0.884 (0.786–0.981)*
2 111.0 83.3 92.9 47.6 100.0 42.9 100.0 33.3 0.879 (0.782–0.977)*
3 156.5 71.4 92.9 71.4 92.9 66.7 92.9 61.9 0.863 (0.751–0.975)*
4 161.0 88.1 85.7 88.1 92.9 88.1 92.9 85.7 0.906 (0.824–0.989)*
5 131.5 85.7 92.9 61.9 92.9 57.1 100.0 47.6 0.896 (0.808–0.985)*

*p < 0.001. AUC: area under the receiver operating characteristic curve, CI: confidence interval; Se: sensitivity; Sp: specificity; USG: urine specific gravity.

The PPV, NPV, PLR, and NLR for the cut-off Blue values in predicting dehydration based on USG and uOsm are summarized in Tables 6 and 7, respectively. At cut-off Blue value of 160, the NLR for prediction of dehydration based on USG were highest under “indoor” (0.27) and “outdoor” (0.28) lighting conditions for phone 3. The NLR for predicting dehydration based on uOsm was 0.26 for both “indoor” and “outdoor” lightings. However, at 170, the NLR was 1.00 under yellow color cast for phone 2 in predicting dehydration based on both USG and uOsm.

Table 6.

Predictive values and likelihood ratios of cut-off Blue values in predicting dehydration based on USG.

Lighting Phone Cut-off Blue value 160 Cut-off Blue value 170
PPV NPV PLR NLR PPV NPV PLR NLR
Indoor 1 0.63 0.96 3.11 0.07 0.53 0.95 2.01 0.09
2 0.68 0.96 3.80 0.07 0.54 0.95 2.14 0.09
3 0.79 0.86 6.75 0.28 0.78 0.94 6.48 0.12
4 0.81 0.91 7.65 0.17 0.70 0.97 4.28 0.06
5 0.82 0.94 8.10 0.11 0.72 0.94 4.63 0.12
Outdoor 1 0.72 0.94 4.63 0.12 0.66 0.96 3.42 0.07
2 0.79 0.97 6.84 0.06 0.73 0.97 4.89 0.06
3 0.83 0.87 9.00 0.27 0.81 0.91 7.65 0.17
4 0.77 0.91 6.12 0.17 0.78 0.94 6.48 0.12
5 0.81 0.91 7.65 0.17 0.78 0.94 6.48 0.12
Red cast 1 0.44 1.00 1.44 0.00 0.38 1.00 1.13 0.00
2 0.49 1.00 1.71 0.00 0.42 1.00 1.29 0.00
3 0.66 0.96 3.42 0.07 0.50 0.94 1.80 0.11
4 0.72 0.94 4.63 0.12 0.68 0.96 3.80 0.07
5 0.61 1.00 2.77 0.00 0.44 1.00 1.44 0.00
Yellow cast 1 0.40 1.00 1.20 0.00 0.36 1.00 1.03 0.00
2 0.36 1.00 1.03 0.00 0.64 1.00
3 0.56 1.00 2.25 0.00 0.41 1.00 1.24 0.00
4 0.56 1.00 2.25 0.00 0.43 1.00 1.38 0.00
5 0.56 1.00 2.25 0.00 0.40 1.00 1.20 0.00
Blue cast 1 0.50 1.00 1.80 0.00 0.43 1.00 1.33 0.00
2 0.54 0.95 2.14 0.09 0.47 1.00 1.57 0.00
3 0.73 0.97 4.89 0.06 0.63 0.96 3.11 0.07
4 0.89 0.89 14.40 0.21 0.85 0.92 10.20 0.16
5 0.63 0.96 3.11 0.07 0.56 1.00 2.25 0.00

∞: infinity; NLR: negative likelihood ratio; NPV: negative predictive value; PLR: positive likelihood ratio; PPV: positive predictive value; USG: urine specific gravity.

Table 7.

Predictive values and likelihood ratios of cut-off Blue values in predicting dehydration based on uOsm.

Lighting Phone Cut-off Blue value 160 Cut-off Blue value 170
PPV NPV PLR NLR PPV NPV PLR NLR
Indoor 1 0.43 0.96 2.29 0.12 0.36 0.95 1.70 0.16
2 0.46 0.96 2.60 0.11 0.37 0.95 1.77 0.15
3 0.58 0.92 4.13 0.26 0.57 0.97 3.90 0.09
4 0.62 0.97 4.88 0.09 0.48 0.97 2.79 0.11
5 0.59 0.97 4.33 0.09 0.52 0.97 3.25 0.10
Outdoor 1 0.52 0.97 3.25 0.10 0.45 0.96 2.44 0.12
2 0.54 0.97 3.55 0.10 0.50 0.97 3.00 0.10
3 0.61 0.92 4.71 0.26 0.62 0.97 4.88 0.09
4 0.55 0.94 3.60 0.19 0.57 0.97 3.90 0.09
5 0.62 0.97 4.88 0.09 0.57 0.97 3.90 0.09
Red cast 1 0.31 1.00 1.35 0.00 0.27 1.00 1.11 0.00
2 0.34 1.00 1.56 0.00 0.29 1.00 1.24 0.00
3 0.45 0.96 2.44 0.12 0.34 0.94 1.56 0.18
4 0.52 0.97 3.25 0.10 0.46 0.96 2.60 0.11
5 0.42 1.00 2.21 0.00 0.31 1.00 1.35 0.00
Yellow cast 1 0.28 1.00 1.17 0.00 0.25 1.00 1.02 0.00
2 0.25 1.00 1.02 0.00 0.75 1.00
3 0.39 1.00 1.91 0.00 0.29 1.00 1.20 0.00
4 0.39 1.00 1.91 0.00 0.30 1.00 1.31 0.00
5 0.39 1.00 1.91 0.00 0.28 1.00 1.17 0.00
Blue cast 1 0.35 1.00 1.62 0.00 0.30 1.00 1.27 0.00
2 0.37 0.95 1.77 0.15 0.33 1.00 1.45 0.00
3 0.50 0.97 3.00 0.10 0.43 0.96 2.29 0.12
4 0.72 0.97 7.80 0.08 0.65 0.97 5.57 0.09
5 0.43 0.96 2.29 0.12 0.39 1.00 1.91 0.00

∞: infinity; NLR: negative likelihood ratio; NPV: negative predictive value; uOsm: urine osmolality; PLR: positive likelihood ratio; PPV: positive predictive value;.

Discussions

This study investigated the correlation between smartphone-based colorimetry and laboratory indices for predicting dehydration. Building upon the work of Noor Azhar et al., 21 who previously demonstrated the reliability of urine colorimetry across multiple smartphones and lighting conditions, our research extends their findings to assess the accuracy of urine colorimetry in predicting dehydration under these conditions. We believe that this research serves as a crucial step toward democratizing medical diagnostics by providing the masses with accessible tools to assess their hydration status beyond the confines of medical facilities. 22

Other studies have demonstrated the utility of smartphones in performing colorimetric urinalysis.23,24 However, these studies required the use of urine strips compared to our study which directly analysed urine images. Our study validates the findings of several other studies proving the concept of urine colorimetry in predicting dehydration based on USG and uOsm.14,25,26 USG and uOsm have been shown to have good correlation with patient's hydration status at cut-off values of ≥1.020 and ≥700 mOsm/kgH2O, respectively. 8

We observed various degrees of correlations between RGB values and urinary laboratory indices across all phones under all lighting conditions. The strongest correlation was between the Blue values with USG and uOsm making it the ideal surrogate for predicting dehydration, corroborating the study by Chew et al. 14 In this study, the accuracy of Blue values to predict dehydration were explored with ROC curves, and the AUC demonstrated “good” to “excellent” performance. Liu et al. 26 reported an AUC = 0.892 for identifying USG ≥ 1.020 using the CIE L*a*b* three-dimensional color space and our study showed AUC values ranging from 0.881 to 0.932 using the Blue value. The proprietary specifications of the different phones and the casts reflected under the different lighting conditions resulted in variations of the predictive accuracy of the Blue values. Nonetheless, the sensitivity of Blue cut-off value at 170 remains above 90% under most conditions except for 2 observations involving phones 3 and 4.

We then further explored the Blue cut-off values of each phone and lighting conditions, prioritizing a sensitivity of at least 90% while compromising on specificity as this was intended to be a home-screening test for dehydration. The cut-off values ranged between 91.5 and 184.5 for USG and 91.5 and 169.5 for uOsm. We calculated the diagnostic accuracy of common cut-off values of 160, 165, and 170 across all phones and lighting conditions. The higher cut-off value of 170 predicted all patients to be dehydrated such as seen with phone 2 under yellow cast whereas the lower cut-off value of 160 compromised on the sensitivity (75.0% for USG and 78.6% for uOsm) such as measured by phone 3 under both indoor and outdoor lightings. Subsequently, the post-test probability at cut-off value of 160 demonstrated weak NLRs (>0.2) for phone 3 under indoor and outdoor lighting conditions and phone 4 under blue cast. The cut-off value of 170 resulted in errors in calculating the PPV and PLR with NLR = 1.00 for phone 2 under yellow cast as all patients were categorized as dehydrated. However, considering these factors, we have selected 170 as the cut-off value to minimize false negatives in an out-of-hospital screening tool for dehydration. Interestingly, the color sensor prototype by Chin et al. 27 reported a Blue cut-off value of 170 in predicting dehydration. Whereas, the color sensor used by Gunawan et al. 25 found a much lower cut-off Blue value. Variations of this cut-off value are expected due to the different sensors and algorithms used in their studies.

In this study, the urine images were encoded in the JPEG file format which may affect the results due to color compression. Additionally, proprietary gamma correction processing of the various smartphones may introduce nonlinearity in RGB values. Unprocessed sensor data stored as RAW file format may have the advantage of retaining the original color data, higher bit depth, and potentially mitigate the nonlinearity introduced by gamma correction including from dark light sources. However, given the diverse range of smartphone models used by the general population, it may be challenging to rely solely on RAW files for urine colorimetry as not all smartphones support this file format. Furthermore, this study observed “good” to “excellent” linear correlation between the Blue values and urinary laboratory indices without prior intensity normalization.

The findings of this study pave the way for the use of current smartphone technology in out-of-hospital settings to aid healthcare. The utilization of high-sensitivity smartphone urine colorimetry will screen patients predisposed to dehydration such as reduced oral intake and increased fluid losses. Nevertheless, dehydration is a clinical condition that is not assessed based one parameter. 4 Rather, dehydration is identified using a combination of clinical assessment by the physician, haemodynamic measurements, and laboratory tests.

The Blue values showed no statistically significant differences between patients with probable and confirmed dengue under all lighting conditions (Supplemental Table 2) suggesting that the diagnosis of dengue was not a confounding factor in urine colorimetry. However, further validation in different patient populations is required before implementation in the real-world application to consider clinical impact and cost-effectiveness. Another potential for exploration is to utilize machine-learning methods to identify degrees of hydration based on urine samples.

Limitations of study

This study compared the RGB values to USG and uOsm as markers of dehydration. However, there are no laboratory gold standard parameters of dehydration. 28 Further studies are required to compare colorimetry to clinical dehydration. Secondly, the RGB intensity values could be affected by the type, thickness, color, and transparency of the Petri dish. However, this enclosure complied with standard precautions of handling potentially infectious body fluids. Thirdly, despite measuring the RGB values using different phones and lighting conditions, these were still under artificial and controlled settings, using a single model of LED light source. Prior to implementation, feasibility studies of smartphone colorimetry should be researched including more phone models under a broader range of spectral profiles for light conditions such as fluorescent tube, incandescent bulb, halogen lamp, and natural light. Finally, the proprietary algorithm in Adobe Photoshop 2021 used for RGB measurements of the urine photos is not publicly known. Further research using other software, including mobile applications, or the use of open-sourced algorithms for RGB measurements would be beneficial.

Conclusions

We found that the Blue values for urine colorimetry has high sensitivity to detect dehydration based on USG and uOsm across various smartphones and lighting conditions. The development of this high-sensitivity smartphone-based dehydration screening tool is essential in democratization of healthcare diagnostics. The use of the ubiquitous smartphone will enable patient-centric healthcare, especially in developing countries with limited access to health services. However, the utility needs to be further studied to ensure patient safety and cost-effectiveness.

Supplemental Material

sj-tiff-1-dhj-10.1177_20552076231197961 - Supplemental material for Accuracy of smartphone camera urine photo colorimetry as indicators of dehydration

Supplemental material, sj-tiff-1-dhj-10.1177_20552076231197961 for Accuracy of smartphone camera urine photo colorimetry as indicators of dehydration by Aida Bustam, Khadijah Poh, Siew Shuin Soo and Fathmath Sausan Naseem, Mohd Hafyzuddin Md Yusuf, Naseeha Ubaidi Hishamudin, Muhaimin Noor Azhar in DIGITAL HEALTH

sj-docx-2-dhj-10.1177_20552076231197961 - Supplemental material for Accuracy of smartphone camera urine photo colorimetry as indicators of dehydration

Supplemental material, sj-docx-2-dhj-10.1177_20552076231197961 for Accuracy of smartphone camera urine photo colorimetry as indicators of dehydration by Aida Bustam, Khadijah Poh, Siew Shuin Soo and Fathmath Sausan Naseem, Mohd Hafyzuddin Md Yusuf, Naseeha Ubaidi Hishamudin, Muhaimin Noor Azhar in DIGITAL HEALTH

sj-docx-3-dhj-10.1177_20552076231197961 - Supplemental material for Accuracy of smartphone camera urine photo colorimetry as indicators of dehydration

Supplemental material, sj-docx-3-dhj-10.1177_20552076231197961 for Accuracy of smartphone camera urine photo colorimetry as indicators of dehydration by Aida Bustam, Khadijah Poh, Siew Shuin Soo and Fathmath Sausan Naseem, Mohd Hafyzuddin Md Yusuf, Naseeha Ubaidi Hishamudin, Muhaimin Noor Azhar in DIGITAL HEALTH

Acknowledgements

The authors would like to thank the management and medical staff of the Emergency Department, University Malaya Medical Centre.

Footnotes

Contributorship: MNA, AB, and KP researched literature, conceived the study, and protocol development. MNA was involved in gaining ethical approval. FSN and SSS were involved in patient recruitment. MNA, AB, KP, FSN, and SSS contributed to data analysis. FSN and SSS wrote the first draft of the manuscript. All authors reviewed and edited the manuscript and approved the final version. All authors contributed equally to this work.

The authors declared no potential conflicts of interest with respect to the research, authorship, and/or publication of this article.

Ethical approval: The Medical Research Ethics Committee of the UMMC approved the study protocol (MREC ID NO: 202133-9919) on 1 April 2021.

Funding: The authors received no financial support for the research, authorship, and/or publication of this article.

Guarantor: MNA.

Supplemental material: Supplemental material for this article is available online.

References

  • 1.Camacho E, LoPresti M, Appelboom G, et al. The ubiquitous role of smartphones in mobile health. Biom Biostat Int J 2014; 1: 14–19. [Google Scholar]
  • 2.Klasnja P, Pratt W. Healthcare in the pocket: mapping the space of mobile-phone health interventions. J Biomed Inform 2012; 45: 184–198. [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 3.Wood WA, Bennett AV, Basch E. Emerging uses of patient generated health data in clinical research. Mol Oncol 2015; 9: 1018–1024. [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 4.Armstrong LE. Assessing hydration status: the elusive gold standard. J Am Coll Nutr 2007; 26(5 Suppl): 575S–584S. [DOI] [PubMed] [Google Scholar]
  • 5.Armstrong LE, Maresh CM, Castellani JW, et al. Urinary indices of hydration status. Int J Sport Nutr 1994; 4: 265–279. [DOI] [PubMed] [Google Scholar]
  • 6.Fletcher SJ, Slaymaker AE, Bodenham ARet al. et al. Urine colour as an index of hydration in critically ill patients. Anaesthesia 1999; 54: 189–192. [DOI] [PubMed] [Google Scholar]
  • 7.Kostelnik SB, Davy KP, Hedrick VE, et al. The validity of urine color as a hydration biomarker within the general adult population and athletes: a systematic review. J Am Coll Nutr 2021; 40: 172–179. [DOI] [PubMed] [Google Scholar]
  • 8.Sawka MN, Burke LM, Eichner ER, et al. American College of Sports Medicine position stand. Exercise and fluid replacement. Med Sci Sports Exercise 2007; 39: 377–390. [DOI] [PubMed] [Google Scholar]
  • 9.Warren A, Obrien M, Smith D. Reliability of three urinalysis methods used in the assessment of hydration. Int J Sports Exercise Health Res 2018; 2: 100–105. [Google Scholar]
  • 10.Barley OR, Chapman DW, Abbiss CR. Reviewing the current methods of assessing hydration in athletes. J Int Soc Sports Nutr 2020; 17: 52. [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 11.Choodum A, Parabun K, Klawach N, et al. Real time quantitative colourimetric test for methamphetamine detection using digital and mobile phone technology. Forensic Sci Int 2014; 235: 8–13. [DOI] [PubMed] [Google Scholar]
  • 12.Priye A, Ball CS, Meagher RJ. Colorimetric-luminance readout for quantitative analysis of fluorescence signals with a smartphone CMOS sensor. Anal Chem 2018; 90: 12385–12389. [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 13.Wongniramaikul W, Limsakul W, Choodum A. A biodegradable colorimetric film for rapid low-cost field determination of formaldehyde contamination by digital image colorimetry. Food Chem 2018; 249: 154–161. [DOI] [PubMed] [Google Scholar]
  • 14.Chew N, Noor Azhar AM, Bustam A, et al. Assessing dehydration status in dengue patients using urine colourimetry and mobile phone technology. PLoS Negl Trop Dis 2020; 14: e0008562. [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 15.Byrne L, Barker J, Pennarun-Thomas G, et al. Digital imaging as a detector for generic analytical measurements. TrAC Trends Anal Chem 2000; 19: 517–522. [Google Scholar]
  • 16.Akkaynak D, Treibitz T, Xiao B, et al. Use of commercial off-the-shelf digital cameras for scientific data acquisition and scene-specific color calibration. J Opt Soc Am A Opt Image Sci Vis 2014; 31: 312–321. [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 17.World Health O. Dengue guidelines for diagnosis, treatment, prevention and control: new edition. Geneva: World Health Organization, 2009. [PubMed] [Google Scholar]
  • 18.Hajian-Tilaki K. Sample size estimation in diagnostic test studies of biomedical informatics. J Biomed Inform 2014; 48: 193–204. [DOI] [PubMed] [Google Scholar]
  • 19.Dancey CP, Reidy J. Statistics without maths for psychology. London: Pearson, 2017. [Google Scholar]
  • 20.Obuchowski NA. Receiver operating characteristic curves and their use in radiology. Radiology 2003; 229: 3–8. [DOI] [PubMed] [Google Scholar]
  • 21.Noor Azhar M, Bustam A, Naseem FS, et al. Improving the reliability of smartphone-based urine colorimetry using a colour card calibration method. Digital Health 2023; 9: 20552076231154684. [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 22.Bose R, Saxon LA. The democratization of diagnosis: bringing the power of medical diagnosis to the masses. EClinicalMedicine 2019; 8: 6–7. [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 23.Flaucher M, Nissen M, Jaeger KM, et al. Smartphone-based colorimetric analysis of urine test strips for at-home prenatal care. IEEE J Transl Eng Health Med 2022; 10: 1–9. [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 24.Hong JI, Chang B-Y. Development of the smartphone-based colorimetry for multi-analyte sensing arrays. Lab Chip 2014; 14: 1725–1732. [DOI] [PubMed] [Google Scholar]
  • 25.Gunawan AA, Brandon D, Puspa VDet al. et al. Development of urine hydration system based on urine color and support vector machine. Procedia Comput Sci 2018; 135: 481–489. [Google Scholar]
  • 26.Liu J, Zhang Z, Pang X, et al. Analysis of the distribution of urine color and its relationship with urine dry chemical parameters among college students in Beijing, China—a cross-sectional study. Front Nutr 2021; 8. [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 27.Chin J, Tisan A. (eds). An IoT-based pervasive body hydration tracker (PHT). In: 2015 IEEE 13th international conference on industrial informatics (INDIN), 2015, 22–24 July 2015. [Google Scholar]
  • 28.Lacey J, Corbett J, Forni L, et al. A multidisciplinary consensus on dehydration: definitions, diagnostic methods and clinical implications. Ann Med 2019; 51: 232–251. [DOI] [PMC free article] [PubMed] [Google Scholar]

Associated Data

This section collects any data citations, data availability statements, or supplementary materials included in this article.

Supplementary Materials

sj-tiff-1-dhj-10.1177_20552076231197961 - Supplemental material for Accuracy of smartphone camera urine photo colorimetry as indicators of dehydration

Supplemental material, sj-tiff-1-dhj-10.1177_20552076231197961 for Accuracy of smartphone camera urine photo colorimetry as indicators of dehydration by Aida Bustam, Khadijah Poh, Siew Shuin Soo and Fathmath Sausan Naseem, Mohd Hafyzuddin Md Yusuf, Naseeha Ubaidi Hishamudin, Muhaimin Noor Azhar in DIGITAL HEALTH

sj-docx-2-dhj-10.1177_20552076231197961 - Supplemental material for Accuracy of smartphone camera urine photo colorimetry as indicators of dehydration

Supplemental material, sj-docx-2-dhj-10.1177_20552076231197961 for Accuracy of smartphone camera urine photo colorimetry as indicators of dehydration by Aida Bustam, Khadijah Poh, Siew Shuin Soo and Fathmath Sausan Naseem, Mohd Hafyzuddin Md Yusuf, Naseeha Ubaidi Hishamudin, Muhaimin Noor Azhar in DIGITAL HEALTH

sj-docx-3-dhj-10.1177_20552076231197961 - Supplemental material for Accuracy of smartphone camera urine photo colorimetry as indicators of dehydration

Supplemental material, sj-docx-3-dhj-10.1177_20552076231197961 for Accuracy of smartphone camera urine photo colorimetry as indicators of dehydration by Aida Bustam, Khadijah Poh, Siew Shuin Soo and Fathmath Sausan Naseem, Mohd Hafyzuddin Md Yusuf, Naseeha Ubaidi Hishamudin, Muhaimin Noor Azhar in DIGITAL HEALTH


Articles from Digital Health are provided here courtesy of SAGE Publications

RESOURCES