Anonymizer  4.0
SDK for anonymization of human faces and licence plates in images.
 All Data Structures Functions Variables Typedefs Groups Pages
Anonymizer API

Anonymizer library interface for image anonymization. More...

Typedefs

typedef void *(* fcn_anInit )(const char *, const char *)
 anInit function pointer More...
 
typedef void(* fcn_anFree )(void *)
 anFree function pointer More...
 
typedef int(* fcn_anAnonymize )(const char *, const char *, AnParams *, void *)
 anAnonymize function pointer More...
 
typedef int(* fcn_anAnonymizeBuffer )(unsigned char *, int, int, AnParams *, void *, unsigned char **)
 anAnonymizeBuffer function pointer More...
 
typedef void(* fcn_anFreeBuffer )(unsigned char *)
 anFreeBuffer function pointer More...
 
typedef int(* fcn_anAnonymizeJpegBuffer )(char *, size_t, AnParams *, void *, char **, size_t *)
 anAnonymizeJpegBuffer function pointer More...
 
typedef void(* fcn_anFreeJpegBuffer )(char *)
 anFreeJpegBuffer function pointer More...
 
typedef void(* fcn_anGetDefaultParams )(AnParams *)
 anGetDefaultParams function pointer More...
 

Functions

FUNCTION_PREFIX void * anInit (const char *sdk_directory, const char *ini_filename)
 Initializes/loads Anonymizer engine. More...
 
FUNCTION_PREFIX void anFree (void *pvModuleState)
 Frees engine state structure. More...
 
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. More...
 
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. More...
 
FUNCTION_PREFIX void anFreeBuffer (unsigned char *pData)
 Frees the image buffer from fcn_anAnonymizeBuffer. More...
 
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. More...
 
FUNCTION_PREFIX void anFreeJpegBuffer (char *pData)
 Frees the JPEG buffer from fcn_anAnonymizeJpegBuffer. More...
 
FUNCTION_PREFIX int anGetDefaultParams (AnParams *parameters)
 Fill AnParams structure with default values. More...
 

Detailed Description

Anonymizer library interface for image anonymization.

Anonymizer library is secured by Sentinel HASP secure solution and thus can't be linked implicitly (via MSVC project, Makefile) in client's software. The library must be linked explicitly at runtime. Thus all library functions has also its function pointers type definitions for easier implementation on a client side.

See Explicit linking, example-files.cpp, example-buffers.cpp

Typedef Documentation

typedef int(* fcn_anAnonymize)(const char *, const char *, AnParams *, void *)

anAnonymize function pointer

See Also
anAnonymize
Examples:
example-files.cpp.

Definition at line 146 of file Anonymizer.h.

typedef int(* fcn_anAnonymizeBuffer)(unsigned char *, int, int, AnParams *, void *, unsigned char **)

anAnonymizeBuffer function pointer

See Also
anAnonymizeBuffer
Examples:
example-buffers.cpp.

Definition at line 170 of file Anonymizer.h.

typedef int(* fcn_anAnonymizeJpegBuffer)(char *, size_t, AnParams *, void *, char **, size_t *)

anAnonymizeJpegBuffer function pointer

See Also
anAnonymizeJpegBuffer
Examples:
example-buffers.cpp.

Definition at line 206 of file Anonymizer.h.

typedef void(* fcn_anFree)(void *)

anFree function pointer

See Also
anFree
Examples:
example-buffers.cpp, and example-files.cpp.

Definition at line 125 of file Anonymizer.h.

typedef void(* fcn_anFreeBuffer)(unsigned char *)

anFreeBuffer function pointer

See Also
anFreeBuffer
Examples:
example-buffers.cpp.

Definition at line 181 of file Anonymizer.h.

typedef void(* fcn_anFreeJpegBuffer)(char *)

anFreeJpegBuffer function pointer

See Also
anFreeJpegBuffer
Examples:
example-buffers.cpp.

Definition at line 218 of file Anonymizer.h.

typedef void(* fcn_anGetDefaultParams)(AnParams *)

anGetDefaultParams function pointer

See Also
anGetDefaultParams

Definition at line 231 of file Anonymizer.h.

typedef void*(* fcn_anInit)(const char *, const char *)

anInit function pointer

See Also
anInit
Examples:
example-buffers.cpp, and example-files.cpp.

Definition at line 114 of file Anonymizer.h.

Function Documentation

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.

Main function for anonymization. Function loads a jpeg image from a file, run anonymization engine and save the anonymized image as jpeg file. Function return 0 on success or error code.

Parameters
[in]src_image_filenameInput image filename (jpeg).
[in]dst_image_filenameOutput image filename (jpeg).
[in]pParamsPointer to anonymization parameters, if NULL default values are used.
[in]pvModuleStatePointer to state created by anInit().
Returns
Zero on success, error code on failure.
See Also
example-files.cpp
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.

Main function for anonymization. Function takes as an input parameter raw image data aligned row by row and run anonymization engine. The anonymized image is returned in ouput parmeter in format of input data. Output data buffer (ppDstData) has to be freed! Call anFreeBuffer(*ppDstData) when you finish job.

Parameters
[in]pSrcDataPointer to input RGB data buffer - row-wise, 3 bytes (uchar) per pixel; index = 3*col + row*3*width
[in]widthImage width;
[in]heightImage height
[in]pParamsPointer to anonymization parameters, if NULL default values are used.
[in]pvModuleStatePointer to state created by anInit().
[out]ppDstDataAnonymized data buffer (RGB). Call anFreeBuffer() to free buffer.
Returns
Zero on success, error code on failure.
See Also
example-buffers.cpp
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.

Main function for anonymization. Function takes as an input parameter JPEG image buffer (compressed data) which anonymize. The anonymized image is returned in ouput parameter also as JPEG image buffer. Function return 0 on success or error code.

Parameters
[in]pSrcDataPointer to input JPEG buffer.
[in]srcLengthBuffer length in bytes.
[in]pParamsPointer to anonymization parameters, if NULL default values are used.
[in]pvModuleStatePointer to state created by anInit().
[out]ppDstDataOutput JPEG buffer. Call anFreeJpegBuffer() to free buffer.
[out]dstLengthOutput buffer length in bytes.
Returns
Zero on success, error code on failure.
See Also
example-buffers.cpp
void anFree ( void *  pvModuleState)

Frees engine state structure.

Parameters
[in]pvModuleStatePointer to a state created by anInit().
FUNCTION_PREFIX void anFreeBuffer ( unsigned char *  pData)

Frees the image buffer from fcn_anAnonymizeBuffer.

Frees memory previously allocated for the image buffer using fcn_anAnonymizeBuffer.

Parameters
pDataPointer to image buffer.
FUNCTION_PREFIX void anFreeJpegBuffer ( char *  pData)

Frees the JPEG buffer from fcn_anAnonymizeJpegBuffer.

Frees memory previously allocated JPEG buffer by anAnonymizeJpegBuffer() function.

Parameters
[in]pDataPointer to JPEG buffer.
FUNCTION_PREFIX int anGetDefaultParams ( AnParams parameters)

Fill AnParams structure with default values.

Fill AnParams structure with default values. Pass pointer to static or dynamically allocated AnParams structure to be filled with default values.

Parameters
[out]parametersPointer to AnParams structure.
FUNCTION_PREFIX void* anInit ( const char *  sdk_directory,
const char *  ini_filename 
)

Initializes/loads Anonymizer engine.

anInit is the initialization function which loads and set-ups all detections models. Input parameters of the function are path to "modules" directory of Anonymizer SDK which contains configuration files and directory detection models. Function return a pointer to the Anonymizer state or NULL on failure. Function sets the errno variable.

Parameters
[in]sdk_directoryPath of the AnonymizeSDK.
[in]ini_filenameConfig file name (if NULL, default "config.ini" is used)
Returns
Returns a pointer to state, NULL on failure.