Merging of histograms to prevent flickering