From 0ed09ca9b63c8278d40b86249e93e55f3fd39466 Mon Sep 17 00:00:00 2001 From: nilshae Date: Tue, 21 Jun 2016 21:08:50 +0200 Subject: [PATCH] readjusted detection params --- src/ObjectDetection/detection.cpp | 12 ++++++------ src/ObjectDetection/hog_people_detector.cpp | 2 +- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/src/ObjectDetection/detection.cpp b/src/ObjectDetection/detection.cpp index 12300b1..3855e88 100644 --- a/src/ObjectDetection/detection.cpp +++ b/src/ObjectDetection/detection.cpp @@ -28,10 +28,10 @@ using namespace std; using namespace cv; -Detection::Detection(Detector * peopleDetector, Detector * vehicleDetector) { +Detection::Detection(Detector * people_detector, Detector * vehicle_detector) { - people_detector_ = peopleDetector; - vehicle_detector_ = vehicleDetector; + people_detector_ = people_detector; + vehicle_detector_ = vehicle_detector; image_view_ = new ImageView(); } @@ -106,7 +106,7 @@ Mat Detection::ResizeFrame(Mat *frame) { //0.3125 is used because the test video is 1280 x 720, so the width resized images is 400px this has to be changed to our image size (best would be no hard coded scaling so other images sizes work too!) // TODO: dynamic risizeing depending on input (min width 400px) - Mat resizedFrame; - resize(*frame, resizedFrame, Size(0, 0), 0.3125, 0.3125, CV_INTER_AREA); - return resizedFrame; + Mat resized_frame; + resize(*frame, resized_frame, Size(0, 0), 0.3125, 0.3125, CV_INTER_AREA); + return resized_frame; } diff --git a/src/ObjectDetection/hog_people_detector.cpp b/src/ObjectDetection/hog_people_detector.cpp index b9286ec..a8b5150 100644 --- a/src/ObjectDetection/hog_people_detector.cpp +++ b/src/ObjectDetection/hog_people_detector.cpp @@ -30,7 +30,7 @@ HOGPeopleDetector::HOGPeopleDetector() { std::vector HOGPeopleDetector::Detect(cv::Mat *frame) { std::vector detectedPeople; - hog_descriptor_.detectMultiScale(*frame, detectedPeople, 0, cv::Size(4,4), cv::Size(16,16), 1.03, 0); + hog_descriptor_.detectMultiScale(*frame, detectedPeople, 0, cv::Size(4,4), cv::Size(16,16), 1.04, 0); return detectedPeople; }