From 0dff437a692a5f875dd0293c628ac9172f697c69 Mon Sep 17 00:00:00 2001
From: Joseph Redmon <pjreddie@gmail.com>
Date: Mon, 28 Mar 2016 02:10:10 +0000
Subject: [PATCH] fixed old

---
 src/coco_demo.c |    9 +++++++--
 1 files changed, 7 insertions(+), 2 deletions(-)

diff --git a/src/coco_demo.c b/src/coco_demo.c
index 6f4d501..c516f78 100644
--- a/src/coco_demo.c
+++ b/src/coco_demo.c
@@ -122,13 +122,18 @@
         det_s = in_s;
     }
 
+    int count = 0;
     while(1){
+        ++count;
         struct timeval tval_before, tval_after, tval_result;
         gettimeofday(&tval_before, NULL);
         if(pthread_create(&fetch_thread, 0, fetch_in_thread_coco, 0)) error("Thread creation failed");
         if(pthread_create(&detect_thread, 0, detect_in_thread_coco, 0)) error("Thread creation failed");
-        show_image(disp, "COCO");
-        //save_image(disp, "COCO");
+        //show_image(disp, "COCO");
+        char buff[256];
+        sprintf(buff, "/home/pjreddie/coco/coco_%05d", count);
+        save_image(disp, buff);
+
         free_image(disp);
         cvWaitKey(10);
         pthread_join(fetch_thread, 0);

--
Gitblit v1.10.0