real-time histogram specification