| | |
| | | {
|
| | | EVPHeader* evpHeader = (EVPHeader*)client.recvBuff;
|
| | | FDP_Image* fdpImage = (FDP_Image*)(client.recvBuff + sizeof(EVPHeader));
|
| | | fdpImage->ntoh();
|
| | |
|
| | | STFaceImage stfaceImg;
|
| | | stfaceImg.db_id = fdpImage->db_id;
|
| | |
| | | stfaceImg.size = evpHeader->size - sizeof(EVPHeader) - sizeof(FDP_Image);
|
| | | stfaceImg.buff = fdpImage->buff;
|
| | |
|
| | | //char imgfn[100 * 1024];
|
| | | //static int i = 0;
|
| | | //sprintf(imgfn, "IMG_%d_%d_w%d_h%d.rgb565", stfaceImg.db_id, ++i, stfaceImg.width, stfaceImg.height);
|
| | | //FILE * pFile = fopen(imgfn, "wb");
|
| | | //fwrite(stfaceImg.buff, sizeof(char), stfaceImg.size, pFile);
|
| | | //fclose(pFile);
|
| | | //pFile = nullptr;
|
| | | LOGP(DEBUG, "stfaceImg db_id=%d, mb_type=%d, width=%d, height=%d, size=%d", |
| | | (int)stfaceImg.db_id, (int)stfaceImg.mb_type, (int)stfaceImg.width, (int)stfaceImg.height, (int)stfaceImg.size);
|
| | | |
| | | char imgfn[100 * 1024];
|
| | | static int i = 0;
|
| | | sprintf(imgfn, "IMG_%d_%d_w%d_h%d.rgb565", stfaceImg.db_id, ++i, stfaceImg.width, stfaceImg.height);
|
| | | FILE * pFile = fopen(imgfn, "wb");
|
| | | fwrite(stfaceImg.buff, sizeof(char), stfaceImg.size, pFile);
|
| | | fclose(pFile);
|
| | | pFile = nullptr;
|
| | |
|
| | | fdr_vec_t result;
|
| | | FDP_FaceDetectResult fdrResult = g_STFaceCache.add(stfaceImg);
|
| | |
| | |
|
| | | bool ev_dispatcher_proto_rawbin(EVClientStub& client)
|
| | | {
|
| | | LOG_DEBUG << "ev_dispatcher_proto_pb" << LOG_ENDL;
|
| | | LOG_DEBUG << "ev_dispatcher_proto_rawbin" << LOG_ENDL;
|
| | |
|
| | | EVPHeader* evpHeader = (EVPHeader*)client.recvBuff;
|
| | | if (evpHeader->size != client.recvBuffSize)
|