A new algorithm for auto-exposure based on the analogy histogram