Gating of X-ray fluoroscopy images is required for catheter reconstruction for registration of pre-procedural images with fluoroscopy for guidance and biophysical modelling. We propose a novel and clinically useful retrospective method for automatic image-based cardiac and respiratory motion gating. The technique is based on tracking and statistical analysis of the shape of the coronary sinus catheter. We applied our method on five mono-plane imaging sequences comprising a total of 322 frames from five different patients undergoing radiofrequency ablation for the treatment of atrial fibrillation. We established systole, end-inspiration and end-expiration gating with success rates of 100%, 89.47% and 81.25% respectively.