Closed MDreamer closed 8 years ago
It is not compatible with opencv 3.1 I just have created a branch - https://github.com/anatolix/bgslibrary/tree/opencv3.1.0 It builds for me(mac os). Haven't tested it yet. update: everything except mog & mo2 looks like working.
I have installed OpenCV 3.1.0 and build bgslibrary without problem, and the demos run fine. I have to remark that I had to disable CUDA and OPENCL support in order to OpenCV to work.
Hi @MDreamer have you used the opencv3 branch of bgslibrary?
Hi guys, Thank you for your help. I didn't use the opencv designated branch. I'll use @anatolix branch and will update you once I've tried to.
Cheers Maayan
I switched to new opencv3.x branch and tried to compile the library but this error appears:
Scanning dependencies of target bgs
[ 2%] [ 2%] [ 3%] Building CXX object CMakeFiles/bgs.dir/PreProcessor.cpp.o
[ 4%] Building CXX object CMakeFiles/bgs.dir/FrameProcessor.cpp.o
Building CXX object CMakeFiles/bgs.dir/VideoAnalysis.cpp.o
Building CXX object CMakeFiles/bgs.dir/VideoCapture.cpp.o
In file included from /home/gustavo/lib/bgslibrary/FrameProcessor.h:29:0,
from /home/gustavo/lib/bgslibrary/VideoAnalysis.h:23,
from /home/gustavo/lib/bgslibrary/VideoAnalysis.cpp:17:
/home/gustavo/lib/bgslibrary/package_bgs/MixtureOfGaussianV1BGS.h:23:30: fatal error: opencv2/bgsegm.hpp: No such file or directory
#include <opencv2/bgsegm.hpp>
^
In file included from /home/gustavo/lib/bgslibrary/FrameProcessor.h:29:0,
from /home/gustavo/lib/bgslibrary/FrameProcessor.cpp:17:
/home/gustavo/lib/bgslibrary/package_bgs/MixtureOfGaussianV1BGS.h:23:30: fatal error: opencv2/bgsegm.hpp: No such file or directory
#include <opencv2/bgsegm.hpp>
^
compilation terminated.
compilation terminated.
make[2]: *** [CMakeFiles/bgs.dir/VideoAnalysis.cpp.o] Error 1
make[2]: *** Waiting for unfinished jobs....
make[2]: *** [CMakeFiles/bgs.dir/FrameProcessor.cpp.o] Error 1
make[1]: *** [CMakeFiles/bgs.dir/all] Error 2
make: *** [all] Error 2
I guess it is because OpenCV were built without opencv_contrib, but previously branch opencv3 did compile without errors. @andrewssobral , Should documentation/instructions be updated for using this new branch opencv3.x?
Hi @andrewssobral and @anatolix , I used your branch instead of trying to make it work in version 3 of opencv "Close but no cigar". It fails on 97%
[ 97%] Building CXX object CMakeFiles/bgs.dir/package_analysis/ForegroundMaskAnalysis.cpp.o
make[2]: * No rule to make target /home/myuser/OpenCV/opencv-3.1.0/lib/libopencv_videostab.so.3.1.0', needed by
libbgs.so'. Stop.
make[1]: * [CMakeFiles/bgs.dir/all] Error 2
make: *\ [all] Error 2
myuser@mylaptop:~/bgslibrary/build$
Thank you for your help.
Cheers Maayan
Guy? I would love some help :)
got it guys. Downloaded opencv 3.0.0 version and its working now. Thanks you all :)
Hi @MDreamer, can you try the updated opencv3 branch? I hope all goes well now. I tested with OpenCV 3.1.0 and it works great in my laptop.
I already did before. I no changes were made I guess there is no point in that is it?
Hi @MDreamer please can you check my last post on https://github.com/andrewssobral/bgslibrary/issues/44, let me know if this help you
Hi,
I'm working with Ubuntu 14.04LTS and just downloaded openCV-3.1.0 and built it successfully. also checked it using the demo examples. When I try to build the bgslibrary I get the following error: (It happens after the cmake)
$ make Scanning dependencies of target bgs [ 1%] Building CXX object CMakeFiles/bgs.dir/home/myuser/Downloads/bgslibrary-master/package_bgs/jmo/BlobResult.cpp.o In file included from /home/myuser/Downloads/bgslibrary-master/package_bgs/jmo/BlobResult.h:65:0, from /home/myuser/Downloads/bgslibrary-master/package_bgs/jmo/BlobResult.cpp:56: /home/myuser/OpenCV/opencv-3.1.0/modules/core/include/opencv2/core/corec.h:97:7: error: ‘IplImage’ does not name a type CVAPI(IplImage) cvCreateImageHeader( CvSize size, int depth, int channels ); ^ /home/myuser/OpenCV/opencv-3.1.0/modules/core/include/opencv2/core/types_c.h:93:49: note: in definition of macro ‘CVAPI’
define CVAPI(rettype) CV_EXTERN_C CV_EXPORTS rettype CV_CDECL
/home/myuser/OpenCV/opencv-3.1.0/modules/core/include/opencv2/core/corec.h:109:7: error: ‘IplImage’ does not name a type CVAPI(IplImage) cvInitImageHeader( IplImage* image, CvSize size, int depth, ^ /home/myuser/OpenCV/opencv-3.1.0/modules/core/include/opencv2/core/types_c.h:93:49: note: in definition of macro ‘CVAPI’
define CVAPI(rettype) CV_EXTERN_C CV_EXPORTS rettype CV_CDECL
/home/myuser/OpenCV/opencv-3.1.0/modules/core/include/opencv2/core/corec.h:125:7: error: ‘IplImage’ does not name a type CVAPI(IplImage) cvCreateImage( CvSize size, int depth, int channels ); ^ /home/myuser/OpenCV/opencv-3.1.0/modules/core/include/opencv2/core/types_c.h:93:49: note: in definition of macro ‘CVAPI’
define CVAPI(rettype) CV_EXTERN_C CV_EXPORTS rettype CV_CDECL
In file included from /home/myuser/OpenCV/opencv-3.1.0/modules/core/include/opencv2/core/utility.hpp:886:0, from /home/myuser/OpenCV/opencv-3.1.0/modules/core/include/opencv2/core.hpp:3165, from /home/myuser/OpenCV/opencv-3.1.0/modules/core/include/opencv2/core/types_c.h:101, from /home/myuser/Downloads/bgslibrary-master/package_bgs/jmo/BlobResult.h:65, from /home/myuser/Downloads/bgslibrary-master/package_bgs/jmo/BlobResult.cpp:56: /home/myuser/OpenCV/opencv-3.1.0/modules/core/include/opencv2/core/corec.h:140:36: error: variable or field ‘cvReleaseImageHeader’ declared void CVAPI(void) cvReleaseImageHeader( IplImage* image ); ^ /home/myuser/OpenCV/opencv-3.1.0/modules/core/include/opencv2/core/core_c.h:140:36: error: ‘IplImage’ was not declared in this scope /home/myuser/OpenCV/opencv-3.1.0/modules/core/include/opencv2/core/core_c.h:140:47: error: ‘image’ was not declared in this scope CVAPI(void) cvReleaseImageHeader( IplImage* image ); ^ /home/myuser/OpenCV/opencv-3.1.0/modules/core/include/opencv2/core/core_c.h:154:30: error: variable or field ‘cvReleaseImage’ declared void CVAPI(void) cvReleaseImage( IplImage* image ); ^ /home/myuser/OpenCV/opencv-3.1.0/modules/core/include/opencv2/core/core_c.h:154:30: error: ‘IplImage’ was not declared in this scope /home/myuser/OpenCV/opencv-3.1.0/modules/core/include/opencv2/core/core_c.h:154:41: error: ‘image’ was not declared in this scope CVAPI(void) cvReleaseImage( IplImage\ image ); ^ In file included from /home/myuser/Downloads/bgslibrary-master/package_bgs/jmo/BlobResult.h:65:0, from /home/myuser/Downloads/bgslibrary-master/package_bgs/jmo/BlobResult.cpp:56: /home/myuser/OpenCV/opencv-3.1.0/modules/core/include/opencv2/core/corec.h:157:7: error: ‘IplImage’ does not name a type CVAPI(IplImage) cvCloneImage( const IplImage_ image ); ^ /home/myuser/OpenCV/opencv-3.1.0/modules/core/include/opencv2/core/types_c.h:93:49: note: in definition of macro ‘CVAPI’
define CVAPI(rettype) CV_EXTERN_C CV_EXPORTS rettype CV_CDECL
In file included from /home/myuser/OpenCV/opencv-3.1.0/modules/core/include/opencv2/core/utility.hpp:886:0, from /home/myuser/OpenCV/opencv-3.1.0/modules/core/include/opencv2/core.hpp:3165, from /home/myuser/OpenCV/opencv-3.1.0/modules/core/include/opencv2/core/types_c.h:101, from /home/myuser/Downloads/bgslibrary-master/package_bgs/jmo/BlobResult.h:65, from /home/myuser/Downloads/bgslibrary-master/package_bgs/jmo/BlobResult.cpp:56: /home/myuser/OpenCV/opencv-3.1.0/modules/core/include/opencv2/core/core_c.h:169:29: error: variable or field ‘cvSetImageCOI’ declared void CVAPI(void) cvSetImageCOI( IplImage* image, int coi ); ^ /home/myuser/OpenCV/opencv-3.1.0/modules/core/include/opencv2/core/core_c.h:169:29: error: ‘IplImage’ was not declared in this scope /home/myuser/OpenCV/opencv-3.1.0/modules/core/include/opencv2/core/core_c.h:169:39: error: ‘image’ was not declared in this scope CVAPI(void) cvSetImageCOI( IplImage* image, int coi ); ^ /home/myuser/OpenCV/opencv-3.1.0/modules/core/include/opencv2/core/core_c.h:169:46: error: expected primary-expression before ‘int’ CVAPI(void) cvSetImageCOI( IplImage* image, int coi ); ^ /home/myuser/OpenCV/opencv-3.1.0/modules/core/include/opencv2/core/core_c.h:177:34: error: ‘IplImage’ does not name a type CVAPI(int) cvGetImageCOI( const IplImage* image ); ^ /home/myuser/OpenCV/opencv-3.1.0/modules/core/include/opencv2/core/core_c.h:177:44: error: ISO C++ forbids declaration of ‘image’ with no type [-fpermissive] CVAPI(int) cvGetImageCOI( const IplImage* image ); ^ /home/myuser/OpenCV/opencv-3.1.0/modules/core/include/opencv2/core/core_c.h:190:29: error: variable or field ‘cvSetImageROI’ declared void CVAPI(void) cvSetImageROI( IplImage* image, CvRect rect ); ^ /home/myuser/OpenCV/opencv-3.1.0/modules/core/include/opencv2/core/core_c.h:190:29: error: ‘IplImage’ was not declared in this scope /home/myuser/OpenCV/opencv-3.1.0/modules/core/include/opencv2/core/core_c.h:190:39: error: ‘image’ was not declared in this scope CVAPI(void) cvSetImageROI( IplImage* image, CvRect rect ); ^ /home/myuser/OpenCV/opencv-3.1.0/modules/core/include/opencv2/core/core_c.h:190:46: error: ‘CvRect’ was not declared in this scope CVAPI(void) cvSetImageROI( IplImage* image, CvRect rect ); ^ /home/myuser/OpenCV/opencv-3.1.0/modules/core/include/opencv2/core/core_c.h:201:31: error: variable or field ‘cvResetImageROI’ declared void CVAPI(void) cvResetImageROI( IplImage* image ); ^ /home/myuser/OpenCV/opencv-3.1.0/modules/core/include/opencv2/core/core_c.h:201:31: error: ‘IplImage’ was not declared in this scope /home/myuser/OpenCV/opencv-3.1.0/modules/core/include/opencv2/core/core_c.h:201:41: error: ‘image’ was not declared in this scope CVAPI(void) cvResetImageROI( IplImage* image ); ^ In file included from /home/myuser/Downloads/bgslibrary-master/package_bgs/jmo/BlobResult.h:65:0, from /home/myuser/Downloads/bgslibrary-master/package_bgs/jmo/BlobResult.cpp:56: /home/myuser/OpenCV/opencv-3.1.0/modules/core/include/opencv2/core/core_c.h:208:7: error: ‘CvRect’ does not name a type CVAPI(CvRect) cvGetImageROI( const IplImage* image ); ^ /home/myuser/OpenCV/opencv-3.1.0/modules/core/include/opencv2/core/types_c.h:93:49: note: in definition of macro ‘CVAPI’
define CVAPI(rettype) CV_EXTERN_C CV_EXPORTS rettype CV_CDECL
/home/myuser/OpenCV/opencv-3.1.0/modules/core/include/opencv2/core/corec.h:218:7: error: ‘CvMat’ does not name a type CVAPI(CvMat) cvCreateMatHeader( int rows, int cols, int type ); ^ /home/myuser/OpenCV/opencv-3.1.0/modules/core/include/opencv2/core/types_c.h:93:49: note: in definition of macro ‘CVAPI’
define CVAPI(rettype) CV_EXTERN_C CV_EXPORTS rettype CV_CDECL
/home/myuser/OpenCV/opencv-3.1.0/modules/core/include/opencv2/core/corec.h:254:7: error: ‘CvMat’ does not name a type CVAPI(CvMat) cvInitMatHeader( CvMat* mat, int rows, int cols, ^ /home/myuser/OpenCV/opencv-3.1.0/modules/core/include/opencv2/core/types_c.h:93:49: note: in definition of macro ‘CVAPI’
define CVAPI(rettype) CV_EXTERN_C CV_EXPORTS rettype CV_CDECL
/home/myuser/OpenCV/opencv-3.1.0/modules/core/include/opencv2/core/corec.h:272:7: error: ‘CvMat’ does not name a type CVAPI(CvMat) cvCreateMat( int rows, int cols, int type ); ^ /home/myuser/OpenCV/opencv-3.1.0/modules/core/include/opencv2/core/types_c.h:93:49: note: in definition of macro ‘CVAPI’
define CVAPI(rettype) CV_EXTERN_C CV_EXPORTS rettype CV_CDECL
In file included from /home/myuser/OpenCV/opencv-3.1.0/modules/core/include/opencv2/core/utility.hpp:886:0, from /home/myuser/OpenCV/opencv-3.1.0/modules/core/include/opencv2/core.hpp:3165, from /home/myuser/OpenCV/opencv-3.1.0/modules/core/include/opencv2/core/types_c.h:101, from /home/myuser/Downloads/bgslibrary-master/package_bgs/jmo/BlobResult.h:65, from /home/myuser/Downloads/bgslibrary-master/package_bgs/jmo/BlobResult.cpp:56: /home/myuser/OpenCV/opencv-3.1.0/modules/core/include/opencv2/core/corec.h:285:28: error: variable or field ‘cvReleaseMat’ declared void CVAPI(void) cvReleaseMat( CvMat* mat ); ^ /home/myuser/OpenCV/opencv-3.1.0/modules/core/include/opencv2/core/core_c.h:285:28: error: ‘CvMat’ was not declared in this scope /home/myuser/OpenCV/opencv-3.1.0/modules/core/include/opencv2/core/core_c.h:285:36: error: ‘mat’ was not declared in this scope CVAPI(void) cvReleaseMat( CvMat* mat ); ^ /home/myuser/OpenCV/opencv-3.1.0/modules/core/include/opencv2/core/core_c.h:298:32: error: variable or field ‘cvDecRefData’ declared void CV_INLINE void cvDecRefData( CvArr* arr ) ^ /home/myuser/OpenCV/opencv-3.1.0/modules/core/include/opencv2/core/core_c.h:298:32: error: ‘CvArr’ was not declared in this scope /home/myuser/OpenCV/opencv-3.1.0/modules/core/include/opencv2/core/core_c.h:298:39: error: ‘arr’ was not declared in this scope CV_INLINE void cvDecRefData( CvArr\ arr ) ^ /home/myuser/Downloads/bgslibrary-master/package_bgs/jmo/BlobResult.cpp:847:1: error: expected ‘}’ at end of input } ^ make[2]: * [CMakeFiles/bgs.dir/home/myuser/Downloads/bgslibrary-master/package_bgs/jmo/BlobResult.cpp.o] Error 1 make[1]: * [CMakeFiles/bgs.dir/all] Error 2 make: *\ [all] Error 2 myuser@mylaptop:~/Downloads/bgslibrary-master/example_linux$
I'm not sure its a bug and might be something in my env settings but I think here is the best place to ask.
Cheers MDreamer