1 /** 2 * @ClassName yolo_image 3 * @Description TODO 4 * @Author raul.rao 5 * @Date 2022/5/23 11:43 6 * @Version 1.0 7 */ 8 #ifndef RK_YOLOV5_DEMO_YOLO_IMAGE_H 9 #define RK_YOLOV5_DEMO_YOLO_IMAGE_H 10 11 #include <android/log.h> 12 13 #define LOGI(...) __android_log_print(ANDROID_LOG_INFO, "rkyolo4j", ##__VA_ARGS__); 14 #define LOGE(...) __android_log_print(ANDROID_LOG_ERROR, "rkyolo4j", ##__VA_ARGS__); 15 16 int create(int im_height, int im_width, int im_channel, char *model_path); 17 void destroy(); 18 bool run_yolo(char *inDataRaw, char *y0, char *y1, char *y2); 19 int yolo_post_process(char *grid0_buf, char *grid1_buf, char *grid2_buf, 20 int *ids, float *scores, float *boxes); 21 int colorConvertAndFlip(void *src, int srcFmt, void *dst, int dstFmt, int width, int height, int flip); 22 23 #endif //RK_YOLOV5_DEMO_YOLO_IMAGE_H 24