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.

55 lines
2.7 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.

/*
* @Author: xiewenji 527774126@qq.com
* @Date: 2025-09-11 15:32:52
* @LastEditors: xiewenji 527774126@qq.com
* @LastEditTime: 2025-09-14 17:41:14
* @FilePath: /BOE_CELL_AOI_Detect/AlgorithmModule/include/ImageDetBase.h
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
*/
#ifndef ImageDetBase_H_
#define ImageDetBase_H_
#include <string>
#include <memory>
#define INTERFACE_Det_VERSION 4
/*******************一般调用流程*************************************************************************************************************************/
/*******************1、初始化 UpdateConfig*************************************************************************************************************************/
/*******************2、初始化 Init 并开启 *************************************************************************************************************************/
/*******************3、GetStatus 获取状态 如果 =CHECK_THREAD_STATUS_IDLE 可以设置检测数据并开启检测 SetDataRun***************************************************/
/*******************4、GetStatus 获取状态 如果 =CHECK_THREAD_STATUS_COMPLETE 检测完成,可以获取检测结果 GetCheckReuslt 拷贝检测结果 自动把状态设为 CHECK_THREAD_STATUS_IDLE*****************************/
struct ImageDetconfig;
struct ImageDetResult;
struct ImageAllResult;
class ImgCheckBase
{
protected:
ImgCheckBase() {}
public:
// delete camera interface
~ImgCheckBase() {}
static ImgCheckBase *GetInstance();
// 初始化参数 pconfig 参数指针 返回0 成功 其他异常
virtual int RunStart(void *pconfig1 = NULL) = 0;
// 设置检测数据,并开启检测 返回0 成功 其他异常
virtual int SetDataRun_SharePtr(std::shared_ptr<ImageAllResult> p) = 0;
// 获取结果信息 返回0 成功 其他异常
virtual int GetCheckReuslt(std::shared_ptr<ImageDetResult> &pResult) = 0;
virtual int CheckImg(std::shared_ptr<ImageDetconfig> p, std::shared_ptr<ImageDetResult> &pResult) = 0;
virtual int ReJsonResul(std::shared_ptr<ImageDetconfig> p, std::shared_ptr<ImageDetResult> &pResult) = 0;
// 获取检测库 状态信息 返回CHECK_THREAD_RUN_STATUS
virtual int GetStatus() = 0;
// 更新参数 pconfig 参数指针nConfigType 需要更新的参数类型 返回0 成功 其他异常
virtual int UpdateConfig(void *pconfig, int nConfigType) = 0;
// 返回检测版本信息
virtual std::string GetVersion() = 0;
// 返回错误信息
virtual std::string GetErrorInfo() = 0;
};
#endif