0

If not, where can I find the algorithm to adjust contrast of an image. I will have to code it in C++ and have access to libjpeg and libjpeg-turbo libraries

http://en.wikipedia.org/wiki/Image_editing#Contrast_change_and_brightening

Is this a good starting point for color images?

BЈовић
  • 62,405
  • 41
  • 173
  • 273
user855
  • 19,048
  • 38
  • 98
  • 162

2 Answers2

1

The simplest I could have think of is the ImageMagick library, or do it yourself*.

* I know that the code in that answer is not c++, but if you know c or c++, you should be able to understand it.

Community
  • 1
  • 1
BЈовић
  • 62,405
  • 41
  • 173
  • 273
1

You might like this one for starters: Processing in the 8-bit YUV Color Space

C there is the contrast adjustment. With an image with pixel format in YUV color space, constrast adjustment is quite easy and is an update for Y component of the pixel.

libjpeg is not quite the tool for image processing, unless you are decoding/encoding JPEGs and you need some processing on the way.

Roman R.
  • 68,205
  • 6
  • 94
  • 158