merge Detection structure for CPU and GPU soft cascade detectors

This commit is contained in:
marina.kolpakova
2013-03-15 12:26:25 +04:00
parent 7772811585
commit 0211843062
8 changed files with 77 additions and 36 deletions

View File

@@ -3,6 +3,8 @@
#include <opencv2/highgui.hpp>
#include <iostream>
typedef cv::softcascade::Detection Detection;
int main(int argc, char** argv)
{
const std::string keys =
@@ -64,7 +66,7 @@ int main(int argc, char** argv)
return 1;
}
cv::gpu::GpuMat objects(1, sizeof(SCascade::Detection) * 10000, CV_8UC1);
cv::gpu::GpuMat objects(1, sizeof(Detection) * 10000, CV_8UC1);
cv::gpu::printShortCudaDeviceInfo(parser.get<int>("device"));
for (;;)
{
@@ -80,7 +82,6 @@ int main(int argc, char** argv)
cascade.detect(dframe, roi, objects);
cv::Mat dt(objects);
typedef cv::softcascade::SCascade::Detection Detection;
Detection* dts = ((Detection*)dt.data) + 1;
int* count = dt.ptr<int>(0);