Buidling Sample Code does not work
Hi,
I followed the instructions in https://github.com/econsystems/opencv/blob/master/Documents/OpenCV_Installation_Linux_Manual_v1.3.pdf on Ubuntu 18.04 and installed the openCV version 3.3.1.
After installation to /usr/local/lib, I want to test it by Building the Sample Code.
I run the following command:
econ_opencv/Source/OpenCVCam$ sudo make
And it fails for me with the following code:
~/PycharmProjects/econ_opencv/Source/OpenCVCam$ sudo make [sudo] password for rob: OpenCVCam.cpp: In function ‘bool listDevices()’: OpenCVCam.cpp:529:12: error: ‘class cv::VideoCapture’ has no member named ‘getDevices’ if (!(cap.getDevices(devices))) ^~~~~~~~~~ OpenCVCam.cpp:548:13: error: ‘class cv::VideoCapture’ has no member named ‘getDeviceInfo’ if (!(cap.getDeviceInfo(eachDevice, deviceName, vid, pid, devicePath))) ^~~~~~~~~~~~~ OpenCVCam.cpp:591:7: error: ‘class cv::VideoCapture’ has no member named ‘getDeviceInfo’ cap.getDeviceInfo((camId - 1), deviceName, vid, pid, devicePath); ^~~~~~~~~~~~~ OpenCVCam.cpp: In function ‘bool configFormats()’: OpenCVCam.cpp:784:13: error: ‘class cv::VideoCapture’ has no member named ‘getFormats’ if (!(cap.getFormats(formats))) ^~~~~~~~~~ OpenCVCam.cpp:799:14: error: ‘class cv::VideoCapture’ has no member named ‘getFormatType’ if (!(cap.getFormatType(formatList, formatType, width, height, fps))) ^~~~~~~~~~~~~ OpenCVCam.cpp:852:14: error: ‘class cv::VideoCapture’ has no member named ‘setFormatType’ if (!(cap.setFormatType(index))) ^~~~~~~~~~~~~ OpenCVCam.cpp:857:12: error: ‘class cv::VideoCapture’ has no member named ‘getFormatType’ if (cap.getFormatType(index, formatType, width, height, fps)) ^~~~~~~~~~~~~ OpenCVCam.cpp: In function ‘bool setVidProp(int, std::__cxx11::string)’: OpenCVCam.cpp:903:114: error: no matching function for call to ‘cv::VideoCapture::get(int&, int&, int&, int&, int&, int&, int&, int&)’ ximum, steppingDelta, supportedMode, currentValue, currentMode, defaultValue))) ^ In file included from /usr/local/include/opencv2/highgui.hpp:51:0, from /usr/local/include/opencv2/opencv.hpp:65, from OpenCVCam.cpp:16: /usr/local/include/opencv2/videoio.hpp:791:28: note: candidate: virtual double cv::VideoCapture::get(int) const CV_WRAP virtual double get(int propId) const; ^~~ /usr/local/include/opencv2/videoio.hpp:791:28: note: candidate expects 1 argument, 8 provided OpenCVCam.cpp:963:38: error: no matching function for call to ‘cv::VideoCapture::set(int&, int&, int&)’ if (!(cap.set(Property, value, mode))) ^ In file included from /usr/local/include/opencv2/highgui.hpp:51:0, from /usr/local/include/opencv2/opencv.hpp:65, from OpenCVCam.cpp:16: /usr/local/include/opencv2/videoio.hpp:772:26: note: candidate: virtual bool cv::VideoCapture::set(int, double) CV_WRAP virtual bool set(int propId, double value); ^~~ /usr/local/include/opencv2/videoio.hpp:772:26: note: candidate expects 2 arguments, 3 provided OpenCVCam.cpp: In function ‘bool configUVCSettings()’: OpenCVCam.cpp:1014:127: error: no matching function for call to ‘cv::VideoCapture::get(int&, int&, int&, int&, int&, int&, int&, int&)’ aximum, steppingDelta, supportedMode, currentValue, currentMode, defaultValue)) ^ In file included from /usr/local/include/opencv2/highgui.hpp:51:0, from /usr/local/include/opencv2/opencv.hpp:65, from OpenCVCam.cpp:16: /usr/local/include/opencv2/videoio.hpp:791:28: note: candidate: virtual double cv::VideoCapture::get(int) const CV_WRAP virtual double get(int propId) const; ^~~ /usr/local/include/opencv2/videoio.hpp:791:28: note: candidate expects 1 argument, 8 provided Makefile:7: recipe for target 'default' failed make: *** [default] Error 1
Could you help me solve this issue?
hi Dehde, From the make error show it seems the opencv builded without econsys videoio patch.Before building copy and paste the videoio module provided in the package.
Have you able to resolve this issue? I follow the suggested solution by replacing the videoio in the normal opencv source and build but the issue persist. It seems like there is another opencv being installed on my machine and make is referencing the actual opencv instead of the install with econ patch.