#include "lfr.h" const int threshold_binary = 110; LFR::LFR() : iAmLooping(false), input(), processing(), controlModule(), interpreter(), intersectionHandler() { } LFR::~LFR() { if(iAmLooping) { this->endLoop(); } } void LFR::loop() { //while(iAmLooping) for(int i = 0; i < 3; i++) { Mat image = input.readWebcam(); processing.calculate_binaray(image, threshold_binary); imshow("Display window", image); waitKey(0); } } std::future LFR::startLoop() { iAmLooping = true; std::cout<<"Loop start\n"; return std::async(&LFR::loop, this); } void LFR::endLoop() { iAmLooping = false; std::cout<<"loop ende\n"; return; }