The table tennis robot is a hand-eye system that combines a visual system, a mechanical system, and a control system. The visual system is equivalent to the human brain and eyes. The visual system predicts the flight trajectory of table tennis and calculates the hitting point and hitting ball. When the time comes, the hitter can return the ball effectively. This article mainly studies the visual detection and decision-making of table tennis robots. This article introduces the method of dual target calibration, calculates the relationship between the internal parameters of the camera and the camera, and uses the calibration results to calculate the three-dimensional coordinate information of the table tennis. By comparing the existing target tracking image processing algorithms, and according to the flight characteristics of table tennis, research and formulate a set of fast real-time image processing algorithms. Through the force analysis of the table tennis in flight, the parameter model of the table tennis flight trajectory is established, and the experimental analysis of the landing point and the hitting point predicted by the flight model is carried out. In the online decision-making process, the multi-initial value quasi-Newton method is used to maximize the hitting evaluation function to solve the optimal hitting trajectory. The experimental results in this paper show that the average error of the return point of the table tennis robot in these 10 experiments is 13.4cm; the average value of the return point of the robot in 10 shots is [-2.5cm, 78.8cm], and the variance is [5.3cm, 13.4cm]; The average value of the person's return point is [-3.1cm, 13.9cm], and the variance is [11.6cm, 22.9cm]. The experimental results of this paper show that the return accuracy of table tennis robots is better than those who have little experience in hitting the ball; table tennis robots can adapt to changes in the state of the incoming ball and complete the fixed-point return task with higher accuracy and success rate.