Key-frame detector