use opencv lib to do motion detection