move gpu version of soft cascade to dedicated module

This commit is contained in:
marina.kolpakova
2013-03-03 11:11:42 +04:00
parent 9b00c14fff
commit 5120322cea
16 changed files with 504 additions and 249 deletions

View File

@@ -1,4 +1,5 @@
#include <opencv2/gpu/gpu.hpp>
#include <opencv2/softcascade/softcascade.hpp>
#include <opencv2/highgui/highgui.hpp>
#include <iostream>
@@ -46,7 +47,7 @@ int main(int argc, char** argv)
float maxScale = parser.get<float>("max_scale");
int scales = parser.get<int>("total_scales");
using cv::gpu::SCascade;
using cv::softcascade::SCascade;
SCascade cascade(minScale, maxScale, scales);
if (!cascade.load(fs.getFirstTopLevelNode()))
@@ -79,7 +80,7 @@ int main(int argc, char** argv)
cascade.detect(dframe, roi, objects);
cv::Mat dt(objects);
typedef cv::gpu::SCascade::Detection Detection;
typedef cv::softcascade::SCascade::Detection Detection;
Detection* dts = ((Detection*)dt.data) + 1;
int* count = dt.ptr<int>(0);