An Automated Algorithm for Identifying and Tracking Transverse Waves in Solar Images