Smartphone-based digital image colorimetry for the determination of vancomycin in drugs

A simple smartphone-based digital image colorimetry is proposed for the determination of vancomycin in drugs. The analytical method relied on the reaction of vancomycin with copper(II) in ethanol–water medium with pH 4.3. The reaction resulted in the formation of a blue–grey complex, presenting an absorption maximum at 555 nm. A mobile application was used for smartphone-based analysis to decompose the individual channels of the colour model representations. The determination was performed using three smartphones followed by a comparison of the outcomes with spectrophotometric measurements. The most optimal analytical parameters were achieved for the H channel. The linear ranges obtained for the smartphone-based method proved to be comparable to the spectrophotometric range of 0.044–1.500 g dm−3 and were 0.049–1.500 g dm−3, 0.057–1.500 g dm−3, and 0.040–1.500 g dm−3 for Smartphones 1–3, respectively. Moreover, the determined coefficients of variance (CV, n = 9) and limits of detection (LOD) were 2.3% and 0.015 g dm−3, 6.2% and 0.017 g dm−3, and 2.5% and 0.012 g dm−3, respectively. Whereas for spectrophotometry, the obtained precision, CV was of 0.9% and a LOD of 0.013 g dm−3. The accuracy of the method was verified using model samples, generally the results were obtained with accuracy better than 10.9% (relative error). The method was applied to the determination of vancomycin in drugs. The results obtained by smartphone-based colorimetry did not differ from the expected values for more than 2.6%, were consistent with each other and with the results of spectrophotometric determinations.


Introduction
Vancomycin is a glycopeptide antibiotic. Its molecule consists of seven-membered peptide chains forming a tricyclic structure with an attached disaccharide composed of vancosamine and glucose ( Fig. 1) [1].
The history of antibiotic begins in the 1950s, when it was originally isolated from organism Amycolatopsis orientalis [2]. The extracted substance was able to eradicate Gram-positive bacteria, including penicillin-resistant staphylococci.

3
The increased use of the drug after its introduction resulted in the acquisition of resistance by many bacteria strains. Moreover, many adverse effects have been reported after years of treatment with vancomycin. The drug is currently considered an antibiotic of last resort, mainly used to treat severe or resistant staphylococcal and enterococcal infections. It may also be used for moderate infections in patients who may be allergic to first-line antibiotics (such as penicillins) [2,3].
Due to the possible development of drug resistance to vancomycin and the numerous adverse effects of the drug, it is essential to carefully follow the dosing procedures for the antibiotic and to subsequently monitor its levels in blood and other body fluids.
Many analytical methods have been developed to determine vancomycin. The methods are characterized by varying degrees of complexity, sophistication, or greenness. When considering Official Compendia, the British Pharmacopoeia [4], US Pharmacopoeia [5], and European Pharmacopoeia [6] describe the use of HPLC and microbiological assays for quantification of the antibiotic in drugs. The Japanese Pharmacopoeia [7] in turn also gives a microbiological test but rather than HPLC it indicates spectrophotometry with UV detection.
Regarding methods reported in the literature, chromatographic [8][9][10][11] and microbiological [12][13][14][15] are the most widespread. Nevertheless, several spectrophotometric [16][17][18][19][20], spectrofluorimetric [21,22], and electrochemical [23] methods can also be identified. The separation methods usually provide good analytical performance although they require specialized apparatus and often expensive and hazardous reagents employed in significant amounts. Similarly, the microbiological methods also require highly specialized equipment and expensive reagents; moreover, the measurements must be conducted under strictly controlled conditions. Noteworthy, spectrophotometric methods offer several advantages and may be successfully applied for the quantitative determination of vancomycin in drugs. In the majority, the spectrophotometric methods used to determine vancomycin are based on measuring the absorbance of the coloured complexes that the analyte forms with various reagents. Fooks et al. [19] proposed a method that relied on the reaction of vancomycin with the Folin-Ciocalteau's reagent in an alkaline medium. The product of the reaction was a blue-grey complex with an absorption maximum at 725 nm. El-Ashry et al. [17] developed a method that involved coupling the antibiotic with benzocaine in an alkaline medium resulting in an orange-yellow compound with a maximum Fig. 1 Chemical structure of vancomycin absorption at 442 nm. Three methods for the determination of vancomycin were proposed by Sastry et al. [20]. First, the analyte was oxidized with sodium metaperiodate excess and subsequently the product was subjected to three different complex reactions with three other reagents to obtain coloured complexes with absorption maxima at 620, 520, and 540 nm, respectively. While all these methods had good analytical performance, they employed toxic reagents and often required long waiting time and heating. During the experimental design stage, it was decided to use a rapid, simple and green method; therefore, it was agreed to test the method proposed by Junior et al. [16]. The method is based on the reaction of vancomycin with copper(II) in ethanol-water medium with pH 4.3. The reaction results in the formation of a blue-grey complex, presenting an absorption maximum at 555 nm. Its main advantage is the production of a small amount of chemical waste; moreover, it is environmentally friendly. The complex formed when the antibiotic reacts with copper(II) takes on a characteristic colour depending on the concentration of vancomycin. Therefore, it is particularly suitable for testing the method using digital imaging detection.
Smartphone technology has provided innovative possibilities and applications in various fields of science, including chemistry. Smartphones play significant role as detection systems in the development of novel analytical methods [24,25].
Various apps for different types of smartphone-based detection in chemical analysis were developed [25]. One of the mobile tools for colorimetric analysis is the application PhotoMetrix with further extensions PhotoMetrix PRO ® and PhotoMetrix UVC ® [32,38]. These applications allow the decomposition of digital images recorded by the smartphone camera and their processing in the same device, enabling detection without the need to use additional computer equipment. Image decomposition using PhotoMetrix PRO ® is possible in two ways. In the first one, a histogram is created based on the integral RGB model, which includes adding the primary colours: red (R), green (G), and blue (B). The second way is to independently decompose R, G, B channels and alternative RGB colour model representations, such as hue (H), saturation (S), and value (V) of the HSV model representation, and hue (H), saturation (S), and brightness (L); in the representation of the HSL model. Most of the methods developed using the PhotoMetrix PRO ® application employed univariate analysis based on a calibration curve. The analytical signal was measured for a single channel. Methods based on the use of multivariate analysis, including Principal Component Analysis (PCA) and Partial Least Squares (PLS) were also developed [32,38].
The aim of the study was to verify the feasibility of the determination of vancomycin in the colour reaction with copper(II) ions [16] using a digital image-based colorimetry, and to compare results of antibiotic determination obtained using three separate digital imaging systems. To the best of our knowledge, this is the first approach to determine vancomycin in drugs using a smartphone-based digital image colorimetry.

Preliminary studies
For the determination of vancomycin, it has been decided to adapt a rapid, inexpensive, and green method, wherein vancomycin reacts with copper(II) acetate in a water-ethanol medium (pH 4.3), resulting in a maximum absorbance at 555 nm [16]. To this aim, Junior et al. [16] used a copper(II) acetate solution in concentration of 12.00 g dm −3 . However, as appeared in preliminary studies, such a concentration of copper(II) acetate caused rapid precipitation. Hence, it was decided to conduct studies on the selection of an optimal concentration of the reagent. Spectrophotometric measurements were performed using standard solutions of various concentrations of copper(II) acetate: 12.00, 6.00, and 3.00 g dm −3 .
The results enabled the construction of calibration graphs with the following equations and coefficients of determination: for 12.00 g dm −3 (A = 0.104c + 0.002; R 2 = 0.999); for 6.00 g dm −3 (A = 0.105c + 0.002; R 2 = 0.999), and for 3.00 g dm −3 (A = 0.088c − 0.004; R 2 = 0.999), where A is absorbance and c is concentration/g dm −3 . It is clear that even a twice lower concentration of copper(II) acetate gives results nearly equal to those obtained in the presence of 12.00 g dm −3 reagent. The slopes of the curves and the determination coefficients for these curves are similar. For the reagent concentration of 3.00 g dm −3 the slope of the curve, and accordingly the sensitivity of the method, appears to decrease compared to the others. Therefore, it was decided to proceed with the study in the presence of copper(II) acetate at a concentration of 6.00 g dm −3 .
For the digital image-based analysis, mobile application PhotoMetrix PRO® (Santa Cruz do Sul, Brazil) in the univariate module was used. Initially, experiments were conducted directly on a laboratory counter under normal laboratory room lighting. However, due to the variable conditions, the results obtained were unsatisfactory. Several attempts were conducted using different light sources, at different positions of the smartphones and the cuvette to acquire the optimal measurement conditions. Finally, it was decided to construct a platform that would allow measurements to proceed in a reproducible and repeatable manner. A white box with a mounted cuvette holder was prepared to perform the measurements. The cuvette was illuminated using a ring lamp. The smartphone was housed in a tripod and positioned vertically at a distance of 5 cm from the cuvette. The selected region of interest was 16 × 16 pixels. For each smartphone, the measurements proceeded in the exact same manner. First, the solution in the cuvette was analyzed with the spectrophotometer, followed by Smartphone 1, Smartphone 2, and Smartphone 3. Each solution was measured using digital imaging in five repetitions. Using three smartphones, the results obtained with the app were compared using cameras from different manufacturers and with different resolutions. The subsequent section presents the optimization stage, the selection of conditions for smartphone-based measurements, and the verification of the method.

Selection of conditions for smartphone-based measurements
The application PhotoMetrix PRO ® allows analysis in four colour spaces-RGB, HSL, HSV, and HSI. This implies that results are obtained for all solutions on eight channels-R, G, B, H, S, L, V, and I. The measurements for the calibration solutions were performed using three smartphones and to compare results, a spectrophotometer. Based on the received results, a calibration graphs were constructed, the linear ranges were determined, and certain analytical parameters were calculated. The data are summarised in Table 1.
The analyzed calibration solutions were different in terms of colour depending on the concentration of vancomycin. With increasing concentration of the antibiotic, the colour Table 1 Comparison of selected analytical parameters for the used method registered for various channels representing colour models using tested smartphones and spectrophotometer (A absorbance; c concentration/g dm −3 ; S analytical signal/a.u. (arbitrary unit); R 2 determination coefficient; LOD limit of detection, LOQ limit of quantification (n = 9); CV coefficient of variation for concentration 0.70 g dm −3 ) of the solutions changed from blue to grey-blue. Hence, a change in the hue was observed, and therefore, satisfactory results were expected for the H channel and for the channels from the RGB colour space. As can easily be observed by examining Table 1, that prediction has been confirmed regarding channel H. The best results were obtained for this channel, in terms of linearity range, coefficient of determination as well as LOD and LOQ, using each smartphone. Moreover, the data acquired on the remaining seven channels did not permit the fitting of any trend line in a great part. Therefore, in the subsequent stages of the study, only the output from channel H was considered.
Considering the H channel and the results obtained for each smartphone, there are differences between them. The sensitivity obtained for Smartphone 2 is about twice lower than for the other two smartphones, but this has no significant influence on the obtained LOD and LOQ values. It would seem that in the case of smartphone-based digital image colorimetry, the resolution of the camera of the phone used will be crucial, as this can have a direct impact on the image quality. However, our experiment indicates that other device parameters must also have a major influence on the results obtained. Smartphone 1 and 3 were manufactured by the same producer and their camera resolutions were different (16 Mpx vs. 12 Mpx). Smartphone 2 was produced by other manufacturer, but its camera resolution was similar to that of Smartphone 3 (13 Mpx vs. 12 Mpx).

Analytical characteristics of the developed method
Using the channel H, the quantitative measurements were performed for vancomycin in the concentration range from 0.00 to 1.50 g dm −3 . Equations of calibration graphs achieved from digital imaging measurements using various smartphones and from spectrophotometry are presented in Table 1. It was decided not to perform measurements over a wider range of concentrations, since this was unnecessary for analysis of drugs. The repeatability was represented by the coefficient of variation (CV, n = 9) for the concentration 0.70 g dm −3 . The limit of detection (LOD, n = 9) was established as a 3.3 times standard deviation of results obtained for the blank sample over the calibration slope. Afterwards the quantification limit (LOQ, n = 9) was calculated as 3 times LOD. The linear range, the calculated LOD and CV values are included in Table 1. Based on the analysis of Table 1, it is evident that the linear ranges for the smartphone-based method proved to be comparable to the spectrophotometric range of 0.044-1.500 g dm −3 and were 0.049-1.500 g dm −3 , 0.057-1.500 g dm −3 , and 0.040-1.500 g dm −3 for Smartphones 1-3, respectively. The determined precision and limit of detection values were 2.3% and 0.015 g dm −3 , 6.2% and 0.017 g dm −3 , and 2.5% and 0.012 g dm −3 , respectively. While for spectrophotometry, the obtained CV value was of 0.9% and a LOD of 0.013 g dm −3 .

Method verification
The verification of the method relied on the determination of vancomycin in model samples. The solutions included the following concentrations of the antibiotic 0.100, 0.300, 0.500, 0.700, 1.000, and 1.200 g dm −3 . The solutions were prepared as described in the Samples section. The measurements were performed using smartphones and with the spectrophotometric detection. According to the selected conditions for smartphone-based measurements, only data for the H channel were considered. The results of the vancomycin determination are presented in Table 2 along with the values of coefficient of variation (CV, n = 3) and relative error (RE).
It can be noted that the results obtained for vancomycin determination achieved with spectrophotometric measurements are characterised by a very good precision (CV < 4.5%) and accuracy (RE < 3.8%). Regarding the results of precision and accuracy obtained using the smartphone-based measurements, they are generally lower (14.1 and 10.9%, respectively), but can be also considered as satisfactory. The only exception are the results obtained for concentrations of 0.100 and 0.300 g dm −3 using Smartphone 2, where the results were obtained with poorer accuracy (RE = 31.9% and 12.8%, respectively).

Determination of vancomycin in authentic samples
The developed procedure was applied to the determination of vancomycin in drug samples. The samples were analysed in triplicate. The procedure for preparing sample solutions is described in the Samples section. The results of the determinations, along with the analytical parameters, are presented in Table 3.
It can be observed that generally, the obtained results of the determination of vancomycin in drug samples compared to the expected concentration values (declared by manufacturers), in all cases are characterized by good accuracy (RE < 2.6%).
Moreover, the results achieved by different smartphones are consistent with each other and they correspond to the result received by spectrophotometry. Most of the results is also consistent with the expected values. However, spectrophotometric results and the result of the determination using Smartphone 3 (for Sample 1), although they do not differ from the expected for more than 2.6% (RE), cannot be regarded as consistent with the expected values. The reason relates to obtained in these cases narrow confidence intervals connected with good precision. It should be also noted, that for the expected values, the confidence intervals were not provided.
Good precision and accuracy confirm analytical usefulness of the developed method for vancomycin determination in drug samples.
Comparing to other methods reported in the literature, the approach presented in this work is characterized by good sensitivity and a relatively wide linear range. The analytical parameters obtained for the digital image-based colorimetry compared with analytical parameters of other methods are presented in Table 4. The LOD values achieved with smartphones are comparable to those obtained using UV-Vis methods. The use of smartphones offers good analytical parameters, at the same time it is low-cost, uncomplicated and the analysis can be performed at any place.

Conclusions
The feasibility of determining vancomycin in a colour reaction with copper(II) ions using smartphone-based digital image colorimetry was tested and the results of antibiotic determinations obtained using three different digital imaging systems were compared. The PhotoMetrix PRO ® app was proven to be a very useful tool for smartphone-based digital image colorimetry. Furthermore, it has been demonstrated that the finest results were obtained with the H channel using this app, regardless of the smartphone model. The approaches presented in this study offer good sensitivity and a relatively wide linear range. The analytical parameters obtained for smartphone-based digital image colorimetry are comparable with spectrophotometric reported in the literature for the determination of vancomycin in drugs. The method was verified through the determination of vancomycin in model samples, with subsequent determination of the substance in authentic samples. The results received for both model and authentic samples are satisfactory and confirm the analytical usefulness of the developed method for drug analysis. To the best of our knowledge, this is the first approach to the determination of vancomycin in drugs using smartphone-based digital imaging colorimetry.

Samples
The proposed method was tested with the use of six model samples of different known concentrations of vancomycin ( Table 2). In addition, two authentic samples were analyzed-one sample of drug (Pharmex Group, Boryspol, Ukraine) and the second one of different purity (≥ 85%, Pol-Aura, Dywity, Poland). Both vancomycin sample solutions were prepared by dissolving 30.00 mg of the substance in 25 cm 3 of Buffer 1 to obtain concentration 1.20 g dm −3 . The solutions of the authentic samples were prepared according to the procedure described in the section Procedure for measurements to obtain 0.60 g dm −3 concentration of vancomycin in the sample solutions (Table 3).

Instrumentation
Spectrophotometric measurements were performed using Lambda 25 UV-Vis spectrophotometer (Perkin Elmer, Waltham, USA) equipped with UV-WinLab software (Perkin Elmer, Waltham, USA) and 10 mm path length glass cuvettes (1 × 1 × 4.5 cm) (Perkin Elmer, Waltham, USA). Digital imaging measurements were performed on a homemade, simple platform consisting of a smartphone equipped with PhotoMetrix PRO ® application as an imageanalyzing device, in the smartphone holder, glass cuvettes (1 × 1 × 4.5 cm) mounted on a cell holder and a box with white cartoon paper as a background diffuser. The cell holder was illuminated using a ring lamp (Tracer, Warszawa, Poland). The platform was fixed on worktop where the smartphone and the diffuser were set at a 5 cm distance from the cell holder. The camera was positioned at a 90° angle to the cuvette, at its mid-height. Three smartphones with different camera sensor resolutions were deployed: Smartphone 1 (Samsung Galaxy S7; camera matrix 12 Mpx), Smartphone 2 (Xiaomi Redmi 9C NFC; camera matrix 13 Mpx) and Smartphone 3 (Samsung Galaxy A40; camera matrix 16 Mpx). Table 3 Results obtained for authentic samples using spectrophotometer and tested smartphones (mean concentration ± confidence interval (n = 3, α = 0.05) obtained using the developed approach; RE relative error (|RE|/% = ((determined value − expected value)/expected value) ·100%))

Procedure for measurements
The calibration solutions of vancomycin were prepared in the range of 0.00-1.50 g dm −3 . The solutions were prepared directly in 3.0 cm 3 glass cuvettes. Therefore, to obtain required calibration solutions, appropriate volume of 3.00 g dm −3 vancomycin stock solution was added to cuvette, made up to 1.5 cm 3 with Buffer 1 and then mixed with 1.5 cm 3 of 6.0 g dm −3 solution of copper(II) acetate.
The preparation of such solutions provides suitable conditions (pH 4.3) for the formation of a grey-blue complex of vancomycin with copper(II) ions. After 5-10 min, spectrophotometric measurements were performed. Absorbance was measured at 555 nm, at three replicates for each solution (Table 1). Subsequently, digital imaging measurements were conducted with five replicates for every solution. For sample solutions, the measurement procedure was performed in the corresponding manner.

Procedure for digital image processing
The captured images were directly analyzed in PhotoMetrix-PRO application. The selected region of interest was 16 × 16 pixels in all instances. After each image was captured, data for 8 channels-R, G, B, H, S, L, V, and I-corresponding to the different colour space models were obtained in the application (Table 1). When optimized, the results were interpreted based on the single, most optimal channel. The signal for RGB was calculated as the average of the signals on the R, G, and B channels.
Open Access This article is licensed under a Creative Commons Attribution 4.0 International License, which permits use, sharing, adaptation, distribution and reproduction in any medium or format, as long as you give appropriate credit to the original author(s) and the source, provide a link to the Creative Commons licence, and indicate if changes were made. The images or other third party material in this article are included in the article's Creative Commons licence, unless indicated otherwise in a credit line to the material. If material is not included in the article's Creative Commons licence and your intended use is not permitted by statutory regulation or exceeds the permitted use, you will need to obtain permission directly from the copyright holder. To view a copy of this licence, visit http:// creat iveco mmons. org/ licen ses/ by/4. 0/.