Video selection for visual sensor networks: A motion-based ranking algorithm