Abstract
Novel modern easily feasible methods for direct evaluation of a new, simple preconcentration analytical procedure have been developed. Two types of smartphone image analysis applications (ON Color Measure and Color Lab) were evaluated to obtain RGB and HSV color spaces data for the quantification of Magnetic textile solid phase extraction of colored compounds (e.g. water-soluble organic dyes). Both direct measurement of color spaces values via the smartphone camera and image analysis of the photograph can be used successfully. The obtained data were similar to those obtained by previously examined professional ImageJ software. The saturation (S) values of the HSV color space are directly proportional to the concentrations of the analyzed dye.
Keywords: Analytical chemistry, Biotechnology, Environmental science, Magnetic textile solid phase extraction, Image analysis, Smartphones, Dyes
Analytical chemistry, Biotechnology, Environmental science, Magnetic textile solid phase extraction; Image analysis; Smartphones; Dyes.
1. Introduction
Sample concentration techniques are usually used during the monitoring the concentration of target biologically active compounds, organic and inorganic pollutants or radionuclides present in water, other environmental media and biological materials. Solid phase extraction (SPE) techniques are predominantly employed nowadays for such purpose. Among them SPE procedures based on the use of magnetically responsive materials are very important. Magnetic solid phase extraction (MSPE) employing magnetically responsive adsorbents was developed by Safarikova and Safarik in 1999 [1]. Magnetic materials can serve as supports for the immobilization of an appropriate affinity ligand, or as magnetic labels for conversion of originally diamagnetic materials into magnetically modified ones. This technique greatly simplifies the extraction procedure and enhances the extraction efficiency. Magnetic adsorbents can be prepared in different shape, size and configuration. Magnetic separation is not influenced by the change of pH, ionic strength or the presence of contaminating diamagnetic materials [2, 3, 4].
Magnetic textile solid phase extraction (MTSPE) represents a new preconcentration procedure based on the use of a piece of textile with incorporated magnetic iron wire [5]. After immobilization of an appropriate affinity or ion exchange ligand to the textile fibers, the target analyte can be preconcetrated from large sample volumes. After preconcentration, the piece of textile can be easily and rapidly separated magnetically. Similarly to standard solid phase separation procedures, analyte bound to magnetically responsive textile can be eluted with a small amount of an appropriate eluant and then analyzed [5, 6].
Organic dyes are used in huge amount of processes and subsequently they can appear in water environment. Approved synthetic food dyes are also present in many beverages. Simple detection and quantification of dyes in water samples is of high interest. Recently developed MTSPE enables simple and efficient dyes preconcentration and analysis [6, 7].
It has been shown recently that image analysis employing HSB color space can be successfully used for dye concentration determination using MTSPE. After the dye preconcentration, photos of textile squares with the adsorbed dye were taken using a mobile phone or a digital camera. Using an appropriate software, the square or rectangle covering maximum of homogeneously colored textile (without the staple) was cropped from the original image for the subsequent evaluation using ImageJ software installed on the standard computer. Using this inexpensive, elution free assay it is possible to analyze dyes concentration in various solutions [7].
In order to further simplify the image analysis procedure during MTSPE, a simple smartphone-based image analysis of textile pieces after dye extraction is presented. Image analysis was performed using two smartphone applications (ON Color Measure and Color Lab) run on a standard smartphone; for the comparison the image analysis was also performed using ImageJ installed on the standard computer.
2. Materials and methods
2.1. Materials and software
Chitosan (medium molecular weight (ca 400 000 Da), 75–85% deacetylated) was obtained from Fluka, Switzerland. Red food dye azorubine (E122), as a part of food coloring mixture, was ordered from Aroco, Czech Republic; blue fountain ink containing dye Acid blue 93 was supplied by Koh-i-noor Hardtmuth, Czech Republic. Common chemicals were from Lach-Ner, Czech Republic. Nonwoven textile (Bastelfiltz, 100 % acrylic felt, white, 150 g/m2, 10 × 30 cm) was ordered from Max Bringmann KG-folia, Germany. An office stapler with common iron-based staples were bought locally. Smartphone applications ON Color Measure (Version 7.0, produced by PotatotreeSoft) and Color Lab (produced by H&H Color Lab, USA) were running on Samsung Galaxy SIII Mini smartphone (Samsung Electronics Co., Republic of Korea). Freeware (XnView and ImageJ) run on a standard computer were used for photographs adjustment and image analysis, respectively.
2.2. Image analysis of cropped images
Preparation of textile adsorbent (squares 20 × 20 mm), which can be easily magnetically separated, as well as magnetic textile solid phase extraction procedure have already been described [7]. Standard image analysis of magnetic textile squares after dye extraction was performed as described previously [7]. Shortly, mobile phone with android application CameraNext Mod was used for taking photos of textile squares under normal daylight in room with standard illumination. XnView software was used to crop the original image into the square or rectangle containing homogeneously colored textile without the staple for the subsequent evaluation. Analysis of all the samples was performed using Color Inspector 3D plugin (ImageJ software), where the reduction of original colors into one „median“ color was done by the Median Cut option. Subsequently, three image parameters (hue (H), saturation (S), brightness (B)) were obtained by application of the HSB color space. The H value of the image with intensive coloring was applied as the standard value for the processing of the images with lower concentrations of the same dye. Graphs in our previous work illustrate the dependence of S values on the initial dye concentrations of the analyzed solutions [7].
The same images were analyzed using a smartphone with installed applications. Using On Color Measure the analyzed image was downloaded via Mode action, and then usually 10 points were randomly selected using a movable cursor; the measured data (RSB and HSV values) were registered and used for subsequent calculations. Using Color Lab the Eye Dropper application enabled to download the image; after touching the screen at appropriate place the local dye was selected, which in the next step presented the values of various color spaces, including RGB and HSV. These values were also recorded and analyzed later.
2.3. Real time image analysis of textile pieces
Using On Color Measure it is possible to measure directly the RGB and HSV values of the analyzed colored textile piece via the smartphone camera. Using Color Lab the Eye Dropper application is selected, camera figure is touched and appropriate place on the textile piece is selected and RGB and HSV values are collected.
3. Results and discussion
Simplification of analytical instruments and procedures enables their potential exploitation directly by non-trained users or outside the well-equipped laboratory. Recently smartphones have been used e.g., for colorimetric detection of nitrite [8], spectrometric detection of ascorbic acid [9] or colorimetric assay of uric acid and glucose [10]. Several review papers summarizing smartphone based bioanalytical and diagnosis applications have been published recently [11, 12, 13].
In this paper, we show that smartphone image analysis used for the evaluation of MTSPE can give results which are very similar to those obtained by computer installed ImageJ (a professional Java-based image processing program developed at the National Institutes of Health and the Laboratory for Optical and Computational Instrumentation, USA). In the first phase, the standard color images with known RGB values (downloaded from https://www.color-hex.com/color-palettes/) were analyzed using both ImageJ software and two smartphone applications (ON Color Measure and Color Lab). As can be seen from Table 1, there are only minimal differences between RGB values and HSV (HSB) values obtained by all three softwares and the reference values. It has to be mentioned that HSV values obtained by smartphone applications correspond to HSB values obtained by ImageJ.
Table 1.
Comparison of RGB and HSV (HSB) values of standard colored pictures obtained using smartphone applications On ColorMeasure and ColorLab, and by ImageJ software.
| Model color |
On ColorMeasure |
ColorLab (EyeDropper) |
ImageJ |
||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| R | G | B | R | G | B | H | S | V | R | G | B | H | S | V | R | G | B | H | S | B | |
| 0 | 122 | 119 | 0 | 122 | 119 | 178 | 100 | 47 | 0 | 122 | 119 | 179 | 100 | 48 | 0 | 122 | 119 | 179 | 100 | 48 | |
| 0 | 210 | 127 | 1 | 210 | 127 | 156 | 99 | 82 | 1 | 210 | 127 | 156 | 100 | 82 | 1 | 210 | 127 | 156 | 100 | 82 | |
| 2 | 137 | 0 | 2 | 137 | 0 | 119 | 100 | 53 | 2 | 137 | 0 | 119 | 100 | 54 | 2 | 137 | 0 | 119 | 100 | 54 | |
| 24 | 116 | 205 | 25 | 116 | 205 | 209 | 87 | 80 | 25 | 116 | 205 | 210 | 88 | 80 | 25 | 116 | 205 | 210 | 88 | 80 | |
| 38 | 36 | 107 | 38 | 37 | 107 | 240 | 65 | 41 | 38 | 37 | 107 | 241 | 65 | 42 | 38 | 37 | 107 | 241 | 65 | 42 | |
| 70 | 66 | 63 | 70 | 66 | 63 | 25 | 10 | 27 | 70 | 66 | 63 | 26 | 10 | 27 | 70 | 66 | 63 | 26 | 10 | 27 | |
| 77 | 255 | 254 | 77 | 255 | 255 | 180 | 69 | 100 | 77 | 255 | 255 | 180 | 70 | 100 | 77 | 255 | 255 | 180 | 70 | 100 | |
| 87 | 69 | 52 | 86 | 69 | 51 | 30 | 40 | 33 | 86 | 69 | 51 | 31 | 41 | 34 | 86 | 69 | 51 | 31 | 41 | 34 | |
| 94 | 136 | 255 | 94 | 136 | 255 | 224 | 63 | 100 | 94 | 136 | 255 | 224 | 63 | 100 | 94 | 136 | 255 | 224 | 63 | 100 | |
| 96 | 128 | 197 | 95 | 128 | 197 | 220 | 51 | 77 | 95 | 128 | 197 | 221 | 52 | 77 | 94 | 130 | 197 | 219 | 52 | 77 | |
| 99 | 184 | 255 | 100 | 184 | 255 | 207 | 60 | 100 | 100 | 184 | 255 | 207 | 61 | 100 | 100 | 184 | 255 | 207 | 61 | 100 | |
| 113 | 244 | 254 | 113 | 244 | 254 | 184 | 55 | 99 | 113 | 244 | 254 | 184 | 56 | 100 | 113 | 244 | 254 | 180 | 56 | 100 | |
| 116 | 214 | 0 | 115 | 214 | 1 | 87 | 99 | 83 | 115 | 214 | 1 | 88 | 100 | 84 | 115 | 214 | 1 | 88 | 100 | 84 | |
| 125 | 160 | 255 | 125 | 160 | 254 | 223 | 50 | 99 | 125 | 160 | 254 | 224 | 51 | 100 | 125 | 160 | 254 | 224 | 51 | 100 | |
| 140 | 104 | 78 | 140 | 104 | 78 | 25 | 44 | 54 | 140 | 104 | 78 | 25 | 44 | 55 | 140 | 104 | 78 | 25 | 44 | 55 | |
| 152 | 179 | 255 | 152 | 179 | 255 | 224 | 40 | 100 | 152 | 179 | 255 | 224 | 40 | 100 | 152 | 179 | 255 | 224 | 40 | 100 | |
| 173 | 255 | 0 | 173 | 255 | 0 | 79 | 100 | 100 | 173 | 255 | 0 | 79 | 100 | 100 | 173 | 255 | 0 | 79 | 100 | 100 | |
| 180 | 200 | 255 | 180 | 199 | 255 | 224 | 29 | 100 | 180 | 199 | 255 | 225 | 29 | 100 | 180 | 199 | 255 | 225 | 29 | 100 | |
| 199 | 223 | 255 | 198 | 223 | 254 | 213 | 22 | 99 | 198 | 223 | 254 | 213 | 22 | 100 | 198 | 223 | 254 | 213 | 22 | 100 | |
| 202 | 216 | 255 | 202 | 216 | 255 | 224 | 20 | 100 | 202 | 216 | 255 | 224 | 21 | 100 | 202 | 216 | 255 | 224 | 21 | 100 | |
| 206 | 59 | 43 | 206 | 59 | 43 | 5 | 79 | 80 | 206 | 59 | 43 | 6 | 79 | 81 | 206 | 59 | 43 | 6 | 79 | 81 | |
| 206 | 83 | 42 | 206 | 83 | 42 | 15 | 79 | 80 | 206 | 83 | 42 | 15 | 80 | 81 | 206 | 83 | 42 | 15 | 80 | 81 | |
| 228 | 255 | 88 | 228 | 255 | 88 | 69 | 65 | 100 | 228 | 255 | 88 | 70 | 65 | 100 | 228 | 255 | 88 | 70 | 65 | 100 | |
| 231 | 201 | 173 | 231 | 201 | 173 | 28 | 25 | 90 | 231 | 201 | 173 | 29 | 25 | 91 | 231 | 201 | 173 | 29 | 25 | 91 | |
| 238 | 0 | 0 | 238 | 0 | 0 | 0 | 100 | 93 | 238 | 0 | 0 | 0 | 100 | 93 | 238 | 0 | 0 | 0 | 100 | 93 | |
| 240 | 239 | 239 | 239 | 239 | 239 | 0 | 0 | 93 | 239 | 239 | 239 | 0 | 0 | 94 | 239 | 239 | 239 | 0 | 0 | 94 | |
| 247 | 190 | 40 | 247 | 190 | 39 | 43 | 84 | 96 | 247 | 190 | 39 | 44 | 84 | 97 | 247 | 190 | 39 | 44 | 84 | 97 | |
| 252 | 207 | 53 | 252 | 207 | 52 | 46 | 79 | 98 | 252 | 207 | 52 | 46 | 79 | 99 | 252 | 207 | 52 | 47 | 79 | 99 | |
| 255 | 127 | 0 | 255 | 127 | 0 | 29 | 100 | 100 | 255 | 127 | 0 | 30 | 100 | 100 | 255 | 127 | 0 | 30 | 100 | 100 | |
| 255 | 255 | 0 | 255 | 255 | 0 | 60 | 100 | 100 | 255 | 255 | 0 | 60 | 100 | 100 | 255 | 255 | 0 | 60 | 100 | 100 | |
In the next experiments, images obtained during the development of image analysis of dye stained textile during MTSPE were used [7]. One typical set of cropped images (corresponding to real dimensions 12–15 mm x 12–15 mm) obtained after MTSPE of azorubine (volume 100 mL, concentration range 0–0.12 mg/L) on chitosan modified nonwoven textile (Figure 1) was used for the comparison of results obtained by ImageJ and both smartphone applications. While image analysis using ImageJ employed the reduction of original colors into only one „median“ color, in the case of smartphone applications it is necessary to measure the individual RGB and HSV values at the randomly selected spots; that's why always ten measurements for any image were performed and then statistically evaluated. As shown in Figure 2, the S values from HSV(B) color space clearly show that both the computer-based professional software and two tested smartphone applications have obtained very similar results. The relative standard deviations for On Color Measure and Color Lab were in the range 3.76–10.60 and 5.27–13.68 percent, respectively. The saturation (S) values of the HSV(B) color spaces are directly proportional to the concentrations of the analyzed dye (azorubine).
Figure 1.
Cropped images of magnetically responsive, chitosan modified nonwoven textile squares after MTSPE of azorubine from solutions (volumes 100 mL) containing the described concentration of dye (0–0.120 mg/L).
Figure 2.
Dependence of values of saturation (S) on the concentration of analyzed azorubine solutions; treated volume was 100 mL. O – ImageJ, ▲–Color Lab, □ - On Color Measure.
In the last experiment, chitosan modified nonwoven textile was used for the concentration of Acid blue 93 dye which is present in the standard blue fountain ink [14]. Two procedures were employed to obtain RGB and HSV(B) data from blue stained textile, namely taking a photo and performing the image analysis in the same way as described above, or the RGB and HSV(B) data were obtained directly through the smartphone camera. As can be seen from Figure 3, similar values were obtained using all the approaches. In Table 2 detailed statistical evaluation of the obtained data is presented; it can be clearly seen that relative standard deviations of RGB values for both smartphone applications and both imaging procedures are in the range 1.911–5.893 %, while relative standard deviations of saturation (S) values from HSV color space are 2.481–7.964 %.
Figure 3.
RGB and HSV(B) values obtained after analysis of chitosan modified nonwoven textile after MTSPE of Acid blue 93 from blue fountain ink (see right top corner). Columns from left to right for each group: direct On Color Measure via camera (yellow); On Color Measure from an image (brown); direct Color Lab via camera (green); Color Lab from an image (red); ImageJ from an image (blue).
Table 2.
RGB and HSV(B) values obtained by direct measurement via smartphone camera and by image analysis of photos.
| R | G | B | H | S | V(B) | |||
|---|---|---|---|---|---|---|---|---|
| On Color Measure | Direct measurement via camera | Average value | 134.7 | 178.2 | 196.0 | 197.0 | 31.2 | 76.5 |
| Minimal value | 120 | 169 | 186 | 193 | 30 | 72 | ||
| Maximal value | 150 | 186 | 206 | 199 | 35 | 81 | ||
| STD | 7.938 | 5.115 | 5.865 | 1.612 | 1.470 | 2.579 | ||
| RSTD [%] | 5.893 | 2.870 | 2.992 | 0.819 | 4.772 | 3.371 | ||
| Image analysis from a photo | Average value | 140.9 | 185.2 | 204.6 | 197.8 | 30.8 | 79.7 | |
| Minimal value | 124 | 167 | 186 | 195 | 28 | 72 | ||
| Maximal value | 154 | 197 | 218 | 200 | 33 | 85 | ||
| STD | 7.880 | 8.232 | 9.002 | 1.600 | 1.470 | 3.607 | ||
| RSTD [%] | 5.592 | 4.445 | 4.400 | 0.809 | 4.772 | 4.526 | ||
| Color Lab | Direct measurement via camera | Average value | 124.2 | 173.5 | 189.8 | 195.0 | 36.5 | 70.6 |
| Minimal value | 113 | 166 | 182 | 191 | 32 | 67 | ||
| Maximal value | 136 | 179 | 195 | 197 | 41 | 73 | ||
| STD | 7.236 | 4.177 | 3.628 | 1.844 | 2.907 | 1.625 | ||
| RSTD [%] | 5.826 | 2.408 | 1.911 | 0.946 | 7.964 | 2.301 | ||
| Image analysis from a photo | Average value | 133.3 | 178.9 | 197.1 | 197.3 | 32.5 | 77.2 | |
| Minimal value | 124 | 167 | 184 | 195 | 31 | 72 | ||
| Maximal value | 144 | 194 | 217 | 199 | 34 | 85 | ||
| STD | 5.292 | 7.300 | 9.224 | 1.345 | 0.806 | 3.600 | ||
| RSTD [%] | 3.970 | 4.080 | 4.680 | 0.682 | 2.481 | 4.663 | ||
| ImageJ | Image analysis from a photo | Value | 132 | 177 | 197 | 198 | 33 | 77 |
STD – standard deviation; RSTD – relative standard deviation [%].
4. Conclusion
Low-cost, easy to perform analytical approaches for the detection and determination of various pollutants are of high interest. Smartphones offer an attractive platform for chemical analysis such as diagnostics and environmental monitoring. Most often used smartphone applications are based on colorimetry and image analysis. We have shown in this paper that Magnetic textile solid phase extraction of water-soluble organic dyes can be very efficiently evaluated using several types of smartphone image analysis applications. Both direct measurement of color spaces values via the smartphone camera and image analysis of the photograph can be used successfully. It was shown that the saturation (S) values of the HSV color space are directly proportional to the concentrations of the analyzed dye.
Declarations
Author contribution statement
Ivo Safarik: Conceived and designed the experiments; Performed the experiments; Analyzed and interpreted the data; Wrote the paper.
Eva Baldikova: Analyzed and interpreted the data; Contributed reagents, materials, analysis tools or data; Wrote the paper.
Jitka Prochazkova: Performed the experiments; Contributed reagents, materials, analysis tools or data.
Kristyna Pospiskova: Performed the experiments; Contributed reagents, materials, analysis tools or data; Wrote the paper.
Funding statement
This work was supported by the ERDF/ESF projects “New Composite Materials for Environmental Applications” (No. CZ.02.1.01/0.0/0.0/17_048/0007399) and "Nanotechnologies for Future" (No. CZ.02.1.01/0.0/0.0/16_019/0000754) of the Ministry of Education, Youth and Sports of the Czech Republic. This work was carried out in the frame of the COST Actions CA16215 (European network for the promotion of portable, affordable and simple analytical platforms) and CA17107 (European Network to connect research and innovation efforts on advanced Smart Textiles) and the project “Modified (nano)textile materials for health technologies” (Structural fonds of EU, Ministry of Education, Slovakia).
Competing interest statement
The authors declare no conflict of interest.
Additional information
No additional information is available for this paper.
References
- 1.Safarikova M., Safarik I. Magnetic solid-phase extraction. J. Magn. Magn. Mater. 1999;194:108–112. [Google Scholar]
- 2.Andrade-Eiroa A., Canle M., Leroy-Cancellieri V., Cerda V. Solid-phase extraction of organic compounds: a critical review (Part I) Trends Anal. Chem. 2016;80:641–654. [Google Scholar]
- 3.Hemmati M., Rajabi M., Asghari A. Magnetic nanoparticle based solid-phase extraction of heavy metal ions: a review on recent advances. Microchim. Acta. 2018;185:160. doi: 10.1007/s00604-018-2670-4. [DOI] [PubMed] [Google Scholar]
- 4.Azzouz A., Kailasa S.K., Lee S.S., Rascon A.J., Ballesteros E., Zhang M., Kim K.-H. Review of nanomaterials as sorbents in solid-phase extraction for environmental samples. Trends Anal. Chem. 2018;108:347–369. [Google Scholar]
- 5.Safarik I., Baldikova E., Safarikova M., Pospiskova K. Magnetically responsive textile for a new preconcentration procedure: magnetic textile solid phase extraction. J. Ind. Text. 2018;48:761–771. [Google Scholar]
- 6.Safarik I., Mullerova S., Pospiskova K. Magnetically responsive textile for preconcentration of acid food dyes. Mater. Chem. Phys. 2019;232:205–208. [Google Scholar]
- 7.Safarik I., Mullerova S., Pospiskova K. Semiquantitative determination of food acid dyes by magnetic textile solid phase extraction followed by image analysis. Food Chem. 2019;274:215–219. doi: 10.1016/j.foodchem.2018.08.125. [DOI] [PubMed] [Google Scholar]
- 8.Zhang X.X., Song Y.Z., Fang F., Wu Z.Y. Sensitive paper-based analytical device for fast colorimetric detection of nitrite with smartphone. Anal. Bioanal. Chem. 2018;410:2665–2669. doi: 10.1007/s00216-018-0965-2. [DOI] [PubMed] [Google Scholar]
- 9.Aguirre M.A., Long K.D., Canals A., Cunningham B.T. Point-of-use detection of ascorbic acid using a spectrometric smartphone-based system. Food Chem. 2019;272:141–147. doi: 10.1016/j.foodchem.2018.08.002. [DOI] [PMC free article] [PubMed] [Google Scholar]
- 10.Wang X., Li F., Cai Z.Q., Liu K.F., Li J., Zhang B.Y., He J.B. Sensitive colorimetric assay for uric acid and glucose detection based on multilayer-modified paper with smartphone as signal readout. Anal. Bioanal. Chem. 2018;410:2647–2655. doi: 10.1007/s00216-018-0939-4. [DOI] [PubMed] [Google Scholar]
- 11.Kanchi S., Sabela M.I., Mdluli P.S., Inamuddin Bisetty K. Smartphone based bioanalytical and diagnosis applications: a review. Biosens. Bioelectron. 2018;102:136–149. doi: 10.1016/j.bios.2017.11.021. [DOI] [PubMed] [Google Scholar]
- 12.Trojanowicz M. Mobile-phone based chemical analysis - instrumental innovations and smartphone apps. Mod. Chem. Appl. 2017;5:220. [Google Scholar]
- 13.Rezazadeh M., Seidi S., Lid M., Pedersen-Bjergaard S., Yadollah Yamini Y. The modern role of smartphones in analytical chemistry. Trends Anal. Chem. 2019;118:548–555. [Google Scholar]
- 14.Safarik I., Pospiskova K. A simple extraction of blue fountain ink dye (Acid blue 93) from water solutions using Magnetic Textile Solid-Phase Extraction. Sep. Sci. plus. 2018;1:48–51. [Google Scholar]



