How to draw histogram?
-
Did you have a look to the documentation by any means?
At the top of this page anybody can enter the documentation.There is an access method for "pixels":http://developer.qt.nokia.com/doc/qt-4.8/qimage.html#pixel
These methods are returning QRbg. Details you may find under "QColor":http://developer.qt.nokia.com/doc/qt-4.8/qcolor.html -
Qt does not have directly the possibility to draw histograms. There is "QWT":http://qwt.sourceforge.net/ using Qt for drawing graphs. This library supports also drawing a histogram. Unfortunately, I am not aware of a ready to use example.
-
[quote author="mario5046" date="1324731901"]OK, but I don't know how to draw histogram. Can you give me any example?[/quote]
You would have to ask the lazyweb for that or buy a nice text book on image processing. As koahnig already stated, Qt does not have any builtin means for that.
But if you don't know how an image histogram is made, what are you going to do with it?
-
May be this can be helpful:
"NightChart":http://qt-apps.org/content/show.php/NightCharts(Draw+Charts)?content=132560 -
Here's an example how to draw a histogram (bar chart), provided you already have the data
http://doc.qt.io/qt-5/qtcharts-barchart-example.htmlMore charts examples: http://doc.qt.io/qt-5/qtcharts-examples.html
-
This post is deleted!