#include "ECTrainer.h"
#include "ImageProc.h"
#include "SceneCamera.h"
#include "Marker.h"
// コンストラクタ
ImageProc::ImageProc(ECTrainer* pEct)
: BaseProcess(pEct)
, _OutputBuf(ECTrainer::RINGBUFSIZE) {
}
// ループ
bool ImageProc::MainLoop() {
while (_pEct->IsAppRun()) {
Sleep(0);
if (!_pEct->PSceneCamera()->IsNew()) continue;
cv::Mat img = _pEct->PSceneCamera()->GetImage().clone();
_pEct->PMarker()->Detect(img);
//_pEct->SetHomographyStatus(hOK);
_OutputBuf.Put(img);
}
return true;
}