1 Introduction

Terahertz frequency band lies between microwave and infrared band in the electromagnetic spectrum [1, 2]. Compared with microwaves, terahertz radiation has a higher frequency enabling a better spatial resolution. Compared with infrared radiation, terahertz radiation can transmit through common clothes and see the items beneath clothes [3, 4]. When being compared with X-ray, terahertz radiation is harmless to humans [5]. These unique properties make terahertz imaging an ideal way for the detection of concealed suspected dangerous items carried on human bodies.

There are several types of terahertz imaging methods for practical applications commonly reported in the publications such as quasi-optical focal plane imaging [6, 7], compressive sensing imaging [8, 9], three-dimensional radar imaging [10, 11], and fan-beam scanning aperture synthesized imaging [12], etc. Synthetic aperture radar (SAR) imaging [13] and sparse aperture imaging [14, 15] commonly used in microwave and millimeter wave frequencies are potential candidates for terahertz imaging in the near future. Among these imaging techniques, quasi-optical focal plane imaging has the simplest system configuration and is one of the most suitable choices for passive terahertz human body imaging.

In the past, the price of terahertz detectors are high that few researchers can afford to use detector arrays in their works. For quasi-optical focal plane imaging, to save the cost, the simplest setup is to mount the terahertz detector(s) or the object to be imaged on a two-dimensional translation stage and the image is produced by a point-wise scanning [16], this method is time consuming, so it is not suitable for human body imaging. To improve the imaging speed without increasing the cost, some researchers developed particular scanning techniques which can complete a full image of a person within a few seconds using only one terahertz detector [17, 18]. Although the imaging time is dramatically decreased compared to point-wise scanning with a two-dimensional translation stage, it is not competent for the situations where screening moving people by real-time imaging are required. Fortunately, the price of terahertz detectors is dropping continuously thanks to the development of terahertz detection technologies. The price of one-dimensional terahertz detector array is becoming more and more affordable in recent years.

In this work, we developed a passive video-rate terahertz imaging system based on a one-dimensional terahertz detector array and a fast scanning module. Furthermore, we also designed a calibration module which can calibrate the terahertz detectors in real-time without disturbing the imaging process. Based on the terahertz image, we also developed a concealed object automatic detection method using deep learning algorithm to remind the system operator for further checking. Our terahertz imaging system does not require an external terahertz source, can realize fast video-rate imaging, and is cost-effective and smart, which will have great potential in the security checking market.

2 System design

2.1 System configuration

Figure 1a shows the configuration of the imaging system. The terahertz waves emitted from a human body standing at the object plane transmitted through a terahertz window made from Teflon into the imager, and were reflected by the scanning module. Then, they were focused onto the detector array by a lens. A fixed mirror was inserted between the lens and the detector array to fold the terahertz beam so as to minimize the system size. A calibration module was set in front of the detector array to calibrate the detectors in real-time. Figure 1b shows the scanning path which will be discussed in detail in Sect. 2.3.

Fig. 1
figure 1

(a) Terahertz imaging system configuration and (b) the scanning path

2.2 Optical system

The quasi-optical systems used in the passive terahertz imaging systems can be roughly divided into transmission [6] and reflection [7] optical systems. The former was consisted of lenses, while the latter was consisted of mirrors. The transmission configuration can reach a lower paraxial aberration with the same number of optical components compared to the reflection configuration, due to the fact that a lens has two faces whose geometries can be adjusted. For the materials commonly used to fabricate terahertz lenses such as Teflon and Polyethylene, the reflection loss is ~ 8% per lens for the lack of coating materials in this frequency band. The reflection configuration has a higher receiving efficiency since the reflectivity of a metallic mirror is more than 99%, but it has a more complex structure since it needs at least two mirrors to optimize paraxial aberrations. In this work, we chose transmission configuration for its simplicity, and use only one Teflon lens to minimize the reflection and transmission loss.

To obtain the desired spatial resolution, the diameter of the lens was selected to be 40 cm according to the Rayleigh criterion. The object and image distances were chosen to be 2.5 m and 1.0 m, respectively, so the magnification of the optical system was 2.5 m/1.0 m = 2.5. The surface shape of the lens was optimized by ray-tracing method and aspheric shape was selected to minimize spherical aberration. The simulation results are shown in Fig. 2a. The geometric optical aberrations were optimized except field curvature. Then, we rearranged the detectors from a linear array in Fig. 2a into a curvilinear array with an approximate radius of curvature of about 22 cm as shown in Fig. 2b. From Fig. 2b, we can see that the field curvature was obviously minimized.

Fig. 2
figure 2

Design of the lens using ray-tracing method

From the ray-tracing simulation results shown in Fig. 2, we can see that the aberrations are almost eliminated in the entire field of view, so the resolution of the optical system is determined by diffraction. In order to evaluate the system resolution more accurately, we simulated the image pattern of a point source by GRASP to get the point spread function of the system as shown in Fig. 3.

Fig. 3
figure 3

Simulated image pattern of a point source by GRASP: (a) simulation model; (b) simulation results

Then, we designed a resolution test chart similar to USAF1951 resolution chart commonly used in optical frequencies [7] by scaling it to a size suitable for our imaging system. The chart is composed of different stripe pairs as shown in Fig. 4a, there are three different sizes of stripes with widths of 1.0 cm, 1.5 cm and 2.0 cm, respectively, and the distance between two adjacent stripes in a group is the same as the stripe width. Each type of the stripe pairs has two orientations: horizontal and vertical, so a total of six groups of stripe pairs are included in the test pattern. At last, the image of the resolution target shown in Fig. 4b was obtained by the convolution of the resolution test chart and the point spread function.

Fig. 4
figure 4

(a) Resolution test chart and (b) its simulated image

From the figure, we can see that the stripe pairs with width of 1.0 cm are blurred and can not be distinguished. The stripe pairs with width of 1.5 cm can be distinguished and the stripe pairs with width of 2.0 cm can be clearly distinguished. Therefore, the resolution of this imager can achieve 1.5 cm according to the simulation results.

2.3 Detector array and data acquisition

We use the W band radiometers (Farran Technology Ltd., PMMW-10-0001) with a 50 dB gain and a 3.5 dB noise figure as the terahertz detectors. The radiometer consists of two GaAs MMIC amplifiers, a zero-biased Schottky detector and an instrumentation amplifier, and has an output voltage proportional to the input terahertz radiation power. To match the quasi-optical system, we designed the receiving antenna which had the beam width close to the viewing angle of the lens as illustrated in Fig. 2.

The detectors were arranged to a curvilinear array as exhibited in Sect. 2.2. All the antennas point at the center of the lens. According to the Nyquist sampling theory, to achieve a resolution of 1.5 cm in an optical system with a magnification of 2.5, the spacing between two adjacent detectors needs to be smaller than 6 mm. Restricted by the width of the detectors, which is 14 mm, at least three rows of interlaced placed detectors are needed to form the array. In our system, the detector array was composed of 2 interlaced placed rows, and 16 detectors were used in each row. Therefore, the spacing between two adjacent antennas is 7 mm, and it is slightly underestimated. The width of the field of view is about 55 cm at the designed image distance. Figure 5a shows the detector array.

Fig. 5
figure 5

(a) Detector array; (b) data acquisition device

As shown in Fig. 5b, we designed a 50-channel data acquisition device with a sampling rate of 2 MS/s, and an ADC resolution of 16 bits to convert the analog outputs of the detectors into digital data and transmit it into the control computer for further data processing.

2.4 Mechanical scan

The above-mentioned optical system and detector array can only image two horizontal lines in the field of view. To get the full image, a mechanical scan module is required. Some previous work were reported using a flapping mirror combined with a one-dimensional detector array to produce a full image [19, 20]. To avoid mechanical vibration caused by the oscillation of the flapping mirror, which will decrease image quality, we designed a continuously rotating scanning module composed of three flat mirrors, which can rotate continuously around the rotation axis as shown in Fig. 1. For each mirror, there was a certain position (called working position in the following) that it can reflect the terahertz waves emitted from the field of view to the detector array. In these working positions, the scanning module needs to rotate 30° to form a full image of the field of view. In a full rotation, there were three working positions and three images can be produced. The rotation speed of the scanning module was set to be approximately 3.33 /s so as to achieve a frame rate of 10 fps. The positions between two working positions were idle positions which were useless for imaging and can be used for calibration of the detector array as discussed in detail in Sect. 2.5.

As shown in Fig. 1b, the solid and dashed lines represent the scanning path of the detectors in each row. There was a time delay between the two rows of detectors in the scanning path, which was determined by the spacing between the two rows, and the rotation speed of the scanning module. This time delay was eliminated by shifting the data corresponding to the outputs of the detectors in each row.

2.5 Real-time calibration

For a detector with linear response, the output voltage \(V = {\text{k}}x + {\text{b}}\), where \({\text{k}}\) is the responsivity, \(x\) is the power of input terahertz waves, and \({\text{b}}\) is the DC offset. Each detector had its own responsivity and DC offset. Especially, the DC offsets varied over time due to drift of amplifiers in the detectors, so the detector array were needed to be calibrated in real-time to avoid stripes in the images caused by the non-uniform DC offsets. A commonly used calibration method is to use back ground radiometric temperature in the upper region of the field of view on the assumption that the terahertz radiations in that region is uniform [19]. This method has two limitations. One is that it can only calibrate DC offsets, and cannot work for responsivity calibration. The other is the upper region of the field of view must be uniform in materials and temperatures. The calibration will be invalid when terahertz sources such as an incandescent lamp appears in this area. To overcome such limitations, we here propose a calibration method not only did not depend on the surrounding environment but can also calibrate responsivities and DC offsets simultaneously.

The calibration module was composed of a plate of room-temperature absorber denoted as the hollow section in Figs. 1 and 6 which radiated relatively low power terahertz waves. A plate of high-temperature absorber denoted as the solid section which radiated relatively high power terahertz waves. The high-temperature absorber was heated by an electrical heater to around 38 ℃ so that the radiated terahertz waves had approximately the same power density as the terahertz waves emitted from a human body.

Fig. 6
figure 6

Benchmark positions of the calibration module

Both absorbers rotated continuously around the rotating axis. The azimuthal angle of the calibration module was denoted as \(\beta\) as shown in Fig. 1. In the rotating process, the calibration module experienced several benchmark positions as shown in Fig. 6. In Fig. 6a, c, the detector array was blocked by the room-temperature absorber and high-temperature absorber, respectively. These two positions were used for calibration. In Fig. 6b, d, terahertz waves can transmit through the calibration module without any disturbance. These two positions were used for detecting terahertz waves from the object plane and to form the terahertz images of the field of view.

In Fig. 6a, the detectors were blocked by the room-temperature absorber, when the output voltage of the nth detector was \(V_{{{\text{n1}}}}\). In Fig. 6c, the detectors were blocked by the high-temperature absorber, when the output voltage of the nth detector was \(V_{{{\text{n2}}}}\). In the imaging process, the calibrated output voltage of the nth detector was \(V_{{{\text{nc}}}} = \left( {V_{{{\text{no}}}} - V_{{{\text{n1}}}} } \right)/\left( {V_{{{\text{n2}}}} - V_{{{\text{n1}}}} } \right)\), where \(V_{{{\text{no}}}}\) was the original output voltage of the nth detector before calibration.

2.6 System control

There was a strict position relationship between the scanning module and the calibration module to image and calibrate correctly. When the calibration module rotates to the positions shown in Fig. 6b, d, the scanning module must be at working positions so that one of the mirrors can reflect the terahertz waves emitted from the object plane to the detector array. That is to say, we can only calibrate the detector array when the scanning module was at the idle positions. This relationship must be kept through-out the whole working process, or the imaging process would be disabled by calibration. In our case, the position relationship was kept by setting the correct initial positions and keeping the relative velocity of the two modules by a mechanical design.

To keep the relative velocity stable between the scanning module and the calibration module, we connected them into the same motor using a timing belt and timing pulleys. The teeth ratio of the timing pulleys for the scanning module and the calibration module is 3:2 according to the required relationship. To set the correct initial positions of the scanning module and the calibration module so as to avoid the time delay between the two modules. First, the calibration module was set at \(\beta = {9}0^\circ\). Then, the scanning module was set to a position that it can reflect the terahertz waves emitted from the middle part of the field of view to the detector array. At last, the two modules are connected by the timing belt as mentioned above.

Figure 7 depicts the data acquisition process within a rotation period of the calibration module. At around \(\beta { = 0}^\circ (360^\circ )\), the output voltages of the detectors corresponding to the terahertz emission from the low-temperature absorber were acquired. At around \(\beta = {18}0^\circ\), the output voltages of the detectors corresponding to the terahertz emission from the high-temperature absorber were acquired. For \(\beta { = 90}^\circ (270^\circ )\), the output voltages of the detectors corresponding to the terahertz emission from the object plane were acquired. The calibration data were updated along with the rotation of the calibration module with a frequency of 2.5 times per second. Therefore, the DC offsets of the detectors varying over time can be calibrated simultaneously within the imaging process.

Fig. 7
figure 7

Data acquisition process

3 Experimental results

3.1 Real-time calibration

Figure 8 illustrates the terahertz images of a human body during 45 min with and without real-time calibration. It can be observed from the images that in the first 5 min, images were almost the same for both situations with and without real-time calibration. However, in the case without real-time calibration, vertical stripes appeared after 10 min and gradually became clear 20 min later, and severely affected the image quality after 30 min. On the other hand, in the case with real-time calibration, the images were always with good quality without obvious stripes appearing. In fact, this calibration method was effective after several weeks of continuous operation, and no adjustments were required during the operation process. It is known from the experimental results that it would take about 10 min for the variation of the detectors to affect the image quality, so the detectors must be calibrated within every 10 min. The calibration data updating frequency in our system was 2.5 times per second as designed in Sect. 2.5 which was fast enough for real-life applications.

Fig. 8
figure 8

Images of a human body during 45 min without (a) and with (b) real-time calibration

Fundamentally, because the room-temperature absorber and the high-temperature absorber are highly uniform objects, this calibration method is not easily affected by the surrounding environment and does not require the back ground radiometric temperature in any region of the field of view to be uniform during the imaging process. This advantage is of great importance when the surrounding environment can not be controlled in practical applications such as in airports and railway stations.

3.2 Imaging results

The prototype of the imaging system is shown in Fig. 9. To evaluate the resolution of the imaging system, we fabricated the resolution test chart discussed in Sect. 2.2. The resolution test chart was consisted of a heatable panel, a plate of absorber and several groups of metal stripe pairs with the same pattern shown in Fig. 4a which were attached on the front side of the absorber. The heatable panel was attached on the back side of the absorber to heat the absorber to about 38 ℃ to simulate the terahertz radiation from a human body. The photo of the resolution test chart is given in Fig. 10a, and its terahertz image obtained by our system is exhibited in Fig. 10b.

Fig. 9
figure 9

Photos of the prototype

Fig. 10
figure 10

The photo of the resolution test chart (a) and its terahertz image (b)

From Fig. 10, we can see that the stripe pairs with width of 1.0 cm are blurred and can not be distinguished, while the stripe pairs with width of 1.5 cm and 2.0 cm are discernible. It is in good agreement with the simulation results, proving the resolution of this imager is better than 1.5 cm.

To test the capabilities for detecting hidden objects, we selected several typical objects including a toy metal gun, a ceramic knife, a bag of flour and a bottle of water to simulate common dangerous items such as guns, knifes, explosives and flammable liquids. Figure 11 shows the terahertz images of persons with the above-mentioned objects hidden beneath clothes, with the photos of the samples were located at the lower side of the corresponding terahertz images. We can see that the profiles of the objects can be clearly seen in the terahertz images. Figure 12 shows the results of some other passive terahertz imagers reported in the publications, providing a comparison with the results of this work.

Fig. 11
figure 11

Images of person with samples beneath the clothes

Fig. 12
figure 12

Passive terahertz images reported in the publications: (a) [4]; (b) [7]; (c) [17]; (d) [18]

3.3 Automatic detection

Although the hidden objects can be clearly seen from the terahertz images by human eyes, it is preferable if the imaging system can discover the hidden objects automatically and remind the operator for further checking. Compared with optical or infrared images, passive terahertz images suffer from defects such as low signal-to-noise ratio, low resolution, low contrast ratio and lack of color information. In the past several years, lots of auto-detection algorithms [21,22,23,24,25] were developed to solve these problems of terahertz images. Among these algorithms, convolutional neural network (CNN) is currently one of the most successful methods for image processing tasks such as classification, segmentation, and object detection. Here, we developed an automatic target detection algorithm based on YOLO V3 [26] to discover and mark the hidden objects in terahertz images.

Figure 13 shows the processing results of the automatic detection algorithm, the images in Fig. 13a are the original terahertz images, and the images in Fig. 13b are the corresponding images after processing. The persons are marked with green rectangles and the hidden objects are marked with read rectangles. We can see from the images that the algorithm has the following features:

Fig. 13
figure 13

The results of image optimization and automatic detection: (a) original images; (b) images after processing

(1) The signal-to-noise ratio and contrast were improved. The relatively low contrast of the ceramic knife was improved, and the knife can be seen more clearly after processing;

(2) The human bodies can be identified independently of the postures, even when there was only a part of the human body appeared in the field of view;

(3) The hidden objects can be discovered and marked automatically with high accuracy without sensitivity to the postures.

In summary, this algorithm was capable for terahertz image processing tasks such as segmentation and auto-detection, and can be used to assist the system operators to localize the hidden objects.

4 Conclusions

In conclusion, we successfully realized a passive video-rate terahertz human body imager which can screen moving people to discover the concealed objects from a distance without direct contacts. An automatic target marking algorithm based on CNN was developed. Basically, since the imaging system was based on passive terahertz imaging technology, there were no electromagnetic radiations emitted from the imager and it is absolutely harmless to both the equipment operators and the persons to be inspected. The imaging system developed in this work may be widely used as a security check equipment to prevent public security events from happening in public areas such airports, railway stations and gymnasiums. In the future, we will upgrade this imager in two aspects. One is to use higher frequency terahertz detectors to achieve a more precise image and to develop new auto-detection algorithms with higher accuracy. The other is to develop an equipment that cannot only discover but also recognize the objects concealed beneath clothes based on the fact that most explosive molecules and biomolecules have their unique spectral features in the terahertz frequency band.