forked from hybridgroup/gocv
-
Notifications
You must be signed in to change notification settings - Fork 0
/
dnn.h
36 lines (28 loc) · 816 Bytes
/
dnn.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
#ifndef _OPENCV3_DNN_H_
#define _OPENCV3_DNN_H_
#include <stdbool.h>
#ifdef __cplusplus
#include <opencv2/opencv.hpp>
#include <opencv2/dnn.hpp>
extern "C" {
#endif
#include "core.h"
#ifdef __cplusplus
typedef cv::dnn::Net* Net;
#else
typedef void* Net;
#endif
Net Net_ReadNetFromCaffe(const char* prototxt, const char* caffeModel);
Net Net_ReadNetFromTensorflow(const char* model);
Mat Net_BlobFromImage(Mat image, double scalefactor, Size size, Scalar mean, bool swapRB,
bool crop);
void Net_Close(Net net);
bool Net_Empty(Net net);
void Net_SetInput(Net net, Mat blob, const char* name);
Mat Net_Forward(Net net, const char* outputName);
Mat Net_GetBlobChannel(Mat blob, int imgidx, int chnidx);
Scalar Net_GetBlobSize(Mat blob);
#ifdef __cplusplus
}
#endif
#endif //_OPENCV3_DNN_H_