1 /*
2  * Copyright (C) 2021-2023 Alibaba Group Holding Limited
3  */
4 
5 #ifndef _IMAGERECOG_H_
6 #define _IMAGERECOG_H_
7 
8 #include "internal.h"
9 
10 #ifdef __cplusplus
11 extern "C" {
12 #endif
13 
14 typedef struct _ClassifyingRubbishStruct {
15     char *rubbish;
16     char *category;
17     float categoryScore;
18     float rubbishScore;
19 } ClassifyingRubbishStruct;
20 
21 typedef struct _DetectFruitsStruct {
22     char *name;
23     float score;
24     RectStruct box;
25 } DetectFruitsStruct;
26 
27 typedef union _ImageRecogResultStruct {
28     ClassifyingRubbishStruct rubbish;
29     DetectFruitsStruct fruits;
30 } ImageRecogResultStruct;
31 
32 int classifyingRubbish(char *url, AIModelCBFunc cb);
33 int detectFruits(char *url, AIModelCBFunc cb);
34 
35 #ifdef __cplusplus
36 }
37 #endif
38 #endif
39