#28,不说这么难的,来个简单的吧。
我刚才有看了一下 OpenCV DNN 调用 OpenPose 识别人体的代码,(
https://github.com/opencv/opencv/blob/master/samples/dnn/openpose.cpp ),目前 OpenCV 官方例子还没有使用 OpenPose 做面部识别的代码。
```c++
// connection table, in the format [model_id][pair_id][from/to]
// please look at the nice explanation at the bottom of:
//
https://github.com/CMU-Perceptual-Computing-Lab/openpose/blob/master/doc/output.mdconst int POSE_PAIRS[3][20][2] = {
{ // COCO body
{1,2}, {1,5}, {2,3},
{3,4}, {5,6}, {6,7},
{1,8}, {8,9}, {9,10},
{1,11}, {11,12}, {12,13},
{1,0}, {0,14},
{14,16}, {0,15}, {15,17}
},
{ // MPI body
{0,1}, {1,2}, {2,3},
{3,4}, {1,5}, {5,6},
{6,7}, {1,14}, {14,8}, {8,9},
{9,10}, {14,11}, {11,12}, {12,13}
},
{ // hand
{0,1}, {1,2}, {2,3}, {3,4}, // thumb
{0,5}, {5,6}, {6,7}, {7,8}, // pinkie
{0,9}, {9,10}, {10,11}, {11,12}, // middle
{0,13}, {13,14}, {14,15}, {15,16}, // ring
{0,17}, {17,18}, {18,19}, {19,20} // small
}};
```
没有官方参考,你能编写代码使用 OpenPose 来做面部识别么?(我博客里有,没贴代码)