Go to the source code of this file.
◆ rf_emotion_classify_whole()
| int rf_emotion_classify_whole |
( |
void * |
classifier_handle, |
|
|
void * |
image_handle, |
|
|
int |
ymin, |
|
|
int |
xmin, |
|
|
int |
ymax, |
|
|
int |
xmax, |
|
|
rf_error_type * |
error |
|
) |
| |
Classify whole image's emotion (where the whole image is the face image after cropped)
- Parameters
-
| classifier_handle | classifier handle |
| image_handle | image handle (use image API to create) |
| error | output parameter to return an error details output: int which represents the face's emotion using the following mapping: denote the output emotion as: output_emotion and the mapping by emotions_table_by_indices: std::vector<std::string> emotions_table_by_indices = {std::string("angry"), std::string("disgust"), std::string("fear"), std::string("happy"), std::string("sad"), std::string("surprise"), std::string("neutral") }; So the output emotion as string is given by: emotions_table_by_indices.at(output_emotion) |
◆ rf_emotion_close()
| void rf_emotion_close |
( |
void * |
classifier_handle, |
|
|
rf_error_type * |
error |
|
) |
| |
Deletes emotion handle.
- Parameters
-
| classifier_handle | classifier handle for the emotion |
| error | output parameter to return an error details |
◆ rf_emotion_init()
| void* rf_emotion_init |
( |
const char * |
model_path, |
|
|
rf_error_type * |
error |
|
) |
| |
Initializes emotion handle.
- Parameters
-
| model_path | path to the "emotion" model |
| error | output parameter to return an error details |
- Returns
- emotion handle