The application of residential robots promotes the development of smart home. This paper optimizes the image recognition technology in the robot cleaning system. This paper takes the image processing module of the robot cleaning system as the core, optimizes the image preprocessing and feature extraction algorithm, and reduces the noise interference. The regional stereo matching constraints are fused to realize the accurate matching of regional images. Real-time tracking of dynamic obstacles is realized by the SURF-KLT algorithm, after which the Greedy algorithm is used to accurately locate the moving target, reduce the risk of robot collision and improve the cleaning coverage rate. The results show that the image matching accuracy of the method in this paper reaches 99.7%. And the mAP-0.5 value is as high as 0.932, and the fluctuation of training precision and recall is smooth. In the cleaning practice, the robot is able to detect the 23 garbage present in the residence and calculate its weighted total value as 39 to plan the optimal cleaning path.