2023年12月19日发(作者:尼桑骐达2017款报价及图片)
std::cout << \"nThis is a sample OpenCV application to demonstrate \" \"CSI-camera capture1 pipeline for NVIDIA accelerated \" \"./opencv_nvgstcam [--Options]nn\" \"OPTIONS:n\" \"t-h,--help Prints this messagen\" \"t--width capture1 width [Default = 1280]n\" \"t--height capture1 height [Default = 720]n\" \"t--fps Frames per second [Default = 30]n\" \"tq Runtime command to stop capture1nn\" << std::endl;}static std::string create_capture (int index, int width, int height, int fps){ std::stringstream pipeline_str; pipeline_str << \"nvarguscamerasrc sensor-id=\" < cv::TickMeter ticks; const std::string keys = \"{h help | | message }\" \"{width |1928 | width }\" \"{height |1208 | height }\" \"{fps |30 | frame per second }\" ; // Create 1920x1080 mat for window cv::Mat disp_mat1(cv::Size(1280,360), CV_8UC3); cv::Mat disp_mat2(cv::Size(1280,360), CV_8UC3); cv::Mat disp_vmat(cv::Size(1280,720), CV_8UC3); // cv::CommandLineParser cmd_parser(argc, argv, keys); if (cmd_(\"help\")) { help(); goto cleanup; goto cleanup; } fps = cmd_ (create_capture(0, width, height, fps), cv::CAP_GSTREAMER);//Open (create_capture(1, width, height, fps), cv::CAP_GSTREAMER); (create_capture(2, width, height, fps), cv::CAP_GSTREAMER); (create_capture(3, width, height, fps), cv::CAP_GSTREAMER); // if (!ed()) { std::cerr << \"Failed to open VideoCapture\" << std::endl; return_val = -4; goto cleanup; } //Display window setting cv::namedWindow(\"FPDLINKIII_4xCamera_Demo\"); cv::moveWindow(\"FPDLINKIII_4xCamera_Demo\", 0, 0); while (true) { (); capture1 >> frame1; capture2 >> frame2; capture3 >> frame3; capture4 >> frame4; cv::resize(frame1, frame1_dst, cv::Size(640,360)); cv::resize(frame2, frame2_dst, cv::Size(640,360)); cv::resize(frame3, frame3_dst, cv::Size(640,360)); cv::resize(frame4, frame4_dst, cv::Size(640,360)); #if 1 cv::hconcat(frame1_dst, frame2_dst, disp_mat1); cv::hconcat(frame3_dst, frame4_dst, disp_mat2); cv::vconcat(disp_mat1, disp_mat2, disp_vmat); cv::imshow(\"FPDLINKIII_4xCamera_Demo\", disp_vmat); #else cv::imshow(\"FPDLINKIII_4xCamera_Demo\", frame1); #endif int key = cv::waitKey(1); // \'q\' for termination if (key == \'q\' ) { break; } (); } if (nter() == 0) { std::cerr << \"No frames processed\" << std::endl; return_val = -10; goto cleanup; } } fps_calculated = nter() / eSec(); std::cout << \"Fps observed \" << fps_calculated << std::endl;cleanup: e(); e(); e(); e(); return return_val;}
更多推荐
报价,图片
发布评论