[Qt-interest] How to increase brightness/sharpness

Oliver.Knoll at comit.ch Oliver.Knoll at comit.ch
Fri Jan 16 16:51:09 CET 2009


Avishek_Sharma wrote on Friday, January 16, 2009 11:13 AM:

> ... want to implement basic photo editing features like
> increase/decrease brightness,sharpness etc

Hmm, no offense meant , but your question obviously shows that you lack even the basic understanding of image editing algorithms, so I'd recommend you read a good book about image processing first. Because there are dozens of methods, for example, as to sharpen an image ("Unsharp mask", "Sharpen Edge", simple matrix convolution", ...) or methods to adjust brightness.

So I suggest you do at least a little bit of research for yourself:

  http://letmegooglethatforyou.com/?q=sharpen+image+algorithm
  http://letmegooglethatforyou.com/?q=increase+brightness+algorithm

One *simple* method to adjust brightness is to increase/decrease the value V of the HSV colour model. And in fact Qt allows you to convert an RGB colour into HSV, see also:

  http://doc.trolltech.com/4.4/qcolor.html#the-hsv-color-model

And Qt even implements such functionality:

  http://doc.trolltech.com/4.4/qcolor.html#lighter
  http://doc.trolltech.com/4.4/qcolor.html#darker

If you are a happy owner of a Qt commercial license the you could consider the following "Qt solution":

  http://www.qtsoftware.com/products/appdev/add-on-products/catalog/4/Utilities/qtimagefilters

which, as I understand, implements a generic convolution filter with which also basic sharpening is possible.


Good luck, Oliver







More information about the Qt-interest-old mailing list