A video-based technique to gate radiotherapy treatments for respiration