Skip to content

Commit

Permalink
Merge pull request #84 from JoHeinrich/adjust_detection_params
Browse files Browse the repository at this point in the history
readjusted detection params
  • Loading branch information
nilshae authored Jun 21, 2016
2 parents 7f4fca2 + 0ed09ca commit ebaa678
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
12 changes: 6 additions & 6 deletions src/ObjectDetection/detection.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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();
}

Expand Down Expand Up @@ -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;
}
2 changes: 1 addition & 1 deletion src/ObjectDetection/hog_people_detector.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ HOGPeopleDetector::HOGPeopleDetector() {
std::vector<cv::Rect> HOGPeopleDetector::Detect(cv::Mat *frame) {

std::vector<cv::Rect> 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;
}

0 comments on commit ebaa678

Please sign in to comment.