houxiao
2017-07-19 a88fc40a16cefc8248baa4b6aab7b7577e0ba4cc
code review

git-svn-id: http://192.168.1.226/svn/proxy@730 454eff88-639b-444f-9e54-f578c98de674
29个文件已删除
4个文件已修改
2571 ■■■■■ 已修改文件
RtspFace/PL_Paint.cpp 35 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
RtspFace/PL_Paint.h 15 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
RtspFace/PL_Scale.cpp 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
RtspFace/PL_Scale.h 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
RtspFace/SensetimeFaceAPIWrapper/include/cv_common.h 285 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
RtspFace/SensetimeFaceAPIWrapper/include/cv_face.h 580 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
RtspFace/SensetimeFaceAPIWrapper/include/cv_utils.h 47 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
RtspFace/SensetimeFaceAPIWrapper/models/CLUSTERING_VERSION 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
RtspFace/SensetimeFaceAPIWrapper/models/VERIFY_VERSION 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
RtspFace/SensetimeFaceAPIWrapper/models/clustering.model 补丁 | 查看 | 原始文档 | blame | 历史
RtspFace/SensetimeFaceAPIWrapper/models/verify.model 补丁 | 查看 | 原始文档 | blame | 历史
RtspFace/SensetimeFaceAPIWrapper/src/DBuntil.cpp 121 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
RtspFace/SensetimeFaceAPIWrapper/src/DBuntil.h 42 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
RtspFace/SensetimeFaceAPIWrapper/src/FaceDBPool.cpp 166 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
RtspFace/SensetimeFaceAPIWrapper/src/FaceDBPool.h 26 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
RtspFace/SensetimeFaceAPIWrapper/src/Makefile 28 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
RtspFace/SensetimeFaceAPIWrapper/src/db/DBuntil.cpp 97 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
RtspFace/SensetimeFaceAPIWrapper/src/db/DBuntil.h 41 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
RtspFace/SensetimeFaceAPIWrapper/src/db/Makefile 17 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
RtspFace/SensetimeFaceAPIWrapper/src/db/demo.cpp 82 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
RtspFace/SensetimeFaceAPIWrapper/src/db/main.cpp 31 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
RtspFace/SensetimeFaceAPIWrapper/src/db/run.sh 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
RtspFace/SensetimeFaceAPIWrapper/src/faceAPI.cpp 322 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
RtspFace/SensetimeFaceAPIWrapper/src/faceAPI.h 72 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
RtspFace/SensetimeFaceAPIWrapper/src/faceDB.cpp 179 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
RtspFace/SensetimeFaceAPIWrapper/src/faceDB.h 42 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
RtspFace/SensetimeFaceAPIWrapper/src/out.db 补丁 | 查看 | 原始文档 | blame | 历史
RtspFace/SensetimeFaceAPIWrapper/src/run.sh 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
RtspFace/SensetimeFaceAPIWrapper/src/sample_face_track.cpp 117 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
RtspFace/SensetimeFaceAPIWrapper/src/test.cpp 52 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
RtspFace/SensetimeFaceAPIWrapper/src/time_helper.h 44 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
RtspFace/SensetimeFaceAPIWrapper/src/tools.cpp 89 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
RtspFace/SensetimeFaceAPIWrapper/src/tools.h 29 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
RtspFace/PL_Paint.cpp
@@ -7,6 +7,12 @@
#include <opencv2/core/mat.hpp>
#include <opencv2/imgproc.hpp>
~PLPLContext::PLPLContext()
{
    delete (CvxText*)cvxText;
    cvxText = nullptr;
}
struct PL_Paint_Internal
{
    uint8_t* buffer;
@@ -84,15 +90,12 @@
        LOG_ERROR << "fontPath is null!" << LOG_ENDL;
        return false;
    }
    if(in->config.plplCtx->cvxText != nullptr)
    {
        delete(in->config.plplCtx->cvxText);
        delete (CvxText*)in->config.plplCtx->cvxText;
    }
    CvxText* cvxText =new CvxText(in->config.fontPath.c_str());
    in->config.plplCtx->cvxText = cvxText;
    cvxText->setBackColor(cvScalar(128, 33, 14));
    CvScalar font = cvScalar(40,1,0.2,1);
    cvxText->setFont(0, &font);
    return true;
}
@@ -178,11 +181,12 @@
    cv::putText(yMat, TXT, cv::Point(LTX, LTY), CV_FONT_HERSHEY_COMPLEX, 1, CV_RGB(Y, Y, Y));
    cv::putText(uvMat, TXT, cv::Point(MH_SUBSAMPLE1(LTX, 2), MH_SUBSAMPLE1(LTY, 2)), CV_FONT_HERSHEY_COMPLEX, 0.5, CV_RGB(UV, UV, UV));
}
bool plplDraw_WText_NV12(PLPLContext* plplCtx, MB_Frame* paintMb, int& paramOffset)
{
    int LTX = plplCtx->params[paramOffset + 0].val_i;
    int LTY = plplCtx->params[paramOffset + 1].val_i;
    const char* TXT = plplCtx->params[paramOffset + 2].val_s;
    const char* WTXT = plplCtx->params[paramOffset + 2].val_s;
    paramOffset += 3;
    int src_width = paintMb->width;
@@ -194,12 +198,23 @@
    // void rectangle(Mat& img, Point pt1, Point pt2, const Scalar& color, int thickness=1, int lineType=8, int shift=0)
    if (in->config.plplCtx->cvxText == nullptr)
    {
        CvxText* cvxText = new CvxText(in->config.fontPath.c_str());
        in->config.plplCtx->cvxText = cvxText;
        cvxText->setBackColor(cvScalar(128, 33, 14));
        CvScalar font = cvScalar(40, 1, 0.2, 1);
        cvxText->setFont(0, &font);
    }
    const uint16_t Y =  plplCtx->color_front.toY();
    const uint16_t UV = plplCtx->color_front.toUV();
    CvxText* cvText = (CvxText*)plplCtx->cvxText;
    cvText->putText(yMat, L"中文ABCDabcd", cv::Point(LTX, LTY), CV_RGB(Y, Y, Y));
    cvText->putText(uvMat, L"中文ABCDabcd", cv::Point(MH_SUBSAMPLE1(LTX, 2),MH_SUBSAMPLE1(LTY, 2)), CV_RGB(UV, UV, UV));
    cvText->putText(yMat, (const wchar_t*)WTXT, cv::Point(LTX, LTY), CV_RGB(Y, Y, Y)); // L"中文ABCDabcd"
    cvText->putText(uvMat, (const wchar_t*)WTXT, cv::Point(MH_SUBSAMPLE1(LTX, 2), MH_SUBSAMPLE1(LTY, 2)), CV_RGB(UV, UV, UV)); // L"中文ABCDabcd"
}
bool plplExecutor_YUV(PL_Paint_Internal *in)
{
    MB_Frame* paintMb = &(in->lastMbfBuffOrigin);
@@ -288,7 +303,7 @@
                break;
            case PLPLC_WTEXT:
                //TEXT LTX,LTY,"STR"
                //WTEXT LTX,LTY,"STR"
                if (paintMb->type == MB_Frame::MBFT_NV12)
                    ret = plplDraw_WText_NV12(plplCtx, paintMb, paramOffset);
                else
RtspFace/PL_Paint.h
@@ -23,6 +23,7 @@
    PLPLC_RECT,
    PLPLC_TEXT,
    PLPLC_WTEXT,
    PLPLC__LAST
};
@@ -42,8 +43,9 @@
    }
    PLPLType(const wchar_t* _val_s)
    {
        for (int i = 0; i < sizeof(val_s); i++)
            val_s[i] = _val_s[i];
        wchar_t* w_val_s = (wchar_t*)val_s;
        for (int i = 0; i < sizeof(val_s) / sizeof(wchar_t); i++)
            w_val_s[i] = _val_s[i];
    }
};
@@ -60,15 +62,12 @@
    int fill;
    PLGH_Pen pen;
    void* cvxText;
    PLPLContext() :
            cmds(), params(), color_front(), color_back(), fill(0), pen(0, 0), cvxText(nullptr)
    {}
    ~PLPLContext()
    {
        delete(cvxText);
        cvxText = nullptr;
    }
    ~PLPLContext();
};
struct PL_Paint_Config
@@ -78,7 +77,7 @@
    std::string fontPath;
    
    PL_Paint_Config() : 
        copyData(false), plplCtx(nullptr), fontPath()
        copyData(false), plplCtx(nullptr), fontPath(" ")
    { }
};
RtspFace/PL_Scale.cpp
@@ -2,7 +2,7 @@
#include "MaterialBuffer.h"
#include "logger.h"
#include <libyuv.h>
#include <android/native_window.h>
struct PL_Scale_Internal
{
    uint8_t* buffer;
@@ -168,7 +168,8 @@
            //#todo
            LOG_ERROR << "srcType only support MBFT_YUV420 and MBFT_NV12" << std::endl;
            return false;
        } else
        }
        else
        {
            LOG_ERROR << "srcType only support MBFT_YUV420 and MBFT_NV12" << std::endl;
            return false;
RtspFace/PL_Scale.h
@@ -5,7 +5,6 @@
struct PL_Scale_Config
{
    void* windowSurface;
    uint16_t toWidth;
    uint16_t toHeight;
    int filterMode; // libyuv/scale.h/FilterMode 
RtspFace/SensetimeFaceAPIWrapper/include/cv_common.h
File was deleted
RtspFace/SensetimeFaceAPIWrapper/include/cv_face.h
File was deleted
RtspFace/SensetimeFaceAPIWrapper/include/cv_utils.h
File was deleted
RtspFace/SensetimeFaceAPIWrapper/models/CLUSTERING_VERSION
File was deleted
RtspFace/SensetimeFaceAPIWrapper/models/VERIFY_VERSION
File was deleted
RtspFace/SensetimeFaceAPIWrapper/models/clustering.model
Binary files differ
RtspFace/SensetimeFaceAPIWrapper/models/verify.model
RtspFace/SensetimeFaceAPIWrapper/src/DBuntil.cpp
File was deleted
RtspFace/SensetimeFaceAPIWrapper/src/DBuntil.h
File was deleted
RtspFace/SensetimeFaceAPIWrapper/src/FaceDBPool.cpp
File was deleted
RtspFace/SensetimeFaceAPIWrapper/src/FaceDBPool.h
File was deleted
RtspFace/SensetimeFaceAPIWrapper/src/Makefile
File was deleted
RtspFace/SensetimeFaceAPIWrapper/src/db/DBuntil.cpp
File was deleted
RtspFace/SensetimeFaceAPIWrapper/src/db/DBuntil.h
File was deleted
RtspFace/SensetimeFaceAPIWrapper/src/db/Makefile
File was deleted
RtspFace/SensetimeFaceAPIWrapper/src/db/demo.cpp
File was deleted
RtspFace/SensetimeFaceAPIWrapper/src/db/main.cpp
File was deleted
RtspFace/SensetimeFaceAPIWrapper/src/db/run.sh
File was deleted
RtspFace/SensetimeFaceAPIWrapper/src/faceAPI.cpp
File was deleted
RtspFace/SensetimeFaceAPIWrapper/src/faceAPI.h
File was deleted
RtspFace/SensetimeFaceAPIWrapper/src/faceDB.cpp
File was deleted
RtspFace/SensetimeFaceAPIWrapper/src/faceDB.h
File was deleted
RtspFace/SensetimeFaceAPIWrapper/src/out.db
Binary files differ
RtspFace/SensetimeFaceAPIWrapper/src/run.sh
File was deleted
RtspFace/SensetimeFaceAPIWrapper/src/sample_face_track.cpp
File was deleted
RtspFace/SensetimeFaceAPIWrapper/src/test.cpp
File was deleted
RtspFace/SensetimeFaceAPIWrapper/src/time_helper.h
File was deleted
RtspFace/SensetimeFaceAPIWrapper/src/tools.cpp
File was deleted
RtspFace/SensetimeFaceAPIWrapper/src/tools.h
File was deleted