Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
Greenplum
Opencv
提交
99d3ce52
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,发现更多精彩内容 >>
提交
99d3ce52
编写于
9月 13, 2011
作者:
A
Andrey Kamaev
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Added performance tests for findCirclesGrid and solvePnP
上级
16dd655d
变更
7
隐藏空白更改
内联
并排
Showing
7 changed file
with
110 addition
and
4 deletion
+110
-4
modules/calib3d/perf/perf_cicrlesGrid.cpp
modules/calib3d/perf/perf_cicrlesGrid.cpp
+41
-0
modules/calib3d/perf/perf_main.cpp
modules/calib3d/perf/perf_main.cpp
+3
-0
modules/calib3d/perf/perf_pnp.cpp
modules/calib3d/perf/perf_pnp.cpp
+48
-0
modules/calib3d/perf/perf_precomp.cpp
modules/calib3d/perf/perf_precomp.cpp
+1
-0
modules/calib3d/perf/perf_precomp.hpp
modules/calib3d/perf/perf_precomp.hpp
+13
-0
modules/ts/include/opencv2/ts/ts_perf.hpp
modules/ts/include/opencv2/ts/ts_perf.hpp
+1
-1
modules/ts/src/ts_perf.cpp
modules/ts/src/ts_perf.cpp
+3
-3
未找到文件。
modules/calib3d/perf/perf_cicrlesGrid.cpp
0 → 100644
浏览文件 @
99d3ce52
#include "perf_precomp.hpp"
using
namespace
std
;
using
namespace
cv
;
using
namespace
perf
;
typedef
std
::
tr1
::
tuple
<
std
::
string
,
cv
::
Size
>
String_Size_t
;
typedef
perf
::
TestBaseWithParam
<
String_Size_t
>
String_Size
;
PERF_TEST_P
(
String_Size
,
asymm_circles_grid
,
testing
::
Values
(
String_Size_t
(
"cv/cameracalibration/asymmetric_circles/acircles1.jpg"
,
Size
(
7
,
13
)),
String_Size_t
(
"cv/cameracalibration/asymmetric_circles/acircles2.jpg"
,
Size
(
7
,
13
)),
String_Size_t
(
"cv/cameracalibration/asymmetric_circles/acircles3.jpg"
,
Size
(
7
,
13
)),
String_Size_t
(
"cv/cameracalibration/asymmetric_circles/acircles4.jpg"
,
Size
(
5
,
5
)),
String_Size_t
(
"cv/cameracalibration/asymmetric_circles/acircles5.jpg"
,
Size
(
5
,
5
)),
String_Size_t
(
"cv/cameracalibration/asymmetric_circles/acircles6.jpg"
,
Size
(
5
,
5
)),
String_Size_t
(
"cv/cameracalibration/asymmetric_circles/acircles7.jpg"
,
Size
(
3
,
9
)),
String_Size_t
(
"cv/cameracalibration/asymmetric_circles/acircles8.jpg"
,
Size
(
3
,
9
)),
String_Size_t
(
"cv/cameracalibration/asymmetric_circles/acircles9.jpg"
,
Size
(
3
,
9
))
)
)
{
String
filename
=
getDataPath
(
std
::
tr1
::
get
<
0
>
(
GetParam
()));
Size
gridSize
=
std
::
tr1
::
get
<
1
>
(
GetParam
());
Mat
frame
=
imread
(
filename
);
if
(
frame
.
empty
())
FAIL
()
<<
"Unable to load source image "
<<
filename
;
vector
<
Point2f
>
ptvec
;
ptvec
.
resize
(
gridSize
.
area
());
cvtColor
(
frame
,
frame
,
COLOR_BGR2GRAY
);
declare
.
in
(
frame
).
out
(
ptvec
);
TEST_CYCLE
(
100
)
{
ASSERT_TRUE
(
findCirclesGrid
(
frame
,
gridSize
,
ptvec
,
CALIB_CB_CLUSTERING
|
CALIB_CB_ASYMMETRIC_GRID
));
}
}
modules/calib3d/perf/perf_main.cpp
0 → 100644
浏览文件 @
99d3ce52
#include "perf_precomp.hpp"
CV_PERF_TEST_MAIN
(
calib3d
)
modules/calib3d/perf/perf_pnp.cpp
0 → 100644
浏览文件 @
99d3ce52
#include "perf_precomp.hpp"
using
namespace
std
;
using
namespace
cv
;
using
namespace
perf
;
typedef
std
::
tr1
::
tuple
<
std
::
string
,
cv
::
Size
>
String_Size_t
;
typedef
perf
::
TestBaseWithParam
<
int
>
PointsNumber
;
PERF_TEST_P
(
PointsNumber
,
solvePnP
,
testing
::
Values
(
4
,
3
*
9
,
7
*
13
)
)
{
int
pointsNum
=
GetParam
();
vector
<
Point2f
>
points2d
(
pointsNum
);
vector
<
Point3f
>
points3d
(
pointsNum
);
Mat
rvec
=
Mat
::
zeros
(
3
,
1
,
CV_32FC1
);
Mat
tvec
=
Mat
::
zeros
(
3
,
1
,
CV_32FC1
);
Mat
distortion
=
Mat
::
zeros
(
5
,
1
,
CV_32FC1
);
Mat
intrinsics
=
Mat
::
eye
(
3
,
3
,
CV_32FC1
);
intrinsics
.
at
<
float
>
(
0
,
0
)
=
400.0
;
intrinsics
.
at
<
float
>
(
1
,
1
)
=
400.0
;
intrinsics
.
at
<
float
>
(
0
,
2
)
=
640
/
2
;
intrinsics
.
at
<
float
>
(
1
,
2
)
=
480
/
2
;
warmup
(
points3d
,
WARMUP_RNG
);
warmup
(
rvec
,
WARMUP_RNG
);
warmup
(
tvec
,
WARMUP_RNG
);
projectPoints
(
points3d
,
rvec
,
tvec
,
intrinsics
,
distortion
,
points2d
);
//add noise
Mat
noise
(
1
,
points2d
.
size
(),
CV_32FC2
);
randu
(
noise
,
0
,
0.01
);
add
(
points2d
,
noise
,
points2d
);
declare
.
in
(
points3d
,
points2d
);
TEST_CYCLE
(
1000
)
{
solvePnP
(
points3d
,
points2d
,
intrinsics
,
distortion
,
rvec
,
tvec
,
false
);
}
SANITY_CHECK
(
rvec
);
SANITY_CHECK
(
tvec
);
}
modules/calib3d/perf/perf_precomp.cpp
0 → 100644
浏览文件 @
99d3ce52
#include "perf_precomp.hpp"
modules/calib3d/perf/perf_precomp.hpp
0 → 100644
浏览文件 @
99d3ce52
#ifndef __OPENCV_PERF_PRECOMP_HPP__
#define __OPENCV_PERF_PRECOMP_HPP__
#include "opencv2/ts/ts.hpp"
#include "opencv2/calib3d/calib3d.hpp"
#include "opencv2/highgui/highgui.hpp"
#include "opencv2/imgproc/imgproc.hpp"
#if GTEST_CREATE_SHARED_LIBRARY
#error no modules except ts should have GTEST_CREATE_SHARED_LIBRARY defined
#endif
#endif
modules/ts/include/opencv2/ts/ts_perf.hpp
浏览文件 @
99d3ce52
...
...
@@ -255,7 +255,7 @@ private:
static
int64
_timeadjustment
;
static
int64
_calibrate
();
static
void
warmup
(
cv
::
Mat
m
,
int
wtype
);
static
void
warmup
_impl
(
cv
::
Mat
m
,
int
wtype
);
static
int
getSizeInBytes
(
cv
::
InputArray
a
);
static
cv
::
Size
getSize
(
cv
::
InputArray
a
);
static
void
declareArray
(
SizeVector
&
sizes
,
cv
::
InputOutputArray
a
,
int
wtype
=
0
);
...
...
modules/ts/src/ts_perf.cpp
浏览文件 @
99d3ce52
...
...
@@ -472,12 +472,12 @@ void TestBase::warmup(cv::InputOutputArray a, int wtype)
{
if
(
a
.
empty
())
return
;
if
(
a
.
kind
()
!=
cv
::
_InputArray
::
STD_VECTOR_MAT
&&
a
.
kind
()
!=
cv
::
_InputArray
::
STD_VECTOR_VECTOR
)
warmup
(
a
.
getMat
(),
wtype
);
warmup
_impl
(
a
.
getMat
(),
wtype
);
else
{
size_t
total
=
a
.
total
();
for
(
size_t
i
=
0
;
i
<
total
;
++
i
)
warmup
(
a
.
getMat
(
i
),
wtype
);
warmup
_impl
(
a
.
getMat
(
i
),
wtype
);
}
}
...
...
@@ -507,7 +507,7 @@ bool TestBase::next()
return
++
currentIter
<
nIters
&&
totalTime
<
timeLimit
;
}
void
TestBase
::
warmup
(
cv
::
Mat
m
,
int
wtype
)
void
TestBase
::
warmup
_impl
(
cv
::
Mat
m
,
int
wtype
)
{
switch
(
wtype
)
{
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录