IPicOperate.h 1.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475
  1. #ifndef __I_PICOPERATE_H__
  2. #define __I_PICOPERATE_H__
  3. // *****************************************************************************
  4. // 版权所有(C)2023~2099 上海骄成超声波技术有限公司
  5. // 保留所有权利
  6. // *****************************************************************************
  7. // 作者 : 陆蕴凡
  8. // 版本 : 1.0
  9. // 代码创建日期:2025/01/09
  10. // 版本更新日期:2025/01/09
  11. // 功能说明:对原始图像数据流操作
  12. // *****************************************************************************
  13. #include <vector>
  14. #include <string>
  15. #include "TypeDef.h"
  16. namespace JVision
  17. {
  18. /**
  19. * @brief 原始图像数据流的接口基类
  20. *
  21. */
  22. class JVision_API IPicOperate
  23. {
  24. public:
  25. virtual ~IPicOperate() = 0 {}
  26. /**
  27. * @brief 保存图像
  28. *
  29. * @param[in] imageIn 需保存的JVisison图像结构体
  30. * @param[in] FileExtension 待保存图像的拓展名
  31. * @param[in] FilePath 待保存图像的文件名,需包含绝对路径
  32. *
  33. * @note 对应的错误码类型可以通过ExecuteErrorCode中接口获取失败信息
  34. */
  35. virtual JVision::ResultCode SaveImage(const JVision::ImageInfo& imageIn,
  36. const std::string& FileExtension, const std::string& FilePath) = 0;
  37. /**
  38. * @brief 获取图像缓存
  39. *
  40. * @param[in] imagePath 图像的路径
  41. * @param[out] imageOut 图像缓存
  42. *
  43. * @note 对应的错误码类型可以通过ExecuteErrorCode中接口获取失败信息
  44. */
  45. virtual JVision::ResultCode GetImageInfo(const std::string& imagePath,
  46. JVision::ImageInfo& imageOut) = 0;
  47. /**
  48. * @brief 获取模板图像
  49. *
  50. * @param[in] rootDir 方案所在的根目录
  51. * @param[in] index 方案的索引号
  52. * @param[out] imageOut 传出JVisison图像结构体的数组
  53. * @return ResultCode 0表示成功 其余表示失败
  54. *
  55. * @note 对应的错误码类型可以通过ExecuteErrorCode中接口获取失败信息
  56. */
  57. virtual JVision::ResultCode GetModelImage(const std::string& rootDir,
  58. const int index,
  59. std::vector<JVision::ImageInfo>& imageOut) = 0;
  60. /**
  61. * @brief 获取错误码接口指针
  62. */
  63. static IPicOperate* GetPicOperate();
  64. };
  65. }
  66. #endif