Introducing the THz time domain CT system for evaluating kernel weight and plumpness of sunflower seed

The Terahertz (THz) time domain computed tomography (CT) system was used for evaluating kernel weight and plumpness of sunflower seed in present study. Specifically, a series of THz projections of the sunflower seed on a rotation stage were captured by a customized transmission mode THz time domain imaging system from different angles. These projections were preprocessed and then modelled by the inverse Radon transform to reconstruct the three-dimensional (3D) sunflower seed. The shapes and structures of sunflower seeds in reconstructed volumetric images were well presented. The volume ratio (obtained by THz CT imaging) and the area ratio (obtained by RGB imaging) of the whole seed to the kernel were calculated as 3D and 2D plumpness, respectively. The comparison between these two different plumpness indicating that our 3D plumpness can better describe the sunflower seed structure. Correlation coefficient (R) between sum intensity values of kernel voxels and kernel weights is 0.89 at 1.2 THz. This is the first application of applying THz CT systems to agri-food research, and the results indicate that THz time domain CT can be a useful nondestructive tool for evaluating weight and plumpness of intact sunflower seed. In addition, there is potential to extend the THz time domain CT system to the analysis of other agri-food sample types.


Introduction
Terahertz (THz) radiation provides nondestructive testing by probing molecular vibrations, including molecular rotations, low-frequency bond vibrations, crystalline phonon vibrations, hydrogen bond stretches, and distortions [1]. Pulsed wave and continuous wave (CW) systems are two main types of instruments in the THz region. THz CW imaging is a compact, simple, and fast system, but the costs of these advantages are loss of depth, high resolution, and frequency domain information [2,3]. As a typical pulsed wave system, THz time-domain system allows for the collection of a wide range of physical and chemical information about objects [3], thus, it is more applicable to study food and agricultural products. THz time-domain spectroscopic and imaging systems have attracted wide attention on biomedicine [4,5], agri-food [6][7][8][9][10][11][12], and material recognition [13]. Compared with visible, near-infrared (NIR), or Fourier transformed infrared (FTIR) instruments, which have been widely used in previous research, THz time-domain system has a higher signal to noise ratio and can characterize thicker biological samples in transmission mode, since many non-polar and non-metallic substances are transparent to THz radiation.
Sunflower seed is a nutritive food and an important oilseed for edible oil production [14,15]. The plumpness and weight of kernel are important indicators reflecting the seed yield and oil quality [16]. Conventional seed phenotyping primarily involves manual measurement or extraction of morphological features from two-dimensional, which fails to capture the three-dimensional (3D) characteristics and internal morphology of the seeds [17]. Considering the characteristics of the THz time domain system, it has the potential to provide technological support for seed quality control. However, most of the experimental demonstrations in relation to THz time domain imaging for seed research were performed in two spatial dimensions [6,16,18], and the structure information of intact seeds cannot be displayed and analysed in three spatial dimensions.
The computed tomography (CT) system presents a clear option for acquiring three-dimensional (3D) information. For instance, X-ray CT has been widely used to classify the quality of pepper seeds [19], visualize the 3D internal structure of seeds [20], and phenotype the morphological features of seeds [17]. THz computed tomography (CT), as a powerful extended mode of the THz imaging system, is another good option. THz time domain CT system has been applied to investigate dried human bones [21] and other artificial materials [22]. For the THz CW CT system, related researches focus on folded paper and scroll [23] and chicken ulna [24]. The kernel algorithm for object reconstruction of most studies is inverse Radon transform [25], denoted filtered back projection algorithm [26]. The projection processing before reconstruction is normally conducted due to the effect of THz point spread function (PSF) which can be expressed as a 3D Gaussian distribution [27,28].
At present, no study is available in using THz CT system for quality evaluation of agri-food samples, thus, investigating THz time domain CT system for sunflower seed quality evaluation has wider significance. In the current study, a THz time domain CT system was customized for evaluating the 3D plumpness and kernel weight of sunflower seeds. These two properties of intact sunflower seeds are hard to be evaluated by optical sensing methods in other electromagnetic regions due to the low transmissivity.
Specifically, a series of THz images (projections) of the sunflower seed on a rotation stage were captured by the transmission mode THz time domain imaging system from different angles. These projections were preprocessed and then modelled by the inverse Radon transform to reconstruct the volumetric image of intact sunflower seed. The volume ratio of the whole seed to the kernel was calculated as the plumpness, and the correlation between the kernel weight and sum of kernel intensities was studied. To evaluate the performance of quantitative analysis on kernel weights and plumpness, 20 sunflower seeds were sampled, which is larger than the sample sets used in most of previous THz CT research [21][22][23][24]. This is the first application of applying THz CT systems to agri-food research, and we hope to provide inspiration for future research in related fields.

Sunflower seed samples
Twenty dry sunflower seeds were used for the current study (Thompson & Morgan, Ipswich, United Kingdom). They were stored in dry and dark container with room temperature about 20 °C before sampling. Intact seeds and corresponding kernels were weighed after sampling and shown in Table 1. It should be noted that the methods described in present are calibration-free for both weight and plumpness analysis, thus a large number of samples is unnecessary to create a training and a test set. In addition, the number of samples used for THz CT study is normally less than 10 due to the limitation of sampling time [21][22][23][24]. Therefore, 20 sunflower seeds are sufficient for present modelling. Figure 1 shows the schematic drawing of the current CT system based on a transmission mode THz time-domain spectrosocpy (Menlo Systems, Munich, Germany). The output of a femtosecond laser pulse is split into a pump beam and a probe beam using a beam splitter. The pump beam with a bias voltage was used to generate THz radiation through the THz emitter (location is − 210 mm on z-axis). The generated THz beam was then collimated and focused on the THz detector (location is 190 mm on z-axis) by using four TPX lenses (locations are − 175, − 55, 60, and 155 mm on z-axis). The probe beam was routed through a delay section and used to detect the THz beam in the THz detector. The difference between the THz beam path and the probe beam path was used to sample the THz path in the time domain (0 to 360 ps). The centre of the rotation stage (Thorlabs, New Jersey, United States) was located on the focal point (0 mm on the z-axis) between TPX lenses 1 and 2, where the sample was placed. All above-mentioned units were fixed on an optical rail with scale (Thorlabs, New Jersey, United States). The sunflower seed sample was glued to the centre of rotation stage with blu tack (Bostik, Colombes, France). The rotation stage manually rotated around its centre point ( is the angle of rotation) and automatically moved along the x-axis and y-axis (perpendicular to the focal point), which was controlled by a mechanical shifter.

Imaging procedure
To perform a three-dimensional reconstruction of a sunflower seed, the two-dimensional THz transmission projection in x-axis and y-axis of the sample were recorded with a constant scanning interval of 0.4 mm in both two directions (Fig. 2). This procedure was repeated for 10 projections from 0 to 90° where v is the frequency, E(v) is the electric field image of the sample, and E r (v) is the electric field of the reference, which was set as the maximum value of the E(v) (a pixel in the air part of images), and |•| denotes the absolute value.

Projection preprocessing
The THz Gaussian PSF makes the obtained projection blurred and can affect the quality of subsequent reconstruction of volumetric images, thus, it is important to eliminate the influence of PSF in object reconstruction [29]. The blurred projection can be regarded as the convolution result of real projection and PSF, thus, all projections were deconvolved by regularized filter algorithm in the present study (Fig. 2). The region of interest (ROI) was segmented by setting a threshold value (0.47).

Volumetric image reconstruction
Radon transform described in Fig. 3 was widely used for THz CT systems and the formula at a certain z was defined as [25]: where I z (x, ) is the projection at angle , f y x ′ , y ′ is the object function or the volumetric image at z , and δ is the Dirac impulse. The inverse Radon transform, or the filtered back projection algorithm was performed to recover the volumetric image from the projections. The inversion filters each projection in the Fourier domain to increase geometric details. Second, it computes each f y x ′ , y ′ value as a sum of filtered projections [28]. After reconstruction all f y x ′ , y ′ across y-axis, the 3D volumetric image V of sunflower seed can be obtained (Fig. 2). To simplify subsequent analysis, the output sizes along all three dimensions were set as 40 × 40 × 40 ( x × z × y ) and gaps due to different sizes of projection were padded with zero. All programs described in this section were written by the authors in MATLAB R2021b® (The MathWorks Inc., Natick, MA, USA).

Volumetric image reconstructed
The seed and kernel can be segmented by setting threshold values, which were 1.2 and 1.45 respectively, for the reconstructed volumetric image (Fig. 2). These two threshold values were selected by manually identifying two sudden rises in the number of voxelks ( y-axis) using the histogram of volumetric image, with an intensity value ( x-axis) resolution of 0.05. The two sudden rise refered to corresponded to the boundaries between three distinct parts of a volumetric image: air, shell, and kernel. The part of the seed in contact with the rotation stage, the blu tack, can affect subsequent quality evaluation of sunflower seed. Besides, some non-kernel parts inside the seed with high absorption also need to be removed. Therefore, the base part of the seed was removed directly (the cutting index along y-axis was set as 4), and the inner parts except kernel (the biggest part) were removed according to the order of corresponding volumes. Nevertheless, the direct removal of the base part obviously reduced the volume of the seed, which affected the accuracy of the plumpness analysis. The missing bottom of the seed was assumped to be a raised smooth surface determined by the edge points near the excised surface (blue points in Figs. 4, 5), thus, a surface based on quadratic equation in two variables (surface in Fig. 4) was fitted to fill the missing part of seeds. The surface can be described as: where 1 , 2 , … , 6 are fitted coefficients, x , y , and z are coordinates in 3D space. The fitted surface and the excised surface form a volumetric part, which can fill the bottom part of the seed (Fig. 4).
Due to the high position of the kernels on the y-axis inside seeds, even if a few kernels were attached to the base part, the effect of base cutting was negligible. Figure 6 shows several reconstructed volumetric images of sunflower seed at frequency of 1.2 THz, in which shapes and structures of sunflower seeds are well presented.

Plumpness analysis
The present 3D plumpness was defined as the ratio of kernel volume to seed volume. The volume is the total number of voxels higher than threshold values (1.2 and 1.45 for seed and kernel, respectively) in the processed volumetric images. Since voxels were regarded as cubes during volume calculation, thus the small size of original volumetric images might cause inaccurate results. Therefore, sizes of volumetric image along all three dimensions were tripled by using the cubic interpolation, and re-scaled volumetric images contains 27 times of cubes with than corresponding original images. The obtained results of plumpness, seed volume and kernel volume are 30.83 ± 6.55%, 53.37 ± 20.93 mm 3 , and 175.16 ± 64.39 mm 3 , respectively ( Table 2). The plumpness results of all 20 sunflower seeds obtained by THz CT volumetric images (3D plumpness) and RGB images (2D plumpness) were shown in Fig. 7. The 2D plumpness was obtained by calculating the ratio of number of kernel pixels to that of whole seed pixels in RGB images, and the result was 43.27 ± 8.16% (Fig. 8, Table 2). The ROIs of seed and kernel were segmented by setting threshold values, which was shown in Fig. 9. All values of 3D plumpness are lower than that of 2D plumpness (Fig. 7), which is consistent with the expected difference between volume and area. In other words, 3D plumpness is a better indicator of the seed quality than 2D plumpness, since it considers the thickness variation between the seed and its kernel. Even so, the distributions for both 3D and 2D plumpness were similar (Fig. 7).

Kernel weight analysis
Similar to the plumpness analysis, sizes of volumetric image along all three dimensions were tripled for calculating the sum intensity value of all voxels in kernel part. The threshold value for kernel segmentation was also set to 1.45. The result shown in Table 2 is 82.69 ± 36. 35. The correlation at frequency of 1.2 THz (Fig. 8) between sum intensity values of all voxels in kernel part p and real kernel weights m was investigated and can be described as: The correlation coefficient (R) is 0.89 at 1.2 THz. R values at 0.8, 0.9, 1.0, 1.09, 1.2, and 1.3 THz are shown in Fig. 10, and all of them are higher than 0.85. It should be noted that the higher the frequency the higher the resolution of THz images due to the shrink of PSF [30]. Hence, the frequency of 1.2 THz was chosen to reconstruct the image of sunflower seeds (Figs. 2, 4, and 6) because it ensures both prediction accuracy and the display of the finest details.
These results indicate that THz CT is a useful nondestructive tool to evaluate kernel weight of intact sunflower seed. In addition, the high correlation between real weights and sum intensity value of all voxels also indicated that the reconstructed volumetric images of sunflower seeds were reliable.

Discussion
The plumpness and kernel weight of sunflower seed were evaluated by a customized THz time domain CT system. Compared with previous sunflower seed plumpness research based on THz time domain imaging system [16], the THz CT system takes "plumpness of thickness" into account, which makes the results more accurate and enables the shape and defect of the kernels to be better displayed. The sum intensity value of all voxels in kernel part was shown to be correlated with kernel weight (R = 0.89 at 1.2 THz). Thus, it can be used as a quality indicator of sunflower seed for future study. Although only one frequency was selected for present study, the obtained volumetric images actually have four dimensions ( x , y , z , and frequency). The information in the frequency domain can be used to build calibration models, thus, it is feasible to draw the 3D distribution of chemical content in the sunflower seed volumetric images. Previous research only focus on mapping 2D distribution of chemical content on sunflower seed THz images [6]. In addition to chemical components, sunflower seed volumetric images obtained by the THz CT system are also suitable for analysing mechanical-structure properties. For example, in Yang et al. [31]'s study, if their simplified sunflower seed model is replaced by the model obtained by the THz CT system, it is obvious that the relevant analysis will be more accurate. Compared with X-ray CT systems, which were widely used in previous studies [17,19,20], THz time domain CT systems are non-ionizing, which makes it safer to biological samples, and the measurement cost of THz is lower [30].
Nevertheless, the application of THz time domain CT systems in agri-food quality evaluation is still limited by two factors. The first factor is the diffraction effects and Fresnel losses experienced by the propagation of the THz beam through the sample [32]. The second factor is the long scanning time since the volumetric image reconstruction requires projection at multiple angles, while THz time domain imaging systems can only adopt pixel-to-pixel mode [33]. Although the number of samples in present study is larger than that number of samples in most of previous THz CT research [21][22][23][24], the time for one sampling is still very long. Specifically, the imaging time for one projection is around 9 min, thus for one volumetric image, the total sampling time is about 1.5 h. To solve these challenges, the hardware should be developed to achieve simultaneous parallel measurement of pixel data and reducing data acquisition time [33]. Besides, filtered back projection algorithm was used to reconstruct the volumetric images in many previous studies [24,34], and other reconstruction algorithms such as simultaneous algebraic reconstruction technique (SART), the ordered subsets expectation maximization (OSEM) [28], and refractive Index Matching [35] should be tested and developed to eliminate the effects of PSF.

Conclusions
We introduced a THz time domain CT system for evaluating plumpness and kernel weight of sunflower seed. The reconstructed volumetric images presented shapes and structures of sunflower seeds well. The correlation between sum intensity value of all kernel voxels and the kernel weight suggests that THz CT can be used as a nondestructive tool to evaluate kernel weight of intact sunflower seed. Compared 2D plumpness obtained by RGB images, the 3D plumpness can better reflect the seed quality because it takes the thickness difference between seed and kernel into account. The quantitative anlaysis for both kernel weights and 3D plumpness is calibration-free, which makes it possible to study the small amount of samples, avoiding the long sampling time of THz CT imaging associated with large numbers of samples. At present, no study is available in using THz CT system for quantitative evaluation of agri-food samples, thus, we hope that present study can provide inspiration for future research in related fields.
Funding Open Access funding provided by the IReL Consortium.
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/.