Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
Greenplum
Opencv
提交
05cd88ae
O
Opencv
项目概览
Greenplum
/
Opencv
大约 1 年 前同步成功
通知
7
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
O
Opencv
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
05cd88ae
编写于
11月 26, 2012
作者:
M
marina.kolpakova
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
clean code; fix problems in documentation
上级
bd3179bd
变更
7
隐藏空白更改
内联
并排
Showing
7 changed file
with
9 addition
and
98 deletion
+9
-98
modules/gpu/doc/object_detection.rst
modules/gpu/doc/object_detection.rst
+3
-3
modules/gpu/include/opencv2/gpu/gpu.hpp
modules/gpu/include/opencv2/gpu/gpu.hpp
+3
-1
modules/gpu/perf/perf_softcascade.cpp
modules/gpu/perf/perf_softcascade.cpp
+0
-35
modules/gpu/src/cuda/icf-sc.cu
modules/gpu/src/cuda/icf-sc.cu
+1
-1
modules/gpu/src/icf.hpp
modules/gpu/src/icf.hpp
+1
-7
modules/gpu/src/softcascade.cpp
modules/gpu/src/softcascade.cpp
+1
-1
modules/gpu/test/test_softcascade.cpp
modules/gpu/test/test_softcascade.cpp
+0
-50
未找到文件。
modules/gpu/doc/object_detection.rst
浏览文件 @
05cd88ae
...
...
@@ -200,7 +200,7 @@ The function is mainly used to learn the classifier.
Soft Cascade Classifier
======================
======================
====
Soft Cascade Classifier for Object Detection
----------------------------------------------------------
...
...
@@ -226,7 +226,7 @@ The sample has been rejected if it fall rejection threshold. So stageless cascad
SCascade
----------------
.. ocv:class:: SCascade
.. ocv:class:: SCascade
: public Algorithm
Implementation of soft (stageless) cascaded detector. ::
...
...
@@ -248,7 +248,7 @@ Implementation of soft (stageless) cascaded detector. ::
virtual ~SCascade();
virtual bool load(const FileNode& fn);
virtual void detect(InputArray image, InputArray rois, OutputArray objects, Stream& stream = Stream::Null()) const;
void genRoi(InputArray roi, OutputArray mask, Stream& stream = Stream::Null()) const;
v
irtual v
oid genRoi(InputArray roi, OutputArray mask, Stream& stream = Stream::Null()) const;
};
...
...
modules/gpu/include/opencv2/gpu/gpu.hpp
浏览文件 @
05cd88ae
...
...
@@ -1586,7 +1586,7 @@ public:
// There non zero value mean that detector should be executed in this point.
// Param mask is an output mask
// Param stream is stream is a high-level CUDA stream abstraction used for asynchronous execution
void
genRoi
(
InputArray
roi
,
OutputArray
mask
,
Stream
&
stream
=
Stream
::
Null
())
const
;
v
irtual
v
oid
genRoi
(
InputArray
roi
,
OutputArray
mask
,
Stream
&
stream
=
Stream
::
Null
())
const
;
private:
...
...
@@ -1600,6 +1600,8 @@ private:
int
rejCriteria
;
};
CV_EXPORTS
bool
initModule_gpu
(
void
);
////////////////////////////////// SURF //////////////////////////////////////////
class
CV_EXPORTS
SURF_GPU
...
...
modules/gpu/perf/perf_softcascade.cpp
浏览文件 @
05cd88ae
...
...
@@ -33,18 +33,6 @@ namespace {
else
if
(
a
.
w
!=
b
.
w
)
return
a
.
w
<
b
.
w
;
else
return
a
.
h
<
b
.
h
;
}
// bool operator()(const cv::SoftCascade::Detection& a,
// const cv::SoftCascade::Detection& b) const
// {
// const cv::Rect& ra = a.rect;
// const cv::Rect& rb = b.rect;
// if (ra.x != rb.x) return ra.x < rb.x;
// else if (ra.y != rb.y) return ra.y < rb.y;
// else if (ra.width != rb.width) return ra.width < rb.width;
// else return ra.height < rb.height;
// }
};
cv
::
Mat
sortDetections
(
cv
::
gpu
::
GpuMat
&
objects
)
...
...
@@ -99,29 +87,6 @@ RUN_GPU(SCascadeTest, detect)
NO_CPU
(
SCascadeTest
,
detect
)
// RUN_CPU(SCascadeTest, detect)
// {
// cv::Mat colored = readImage(GET_PARAM(1));
// ASSERT_FALSE(colored.empty());
// cv::SCascade cascade;
// ASSERT_TRUE(cascade.load(getDataPath(GET_PARAM(0))));
// std::vector<cv::Rect> rois;
// typedef cv::SCascade::Detection Detection;
// std::vector<Detection>objects;
// cascade.detectMultiScale(colored, rois, objects);
// TEST_CYCLE()
// {
// cascade.detectMultiScale(colored, rois, objects);
// }
// std::sort(objects.begin(), objects.end(), DetectionLess());
// SANITY_CHECK(objects);
// }
static
cv
::
Rect
getFromTable
(
int
idx
)
{
static
const
cv
::
Rect
rois
[]
=
...
...
modules/gpu/src/cuda/icf-sc.cu
浏览文件 @
05cd88ae
...
...
@@ -49,7 +49,7 @@
namespace
cv
{
namespace
gpu
{
namespace
device
{
namespace
icf
{
// ToDo: use textures or
a
ncached load instruction.
// ToDo: use textures or
u
ncached load instruction.
__global__
void
magToHist
(
const
uchar
*
__restrict__
mag
,
const
float
*
__restrict__
angle
,
const
int
angPitch
,
uchar
*
__restrict__
hog
,
const
int
hogPitch
,
const
int
fh
)
...
...
modules/gpu/src/icf.hpp
浏览文件 @
05cd88ae
...
...
@@ -45,7 +45,6 @@
#define __OPENCV_ICF_HPP__
#include <opencv2/gpu/device/common.hpp>
#include <stdio.h>
#if defined __CUDACC__
# define __device __device__ __forceinline__
...
...
@@ -93,12 +92,7 @@ struct __align__(8) Node
enum
{
THRESHOLD_MASK
=
0x0FFFFFFF
};
Node
(
const
uchar4
r
,
const
uint
ch
,
const
uint
t
)
:
rect
(
r
),
threshold
(
t
+
(
ch
<<
28
))
{
// printf("%d\n", t);
// printf("[%d %d %d %d] %d, %d\n",rect.x, rect.y, rect.z, rect.w, (int)(threshold >> 28),
// (int)(0x0FFFFFFF & threshold));
}
Node
(
const
uchar4
r
,
const
uint
ch
,
const
uint
t
)
:
rect
(
r
),
threshold
(
t
+
(
ch
<<
28
))
{}
};
struct
__align__
(
16
)
Detection
...
...
modules/gpu/src/softcascade.cpp
浏览文件 @
05cd88ae
...
...
@@ -142,7 +142,7 @@ struct cv::gpu::SCascade::Fields
static
const
char
*
const
SC_F_RECT
=
"rect"
;
FileNode
fn
=
root
[
SC_OCTAVES
];
if
(
fn
.
empty
())
return
false
;
if
(
fn
.
empty
())
return
false
;
using
namespace
device
::
icf
;
...
...
modules/gpu/test/test_softcascade.cpp
浏览文件 @
05cd88ae
...
...
@@ -205,56 +205,6 @@ GPU_TEST_P(SCascadeTestRoi, detect,
}
// typedef ::testing::TestWithParam<std::tr1::tuple<cv::gpu::DeviceInfo, std::string, std::string, int> > SCascadeTestLevel;
// GPU_TEST_P(SCascadeTestLevel, detect,
// testing::Combine(
// ALL_DEVICES,
// testing::Values(std::string("cv/cascadeandhog/sc_cvpr_2012_to_opencv.xml")),
// testing::Values(std::string("../cv/cascadeandhog/bahnhof/image_00000000_0.png")),
// testing::Range(0, 47)
// ))
// {
// cv::gpu::setDevice(GET_PARAM(0).deviceID());
// cv::gpu::SCascade cascade;
// cv::FileStorage fs(perf::TestBase::getDataPath(GET_PARAM(1)), cv::FileStorage::READ);
// ASSERT_TRUE(fs.isOpened());
// ASSERT_TRUE(cascade.load(fs.getFirstTopLevelNode()));
// cv::Mat coloredCpu = cv::imread(cvtest::TS::ptr()->get_data_path() + GET_PARAM(2));
// ASSERT_FALSE(coloredCpu.empty());
// typedef cv::gpu::SCascade::Detection Detection;
// GpuMat colored(coloredCpu), objectBoxes(1, 100 * sizeof(Detection), CV_8UC1), rois(colored.size(), CV_8UC1);
// rois.setTo(1);
// cv::gpu::GpuMat trois;
// cascade.genRoi(rois, trois);
// objectBoxes.setTo(0);
// int level = GET_PARAM(3);
// cascade.detect(colored, trois, objectBoxes, level);
// cv::Mat dt(objectBoxes);
// Detection* dts = ((Detection*)dt.data) + 1;
// int* count = dt.ptr<int>(0);
// cv::Mat result(coloredCpu);
// printTotal(std::cout, *count);
// for (int i = 0; i < *count; ++i)
// {
// Detection d = dts[i];
// print(std::cout, d);
// cv::rectangle(result, cv::Rect(d.x, d.y, d.w, d.h), cv::Scalar(255, 0, 0, 255), 1);
// }
// writeResult(result, level);
// SHOW(result);
// }
TEST
(
SCascadeTest
,
readCascade
)
{
std
::
string
xml
=
cvtest
::
TS
::
ptr
()
->
get_data_path
()
+
"../cv/cascadeandhog/icf-template.xml"
;
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录