houxiao
2017-06-28 a1d71a36321431968d09d929ce6d04f6d7896b10
modify proto

git-svn-id: http://192.168.1.226/svn/proxy@665 454eff88-639b-444f-9e54-f578c98de674
1个文件已添加
3个文件已修改
25 ■■■■ 已修改文件
FaceServer/compare1.jpg 补丁 | 查看 | 原始文档 | blame | 历史
FaceServer/main_face_daemon.cpp 13 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
FaceServer/make.sh 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
FaceServer/test_client_compare.cpp 10 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
FaceServer/compare1.jpg
FaceServer/main_face_daemon.cpp
@@ -140,6 +140,7 @@
bool ev_proc_SensetimeFaceDetectCompare(EVClientStub& client)
{
    EVPHeader* evpHeader = (EVPHeader*)client.recvBuff;
    FDP_Image* fdpImage1 = (FDP_Image*)(client.recvBuff + sizeof(EVPHeader));
    fdpImage1->ntoh();
    
@@ -150,6 +151,9 @@
    stfaceImg1.height = fdpImage1->height;
    stfaceImg1.size = fdpImage1->size;
    stfaceImg1.buff = fdpImage1->buff;
    LOGP(DEBUG, "stfaceImg1 db_id=%d, mb_type=%d, width=%d, height=%d, size=%d",
        (int)stfaceImg1.db_id, (int)stfaceImg1.mb_type, (int)stfaceImg1.width, (int)stfaceImg1.height, (int)stfaceImg1.size);
    
    FDP_Image* fdpImage2 = (FDP_Image*)(client.recvBuff + sizeof(EVPHeader) + sizeof(FDP_Image) + fdpImage1->size);
    fdpImage2->ntoh();
@@ -165,13 +169,20 @@
    LOGP(DEBUG, "stfaceImg2 db_id=%d, mb_type=%d, width=%d, height=%d, size=%d", 
        (int)stfaceImg2.db_id, (int)stfaceImg2.mb_type, (int)stfaceImg2.width, (int)stfaceImg2.height, (int)stfaceImg2.size);
        
    char imgfn[100 * 1024];
    static int i = 0;
    sprintf(imgfn, "IMG_%d_%d_w%d_h%d.rgb565", stfaceImg1.db_id, ++i, stfaceImg1.width, stfaceImg1.height);
    sprintf(imgfn, "IMG_%d_%d_w%d_h%d.img", stfaceImg1.db_id, ++i, stfaceImg1.width, stfaceImg1.height);
    FILE * pFile = fopen(imgfn, "wb");
    fwrite(stfaceImg1.buff, sizeof(char), stfaceImg1.size, pFile);
    fclose(pFile);
    pFile = nullptr;
    sprintf(imgfn, "IMG_%d_%d_w%d_h%d.img", stfaceImg2.db_id, ++i, stfaceImg2.width, stfaceImg2.height);
    pFile = fopen(imgfn, "wb");
    fwrite(stfaceImg2.buff, sizeof(char), stfaceImg2.size, pFile);
    fclose(pFile);
    pFile = nullptr;
}
bool ev_dispatcher_proto_pb(EVClientStub& client)
FaceServer/make.sh
@@ -20,7 +20,7 @@
OPENCV_LIB=`PKG_CONFIG_PATH=$OPENCV_LIB/pkgconfig pkg-config --libs-only-l opencv`
OPENCV_LIB="-L$OPENCV_BASE/lib $OPENCV_LIB"
CPPFLAGS+="-g -c -std=c++11 -pthread -DSERVER_PORT=15432 -DSTFACESDK_BASE=\"$STFACESDK_BASE\" -I$PIPELINE_BASE $PROTOBUF_INC $STFACESDK_INC $OPENCV_INC $LIBYUV_INC "
CPPFLAGS+="-g -c -std=c++11 -pthread -DSERVER_PORT=15436 -DSTFACESDK_BASE=\"$STFACESDK_BASE\" -I$PIPELINE_BASE $PROTOBUF_INC $STFACESDK_INC $OPENCV_INC $LIBYUV_INC "
LDFLAGS+="-pthread -levent $PROTOBUF_LIB $STFACESDK_LIB $OPENCV_LIB $LIBYUV_LIB "
rm *.o
FaceServer/test_client_compare.cpp
@@ -59,9 +59,9 @@
        fdpImage1->size = fread(fdpImage1->buff, 1, length, pFile);
        fclose(pFile);
        pFile = nullptr;
        fdpImage1->hton();
        evpHeader->size += sizeof(FDP_Image) + fdpImage1->size;
        fdpImage1->hton();
    }
    
    FDP_Image* fdpImage2 = nullptr;
@@ -77,9 +77,9 @@
        fdpImage2->size = fread(fdpImage2->buff, 1, length, pFile);
        fclose(pFile);
        pFile = nullptr;
        fdpImage1->hton();
        evpHeader->size += sizeof(FDP_Image) + fdpImage2->size;
        fdpImage2->hton();
    }
    
    length = evpHeader->size;
@@ -100,7 +100,7 @@
    make_msg(mesg, length);
    printf("%s\n", mesg);
    printf("%d\n", (int)strlen(mesg));
    printf("%d\n", length);
    // build socket
    int port = 15436;