PDA

View Full Version : how to apply realtime color mapping



hakiim35
9th May 2011, 08:24
Hi all, I am implementing a curve tool which will apply realtime color modification(contrast/color balancing) of an image. It will be similar to the curve tool of GIMP or Adobe PhotoShop. I have implemented the curve fitting, so I have the QPolygonF of fitted curve points when the user modifies the curve by mouse move. Now I have to apply fast, realtime color mapping based on the new curve points; how can I use the QwtColorMap class to achieve this? Any sample code that applies color mapping to a given QImage using a number of curve points? And I need to apply this both for indexed/grayscale images and color RGB images..

Best regards.

Uwe
10th May 2011, 06:37
QwtPlotSpectroCurve displays 3D points as colored points, where the z-value is mapped to a color using a color map. QwtPlotSpectrogram maps raster data into an image - also using a color map to map the values to a color.

Both are plot items intended for displaying something on the plot canvas.

Uwe