Abstract:The hyperspectral image data has the advantage of wide spectral range and high spectral resolution, is widely applied in the surface feature classification and recognition. The hyperspectral remote sensing is the research focus in recent years. In this paper, the random forest algorithm is employed in the classification and recognition research of hyperspectral image. Firstly, the different surface features are selected, and tagged with class labels. The bands of each pixel are the features of the sample. The Random forest classifier is trained by selected samples, and then applied in the hyperspectral image to be classified. The hyperspectral image to be classified is tagged with the same label. Through the classification precision effected by the variable of the out-of-bag data changing, the importance coefficient of each band to the classification result is acquired. We adopt the C++ language with Intel OpenCV library to write the hyperspectral image classification program. The hyperspectral image of village and city in Zhang ye of Gansu province collected by AISA hyperspectral sensor is used in the classification experiment. The result indicates that the algorithm adopted in this paper with the higher classification precision and the reliability.