Skip to content
Snippets Groups Projects
Commit 187950d1 authored by Erlend Sørhus's avatar Erlend Sørhus
Browse files

Removed cout's

parent 8644dd25
Branches
No related tags found
No related merge requests found
......@@ -71,8 +71,6 @@ int main(int argc, char** argv) {
int32_t height = decoder.get(CAP_PROP_FRAME_HEIGHT);
int32_t width = decoder.get(CAP_PROP_FRAME_WIDTH);
cout << motionVec.size() << endl;
bool gotFrame, gotNextFrame;
while (gotFrame = decoder.read(frame)) {
// Skips some amount of "real" frames to reach desired "simulated fps".
......@@ -94,14 +92,12 @@ int main(int argc, char** argv) {
motionVec.push_back(detectChange(medianBlurFrame, medianBlurNextFrame));
} else { break; }
}
cout << motionVec.size() << endl;
decoder.release();
// Detection interval padding logic; essentially applies 1D dilation (morphological operation).
int framesPaddedEachSide = ceil((paddingTime_s/2)*detectionsPerSec + 0.5);
vector<bool> dilated = motionVec;
cout << dilated.size() << endl;
for(int i=0; i<motionVec.size(); i++) {
if (motionVec.at(i) == 1) {
for(int k = -framesPaddedEachSide; k <= framesPaddedEachSide; k++) {
......@@ -131,6 +127,8 @@ int main(int argc, char** argv) {
}
}
csv.close();
auto end = chrono::steady_clock::now();
auto elapsed = chrono::duration_cast<chrono::seconds>(end - start).count();
int minutes = floor(elapsed/60);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment