imsoo / fight_detection

Real time Fight Detection Based on 2D Pose Estimation and RNN Action Recognition
MIT License
193 stars 42 forks source link

fail to build client #6

Open jinzhao-SU opened 4 years ago

jinzhao-SU commented 4 years ago

I am very interested in this project. Could you please check the error msg? I build server part successfully, but stuck with the client.

/usr/include/x86_64-linux-gnu/sys/select.h:78:0: note: this is the location of the previous definition

define FD_SETSIZE __FD_SETSIZE

^ ./src/main.cpp:87:10: error: aggregate ‘std::ofstream out_json_file’ has incomplete type and cannot be defined ofstream out_json_file; ^ ./src/main.cpp: In function ‘int main(int, char**)’: ./src/main.cpp:142:13: error: ‘CAP_PROP_FPS’ was not declared in this scope cap.set(CAP_PROP_FPS, 20); ^ ./src/main.cpp:143:13: error: ‘CAP_PROP_BUFFERSIZE’ was not declared in this scope cap.set(CAP_PROP_BUFFERSIZE, 3); ^ ./src/main.cpp:159:24: error: ‘CAP_PROP_FPS’ was not declared in this scope double fps = cap.get(CAP_PROP_FPS); ^ ./src/main.cpp:160:23: error: ‘CAP_PROP_FRAME_COUNT’ was not declared in this scope end_frame = cap.get(CAP_PROP_FRAME_COUNT); ^ ./src/main.cpp:176:43: error: invalid use of incomplete type ‘std::ofstream {aka class std::basic_ofstream}’ out_json_file = ofstream(out_json_path); ^ In file included from /usr/include/c++/5/ios:38:0, from /usr/include/c++/5/ostream:38, from /usr/include/c++/5/iostream:39, from ./src/main.cpp:2: /usr/include/c++/5/iosfwd:119:11: note: declaration of ‘std::ofstream {aka class std::basic_ofstream}’ class basic_ofstream; ^ ./src/main.cpp:185:31: error: ‘fourcc’ is not a member of ‘cv::VideoWriter’ writer.open(out_vid_path, VideoWriter::fourcc('M', 'P', '4', 'V'), fps, Size(cap_width, cap_height), true); ^ Makefile:35: recipe for target 'obj/main.o' failed make: *** [obj/main.o] Error 1

imsoo commented 4 years ago

@jinzhao-SU

Thank you for your interest in this repo.


/usr/include/x86_64-linux-gnu/sys/select.h:78:0: note: this is the location of the previous definition #define FD_SETSIZE __FD_SETSIZE

./src/main.cpp:87:10: error: aggregate ‘std::ofstream out_json_file’ has incomplete type and cannot be defined ofstream out_json_file;


./src/main.cpp:142:13: error: ‘CAP_PROP_FPS’ was not declared in this scope cap.set(CAP_PROP_FPS, 20);

Line From To
142 CAP_PROP_FPS CV_CAP_PROP_FPS
143 CAP_PROP_BUFFERSIZE CV_CAP_PROP_BUFFERSIZE
158 CAP_PROP_FPS CV_CAP_PROP_FPS
159 CAP_PROP_FRAME_COUNT CV_CAP_PROP_FRAME_COUNT
184 VideoWriter::fourcc('M', 'P', '4', 'V') CV_FOURCC('M', 'P', '4', 'V')

Note : This client have a freezing issue on Linux.

If you have the same issue, please let me know.

jinzhao-SU commented 4 years ago

I change opencv to version 3.4 and then fix all the problems. Thank you for the detailed response.