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.

71 lines
1.3 KiB

​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
  1. #ifndef __IMAGE_MILL_DATA_STRUCTURES_HEADER__
  2. #define __IMAGE_MILL_DATA_STRUCTURES_HEADER__
  3. #include <opencv2/core.hpp>
  4. #include <opencv2/opencv.hpp>
  5. #include <queue>
  6. using namespace cv;
  7. #include "../../lib/components/base/basicFunctionality.h"
  8. typedef struct S_IM_ITEM_DATA
  9. {
  10. uint32_t item_id;
  11. char md5[33];
  12. uint8_t process_type;
  13. uint32_t width;
  14. uint32_t height;
  15. uint8_t type;
  16. } IM_ITEM_DATA;
  17. typedef enum E_IM_ITEM_TYPES
  18. {
  19. IM_ITEM_TYPE_JPEG = 0,
  20. IM_ITEM_TYPE_PNG = 1,
  21. IM_ITEM_TYPE_GIF = 2,
  22. IM_ITEM_TYPE_AGIF = 3,
  23. IM_ITEM_TYPE_TIFF = 4,
  24. IM_ITEM_TYPE_AVIF = 5
  25. } IM_ITEM_TYPES;
  26. typedef enum E_IM_PROCESS_TYPES
  27. {
  28. IM_PROC_TYPE_DNN = 0,
  29. IM_PROC_TYPE_FACE = 1
  30. } IM_PROCESS_TYPES;
  31. typedef struct S_IM_JOB
  32. {
  33. uint32_t dbID;
  34. uint8_t job_type;
  35. uint8_t image_type;
  36. uint32_t width;
  37. uint32_t height;
  38. uint32_t depth;
  39. char md5[33];
  40. } IM_JOB;
  41. typedef struct S_IM_CLASS_BOUNDARY_BOX
  42. {
  43. uint32_t classID;
  44. float weight;
  45. uint32_t x;
  46. uint32_t y;
  47. uint32_t width;
  48. uint32_t height;
  49. uint32_t depth;
  50. } IM_CLASS_BOUNDARY_BOX;
  51. typedef struct S_IM_RESULT
  52. {
  53. IM_JOB * pJOB;
  54. uint32_t nBoxCount;
  55. IM_CLASS_BOUNDARY_BOX * boxes;
  56. } IM_RESULT;
  57. typedef std::queue<IM_JOB *> IM_JOB_QUEUE;
  58. CSTR buildMd5Path(CSTR base, CSTR md5, mode_t mode = 0755, CSTR user = NULL, CSTR group = NULL);
  59. #endif