Under the action of water erosion and self-aging action, reservoir dams are prone to have cracks, affecting the safe operation. Underwater visual imaging can be used to detect dam surface cracks, but the spalling, aquatic plants and suspended sediments result in low image contrast and complex backgrounds. With the use of unsupervised machine learning, this paper proposes a fine segmentation and extraction algorithm for image-based dam surface cracks. Firstly, the adaptive histogram equalization is used to make the uneven illumination areas of underwater surface images be even illumination areas, whose statistical characteristics is calculated under the linear spatial filtering. Secondly, the extraction problem of interested crack areas after dodging preprocess is transformed into calculating the distance of image block cluster center, which can distinguish the image blocks of crack features from the background interference features. Thirdly, the fine extraction of crack images is carried out in consideration of the connected domains and morphological features, and the posterior probability of image sample category is obtained based on the soft clustering of Gaussian mixed model. Finally, different extraction algorithms related to surface cracks are evaluated in extensive experiments. The results validate the superior performance of the proposed extraction algorithm with 90.1% extraction accuracy, 6.5% missing alarm rate, and 7.2% false alarm rate.