Detection and Recognition of Periodic, Nonrigid Motion