Defined global histogram equalization