What's the simplest way to plot an image or matrix in wxWidgets? I've used wxMathPlot for simple y-vs-x scatter or line plots, but what if my data is an image?
I've seen libraries that integrate OpenGL with wxWidgets such as https://wiki.wxwidgets.org/WxGLCanvas - are there any alternatives?
Related
I have 3d data (x,y,z) and I want to plot them as a 3d plot and have them as an OpenCV mat.
my question:
I noted that OpenCV has a viz extension, but I believe it is for visualization. Can I use it for creating a mat file from a plot?
Is there any way that I can do this with OpenCV?
if I can not do this with OpenCV? what other library exists to help me do this?
I am developing C++ on windows.
In my C++ project, im using OpenCV library to implement image processing algorithms.
I want to draw outline or shadow to texts that i drew on frames with using OpenCV's putText function. I have researched about it but only solution that i found is drawing the same text twice. This solution drops the FPS of my overall project because im drawing many texts on the frames.
Do i have to code a new font library for my project or is there any simpler solutions to it?
thanks in advance.
EDIT: I tried FreeType with different ttf fonts that i found in various websites. Yes, there are some fonts that has default shadow or outlines in it. The problem here is i can't change the colour of the shadow of it. Yes, i can change the colour of overall font but shadow colour becomes the same as the font. I want black or white shadow that can highlight the text.
The simplest thing to do is draw the text once to an empty image, say A. then mask your main image several times with A, shifting A as required.
You could use freetype. OpenCV can be compiled with FreeType which will allow you to load fonts from ttf files. then you can look up for a free font online which suits four needs of make your own ttf file.
Here is a link on how to use FreeType with opencv.
https://docs.opencv.org/3.4/d9/dfa/classcv_1_1freetype_1_1FreeType2.html
As Qt developers know, in new Qt version, Qt 3D has been extended a lot. QtDataVisualization, Qt3DCore, Qt3DExtras and so on are the new examples have recently been added in Qt.
Because there are only a few examples of 3D, I ask about that. I have in mind to draw a 3D visualization of cylindrical trajectory as shown in the picture. Is it possible in Qt? Is it worth to spend my time to learn that?
As Open Asset Import Library (Assimp) is a part of Qt3D, you can definitely import a variety of 3D formats.
If you want to create cylinders or something cylinder-like, then this example https://doc.qt.io/GammaRay/gammaray-qt3d-geometry-example.html is very enlightening.
I have a vectorized Adobe Illustrator image that I would like to animate using custom xyz input (in this case simulated plot points that I would like to visualize over time, using a hand drawn picture/wireframe model) from e.g. a c++ program or perhaps even javascript application. Is there any (fairly straightforward) strategy to achieve this? E.g. using open GL or some other (open source) tool?
If you want to draw vectorized images you would need to use vector image renderer. The easiest way to do this is to use Flash since it has support vector drawing (one of the best) and really strong scripting language to do all sorts of things (anymate stuff based on input, etc) even 3d graphics.
The hard way of doing this is to use a custom library in c++ do draw vector grapics in opengl or directx. I can only speak of gameswf (opensource player for flash files) or scaleform. There two have support for swf files exported by flash. If you only need a renderer without any animation then there should be plenty of libraries out there (check out this thread)
How can I use both Opencv and OpenGl to draw some 3D shape onto a Mat frame ? The scenario is simple I am grabbing some frames ( cv::Mat) and I would like to visualise them with some 3D cool target arrows like this ---> target <---. Any ideas on how to do that? What would be a good reference to search for ?
Firstly use latest OpenCV version, or use the version which comes with Qt support. Make sure that you install OpenCV with Qt support, if you are building yourself then build with Qt support. Next go to this link http://docs.opencv.org/modules/highgui/doc/qt_new_functions.html#setopengldrawcallback
A single function will let you draw on the top of the image using a callback function.