The coal gangue sorting robot may encounter variations in the pose of the target coal gangue due to belt slippage, deviation, and speed fluctuations, leading to failed or missed grasping attempts during the sorting process of coal gangue. In response to this issue, we propose a special two-stage network coal gangue image fast matching method to re-obtain the target coal gangue pose information, further improving the grasping accuracy and efficiency of the robot. In the first stage, we use SuperPoint to enhance the scene adaptability and credibility of feature point extraction. The improved Multi-scale Retinex with Color Restoration enhancement algorithm is used to further enhance the ability of Superpoint to detect feature points. In the second stage, we introduce SuperGlue for feature matching to improve the robustness of the matching network. Integrating the Progressive Sample Consensus algorithm to further eliminate erroneous feature matching point pairs and improve the accuracy of image matching. We conducted matching experiments of coal gangue under different object distances, scales, and rotation angles using various methods on the double-manipulator truss-type coal gangue sorting robot experimental platform independently developed by our team. The results showed that the matching rate of the proposed method was 98.2%, with a matching time of 84.6ms. It has the characteristics of a high matching rate, good real-time performance, and strong robustness, and can meet the requirements of efficient and accurate matching between coal gangue recognition images and sorting images.