The performance of an automatic target recognition (ATR) system in the context of naval mine detection is severely affected by the underwater environment. Especially in regions with the presence of sand ripples or mine-sized stones the number of false alarms can become unacceptable high, if the detection algorithm does not account for the type of seafloor. Therefore, a robust way of discriminating between the three most important types of seafloor in the context of mine countermeasures (MCM), flat bottom, rocky bottom and sand ripples, is needed. In this paper five handcrafted features for seafloor classification from the literature are analysed and compared to the performance of a convolutional neural network (CNN) that learns the relevant features from the training data. The evaluation data was collected with an autonomous underwater vehicle (AUV) equipped with an synthetic aperture sonar. Experiments showed that the CNN approach outperformed a support vector machines classifier with the handcrafted features, albeit slightly, with a classification rate of 98.7% over 9420 examples.