You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
95 lines
2.6 KiB
95 lines
2.6 KiB
/*
|
|
* @Author: your name
|
|
* @Date: 2022-04-20 15:49:50
|
|
* @LastEditTime: 2025-09-24 22:18:44
|
|
* @LastEditors: xiewenji 527774126@qq.com
|
|
* @Description: 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
|
|
* @FilePath: /ZCXD_MonitorPlatform/src/CoreLogicModule/include/CamDeal.h
|
|
*/
|
|
#ifndef CameraResult_H_
|
|
#define CameraResult_H_
|
|
#include <iostream>
|
|
#include <stdio.h>
|
|
#include <sys/time.h>
|
|
#include <opencv2/opencv.hpp>
|
|
#include <condition_variable>
|
|
#include <mutex>
|
|
#include <vector>
|
|
#include <thread>
|
|
#include <string>
|
|
#include <stdlib.h>
|
|
#include "Define_Product.hpp"
|
|
#include "CheckErrorCodeDefine.hpp"
|
|
#include "ImgCheckConfig.h"
|
|
#include "ImageDetConfig.h"
|
|
#include "ImageAllResult.h"
|
|
#include "DetLog.h"
|
|
using namespace std;
|
|
using namespace cv;
|
|
class CameraResult
|
|
{
|
|
private:
|
|
public:
|
|
CameraResult(/* args */);
|
|
~CameraResult();
|
|
|
|
void AddLog(std::string str);
|
|
|
|
// 添加图片信息
|
|
int AddDetImage(std::shared_ptr<shareImage> p);
|
|
// 是否全部检测完成
|
|
bool bCheckCamplate();
|
|
|
|
// 设置 检测步骤
|
|
Check_Step GetCheckStep();
|
|
void SetCheckStep(Check_Step step);
|
|
|
|
// 送图是否全部完成
|
|
bool getImgPushComplate();
|
|
void setImgPushComplate();
|
|
|
|
bool IsHaveL255();
|
|
bool Have_EdgeImg(std::string strConfig_Channel); // 是否有边缘图片
|
|
void SetHaveL255(bool b);
|
|
|
|
bool IsHaveDP();
|
|
void SetHaveDP(bool b);
|
|
|
|
bool IsHaveUp();
|
|
void SetHaveUp(bool b);
|
|
|
|
// 返回一个未检测的 图片进行检测
|
|
std::shared_ptr<ImageAllResult> GetNoDetImg();
|
|
std::shared_ptr<ImageAllResult> GetL255DetImg();
|
|
std::shared_ptr<ImageAllResult> GetEdgeChannel(std::string strConfig_Channel);
|
|
long time_start;
|
|
bool bJson = false;
|
|
|
|
std::string m_config_EdgeChannel; // 边缘通道
|
|
|
|
public:
|
|
std::vector<std::string> LogList;
|
|
std::shared_ptr<DetLog> detlog;
|
|
std::vector<std::shared_ptr<ImageAllResult>> ImageALLDetResultList; // 每个通道的检测结果 ,返回的结果。
|
|
std::shared_ptr<ProductBaseResult> productBaseResult;
|
|
std::shared_ptr<CameraBaseResult> cameraBaseResult;
|
|
|
|
|
|
// CameraImage_Status cameraImage_Status; // 图片状态
|
|
|
|
std::mutex mtx_Det; // 互斥量
|
|
private:
|
|
bool bIsImgComplete = false; // 图片是否都送完了。
|
|
Check_Step checkStep = Check_Step_NODet; // 检测步骤
|
|
PRINT_LOG_ m_PrintLog;
|
|
// 多线程安全
|
|
std::mutex mtx_DetImageList;
|
|
|
|
|
|
bool bHave_L255 = false;
|
|
bool bHave_DP = false;
|
|
bool bHave_Up = false;
|
|
bool bHave_EdgeImg = false; // 是否有边缘图片
|
|
};
|
|
|
|
#endif |