Drilling cores, the most direct and accurate first-hand data reflecting the subsurface geological information, are of unclear orientation for most boreholes. The image feature comparison method is one of the most widely used methods for core orientation. However, this method is mainly conducted by manual comparison, which is labor-intensive, time-consuming and inaccurate. In this paper, we propose an automatic core orientation method by comparing the planar geologic features (one of the most common features) in drill-core scans and microresistivity images. This method first automatically detects planar geologic features by combing the vertical gradient-based Otsu threshold segmentation, Hough transform and optimal sinusoid extraction and then determines correction difference of the core orientation by comparing the dip azimuths of the optimal sinusoids from the two types of images. This method is successfully applied to actual data. The automatic core orientation results are compared with the manual core orientation results. The results show that this method can eliminate human errors and has higher accuracy, especially for core scan images with non-distinct features. The proposed method has wide application potential in the fields of hydrocarbon exploration and development, scientific drilling research, and basic geological surveys.INDEX TERMS Bedding surfaces, borehole images, core orientation, core scan images, Hough transform.