资源简介
配合Opencv生成交互界面,无序QT,只需要引入一个头文件即可编译,跨平台性能好
代码片段和文件信息
/*
This is a demo application to showcase keyboard shortcuts.
Author: Pascal Thomet
*/
#include
#include
#include
#include
#include “cvui.h“
#define WINDOW_NAME “Button shortcut“
int main(int argc const char *argv[])
{
cv::Mat frame = cv::Mat(cv::Size(650 150) CV_8UC3);
// Create an OpenCV window
cv::namedWindow(WINDOW_NAME);
// Tell cvui to use a value of 20 for cv::waitKey()
// because we want to enable keyboard shortcut for
// all components e.g. button with label “&Quit“.
// If cvui has a value for waitKey it will call
// waitKey() automatically for us within cvui::update().
cvui::init(WINDOW_NAME 20);
while (true) {
frame = cv::Scalar(49 52 49);
cvui::text(frame 40 40 “To exit this app click the button below or press Q (shortcut for the button below).“);
// Exit the application if the quit button was pressed.
// It can be pressed because of a mouse click or because
// the user pressed the “q“ key on the keyboard which is
// marked as a shortcut in the button label (“&Quit“).
if (cvui::button(frame 300 80 “&Quit“)) {
break;
}
// Since cvui::init() received a param regarding waitKey
// there is no need to call cv::waitKey() anymore. cvui::update()
// will do it automatically.
cvui::update();
cv::imshow(WINDOW_NAME frame);
}
return 0;
}
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
目录 0 2017-05-24 14:41 cvui-2.0.0\
文件 433 2017-05-24 14:41 cvui-2.0.0\.gitignore
文件 1122 2017-05-24 14:41 cvui-2.0.0\.travis.yml
目录 0 2017-05-24 14:41 cvui-2.0.0\.travis\
文件 1337 2017-05-24 14:41 cvui-2.0.0\.travis\install.sh
文件 1522 2017-05-24 14:41 cvui-2.0.0\CHANGELOG.md
文件 2440 2017-05-24 14:41 cvui-2.0.0\CMakeLists.txt
文件 106128 2017-05-24 14:41 cvui-2.0.0\Doxyfile
文件 1086 2017-05-24 14:41 cvui-2.0.0\LICENSE.md
文件 2223 2017-05-24 14:41 cvui-2.0.0\README.md
文件 81300 2017-05-24 14:41 cvui-2.0.0\cvui.h
目录 0 2017-05-24 14:41 cvui-2.0.0\docs\
文件 2302 2017-05-24 14:41 cvui-2.0.0\docs\README.md
文件 57 2017-05-24 14:41 cvui-2.0.0\docs\_config.yml
目录 0 2017-05-24 14:41 cvui-2.0.0\docs\_includes\
文件 715 2017-05-24 14:41 cvui-2.0.0\docs\_includes\head.html
文件 223 2017-05-24 14:41 cvui-2.0.0\docs\_includes\navbar.html
文件 3910 2017-05-24 14:41 cvui-2.0.0\docs\_includes\sidemenu.html
目录 0 2017-05-24 14:41 cvui-2.0.0\docs\_layouts\
文件 2170 2017-05-24 14:41 cvui-2.0.0\docs\_layouts\default.html
文件 1125 2017-05-24 14:41 cvui-2.0.0\docs\build.md
目录 0 2017-05-24 14:41 cvui-2.0.0\docs\components\
文件 1928 2017-05-24 14:41 cvui-2.0.0\docs\components\button.md
文件 138 2017-05-24 14:41 cvui-2.0.0\docs\components\checkbox.md
文件 135 2017-05-24 14:41 cvui-2.0.0\docs\components\counter.md
文件 129 2017-05-24 14:41 cvui-2.0.0\docs\components\iarea.md
文件 129 2017-05-24 14:41 cvui-2.0.0\docs\components\image.md
文件 132 2017-05-24 14:41 cvui-2.0.0\docs\components\printf.md
文件 126 2017-05-24 14:41 cvui-2.0.0\docs\components\rect.md
文件 141 2017-05-24 14:41 cvui-2.0.0\docs\components\sparkline.md
文件 126 2017-05-24 14:41 cvui-2.0.0\docs\components\text.md
............此处省略101个文件信息
- 上一篇:信捷PLC恒压供水程序
- 下一篇:四层电梯MCGS组态模拟
评论
共有 条评论