File tree Expand file tree Collapse file tree 1 file changed +20
-22
lines changed Expand file tree Collapse file tree 1 file changed +20
-22
lines changed Original file line number Diff line number Diff line change @@ -51,28 +51,26 @@ int main() {
5151 if (imgHd == nullptr ) continue ;
5252
5353 cv::Mat frame = imgHd->getCvFrame ();
54-
55- std::cout << " Got frame" << std::endl;
56- // cv::imshow("video", frame);
57-
58- // int key = cv::waitKey(1);
59- // if(key == 'q') {
60- // break;
61- // }
62- // if(key == 'c') {
63- // // Send a trigger message to the Script node
64- // qTrigger->send(std::make_shared<dai::Buffer>());
65- // }
66-
67- // if(highestResQ->has()) {
68- // auto highresImg = highestResQ->get<dai::ImgFrame>();
69- // if(highresImg != nullptr) {
70- // cv::Mat frame = highresImg->getCvFrame();
71- // // Save the full image
72- // cv::imwrite("full_image.png", frame);
73- // }
74- // }
54+ cv::imshow (" video" , frame);
55+
56+ int key = cv::waitKey (1 );
57+ if (key == ' q' ) {
58+ break ;
59+ }
60+ if (key == ' c' ) {
61+ // Send a trigger message to the Script node
62+ qTrigger->send (std::make_shared<dai::Buffer>());
63+ }
64+
65+ if (highestResQ->has ()) {
66+ auto highresImg = highestResQ->get <dai::ImgFrame>();
67+ if (highresImg != nullptr ) {
68+ cv::Mat frame = highresImg->getCvFrame ();
69+ // Save the full image
70+ cv::imwrite (" full_image.png" , frame);
71+ }
72+ }
7573 }
7674
7775 return 0 ;
78- }
76+ }
You can’t perform that action at this time.
0 commit comments