Generalized Equalization Model for Image Enhancement