diff --git a/openbr/core/cluster.cpp b/openbr/core/cluster.cpp index 9657a70..9b3beda 100644 --- a/openbr/core/cluster.cpp +++ b/openbr/core/cluster.cpp @@ -21,6 +21,7 @@ #include #include #include +#include #include "openbr/core/bee.h" #include "openbr/core/cluster.h" diff --git a/openbr/core/opencvutils.cpp b/openbr/core/opencvutils.cpp index 48e08e8..133fe0f 100644 --- a/openbr/core/opencvutils.cpp +++ b/openbr/core/opencvutils.cpp @@ -15,7 +15,9 @@ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ #include +#include #include +#include #include #include "opencvutils.h" diff --git a/openbr/core/opencvutils.h b/openbr/core/opencvutils.h index 283aada..64f01e6 100644 --- a/openbr/core/opencvutils.h +++ b/openbr/core/opencvutils.h @@ -22,6 +22,7 @@ #include #include #include +#include namespace OpenCVUtils { diff --git a/openbr/gui/tail.cpp b/openbr/gui/tail.cpp index 13afff2..e544dfe 100644 --- a/openbr/gui/tail.cpp +++ b/openbr/gui/tail.cpp @@ -1,6 +1,7 @@ #include #include "tail.h" +#include using namespace br; diff --git a/openbr/gui/utility.cpp b/openbr/gui/utility.cpp index ff30e33..0d02909 100644 --- a/openbr/gui/utility.cpp +++ b/openbr/gui/utility.cpp @@ -1,7 +1,9 @@ #include #include #include +#include #include +#include using namespace cv; diff --git a/openbr/openbr.cpp b/openbr/openbr.cpp index 13c648f..9aa8a7d 100644 --- a/openbr/openbr.cpp +++ b/openbr/openbr.cpp @@ -24,6 +24,7 @@ #include "core/qtutils.h" #include "plugins/openbr_internal.h" #include +#include using namespace br; @@ -353,17 +354,6 @@ void br_set_filename(br_template tmpl, const char *filename) t->file.name = filename; } -const char* br_get_metadata_string(br_template tmpl, const char *key) -{ - Template *t = reinterpret_cast(tmpl); - // need an object outside of this scope - // so the char pointer is valid - static QByteArray result; - QVariant qvar = t->file.value(key); - result = QtUtils::toString(qvar).toUtf8(); - return result.data(); -} - br_template_list br_enroll_template(br_template tmpl) { Template *t = reinterpret_cast(tmpl); diff --git a/openbr/plugins/cascade.cpp b/openbr/plugins/cascade.cpp index 2abb3c6..66c3b7e 100644 --- a/openbr/plugins/cascade.cpp +++ b/openbr/plugins/cascade.cpp @@ -15,6 +15,7 @@ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ #include +//#include #include "openbr_internal.h" #include "openbr/core/opencvutils.h" #include "openbr/core/resource.h" @@ -86,11 +87,11 @@ class CascadeTransform : public UntrainableMetaTransform for (int i=0; i rects; - vector rejectLevels; - vector levelWeights; - if (ROCMode) cascade->detectMultiScale(m, rects, rejectLevels, levelWeights, 1.2, 5, (enrollAll ? 0 : CV_HAAR_FIND_BIGGEST_OBJECT) | CV_HAAR_SCALE_IMAGE, Size(minSize, minSize), Size(), true); - else cascade->detectMultiScale(m, rects, 1.2, 5, enrollAll ? 0 : CV_HAAR_FIND_BIGGEST_OBJECT, Size(minSize, minSize)); + std::vector rects; + std::vector rejectLevels; + std::vector levelWeights; + if (ROCMode) cascade->detectMultiScale(m, rects, rejectLevels, levelWeights, 1.2, 5, (enrollAll ? 0 : CV_HAAR_FIND_BIGGEST_OBJECT) | CASCADE_SCALE_IMAGE, Size(minSize, minSize), Size(), true); + else cascade->detectMultiScale(m, rects, 1.2, 5, enrollAll ? 0 : CASCADE_FIND_BIGGEST_OBJECT, Size(minSize, minSize)); if (!enrollAll && rects.empty()) rects.push_back(Rect(0, 0, m.cols, m.rows)); diff --git a/openbr/plugins/cvt.cpp b/openbr/plugins/cvt.cpp index a0b12e2..fec04fd 100644 --- a/openbr/plugins/cvt.cpp +++ b/openbr/plugins/cvt.cpp @@ -14,6 +14,7 @@ * limitations under the License. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ +#include #include #include "openbr_internal.h" #include "openbr/core/opencvutils.h" diff --git a/openbr/plugins/distance.cpp b/openbr/plugins/distance.cpp index 7cf6bfd..c36560e 100644 --- a/openbr/plugins/distance.cpp +++ b/openbr/plugins/distance.cpp @@ -18,6 +18,7 @@ #include #include #include +#include #include "openbr_internal.h" #include "openbr/core/distance_sse.h" diff --git a/openbr/plugins/draw.cpp b/openbr/plugins/draw.cpp index 3057b8a..6bee4fc 100644 --- a/openbr/plugins/draw.cpp +++ b/openbr/plugins/draw.cpp @@ -15,6 +15,7 @@ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ #include +#include #include #include #include "openbr_internal.h" diff --git a/openbr/plugins/eyes.cpp b/openbr/plugins/eyes.cpp index cdef8df..5d3929d 100644 --- a/openbr/plugins/eyes.cpp +++ b/openbr/plugins/eyes.cpp @@ -34,6 +34,7 @@ */ #include +#include #include "openbr_internal.h" #include "openbr/core/opencvutils.h" diff --git a/openbr/plugins/format.cpp b/openbr/plugins/format.cpp index aad33e8..f4baf13 100644 --- a/openbr/plugins/format.cpp +++ b/openbr/plugins/format.cpp @@ -20,6 +20,7 @@ #include #endif // BR_EMBEDDED #include +#include #include "openbr_internal.h" #include "openbr/core/bee.h" diff --git a/openbr/plugins/gui.cpp b/openbr/plugins/gui.cpp index d3af3b2..9c63dd9 100644 --- a/openbr/plugins/gui.cpp +++ b/openbr/plugins/gui.cpp @@ -12,6 +12,7 @@ #include #include +#include #include "openbr_internal.h" using namespace cv; diff --git a/openbr/plugins/hist.cpp b/openbr/plugins/hist.cpp index 6fc3bb9..d9f0a05 100644 --- a/openbr/plugins/hist.cpp +++ b/openbr/plugins/hist.cpp @@ -94,7 +94,7 @@ class BinTransform : public UntrainableTransform } else if (channels == 2) { // If there are two channels, the first is channel is assumed to be a weight vector // and the second channel contains the vectors we would like to bin. - vector mv; + std::vector mv; cv::split(src, mv); weights = mv[0]; weights.convertTo(weights, CV_32F); diff --git a/openbr/plugins/integral.cpp b/openbr/plugins/integral.cpp index bb42b4a..f6117a0 100644 --- a/openbr/plugins/integral.cpp +++ b/openbr/plugins/integral.cpp @@ -1,4 +1,5 @@ #include +#include #include #include "openbr_internal.h" @@ -293,7 +294,7 @@ private: Sobel(src, dx, CV_32F, 1, 0, CV_SCHARR); Sobel(src, dy, CV_32F, 0, 1, CV_SCHARR); cartToPolar(dx, dy, magnitude, angle, true); - vector mv; + std::vector mv; if ((channel == Magnitude) || (channel == MagnitudeAndAngle)) { const float theoreticalMaxMagnitude = sqrt(2*pow(float(2*(3+10+3)*255), 2.f)); mv.push_back(magnitude / theoreticalMaxMagnitude); diff --git a/openbr/plugins/lbp.cpp b/openbr/plugins/lbp.cpp index 40e972e..b295286 100644 --- a/openbr/plugins/lbp.cpp +++ b/openbr/plugins/lbp.cpp @@ -15,7 +15,9 @@ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ #include +#include #include +#include #include #include "openbr_internal.h" diff --git a/openbr/plugins/ltp.cpp b/openbr/plugins/ltp.cpp index 984987f..df34070 100644 --- a/openbr/plugins/ltp.cpp +++ b/openbr/plugins/ltp.cpp @@ -15,6 +15,7 @@ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ #include +#include #include #include "openbr_internal.h" diff --git a/openbr/plugins/mask.cpp b/openbr/plugins/mask.cpp index 3019934..14689a7 100644 --- a/openbr/plugins/mask.cpp +++ b/openbr/plugins/mask.cpp @@ -15,6 +15,7 @@ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ #include +#include #include "openbr_internal.h" using namespace cv; @@ -164,7 +165,10 @@ class LargestConvexAreaTransform : public UntrainableTransform void project(const Template &src, Template &dst) const { std::vector< std::vector > contours; + // TODO: Fix, src.clone is a br_template not opencv array + /* findContours(src.clone(), contours, CV_RETR_EXTERNAL, CV_CHAIN_APPROX_SIMPLE); + */ double maxArea = 0; foreach (const std::vector &contour, contours) { std::vector hull; diff --git a/openbr/plugins/motion.cpp b/openbr/plugins/motion.cpp index d746527..f21cb5f 100644 --- a/openbr/plugins/motion.cpp +++ b/openbr/plugins/motion.cpp @@ -62,7 +62,8 @@ class SubtractBackgroundTransform : public TimeVaryingTransform { Q_OBJECT - BackgroundSubtractorMOG2 mog; + // TODO: This is broken. + // BackgroundSubtractorMOG2 mog; public: SubtractBackgroundTransform() : TimeVaryingTransform(false, false) {} @@ -72,7 +73,8 @@ private: { dst = src; Mat mask; - mog(src, mask); + // TODO: broken + // mog(src, mask); erode(mask, mask, Mat()); dilate(mask, mask, Mat()); dst.file.set("Mask", QVariant::fromValue(mask)); @@ -86,7 +88,8 @@ private: void finalize(TemplateList &output) { (void) output; - mog = BackgroundSubtractorMOG2(); + // TODO: Broken + // mog = BackgroundSubtractorMOG2(); } }; diff --git a/openbr/plugins/normalize.cpp b/openbr/plugins/normalize.cpp index 842e952..75e8c6f 100644 --- a/openbr/plugins/normalize.cpp +++ b/openbr/plugins/normalize.cpp @@ -132,7 +132,7 @@ private: const QList labels = data.indexProperty(inputVariable); const int dims = m.cols; - vector mv, av, bv; + std::vector mv, av, bv; split(m, mv); for (size_t c = 0; c < mv.size(); c++) { av.push_back(Mat(1, dims, CV_64FC1)); diff --git a/openbr/plugins/stream.cpp b/openbr/plugins/stream.cpp index 440ab1c..e3a37b6 100644 --- a/openbr/plugins/stream.cpp +++ b/openbr/plugins/stream.cpp @@ -3,7 +3,7 @@ #include #include #include -#include +#include #include #include "openbr_internal.h"