The present invention discloses a method for extracting Buddhist niches from the
point cloud of a grotto, including: Step 1, scanning to obtain the
point cloud data of the grotto and constructing a
point cloud feature set; Step 2, randomly selecting points to make training samples and test samples, selecting a
random forest as a classifier, training a
random forest classification model, and roughly classifying the point cloud into point
cloud data of single-Buddha niches, point
cloud data of double-Buddha niches, and point
cloud data of walls; Step 3, through
connectivity constraint filtering optimization, precisely classifying to obtain point cloud data of single-Buddha niches, point cloud data of double-Buddha niches, and point cloud data of walls; Step 4, through conditional Euclidean clustering - K-means clustering, extracting each individual single-Buddha niche object; Step 5, if there are multiple non-adjacent double-Buddha niches, extracting the point cloud data of double-Buddha niches obtained by precise classification, and through conditional Euclidean clustering, extracting each individual double-Buddha niche object. The method of the present invention has a high degree of
automation, identifies and preserves the three-dimensional information of each statue from the grotto, and is of great significance for the
digital storage, current situation assessment, and virtual restoration of the grotto.