Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
PointCloud
Flann
提交
dabc4003
F
Flann
项目概览
PointCloud
/
Flann
通知
4
Star
1
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
F
Flann
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
dabc4003
编写于
12月 14, 2011
作者:
M
Marius Muja
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Minor changes
上级
09b2f2ef
变更
2
显示空白变更内容
内联
并排
Showing
2 changed file
with
4 addition
and
5 deletion
+4
-5
src/cpp/flann/algorithms/kdtree_single_index.h
src/cpp/flann/algorithms/kdtree_single_index.h
+2
-2
test/flann_simple_test.cpp
test/flann_simple_test.cpp
+2
-3
未找到文件。
src/cpp/flann/algorithms/kdtree_single_index.h
浏览文件 @
dabc4003
...
@@ -418,7 +418,7 @@ private:
...
@@ -418,7 +418,7 @@ private:
void
middleSplit_
(
int
*
ind
,
int
count
,
int
&
index
,
int
&
cutfeat
,
DistanceType
&
cutval
,
const
BoundingBox
&
bbox
)
void
middleSplit_
(
int
*
ind
,
int
count
,
int
&
index
,
int
&
cutfeat
,
DistanceType
&
cutval
,
const
BoundingBox
&
bbox
)
{
{
const
float
EPS
=
0.00001
f
;
const
float
eps_val
=
0.00001
f
;
DistanceType
max_span
=
bbox
[
0
].
high
-
bbox
[
0
].
low
;
DistanceType
max_span
=
bbox
[
0
].
high
-
bbox
[
0
].
low
;
for
(
size_t
i
=
1
;
i
<
dim_
;
++
i
)
{
for
(
size_t
i
=
1
;
i
<
dim_
;
++
i
)
{
DistanceType
span
=
bbox
[
i
].
high
-
bbox
[
i
].
low
;
DistanceType
span
=
bbox
[
i
].
high
-
bbox
[
i
].
low
;
...
@@ -430,7 +430,7 @@ private:
...
@@ -430,7 +430,7 @@ private:
cutfeat
=
0
;
cutfeat
=
0
;
for
(
size_t
i
=
0
;
i
<
dim_
;
++
i
)
{
for
(
size_t
i
=
0
;
i
<
dim_
;
++
i
)
{
DistanceType
span
=
bbox
[
i
].
high
-
bbox
[
i
].
low
;
DistanceType
span
=
bbox
[
i
].
high
-
bbox
[
i
].
low
;
if
(
span
>
(
DistanceType
)((
1
-
EPS
)
*
max_span
))
{
if
(
span
>
(
DistanceType
)((
1
-
eps_val
)
*
max_span
))
{
ElementType
min_elem
,
max_elem
;
ElementType
min_elem
,
max_elem
;
computeMinMax
(
ind
,
count
,
cutfeat
,
min_elem
,
max_elem
);
computeMinMax
(
ind
,
count
,
cutfeat
,
min_elem
,
max_elem
);
DistanceType
spread
=
(
DistanceType
)(
max_elem
-
min_elem
);
DistanceType
spread
=
(
DistanceType
)(
max_elem
-
min_elem
);
...
...
test/flann_simple_test.cpp
浏览文件 @
dabc4003
...
@@ -350,7 +350,7 @@ TEST_F(Flann_SIFT100K_Test, AutotunedTest)
...
@@ -350,7 +350,7 @@ TEST_F(Flann_SIFT100K_Test, AutotunedTest)
index
.
save
(
"autotuned.idx"
);
index
.
save
(
"autotuned.idx"
);
start_timer
(
"Searching KNN..."
);
start_timer
(
"Searching KNN..."
);
index
.
knnSearch
(
query
,
indices
,
dists
,
5
,
flann
::
SearchParams
(
-
2
)
);
index
.
knnSearch
(
query
,
indices
,
dists
,
5
,
flann
::
SearchParams
(
FLANN_CHECKS_AUTOTUNED
)
);
printf
(
"done (%g seconds)
\n
"
,
stop_timer
());
printf
(
"done (%g seconds)
\n
"
,
stop_timer
());
float
precision
=
compute_precision
(
match
,
indices
);
float
precision
=
compute_precision
(
match
,
indices
);
...
@@ -396,8 +396,7 @@ TEST_F(Flann_SIFT100K_Test, SavedTest)
...
@@ -396,8 +396,7 @@ TEST_F(Flann_SIFT100K_Test, SavedTest)
const
flann
::
IndexParams
index_params
=
autotuned_index
.
getParameters
();
const
flann
::
IndexParams
index_params
=
autotuned_index
.
getParameters
();
printf
(
"The index has the following parameters:
\n
"
);
printf
(
"The index has the following parameters:
\n
"
);
// index_params->print();
flann
::
print_params
(
index_params
);
printf
(
"Index type is: %d
\n
"
,
autotuned_index
.
getType
());
printf
(
"Index type is: %d
\n
"
,
autotuned_index
.
getType
());
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录