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.

102 lines
2.9 KiB

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

/*********版权所有C2020武汉高德红外股份有限公司***************************************
* 文件名称: Arith_Detector.h
* 文件标识:
* 内容摘要: 检测器接口,根据项目情况实现,多个检测算法工作时注意检测结果的去重
* 其它说明: 外部尽量不要跨过 Arith_Detect模块对具体检测算法进行设置和调用保持良好封装性
* 当前版本:
* 创建作者04046WCW
* 创建日期2020/03/05
* 包含关系:
*****************************************************************************************/
#pragma once
#include "Arith_Common.hpp"
#include "Detect/API_DetectSAObj.h"
//// 定义检测器最大检测个数
//#define DT_TARGET_MAX_NUM 100
// 检测器
class Detectors
{
public:
Detectors(SINT32 nWidth, SINT32 nHeight, CENTERRECT mmCenterRect);
Detectors(SINT32 nWidth, SINT32 nHeight);
virtual ~Detectors();
public:
// 检测器初始化
BBOOL Init(SINT32 nWidth, SINT32 nHeight, CENTERRECT mmCenterRect);
// 执行目标检测算法
SINT32 Detect(GD_VIDEO_FRAME_S img, CENTERRECT mmCenterRect);
// 执行目标检测算法
SINT32 Detect(GD_VIDEO_FRAME_S img);
// 导入外部目标列表
SINT32 ImportExternTargets(TARGET_OBJECT* pTargetList, SINT32 nNum);
// 清除目标列表
void ClearTargetsArray();
// 检测器参数设置
void SetParam(Param_SkyDetect para);
// 返回参数设置
Param_SkyDetect GetParam();
// 获取目标检测队列
TARGET_OBJECT* GetTargetArray();
// 根据RECT剔除目标,标记false
void RemoveLabelTarget(RECT32S box);
// 输出小目标检测的极值点
POINT16S* GetDST_MaxPoint();
// 当前帧目标检测个数
SINT32 m_FrmObjsCnt;
//参数
public:
Param_SkyDetect mDetPara;
// 小目标检测算法
API_DetectSmallObj* pDST_Module;
// 面目标检测算法
API_DetectAreaObj* pDAT_Module;
private:
GLB_STATUS nSysStatus;
// 目标检测队列
TARGET_OBJECT* m_Target_Array;
};
SINT16 MergeSmallAndAreaTarget(TARGET_OBJECT* ptTargetArray, SINT32 nSmallObjsCnt, SINT32 nAreaObjsCnt,SINT32 nCombineDist,GLB_STATUS nSysStatus);
void Sort_TargetArray(TARGET_OBJECT* ptTargetArray, SINT32 nObjsNum, FLOAT32 DetectCenterX, FLOAT32 DetectCenterY);
/*************************************
* Method: MergeAIAndSATarget()
* Function Description: 对现有检测数组中的目标进行合并
* CreateData: 2024/10/11
* Input Param: TARGET_OBJECT * ptTargetArray:需要合并的检测数组
* Input Param: SINT32 nObjsCnt:检测数组中的目标个数
* Output Param:
* Return: SINT32:合并后的目标个数
* Call Relation:
* Other Description:
*************************************/
SINT32 MergeAIAndSATarget(TARGET_OBJECT* ptTargetArray,SINT32 nTotalCnt);