Nuclide Spectrum Peak Searching Algorithm Based on Multiple Morphological Structuring Elements

Considering the characteristics of the traditional peak searching methods of nuclide spectrum and morphological transformation in the image processing, a nuclide spectrum peak searching method based on multiple morphological structuring elements is proposed. Four flat structural elements at an angle of 0, 45, 90, and 135 to the horizontal line are utilized, then the morphological transformation of the nuclide spectrum is performed, and the details of the different directions of the nuclide spectrum curve are better controlled. The algorithm proposed in this paper improves the ability of the morphological peak searching and the peak information is preserved well, meanwhile, the method has a better peak recognition effect.


Introduction
With the increasing application of nuclear energy in nuclear power, national security, nuclear medicine, and astrophysics, tens of thousands of cubic meters of low and intermediate level waste have been accumulated [1,2,3]. During the process of nuclear waste disposal, the identification of nuclide is essential. The interference brought by the statistical fluctuations and background noise to the qualitative analysis of the nuclide spectrum is inevitable. In the processing of nuclide identify, obtaining the information of effective peaks is necessary[4, 5,6].
The current commonly used peak searching methods are the rectangular filter method, simple comparison method, and the derivative method, etc. The rectangular filter method has a weak ability to distinguish overlapping peaks. The straightforward comparison method performs well for identification of strong intensity peaks, but it is not suitable for weak intensity peaks and overlapping peaks. The basic principle of derivative method is to take the derivative of nuclide spectrum. The first-order derivative changes from positive to negative, and the location corresponding to the zero-crossing points are the peak position. Since the derivative method is relatively simple to calculate, it is currently the most widely used peak searching method, but the peak finding effect of the method is disturbed by the maximum value, and it is not the peak position required [7,8].
Yuan et al. [9] proposed a single-threshold real-time peak searching method which implements in a field-programmable gate array by utilizing a state machine. The method has the advantages of high peak recognition efficiency, but it is not suitable to rapid qualitative analysis of nuclide spectrum due to the reauqirement of a certain system. Zhang et al. [10] proposed a feature extraction method based on sparse representation for nuclide identification and analysis. The feature extraction is much better than the derivative method. However, the identification effect of this method is not ideal in the same nuclide spectrum under the background noise. Traditional nuclide spectrum analysis methods could no longer meet the needs of the current research. Yoshida et al. [11] combined the excellent pattern recognition characteristics of neural networks with nuclide spectrum analysis and achieved good As an emerging science, mathematical morphology is more and more favored by research scholars. It could obtain the more elemental form of the target object through the operation of the interaction between the target object and the structural element, which makes it play a more important role in the research of signal processing [12,13,14].
The signal processing method based on mathematical morphology studied by Cao [15] can extract the DC component of the signal. Given the shortcomings of traditional peak searching methods, combined with the advantages of morphological transformation, Li et al. [16] proposed a morphological transformation-based nuclide spectrum peak-finding algorithm, which uses a single line structure element to find characteristic peaks, and the recognition capabilities of the method needs to be improved in the complex nuclide spectrum.
This paper presents a peak searching algorithm based on the morphology of multiple morphological structuring elements. Four horizontal structural elements in different directions are selected to perform a morphological transformation on the energy spectrum. Compared with the use of a single structural element, the method proposed in this paper could control the details of the different directions of the nuclide spectrum better and improve the ability of morphological peak searching. In the identification of peak information and determination of peak position, the algorithm performs well.

Basic morphological operations
Mathematical morphology is a commonly method used in image processing, which includes corrosion, expansion and other basic operations. The basic principle is to generate the output image required by the research by acting on the input image through structural elements. The opening operation refers to the process of first performing the erosion operation on the structural elements of the input matrix and then performing the expansion process, otherwise, it is referred to as the closed operation [17]. Corrosion of set A by structural element B can be expressed by the following formula: Similarly, the expansion of set A by structural element B can be expressed by the following formula: Therefore, the opening operation of set A can be expressed as: The main purpose of the corrosion operation is to reduce the boundary, and corrosion can ablate the boundary of the object, and the expansion operation is the reverse process of the corrosion operation. After the operation, it is utilized to merge the cracks and fill the holes. However, the results of specific corrosion and expansion operations are inseparable from the selection of the structural elements.

Morphological structural elements
Morphological structural elements are an essential concept in mathematical morphology. The process of selecting structural elements includes determining the geometric shape and size of the structural elements. Structural elements with different parameters have different consequences on the target processing [18]. Even if the shape of the structural element has a great influence on the final processing result, the flat structural element is not only simple in algorithm design, but also equivalent to using the concept of sets to operate on the signal, so it is more practical.
Due to the characteristics of nuclear signals such as randomness and uncertainty. There are many protrusions in the nuclide spectrum in addition to characteristic peaks. Relative to a flat single

Principle and implementation
The peak-finding method based on the morphology of multi-structural elements studied in this paper mainly includes the following steps: • Preprocessing of nuclide spectrum data, including filtering effective information and smoothing of the energy spectrum; • Constructing four structural elements with different angles and dimensions of 33, which is used for subsequent expansion and corrosion operations; • Opening the data and transforming for filtering; • Striping off the nuclide spectrum peaks and divide the peaks of the continuous nuclide spectrum into discrete peaks; • Distinguishing peaks and eliminating false peaks; • Finding peaks and output the results. The basic flowchart is as follows:

Data preprocessing
Due to the statistical nature in nuclear decay and the measurement, when the count is little, the statistical fluctuation is large. The most counter channel is not necessarily the expected value of the Gaussian distribution. The real peaks are drowned in the statistical fluctuation. To be in a position to identify the presence of peaks under the influence of statistical fluctuations, and accurately determine the location of peaks, thereby completing the qualitative, it is necessary to smooth the spectrum. In this study, the energy spectrum smoothing method uses a polynomial least-squares fitting method, the basic principle of which is to use an n-degree polynomial and W spectral data points to perform fitting step by step to achieve the purpose of smoothing, where W = 2m + 1. Using 1024 channels of 60 Co detection nuclide spectrum as the original data, the result is smoothed by the least square method as showed in the figure below: Figure 3. Original spectrum and least-squares smooth spectrum.

Morphology transformations
In expansion and corrosion calculations, structural elements could be divided into symmetrical and asymmetrical based on the location of the origin of the structural element. Morphological transformations are typically performed using symmetric structural elements. When the structural elements are asymmetric, the results of the operation are generally offset. In some organizational elements, the choice of the origin determines whether it is an asymmetrical structural element. For example, a line-shaped structural element, if its origin is a symmetric structure at the midpoint of the line segment, if the origin is an asymmetric structure at the end of the line segment, the line-type structural elements can be used to remove or extract longer image structures. In this paper, four-line segments with different scales of 33 in different directions take the center point of the structural elements as the original. In light of the selected structural elements, the smoothed energy spectrum is transformed by morphological opening operation, and the results are as follows:

False peaks rejections
In the customary methods of eliminating false peaks and finding peaks, the analysis is usually performed directly on the nuclide spectrum after pretreatment. In most cases, false peaks are eliminated by setting the peak width, but when the spectral data are more complicated, the result is often less than ideal. In the nuclide spectrum, where the count is more, the noise has little effect. When the count on a certain site is large enough, a peak will be formed. By using the difference between the original nuclide spectrum and the energy spectrum after the open operation processing, the noise spectrum on the energy spectrum can be obtained. At this time, according to the set peak width, the true peak could be better identified in the noise spectrum.
After obtaining the difference spectrum, in order to facilitate subsequent identification of real peaks, the continuous spectrum lines in the above figure are divided into discrete peaks in spectra.
Assume that the peak is represented by ( , ) Count is the count of the i-th channel address ( i Ch ) in a peak. According to the set peak width W, the peak greater than the peak width is the real peak, that is: Among them, i p R represents the true peaks, i p L represents the width of each peak.

Peak position and peak boundary determination
Set all the spectrum data smaller than the peak width to 0 to obtain each true peak continuous spectrum data. In the true continuous peak spectrum, the point at which the maximum value of each peak is found in the peak apex, and the address corresponding to the peak apex is the peak position. Which is: Among them, i C R represents the peak position, max( ) i Count represents the maximum count.
The determination of the left and right boundaries of the peak needs to be calculated based on the peak position and the position of the first point where the left end of each peak starts to rise in the horizontal direction and the position where the right end falls to the first point in the horizontal direction, and the satisfaction formula is as follows:

Parameter solving
It can be seen from Section 3 that the parameters to be solved for determining the peak position and peak boundary are the peak width W, the maximum count After obtaining the true continuous peak spectrum shown in Figure 7, the peak searching method studied in this paper sets all the data in the interval where the count of the continuous peak is not 0 to 1 and obtains a new matrix. Therefore, the data in the new matrix contains only 0 and 1, and its expression is as follows: The adjacent elements in the new matrix i data p are differentiated. Since the data in the matrix is only 0 and 1, the matrix after the difference will only contain -1, 0, and 1.
According to the calculated 1 indi L and 1 indi R continuous energy, the spectrum is divided into i intervals (i=1, 2, · · · · ). Find the maximum count point for each interval depending on equation (5), determine the peak position, and determine the left and right boundaries of each peak according to equations (6) and (7). As shown in the figure below, the black dotted line is the left and right borders of each peak, and the solid red line is the peak position.

Experiment
According to the parameters solved in Section 4, the peak location and the left and right borders of the peak can all be determined, and the pre-processed nuclide energy spectrum is marked to complete the peak search process. 1024 channels of 60 Co measured spectrum and experimentally simulated 801 channels of 60 Co nuclide spectrum were chosen as initial data. In addition, the simulated 137 Cs nuclide spectrum is used for further verification and comparison. The radionuclide peak-finding method using multi-structure element morphology in this paper and the traditional morphological peak-finding method were used to find peaks separately, as shown in the following figure: (a) (b) Figure 7. (a) 60 Co measured spectrum multi-structure elements morphology peak searching; (b) 60 Co measured spectrum traditional morphology peak searching.
(a) (b) Figure 8. (a) 60 Co experimental simulation spectrum multi-structure elements morphology peak searching; (b) 60 Co experimental simulation spectrum traditional morphology peak searching.  Figure 9. (a) 137 Cs experimental simulation spectrum multi-structure elements morphology peak searching; (b) 137 Cs experimental simulation spectrum traditional morphology peak searching.
It can be seen from the above comparison chart that using a single structural element to perform a morphological transformation on the peak of the nuclide spectrum curve is compared with the method proposed in this paper, although both methods have better results in peak recognition ability. However, the former is easy to lose the information of complex peaks, so that the exact peak cannot be completely identified. It can be seen from Figure 9 that the traditional method will even lose 137 Cs spectrum full-energy peak information. The peak-searching method based on the morphology of multi-structure elements proposed in this paper can control the different directions of the curve more carefully, and can better identify the peak information to determine the peak position.
The above results verify that the multi-structural element morphology spectrum peak finding method proposed in this paper can be applied to the nuclide energy spectrum peak finding, which has good peak identification ability and high peak finding accuracy.

Conclusions
In this paper, the application of morphological transformation in peak searching of nuclide spectrum is investigated. Considering the shortcomings of traditional morphological peak searching, a morphological peak searching algorithm based on multiple structural elements is proposed. The flat structure elements at an angle of 0, 45, 90, and 135 to the horizontal lines are used to open the nuclide spectrum, and the identification of peak position in the nuclide spectrum is finally achieved by processing methods such as peak stripping and elimination of false peaks. Through simulation experiments, the feasibility of the method proposed in this paper is verified. Compared with the traditional single-structure element peak finding method, this method has higher accuracy in searching peaks in nuclide spectrum and the peak information is preserved well, and the superiority of the method is verified.