Hyperspectral image (HSI) classification using convolutional neural network requires a lot of training samples, which is not always available. Consequently, decreases the classification accuracy due to the overfitting problem. Many studies have been conducted to solve the issue; however, they failed to solve it entirely. Therefore, we proposed a new approach to classify HSI with few training samples using a convolutional neural network in that context. The proposed approach employed an extended morphological profile cube (EMPC) to extract rich spectral-spatial features and then used a 3D densely connected network for classification. Besides, we used sparse principal component analysis to reduce the high spectral dimension of HSI. Experiments results on Indian Pines (IP) and University of Pavia (UP) datasets proved the efficiency of the proposed approach. It increased the OA by 2.61% - 13% and the Kappa coefficient by 2.68% - 15:51% on IP dataset and increased the OA by 0.17% - 11% and the Kappa coefficient by 0.23% - 19% on UP dataset, which is superior to some state-of-art methods.