A new stereo algorithm based on snakes