Dear all,
I have downloaded opencv 3.0.0 from the website.
I am using Ubuntu 12.04 and ffmpeg and gphoto2-2.5.8 both compiled from source.
[https://gist.github.com/xdamman/e4f713c8cd1a389a5917](https://gist.github.com/xdamman/e4f713c8cd1a389a5917)
[link text](http://www.gphoto.org/)
As much as I try to compile it, ir returns a bunch of errors
I am downloading it from here: [link text](https://github.com/Itseez/opencv/archive/3.0.0.zip)
I am using the fokkowing command after extracting it:
cd opencv-3.0.0
mkdir build
cd build
cmake -D CMAKE_BUILD_TYPE=RELEASE -D PYTHON_INCLUDE_DIR=$(python3 -c "from distutils.sysconfig import get_python_inc; print(get_python_inc())") -D PYTHON_EXECUTABLE=$(which python3) -D PYTHON_PACKAGES_PATH=$(python3 -c "from distuti`enter code here`ls.sysconfig import get_python_lib; print(get_python_lib())") ..
make -j8
Note: I use custom cmake command to force python3 (sorry so many links, I lost the one I got this command). The installation process did not recognize python3 otherwise. Anyway, I am replicating it here.
I have no intention to un-select any of the installation options -- such as gphoto2 or ffmpeg. Having said that, I add that opencv-3.0.0 is mandatory. Opencv 2 packages work like a charm. though.
Here are the errors:
/home/vitor/opencv-3.0.0/modules/videoio/src/cap_gphoto2.cpp:171:27: warning: ISO C++ forbids initialization of member ‘context’ [-fpermissive]
/home/vitor/opencv-3.0.0/modules/videoio/src/cap_gphoto2.cpp:171:27: warning: making ‘context’ static [-fpermissive]
/home/vitor/opencv-3.0.0/modules/videoio/src/cap_gphoto2.cpp:171:27: error: invalid in-class initialization of static data member of non-integral type ‘GPContext* {aka _GPContext*}’
/home/vitor/opencv-3.0.0/modules/videoio/src/cap_gphoto2.cpp:177:23: warning: ISO C++ forbids initialization of member ‘camera’ [-fpermissive]
/home/vitor/opencv-3.0.0/modules/videoio/src/cap_gphoto2.cpp:177:23: warning: making ‘camera’ static [-fpermissive]
/home/vitor/opencv-3.0.0/modules/videoio/src/cap_gphoto2.cpp:177:23: error: invalid in-class initialization of static data member of non-integral type ‘Camera* {aka _Camera*}’
/home/vitor/opencv-3.0.0/modules/videoio/src/cap_gphoto2.cpp:181:33: warning: ISO C++ forbids initialization of member ‘rootWidget’ [-fpermissive]
/home/vitor/opencv-3.0.0/modules/videoio/src/cap_gphoto2.cpp:181:33: warning: making ‘rootWidget’ static [-fpermissive]
/home/vitor/opencv-3.0.0/modules/videoio/src/cap_gphoto2.cpp:181:33: error: invalid in-class initialization of static data member of non-integral type ‘CameraWidget* {aka _CameraWidget*}’
/home/vitor/opencv-3.0.0/modules/videoio/src/cap_gphoto2.cpp:213:43: warning: ISO C++ forbids initialization of member ‘abilitiesList’ [-fpermissive]
/home/vitor/opencv-3.0.0/modules/videoio/src/cap_gphoto2.cpp:213:43: warning: making ‘abilitiesList’ static [-fpermissive]
/home/vitor/opencv-3.0.0/modules/videoio/src/cap_gphoto2.cpp:213:43: warning: invalid in-class initialization of static data member of non-integral type ‘CameraAbilitiesList* {aka _CameraAbilitiesList*}’
/home/vitor/opencv-3.0.0/modules/videoio/src/cap_gphoto2.cpp:214:37: warning: ISO C++ forbids initialization of member ‘capablePorts’ [-fpermissive]
/home/vitor/opencv-3.0.0/modules/videoio/src/cap_gphoto2.cpp:214:37: warning: making ‘capablePorts’ static [-fpermissive]
/home/vitor/opencv-3.0.0/modules/videoio/src/cap_gphoto2.cpp:214:37: error: invalid in-class initialization of static data member of non-integral type ‘GPPortInfoList* {aka _GPPortInfoList*}’
/home/vitor/opencv-3.0.0/modules/videoio/src/cap_gphoto2.cpp:215:31: warning: ISO C++ forbids initialization of member ‘allDevices’ [-fpermissive]
/home/vitor/opencv-3.0.0/modules/videoio/src/cap_gphoto2.cpp:215:31: warning: making ‘allDevices’ static [-fpermissive]
/home/vitor/opencv-3.0.0/modules/videoio/src/cap_gphoto2.cpp:215:31: error: invalid in-class initialization of static data member of non-integral type ‘CameraList* {aka _CameraList*}’
/home/vitor/opencv-3.0.0/modules/videoio/src/cap_gphoto2.cpp: Na função membro ‘void cv::gphoto2::DigitalCameraCapture::initContext()’:
/home/vitor/opencv-3.0.0/modules/videoio/src/cap_gphoto2.cpp:323:5: error: ‘context’ was not declared in this scope
/home/vitor/opencv-3.0.0/modules/videoio/src/cap_gphoto2.cpp:332:9: error: ‘abilitiesList’ was not declared in this scope
/home/vitor/opencv-3.0.0/modules/videoio/src/cap_gphoto2.cpp:333:9: error: ‘abilitiesList’ was not declared in this scope
/home/vitor/opencv-3.0.0/modules/videoio/src/cap_gphoto2.cpp:336:9: error: ‘capablePorts’ was not declared in this scope
/home/vitor/opencv-3.0.0/modules/videoio/src/cap_gphoto2.cpp:337:9: error: ‘capablePorts’ was not declared in this scope
/home/vitor/opencv-3.0.0/modules/videoio/src/cap_gphoto2.cpp:340:9: error: ‘allDevices’ was not declared in this scope
/home/vitor/opencv-3.0.0/modules/videoio/src/cap_gphoto2.cpp:341:9: error: ‘allDevices’ was not declared in this scope
/home/vitor/opencv-3.0.0/modules/videoio/src/cap_gphoto2.cpp:342:9: error: ‘allDevices’ was not declared in this scope
/home/vitor/opencv-3.0.0/modules/videoio/src/cap_gphoto2.cpp: No destrutor ‘virtual cv::gphoto2::DigitalCameraCapture::~DigitalCameraCapture()’:
/home/vitor/opencv-3.0.0/modules/videoio/src/cap_gphoto2.cpp:388:9: error: ‘abilitiesList’ was not declared in this scope
/home/vitor/opencv-3.0.0/modules/videoio/src/cap_gphoto2.cpp:389:9: error: ‘abilitiesList’ was not declared in this scope
/home/vitor/opencv-3.0.0/modules/videoio/src/cap_gphoto2.cpp:390:9: error: ‘capablePorts’ was not declared in this scope
/home/vitor/opencv-3.0.0/modules/videoio/src/cap_gphoto2.cpp:391:9: error: ‘capablePorts’ was not declared in this scope
/home/vitor/opencv-3.0.0/modules/videoio/src/cap_gphoto2.cpp:392:9: error: ‘allDevices’ was not declared in this scope
/home/vitor/opencv-3.0.0/modules/videoio/src/cap_gphoto2.cpp:393:9: error: ‘allDevices’ was not declared in this scope
/home/vitor/opencv-3.0.0/modules/videoio/src/cap_gphoto2.cpp:394:26: error: ‘context’ was not declared in this scope
/home/vitor/opencv-3.0.0/modules/videoio/src/cap_gphoto2.cpp: Na função membro ‘bool cv::gphoto2::DigitalCameraCapture::open(int)’:
/home/vitor/opencv-3.0.0/modules/videoio/src/cap_gphoto2.cpp:418:9: error: ‘camera’ was not declared in this scope
/home/vitor/opencv-3.0.0/modules/videoio/src/cap_gphoto2.cpp:419:9: error: ‘allDevices’ was not declared in this scope
/home/vitor/opencv-3.0.0/modules/videoio/src/cap_gphoto2.cpp:420:9: error: ‘allDevices’ was not declared in this scope
/home/vitor/opencv-3.0.0/modules/videoio/src/cap_gphoto2.cpp:423:9: error: ‘abilitiesList’ was not declared in this scope
/home/vitor/opencv-3.0.0/modules/videoio/src/cap_gphoto2.cpp:424:9: error: ‘abilitiesList’ was not declared in this scope
/home/vitor/opencv-3.0.0/modules/videoio/src/cap_gphoto2.cpp:425:9: error: ‘camera’ was not declared in this scope
/home/vitor/opencv-3.0.0/modules/videoio/src/cap_gphoto2.cpp:428:9: error: ‘capablePorts’ was not declared in this scope
/home/vitor/opencv-3.0.0/modules/videoio/src/cap_gphoto2.cpp:429:9: error: ‘capablePorts’ was not declared in this scope
/home/vitor/opencv-3.0.0/modules/videoio/src/cap_gphoto2.cpp:430:9: error: ‘camera’ was not declared in this scope
/home/vitor/opencv-3.0.0/modules/videoio/src/cap_gphoto2.cpp:433:9: error: ‘camera’ was not declared in this scope
/home/vitor/opencv-3.0.0/modules/videoio/src/cap_gphoto2.cpp:433:9: error: ‘context’ was not declared in this scope
/home/vitor/opencv-3.0.0/modules/videoio/src/cap_gphoto2.cpp: Na função membro ‘void cv::gphoto2::DigitalCameraCapture::close()’:
/home/vitor/opencv-3.0.0/modules/videoio/src/cap_gphoto2.cpp:476:13: error: ‘camera’ was not declared in this scope
/home/vitor/opencv-3.0.0/modules/videoio/src/cap_gphoto2.cpp:478:13: error: ‘context’ was not declared in this scope
/home/vitor/opencv-3.0.0/modules/videoio/src/cap_gphoto2.cpp:492:13: error: ‘rootWidget’ was not declared in this scope
/home/vitor/opencv-3.0.0/modules/videoio/src/cap_gphoto2.cpp: Na função membro ‘virtual double cv::gphoto2::DigitalCameraCapture::getProperty(int) const’:
/home/vitor/opencv-3.0.0/modules/videoio/src/cap_gphoto2.cpp:607:21: error: ‘rootWidget’ was not declared in this scope
/home/vitor/opencv-3.0.0/modules/videoio/src/cap_gphoto2.cpp: Na função membro ‘virtual bool cv::gphoto2::DigitalCameraCapture::setProperty(int, double)’:
/home/vitor/opencv-3.0.0/modules/videoio/src/cap_gphoto2.cpp:805:9: erro:r ‘camera’ was not declared in this scope
/home/vitor/opencv-3.0.0/modules/videoio/src/cap_gphoto2.cpp:805:9: error: ‘rootWidget’ was not declared in this scope
/home/vitor/opencv-3.0.0/modules/videoio/src/cap_gphoto2.cpp:805:9: error: ‘context’ was not declared in this scope
/home/vitor/opencv-3.0.0/modules/videoio/src/cap_gphoto2.cpp: Na função membro ‘virtual bool cv::gphoto2::DigitalCameraCapture::grabFrame()’:
/home/vitor/opencv-3.0.0/modules/videoio/src/cap_gphoto2.cpp:839:13: error: ‘camera’ was not declared in this scope
/home/vitor/opencv-3.0.0/modules/videoio/src/cap_gphoto2.cpp:839:13: error: ‘context’ was not declared in this scope
/home/vitor/opencv-3.0.0/modules/videoio/src/cap_gphoto2.cpp:844:13: error: ‘camera’ was not declared in this scope
/home/vitor/opencv-3.0.0/modules/videoio/src/cap_gphoto2.cpp:844:13: error: ‘context’ was not declared in this scope
/home/vitor/opencv-3.0.0/modules/videoio/src/cap_gphoto2.cpp:845:13: error: ‘camera’ was not declared in this scope
/home/vitor/opencv-3.0.0/modules/videoio/src/cap_gphoto2.cpp:845:13: error: ‘context’ was not declared in this scope
/home/vitor/opencv-3.0.0/modules/videoio/src/cap_gphoto2.cpp:847:13: error: ‘camera’ was not declared in this scope
/home/vitor/opencv-3.0.0/modules/videoio/src/cap_gphoto2.cpp:847:13: error: ‘context’ was not declared in this scope
/home/vitor/opencv-3.0.0/modules/videoio/src/cap_gphoto2.cpp: Na função membro ‘int cv::gphoto2::DigitalCameraCapture::findDevice(const char*) const’:
/home/vitor/opencv-3.0.0/modules/videoio/src/cap_gphoto2.cpp:914:17: error: ‘allDevices’ was not declared in this scope
/home/vitor/opencv-3.0.0/modules/videoio/src/cap_gphoto2.cpp: Na função membro ‘void cv::gphoto2::DigitalCameraCapture::reloadConfig()’:
/home/vitor/opencv-3.0.0/modules/videoio/src/cap_gphoto2.cpp:936:9: error: ‘rootWidget’ was not declared in this scope
/home/vitor/opencv-3.0.0/modules/videoio/src/cap_gphoto2.cpp:945:5: error: ‘camera’ was not declared in this scope
/home/vitor/opencv-3.0.0/modules/videoio/src/cap_gphoto2.cpp:945:5: error: ‘rootWidget’ was not declared in this scope
/home/vitor/opencv-3.0.0/modules/videoio/src/cap_gphoto2.cpp:945:5: error: ‘context’ was not declared in this scope
/home/vitor/opencv-3.0.0/modules/videoio/src/cap_gphoto2.cpp:949:56: error: ‘rootWidget’ was not declared in this scope
make[2]: ** [modules/videoio/CMakeFiles/opencv_videoio.dir/src/cap_gphoto2.cpp.o] Erro 1
make[1]: ** [modules/videoio/CMakeFiles/opencv_videoio.dir/all] Erro 2
make: ** [all] Erro 2
Question, can anyone help me to solve these problem?
↧