分享

X is not a member of ''''cv''''异常解决

 waston 2018-02-16

以下四种异常:

'resize' is not a member of 'cv'

'cvtColor' is not a member of 'cv'
'putText' is not a member of 'cv'

'rectangle' is not a member of 'cv'

解决方法:都是加上头文件:

#include "opencv2/imgproc/imgproc.hpp"

(ofc, you have to link opencv_imgproc, too)

#include "opencv2/opencv.hpp"

convertro

是opencv/core库里面的

如果报下面的错:

VideoTest.cpp:(.text+0x6f): undefined reference to `cv::VideoWriter::fourcc(char,char,char, char)'
VideoTest.cpp:(.text+0xc3): undefined reference to `cv::VideoWriter::open(cv::String const&, int, double, cv::Size_, bool)'
VideoTest.cpp:(.text+0x103): undefined reference to `cv::namedWindow(cv::String const&, int)'
VideoTest.cpp:(.text+0x146): undefined reference to `cv::VideoCapture::read(cv::_OutputArray const&)'
VideoTest.cpp:(.text+0x1b1): undefined reference to `cv::imshow(cv::String const&, cv::_InputArray const&)'

解决方法是:
#include "opencv2/videoio.hpp"

also, you don't seem to link to any of the required opencv libs, those are:

opencv_core, opencv_videoio, opencv_highgui

参考网页:

http:///questions/27146818/opencv-resize-is-not-a-member-of-cv-opencv-basics

    本站是提供个人知识管理的网络存储空间,所有内容均由用户发布,不代表本站观点。请注意甄别内容中的联系方式、诱导购买等信息,谨防诈骗。如发现有害或侵权内容,请点击一键举报。
    转藏 分享 献花(0

    0条评论

    发表

    请遵守用户 评论公约

    类似文章 更多