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.
60 lines
2.0 KiB
60 lines
2.0 KiB
/*
|
|
//图片基本处理
|
|
*/
|
|
#ifndef EdgeDet_H_
|
|
#define EdgeDet_H_
|
|
#include <opencv2/opencv.hpp>
|
|
#include "AI_Edge_Algin.h"
|
|
|
|
using namespace std;
|
|
|
|
enum LINE_SEARCH_DIRECTION_CONST
|
|
{
|
|
DIRECTION_POSITIVE = 1,
|
|
DIRECTION_NEGATIVE = -1,
|
|
};
|
|
class EdgeDet_New
|
|
{
|
|
|
|
public:
|
|
EdgeDet_New();
|
|
~EdgeDet_New();
|
|
int InitRun();
|
|
int InitModel();
|
|
int GetImgEdge(cv::Mat img, cv::Rect &roi);
|
|
int AIEdgeDete(const cv::Mat &img, AI_Edge_Algin::DetConfig *pdetConfig, cv::Mat &detMaskImg, cv::Rect &roi);
|
|
|
|
cv::Mat showimg;
|
|
bool bshowimg;
|
|
AI_IMG_deal m_AIDeal;
|
|
OtherDet_Config m_OtherDet_Config;
|
|
// std::shared_ptr<AI_Edge_Algin> m_pAI_Edge_Algin; // 边缘定位
|
|
AI_Edge_Algin m_pAI_Edge_Algin;
|
|
|
|
cv::Mat detmask;
|
|
|
|
private:
|
|
/// @brief
|
|
/// @param img 搜到图片 单通道
|
|
/// @param DirectSign 搜索方向 >0 正向,< 0 反向
|
|
/// @param Gate 阈值
|
|
/// @param BorW 搜索黑点 = 0还是白点 = 1
|
|
/// @param roi 搜索范围
|
|
/// @param StepCount 搜索点数
|
|
/// @param Limit 最小满是阈值点个数算上搜索成功
|
|
/// @return <0 搜索错误, >=0表示 搜索位置
|
|
int UDNoiseEdgeDetect(cv::Mat img, int DirectSign, int Gate, int BorW, cv::Rect roi, int StepCount, int Limit);
|
|
/// @brief
|
|
/// @param img 搜到图片 单通道
|
|
/// @param DirectSign 搜索方向 >0 正向,< 0 反向
|
|
/// @param Gate 阈值
|
|
/// @param BorW 搜索黑点 = 0还是白点 = 1
|
|
/// @param roi 搜索范围
|
|
/// @param StepCount 搜索点数
|
|
/// @param Limit 最小满是阈值点个数算上搜索成功
|
|
/// @return <0 搜索错误, >=0表示 搜索位置
|
|
int LRNoiseEdgeDetect(cv::Mat img, int DirectSign, int Gate, int BorW, cv::Rect roi, int StepCount, int Limit);
|
|
// int LRNoiseEdgeDetect(cv::Mat img,int DirectSign, int Gate,int BorW, int StartSearchSite, int Step, int StepCount, int top, int bottom, int Limit, int Depth, int MaxLimit);
|
|
};
|
|
|
|
#endif |