zoukankan      html  css  js  c++  java
  • error: In function ‘void* opencv_showimg(void*)’:

    今天这个问题折磨了我一下午,终于知道是为什么了,心酸历程。。。。。赶紧来记录一下

    错误:

    /home/wj/workspace/Loitor_VI_Sensor_SDK_V1.3/SDK/src/camtest2.cpp: In function ‘void* opencv_showimg(void*)’:
    /home/wj/workspace/Loitor_VI_Sensor_SDK_V1.3/SDK/src/camtest2.cpp:54:26: error: ‘imshow’ was not declared in this scope
        imshow("left",img_left);
                              ^
    /home/wj/workspace/Loitor_VI_Sensor_SDK_V1.3/SDK/src/camtest2.cpp:66:28: error: ‘imshow’ was not declared in this scope
        imshow("right",img_right);
                                ^
    /home/wj/workspace/Loitor_VI_Sensor_SDK_V1.3/SDK/src/camtest2.cpp:79:26: error: ‘imshow’ was not declared in this scope
        imshow("left",img_left);
                              ^
    make[2]: *** [CMakeFiles/camtest2.dir/src/camtest2.cpp.o] Error 1
    make[1]: *** [CMakeFiles/camtest2.dir/all] Error 2
    make: *** [all] Error 2

    出现这种问题的时候,一般是头文件不对,查一下你库存放的位置,版本不同 #include 后面写的是不同。

    他原来的程序是

    #include <cv.h>
    #include <highgui.h>

    而我的头文件是

    #include <opencv2/core/core.hpp>
    #include <opencv2/highgui/highgui.hpp>

    这样修改就好了。。。所以写成自己的才能调用成功。。。。。

     

  • 相关阅读:
    10.28MySQL的介绍和安装
    10.24 Event事件,进程池与线程池,协程
    10.23GIL全局解释器锁,多线程作用,死锁,递归锁,信号量
    10.22进程互斥锁,队列,堆栈,线程
    10.21 操作系统发展史,进程
    10.18(粘包问题与解决方法,UDP,socketserver)
    day 67小结
    day 67作业
    day 66 小结
    day 66作业
  • 原文地址:https://www.cnblogs.com/Jessica-jie/p/6560850.html
Copyright © 2011-2022 走看看