2016-09-18 06:15:49 -0600 | asked a question | How to detect vehicle in opencv 3.1? Im using C++ I used this code but it detects many objects in the video: using namespace cv; using namespace std; int main() { //global variables Mat frame; //current frame Mat back; Mat fore, fMOG2, fKNN; Mat resizeF; Mat fgMaskMOG; //fg mask generated by MOG method String stat= "Unoccupied"; Ptr<backgroundsubtractormog2> pMOG; //MOG Background subtractor pMOG = createBackgroundSubtractorMOG2(); pMOG->setNMixtures(3); pMOG->setDetectShadows(0); Ptr<backgroundsubtractorknn> pKNN; pKNN = createBackgroundSubtractorKNN(); pKNN->setDetectShadows(0); //rect //int largest_area=0; //int largest_contour_index =0; vector<vector<point> > contours; vector<vec4i> hierarchy; VideoCapture stream1(0); //0 is the id of video device.0 if you have only one camera while(1){ Mat cameraFrame, cont, thresholds; if(!(stream1.read(frame))) //get one frame form video break; } } |
2016-09-17 21:35:17 -0600 | asked a question | How to build opencv 3.1 libraries in Windows 10 64bit? That I can use in Eclipse IDE Im trying for days now on building opencv 3.1.0. I followed this method( http://cookyourpc.blogspot.com/2015/0...) Everything works fine until in buidling the opencv libraries (Cmake part) everytime i run "mingw32-make" i always encounter this error: Used Versions: 1. OS:Windows 10 64 bit 2. OpenCV: OpenCV 3.1.0 3. MingW: mingw64 (used mingw32 6.2.0) 4. Cmake: cmake 3.6.2 -win32- x86 Linking CXX executable ....\bin\opencv_perf_core.exe ../../lib/libopencv_ts310.a(ts.cpp.obj):ts.cpp:(.text$_ZN6cvtest2TS4initERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE+0x119): undefined reference to `cv::redirectError(int ()(int, char const, char const, char const, int, void), void, void)' collect2.exe: error: ld returned 1 exit status modules\core\CMakeFiles\opencv_perf_core.dir\build.make:858: recipe for target 'bin/opencv_perf_core.exe' failed mingw32-make[2]: [bin/opencv_perf_core.exe] Error 1 CMakeFiles\Makefile2:1543: recipe for target 'modules/core/CMakeFiles/opencv_perf_core.dir/all' failed mingw32-make[1]: [modules/core/CMakeFiles/opencv_perf_core.dir/all] Error 2 Makefile:159: recipe for target 'all' failed mingw32-make: * [all] Error 2 |
2016-09-17 21:16:21 -0600 | commented question | Is anyone know how to use opencv 3.1 in eclipse ide? (windows 64bit) ive searching for days now and still cant figure out how. Ive tried some methods but when I run the "mingw32-make" i always got errors. Linking CXX executable ....\bin\opencv_perf_core.exe ../../lib/libopencv_ts310.a(ts.cpp.obj):ts.cpp:(.text$_ZN6cvtest2TS4initERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE+0x119): undefined reference to `cv::redirectError(int ()(int, char const, char const, char const, int, void), void, void)' collect2.exe: error: ld returned 1 exit status modules\core\CMakeFiles\opencv_perf_core.dir\build.make:858: recipe for target 'bin/opencv_perf_core.exe' failed mingw32-make[2]: [bin/opencv_perf_core.exe] Error 1 CMakeFiles\Makefile2:1543: recipe for target 'modules/core/CMakeFiles/opencv_perf_core.dir/all' failed mingw32-make[1]: [modules/core/CMakeFiles/opencv_perf_core.dir/all] Error 2 Makefile:159: recipe for target 'all' failed mingw32-make: * [all] Error 2 |
2016-09-17 19:04:53 -0600 | received badge | ● Editor (source) |
2016-09-17 18:30:55 -0600 | asked a question | Is anyone know how to use opencv 3.1 in eclipse ide? (windows 64bit) ive searching for days now and still cant figure out how. Ive tried some methods but when I run the "mingw32-make" i always got errors. Is anyone know how to use opencv 3.1 in eclipse ide? (windows 64bit) ive searching for days now and still cant figure out how. Ive tried this method (http://cookyourpc.blogspot.com/2015/0...) but when I run the "mingw32-make" part i always got errors. C:\opencv\sources\modules\core\src\parallel.cpp: In function 'int cv::getThreadNum()': C:\opencv\sources\modules\core\src\parallel.cpp:457:45: error: 'pthread_self' was not declared in this scope return (int)(size_t)(void)pthread_self(); // no zero-based indexing ^ modules\core\CMakeFiles\opencv_core.dir\build.make:965: recipe for target 'modules/core/CMakeFiles/opencv_core.dir/src/parallel.cpp.obj' failed mingw32-make[2]: [modules/core/CMakeFiles/opencv_core.dir/src/parallel.cpp.obj] Error 1 CMakeFiles\Makefile2:1468: recipe for target 'modules/core/CMakeFiles/opencv_core.dir/all' failed mingw32-make[1]: [modules/core/CMakeFiles/opencv_core.dir/all] Error 2 Makefile:159: recipe for target 'all' failed mingw32-make: ** [all] Error 2 even i apply this |