Multimodal Fusion Module


Defines

#define NORM_METHOD_NO   0
#define NORM_METHOD_MM   1
#define NORM_METHOD_ZS   2
#define NORM_METHOD_TH   3
#define NORM_METHOD_QQ   4
#define NORM_METHOD_QLQ   5
#define IMPOSSIBLE   1000000000.0

Functions

static bs_status bsmod_fusion_init (void)
static bs_status bsmod_fusion_cleanup (void)
static bs_service_responsecreate_biometric_decision_response (const bs_service_request *request, bs_bool decision)
static bs_service_responsecreate_biometric_response (const bs_service_request *request, bs_double score)
static int get_normalization (const char *norm)
static double normalize (double s, char *norm)
static double fuse_mw (unsigned ns, double s1, double s2, double s3, char *meth)
static bs_bool fuse_dw (unsigned ns, bs_bool s1a, bs_bool s2a, bs_bool s3a, char *meth)
static bs_bool majority_vote (unsigned ns, double s1, double s2, double s3, char *meth)
static bs_status handle_fuse2 (const bs_service_request *request, bs_service_response **response)
static bs_status handle_fuse3 (const bs_service_request *request, bs_service_response **response)
static bs_status handle_fuse2_decision (const bs_service_request *request, bs_service_response **response)
static bs_status handle_fuse3_decision (const bs_service_request *request, bs_service_response **response)
static bs_status bsmod_fusion_handle_service (const bs_service_request *request, bs_service_response **response, void *extra)

Variables

bs_module bsmod_symtable
bs_module bsmod_symtable

Define Documentation

#define IMPOSSIBLE   1000000000.0

Definition at line 194 of file bsmod_fusion.c.

Referenced by fuse_dw(), fuse_mw(), and normalize().

#define NORM_METHOD_MM   1

Min-max normalization.

Definition at line 51 of file bsmod_fusion.c.

Referenced by get_normalization(), and normalize().

#define NORM_METHOD_NO   0

No normalization.

Definition at line 50 of file bsmod_fusion.c.

Referenced by get_normalization(), and normalize().

#define NORM_METHOD_QLQ   5

Adaptive QLQ normalization.

Definition at line 55 of file bsmod_fusion.c.

Referenced by get_normalization(), and normalize().

#define NORM_METHOD_QQ   4

Adaptive QQ normalization.

Definition at line 54 of file bsmod_fusion.c.

Referenced by get_normalization(), and normalize().

#define NORM_METHOD_TH   3

Tanh normalization.

Definition at line 53 of file bsmod_fusion.c.

Referenced by get_normalization(), and normalize().

#define NORM_METHOD_ZS   2

Z-score normalization.

Definition at line 52 of file bsmod_fusion.c.

Referenced by get_normalization(), and normalize().


Function Documentation

static bs_status bsmod_fusion_cleanup ( void   )  [static]

Cleanup the fusion module by destroying its memory pool

Definition at line 76 of file bsmod_fusion.c.

References BS_OK.

static bs_status bsmod_fusion_handle_service ( const bs_service_request request,
bs_service_response **  response,
void *  extra 
) [static]

Service handling routine. Since the keystroke module doesn't offer any services, it will return BS_NO_SERVICE on all occasions.

Definition at line 597 of file bsmod_fusion.c.

References BS_NO_SERVICE, handle_fuse2(), handle_fuse2_decision(), handle_fuse3(), handle_fuse3_decision(), bs_service_request::operation, bs_service_request::port, bs_service_request::service, and streq().

Here is the call graph for this function:

static bs_status bsmod_fusion_init ( void   )  [static]

Initialize the fusion module by creating a UUID for it.

Definition at line 67 of file bsmod_fusion.c.

References BS_OK.

static bs_service_response* create_biometric_decision_response ( const bs_service_request request,
bs_bool  decision 
) [static]

Definition at line 82 of file bsmod_fusion.c.

References bs_data_type::builtin, bs_part_instance::data, FALSE, bs_data_type::from_mp, len(), bs_data_type::name, bs_part_instance::name, bs_message_instance::name, bs_message_instance::num_parts, bs_service_request::operation, bs_service_response::operation, bs_service_response::output, bs_message_instance::parts, bs_service_request::port, bs_service_response::port, bs_service_request::service, bs_service_response::service, bs_part_instance::size, TRUE, bs_part_instance::type, bs_service_request::uuid, and bs_service_response::uuid.

Referenced by handle_fuse2_decision(), and handle_fuse3_decision().

Here is the call graph for this function:

static bs_service_response* create_biometric_response ( const bs_service_request request,
bs_double  score 
) [static]

Definition at line 129 of file bsmod_fusion.c.

References bs_data_type::builtin, bs_part_instance::data, FALSE, bs_data_type::from_mp, len(), bs_data_type::name, bs_part_instance::name, bs_message_instance::name, bs_message_instance::num_parts, bs_service_request::operation, bs_service_response::operation, bs_service_response::output, bs_message_instance::parts, bs_service_request::port, bs_service_response::port, bs_service_request::service, bs_service_response::service, bs_part_instance::size, TRUE, bs_part_instance::type, bs_service_request::uuid, and bs_service_response::uuid.

Referenced by handle_fuse2(), and handle_fuse3().

Here is the call graph for this function:

static bs_bool fuse_dw ( unsigned  ns,
bs_bool  s1a,
bs_bool  s2a,
bs_bool  s3a,
char *  meth 
) [static]

Definition at line 333 of file bsmod_fusion.c.

References FALSE, and IMPOSSIBLE.

Referenced by handle_fuse2_decision(), and handle_fuse3_decision().

static double fuse_mw ( unsigned  ns,
double  s1,
double  s2,
double  s3,
char *  meth 
) [static]

Definition at line 282 of file bsmod_fusion.c.

References IMPOSSIBLE.

Referenced by handle_fuse2(), and handle_fuse3().

static int get_normalization ( const char *  norm  )  [static]

Determine what kind of normalization is to be done, if any. This function examines the first two or three characters of the passed norm string.

Parameters:
norm The norm string to check
Returns:
The type of normalization.

Definition at line 182 of file bsmod_fusion.c.

References NORM_METHOD_MM, NORM_METHOD_NO, NORM_METHOD_QLQ, NORM_METHOD_QQ, NORM_METHOD_TH, and NORM_METHOD_ZS.

Referenced by normalize().

static bs_status handle_fuse2 ( const bs_service_request request,
bs_service_response **  response 
) [static]

Handle the fuse2 operation.

Parameters:
request The request to service
response Result pointer to the generated result
Returns:
Status code.

Definition at line 435 of file bsmod_fusion.c.

References BS_OK, BS_SERVICE_NUM_PARTS_MISMATCH, BS_SERVICE_PART_INCORRECT, create_biometric_response(), bs_part_instance::data, fuse_mw(), bs_service_request::input, max(), min(), normalize(), bs_message_instance::num_parts, and bs_message_instance::parts.

Referenced by bsmod_fusion_handle_service().

Here is the call graph for this function:

static bs_status handle_fuse2_decision ( const bs_service_request request,
bs_service_response **  response 
) [static]

Handle the fuse3 operation for decision level fusion.

Parameters:
request The request to service
response Result pointer to the generated result
Returns:
Status code.

Definition at line 520 of file bsmod_fusion.c.

References BS_ERROR, BS_OK, BS_SERVICE_NUM_PARTS_MISMATCH, BS_SERVICE_PART_INCORRECT, create_biometric_decision_response(), bs_part_instance::data, decision_to_bool(), FALSE, fuse_dw(), bs_service_request::input, majority_vote(), bs_message_instance::num_parts, bs_message_instance::parts, and TRUE.

Referenced by bsmod_fusion_handle_service().

Here is the call graph for this function:

static bs_status handle_fuse3 ( const bs_service_request request,
bs_service_response **  response 
) [static]

Handle the fuse3 operation.

Parameters:
request The request to service
response Result pointer to the generated result
Returns:
Status code.

Definition at line 476 of file bsmod_fusion.c.

References BS_OK, BS_SERVICE_NUM_PARTS_MISMATCH, BS_SERVICE_PART_INCORRECT, create_biometric_response(), bs_part_instance::data, fuse_mw(), bs_service_request::input, max(), min(), normalize(), bs_message_instance::num_parts, and bs_message_instance::parts.

Referenced by bsmod_fusion_handle_service().

Here is the call graph for this function:

static bs_status handle_fuse3_decision ( const bs_service_request request,
bs_service_response **  response 
) [static]

Handle the fuse3 operation for decision level fusion.

Parameters:
request The request to service
response Result pointer to the generated result
Returns:
Status code.

Definition at line 559 of file bsmod_fusion.c.

References BS_ERROR, BS_OK, BS_SERVICE_NUM_PARTS_MISMATCH, BS_SERVICE_PART_INCORRECT, create_biometric_decision_response(), bs_part_instance::data, decision_to_bool(), FALSE, fuse_dw(), bs_service_request::input, majority_vote(), bs_message_instance::num_parts, bs_message_instance::parts, and TRUE.

Referenced by bsmod_fusion_handle_service().

Here is the call graph for this function:

static bs_bool majority_vote ( unsigned  ns,
double  s1,
double  s2,
double  s3,
char *  meth 
) [static]

Return true if a certain majority of the decision is true, ie accepting. This depends on a threshold, which is by default 1.5.

Definition at line 404 of file bsmod_fusion.c.

Referenced by handle_fuse2_decision(), and handle_fuse3_decision().

static double normalize ( double  s,
char *  norm 
) [static]

Normalize the given score, using the given normalization method. The norm string will contain the name of the normalization as well as some parameters. If the score could not be correctly normalized a strange value will be returned.

Parameters:
s The score to normalize
norm The norm string to examine for parameters
Returns:
The normalized score.

Definition at line 205 of file bsmod_fusion.c.

References get_normalization(), IMPOSSIBLE, NORM_METHOD_MM, NORM_METHOD_NO, NORM_METHOD_QLQ, NORM_METHOD_QQ, NORM_METHOD_TH, and NORM_METHOD_ZS.

Referenced by handle_fuse2(), and handle_fuse3().

Here is the call graph for this function:


Variable Documentation

bs_module bsmod_symtable

Definition at line 624 of file bsmod_fusion.c.

bs_module bsmod_symtable

Symbol table for the fusion module.

Definition at line 61 of file bsmod_fusion.c.


Generated on Tue Jul 17 09:51:36 2007 for Bio-SPHERE by  doxygen 1.5.1