"choose images with only faces. I.e. face has to cover\n"
"approximately 95-100%% of the image (passport photos\n"
"are the best example :)). Note that if this value is\n"
- "less than 95%, accuracy can be significantly reduced.\n"
+ "less than 95%%, accuracy can be significantly reduced.\n"
"In real code such images can be achieved by cropping\n"
"faces from images with face detection functionality.\n"
TEXT_RESET);
}
} else {
char out_file_name[FILE_PATH_SIZE];
- snprintf(out_file_name, FILE_PATH_SIZE, "%s_%03d.jpg",
+ if(snprintf(out_file_name, FILE_PATH_SIZE, "%s_%03d.jpg",
cb_data->out_file_path,
- cb_data->frame_number);
+ cb_data->frame_number) < 0)
+ {
+ printf("Output file name truncated.");
+ }
err = save_image_from_buffer(out_file_name, out_buffer, &image_data, 100);
if (MEDIA_VISION_ERROR_NONE != err) {
if (MEDIA_VISION_ERROR_NONE != err) {
int err2 = mv_destroy_source(mvSource);
if (err2 != MEDIA_VISION_ERROR_NONE)
- printf("Fail to destroy mvSource.\n", err2);
+ printf("Fail to destroy mvSource. error code:%i\n", err2);
mvSource = NULL;
free(in_file_name);
break;
int do_another = 0;
if (err != MEDIA_VISION_ERROR_NONE) {
- printf("ERROR: Action is finished with error code: %i\n");
+ printf("ERROR: Action is finished with error code:%i\n", err);
}
sel_opt = 0;
int do_another = 0;
if (err != MEDIA_VISION_ERROR_NONE) {
- printf("ERROR: Action is finished with error code: %i\n");
+ printf("ERROR: Action is finished with error code:%i\n", err);
}
sel_opt = 0;
if (err != MEDIA_VISION_ERROR_NONE) {
int err2 = mv_destroy_source(mvSource);
if (err2 != MEDIA_VISION_ERROR_NONE)
- printf("Fail to destroy mvSource.\n", err2);
+ printf("Fail to destroy mvSource. error code:%i\n", err2);
mvSource = NULL;
free(in_file_name);
break;
int do_another = 0;
if (err != MEDIA_VISION_ERROR_NONE) {
- printf("ERROR: Action is finished with error code: %i\n");
+ printf("ERROR: Action is finished with error code:%i\n", err);
}
sel_opt = 0;
if (err != MEDIA_VISION_ERROR_NONE) {
int err2 = mv_destroy_source(mvSource);
if (err2 != MEDIA_VISION_ERROR_NONE)
- printf("Fail to destroy mvSource.\n", err2);
+ printf("Fail to destroy mvSource. error code:%i\n", err2);
mvSource = NULL;
free(in_file_name);
break;
int do_another = 0;
if (err != MEDIA_VISION_ERROR_NONE) {
- printf("ERROR: Action is finished with error code: %i\n");
+ printf("ERROR: Action is finished with error code:%i\n", err);
}
sel_opt = 0;