diff --git a/Cigarette/CaptureThreadHIK.cpp b/Cigarette/CaptureThreadHIK.cpp index a5cf0c9..f8054f9 100644 --- a/Cigarette/CaptureThreadHIK.cpp +++ b/Cigarette/CaptureThreadHIK.cpp @@ -1,4 +1,4 @@ -#include "CaptureThreadHIK.h" +#include "CaptureThreadHIK.h" #include #include "PLCDevice.h" #include "common.h" @@ -48,7 +48,6 @@ inline void FallingGpioEventfunction(MV_EVENT_OUT_INFO* pEventInfo, void* pUser) { CaptureThreadHIKptr->p_image_sync_queue->put(CaptureThreadHIKptr->p_image_sync_arr->image_sync_arr); CaptureThreadHIKptr->p_image_sync_arr->collect_cnt = 0; - //CaptureThreadHIKptr->p_image_sync_arr->image_sync_arr.swap(std::vector>()); } } #else diff --git a/Cigarette/syncworkthread.cpp b/Cigarette/syncworkthread.cpp index ad116a7..0b5e5cd 100644 --- a/Cigarette/syncworkthread.cpp +++ b/Cigarette/syncworkthread.cpp @@ -1,4 +1,4 @@ -#include "SyncWorkThread.h" +#include "SyncWorkThread.h" #include "alg_jd.h" #include "common.h" #include "balluffcamera.h" @@ -70,6 +70,7 @@ void SyncWorkThread::run() local_g_image_sync_queue->take(element_vec); bool IsNGForAll = false; int merge_index; + cv::Mat merge_image = cv::Mat::zeros(512 * work_camera_nums, 640 * g_sys_conf.shoot[0], CV_8UC3); cv::Rect roi; int j = 0; // 实际工作的相机标识,element_vec中可能有相机没在工作 for (int i = 0; i < element_vec.size(); i++)//每个相机的图轮流遍历 @@ -78,7 +79,6 @@ void SyncWorkThread::run() continue; local_camera_number = i; - int isWork = element_vec[i].first; std::pair element; element = element_vec[i]; int unit_count = element.first; @@ -116,7 +116,6 @@ void SyncWorkThread::run() { continue; //图像为空,跳过 } - cv::Mat merge_image = cv::Mat::zeros(512 * work_camera_nums, 640 * g_sys_conf.shoot[i], CV_8UC3); if (image.channels() == 1) { cv::cvtColor(image, image, CV_BGR2RGB); //灰度图像转为彩色图像 @@ -195,7 +194,7 @@ void SyncWorkThread::run() } if (local_SysConf.save == 2)//三张照片分别存储 { - /// 合成element_vec.size() * unit_count 宫格图像 + /// 合成work_camera_nums * unit_count 宫格图像 cv::Mat m = vec_in[index].clone(); QString file_name; merge_index = j * unit_count + index + 1;