void Eyetracker::emitNewPoint(cv::Point2d point) { if(std::isnan(point.x) || std::isnan(point.y)) { point.x = m_previousPoint.x; point.y = m_previousPoint.y; } const cv::Point2d smoothed = m_smoother->filter(point); m_previousPoint = smoothed; const QPointF ret(smoothed.x, smoothed.y); qDebug() << "pos:" << ret; emit gazeData(ret); }
void Eyetracker::emitNewPoint(cv::Point2d point, double timestamp) { bool eyeDetected = true; if(std::isnan(point.x) || std::isnan(point.y)) { eyeDetected = false; point.x = m_previousPoint.x; point.y = m_previousPoint.y; } const cv::Point2d smoothed(m_smoother->filter(point)); m_previousPoint = smoothed; const QPointF ret(smoothed.x, smoothed.y); // qDebug() << "pos:" << ret; emit gazeData(eyeDetected, ret, timestamp); }