From 3050debd164eda2ba6b0bcb2a8c3147ff28939f8 Mon Sep 17 00:00:00 2001 From: jkriege2 Date: Sat, 9 Feb 2019 22:17:01 +0100 Subject: [PATCH] - RGB-image plots now work properly with inverted axes (image is inverted, befor image was not shown at all) - added example for simple RGB math image plot with RGB/CMY-color mapping - fixed some of the OpenCV examples (improved QMake-project files) --- .gitignore | 1 + JKQtPlotterBuildAllExamples.pro | 1 + doc/dox/examples_and_tutorials.dox | 7 +- doc/dox/whatsnew.dox | 1 + doc/images/jkqtplotter_inverted_yaxis.png | Bin 0 -> 62058 bytes examples/README.md | 5 +- ...kqtplotter_simpletest_imageplot_opencv.cpp | 2 +- ...kqtplotter_simpletest_imageplot_opencv.pro | 27 ++-- ...er_simpletest_imageplot_opencv_and_lib.pro | 8 ++ examples/simpletest_rgbimageplot/README.md | 129 ++++++++++++++++++ .../jkqtplotter_simpletest_rgbimageplot.cpp | 116 ++++++++++++++++ .../jkqtplotter_simpletest_rgbimageplot.pro | 25 ++++ ...lotter_simpletest_rgbimageplot_and_lib.pro | 8 ++ .../simpletest_rgbimageplot_opencv/README.md | 17 ++- ...plotter_simpletest_rgbimageplot_opencv.cpp | 4 + ...plotter_simpletest_rgbimageplot_opencv.pro | 27 ++-- ...simpletest_rgbimageplot_opencv_and_lib.pro | 8 ++ examples/simpletest_rgbimageplot_qt/README.md | 12 ++ ...jkqtplotter_simpletest_rgbimageplot_qt.cpp | 2 + lib/jkqtplotter/jkqtpcoordinateaxes.h | 15 +- lib/jkqtplotter/jkqtpdatastorage.h | 3 - lib/jkqtplotter/jkqtpgraphsimage.cpp | 32 ++++- lib/jkqtplotter/jkqtpgraphsimagergb.cpp | 9 +- lib/jkqtplotter/jkqtpgraphsimagergb.h | 5 + lib/jkqtplotter/jkqtpopencvinterface.h | 4 +- lib/jkqtplottertools/jkqtpimagetools.h | 12 +- .../jkqtplotter_simpletest_rgbimageplot.png | Bin 0 -> 81472 bytes ...kqtplotter_simpletest_rgbimageplot_cmy.png | Bin 0 -> 81867 bytes ...plotter_simpletest_rgbimageplot_opencv.png | Bin 334100 -> 338583 bytes ...letest_rgbimageplot_opencv_updisdedown.png | Bin 0 -> 326151 bytes ...jkqtplotter_simpletest_rgbimageplot_qt.png | Bin 339858 -> 339339 bytes ...simpletest_rgbimageplot_qt_updisdedown.png | Bin 0 -> 338573 bytes ...tplotter_simpletest_rgbimageplot_small.png | Bin 0 -> 18467 bytes 33 files changed, 435 insertions(+), 45 deletions(-) create mode 100644 doc/images/jkqtplotter_inverted_yaxis.png create mode 100644 examples/simpletest_imageplot_opencv/jkqtplotter_simpletest_imageplot_opencv_and_lib.pro create mode 100644 examples/simpletest_rgbimageplot/README.md create mode 100644 examples/simpletest_rgbimageplot/jkqtplotter_simpletest_rgbimageplot.cpp create mode 100644 examples/simpletest_rgbimageplot/jkqtplotter_simpletest_rgbimageplot.pro create mode 100644 examples/simpletest_rgbimageplot/jkqtplotter_simpletest_rgbimageplot_and_lib.pro create mode 100644 examples/simpletest_rgbimageplot_opencv/jkqtplotter_simpletest_rgbimageplot_opencv_and_lib.pro create mode 100644 screenshots/jkqtplotter_simpletest_rgbimageplot.png create mode 100644 screenshots/jkqtplotter_simpletest_rgbimageplot_cmy.png create mode 100644 screenshots/jkqtplotter_simpletest_rgbimageplot_opencv_updisdedown.png create mode 100644 screenshots/jkqtplotter_simpletest_rgbimageplot_qt_updisdedown.png create mode 100644 screenshots/jkqtplotter_simpletest_rgbimageplot_small.png diff --git a/.gitignore b/.gitignore index 2cec06d9ac..fdf9c0376a 100644 --- a/.gitignore +++ b/.gitignore @@ -92,3 +92,4 @@ moc_predefs.h /doc/*.tmp *.prl Sicherungskopie_* +/examples/simpletest_rgbimageplot_opencv/opencv diff --git a/JKQtPlotterBuildAllExamples.pro b/JKQtPlotterBuildAllExamples.pro index b711d68ce5..fa171c1678 100644 --- a/JKQtPlotterBuildAllExamples.pro +++ b/JKQtPlotterBuildAllExamples.pro @@ -64,6 +64,7 @@ addSimpleTest(symbols_and_errors) addSimpleTest(symbols_and_styles) addSimpleTest(filledgraphs) addSimpleTest(speed) +addSimpleTest(rgbimageplot) addSimpleTest(rgbimageplot_qt) addSimpleTest(impulsesplot) addSimpleTest(paramscatterplot) diff --git a/doc/dox/examples_and_tutorials.dox b/doc/dox/examples_and_tutorials.dox index c68564d498..e5e2e59d65 100644 --- a/doc/dox/examples_and_tutorials.dox +++ b/doc/dox/examples_and_tutorials.dox @@ -85,7 +85,7 @@ All test-projects are Qt-projects that use qmake to build. You can load them int Screenshot Description Notes \image html jkqtplotter_simpletest_rgbimageplot_qt_small.png \subpage JKQTPlotterImagePlotQImageRGB - `JKQTPImage`
`QImage` drawn onto a plot with arbitrary scaling) + `JKQTPImage`
`QImage` drawn onto a plot with arbitrary scaling
inverted coordinate axes \image html jkqtplotter_simpletest_imageplot_small.png \subpage JKQTPlotterImagePlot `JKQTPColumnMathImage`
image data copied from C-style row-major array into a single column of the internal datastore
Describes several options of the image plotting classes (different ways of color coding, what to do with data above/below the limits etc.) @@ -95,12 +95,15 @@ All test-projects are Qt-projects that use qmake to build. You can load them int \image html jkqtplotter_simpletest_imageplot_nodatastore_small.png \subpage JKQTPlotterImagePlotNoDatastore `JKQTPMathImage`
image data in a C-style row-major array, not using internal datastore + \image html jkqtplotter_simpletest_rgbimageplot_small.png + \subpage JKQTPlotterRGBImagePlot + `JKQTPColumnRGBMathImage`
image data in a C-style row-major array, not using internal datastore
RGB/CMY color compositing \image html jkqtplotter_simpletest_imageplot_opencv_small.png \subpage JKQTPlotterImagePlotOpenCV `JKQTPColumnMathImage`
image data copied from OpenCV cv::Mat-structure into a single column of the internal datastore \image html jkqtplotter_simpletest_rgbimageplot_opencv_small.png \subpage JKQTPlotterImagePlotRGBOpenCV - `JKQTPColumnRGBMathImage`
image data copied from OpenCV cv::Mat-structure into three columns of the internal datastore + `JKQTPColumnRGBMathImage`
image data copied from OpenCV cv::Mat-structure into three columns of the internal datastore
inverted coordinate axes diff --git a/doc/dox/whatsnew.dox b/doc/dox/whatsnew.dox index cd8a6a7dd1..5834c6c14a 100644 --- a/doc/dox/whatsnew.dox +++ b/doc/dox/whatsnew.dox @@ -38,6 +38,7 @@ Changes, compared to \ref WHATSNEW_V2018_08 "v2018.08" include:
  • new: frames (plot viewport, key/legend ...) may be rounded off at the corners
  • new: diverse new styling options (default font name/size ...)
  • new: additionl options for styling coordinate axes
  • +
  • fixed: RGB-image plots now work properly with inverted axes (image is inverted, befor image was not shown at all)
  • Updates to JKQTMathText: