summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorStanislaw Halik <sthalik@misaki.pl>2017-12-21 02:25:11 +0100
committerStanislaw Halik <sthalik@misaki.pl>2017-12-21 02:25:11 +0100
commitf6d672bc21b973e4ce1cf2d93486bf5d6369b4f9 (patch)
tree42e4e1fe8373ee4086663921ac37d1c09629e384
parent62564a1cb38951b74934507af2a0ffc6755c41ad (diff)
tracker/pt: default to natural grayscaling
It's the most optimized opencv version.
-rw-r--r--tracker-pt/ftnoir_tracker_pt_settings.h5
-rw-r--r--tracker-pt/point_extractor.cpp6
2 files changed, 6 insertions, 5 deletions
diff --git a/tracker-pt/ftnoir_tracker_pt_settings.h b/tracker-pt/ftnoir_tracker_pt_settings.h
index 3602674f..71b98fc2 100644
--- a/tracker-pt/ftnoir_tracker_pt_settings.h
+++ b/tracker-pt/ftnoir_tracker_pt_settings.h
@@ -75,7 +75,8 @@ struct settings_pt : opts
dynamic_pose(b, "dynamic-pose-resolution", true),
init_phase_timeout(b, "init-phase-timeout", 250),
auto_threshold(b, "automatic-threshold", true),
- blob_color(b, "blob-color", pt_color_average),
+ blob_color(b, "blob-color", pt_color_natural),
threshold_slider(b, "threshold-slider", slider_value(128, 0, 255))
- {}
+ {
+ }
};
diff --git a/tracker-pt/point_extractor.cpp b/tracker-pt/point_extractor.cpp
index 100f9c75..64fce324 100644
--- a/tracker-pt/point_extractor.cpp
+++ b/tracker-pt/point_extractor.cpp
@@ -136,9 +136,6 @@ void PointExtractor::color_to_grayscale(const cv::Mat& frame, cv::Mat1b& output)
extract_single_channel(frame, 2, output);
break;
}
- default:
- once_only(qDebug() << "wrong pt_color_type enum value" << int(s.blob_color));
- /*FALLTHROUGH*/
case pt_color_average:
{
const int W = frame.cols, H = frame.rows;
@@ -147,6 +144,9 @@ void PointExtractor::color_to_grayscale(const cv::Mat& frame, cv::Mat1b& output)
cv::reduce(tmp, output_, 1, cv::REDUCE_AVG);
break;
}
+ default:
+ once_only(qDebug() << "wrong pt_color_type enum value" << int(s.blob_color));
+ /*FALLTHROUGH*/
case pt_color_natural:
cv::cvtColor(frame, output, cv::COLOR_BGR2GRAY);
break;