To improve the accuracy of tracking method and the stability of landing algorithm for UAV on the dynamic platform, a two-stage vision-based autonomous tracking and landing algorithm is proposed. The first stage is target tracking. To complete this purpose, a visual coordinate detection method based on AprilTag is used. And then K-Nearest Neighbors anomaly detection method is used to eliminate the abnormal data to improve the accuracy of velocity estimation approach. After that, the Attenuated Memory Cubature Kalman Filter (AMCKF) is applied on trajectory prediction. The second stage is autonomous landing. In this stage, a multi-sensor data adaptive fusion method is used to obtain the more accurate altitude information. The experiments show that the proposed algorithm can reduce the deviations of position and make the UAV landing process on the platform more accurately.