OpenCV新增Qt功能
createButton OpenCV new Qt functionality
当我尝试编译这个时它给了我一个
在Example7.exe中0x75B0C42D的未处理异常:Microsoft c++ exception: cv:: exception at memory location 0x0016F9EC.
我不知道还能尝试什么。我试过很多不同的方法,到处看了看,似乎都没有找到适合我的方法。
我正在运行OpenCV 2.4.11 Visual Studio 2013所有在x84库windows 7 x64。
#include <opencv2/core/core.hpp>
#include <opencv2/highgui/highgui.hpp>
#include <iostream>
using namespace cv;
using namespace std;
int state;
void callbackButton2(int state, void* userdata)
{
cout << "Could not open or find the image" << std::endl;
}
int main()
{
Mat image;
image = imread("C:/Users/anjamaco/Documents/OPENCV/CODE/1/Example1/Capture2.PNG",1); // Read the fi
if (!image.data) // Check for invalid input
{
cout << "Could not open or find the image" << std::endl;
return -1;
}
namedWindow("Display window", WINDOW_AUTOSIZE);// Create a window for display.
namedWindow("Control Panel", CV_WINDOW_AUTOSIZE | CV_GUI_NORMAL);
createButton("Dummy button", callbackButton2, NULL, CV_PUSH_BUTTON, 1);
imshow("Display window", image); // Show our image inside it.
waitKey(0); // Wait for a keystroke in the window
return 0;
}
有人能给我一个例子,如何实现一个按钮,显示在控制台上的文本?
此函数仅在使用QT支持构建OpenCV时有效。OpenCV默认没有此功能。
在我的装有MSVC 2013的Windows 8盒子上,我可以看到下面的消息随着崩溃打印到控制台:
OpenCV错误:功能/特性未实现(库在没有QT支持的情况下编译)在cv::createButton,文件C:buildsmaster_PackSlave-win32-vc12-shared OpenCV moduleshighguisrcwindow.cpp,第478行
相关文章:
- Qt中来自不同功能的按钮引用
- QT 连接没有要调用的匹配功能
- 当再次触发信号时,从Qt插槽执行的功能被第二次调用时会发生什么?
- Qt C++括号匹配和突出显示当前线路功能无法协同工作
- 使用Qt将应用程序的功能拆分为插件
- 具有QList功能的QT应用程序<QString>"append"
- QT和新的信号槽语法,QApplication::退出主功能外的插槽
- 如何在Qt中向后移植功能
- C++ QT:获取指向信号的指针和插槽功能的函数
- 单位测试QT中的非返回功能
- 尝试在 qt 中建立访问器功能
- Qt - 没有用于连接的匹配功能
- 我可以使用QT的OpenGL功能而没有任何小部件
- 如何在64位QT应用中使用32位组装功能
- 如何使用QT类和功能构建XML文件,并逃脱所有非单数字符
- 为什么MainWindow的成员功能可以在QT中调用Qlabel的成员
- 如何使用拖放功能和点击信号函数QT创建标签
- 是否可以将一个类别的插槽或常规功能从一个类连接到另一个类的插槽或常规功能?(QT)
- 在功能QT C 中使用UI数组
- 呼叫连接没有匹配功能-Qt 5.5