Page 79 - 人工智能——为机器植入智慧
P. 79
项目五 智能支付
CStringA strMBCS;
CStringW strUNICODE(strRes);
strMBCS = strUNICODE;
s = strMBCS.GetBuffer();
del_chr(s, ']');
del_chr(s, '[');
cout << s;
cJSON *root = cJSON_Parse(s);
cJSON *face = cJSON_GetObjectItemCaseSensitive(root, "face");
cJSON *face_id = cJSON_GetObjectItemCaseSensitive(face, "face_id");
printf("%s\n", face_id->valuestring); // 输出 face_id
(4) 系统显示实时人脸图像(图 5-9 左)和注册人脸图像(图 5-9 右),运行程序后得
到人脸识别结果(图 5-10)。
图 5-9
图 5-10
65

