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.
98 lines
3.0 KiB
98 lines
3.0 KiB
/*
|
|
* @Author: your name
|
|
* @Date: 2022-04-20 15:49:50
|
|
* @LastEditTime: 2022-09-23 21:51:58
|
|
* @LastEditors: sueRimn
|
|
* @Description: 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
|
|
* @FilePath: /ZCXD_MonitorPlatform/src/CoreLogicModule/include/CamDeal.h
|
|
*/
|
|
#ifndef AIIMGDeal_H_
|
|
#define AIIMGDeal_H_
|
|
|
|
#include <vector>
|
|
#include <thread>
|
|
#include <mutex>
|
|
#include <string>
|
|
#include <iostream>
|
|
#include <memory>
|
|
#include <opencv2/opencv.hpp>
|
|
#include "SingleGPU.h"
|
|
#include "AICommonDefine.h"
|
|
|
|
using namespace std;
|
|
|
|
class AI_IMG_deal
|
|
{
|
|
public:
|
|
AI_IMG_deal();
|
|
~AI_IMG_deal();
|
|
|
|
int Init(int nGpuIdx);
|
|
|
|
private:
|
|
int m_nGpuIdx;
|
|
|
|
private:
|
|
// new Data
|
|
int NewData();
|
|
|
|
// Delete Data
|
|
int DelteData();
|
|
|
|
public:
|
|
// 初始化
|
|
int Init_BOE(AIInitConfig config);
|
|
int Init_127Cell(AIInitConfig config);
|
|
int Init_BOE_Type2(AIInitConfig config);
|
|
int Init_BOE_UP(AIInitConfig config);
|
|
int Init_BOE_Chess(AIInitConfig config);
|
|
int Init_YX_1(AIInitConfig config);
|
|
int Init_YX_2(AIInitConfig config);
|
|
int Init_Cls(AIInitConfig config, int ntype); // 1023
|
|
int Init_zf(AIInitConfig config); // 1023
|
|
int Init_RE_POL(AIInitConfig config); // 1023
|
|
int Init_RE_AD(AIInitConfig config); // 1023
|
|
int Init_Edge_Big(AIInitConfig config); // 1023
|
|
int Init_Edge_Small(AIInitConfig config); // 1023
|
|
int Init_LackPol(AIInitConfig config);
|
|
int Init_MarkLine(AIInitConfig config);
|
|
|
|
// 检测
|
|
int AICheck_BOE(cv::Mat inImg, cv::Mat &outImg_1);
|
|
int AICheck_BOE_Type2(cv::Mat inImg, cv::Mat &outImg_1);
|
|
int AICheck_BOE_Chess(cv::Mat inImg, cv::Mat &outImg_1);
|
|
int AICheck_BOE_UP(cv::Mat inImg, cv::Mat &outImg_1);
|
|
int AICheck_YX_1(cv::Mat inImg, cv::Mat &outImg_1);
|
|
int AICheck_YX_2(cv::Mat inImg, cv::Mat &outImg_1);
|
|
int AICheck_Cls(cv::Mat inImg, int ntype, float *fmaxScore); // 1023
|
|
int AICheck_zf(cv::Mat inImg, cv::Mat &outImg_1);
|
|
int AICheck_127Cell(cv::Mat inImg, cv::Mat &outImg_1);
|
|
int AICheck_RE_POL(cv::Mat inImg, cv::Mat &outImg_1);
|
|
int AICheck_RE_AD(cv::Mat inImg, cv::Mat &outImg_1);
|
|
int AICheck_Edge_Big(cv::Mat inImg, cv::Mat &outImg_1);
|
|
int AICheck_Edge_Small(cv::Mat inImg, cv::Mat &outImg_1);
|
|
int AICheck_LackPol(cv::Mat inImg, cv::Mat &outImg_1);
|
|
int AICheck_MarkLine(cv::Mat inImg, cv::Mat &outImg_1);
|
|
|
|
private:
|
|
cv::Mat F2M(float *data, int clannel, int w, int h);
|
|
|
|
cv::Mat InitMat(int channel, int w, int h);
|
|
int F2softmaxId(float *data, int class_num, float *fmaxScore); // 1024dyy-add
|
|
private:
|
|
AI_SingleGPU *m_pAI_SingleGPU;
|
|
|
|
float *AI_DATA_Cls_OUT_0;
|
|
float *AI_DATA_Cls_L0_OUT_0;
|
|
|
|
bool bInitSucc_127Cell;
|
|
bool bInitSucc_re_Pol;
|
|
bool bInitSucc_re_AD;
|
|
bool bInitSucc_MarkLine;
|
|
|
|
bool bInitSucc_Edge_big;
|
|
bool bInitSucc_Edge_Samll;
|
|
bool bInitSucc_LackPol;
|
|
};
|
|
|
|
#endif |