123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263 |
- #pragma once
- #include <string>
- namespace graft_cv{
- typedef unsigned char byte;
- typedef struct
- {
- int channel;
- int width;
- int height;
- byte *data; // 长度:width * height * channel
- }ImgInfo;
- typedef struct{
- // 调试控制 (2)
- bool image_show;//true--显示处理过程中的中间图片,需要人工回车才能继续执行; false--无图片显示
- bool image_return;//true--返回结果positoninfo中添加返回的图片; false--无图片返回
- //image storage parameters(3)
- bool image_save;//是否保存图像
- std::string image_depository;//保存图像目录
- int image_backup_days;//保存图像天数,过期删除
- std::string model_path_grab;
- float object_threshold_grab;
- float nms_threshold_grab;
- int grid_row_grab;
- int grid_col_grab;
- int grid_padding_grab;
- int offset_grab; //抓取点相对参考点(标注的点5)的偏移像素数
- std::string model_path_cut;
- float object_threshold_cut;
- float nms_threshold_cut;
- int grid_row_cut;
- int grid_col_cut;
- int grid_padding_cut;
- } ConfigParam;
- typedef struct
- {
- //以下涉及到位置均为实际位置
- double tea_grab_x1; //第一株茶叶抓取位置x1,//以下为tcd
- double tea_grab_y1; //第一株茶叶抓取位置y1,
- double tea_grab_angle1; //第一株茶叶抓取角度r1,
- double tea_grab_x2; //第二株茶叶抓取位置x2,
- double tea_grab_y2; //第二株茶叶抓取位置y2,
- double tea_grab_angle2; //第二株茶叶抓取角度r2,
- double tea_cut_x1; //第一株茶叶切割位置x1,
- double tea_cut_y1; //第一株茶叶切割位置y1,
- double tea_cut_angle1; //第一株茶叶切割角度r1,
- double tea_cut_x2; //第二株茶叶切割位置x2,
- double tea_cut_y2; //第二株茶叶切割位置y2,
- double tea_cut_angle2; //第二株茶叶切割角度r2,
-
-
- ImgInfo* pp_images[5];//参考图片,只读,从前向后,没有的会被置零
-
- }PositionInfo;
- };
|