OpenCV4 error: ‘CV_CAP_PROP_FRAME_WIDTH’ was not declared in this scope
OpenCV4 error: ‘CV_CAP_PROP_FRAME_WIDTH’ was not declared in this scope
我最近在 Ubuntu 18.04 LTS 上从 OpenCV3.3 迁移到最新版本的 OpenCV4。我在安装过程中遇到了一些持续存在的问题。当我按照 this installation tutorial. But whenever I include the module opencv2/highgui.hpp
in my project, I get problems like below. This seems to be an issue caused by highgui.hpp when I followed this link.
安装时,我的安装没有出现任何错误
/home/arun/Documents/AutonomousLaneDetection/app/main.cpp: In function ‘int main(int, char**)’:
/home/arun/Documents/AutonomousLaneDetection/app/main.cpp:118:36: error: ‘CV_CAP_PROP_FRAME_WIDTH’ was not declared in this scope
int videoWidth = videofile.get(CV_CAP_PROP_FRAME_WIDTH);
^~~~~~~~~~~~~~~~~~~~~~~
/home/arun/Documents/AutonomousLaneDetection/app/main.cpp:119:37: error: ‘CV_CAP_PROP_FRAME_HEIGHT’ was not declared in this scope
int videoHeight = videofile.get(CV_CAP_PROP_FRAME_HEIGHT);
^~~~~~~~~~~~~~~~~~~~~~~~
/home/arun/Documents/AutonomousLaneDetection/app/main.cpp:123:27: error: ‘CV_FOURCC’ was not declared in this scope
CV_FOURCC('M', 'J', 'P', 'G'), 10,
^~~~~~~~~
/home/arun/Documents/AutonomousLaneDetection/app/main.cpp:123:27: note: suggested alternative: ‘CV_BLUR’
CV_FOURCC('M', 'J', 'P', 'G'), 10,
^~~~~~~~~
CV_BLUR
我最近在 Ubuntu 18.04 LTS 上从 OpenCV3.3 迁移到最新版本的 OpenCV4。我在安装过程中遇到了一些持续存在的问题。当我按照 this installation tutorial. But whenever I include the module opencv2/highgui.hpp
in my project, I get problems like below. This seems to be an issue caused by highgui.hpp when I followed this link.
/home/arun/Documents/AutonomousLaneDetection/app/main.cpp: In function ‘int main(int, char**)’:
/home/arun/Documents/AutonomousLaneDetection/app/main.cpp:118:36: error: ‘CV_CAP_PROP_FRAME_WIDTH’ was not declared in this scope
int videoWidth = videofile.get(CV_CAP_PROP_FRAME_WIDTH);
^~~~~~~~~~~~~~~~~~~~~~~
/home/arun/Documents/AutonomousLaneDetection/app/main.cpp:119:37: error: ‘CV_CAP_PROP_FRAME_HEIGHT’ was not declared in this scope
int videoHeight = videofile.get(CV_CAP_PROP_FRAME_HEIGHT);
^~~~~~~~~~~~~~~~~~~~~~~~
/home/arun/Documents/AutonomousLaneDetection/app/main.cpp:123:27: error: ‘CV_FOURCC’ was not declared in this scope
CV_FOURCC('M', 'J', 'P', 'G'), 10,
^~~~~~~~~
/home/arun/Documents/AutonomousLaneDetection/app/main.cpp:123:27: note: suggested alternative: ‘CV_BLUR’
CV_FOURCC('M', 'J', 'P', 'G'), 10,
^~~~~~~~~
CV_BLUR