Newer
Older
PrismSoftware / ECTrainer2 / EyeTrack.cpp
#include "EyeTrack.h"
#include "ECTrainer.h"
#include "Marker.h"

#include <iostream>

// コンストラクタ
EyeTrack::EyeTrack(ECTrainer* pEct, Marker* pMarker)
	: BaseProcess(pEct)
	, _pMarker(pMarker)
	, _GazeV(-1, -1)
	, _GazeI(-1.F, -1.F)
{
}

// ループ
bool EyeTrack::MainLoop() {
	while (_pEct->IsRunning()) {
		if (_GazeV.x >= 0 && _GazeV.y >= 0) {
			_GazeI = _pMarker->ConvV2I(_GazeV);
		} else {
			_GazeI = cv::Point2f(-1.F, -1.F);
		}
		Sleep(1);
	}

	return true;
}