Anonymizer  4.0
SDK for anonymization of human faces and licence plates in images.
 All Data Structures Functions Variables Typedefs Groups Pages
Anonymizer.h
1 /* **************************************************************** */
2 /* **************************************************************** */
3 /* * * */
4 /* * Header file to Anonymizer library * */
5 /* * Version 4.x 2016-10-10 * */
6 /* * -------------------------------------------------------- * */
7 /* * * */
8 /* * Eyedea Recognition, Ltd. (C) 2015 * */
9 /* * * */
10 /* * Contact: * */
11 /* * web: http://www.eyedea.cz * */
12 /* * email: info@eyedea.cz * */
13 /* * * */
14 /* **************************************************************** */
15 /* **************************************************************** */
16 
17 #ifndef _EYE_ANONIMIZE_H
18 #define _EYE_ANONIMIZE_H
19 
20 /* function prefix */
21 #ifndef FUNCTION_PREFIX
22 # if _WIN32 || _WIN64
23 # define FUNCTION_PREFIX extern "C" __declspec(dllexport)
24 # else
25 # define FUNCTION_PREFIX extern "C" __attribute__ ((visibility ("default")))
26 # endif
27 #endif
28 
33 /* Anonymizer header version */
34 #define EYEANONYMIZE_VERSION_NUMBER 40000
35 
36 /* anonymization modules flags used in AnParams.iMode */
40 #define ANONYMIZE_FACE 1
41 
45 #define ANONYMIZE_LP 2
46 
48 typedef struct
49 {
50  int from_col;
51  int to_col;
52  int from_row;
53  int to_row;
54 } AnROI;
55 
56 
70 typedef struct
71 {
73  int iMode;
76  int iPanoramic;
86  int iVerbose;
88 } AnParams;
108 FUNCTION_PREFIX void* anInit(const char* sdk_directory, const char* ini_filename);
109 
110 
114 typedef void* (*fcn_anInit)(const char*,const char*);
115 
120 FUNCTION_PREFIX void anFree(void* pvModuleState);
121 
125 typedef void (*fcn_anFree)(void*);
126 
138 FUNCTION_PREFIX int anAnonymize(const char* src_image_filename,
139  const char* dst_image_filename,
140  AnParams* pParams,
141  void* pvModuleState );
142 
146 typedef int (*fcn_anAnonymize)(const char*,const char*,AnParams*,void* );
147 
160 FUNCTION_PREFIX int anAnonymizeBuffer(unsigned char* pSrcData,
161  int width,
162  int height,
163  AnParams* pParams,
164  void* pvModuleState,
165  unsigned char** ppDstData );
166 
170 typedef int (*fcn_anAnonymizeBuffer)(unsigned char*, int, int, AnParams*,void*, unsigned char**);
171 
176 FUNCTION_PREFIX void anFreeBuffer(unsigned char* pData);
177 
181 typedef void (*fcn_anFreeBuffer)(unsigned char*);
182 
195 FUNCTION_PREFIX int anAnonymizeJpegBuffer(char* pSrcData,
196  size_t srcLength,
197  AnParams* pParams,
198  void* pvModuleState,
199  char** ppDstData,
200  size_t* dstLength
201  );
202 
206 typedef int (*fcn_anAnonymizeJpegBuffer)(char*, size_t, AnParams*,void*, char**, size_t*);
207 
208 
213 FUNCTION_PREFIX void anFreeJpegBuffer(char* pData);
214 
218 typedef void (*fcn_anFreeJpegBuffer)(char*);
219 
220 
226 FUNCTION_PREFIX int anGetDefaultParams(AnParams *parameters);
227 
232 
236 #endif
237 
int from_col
Definition: Anonymizer.h:50
int(* fcn_anAnonymizeJpegBuffer)(char *, size_t, AnParams *, void *, char **, size_t *)
anAnonymizeJpegBuffer function pointer
Definition: Anonymizer.h:206
int iPanoramic
Definition: Anonymizer.h:76
int iLpNumBlurPass
Definition: Anonymizer.h:84
FUNCTION_PREFIX int anAnonymizeBuffer(unsigned char *pSrcData, int width, int height, AnParams *pParams, void *pvModuleState, unsigned char **ppDstData)
Processes image image data buffer, i.e. detects and blurs faces and license plates.
int iMode
Definition: Anonymizer.h:73
AnROI ROI
Definition: Anonymizer.h:72
FUNCTION_PREFIX void * anInit(const char *sdk_directory, const char *ini_filename)
Initializes/loads Anonymizer engine.
int iJpegQuality
Definition: Anonymizer.h:75
FUNCTION_PREFIX void anFree(void *pvModuleState)
Frees engine state structure.
int iFaceNumBlurPass
Definition: Anonymizer.h:80
double dFaceDetSizeFactor
Definition: Anonymizer.h:79
int iVerbose
Definition: Anonymizer.h:86
void(* fcn_anFreeJpegBuffer)(char *)
anFreeJpegBuffer function pointer
Definition: Anonymizer.h:218
FUNCTION_PREFIX int anAnonymizeJpegBuffer(char *pSrcData, size_t srcLength, AnParams *pParams, void *pvModuleState, char **ppDstData, size_t *dstLength)
Processes the JPEG image buffer, i.e. detects and blurs faces and license plates. ...
int to_row
Definition: Anonymizer.h:53
Control parameters.
Definition: Anonymizer.h:70
FUNCTION_PREFIX void anFreeJpegBuffer(char *pData)
Frees the JPEG buffer from fcn_anAnonymizeJpegBuffer.
FUNCTION_PREFIX int anAnonymize(const char *src_image_filename, const char *dst_image_filename, AnParams *pParams, void *pvModuleState)
Load image from jpeg file and process the anonymization. Result save as a jpeg image.
double dLpDetSizeFactor
Definition: Anonymizer.h:83
int(* fcn_anAnonymize)(const char *, const char *, AnParams *, void *)
anAnonymize function pointer
Definition: Anonymizer.h:146
double dFaceConfidenceThr
Definition: Anonymizer.h:78
FUNCTION_PREFIX void anFreeBuffer(unsigned char *pData)
Frees the image buffer from fcn_anAnonymizeBuffer.
void(* fcn_anFreeBuffer)(unsigned char *)
anFreeBuffer function pointer
Definition: Anonymizer.h:181
double dLpConfidenceThr
Definition: Anonymizer.h:82
int iShowDetections
Definition: Anonymizer.h:74
int to_col
Definition: Anonymizer.h:51
int from_row
Definition: Anonymizer.h:52
FUNCTION_PREFIX int anGetDefaultParams(AnParams *parameters)
Fill AnParams structure with default values.
Region Of Interest.
Definition: Anonymizer.h:48
void(* fcn_anGetDefaultParams)(AnParams *)
anGetDefaultParams function pointer
Definition: Anonymizer.h:231
int(* fcn_anAnonymizeBuffer)(unsigned char *, int, int, AnParams *, void *, unsigned char **)
anAnonymizeBuffer function pointer
Definition: Anonymizer.h:170
void(* fcn_anFree)(void *)
anFree function pointer
Definition: Anonymizer.h:125