开发者

Can libjpeg be used to change contrast of images in C++?

开发者 https://www.devze.com 2023-04-10 02:36 出处:网络
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

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_brighten开发者_运维问答ing

Is this a good starting point for color images?


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.


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.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号