From 0bdc6483fc3cfdb0aa87df5b1326c86aacb46fa4 Mon Sep 17 00:00:00 2001 From: Brenno Date: Tue, 3 Nov 2020 19:45:17 -0300 Subject: [PATCH] Fixed CVTracker test --- tests/CVTracker_Tests.cpp | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/tests/CVTracker_Tests.cpp b/tests/CVTracker_Tests.cpp index 6fe6abf0..7a1dcb95 100644 --- a/tests/CVTracker_Tests.cpp +++ b/tests/CVTracker_Tests.cpp @@ -55,14 +55,11 @@ SUITE(CVTracker_Tests) c1.Open(); // Create tracker - CVTracker kcfTracker("{\"protobuf_data_path\": \"\", \"tracker_type\": \"KCF\", \"bbox\": {\"x\": 294, \"y\": 102, \"w\": 180, \"h\": 166}}", processingController); - + CVTracker kcfTracker("{\"protobuf_data_path\": \"\", \"tracker_type\": \"KCF\", \"bbox\": {\"x\": 294, \"y\": 102, \"w\": 180, \"h\": 166}, \"first_frame\": 0}", processingController); // Track clip for frames 0-20 kcfTracker.trackClip(c1, 0, 20, true); - // Get tracked data FrameData fd = kcfTracker.GetTrackedData(20); - float x = fd.x1; float y = fd.y1; float width = fd.x2 - x; @@ -88,7 +85,7 @@ SUITE(CVTracker_Tests) c1.Open(); // Create first tracker - CVTracker kcfTracker_1("{\"protobuf_data_path\": \"kcf_tracker.data\", \"tracker_type\": \"KCF\", \"bbox\": {\"x\": 294, \"y\": 102, \"w\": 180, \"h\": 166}}", processingController); + CVTracker kcfTracker_1("{\"protobuf_data_path\": \"kcf_tracker.data\", \"tracker_type\": \"KCF\", \"bbox\": {\"x\": 294, \"y\": 102, \"w\": 180, \"h\": 166}, \"first_frame\": 0}", processingController); // Track clip for frames 0-20 kcfTracker_1.trackClip(c1, 0, 20, true); @@ -105,7 +102,7 @@ SUITE(CVTracker_Tests) kcfTracker_1.SaveTrackedData(); // Create second tracker - CVTracker kcfTracker_2("{\"protobuf_data_path\": \"kcf_tracker.data\", \"tracker_type\": \"\", \"bbox\": {\"x\": -1, \"y\": -1, \"w\": -1, \"h\": -1}}", processingController); + CVTracker kcfTracker_2("{\"protobuf_data_path\": \"kcf_tracker.data\", \"tracker_type\": \"\", \"bbox\": {\"x\": -1, \"y\": -1, \"w\": -1, \"h\": -1}, \"first_frame\": 0}", processingController); // Load tracked data from first tracker protobuf data kcfTracker_2._LoadTrackedData();