The geometric properties of rock mass discontinuities are essential for the evaluation of the safety of rock masses. Numerous studies have recently been performed on the extraction of discontinuity information. However, most methods are characterized by poor data collection and processing efficiency. This paper presents a UAV-based methodology for the accurate and complete acquisition of rock surface data, as well as the automatic extraction of discontinuity information. Moreover, a program called Random Sample Consensus (RANSAC) Discontinuity Detection (RDD) is developed to extract discontinuity information based on the proposed method. The conclusions of this research are as follows. 1) RANSAC Discontinuity Detection (RDD) can identify the feature point set of discontinuities from a raw point cloud, and can calculate the discontinuity orientation. 2) The boundary of a discontinuity can be precisely depicted using the improved Graham scan algorithm. 3) The orientations of marked discontinuities extracted by RDD are compared with those extracted by the three-point method in CloudCompare. The differences in the orientations extracted by the two methods are found to be less than 3° for flat discontinuities and only about 4.87° for rough discontinuities, which are within a reasonable error range in practical engineering applications. Therefore, the feasibility of the proposed method is verified.