OpenCV 进度条
可以在 OpenCV 应用程序中实现进度条吗?也许在图像之上?
Can a progressBar be implemented in an OpenCV application? Maybe on top of an image?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
可以在 OpenCV 应用程序中实现进度条吗?也许在图像之上?
Can a progressBar be implemented in an OpenCV application? Maybe on top of an image?
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
接受
或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
发布评论
评论(3)
我不知道有任何内置的 ProgressBar 类,但您可能可以模拟一个类,或者通过在彼此之上绘制两个矩形来编写自己的类。一个代表全面,另一个代表进步。
I am unaware of any built in progressBar class but you can probably emulate one or write your own by drawing two rectangles on top of each other. One representing the full range and the other representing the progress.
如果你只想使用 OpenCV,我使用的是将 0 到 1 之间的数字乘以在窗口中打开的图像。 IE:
如果你使用新的C++ Opencv:
我认为效果非常好,比简单的进度条更好。你只需要opencv库,如果图像很小对CPU来说很轻。
但是如果你想看到一个“Bar”,最简单的方法是使用 line 函数:
pt1 是图像一个角落的点,pt2 是 x 或 Y 轴变化的点,例如在其他代码中:
If you want to use only OpenCV, what I use is to multiply a number between 0 and 1 to an image open in a window. i.e:
if you are using the new C++ Opencv:
The effect is very nice in my opinion, better than a simple progress Bar. you only need the opencv library, if the image is small is very light to the CPU.
But if you want to see a "Bar" the easiest way is to use the line function:
pt1 is a point in one corner of your image, pt2 is the point in where their x or Y axis is changing for example in the other code:
如果您确实需要一个用户友好的 GUI,为什么不使用 Qt。它可以轻松地与 opencv 集成,并且有很多工具可以定制和创建 GUI。看一下Qt官方提供的集成opencv的链接。 http://qt-project.org/wiki/OpenCV_with_Qt
If you really need a user friendly GUI, why don't you use Qt. It can be easily integrated with opencv and there are lot for tools to customize and create GUI. Take a look at the official link provided by Qt to integrate opencv. http://qt-project.org/wiki/OpenCV_with_Qt