A mixture-model based algorithm for real-time terrain estimation