![]() |
Anonymizer
6.0.1
SDK for anonymization of human faces and licence plates in images.
|
Anonymizer library interface for image anonymization. More...
Typedefs | |
typedef int(* | fcn_anInit) (const char *, const char *, ANState *) |
anInit function pointer More... | |
typedef void(* | fcn_anFree) (ANState) |
anFree function pointer More... | |
typedef int(* | fcn_anAnonymize) (const char *, const char *, AnParams *, ANState) |
anAnonymize function pointer More... | |
typedef int(* | fcn_anAnonymizeImageBuffer) (AnBuffer, int, int, AnParams *, ANState, AnBuffer *) |
anAnonymizeImageBuffer function pointer More... | |
typedef void(* | fcn_anFreeBuffer) (AnBuffer buffer) |
anFreeBuffer function pointer More... | |
typedef int(* | fcn_anAnonymizeJpegBuffer) (AnBuffer, AnParams *, ANState, AnBuffer *) |
anAnonymizeJpegBuffer function pointer More... | |
typedef void(* | fcn_anGetDefaultParams) (AnParams *) |
anGetDefaultParams function pointer More... | |
typedef const char *(* | fcn_anVersion) (int) |
anVersion function pointer More... | |
typedef const char *(* | fcn_anGetErrorMsg) (int) |
anGetErrorMsg function pointer More... | |
Functions | |
ER_FUNCTION_PREFIX int | anInit (const char *sdk_directory, const char *ini_filename, ANState *state) |
Initializes/loads Anonymizer engine. More... | |
ER_FUNCTION_PREFIX void | anFree (ANState state) |
Frees engine state structure. More... | |
ER_FUNCTION_PREFIX int | anAnonymize (const char *src_image_filename, const char *dst_image_filename, AnParams *params, ANState state) |
Load image from image file and process the anonymization. Result save as a jpeg image. More... | |
ER_FUNCTION_PREFIX int | anAnonymizeImageBuffer (AnBuffer srcBuffer, unsigned int width, unsigned int height, AnParams *params, ANState state, AnBuffer *dstBuffer) |
Processes image data buffer, i.e. detects and blurs faces and license plates. More... | |
ER_FUNCTION_PREFIX void | anFreeBuffer (AnBuffer buffer) |
Frees the image buffer filled by Anonymizer SDK functions. More... | |
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. More... | |
ER_FUNCTION_PREFIX int | anGetDefaultParams (AnParams *parameters) |
Fill AnParams structure with default values. More... | |
ER_FUNCTION_PREFIX const char * | anVersion (int verbose) |
Get Anonymizer version string. More... | |
ER_FUNCTION_PREFIX const char * | anGetErrorMsg (int ern) |
Return error message for suplied error code. More... | |
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
anAnonymize function pointer
Definition at line 151 of file Anonymizer.h.
anAnonymizeImageBuffer function pointer
Definition at line 175 of file Anonymizer.h.
anAnonymizeJpegBuffer function pointer
Definition at line 206 of file Anonymizer.h.
typedef void(* fcn_anFree) (ANState) |
anFree function pointer
Definition at line 130 of file Anonymizer.h.
typedef void(* fcn_anFreeBuffer) (AnBuffer buffer) |
anFreeBuffer function pointer
Definition at line 186 of file Anonymizer.h.
typedef void(* fcn_anGetDefaultParams) (AnParams *) |
anGetDefaultParams function pointer
Definition at line 220 of file Anonymizer.h.
typedef const char*(* fcn_anGetErrorMsg) (int) |
anGetErrorMsg function pointer
Definition at line 239 of file Anonymizer.h.
typedef int(* fcn_anInit) (const char *, const char *, ANState *) |
anInit function pointer
Definition at line 120 of file Anonymizer.h.
typedef const char*(* fcn_anVersion) (int) |
anVersion function pointer
Definition at line 229 of file Anonymizer.h.
ER_FUNCTION_PREFIX int anAnonymize | ( | const char * | src_image_filename, |
const char * | dst_image_filename, | ||
AnParams * | params, | ||
ANState | state | ||
) |
Load image from image file and process the anonymization. Result save as a jpeg image.
Main function for anonymization. Function loads image from a file, run anonymization engine and save the anonymized image as jpeg file. Function return 0 on success or error code.
[in] | src_image_filename | Input image filename. |
[in] | dst_image_filename | Output image filename (jpeg). |
[in] | params | Pointer to anonymization parameters, if NULL default values are used. |
[in] | state | Anonymizer state, for state initalization see anInit function. |
ER_FUNCTION_PREFIX int anAnonymizeImageBuffer | ( | AnBuffer | srcBuffer, |
unsigned int | width, | ||
unsigned int | height, | ||
AnParams * | params, | ||
ANState | state, | ||
AnBuffer * | dstBuffer | ||
) |
Processes 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 (dstBuffer) has to be freed! Call anFreeBuffer(dstBuffer) when you finish job.
[in] | srcBuffer | Input structure with BGR data buffer - row-wise, 3 bytes (uchar) per pixel; index = 3*col + row*3*width |
[in] | width | Image width |
[in] | height | Image height |
[in] | params | Pointer to anonymization parameters, if NULL default values are used. |
[in] | state | Anonymizer state, for state initalization see anInit function. |
[out] | dstBuffer | Anonymized data buffer (BGR). Call anFreeBuffer() to free buffer. |
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.
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.
[in] | srcBuffer | AnBuffer structure with input JPEG buffer. |
[in] | params | Pointer to anonymization parameters, if NULL default values are used. |
[in] | state | Anonymizer state, for state initalization see anInit function. |
[out] | dstBuffer | Pointer to AnBuffer structure full filled with anonymized JPEG buffer. Call anFreeBuffer() to free the buffer data. |
ER_FUNCTION_PREFIX void anFree | ( | ANState | state | ) |
Frees engine state structure.
[in] | state | Anonymizer state, for state initalization see anInit function. |
ER_FUNCTION_PREFIX void anFreeBuffer | ( | AnBuffer | buffer | ) |
Frees the image buffer filled by Anonymizer SDK functions.
Frees memory previously allocated by anAnonymizeImageBuffer or anAnonymizeJpegBuffer functions.
buffer | AnBuffer structure. |
ER_FUNCTION_PREFIX int anGetDefaultParams | ( | AnParams * | parameters | ) |
ER_FUNCTION_PREFIX const char* anGetErrorMsg | ( | int | ern | ) |
Return error message for suplied error code.
ER_FUNCTION_PREFIX int anInit | ( | const char * | sdk_directory, |
const char * | ini_filename, | ||
ANState * | state | ||
) |
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 and config filename. Function returns zero on success or error code otherwise.
[in] | sdk_directory | Path of the AnonymizeSDK. |
[in] | ini_filename | Config file name (if NULL, default "config.ini" is used) |
[out] | state | pointer to ANState module handle. |
ER_FUNCTION_PREFIX const char* anVersion | ( | int | verbose | ) |
Get Anonymizer version string.
verbose | Verbosity flag. |