# Mail Inspection Based on Terahertz Time-Domain Spectroscopy
This measurement provides more than one million pixels, but was taken with a solid-state-laser-based terahertz time-domain spectroscopy (TDS) system filling an optical table with an overall measurement time of several hours. (**a**) Closed envelope as measured with indication of scanned area. (**b**) Content of the envelope consisting of several layers of paper, a radio-frequency identification (RFID) ski card, various wires and electronic components as well as two bags of substances. (**c**) Terahertz transmission image based on the transmittance. (**d**) False-color image retrieved by the evaluation of the time delay of the peak in each pixel’s waveform. Figure 2 shows another evaluation result of the same data using well-known spectra of two substances, which were inserted in the mock-up as powder bags. A similarity evaluation by using the square of the Pearson correlation coefficient \(r\) of each pixel's spectrum and the database spectra enables a pixel-wise identification of the hidden substances inside the envelope. This coefficient is defined as  
\[r=\frac{\sum_{i=1}^{N}\left(A_{i}-\overline{A}\right)\left(B_{i}-\overline{B} \right)}{\sqrt{\sum_{i=1}^{N}\left(A_{i}-\overline{A}\right)^{2}}\sqrt{\sum_{i =1}^{N}\left(B_{i}-\overline{B}\right)^{2}}} \tag{1}\]  
with the \(i\)-th of \(N\) spectral amplitudes \(A_{i}\) and \(B_{i}\) of the sample measurement spectrum and database spectrum, respectively, while \(\overline{A}\) and \(\overline{B}\) are the means of the spectral amplitudes of the two spectra within the considered spectral width covering \(N\) elements. This example proves that not only the see-through capability of terahertz radiation can be used, but also the fingerprint-like spectral identification. It should be pointed out that besides the high similarity of bags to the known substances there is also a high dissimilarity of the residual ingredients of the sample. This is also a very important point concerning high detectability, which corresponds to a low false positive rate. Figure 3 shows exemplary spectra of some explosives, drugs as well as so-called simulants. These simulants are often used for research and engineering purposes, as the handling of drugs and explosives is often restricted and of course harmful [15]. Further advantages of using such simulants are their relatively low costs as well as their simple and worldwide access. As can be seen, even though the number and sharpness of the features in the terahertz frequency range is limited--especially in comparison to infrared or mid-infrared spectral fingerprints--the spectral fingerprints enable to distinguish between the shown materials. Our goal was not to generate a mail scanning system, which is able to check thousands of mails within mail distribution hubs, but systems for small offices and correctional facilities, where the used kind of radiation does not affect the people in the closest surrounding of the device. There were several requirements and challenges at the same time we had to meet. Due to the offices' space restrictions, the system should be as compact as possible on the one hand and fully integrated on the other. A user-friendly graphical user interface and an easy to use intuitive software are very important since the operators working with the mail scanners are normally not technicians. The trade-off between scanning area and scanning speed has to be solved in terms that at least an envelope for DIN A4-letters--that means DIN C4-dimensions of 324 \(\times\) 229 mm2--can be examined within a few minutes only. Figure 2: Spectral imaging example. For color-coding of the pixels, the similarity (square of the Pearson-correlation coefficient) to known spectra (**a**) of two substances (\(\alpha\)-Lactose monohydrate and salicylic acid) was used as well as the transmission (gray color coding). The spectral information in each pixel enables the identification of the powder bags included in this sample (**b**). Spectra are vertically shifted for better readability.