Skip to content

Commit

Permalink
Merge pull request #56 from colombraf/iron_fixEyesThread
Browse files Browse the repository at this point in the history
Small fix on how the eyes are displayed
  • Loading branch information
elandini84 authored Feb 23, 2024
2 parents 4372843 + 82db590 commit 3fc7db0
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 3fc7db0

Please sign in to comment.