ucloud_ai_common.h 文件参考
#include "model/common.h"
#include "oss_app.h"

浏览源代码.

宏定义

#define FACE1_IMAGE   "/data/ucloud_ai_image/face1.png"
 
#define FACE2_IMAGE   "/data/ucloud_ai_image/face2.png"
 
#define ANIME_IMAGE   "/data/ucloud_ai_image/expression.jpg"
 
#define EXPRESSION_IMAGE   "/data/ucloud_ai_image/expression.jpg"
 
#define OBJECT_IMAGE   "/data/ucloud_ai_image/object.jpg"
 
#define MAINBODY_IMAGE   "/data/ucloud_ai_image/face1.png"
 
#define CARD_FACE_IMAGE   "/data/ucloud_ai_image/card_face.jpg"
 
#define CARD_BACK_IMAGE   "/data/ucloud_ai_image/card_back.jpg"
 
#define BANK_CARD_IMAGE   "/data/ucloud_ai_image/bank_card.jpg"
 
#define CHARACTER_IMAGE   "/data/ucloud_ai_image/character.jpg"
 
#define RUBBISH_IMAGE   "/data/ucloud_ai_image/rubbish.jpg"
 
#define FRUITS_IMAGE   "/data/ucloud_ai_image/fruits.jpg"
 
#define PERSON_ORG_IMAGE   "/data/ucloud_ai_image/person_org.jpg"
 
#define STYLE_IMAGE   "/data/ucloud_ai_image/person_org.jpg"
 
#define IMAGEENHAN_ERASE_PERSON_USERMASK_URL   "http://viapi-test.oss-cn-shanghai.aliyuncs.com/viapi-3.0domepic/imageenhan/ErasePerson/ErasePerson6.jpg"
 
#define IMAGEENHAN_EXTEND_IMAGE_STYLE_URL   "http://ivpd-demo.oss-cn-shanghai.aliyuncs.com/ivpd-demo/images/ExtendImageStyle/styleUrl.jpeg"
 

类型定义

typedef AIModelCBFunc ucloud_ai_cb_t
 
typedef AIModelResultStruct ucloud_ai_result_t
 
typedef enum _ucloud_ai_model_t ucloud_ai_model_t
 

枚举

enum  _ucloud_ai_model_t {
  UCLOUD_AI_MODEL_COMPARING_FACEBODY , UCLOUD_AI_MODEL_GENERATE_HUMAN_ANIME_STYLE , UCLOUD_AI_MODEL_RECOGNIZE_EXPRESSION , UCLOUD_AI_MODEL_DETECT_PEDSTRIAN ,
  UCLOUD_AI_MODEL_DETECT_OBJECT , UCLOUD_AI_MODEL_DETECT_MAIN_BODY , UCLOUD_AI_MODEL_SEGMENT_COMMON_IMAGE , UCLOUD_AI_MODEL_SEGMENT_FACE ,
  UCLOUD_AI_MODEL_RECOGNIZE_IDENTITY_CARD_FACE_SIDE , UCLOUD_AI_MODEL_RECOGNIZE_IDENTITY_CARD_BACK_SIDE , UCLOUD_AI_MODEL_RECOGNIZE_BANK_CARD , UCLOUD_AI_MODEL_RECOGNIZE_CHARACTER ,
  UCLOUD_AI_MODEL_RECOGNIZE_LICENCE_PLATE , UCLOUD_AI_MODEL_CLASSIFYING_RUBBISH , UCLOUD_AI_MODEL_DETECT_FRUITS , UCLOUD_AI_MODEL_ERASE_PERSON ,
  UCLOUD_AI_MODEL_EXTEND_IMAGE_STYLE , UCLOUD_AI_MODEL_MAX
}
 

函数

void ucloud_ai_set_key_secret (char *key, char *secret)
 
void ucloud_ai_set_oss_bucket (char *bucket)
 
void ucloud_ai_set_oss_endpoint (char *endpoint)
 
uint8_t * ucloud_ai_upload_file (char *path)
 
int32_t ucloud_ai_init (void)
 
int32_t ucloud_ai_uninit (void)
 
int32_t ucloud_ai_connect (char *url)
 
void ucloud_ai_disconnect (void)
 
int32_t ucloud_ai_get_stream (char *url, char **stream)
 
char * ucloud_ai_get_token_id (const char *domain, const char *region_id)
 

宏定义说明

◆ ANIME_IMAGE

#define ANIME_IMAGE   "/data/ucloud_ai_image/expression.jpg"

在文件 ucloud_ai_common.h18 行定义.

◆ BANK_CARD_IMAGE

#define BANK_CARD_IMAGE   "/data/ucloud_ai_image/bank_card.jpg"

在文件 ucloud_ai_common.h24 行定义.

◆ CARD_BACK_IMAGE

#define CARD_BACK_IMAGE   "/data/ucloud_ai_image/card_back.jpg"

在文件 ucloud_ai_common.h23 行定义.

◆ CARD_FACE_IMAGE

#define CARD_FACE_IMAGE   "/data/ucloud_ai_image/card_face.jpg"

在文件 ucloud_ai_common.h22 行定义.

◆ CHARACTER_IMAGE

#define CHARACTER_IMAGE   "/data/ucloud_ai_image/character.jpg"

在文件 ucloud_ai_common.h25 行定义.

◆ EXPRESSION_IMAGE

#define EXPRESSION_IMAGE   "/data/ucloud_ai_image/expression.jpg"

在文件 ucloud_ai_common.h19 行定义.

◆ FACE1_IMAGE

#define FACE1_IMAGE   "/data/ucloud_ai_image/face1.png"

在文件 ucloud_ai_common.h16 行定义.

◆ FACE2_IMAGE

#define FACE2_IMAGE   "/data/ucloud_ai_image/face2.png"

在文件 ucloud_ai_common.h17 行定义.

◆ FRUITS_IMAGE

#define FRUITS_IMAGE   "/data/ucloud_ai_image/fruits.jpg"

在文件 ucloud_ai_common.h27 行定义.

◆ IMAGEENHAN_ERASE_PERSON_USERMASK_URL

#define IMAGEENHAN_ERASE_PERSON_USERMASK_URL   "http://viapi-test.oss-cn-shanghai.aliyuncs.com/viapi-3.0domepic/imageenhan/ErasePerson/ErasePerson6.jpg"

在文件 ucloud_ai_common.h32 行定义.

◆ IMAGEENHAN_EXTEND_IMAGE_STYLE_URL

#define IMAGEENHAN_EXTEND_IMAGE_STYLE_URL   "http://ivpd-demo.oss-cn-shanghai.aliyuncs.com/ivpd-demo/images/ExtendImageStyle/styleUrl.jpeg"

在文件 ucloud_ai_common.h33 行定义.

◆ MAINBODY_IMAGE

#define MAINBODY_IMAGE   "/data/ucloud_ai_image/face1.png"

在文件 ucloud_ai_common.h21 行定义.

◆ OBJECT_IMAGE

#define OBJECT_IMAGE   "/data/ucloud_ai_image/object.jpg"

在文件 ucloud_ai_common.h20 行定义.

◆ PERSON_ORG_IMAGE

#define PERSON_ORG_IMAGE   "/data/ucloud_ai_image/person_org.jpg"

在文件 ucloud_ai_common.h28 行定义.

◆ RUBBISH_IMAGE

#define RUBBISH_IMAGE   "/data/ucloud_ai_image/rubbish.jpg"

在文件 ucloud_ai_common.h26 行定义.

◆ STYLE_IMAGE

#define STYLE_IMAGE   "/data/ucloud_ai_image/person_org.jpg"

在文件 ucloud_ai_common.h29 行定义.

类型定义说明

◆ ucloud_ai_cb_t

typedef AIModelCBFunc ucloud_ai_cb_t

在文件 ucloud_ai_common.h35 行定义.

◆ ucloud_ai_model_t

◆ ucloud_ai_result_t

typedef AIModelResultStruct ucloud_ai_result_t

在文件 ucloud_ai_common.h36 行定义.

枚举类型说明

◆ _ucloud_ai_model_t

枚举值
UCLOUD_AI_MODEL_COMPARING_FACEBODY 
UCLOUD_AI_MODEL_GENERATE_HUMAN_ANIME_STYLE 
UCLOUD_AI_MODEL_RECOGNIZE_EXPRESSION 
UCLOUD_AI_MODEL_DETECT_PEDSTRIAN 
UCLOUD_AI_MODEL_DETECT_OBJECT 
UCLOUD_AI_MODEL_DETECT_MAIN_BODY 
UCLOUD_AI_MODEL_SEGMENT_COMMON_IMAGE 
UCLOUD_AI_MODEL_SEGMENT_FACE 
UCLOUD_AI_MODEL_RECOGNIZE_IDENTITY_CARD_FACE_SIDE 
UCLOUD_AI_MODEL_RECOGNIZE_IDENTITY_CARD_BACK_SIDE 
UCLOUD_AI_MODEL_RECOGNIZE_BANK_CARD 
UCLOUD_AI_MODEL_RECOGNIZE_CHARACTER 
UCLOUD_AI_MODEL_RECOGNIZE_LICENCE_PLATE 
UCLOUD_AI_MODEL_CLASSIFYING_RUBBISH 
UCLOUD_AI_MODEL_DETECT_FRUITS 
UCLOUD_AI_MODEL_ERASE_PERSON 
UCLOUD_AI_MODEL_EXTEND_IMAGE_STYLE 
UCLOUD_AI_MODEL_MAX 

在文件 ucloud_ai_common.h38 行定义.