Skip to content

Commit

Permalink
right eye is flipped on the vertic axis wrt
Browse files Browse the repository at this point in the history
  • Loading branch information
colombraf committed Feb 5, 2024
1 parent 4372843 commit 82db590
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions aux_modules/faceExpression/eyesThread.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,9 @@ bool EyesThread::threadInit()

// Copy eyes
((Mat)blinkEye[indexes[0]]).copyTo(faceRest(cv::Rect(leftEye_x, leftEye_y, eyeWidth, eyeHeight)));
((Mat)blinkEye[indexes[0]]).copyTo(faceRest(cv::Rect(rightEye_x, rightEye_y, eyeWidth, eyeHeight)));
cv::Mat flippedEye;
cv::flip(blinkEye[indexes[index]], flippedEye, 1); // flipping the right eye on its vertical axis
flippedEye.copyTo(faceRest(cv::Rect(rightEye_x, rightEye_y, eyeWidth, eyeHeight)));
// Add nose
noseBar.copyTo(faceRest(cv::Rect(noseBar0_x, noseBar0_y, noseBar.cols, noseBar.rows)));

Expand Down Expand Up @@ -188,7 +190,9 @@ bool EyesThread::updateBlink(int index)

// Copy eyes
((Mat)blinkEye[indexes[index]]).copyTo(m_face(cv::Rect(leftEye_x, leftEye_y, eyeWidth, eyeHeight)));
((Mat)blinkEye[indexes[index]]).copyTo(m_face(cv::Rect(rightEye_x, rightEye_y, eyeWidth, eyeHeight)));
cv::Mat flippedEye;
cv::flip(blinkEye[indexes[index]], flippedEye, 1); // flipping the right eye on its vertical axis
flippedEye.copyTo(m_face(cv::Rect(rightEye_x, rightEye_y, eyeWidth, eyeHeight)));

// Add nose
noseBar.copyTo(m_face(cv::Rect(noseBar0_x, noseBar0_y, noseBar.cols, noseBar.rows)));
Expand Down

0 comments on commit 82db590

Please sign in to comment.