Fix eye vector being incorrect on hi res

This commit is contained in:
Epicalert 2021-06-07 18:57:50 +08:00
parent c777e08519
commit 26c11c414f
No known key found for this signature in database
GPG key ID: CAA46F858D0979BD

View file

@ -108,6 +108,6 @@ glm::vec2 eyeDirection(cv::Mat roi) {
// convert result to vector for graphics
return glm::vec2(
(irisPosition.x - roi.rows / 2.0) / (roi.rows / 2.0),
(irisPosition.y - roi.rows / 2.0) / (roi.rows / 2.0));
(irisPosition.x - eyeMat.rows / 2.0) / (eyeMat.rows / 2.0),
(irisPosition.y - eyeMat.rows / 2.0) / (eyeMat.rows / 2.0));
}