AlexeyAB / Yolo_mark

GUI for marking bounded boxes of objects in images for training neural network Yolo v3 and v2
https://github.com/AlexeyAB/darknet
The Unlicense
1.8k stars 680 forks source link

make fails - CV_CAP_PROP_FPS not defined in this scope #129

Open towster opened 5 years ago

towster commented 5 years ago

make fails when compling.

$ cmake . -- The CXX compiler identification is GNU 7.3.0 -- Check for working CXX compiler: /usr/bin/c++ -- Check for working CXX compiler: /usr/bin/c++ -- works -- Detecting CXX compiler ABI info -- Detecting CXX compiler ABI info - done -- Detecting CXX compile features -- Detecting CXX compile features - done -- Found OpenCV: /usr/local (found version "4.1.0") -- Configuring done -- Generating done -- Build files have been written to: /home/rnt/ocvtesting/Yolo_mark $ make [ 50%] Building CXX object CMakeFiles/yolo_mark.dir/main.cpp.o /home/rnt/ocvtesting/Yolo_mark/main.cpp: In function ‘int main(int, char)’: /home/rnt/ocvtesting/Yolo_mark/main.cpp:156:28: error: ‘CV_CAP_PROP_FPS’ was not declared in this scope const int fps = cap.get(CV_CAP_PROP_FPS); ^~~~~~~ /home/rnt/ocvtesting/Yolo_mark/main.cpp:156:28: note: suggested alternative: ‘CV_PROP_RW’ const int fps = cap.get(CV_CAP_PROP_FPS); ^~~~~~~ CV_PROP_RW /home/rnt/ocvtesting/Yolo_mark/main.cpp:493:60: error: ‘CV_FILLED’ was not declared in this scope rectangle(frame, prev_img_rect, Scalar(100, 100, 100), CV_FILLED); ^~~~~ /home/rnt/ocvtesting/Yolo_mark/main.cpp:493:60: note: suggested alternative: ‘__FILE’ rectangle(frame, prev_img_rect, Scalar(100, 100, 100), CV_FILLED); ^~~~~ __FILE CMakeFiles/yolo_mark.dir/build.make:62: recipe for target 'CMakeFiles/yolo_mark.dir/main.cpp.o' failed make[2]: ** [CMakeFiles/yolo_mark.dir/main.cpp.o] Error 1 CMakeFiles/Makefile2:67: recipe for target 'CMakeFiles/yolo_mark.dir/all' failed make[1]: [CMakeFiles/yolo_mark.dir/all] Error 2 Makefile:83: recipe for target 'all' failed make: *** [all] Error 2

towster commented 5 years ago

Looks like it is an issue using opencv 4.x I found that one of the forks has 4.x implemented.. https://github.com/thinkpiece/Yolo_mark

okmd commented 5 years ago

I got same issue and got fixed by just removing CV_ from CV_FILLED and CV_CAP_PROP_FPS from main.cpp. opencv 4.0.0 Linux Mint 19.1

AlexeyAB commented 5 years ago

@ido-ran @RRMoelker @vinjn @lovexytoo I fixed it. Now Yolo_mark supports OpenCV 3.x and 4.x

AzimovS commented 5 years ago

I had this issue ‘FILLED’ was not declared in this scope error: ‘CAP_PROP_FPS’ was not declared in this scope

I solved it just by adding CV_ before ‘CAP_PROP_FPS’ and 'FILLED'

AlexeyAB commented 5 years ago

@AzimovS

AzimovS commented 5 years ago

@AlexeyAB Sorry, forgot to mention. Ubuntu 16.04 and OpenCV version is 3.4.5 I downloaded Yolo_mark version a few minutes ago, so I think it is the latest version