From c0e7db3c88ee9fac773c7b90e2b6175dbaaa0fe3 Mon Sep 17 00:00:00 2001 From: modehua Date: Mon, 4 Sep 2023 00:46:21 -0700 Subject: [PATCH] =?UTF-8?q?=E6=8E=A7=E5=88=B6=E6=80=BB=E5=B8=A7=E6=95=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- MultiFrameCapture.cpp | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/MultiFrameCapture.cpp b/MultiFrameCapture.cpp index 5347e4f..033e905 100644 --- a/MultiFrameCapture.cpp +++ b/MultiFrameCapture.cpp @@ -460,7 +460,7 @@ void MultiFrameCapture::snaprun() uint32_t frame_cnt = 0; video->HtCamGetFrameCnt(frame_cnt); - frame_info.frame_index = frame_cnt; + frame_info.frame_index = frame_cnt + 1; //video->HtCamSetVsnpTime(6); //printf("设置 vsnp:%d\r\n",ti); //ti++; @@ -474,7 +474,7 @@ void MultiFrameCapture::snaprun() for (size_t i = 1; i <= frame_cnt; i++) { - printf("***********设置的帧数:%d 正在采集第[%d]帧************\r\n",frame_cnt,i); + printf("***********设置的帧数:%d 正在采集第[%d]帧************\r\n",frame_info.frame_index,i); frame_info.first_frame = i == 1 ? true : false; frame_info.last_frame = i == frame_cnt ? true : false; @@ -500,6 +500,7 @@ void MultiFrameCapture::snaprun() while (val) { frame_info.last_frame = val == 1 ? true : false; + frame_info.frame_index = frame_num; func_sig = snap_func(frame_info, channels,time_out ,ind);//同上面一样 printf("-----------当前采集到第:[%d]帧 CIS总共采集[%d]帧 -------\r\n",ind,frame_num); @@ -515,7 +516,7 @@ void MultiFrameCapture::snaprun() } val--; ind++; - //this_thread::sleep_for(std::chrono::milliseconds(65)); + this_thread::sleep_for(std::chrono::milliseconds(65)); } break; } @@ -525,9 +526,10 @@ void MultiFrameCapture::snaprun() ////////////////////////////采集过快会导致队列堆积///////////////////////// ////////////////////////////所以这个延时是采集速度和传图速度的差值///////////////////////// ////////////////////////////DPI 颜色不同 会导致数据大小不同所以这个地方延时肯定不一样 目前 60是200dpi///////////////////////// - int mill = resolution_ == DPI_600 ? 60 * 10 : 10; - + int mill = resolution_ == DPI_600 ? 60 * 10 : 60; + printf("mill:%d\r\n",mill); this_thread::sleep_for(std::chrono::milliseconds(mill)); + } video->HtCamStopVideoCapturing();