![]() |
Anonymizer
7.0
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 *, const AnConfig *, 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 int(* | fcn_anAnonymizeJpegBuffer) (AnBuffer, AnParams *, ANState, AnBuffer *) |
| anAnonymizeJpegBuffer function pointer More... | |
| typedef void(* | fcn_anFreeBuffer) (AnBuffer buffer) |
| anFreeBuffer function pointer More... | |
| typedef int(* | fcn_anGetDefaultParams) (AnParams *) |
| anGetDefaultParams function pointer More... | |
| typedef int(* | fcn_anPlotLayouts) (ANState, const char *, AnObjectType) |
| anGetErrorMsg function pointer More... | |
Functions | |
| ER_FUNCTION_PREFIX int | anInit (const char *sdk_directory, const char *ini_filename, const AnConfig *config, 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) |
| Anonymization function for image file to jpeg file. More... | |
| ER_FUNCTION_PREFIX int | anAnonymizeImageBuffer (AnBuffer src_buffer, unsigned int width, unsigned int height, AnParams *params, ANState state, AnBuffer *dst_buffer) |
| Anonymization function for RAW image buffer to RAW image buffer. More... | |
| ER_FUNCTION_PREFIX int | anAnonymizeJpegBuffer (AnBuffer src_buffer, AnParams *params, ANState state, AnBuffer *dst_buffer) |
| JPEG buffer anonymization API function. More... | |
| ER_FUNCTION_PREFIX void | anFreeBuffer (AnBuffer buffer) |
| Frees the image buffer filled by Anonymizer SDK functions. More... | |
| ER_FUNCTION_PREFIX int | anGetDefaultParams (AnParams *parameters) |
| Fill AnParams structure with default values. More... | |
| const ER_FUNCTION_PREFIX char * | anVersion (int verbose) |
| Get Anonymizer version string. More... | |
| const ER_FUNCTION_PREFIX char * | anGetErrorMsg (int ern) |
| Return error message for suplied error code. More... | |
| ER_FUNCTION_PREFIX int | anPlotLayouts (ANState state, const char *image_filename, AnObjectType type) |
| Print colorized tiles for current layouts into an image. More... | |
Variables | |
| const typedef char *(* | fcn_anVersion )(int) |
| anVersion function pointer More... | |
| const typedef char *(* | fcn_anGetErrorMsg )(int) |
| anGetErrorMsg function pointer 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 171 of file Anonymizer.h.
anAnonymizeImageBuffer function pointer
Definition at line 198 of file Anonymizer.h.
anAnonymizeJpegBuffer function pointer
Definition at line 220 of file Anonymizer.h.
| typedef void(* fcn_anFree) (ANState) |
anFree function pointer
Definition at line 150 of file Anonymizer.h.
| typedef void(* fcn_anFreeBuffer) (AnBuffer buffer) |
anFreeBuffer function pointer
Definition at line 233 of file Anonymizer.h.
| typedef int(* fcn_anGetDefaultParams) (AnParams *) |
anGetDefaultParams function pointer
Definition at line 249 of file Anonymizer.h.
anInit function pointer
Definition at line 140 of file Anonymizer.h.
| typedef int(* fcn_anPlotLayouts) (ANState, const char *, AnObjectType) |
| ER_FUNCTION_PREFIX int anAnonymize | ( | const char * | src_image_filename, |
| const char * | dst_image_filename, | ||
| AnParams * | params, | ||
| ANState | state | ||
| ) |
Anonymization function for image file to jpeg file.
Main function for anonymization. Function loads image from a file, run anonymization engine and save the anonymized image as jpeg file.
| [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 | src_buffer, |
| unsigned int | width, | ||
| unsigned int | height, | ||
| AnParams * | params, | ||
| ANState | state, | ||
| AnBuffer * | dst_buffer | ||
| ) |
Anonymization function for RAW image buffer to RAW image buffer.
Main function for anonymization. This function takes as an input parameter raw image data aligned row by row and runs the anonymization engine. The anonymized image is returned in the output parameter in the format of the input data. The output data buffer (dst_buffer) must be freed by calling anFreeBuffer(dst_buffer) when done.
| [in] | src_buffer | 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 initialization, see anInit function. |
| [out] | dst_buffer | Anonymized data buffer (BGR). Call anFreeBuffer to free the buffer. |
| ER_FUNCTION_PREFIX int anAnonymizeJpegBuffer | ( | AnBuffer | src_buffer, |
| AnParams * | params, | ||
| ANState | state, | ||
| AnBuffer * | dst_buffer | ||
| ) |
JPEG buffer anonymization API function.
This function processes a JPEG image buffer by detecting and blurring faces and license plates. The input is a JPEG image buffer (compressed data), and the anonymized image is returned in the output parameter, also as a JPEG image buffer.
| [in] | src_buffer | An AnBuffer structure containing the input JPEG buffer. |
| [in] | params | Pointer to anonymization parameters. If NULL, default values are used. |
| [in] | state | Anonymizer state. For state initialization, see anInit function. |
| [out] | dst_buffer | Pointer to an AnBuffer structure that will be filled with the 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.
This function frees memory previously allocated by the anAnonymizeImageBuffer or anAnonymizeJpegBuffer functions.
| buffer | An AnBuffer structure containing the buffer to be freed. |
| ER_FUNCTION_PREFIX int anGetDefaultParams | ( | AnParams * | parameters | ) |
Fill AnParams structure with default values.
This function initializes an AnParams structure with default values. The caller must provide a pointer to an AnParams structure, which can be either statically or dynamically allocated.
| [out] | parameters | Pointer to an AnParams structure that will be filled with default values. |
| const ER_FUNCTION_PREFIX char* anGetErrorMsg | ( | int | ern | ) |
Return error message for suplied error code.
| ER_FUNCTION_PREFIX int anInit | ( | const char * | sdk_directory, |
| const char * | ini_filename, | ||
| const AnConfig * | config, | ||
| 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) |
| [in] | config | Configuration structure for Anonymizer detection modules initialization (if NULL defaults from *.ini are used) |
| [out] | state | pointer to ANState module handle. |
| ER_FUNCTION_PREFIX int anPlotLayouts | ( | ANState | state, |
| const char * | image_filename, | ||
| AnObjectType | type | ||
| ) |
Print colorized tiles for current layouts into an image.
For a given detection object, this function prints colorized tiles used for detection. Saved images are named by object type and suffixed with the name of the detection module detecting the object (as defined in the .ini files) and layout parameters. Multiple images per object can be saved, depending on the configuration.
| [in] | state | Anonymizer state. For state initialization, see anInit function. |
| [in] | image_filename | Input image filename. |
| [in] | type | Detection object type. |
| const ER_FUNCTION_PREFIX char* anVersion | ( | int | verbose | ) |
Get Anonymizer version string.
| verbose | Verbosity flag. |
| const typedef char*(* fcn_anGetErrorMsg) (int) |
anGetErrorMsg function pointer
Definition at line 268 of file Anonymizer.h.
| const typedef char*(* fcn_anVersion) (int) |
anVersion function pointer
Definition at line 258 of file Anonymizer.h.