Abstract:
As a highly promising non-contact detection means, terahertz imaging technology has gradually come to the fore in recent years and has been conclusively proven to possess the ability to detect the internal quality of sunflower seeds. Terahertz waves can penetrate the shells of sunflower seeds and interact with their internal tissue structures and components, thereby obtaining information regarding their quality. However, the application of this technology has not been all plain sailing. The problem of its slow imaging speed is like an insurmountable chasm, severely impeding its effective application in large-scale and rapid detection scenarios. Traditional terahertz imaging methods usually entail consuming a substantial amount of time to collect and process data, which makes them seem inadequate when faced with the task of detecting the quality of sunflower seeds that requires practical and prompt detection, and thus unable to meet the high-efficiency requirements in industrial production or actual agricultural detection. To overcome this difficulty, this paper proposes a method that combines compressed sensing with the Attention-Enhanced Super-Resolution Generative Adversarial Network (A-ESRGAN) model and applies it to the field of terahertz imaging, aiming to achieve rapid and accurate detection of the plumpness of sunflower seeds. In the initial stage of the research, we focused on the crucial step of selecting the measurement matrix in compressed sensing. Firstly, the Compressive Sampling Matching Pursuit (CoSaMP) reconstruction algorithm was initially adopted to verify the performance of different measurement matrices. Based on the best overall performance, the Gauss matrix was selected as the final measurement matrix. Secondly, by comparing the Peak Signal-to-Noise Ratio (PSNR), reconstruction time and other evaluation indicators of five reconstruction algorithms such as the Alternating Direction Method of Multipliers (ADMM) combined with Total Variation (TV) regularization (ADMM_TV) and Subspace Pursuit (SP), the results showed that ADMM_TV performed best in terms of PSNR, Mean Squared Error (NMSE), and Structural Similarity Index (SSIM). The Natural Image Quality Evaluator (NIQE) had the lowest value when the measurement ratio exceeded 6.0%. Although it had no obvious advantage in reconstruction time, its overall performance was better than that of other algorithms. Therefore, ADMM_TV was chosen. Finally, the Attention-Enhanced Super-Resolution Generative Adversarial Network with Multiple Scales (A-ESRGAN-Multi) model was utilized to process the reconstructed images of different sampling rates in compressed sensing. Its effect was better than that of the Real-ESRGAN and the Attention-Enhanced Super-Resolution Generative Adversarial Network with a Single Scale (A-ESRGAN-Single), enhancing the image quality and increasing the edge contrast, which provided convenience for subsequent image segmentation. The research indicates that the combination of compressed sensing and the A-ESRGAN-Multi model for detecting the fullness of sunflower seeds is feasible. The average plumpness error on the validation set is 2.502%, and the maximum detection error is 6.41%.In conclusion, the combination of compressed sensing and the A-ESRGAN-Multi model can effectively save 82.5% of the sampling time and storage space. With the reduction of data volume, not only is the pressure on storage devices alleviated, reducing the hardware cost, but also the management and transmission of data become more convenient and efficient, thus opening up a new path and providing new technical support for the quality detection of sunflower seeds.