QT上使用OpenCV

来源:互联网 发布:java培训课 编辑:程序博客网 时间:2024/05/19 14:37


Qt版本:Qt5.5.1

OpenCV版本:OpenCV_2.4.8


参考:

http://blog.csdn.net/u014291399/article/details/44992917

http://blog.csdn.net/qiurisuixiang/article/details/8665278


测试代码:

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

……












0 0
原创粉丝点击