sample_run_joint_api.h 2.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172
  1. /**********************************************************************************
  2. *
  3. * Copyright (c) 2019-2022 Beijing AXera Technology Co., Ltd. All Rights Reserved.
  4. *
  5. * This source file is the property of Beijing AXera Technology Co., Ltd. and
  6. * may not be copied or distributed in any isomorphic form without the prior
  7. * written consent of Beijing AXera Technology Co., Ltd.
  8. *
  9. **********************************************************************************/
  10. #ifndef _SAMPLE_RUN_JOINT_API_H_
  11. #define _SAMPLE_RUN_JOINT_API_H_
  12. #include "ax_global_type.h"
  13. #ifdef __cplusplus
  14. extern "C"
  15. {
  16. #endif
  17. typedef struct _sampleRunJoint_RECT_S
  18. {
  19. float x;
  20. float y;
  21. float w;
  22. float h;
  23. } sampleRunJoint_RECT_S;
  24. typedef struct _sampleRunJoint_POINT_S
  25. {
  26. float x;
  27. float y;
  28. float score;
  29. } sampleRunJoint_POINT_S;
  30. typedef struct _sampleRunJoint_MAT_S
  31. {
  32. int w, h, c, s;
  33. unsigned char *data;
  34. } sampleRunJoint_MAT_S;
  35. typedef struct _sampleRunJoint_OBJECT_ITEM_S
  36. {
  37. unsigned int labelId;
  38. char labelName[20];
  39. sampleRunJoint_RECT_S stRect;
  40. unsigned int nLandmark;
  41. sampleRunJoint_POINT_S *landmark;
  42. sampleRunJoint_MAT_S mMask; // cv::Mat
  43. float prob;
  44. } sampleRunJoint_OBJECT_ITEM_S;
  45. typedef struct _sampleRunJoint_RESULT_S
  46. {
  47. unsigned int nObjectSize;
  48. unsigned int nWidth;
  49. unsigned int nHeight;
  50. int bHasMask;
  51. int bHasLandmark;
  52. sampleRunJoint_OBJECT_ITEM_S *pstObjectItems;
  53. } sampleRunJoint_RESULT_S;
  54. extern int SampleRunJointInit(const char *pStrModel, void **ppJointHandle,const int s32ModelType);
  55. extern int SampleRunJointDeInit(void *joint_handle);
  56. extern int SampleRunJointProcess(void *joint_handle, const AX_VIDEO_FRAME_S *pstFrame, sampleRunJoint_RESULT_S **ppResult);
  57. extern int SampleRunJointReleaseResult(void *pResult);
  58. #ifdef __cplusplus
  59. }
  60. #endif
  61. #endif /* _SAMPLE_RUN_JOINT_API_H_ */