From d0cb21cf0a0376f3ba2d8156a53016d0e917e782 Mon Sep 17 00:00:00 2001 From: xamcaa Date: Wed, 19 Aug 2015 15:19:03 +0300 Subject: [PATCH 1/4] detector.cpp renamed --- apps/{detector.cpp => detector_Ilya.cpp} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename apps/{detector.cpp => detector_Ilya.cpp} (100%) diff --git a/apps/detector.cpp b/apps/detector_Ilya.cpp similarity index 100% rename from apps/detector.cpp rename to apps/detector_Ilya.cpp From e062aeef823488686ee38d90103162ed7ec7e307 Mon Sep 17 00:00:00 2001 From: xamcaa Date: Wed, 19 Aug 2015 15:25:35 +0300 Subject: [PATCH 2/4] renamed back --- apps/{detector_Ilya.cpp => detector.cpp} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename apps/{detector_Ilya.cpp => detector.cpp} (100%) diff --git a/apps/detector_Ilya.cpp b/apps/detector.cpp similarity index 100% rename from apps/detector_Ilya.cpp rename to apps/detector.cpp From 0381253f5e8b09b11b5cd1ee9ecf990dbdfb0f9d Mon Sep 17 00:00:00 2001 From: xamcaa Date: Wed, 19 Aug 2015 15:43:02 +0300 Subject: [PATCH 3/4] Detector load was added. --- apps/detector.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/apps/detector.cpp b/apps/detector.cpp index 27c1021..a2f4535 100644 --- a/apps/detector.cpp +++ b/apps/detector.cpp @@ -50,6 +50,10 @@ int main(int argc, char** argv) bool use_camera = parser.get("camera"); // TODO: Load detector. + CascadeClassifier detector; + if(!detector.load(detector_file)){ + cout<<"bad detector file name"< Date: Wed, 19 Aug 2015 16:12:29 +0300 Subject: [PATCH 4/4] Detecting objects on image was added. --- apps/detector.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/apps/detector.cpp b/apps/detector.cpp index a2f4535..ad6fba5 100644 --- a/apps/detector.cpp +++ b/apps/detector.cpp @@ -57,6 +57,11 @@ int main(int argc, char** argv) if (!image_file.empty()) { + Mat m; + m=imread(image_file); + vector result; + detector.detectMultiScale(m,result); + std::cout<