Anonymizer  5.0.0
SDK for anonymization of human faces and licence plates in images.
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 
27 typedef void* ANState;
28 
29 /* anonymization modules flags used in AnParams.iMode */
33 #define ANONYMIZE_FACE 1
34 
38 #define ANONYMIZE_LP 2
39 
44 typedef struct
45 {
46  int x;
47  int y;
48  unsigned int width;
49  unsigned int height;
50 } AnROI;
51 
54 typedef struct
55 {
56  unsigned char *raw_data;
57  size_t length;
58 }AnBuffer;
59 
60 
74 typedef struct
75 {
77  int mode;
80  int panoramic;
86  double lpConfidenceThr;
87  double lpDetSizeFactor;
90  int verbose;
92 } AnParams;
113 ER_FUNCTION_PREFIX int anInit(const char* sdk_directory, const char* ini_filename, ANState *state);
114 
115 
119 typedef int (*fcn_anInit)(const char*, const char*, ANState *);
120 
124 ER_FUNCTION_PREFIX void anFree(ANState state);
125 
129 typedef void (*fcn_anFree)(ANState);
130 
142 ER_FUNCTION_PREFIX int anAnonymize(const char* src_image_filename,
143  const char* dst_image_filename,
144  AnParams* params,
145  ANState state);
146 
150 typedef int(*fcn_anAnonymize)(const char*, const char*, AnParams*, ANState);
151 
164 ER_FUNCTION_PREFIX int anAnonymizeImageBuffer(AnBuffer srcBuffer,
165  unsigned int width,
166  unsigned int height,
167  AnParams* params,
168  ANState state,
169  AnBuffer* dstBuffer );
170 
175 
180 ER_FUNCTION_PREFIX void anFreeBuffer(AnBuffer buffer);
181 
185 typedef void (*fcn_anFreeBuffer)(AnBuffer buffer);
186 
197 ER_FUNCTION_PREFIX int anAnonymizeJpegBuffer(AnBuffer srcBuffer,
198  AnParams* params,
199  ANState state,
200  AnBuffer* dstBuffer);
201 
206 
213 ER_FUNCTION_PREFIX int anGetDefaultParams(AnParams *parameters);
214 
220 
223 ER_FUNCTION_PREFIX const char* anVersion(int verbose);
224 
228 typedef const char* (*fcn_anVersion)(int);
229 
233 ER_FUNCTION_PREFIX const char* anGetErrorMsg(int ern);
234 
238 typedef const char*(*fcn_anGetErrorMsg)(int);
239 
243 #endif
244 
ER_FUNCTION_PREFIX int anInit(const char *sdk_directory, const char *ini_filename, ANState *state)
Initializes/loads Anonymizer engine.
ER_FUNCTION_PREFIX int anGetDefaultParams(AnParams *parameters)
Fill AnParams structure with default values.
double lpDetSizeFactor
Definition: Anonymizer.h:87
int faceNumBlurPass
Definition: Anonymizer.h:84
int showDetections
Definition: Anonymizer.h:78
int(* fcn_anAnonymizeImageBuffer)(AnBuffer, int, int, AnParams *, ANState, AnBuffer *)
anAnonymizeBuffer function pointer
Definition: Anonymizer.h:174
unsigned int width
Definition: Anonymizer.h:48
int panoramic
Definition: Anonymizer.h:80
void(* fcn_anFreeBuffer)(AnBuffer buffer)
anFreeBuffer function pointer
Definition: Anonymizer.h:185
AnROI ROI
Definition: Anonymizer.h:76
double faceDetSizeFactor
Definition: Anonymizer.h:83
double lpConfidenceThr
Definition: Anonymizer.h:86
ER_FUNCTION_PREFIX int anAnonymizeJpegBuffer(AnBuffer srcBuffer, AnParams *params, ANState state, AnBuffer *dstBuffer)
Processes the JPEG image buffer, i.e. detects and blurs faces and license plates. ...
void(* fcn_anFree)(ANState)
anFree function pointer
Definition: Anonymizer.h:129
int mode
Definition: Anonymizer.h:77
int(* fcn_anAnonymize)(const char *, const char *, AnParams *, ANState)
anAnonymize function pointer
Definition: Anonymizer.h:150
ER_FUNCTION_PREFIX int anAnonymizeImageBuffer(AnBuffer srcBuffer, unsigned int width, unsigned int height, AnParams *params, ANState state, AnBuffer *dstBuffer)
Processes image image data buffer, i.e. detects and blurs faces and license plates.
int y
Definition: Anonymizer.h:47
Control parameters.
Definition: Anonymizer.h:74
void * ANState
Handle to Anonymizer SDK library.
Definition: Anonymizer.h:27
int jpegQuality
Definition: Anonymizer.h:79
ER_FUNCTION_PREFIX void anFree(ANState state)
Frees engine state structure.
ER_FUNCTION_PREFIX const char * anGetErrorMsg(int ern)
Return error message.
int verbose
Definition: Anonymizer.h:90
Image buffer enclosing structure.
Definition: Anonymizer.h:54
ER_FUNCTION_PREFIX const char * anVersion(int verbose)
Get Anonymizer version string.
double faceConfidenceThr
Definition: Anonymizer.h:82
int(* fcn_anInit)(const char *, const char *, ANState *)
anInit function pointer
Definition: Anonymizer.h:119
ER_FUNCTION_PREFIX void anFreeBuffer(AnBuffer buffer)
Frees the image buffer filled by Anonymizer SDK functions.
ER_FUNCTION_PREFIX int anAnonymize(const char *src_image_filename, const char *dst_image_filename, AnParams *params, ANState state)
Load image from jpeg file and process the anonymization. Result save as a jpeg image.
size_t length
Definition: Anonymizer.h:57
unsigned char * raw_data
Definition: Anonymizer.h:56
int(* fcn_anAnonymizeJpegBuffer)(AnBuffer, AnParams *, ANState, AnBuffer *)
anAnonymizeJpegBuffer function pointer
Definition: Anonymizer.h:205
int x
Definition: Anonymizer.h:46
int lpNumBlurPass
Definition: Anonymizer.h:88
Region Of Interest Region Of Interest (ROI) defines image area where anonymization is proceed...
Definition: Anonymizer.h:44
void(* fcn_anGetDefaultParams)(AnParams *)
anGetDefaultParams function pointer
Definition: Anonymizer.h:219
unsigned int height
Definition: Anonymizer.h:49