## 2 Materials and Methods
### Anomalous Moisture Region Localization Algorithm  
The grain pile anomalous moisture region localization algorithm developed in this paper was designed to locate the anomalous moisture region. It was important to note that the full width at half maximum (FWHM) method, commonly used in tumor detection, could not be directly applied to identify the region with the maximum value as the anomalous moisture area in grain piles. This was because the response from normal regions (10.5% moisture content grain) and anomalous regions (>15% moisture content grain) did not differ significantly, especially for grain with 15% moisture content. The signal-to-mean ratio (SMR) (Equation (A1)) for such cases only differed by approximately 10 (refer to Sections 4.1 and 4.2). In this experiment, smaller maximum values were par ticularly susceptible to misidentification due to interference. Additionally, there was no definitive solution for determining what percentage of the maximum value should be classified as an anomalous region in grain-related applications. Finally, when using the recall method (Equation (3)) to evaluate localization accuracy, it was necessary to provide the actual target object size. Therefore, the size of the anomalous region to be detected was predetermined. The specific process is illustrated in Figure 2. For the detailed algorithm, refer to Appendix A.  
Anomalous regions typically correspond to higher SMR values. To identify these areas, this study employed a two-stage localization process: preliminary and secondary localization. The objective of preliminary localization is to identify all anomalous regions by detecting areas with rapid SMR decline. It is noteworthy that extensive experimental testing has revealed these regions may include both anomalous and normal areas (refer to Section 4.1), particularly when grain moisture anomalies are low. However, distinguishing between normal and anomalous regions is challenging. Due to the emergence of sporadic interference with strong responses from normal regions, the secondary localization process is implemented to identify the area most likely to be a hotspot. In cases of multiple moisture anomalies, it is recommended to remove the initially localized anomalous area and conduct subsequent measures to locate the next anomalous region. To counteract strong interference, in addition to calculating the region containing the maximum value within these connected domains (\(D_{\text{max}}\)), a method for determining the region with the maximum volume (\(D_{vol}\)) was introduced. When moisture differences are substantial, resulting in strong responses, \(D_{\text{max}}\) and \(D_{vol}\) yield consistent results. However, when responses are weak, the minimal difference between the maximum value and other values increases the likelihood of \(D_{\text{max}}\) misclassification. During experimentation, discrep  
Figure 2: Flow chart of the grain pile anomalous moisture region localization algorithm. In the hotspot localization result image, the red voxels represent the localization result, while the yellow frame indicates the actual anomalous region, and the bottom is a cross-sectional view of the focal point responses at z = 0. No further explanation will be provided hereafter. ancies between \(D_{\max}\) and \(D_{vol}\) frequently arose when the SMR of the anomalous region was approximately 10. To evaluate the accuracy of the localization of anomalous moisture regions in grain piles, this paper proposed the use of the recall method, commonly employed in the field of image segmentation [23; 24]. Let \(A\) represent the actual region and \(B\) represent the predicted region. The recall is defined as  
\[recall=\frac{A\cap B}{A}. \tag{3}\]  
Recall can only assess the accuracy of localization for known samples, whereas accuracy cannot be calculated for unknown samples.