econsystems / opencv

Easy way to communicate with the camera using this OpenCV patch in c++
38 stars 18 forks source link

Buidling Sample Code does not work #5

Open Dehde opened 4 years ago

Dehde commented 4 years ago

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?

M-VishnuMurali commented 4 years ago

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.

TL-4319 commented 3 months ago

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.