EMD parameter optimization for fast motion detection