2.3. Spectral Feature Extraction

WL Weihua Liu
SZ Shan Zeng
GW Guiju Wu
HL Hao Li
FC Feifei Chen
request Request a Protocol
ask Ask a question
Favorite

Various noises exist in the original hyperspectral data due to the limitations of the acquisition environment and the instrument, requiring that all data need to be pre-processed [55]. There are many methods suitable for pre-processing hyperspectral data, among which SNV and derivative methods are the most used. SNV is often used to eliminate the influence of sample surface scattering and optical path change on the spectrum [56,57]. Derivative processing includes first-order derivatives (FDs) and second-order derivatives (SDs) to eliminate other background interference and improve spectral resolution. Hence, this study uses SNV, FD, and SD methods to pre-process the data.

The SNV transformation formula is as follows:

where Sij of xij represents the spectral features before and after the transformation of the pixels in row i and column j, respectively. Furthermore, x¯ij denotes the average reflectivity of xij, which is provided by:

FDs and SDs are fulfilled by the Savitzky–Golay smoothing and differentiation filter [58,59], and the calculation formula as follows:

where the polynomial order is 2 and smoothing point is 11, and R(λ) represents the reflectance data for wavelength λ, and Δλ = 2.941 nm is the wavelength interval.

The rice seed pixels must be separated from the background before the extraction of the spectral features. The traditional grains segmentation method selects a hyperspectral image of a certain wavelength band [60]. The adaptive threshold method was used to obtain the binarised image, which was used as a template. Thereafter, the hyperspectral data were multiplied to obtain image segmentation.

The traditional method only uses the spatial information of hyperspectral data, and it is difficult to obtain an accurate binarised image using only single wavelength band information due to the significant amount of noise in the hyperspectral data. However, the difference in spectral slope between the rice seeds and background was noticeable. The reflectance of rice seeds increases gradually in the 400–1000 nm region, and the spectral curve is relatively smooth, but the spectrum of the standard whiteboard is flat at 400–1000 nm. Therefore, we can use the slope information of the spectrum to synthesise a new greyscale image. The formula of a synthesised greyscale image is as follows:

where gij represents the synthesised grey value of the pixel at the ith row and jth column, and xij denotes the spectrum of pixel points in the ith row and jth column. The arctan function ensures that the value remains between 0 and 1. Thereafter, the synthesised greyscale image was binarised by Otsu’s method to obtain a more accurate sample image boundary. This method uses spectral slope as an effective discriminator, which is equivalent to using both the spatial and spectral information of hyperspectral data to fulfil image segmentation, so it has a better segmentation effect.

Figure 4 depicts the effect of the image segmentation after using the adaptive threshold method to binarise the synthesised greyscale image. Figure 4a depicts a colour image of a rice seed with a cast shadow due to an illumination problem, significantly affecting the image segmentation. Figure 4b depicts the binarised image using a hyperspectral image at 601.55 nm. Figure 4c showcases the result of segmentation using 601.55 nm wavelength band information. Some background pixels are incorrectly segmented due to the influence of the shadow, thereby affecting the spectral features of the rice seeds. Figure 4d shows the synthesised greyscale image using spectral slope. The spectral information helps overcome the effect of the shadow. Figure 4e represents the binarised spectral slope greyscale image. Figure 4f depicts the segmentation result using spectral slope information. Thus, the boundary of the rice seeds can be accurately determined using spectral slope information, yielding a considerably better result than that depicted in Figure 4c.

Example of background segmentation using synthesised spectral slope greyscale image. (a) Colour image of a seed; (b) Binarised image using single-band (601.55 nm) information; (c) Segmentation result using single-band (601.55 nm) information; (d) Synthesised spectral slope greyscale image; (e) Binarised image using spectral slope information; (f) Segmentation result using spectral slope information.

The pixels from each rice seed formed a connected region after the rice seeds were segmented from the background. Thereafter, all the connected areas in the image were counted. The pixels in each connected area belonged to the same rice seed sample. The spectral features of each rice seed were obtained by averaging the spectral data of the same connected area. Figure 5 depicts the average spectral features of four types of rice seeds. Figure 5a illustrates the reflectance spectrum after correction. Figure 5b depicts the spectrum after SNV processes. The average spectral differences among different paddy varieties were not significant for both raw and SNV data. Figure 5c,d show some differences in the spectra of different varieties after the FD and SD processes. Therefore, it is necessary to establish a mathematical classification model to distinguish these bands.

Average spectral features of four rice seeds. (a) Original reflectance spectrum; (b) spectrum after SNV; (c) spectrum after FD’ (d) spectrum after SD.

Do you have any questions about this protocol?

Post your question to gather feedback from the community. We will also invite the authors of this article to respond.

0/150

tip Tips for asking effective questions

+ Description

Write a detailed description. Include all information that will help others answer your question including experimental processes, conditions, and relevant images.

post Post a Question
0 Q&A