Learning parametric functions for color image enhancement