| | |
| | | in->config.point_size_config = CV_DETECT_ENABLE_ALIGN_106;
|
| | | else
|
| | | {
|
| | | LOG(ERROR) << "alignment point size must be 21 or 106";
|
| | | LOG_ERROR << "alignment point size must be 21 or 106";
|
| | | return false;
|
| | | }
|
| | |
|
| | |
| | | in->config.point_size_config | CV_FACE_TRACKING_TWO_THREAD);
|
| | | if (cv_result != CV_OK)
|
| | | {
|
| | | LOG(ERROR) << "cv_face_create_tracker failed, error code" << cv_result;
|
| | | LOG_ERROR << "cv_face_create_tracker failed, error code" << cv_result;
|
| | | return false;
|
| | | }
|
| | |
|
| | |
| | | cv_result = cv_face_track_set_detect_face_cnt_limit(in->handle_track, in->config.detect_face_cnt_limit, &val);
|
| | | if (cv_result != CV_OK)
|
| | | {
|
| | | LOG(ERROR) << "cv_face_track_set_detect_face_cnt_limit failed, error : " << cv_result;
|
| | | LOG_ERROR << "cv_face_track_set_detect_face_cnt_limit failed, error : " << cv_result;
|
| | | return false;
|
| | | }
|
| | | else
|
| | | LOG(ERROR) << "detect face count limit : " << val;
|
| | | LOG_ERROR << "detect face count limit : " << val;
|
| | |
|
| | | return true;
|
| | | }
|
| | |
| | | CV_FACE_UP, &p_face, &face_count);
|
| | | if (cv_result != CV_OK)
|
| | | {
|
| | | LOG(ERROR) << "cv_face_track failed, error : " << cv_result;
|
| | | LOG_ERROR << "cv_face_track failed, error : " << cv_result;
|
| | | cv_face_release_tracker_result(p_face, face_count);
|
| | | return -1;
|
| | | }
|
| | |
| | | cv::Mat yMat(cv::Size(1920,1080), CV_8UC1, buffer);
|
| | | for (int i = 0; i < face_count; i++)
|
| | | {
|
| | | LOGP(DEBUG, "face: %d-----[%d, %d, %d, %d]-----id: %d\n", i,
|
| | | LOGP(DEBUG, "face: %d-----[%d, %d, %d, %d]-----id: %d", i,
|
| | | p_face[i].rect.left, p_face[i].rect.top,
|
| | | p_face[i].rect.right, p_face[i].rect.bottom, p_face[i].ID);
|
| | |
|
| | | LOGP(DEBUG, "face pose: [yaw: %.2f, pitch: %.2f, roll: %.2f, eye distance: %.2f]\n",
|
| | | LOGP(DEBUG, "face pose: [yaw: %.2f, pitch: %.2f, roll: %.2f, eye distance: %.2f]",
|
| | | p_face[i].yaw,
|
| | | p_face[i].pitch, p_face[i].roll, p_face[i].eye_dist);
|
| | |
|
| | |
| | |
|
| | | if (pm.type != PipeMaterial::PMT_FRAME)
|
| | | {
|
| | | LOG(ERROR) << "PL_H264Encoder::pay only support PMT_FRAME";
|
| | | LOG_ERROR << "PL_H264Encoder::pay only support PMT_FRAME";
|
| | | return false;
|
| | | }
|
| | |
|
| | |
| | | MB_Frame* frame = (MB_Frame*)pm.buffer;
|
| | | if (frame->type != MB_Frame::MBFT_YUV420)
|
| | | {
|
| | | LOG(ERROR) << "PL_H264Encoder::pay only support MBFT_YUV420";
|
| | | LOG_ERROR << "PL_H264Encoder::pay only support MBFT_YUV420";
|
| | | return false;
|
| | | }
|
| | |
|