Code style fix. dbt face detection example turned off for Windows.

This commit is contained in:
Alexander Smorkalov
2012-06-18 10:59:28 +00:00
parent db08656a38
commit 1736cc9739
3 changed files with 33 additions and 18 deletions

View File

@@ -1,3 +1,5 @@
#if defined(__linux__) || defined(LINUX) || defined(__APPLE__) || defined(ANDROID)
#include <opencv2/imgproc/imgproc.hpp> // Gaussian Blur
#include <opencv2/core/core.hpp> // Basic OpenCV structures (cv::Mat, Scalar)
#include <opencv2/highgui/highgui.hpp> // OpenCV window I/O
@@ -16,6 +18,7 @@ class CascadeDetectorAdapter: public DetectionBasedTracker::IDetector
{
public:
CascadeDetectorAdapter(cv::Ptr<cv::CascadeClassifier> detector):
IDetector(),
Detector(detector)
{
CV_Assert(!detector.empty());
@@ -23,7 +26,7 @@ class CascadeDetectorAdapter: public DetectionBasedTracker::IDetector
void detect(const cv::Mat &Image, std::vector<cv::Rect> &objects)
{
Detector->detectMultiScale(Image, objects, ScaleFactor, MinNeighbours, 0, MinObjSize, MaxObjSize);
Detector->detectMultiScale(Image, objects, scaleFactor, minNeighbours, 0, minObjSize, maxObjSize);
}
virtual ~CascadeDetectorAdapter()
{}
@@ -87,4 +90,15 @@ int main(int argc, char* argv[])
return 0;
}
#else
#include <stdio.h>
int main()
{
printf("This sample works for UNIX or ANDROID only\n");
return 0;
}
#endif

View File

@@ -65,6 +65,7 @@ class CascadeDetectorAdapter: public DetectionBasedTracker::IDetector
{
public:
CascadeDetectorAdapter(cv::Ptr<cv::CascadeClassifier> detector):
IDetector(),
Detector(detector)
{
CV_Assert(!detector.empty());
@@ -72,7 +73,7 @@ class CascadeDetectorAdapter: public DetectionBasedTracker::IDetector
void detect(const cv::Mat &Image, std::vector<cv::Rect> &objects)
{
Detector->detectMultiScale(Image, objects, 1.1, 3, 0, MinObjSize, MaxObjSize);
Detector->detectMultiScale(Image, objects, 1.1, 3, 0, minObjSize, maxObjSize);
}
virtual ~CascadeDetectorAdapter()
{}