data_def_api.h 2.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788
  1. #pragma once
  2. #include <string>
  3. namespace graft_cv{
  4. typedef unsigned char byte;
  5. typedef struct
  6. {
  7. int channel;
  8. int width;
  9. int height;
  10. byte *data;
  11. }ImgInfo;
  12. typedef struct{
  13. // 调试控制 (2)
  14. bool image_show;//true--显示处理过程中的中间图片,需要人工回车才能继续执行; false--无图片显示
  15. bool image_return;//true--返回结果positoninfo中添加返回的图片; false--无图片返回
  16. //image storage parameters(3)
  17. bool image_save;//是否保存图像
  18. std::string image_depository;//保存图像目录
  19. int image_backup_days;//保存图像天数,过期删除
  20. // rootstock grab based points cloud
  21. double rs_grab_xmin;
  22. double rs_grab_xmax;
  23. double rs_grab_ymin;
  24. double rs_grab_ymax;
  25. double rs_grab_zmin;
  26. double rs_grab_zmax;
  27. double rs_grab_stem_diameter;
  28. double rs_grab_seedling_dist;
  29. int rs_grab_stem_min_pts;
  30. int rs_grab_seedling_min_pts;
  31. double rs_grab_ror_ratio;
  32. double rs_grab_offset;
  33. double rs_grab_fork_yup; //茎节高度上限
  34. double rs_grab_fork_ybt; //茎节高度下限, 不在范围内,按下限
  35. int rs_grab_holes_number; //单排穴孔数量
  36. // scion grab based points cloud
  37. double sc_grab_xmin;//单排穴孔外沿
  38. double sc_grab_xmax;//单排穴孔外沿
  39. double sc_grab_ymin;
  40. double sc_grab_ymax;
  41. double sc_grab_zmin;
  42. double sc_grab_zmax;
  43. double sc_grab_stem_diameter;
  44. double sc_grab_seedling_dist;
  45. int sc_grab_stem_min_pts;
  46. int sc_grab_seedling_min_pts;
  47. double sc_grab_ror_ratio;
  48. double sc_grab_offset;
  49. double sc_grab_fork_yup; //茎节高度上限
  50. double sc_grab_fork_ybt; //茎节高度下限, 不在范围内,按下限
  51. int sc_grab_holes_number; //单排穴孔数量
  52. } ConfigParam;
  53. typedef struct
  54. {
  55. //以下涉及到位置均为实际位置,毫米
  56. double rs_grab_x;//砧木上苗抓取位置x,毫米
  57. double rs_grab_y;//砧木上苗抓取位置y,毫米
  58. double rs_grab_z;//砧木上苗抓取位置z,毫米
  59. double rs_fork_x;//砧木上苗茎节位置x,毫米
  60. double rs_fork_y;//砧木上苗茎节位置y,毫米
  61. double rs_fork_z;//砧木上苗茎节位置z,毫米
  62. double rs_width; //茎的宽度(直径),毫米
  63. double rs_tortuosity; //弯曲度,离茎中心轴线最大距离,毫米
  64. double rs_count; //当前第一排共有多少株
  65. double sc_grab_x;//穗苗上苗抓取位置x,毫米
  66. double sc_grab_y;//穗苗上苗抓取位置y,毫米
  67. double sc_grab_z;//穗苗上苗抓取位置z,毫米
  68. //double sc_fork_x;//砧木上苗茎节位置x,毫米
  69. //double sc_fork_y;//砧木上苗茎节位置y,毫米
  70. //double sc_fork_z;//砧木上苗茎节位置z,毫米
  71. double sc_width; //茎的宽度(直径),毫米
  72. double sc_tortuosity; //弯曲度,离茎中心轴线最大距离,毫米
  73. double sc_count; //当前第一排共有多少株
  74. ImgInfo* pp_images[5];//参考图片,只读,从前向后,没有的会被置零
  75. }PositionInfo;
  76. };