We automatically mapped the distribution of temperate continental shelf rocky reef habitats with a high degree of confidence using colour, texture, rugosity and patchiness features extracted from images in conjunction with machine-learning algorithms. This demonstrated the potential of novel automation routines to expedite the complex and time-consuming process of seabed mapping. The random forests ensemble classifier outperformed other tree-based algorithms and also offered some valuable built-in model performance assessment tools. Habitat prediction using random forests performed most accurately when all 26 image-derived predictors were included in the model. This produced an overall habitat prediction accuracy of 84% (with a kappa statistic of 0.793) when compared to nine distinct habitat classes assigned by a human annotator. Predictions for three habitat classes were all within the 95% confidence intervals, indicating close agreement between observed and predicted habitat classes. Misclassified images were mostly unevenly, partially or insufficiently illuminated and came mostly from rugged terrains and during the autonomous underwater vehicle's obstacle avoidance manoeuvres. The remaining misclassified images were wrongly or inconsistently labelled by the human annotator. This study demonstrates the suitability of autonomous underwater vehicles to effectively sample benthic habitats and the ability of automated data handling techniques to extract and reliably process large volumes of seabed image data. Our methods for image feature extraction and classification are repeatable, cost-effective and well suited to studies that require non-extractive and/or co-located sampling, e.g. in marine reserves and for monitoring the recovery from physical impacts, e.g. from bottom fishing activities. The methods are transferable to other continental shelf areas and to other disciplines such as seabed geology.