For the harsh environment and uneven ground during excavator slope repair operations, and to solve the problem of restricted vision of the driver during manual operation, a slope information perception method based on binocular cameras and auxiliary lines along the lower edge of the slope is proposed. The slope and the surrounding environment are matched in three dimensions by the binocular camera and the point cloud is reconstructed, and the auxiliary line point cloud is extracted by point cloud segmentation according to the difference in colour of the point cloud, and fitted to a spatial straight line as the position where the bucket stops working. For the typical working conditions of excavator slope repair construction, the most influential factors were selected for comparison experiments, and it was verified that the perception error of slope-related information by this method is within 4cm. The method can provide accurate information on the distance and coordinates of the slope and the auxiliary line, which improves the disadvantages of manual operation and provides information support for the autonomous slope repair of excavators.