Background

Pharmaceutical analysis involves qualitative and quantitative determination of analytes and is also useful for the separation and purification of compounds from the mixture. The scientific discipline known as spectroscopy is concerned with the investigation of the relationship that exists between electromagnetic radiation and all kinds of materials. In addition to being the most effective instrument now accessible for the investigation of chemical structure, it is also utilized in the examination of a broad variety of substances [1]. Different spectroscopic [2,3,4,5,6,7], electrochemical [8,9,10], and chromatographic [11,12,13,14] methods have been developed to date for the estimation of isoniazid, but there is no method till date based on digital image colorimetry that is precise, portable, and easy to use.

UV–visible spectroscopy

Electromagnetic radiation in the wavelength range of 180–400 nm is considered as the UV region, whereas 400–800 nm is the visible region. This UV–vis wavelength of light is generally absorbed by a wide range of organic molecules and causes energy transitions at the electronic level. Various transitions, such as σ to σ*, π to π*, n to σ*, and σ to π* can take place in a molecule on the absorption of radiation. Chromophore is the moiety in which these electronic transitions occur and is responsible for the color of the compound. If the molecule doesn’t have a chromophore moiety, derivatization can be done to convert it into a UV–vis active form; so that it can absorb radiation and undergo electronic transitions. These techniques include complexation, enzymatic reactions, diazotization, etc. A similar occurrence arises when sample preconcentration is employed by any separation or extraction technique [15].

In recent times, there have been significant advancements in UV–vis spectrophotometers. These advancements aim to enhance sensitivity, precision, and accuracy, while also reducing costs and analysis time. Nanodrop UV–visible spectrophotometers and microplate spectrophotometer are the best advancements found in recent times, which can utilize a very small volume of sample and also analyze large number of samples at a time, thus supporting the principles of Green Analytical Chemistry. Portable colorimeters and spectrophotometers are also available these days which can promote in situ analysis.

According to Beer–Lambert’s law, absorbance is directly proportional to concentration within a concentration range. It is expressed as,

$$A \, = \, abc$$

Here, A represents absorbance or optical density, and a refers to the absorptivity or extinction coefficient. The path length b of the radiation passing through the sample is measured in centimeters. The concentration of solute in the solution c is an important factor to consider. Both b and a remain constant, indicating that a is proportional to c.

The selection of a solvent that is transparent to the wavelength selected for the study must be considered while preparing the solution. λmax is considered as a qualitative parameter for the analyte under study. Even though UV–visible spectrophotometric studies are more advantageous than other analytical methods, there are several drawbacks, such as the maintenance of the laboratory, the training of personnel, power consumption, etc. So there is a need for a simple colorimetric approach which is simple, economic, portable, and rapid without compromising its analytical performance [16].

Digital image colorimetry (DIC)

DIC is an innovative colorimetric method that uses the red, green, and blue (RGB) channels of photographs of a colored analyte solution, which are taken by digital cameras, webcams, hand scanners, or smartphone cameras. The numbers are 13 and 14. Smartphones are optimal devices for capturing images in this context due to their exceptional photographic capabilities, advanced software, and convenient mobility for image processing [3]. The advent of smartphone technology has revolutionized several scientific disciplines, including chemistry, by offering groundbreaking opportunities and applications. Smartphones play a crucial role as detecting devices in the advancement of new analytical techniques. Smartphones and digital cameras are used as digital imaging systems that rely on colorimetry. However, they may also be employed in fluorescence, chemiluminescence, and electrochemical approaches. The affordability, widespread availability, and user-friendly nature of smartphones have led to their use as instruments for the advancement of innovative analytical techniques in several fields, such as environmental monitoring, food analysis, and particularly biomedical and health tracking analysis [17].

Several applications were developed for colorimetric determination of compounds using smartphones. The choice of app for the present study was Photometrix, which has an extension version of Photometrix Pro® and Photometrix UVC®. It analyzes the digital images captured by the smartphone camera and decomposes the color of the picture into different channels such as R (Red), G (Green), B (Blue), H (Hue), S (Saturation), V (Value or brightness), L (Lightness), and I (Intensity) which can be constructed as the RGB model, HSL model, HSV model, and HIS model. The application is feasible with both univariate and multivariate analysis. Each sample will record the values obtained for every channel in the image. The Photometrix app has another advantage of obtaining a calibration curve for a series of concentrations kept for study, which makes it more feasible [18].

Principles of digital image colorimetry (DIC)

Key elements of digital image colorimetry systems encompass various aspects such as color spaces, tools for picture capture, illumination, applications for color quantification, and DIC applications. First, color spaces are carefully selected to meet different requirements, enhancing the precision of the analysis results. Here is a comprehensive overview of the commonly used color spaces.

Advancements in digital photography have made it more affordable and convenient to capture high-resolution images using a smartphone's digital camera. The potential for creating fast and affordable digital image correlation (DIC) on smartphones for various assessments, such as drugs, natural compounds, biomolecules, toxins, antibiotics, heavy metals, microbes, etc., is driven by the popularity of digital pictures.

Several advancements in digital image colorimetry took place because of computational capabilities and widespread usage of mobile phones. Smartphone-based studies were also applied to microfluidics and paper-based devices in several tests. These technologies are utilized for point-of-care testing in the healthcare sector and other businesses, also known as point-of-need testing. Hence, the digital image correlation (DIC) on smartphones is unambiguously scored as a 5 [19].

Photometrix pro

Due to more advancements in image acquisition and processing techniques in smartphones and their easy availability, several applications were developed for studying digital images. Digital images have revolutionized various applications that were once limited to specialized equipment like colorimeters, spectrophotometers, and fluorometers. Their effectiveness is well-documented. This function represents the distribution of luminous energy, in which some amount of energy is absorbed, some is transmitted, and the remaining portion is reflected. A device can capture the reflected and transmitted parts of the energy. Electronic devices may quickly acquire monochrome or color digital pictures utilizing charge-coupled device (CCD) or complementary metal oxide semiconductor (CMOS) sensors [20].

The various colors that the human eye perceives are a result of the different intensities of stimuli received by each type of cone. Despite the widespread use of RGB, alternative color models such as HSV, HSL, and HIS, which integrate hue, saturation, and value, also exist. Hue is commonly used to describe color, such as the difference between yellow and red. Saturation signifies the intensity of color [21]. The amount of light can vary, creating distinctions between different shades, like dark green and light green, or bark blue and light blue. In this context, value refers to the highest level of R, G, or B, while intensity is the average level of R, G, and B. Lightness, on the other hand, is the average level between the highest and lowest amounts of R, G, or B. In order to improve the image feature, several process techniques can be applied to obtain the image for the study [22].

This method presents a straightforward approach for analyzing color histograms on RGB and/or HSI scales. These tools have facilitated the development of an efficient, rapid, and reliable technique. The authors have introduced the utilization of a smartphone in a Bradford assay, which can determine protein concentration in biological samples. In this method, a smartphone spectrometer is employed, along with a G-Fresnel device that enables miniaturization by combining focusing and dispersion functionalities. This study suggests the creation of an application that can be used for analyzing and calibrating data from digital images taken with Android smartphones and Windows phones. The application will utilize simple linear regression and principal component analysis for univariate calibration and exploratory analysis [22].

The present study was aimed to determine isoniazid in tablets by the digital image colorimetry method using the photometric Pro application and comparing it with spectrophotometer. Isoniazid is a pyridine-carbohydrazide molecule (Fig. 1) used as an antitubercular medicine. INH exhibits solubility in water, ethanol, and chloroform, whereas it is insoluble in ether or benzene. It inhibits mycolic acid synthesis, which is an integral component of the bacterial cell wall. It shows a bactericidal effect on both intracellular and extracellular Mycobacterium tuberculosis. INH selectively inhibits the enoyl reductase enzyme by forming a covalent bond with the NAD co-factor of InhA in M. tuberculosis.

Fig. 1
figure 1

Chemical structure of isoniazid

Methods

The Folin–Ciocalteu (FC) reagent was procured from SD Fine Chemicals Pvt. Ltd. The isoniazid bulk drugs were purchased from Medico Remedies Ltd. The isoniazid pills, made by MacLeod’s pharmaceuticals Ltd., were obtained from a local pharmacy. The present investigation utilized a Shimadzu UV-1700 UV–visible spectrophotometer as a reference instrument. An Android smartphone equipped with the Photometrix Pro application was utilized for examination. 20% aqueous sodium carbonate solution; FC reagent solution (FC: water in 1:1 v/v) were utilized for this study.

100 ppm standard stock solution was prepared with distilled water as solvent. Sample stock solution was prepared by taking 20 tablets of INH, which were weighed and crushed into powder. A powder equivalent to 150 mg of INH was weighed, and a 100 ml solution was prepared using distilled water as a solvent. 1 ml of the prepared solution was pipetted into a 10 ml volumetric flask and the volume was made with distilled water.

Procedures

UV–visible spectrometry method

A volume of 0.5–2.5 ml of INH standard stock solution was pipetted into 10 ml volumetric flasks, and distilled water was added to bring the volume approximately to 5 ml. Then, 2 ml of FC reagent solution and 2 ml of sodium carbonate solutions were added, followed by covering with lids and keeping aside for 10 min. Then, the volumes were made up to the mark with distilled water.

Figure 2 demonstrates the use of water to raise the volume to the suitable level. A conventional solution was scanned using the visible wavelength range. The spectrum was used to identify the wavelength with the greatest absorption, which is commonly referred to as λmax. The absorbance of each solution was determined relative to a reagent blank that was prepared in a similar fashion but without INH [23].

Fig. 2
figure 2

Standard solution of various concentrations

Digital colorimetric method

In order to ensure an even distribution of light, LED lamps (2 watts) were inserted onto the upper surface of a sealed chamber. A perforated area was included on the front for securing the smartphone in order to capture images. The identical solutions that were employed for UV–visible spectroscopy were also utilized for digital image colorimetry. The closed-chamber contained the standard solutions, which were prepared in varying concentrations. The samples were the focus of the camera through the utilization of the Photometrix Pro application. The captured images underwent direct analysis with a 16 × 16 pixel region of interest selected, and the application extracted the data required for eight channels, i.e., R, G, B, H, L, S, I, V and each of which corresponded to a distinct color space model. Following an analysis of the obtained results, the optimal channel was chosen. The RGB signal was determined by averaging the values of the signals transmitted through the R, G, and B channels. Figure 3 depicts the specific parameters utilized in the Photometrix Pro application [22, 24,25,26,27].

Fig. 3
figure 3

Parameters used in photometrix pro-application

Validation parameters

Linearity A volume of 0.5–2.5 ml of isoniazid standard stock solutions was transferred from the take solution range into 10 ml volumetric flasks. Two milliliters of the prepared reagents were added to each volumetric flask, and after a 10 min period, the volume was adjusted to 10 ml using distilled water. Using Photometrix Pro, the images of the prepared solutions were analyzed and a calibration graph was generated.

Accuracy Accuracy was done by assessing % recovery of the drug from the formulation. It was done by spiking the standard stock solution into sample solution at different levels, such as 80, 100, and 120%. The prepared solutions were analyzed in photometrix pro app, and the %RSD values were calculated.

Precision Take 1.5 ml of standard, then pass it into the 10 ml volumetric flask, then add 2 ml of FC reagent and 2 ml sodium chloride after 10 min make the volume to 10 ml with distilled water. The procedure was repeated to prepare six samples. The samples were analyzed and the %RSD values were calculated.

LOD (Limit of Detection) LOD was calculated by using the formula LOD = 3.3 σ/s, where σ is the standard deviation of the intercept, and s is the slope obtained from linearity.

$${\text{SD}}\;{\text{of}}\;{\text{intercept}}\; = \;{\text{SE}}\;{\text{of}}\;{\text{intercept}}*\sqrt n$$

LOQ (Limit of Quantification) LOD was calculated by using the formula LOD = 10 σ/s, where σ is the standard deviation of the intercept and s is the slope obtained from linearity.

Greenness profile

Greenness of the developed analytical method was analyzed using Analytical Eco-scale (AES), AGREE, and BAGI tools [28,29,30]. AES relies on allotting penalty point to each aspect of environmental hazard and thereby reducing the penalty points from the total 100 score [31, 32]. AGREE is an application, which gives the pictogram in the form of a circle, dividing into 12 parts signifying 12 principles of GAC [33] and thus showing the overall greenness score in the center of circle [34]. BAGI (Blue Applicability Grade Index) evaluates the practicability of the method and gives the score in the range of 25–100 [35].

Results

Preliminary investigations

The FC reagent contains a special acid that, when combined with INH and sodium carbonate, produces a blue colored complex which can be detected at 760 nm. The FC reagent consists of 3H2O, P2O5, 13WO3, 5MoO3, and 10H2O. The presence of INH will reduce the ability of the FC reagent to reduce oxygen present in tungstate and molybdate, which results in the formation of blue color species. The FC technique involves a redox reaction between INH and ferric chloride, which takes place in the presence of potassium ferricyanide under mildly acidic conditions. The reaction results in a blue hue, with the most significant absorption taking place at 760 nm. The process of color development begins with the reduction of iron (III) in ferric chloride to iron (II), which then reacts with ferricyanide to produce Prussian blue. Look at the ultraviolet spectrum displayed in Fig. 4.

Fig. 4
figure 4

UV-spectra of isoniazid

Smartphone-based measurement

The research was conducted utilizing the Photo Metrix PRO® application, which supports evaluation in four distinct color spaces: RGB, HSL, HSV, and HSI. This indicates that outcomes are acquired for every solution across the following channels: R, G, B, H, S, L, V, and I. The solutions prepared for obtaining the calibration curve were evaluated through measurements conducted on three smartphones (S1, S2, S3), and the obtained results were subsequently compared using a spectrophotometer. Certain analytical parameters were computed, calibration graphs were generated, and linearity was assessed in accordance with the obtained results. Figures 5 and 6 illustrate the linearity graphs of the spectrophotometric and DIC methods, respectively. The linearity results shown by spectroscopic method and colorimetric method are comparable and have shown same R2 value of 0.993. This indicates the employed DIC method also following Beer–Lambert law same as spectroscopy. The precision and accuracy results are presented in Tables 1, 2, 3, and 4. The comparative results of all the validation parameters performed with spectrophotometer and digital image colorimetry are shown in Table 5.

Fig. 5
figure 5

Linearity graph of spectroscopy method

Fig. 6
figure 6

Linearity graph of DIC method

Table 1 Precision results for DIC
Table 2 Precision results for the spectroscopy method
Table 3 Accuracy results for DIC
Table 4 Accuracy results for spectrometry
Table 5 Comparative study of various validation parameters of the analytical method for various channels of digital image and spectrophotometer

Greenness of DIC method

Greenness of the developed DIC method was assessed by green metric tools Analytical Eco-scale, AGREE, and BAGI. AES gives the result in the form of points, i.e., 89 (Table 6). By assessing with AGREE tool, the method secured a score of 0.74 (Fig. 7), whereas with the BAGI assessment, the method achieved a score of 80.0 (Fig. 8).

Table 6 Analytical eco-scale points for DIC method
Fig. 7
figure 7

AGREE score for DIC method

Fig. 8
figure 8

BAGI score for DIC method

Discussion

The concentration of isoniazid had a significant impact on the color intensity of the calibration solutions that were evaluated. Depending on the amount of drug present, the color of the solution ranged from blue to a grayish-blue. As a result of the change in blue, it was anticipated that the B channel from the RGB color space would produce favorable outcomes, followed by the hue channel. Upon closer inspection, it is clear that the forecast that was made for channel B has been confirmed. For this channel, the best results were produced by using each smartphone. These results were attained in terms of linearity range, precision, and accuracy. Furthermore, the data that were received on the remaining seven channels did not permit the fitting of any trend line in a significant portion of the cases. As a consequence of this, the output from channel B was taken into consideration for the determination of isoniazid.

There are differences between the B channel and the findings that were obtained for each smartphone. In comparison to the data obtained by other technologies, the findings obtained by smartphone 1 are more precise and accurate. The resolution of the camera that was used for the research appears to play a significant part in colorimetric analysis that is based on smartphones, which directly affects the quality of the images. The camera resolution of smartphone 1 is 108 megapixels, whereas the resolution of smartphone 2 is 32 megapixels. Despite the fact that the smartphone 2 and the smartphone 3 were produced by separate businesses, the resolution of their cameras is the same (48 megapixels against 16 megapixels). As the method greenness assessed by using green tools showed 89 points by AES assessment, 0.74 by AGREE assessment and 80.0 by BAGI assessment, it indicates that the method is eco-friendly. The portability of the DIC method is an added advantage to the present method, which is one of the important principles of GAC.

Conclusions

The purpose of this study was to establish whether or not it would be possible to use digital image colorimetry conducted on a smartphone to identify the presence of isoniazid by analyzing the color interaction with FC reagent. Analyses were performed on the results that were acquired in relation to the medicine. The determinations were obtained through the use of digital imaging technologies which were present on three distinct smartphones. A comparison was done between the various systems that were involved. The PhotoMetrix PRO is a photographic measuring instrument that is on par with those used by professionals. There is evidence that the application that is based on smartphones offers a great deal of benefits. Image colorimetry in digital format is the subject of this conversation. On top of that, it has been demonstrated. The results obtained with the B were the most exceptional possible. Users are able to access the channel through the usage of this application, regardless of the particular type of their smartphone. There is a sufficient amount of sensitivity displayed by the approaches that are given in this research. The acquired analytical parameters for colorimetry through the use of smartphone-based digital picture analysis reveal that they are comparable to spectrophotometric methods published in the current literature for the purpose of quantifying isoniazid in pharmaceutical formulations. A validation of the approach was accomplished by analyzing isoniazid in both its conventional formulation and tablet form. The findings that were obtained for both the model and the real samples are considered to be sufficient, which confirms the analytical value of the technique that was recommended for drug analysis. Eco-friendly nature of the developed DIC method, assessed by green metrics proved its greenness. To the best of our knowledge, this work is the first attempt to measure isoniazid levels in pharmaceuticals by employing smartphone-based digital imaging colorimetry. This is the case, according to our current understanding.