In the last few years, hyperspectral imaging technique has had a bright future for application on nondestructive detection of agricultural products. However, in experiment, there are usually dozens or even hundreds of hyperspectral images. It needs to spend lots of time in preprocessing all the hyperspectral data. Software ENVI is a kind of image processing software, although the users can defi...