cqu20160901 / yolov8_rknn_Cplusplus

yolov8 瑞芯微 rknn 板端 C++部署。
BSD 3-Clause "New" or "Revised" License
95 stars 17 forks source link

VidieoCapture is not usable #11

Open Liablbility opened 3 months ago

Liablbility commented 3 months ago

the opencv lib is the project seems couldn't use the VideoCapture cpp---------------------------------------------------------------------

include "opencv2/opencv.hpp"

using namespace cv; using namespace std;

int main() { VideoCapture cap(0); Mat frame; cap >> frame; while (true) { imshow("读取视频", frame); cap >> frame; waitKey(10); } return 0; } cpp-------------------------------------------------------------------- (base) liable@liable-G3:~/Documents/YoloV8Pose/yolov8pose_rknn_Cplusplus/examples/rknn_yolov8pose_demo_open$ bash build-linux_RK3588.sh -- Configuring done -- Generating done -- Build files have been written to: /home/liable/Documents/YoloV8Pose/yolov8pose_rknn_Cplusplus/examples/rknn_yolov8pose_demo_open/build/build_linux_aarch64 Consolidate compiler generated dependencies of target rknn_yolov8pose_demo [ 33%] Building CXX object CMakeFiles/rknn_yolov8pose_demo.dir/src/main.cc.o /home/liable/Documents/YoloV8Pose/yolov8pose_rknn_Cplusplus/examples/rknn_yolov8pose_demo_open/src/main.cc: In function ‘int main()’: /home/liable/Documents/YoloV8Pose/yolov8pose_rknn_Cplusplus/examples/rknn_yolov8pose_demo_open/src/main.cc:7:2: error: ‘VideoCapture’ was not declared in this scope VideoCapture cap(0); ^~~~ /home/liable/Documents/YoloV8Pose/yolov8pose_rknn_Cplusplus/examples/rknn_yolov8pose_demo_open/src/main.cc:9:2: error: ‘cap’ was not declared in this scope cap >> frame; ^~~ /home/liable/Documents/YoloV8Pose/yolov8pose_rknn_Cplusplus/examples/rknn_yolov8pose_demo_open/src/main.cc:12:31: error: ‘imshow’ was not declared in this scope imshow("读取视频", frame); ^ /home/liable/Documents/YoloV8Pose/yolov8pose_rknn_Cplusplus/examples/rknn_yolov8pose_demo_open/src/main.cc:14:13: error: ‘waitKey’ was not declared in this scope waitKey(10); ^ make[2]: [CMakeFiles/rknn_yolov8pose_demo.dir/build.make:76: CMakeFiles/rknn_yolov8pose_demo.dir/src/main.cc.o] Error 1 make[1]: [CMakeFiles/Makefile2:83: CMakeFiles/rknn_yolov8pose_demo.dir/all] Error 2 make: *** [Makefile:136: all] Error 2