This study introduces an innovative trajectory prediction algorithm for table tennis, employing an optimized Unscented Kalman Filter (UKF) combined with a Simple Physical Motion (SPM) model. The conventional UKF algorithm, while effective in real-time predictions, often encounters significant deviations in short-term forecasts, especially when dealing with abrupt changes in a table tennis ball’s motion. To address this, our approach integrates UKF with SPM, effectively predicting the ball’s trajectory pre- and post-collision. The method begins by using UKF to predict the ball’s trajectory and landing point before collision, taking into account factors such as air resistance, gravity, and the Magnus force caused by the ball’s rotation. After collision, the trajectory is forecasted using a simplified collision rebound model and a kinematic model. This dual-phase approach significantly reduces trajectory prediction errors post-collision. This algorithm’s practical application is demonstrated in a constructed table tennis robot system, highlighting its superior real-time performance and accuracy, particularly in post-collision trajectory prediction. This makes it a valuable tool for advanced table tennis training and robotic interaction systems. This study contributes to the field of machine vision and robotic interaction by presenting a more efficient and accurate method for trajectory prediction, particularly in dynamic environments like table tennis. The algorithm’s lower hardware requirements, combined with its robustness and simplicity, underscore its potential in broader applications where accurate real-time trajectory prediction is crucial. This development not only advances the field of sports robotics but also has implications for various industrial and research applications where precise object tracking and prediction are essential.