|  |  | @ -72,7 +72,7 @@ void SyncWorkThread::run() | 
			
		
	
		
		
			
				
					
					|  |  |  |             local_g_image_sync_queue->take(element_vec); |  |  |  |             local_g_image_sync_queue->take(element_vec); | 
			
		
	
		
		
			
				
					
					|  |  |  |             bool IsNGForAll = false; |  |  |  |             bool IsNGForAll = false; | 
			
		
	
		
		
			
				
					
					|  |  |  |             int merge_index; |  |  |  |             int merge_index; | 
			
		
	
		
		
			
				
					
					|  |  |  |             cv::Mat merge_image = cv::Mat::zeros(512 * work_camera_nums, 640 * g_sys_conf.shoot[0], CV_8UC3); |  |  |  |             cv::Mat merge_image = cv::Mat::zeros(512 * g_sys_conf.shoot[0], 640 * work_camera_nums,  CV_8UC3); | 
			
				
				
			
		
	
		
		
	
		
		
			
				
					
					|  |  |  |             cv::Rect roi; |  |  |  |             cv::Rect roi; | 
			
		
	
		
		
			
				
					
					|  |  |  |             int j = 0;	// 实际工作的相机标识,element_vec中可能有相机没在工作
 |  |  |  |             int j = 0;	// 实际工作的相机标识,element_vec中可能有相机没在工作
 | 
			
		
	
		
		
			
				
					
					|  |  |  |             for (int i = 0; i < element_vec.size(); i++)//每个相机的图轮流遍历
 |  |  |  |             for (int i = 0; i < element_vec.size(); i++)//每个相机的图轮流遍历
 | 
			
		
	
	
		
		
			
				
					|  |  | @ -175,13 +175,14 @@ void SyncWorkThread::run() | 
			
		
	
		
		
			
				
					
					|  |  |  | #ifdef __UDPSend |  |  |  | #ifdef __UDPSend | 
			
		
	
		
		
			
				
					
					|  |  |  |                     UDPSendInfo.JD = jd_no; |  |  |  |                     UDPSendInfo.JD = jd_no; | 
			
		
	
		
		
			
				
					
					|  |  |  | #endif |  |  |  | #endif | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |                     IsALL = false;//4.10
 | 
			
		
	
		
		
			
				
					
					|  |  |  |                     bool IsNG = false; |  |  |  |                     bool IsNG = false; | 
			
		
	
		
		
			
				
					
					|  |  |  |                     int ngReason = 0; |  |  |  |                     int ngReason = 0; | 
			
		
	
		
		
			
				
					
					|  |  |  |                     QMap<int, QString> ng_reason_maps; |  |  |  |                     QMap<int, QString> ng_reason_maps; | 
			
		
	
		
		
			
				
					
					|  |  |  |                     ng_reason_maps[0] = "OK"; |  |  |  |                     ng_reason_maps[0] = "1"; | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  |                     ng_reason_maps[1] = "less_than_setting"; |  |  |  |                     ng_reason_maps[1] = "0"; | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  |                     ng_reason_maps[2] = "too_diff_from_model"; |  |  |  |                     ng_reason_maps[2] = "0"; | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  |                     ng_reason_maps[3] = "out_of_setting_range"; |  |  |  |                     ng_reason_maps[3] = "0"; | 
			
				
				
			
		
	
		
		
	
		
		
	
		
		
	
		
		
	
		
		
			
				
					
					|  |  |  |                     for (int index = 0; index < unit_count; index++) { |  |  |  |                     for (int index = 0; index < unit_count; index++) { | 
			
		
	
		
		
			
				
					
					|  |  |  |                         if (vec_results[index].size() < local_SysConf.no[local_camera_number][index]) |  |  |  |                         if (vec_results[index].size() < local_SysConf.no[local_camera_number][index]) | 
			
		
	
		
		
			
				
					
					|  |  |  |                         { |  |  |  |                         { | 
			
		
	
	
		
		
			
				
					|  |  | @ -276,6 +277,8 @@ void SyncWorkThread::run() | 
			
		
	
		
		
			
				
					
					|  |  |  |                         { |  |  |  |                         { | 
			
		
	
		
		
			
				
					
					|  |  |  |                              |  |  |  |                              | 
			
		
	
		
		
			
				
					
					|  |  |  |                             for (int index = 0; index < unit_count; index++) |  |  |  |                             for (int index = 0; index < unit_count; index++) | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |                             { | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |                                 if (vec_results[index].size() < local_SysConf.no[local_camera_number][index]) | 
			
		
	
		
		
			
				
					
					|  |  |  |                                 { |  |  |  |                                 { | 
			
		
	
		
		
			
				
					
					|  |  |  |                                     cv::Mat m = vec_in[index].clone(); |  |  |  |                                     cv::Mat m = vec_in[index].clone(); | 
			
		
	
		
		
			
				
					
					|  |  |  |                                     QString file_name = g_conf_path.save_pics_path + "/ng/" + |  |  |  |                                     QString file_name = g_conf_path.save_pics_path + "/ng/" + | 
			
		
	
	
		
		
			
				
					|  |  | @ -299,6 +302,7 @@ void SyncWorkThread::run() | 
			
		
	
		
		
			
				
					
					|  |  |  |                                 } |  |  |  |                                 } | 
			
		
	
		
		
			
				
					
					|  |  |  |                             } |  |  |  |                             } | 
			
		
	
		
		
			
				
					
					|  |  |  |                         } |  |  |  |                         } | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |                     } | 
			
		
	
		
		
			
				
					
					|  |  |  |                      |  |  |  |                      | 
			
		
	
		
		
			
				
					
					|  |  |  | 
 |  |  |  | 
 | 
			
		
	
		
		
			
				
					
					|  |  |  | #ifdef SYNC_CAMERA |  |  |  | #ifdef SYNC_CAMERA | 
			
		
	
	
		
		
			
				
					|  |  | @ -320,16 +324,26 @@ void SyncWorkThread::run() | 
			
		
	
		
		
			
				
					
					|  |  |  |                             cv::Mat m = vec_in[index].clone(); |  |  |  |                             cv::Mat m = vec_in[index].clone(); | 
			
		
	
		
		
			
				
					
					|  |  |  |                             QString file_name; |  |  |  |                             QString file_name; | 
			
		
	
		
		
			
				
					
					|  |  |  |                             merge_index = j * unit_count + index + 1; |  |  |  |                             merge_index = j * unit_count + index + 1; | 
			
		
	
		
		
			
				
					
					|  |  |  |                             roi = cv::Rect(index * m.cols, j * m.rows, m.cols, m.rows); |  |  |  |                             roi = cv::Rect(j * m.cols, index * m.rows, m.cols, m.rows); | 
			
				
				
			
		
	
		
		
	
		
		
			
				
					
					|  |  |  |                             m.copyTo(merge_image(roi)); |  |  |  |                             m.copyTo(merge_image(roi)); | 
			
		
	
		
		
			
				
					
					|  |  |  | 
 |  |  |  | 
 | 
			
		
	
		
		
			
				
					
					|  |  |  |                             if (merge_index == work_camera_nums * unit_count) { |  |  |  |                             if (merge_index == work_camera_nums * unit_count) { | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |                              | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |                                 if (IsNGForAll) | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |                                 { | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |                                     ngReason = 1; | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |                                 } | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |                                 else | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |                                 { | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |                                     ngReason = 0; | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |                                 } | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  | 
 | 
			
		
	
		
		
			
				
					
					|  |  |  |                                 file_name = g_conf_path.save_pics_path + "/" |  |  |  |                                 file_name = g_conf_path.save_pics_path + "/" | 
			
		
	
		
		
			
				
					
					|  |  |  |                                     + now_ts.toString("yyyy-MM-dd") + "/" |  |  |  |                                     + now_ts.toString("yyyy-MM-dd") + "/"+"416_BJ_01_" | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  |                                     + now_ts.toString("yyyy-MM-dd_HH-mm-ss_zzz_") + "_" + ng_reason_maps[ngReason] + ".jpg"; |  |  |  |                                     + now_ts.toString("yyyy-MM-dd_HH-mm-ss.zzz_") + ng_reason_maps[ngReason] + ".jpg"; | 
			
				
				
			
		
	
		
		
	
		
		
	
		
		
			
				
					
					|  |  |  |                                 g_save_queue->put(std::make_pair(file_name.toLocal8Bit().constData(), merge_image)); |  |  |  |                                 g_save_queue->put(std::make_pair(file_name.toLocal8Bit().constData(), merge_image)); | 
			
		
	
		
		
			
				
					
					|  |  |  | #ifdef __TCPSend |  |  |  | #ifdef __TCPSend | 
			
		
	
		
		
			
				
					
					|  |  |  |                                 QString sendName = now_ts.toString("yyyy-MM-dd_HH-mm-ss_zzz_") + ng_reason_maps[ngReason] + ".jpg"; |  |  |  |                                 QString sendName = "416_BJ_01_" + now_ts.toString("yyyy-MM-dd_HH-mm-ss.zzz_") + ng_reason_maps[ngReason]; | 
			
				
				
			
		
	
		
		
	
		
		
			
				
					
					|  |  |  |                                 TCPSendInfo.pics_name = sendName.toLocal8Bit().constData(); |  |  |  |                                 TCPSendInfo.pics_name = sendName.toLocal8Bit().constData(); | 
			
		
	
		
		
			
				
					
					|  |  |  |                                 TCP_Info_queue->put(TCPSendInfo); |  |  |  |                                 TCP_Info_queue->put(TCPSendInfo); | 
			
		
	
		
		
			
				
					
					|  |  |  | #endif |  |  |  | #endif | 
			
		
	
	
		
		
			
				
					|  |  | @ -360,8 +374,15 @@ void SyncWorkThread::run() | 
			
		
	
		
		
			
				
					
					|  |  |  |             } |  |  |  |             } | 
			
		
	
		
		
			
				
					
					|  |  |  |             if (IsNGForAll) |  |  |  |             if (IsNGForAll) | 
			
		
	
		
		
			
				
					
					|  |  |  |             { |  |  |  |             { | 
			
		
	
		
		
			
				
					
					|  |  |  |                 /*to do something*/ |  |  |  |                 local_g_result_queue->put(false); | 
			
				
				
			
		
	
		
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |                 | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |             } | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |             else | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |             { | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |                 local_g_result_queue->put(true); | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |                 | 
			
		
	
		
		
			
				
					
					|  |  |  |             } |  |  |  |             } | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |            // emit display_check_total(local_camera_number, ++(frame_total[local_camera_number]));
 | 
			
		
	
		
		
			
				
					
					|  |  |  |         } |  |  |  |         } | 
			
		
	
		
		
			
				
					
					|  |  |  |     } |  |  |  |     } | 
			
		
	
		
		
			
				
					
					|  |  |  |     catch (cv::Exception& e) |  |  |  |     catch (cv::Exception& e) | 
			
		
	
	
		
		
			
				
					|  |  | 
 |