您的位置:首页 > 编程语言 > Qt开发

QT上使用OpenCV

2015-11-22 09:47 573 查看

Qt版本:Qt5.5.1

OpenCV版本:OpenCV_2.4.8

参考:

/article/11771140.html

/article/2855010.html

测试代码:

<pre class="cpp" name="code">#include <opencv2/core/core.hpp>
#include <opencv2/highgui/highgui.hpp>

int main() {
// read an image
cv::Mat image= cv::imread("img.jpg");
// create image window named "My Image"
cv::namedWindow("My Image");
// show the image on window
cv::imshow("My Image", image);
// wait key for 5000 ms
cv::waitKey(5000);

return 0;
}



出现错误:

error: undefined reference to `cv::imread(std::string const&, int)'

……





内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: