84 lines
2.2 KiB
C
84 lines
2.2 KiB
C
![]() |
/*
|
||
|
**************************************************************************************
|
||
|
* Filename: LibApi.h
|
||
|
* Description: header file
|
||
|
*
|
||
|
* Version: 1.0
|
||
|
* Created:
|
||
|
* Author:
|
||
|
*
|
||
|
* Revision: initial draft;
|
||
|
**************************************************************************************
|
||
|
*/
|
||
|
extern "C"{
|
||
|
#pragma once
|
||
|
|
||
|
#include "wrapperncnn.h"
|
||
|
|
||
|
/*
|
||
|
@desc : error define
|
||
|
*/
|
||
|
#define UM_OK 0
|
||
|
#define UM_SYS_ERROR 1
|
||
|
#define UM_PORT_HAS_NO_DEV 6
|
||
|
#define UM_AUTH_ERROR 7
|
||
|
#define UM_DEV_IS_IN_USE 15
|
||
|
#define UM_CANNOT_RELEASE_PORT 16
|
||
|
#define UM_UPDATE_DEV_ERROR 34
|
||
|
|
||
|
#define UM_NETWORK_ERROR 129
|
||
|
#define UM_PROTOCAL_ERROR 130
|
||
|
#define UM_USBBUS_REG_ERROR 133
|
||
|
#define UM_USB_PORT_ERROR 134
|
||
|
#define UM_USBDEV_ID_ERROR 142
|
||
|
#define UM_USBDEV_OFFLINE_ERROR 143
|
||
|
|
||
|
#define UM_DRIVER_MIDDLEWARE_ERROR 255
|
||
|
|
||
|
#define UmError int
|
||
|
|
||
|
/*
|
||
|
@desc : struct
|
||
|
*/
|
||
|
|
||
|
/*
|
||
|
@desc :NNN function
|
||
|
*/
|
||
|
UmError LibapiSvpNpuHandleSig(void);
|
||
|
|
||
|
UmError LibapiSvpNpuAclPrepareInit(void);
|
||
|
UmError LibApiSvpNpuAclPrepareExit(void);
|
||
|
|
||
|
UmError LibApiSvpNpuLoadModel(char* om_model_path, int model_index, bool is_cached);
|
||
|
UmError LibApiSvpNpuUnLoadModel(int model_index);
|
||
|
|
||
|
UmError LibApiSvpNpuLoadDataset(int model_index, void *src, size_t data_len, size_t imgin_w, size_t imgin_h, int flag);
|
||
|
UmError LibApiSvpNpuUnloadDataset();
|
||
|
|
||
|
UmError LibApiSvpNpuModelExecute(int model_index);
|
||
|
UmError LibApiSvpNpuGetModelExecuteResult(int model_index, void* objs /*RetrunObject*/ );
|
||
|
|
||
|
/*
|
||
|
@desc : IVE sobel function
|
||
|
*/
|
||
|
|
||
|
UmError LibapiCommonIveCheckMpiInit();
|
||
|
UmError LibapiCommonIveMpiInit();
|
||
|
UmError LibapiCommonIveMpiExit();
|
||
|
|
||
|
UmError LibApiIveCreateMMZImage(void *mmz_img, int img_type, int width, int height);
|
||
|
UmError LibApiIveDestroyMMZImage(void *mmz_img);
|
||
|
|
||
|
UmError LibApiIveReadMMZFromOsMem(void *mmz_img, void *cv_src, int width, int height, int img_type);
|
||
|
UmError LibApiIveWriteMMZToOsMem(void *mmz_img, void *cv_tar);
|
||
|
UmError LibApiIveWriteMMZToFile(void *mmz_img, FILE *fp);
|
||
|
|
||
|
UmError LibApiCanny(void* src, int width, int height, int img_type,
|
||
|
void* dst, char canny_complete);
|
||
|
|
||
|
UmError LibapiSobelHandleSig();
|
||
|
UmError LibApiSobel();
|
||
|
|
||
|
UmError LibapiKcfHandleSig();
|
||
|
UmError LibApiKcf();
|
||
|
}
|