
Rapeseed is an important source of edible oil in my country, ranking first among the five major oil crops. my country is the world's main producer of rapeseed, and
its rapeseed area and yield rank first in the world. However, weeds are very harmful to rapeseed during its growth. Traditional chemical weeding pollutes the agric
ultural ecological environment, and the efficiency of herbicide use is relatively low. Therefore, the key to correctly identifying weeds is to achieve accurate spraying
of herbicides.
Hyperspectral imaging technology is a new technology that integrates image processing and spectral analysis. Image data can truly show the surface damage and
external characteristics of crops, while spectral data reflects the internal structure and composition of crops. Therefore, in recent years, hyperspectral imaging tech
nology has been increasingly used in weed classification and identification and non-destructive testing of agricultural product quality.
This work uses a variety of preprocessing methods and characteristic wavelength extraction methods to process the hyperspectral image data of rapeseed and weed
canopies, and establishes classification models based on the full spectrum and characteristic wavelengths respectively. By analyzing and comparing the results of
different classification models, the effects of different spectral acquisition times and different rapeseed varieties on weed classification and identification can be
obtained.
1 Experimental part
1.1 Samples
The rapeseed samples and four weeds used in the experiment are Echinochloa crus-galli, Hemeng, Ramulus velutipes and Bidens pilosa, all of which are common
weed species with great impact in rapeseed fields and have a similar growth cycle to rapeseed. Figure 1 shows the images of the samples used in the experiment.

1.2 Spectral image acquisition
A 400-1000nm hyperspectral camera is used, and the FS13 product of Hangzhou Caipu Technology Co., Ltd. can be used for related research. The spectral range is
400-1000nm, the wavelength resolution is better than 2.5nm, and up to 1200 spectral channels. The acquisition speed can reach 128FPS in the full spectrum, and
the highest after band selection is 3300Hz (supporting multi-region band selection).

The hyperspectral information collection of rapeseed and weeds was divided into three times, which were defined as 1, 2 and 3. In addition, during each data collection process, since rapeseed and weeds are growing, it is necessary to adjust the internal parameters such as camera exposure time and collection height to obtain the hyperspectral image with the least distortion. Table 1 shows the internal parameters of the hyperspectral imager during the three experiments.

1.3 Data feature extraction
For the hyperspectral images of rapeseed and weeds studied, the region of interest of each plant is extracted, and the entire sample area after removing the backg