Drawing and Plotting graph in OpenCV

you can try this: https://code.google.com/p/cvplot/

Matlab style plot functions for OpenCV, based on highgui. By the way, it's for C++ only.

It's open source.


From what I can see OpenCV doesn't provide a function as part of its API to draw and plot graphs, in the form of cvDrawPlot(cvMat* data, other args...).

Most plotting samples seen using only OpenCV function calls involving making a plot as if were any other image with cvCreateImage.

Then they iterate through data and fill the image with OpenCV primites like cvRectangle, cvLine, cvCircle and cvPoint.

Then they call cvShowImage to display the created plot image.

If the library you found does what you want then you can use it.

You can also write the data to a file and call an external plotting tool like gnuplot or call functions that draw and plot graphs using other visualisation or plotting libraries like VTK or plplot.

Another library other than the one you have found is cvplot.

Tags:

Opencv