近年来,高光谱图像的分类受到了广泛的关注,许多机器学习的方法都在高光谱图像上得到了应用,如SVM、神经网络、决策树等. 为了提高分类精度,通常将图像的光谱信息与空间信息结合起来进行分类. 本文提出了如何利用分水岭分割得到的空间信息来得到更精确的分类结果. 首先利用分水岭得到图像区域信息,然后根据一个区域中是否含有训练样本而采取不同的策略得到该区域中所有点的类别. 本文在两幅图像上分别用SVM和联合稀疏表示对该方法的有效性进行验证,实验结果表明该方法优于其他一些同类方法.Hyperspectral image classification has attracted a great deal of attention. Many machine learning methods have been applied in hyperspectral image classification,such as SVM,neural network and decision tree,etc. In order to increase classification performances,people usually integrate of spatial information into the classification process. In this paper,we will present how to use spatial information obtained by watershed segmentation to obtain a more accurate classification results. We obtained the regional imformation by watershed segment and then adopted different strategies to get the category of the points in an area according to the area whether it contains the training sample. SVM and the joint sparse representation are used on two images to verify the effectiveness of the proposed method. Experimental results show that our algorithm outperforming some other similar methods