#ifndef __I_PICOPERATE_H__ #define __I_PICOPERATE_H__ // ***************************************************************************** // 版权所有(C)2023~2099 上海骄成超声波技术有限公司 // 保留所有权利 // ***************************************************************************** // 作者 : 陆蕴凡 // 版本 : 1.0 // 代码创建日期:2025/01/09 // 版本更新日期:2025/01/09 // 功能说明:对原始图像数据流操作 // ***************************************************************************** #include #include #include "TypeDef.h" namespace JVision { /** * @brief 原始图像数据流的接口基类 * */ class JVision_API IPicOperate { public: virtual ~IPicOperate() = 0 {} /** * @brief 保存图像 * * @param[in] imageIn 需保存的JVisison图像结构体 * @param[in] FileExtension 待保存图像的拓展名 * @param[in] FilePath 待保存图像的文件名,需包含绝对路径 * * @note 对应的错误码类型可以通过ExecuteErrorCode中接口获取失败信息 */ virtual JVision::ResultCode SaveImage(const JVision::ImageInfo& imageIn, const std::string& FileExtension, const std::string& FilePath) = 0; /** * @brief 获取图像缓存 * * @param[in] imagePath 图像的路径 * @param[out] imageOut 图像缓存 * * @note 对应的错误码类型可以通过ExecuteErrorCode中接口获取失败信息 */ virtual JVision::ResultCode GetImageInfo(const std::string& imagePath, JVision::ImageInfo& imageOut) = 0; /** * @brief 获取模板图像 * * @param[in] index 方案索引 * @param[out] imageOut 传出JVisison图像结构体的数组 * @return ResultCode 0表示成功 其余表示失败 * * @note 对应的错误码类型可以通过ExecuteErrorCode中接口获取失败信息 */ virtual JVision::ResultCode GetModelImage(int index, std::vector& imageOut) = 0; /** * @brief 获取错误码接口指针 */ static IPicOperate* GetPicOperate(); }; } #endif