在OpenCV中绘制和绘制图形 [英] Drawing and Plotting graph in OpenCV

查看:88
本文介绍了在OpenCV中绘制和绘制图形的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

OpenCV是否提供有关如何绘制和绘制图形的功能?

Does OpenCV provide a function on how to draw and plot a graph?

我通过Shervin Emami找到了此链接 http://www.shervinemami.info/graphs.html由他自己创建.

I found this link by Shervin Emami http://www.shervinemami.info/graphs.html which was created by himself.

推荐答案

据我所知,OpenCV并未提供其函数来以cvDrawPlot(cvMat * data,其他参数...).

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...).

大多数仅使用OpenCV函数调用即可看到的绘图样本,涉及到进行绘图,就像使用cvCreateImage的任何其他图像一样.

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

然后,它们遍历数据并用cvRectanglecvLinecvCirclecvPoint之类的OpenCV原始图像填充图像.

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

然后他们调用cvShowImage来显示创建的绘图图像.

Then they call cvShowImage to display the created plot image.

如果找到的库满足您的要求,则可以使用它.

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

您还可以将数据写入文件,并调用gnuplot之类的外部绘图工具,或调用使用其他可视化或VTK或plplot之类的绘图库来绘制和绘制图形的函数.

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.

除了您找到的另一个库之外,还有 cvplot .

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

这篇关于在OpenCV中绘制和绘制图形的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆