tags:

views:

186

answers:

1

I want to implement image processing without using openGLES and having this functionality:

  • Brightness
  • Contrast
  • Saturation
  • Hue
  • Sharpness

How can I do this?

A: 

For hue and saturation go through each pixel and convert to HSV color space, directly adjust the hue and saturation components, then convert back into RGB.

For brightness and contrast you will want to map each pixel through a linear function where contrast determines the slope, and brightness determines the y coordinate of the midpoint (if your working on the interval [0, 1] then a line of slope 1/2 and containing the point {1/2, 3/4} will have decreased contrast and increased brightness).

Sharpness is more complicated as it is not a per-pixel operation, have a look at unsharp masking.

cobbal