From b544cef503b39f0552c932a194438a6556c6f5b7 Mon Sep 17 00:00:00 2001 From: Austin Blanton Date: Mon, 29 Jul 2013 12:00:02 -0400 Subject: [PATCH] Incomplete OF transform --- openbr/plugins/opticalflow.cpp | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+), 0 deletions(-) create mode 100644 openbr/plugins/opticalflow.cpp diff --git a/openbr/plugins/opticalflow.cpp b/openbr/plugins/opticalflow.cpp new file mode 100644 index 0000000..99ed6e1 --- /dev/null +++ b/openbr/plugins/opticalflow.cpp @@ -0,0 +1,27 @@ +#include +#include "openbr_internal.h" + +using namespace cv; + +namespace br +{ + +class OpticalFlowTransform : public UntrainableTransform +{ + Q_OBJECT + Q_PROPERTY(QDouble pyr_scale READ get_pyr_scale WRITE set_pyr_scale RESET reset_pyr_scale STORE false) + BR_PROPERTY(double, pyr_scale, 0.5) + Q_PROPERTY(QString pyr_scale READ get_pyr_scale WRITE set_pyr_scale RESET reset_pyr_scale STORE false) + BR_PROPERTY(double, pyr_scale, 0.5) + + void project(const Template &src, Template &dst) const + { + // get the two images + // these were the best parameters on KTH + calcOpticalFlowFarneback(prevImg, nextImg, dst, 0.1, 1, 5, 10, 7, 1.1, 0); + } +} + +} // namespace br + +#include -- libgit2 0.21.4