Some renaming
This commit is contained in:
parent
8adac8b915
commit
603c6ea61b
2 changed files with 16 additions and 16 deletions
|
@ -258,7 +258,7 @@ public:
|
|||
|
||||
void AddNextFrame(OpenCVWrappers::RawImage^ frame, CppInterop::LandmarkDetector::CLNF^ clnf, double fx, double fy, double cx, double cy, bool online, bool vis_hog, bool vis_tracked) {
|
||||
|
||||
face_analyser->AddNextFrame(frame->Mat, *clnf->getCLM(), 0, online, vis_hog);
|
||||
face_analyser->AddNextFrame(frame->Mat, *clnf->getCLNF(), 0, online, vis_hog);
|
||||
|
||||
face_analyser->GetLatestHOG(*hog_features, *num_rows, *num_cols);
|
||||
|
||||
|
@ -290,29 +290,29 @@ public:
|
|||
}
|
||||
|
||||
// After the AUs have been detected do some gaze estimation as well
|
||||
FaceAnalysis::EstimateGaze(*clnf->getCLM(), *gazeDirection0, fx, fy, cx, cy, true);
|
||||
FaceAnalysis::EstimateGaze(*clnf->getCLM(), *gazeDirection1, fx, fy, cx, cy, false);
|
||||
FaceAnalysis::EstimateGaze(*clnf->getCLNF(), *gazeDirection0, fx, fy, cx, cy, true);
|
||||
FaceAnalysis::EstimateGaze(*clnf->getCLNF(), *gazeDirection1, fx, fy, cx, cy, false);
|
||||
|
||||
// Grab pupil locations
|
||||
int part_left = -1;
|
||||
int part_right = -1;
|
||||
for (size_t i = 0; i < clnf->getCLM()->hierarchical_models.size(); ++i)
|
||||
for (size_t i = 0; i < clnf->getCLNF()->hierarchical_models.size(); ++i)
|
||||
{
|
||||
if (clnf->getCLM()->hierarchical_model_names[i].compare("left_eye_28") == 0)
|
||||
if (clnf->getCLNF()->hierarchical_model_names[i].compare("left_eye_28") == 0)
|
||||
{
|
||||
part_left = i;
|
||||
}
|
||||
if (clnf->getCLM()->hierarchical_model_names[i].compare("right_eye_28") == 0)
|
||||
if (clnf->getCLNF()->hierarchical_model_names[i].compare("right_eye_28") == 0)
|
||||
{
|
||||
part_right = i;
|
||||
}
|
||||
}
|
||||
|
||||
cv::Mat_<double> eyeLdmks3d_left = clnf->getCLM()->hierarchical_models[part_left].GetShape(fx, fy, cx, cy);
|
||||
cv::Mat_<double> eyeLdmks3d_left = clnf->getCLNF()->hierarchical_models[part_left].GetShape(fx, fy, cx, cy);
|
||||
cv::Point3f pupil_left_h = FaceAnalysis::GetPupilPosition(eyeLdmks3d_left);
|
||||
pupil_left->x = pupil_left_h.x; pupil_left->y = pupil_left_h.y; pupil_left->z = pupil_left_h.z;
|
||||
|
||||
cv::Mat_<double> eyeLdmks3d_right = clnf->getCLM()->hierarchical_models[part_right].GetShape(fx, fy, cx, cy);
|
||||
cv::Mat_<double> eyeLdmks3d_right = clnf->getCLNF()->hierarchical_models[part_right].GetShape(fx, fy, cx, cy);
|
||||
cv::Point3f pupil_right_h = FaceAnalysis::GetPupilPosition(eyeLdmks3d_right);
|
||||
pupil_right->x = pupil_right_h.x; pupil_right->y = pupil_right_h.y; pupil_right->z = pupil_right_h.z;
|
||||
}
|
||||
|
|
|
@ -184,7 +184,7 @@ namespace CppInterop {
|
|||
delete clnf;
|
||||
}
|
||||
|
||||
::LandmarkDetector::CLNF* getCLM() {
|
||||
::LandmarkDetector::CLNF* getCLNF() {
|
||||
return clnf;
|
||||
}
|
||||
|
||||
|
@ -202,15 +202,15 @@ namespace CppInterop {
|
|||
return clnf->detection_certainty;
|
||||
}
|
||||
|
||||
bool DetectLandmarksInVideo(OpenCVWrappers::RawImage^ image, FaceModelParameters^ clmParams) {
|
||||
return ::LandmarkDetector::DetectLandmarksInVideo(image->Mat, *clnf, *clmParams->getParams());
|
||||
bool DetectLandmarksInVideo(OpenCVWrappers::RawImage^ image, FaceModelParameters^ modelParams) {
|
||||
return ::LandmarkDetector::DetectLandmarksInVideo(image->Mat, *clnf, *modelParams->getParams());
|
||||
}
|
||||
|
||||
bool DetectFaceLandmarksInImage(OpenCVWrappers::RawImage^ image, FaceModelParameters^ clmParams) {
|
||||
return ::LandmarkDetector::DetectLandmarksInImage(image->Mat, *clnf, *clmParams->getParams());
|
||||
bool DetectFaceLandmarksInImage(OpenCVWrappers::RawImage^ image, FaceModelParameters^ modelParams) {
|
||||
return ::LandmarkDetector::DetectLandmarksInImage(image->Mat, *clnf, *modelParams->getParams());
|
||||
}
|
||||
|
||||
System::Collections::Generic::List<System::Collections::Generic::List<System::Tuple<double,double>^>^>^ DetectMultiFaceLandmarksInImage(OpenCVWrappers::RawImage^ image, FaceModelParameters^ clmParams) {
|
||||
System::Collections::Generic::List<System::Collections::Generic::List<System::Tuple<double,double>^>^>^ DetectMultiFaceLandmarksInImage(OpenCVWrappers::RawImage^ image, FaceModelParameters^ modelParams) {
|
||||
|
||||
auto all_landmarks = gcnew System::Collections::Generic::List<System::Collections::Generic::List<System::Tuple<double,double>^>^>();
|
||||
|
||||
|
@ -231,7 +231,7 @@ namespace CppInterop {
|
|||
{
|
||||
cv::Mat depth;
|
||||
// if there are multiple detections go through them
|
||||
bool success = ::LandmarkDetector::DetectLandmarksInImage(image->Mat, depth, face_detections[face], *clnf, *clmParams->getParams());
|
||||
bool success = ::LandmarkDetector::DetectLandmarksInImage(image->Mat, depth, face_detections[face], *clnf, *modelParams->getParams());
|
||||
|
||||
auto landmarks_curr = gcnew System::Collections::Generic::List<System::Tuple<double,double>^>();
|
||||
if(clnf->detected_landmarks.cols == 1)
|
||||
|
@ -301,7 +301,7 @@ namespace CppInterop {
|
|||
}
|
||||
|
||||
|
||||
// Static functions from the CLMTracker namespace.
|
||||
// Static functions from the LandmarkDetector namespace.
|
||||
void DrawLandmarks(OpenCVWrappers::RawImage^ img, System::Collections::Generic::List<System::Windows::Point>^ landmarks) {
|
||||
|
||||
vector<cv::Point> vecLandmarks;
|
||||
|
|
Loading…
Reference in a new issue