First draft of camera motion detector