# Detection of Azo Dyes in Curry Powder Using a 1064-nm Dispersive Point-Scan Raman System
## 2 Materials and Methods
### Spectral Image Analysis  
For identification of Sudan-I and metanil yellow mixed separately with curry powder, the hyperspectral images were analyzed in ENVI (4.5, IIT Visual Information Solutions, Boulder, CO, USA). The hyperspectral images of the curry powder-Sudan I sample across all the concentration  
Figure 1: Acquisition of Raman spectral image by point-scan method. range were converted into a single band images using the spectral peak of Sudan-I. Similarly, curry powder-metanil yellow hyperspectral images were converted into single band images using the spectral peak of metanil yellow. It was observed that the spectral intensity of the Sudan-I and metanil yellow were intense compared to the spectral intensity of curry powder in the single band images. An intensity threshold value was set to obtain binary detection images by converting all the pixels with intensities below the threshold value into background (curry powder) pixels, and the pixels with intensities above the threshold value into white pixels representing the chemical contaminant in the mixture. The hyperspectral Raman image of curry powder-Sudan I-metanil yellow mixture sample contained mixed spectral information of each component. The three-dimensional hyperspectral Raman image (100 \(\times\) 100 \(\times\) 512) of the sample was reshaped into two-dimensional spectral data (10,000 \(\times\) 512) using Matlab (R2013a, MathWorks, Natick, MA, USA). The mixed spectral signal from the mixture sample was decomposed into pure component spectra of individual components using the self-modeling mixture analysis (SMA) method. Using SMA requires a pure variable in the mixed spectral data. This is the Raman wavenumber at which only one component contributes significant signal intensity. SMA determines pure variables in the first step; next it resolves mixed spectral data into pure component spectra (and contributions) by alternating least squares method [29; 30; 31]. Extraction of pure components spectra by SMA requires obtaining a series of purity spectra, for which the average and standard deviation spectra of the data being analyzed is calculated. A correction factor is added to the average spectrum to reduce the effect of noise. The first purity spectrum is obtained by dividing the standard deviation spectrum by the average spectrum. The first pure variable is the Raman wavenumber with the maximum intensity in the first purity spectrum. The second purity spectrum is obtained by multiplying the first purity spectrum with the determinant-based weight function. The weight function is obtained by calculating the correlation matrix from the mixed data matrix being analyzed. The Raman wavenumber with the maximum intensity in the second purity spectrum is the second pure variable. The process of obtaining purity spectrum and pure variable is repeated until the purity spectra no longer exhibit spectral features [29; 30; 32]. The purity function in the PLS_Toolbox (Eigenvector Research, Inc., Wenatchee, WA, USA) was used to decompose the 10,000 \(\times\) 512 mixed spectral matrix from the sample mixture to obtain pure component spectra and corresponding score vectors. The score vectors (10,000 \(\times\) 1) of each component were converted into two-dimensional contribution images (100 \(\times\) 100) to match the spatial dimension of the hyperspectral Raman image of the sample. After obtaining the pure component spectra of two chemical contaminants, spectral information divergence (SID) was used to match each spectrum to their corresponding components. SID compares the dissimilarity between two spectra by relative entropy [33]. Two similar spectra with less discrepancy have low SID value. Each pure component spectra were compared with the reference spectra of the components and SID value was obtained. The spectra with least SID value was assigned as the spectra matching the component. The contribution images of each component were imported into ENVI for further analysis.