diff --git a/methods/Method_I.cpp b/methods/Method_I.cpp index ff96188f99e4fa1c3d300154d23c0ebdc6bc5cfd..b2a1f4a7d05a90e731ff4975eced8452c3db93d6 100644 --- a/methods/Method_I.cpp +++ b/methods/Method_I.cpp @@ -138,6 +138,11 @@ bool Method_I::Process(const PedData& peddata,const fs::path& scriptsLocation, c vector<double> YInFrame = peddata.GetYInFrame(frameNr, ids, zPos_measureArea); vector<double> ZInFrame = peddata.GetZInFrame(frameNr, ids, zPos_measureArea); vector<double> VInFrame = peddata.GetVInFrame(frameNr, ids, zPos_measureArea); + if(XInFrame.size() == 0) + { + Log->Write("Warning:\t no pedestrians in frame <%d>", frameNr); + continue; + } //vector int to_remove //------------------------------Remove peds outside geometry------------------------------------------ for( int i=0;i<(int)IdInFrame.size();i++)