Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
Greenplum
Opencv
提交
92d1262f
O
Opencv
项目概览
Greenplum
/
Opencv
11 个月 前同步成功
通知
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,发现更多精彩内容 >>
提交
92d1262f
编写于
5月 21, 2011
作者:
K
Kirill Kornyakov
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
bugfix for Windows x64, Visual Studio 10
上级
86803521
变更
1
隐藏空白更改
内联
并排
Showing
1 changed file
with
6 addition
and
6 deletion
+6
-6
modules/features2d/src/orb.cpp
modules/features2d/src/orb.cpp
+6
-6
未找到文件。
modules/features2d/src/orb.cpp
浏览文件 @
92d1262f
...
...
@@ -454,7 +454,7 @@ ORB::ORB(size_t n_features, const CommonParams & detector_params) :
params_
(
detector_params
),
n_features_
(
n_features
)
{
// fill the extractors and descriptors for the corresponding scales
int
n_desired_features_per_scale
=
n_features
/
((
1.0
/
std
::
pow
(
params_
.
scale_factor_
,
2
*
params_
.
n_levels_
)
-
1
)
int
n_desired_features_per_scale
=
n_features
/
((
1.0
/
std
::
pow
(
params_
.
scale_factor_
,
2
.
f
*
params_
.
n_levels_
)
-
1
)
/
(
1.0
/
std
::
pow
(
params_
.
scale_factor_
,
2
)
-
1
));
n_features_per_level_
.
resize
(
detector_params
.
n_levels_
);
for
(
unsigned
int
level
=
0
;
level
<
detector_params
.
n_levels_
;
level
++
)
...
...
@@ -466,11 +466,11 @@ ORB::ORB(size_t n_features, const CommonParams & detector_params) :
// pre-compute the end of a row in a circular patch
half_patch_size_
=
params_
.
patch_size_
/
2
;
u_max_
.
resize
(
half_patch_size_
+
1
);
for
(
int
v
=
0
;
v
<=
half_patch_size_
*
sqrt
(
2
)
/
2
+
1
;
++
v
)
u_max_
[
v
]
=
std
::
floor
(
sqrt
(
half_patch_size_
*
half_patch_size_
-
v
*
v
)
+
0.5
);
for
(
int
v
=
0
;
v
<=
half_patch_size_
*
sqrt
(
2
.
f
)
/
2
+
1
;
++
v
)
u_max_
[
v
]
=
std
::
floor
(
sqrt
(
float
(
half_patch_size_
*
half_patch_size_
-
v
*
v
)
)
+
0.5
);
// Make sure we are symmetric
for
(
int
v
=
half_patch_size_
,
v_0
=
0
;
v
>=
half_patch_size_
*
sqrt
(
2
)
/
2
;
--
v
)
for
(
int
v
=
half_patch_size_
,
v_0
=
0
;
v
>=
half_patch_size_
*
sqrt
(
2
.
f
)
/
2
;
--
v
)
{
while
(
u_max_
[
v_0
]
==
u_max_
[
v_0
+
1
])
++
v_0
;
...
...
@@ -534,7 +534,7 @@ void ORB::operator()(const cv::Mat &image, const cv::Mat &mask, std::vector<cv::
// Compute the resized image
if
(
level
!=
params_
.
first_level_
)
{
float
scale
=
1
/
std
::
pow
(
params_
.
scale_factor_
,
level
-
params_
.
first_level_
);
float
scale
=
1
/
std
::
pow
(
params_
.
scale_factor_
,
float
(
level
-
params_
.
first_level_
)
);
cv
::
resize
(
image
,
image_pyramid
[
level
],
cv
::
Size
(),
scale
,
scale
,
cv
::
INTER_AREA
);
if
(
!
mask
.
empty
())
cv
::
resize
(
mask
,
mask_pyramid
[
level
],
cv
::
Size
(),
scale
,
scale
,
cv
::
INTER_AREA
);
...
...
@@ -589,7 +589,7 @@ void ORB::operator()(const cv::Mat &image, const cv::Mat &mask, std::vector<cv::
// Rescale the coordinates
if
(
level
!=
params_
.
first_level_
)
{
float
scale
=
std
::
pow
(
params_
.
scale_factor_
,
level
-
params_
.
first_level_
);
float
scale
=
std
::
pow
(
params_
.
scale_factor_
,
float
(
level
-
params_
.
first_level_
)
);
for
(
std
::
vector
<
cv
::
KeyPoint
>::
iterator
keypoint
=
keypoints
.
begin
(),
keypoint_end
=
keypoints
.
end
();
keypoint
!=
keypoint_end
;
++
keypoint
)
keypoint
->
pt
*=
scale
;
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录