Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
F
finddd_descriptor
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Model registry
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
labrobotica
algorithms
finddd_descriptor
Commits
9dd985c2
Commit
9dd985c2
authored
11 years ago
by
Arnau Ramisa
Browse files
Options
Downloads
Patches
Plain Diff
fixes
parent
b94cc67c
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
examples/xyz_centers13.txt
+13
-0
13 additions, 0 deletions
examples/xyz_centers13.txt
src/CMakeLists.txt
+2
-0
2 additions, 0 deletions
src/CMakeLists.txt
src/finddd_descriptor.cpp
+0
-1
0 additions, 1 deletion
src/finddd_descriptor.cpp
src/finddd_descriptor.hpp
+19
-15
19 additions, 15 deletions
src/finddd_descriptor.hpp
with
34 additions
and
16 deletions
examples/xyz_centers13.txt
0 → 100644
+
13
−
0
View file @
9dd985c2
-1.000000 -0.000000 -0.000000
-0.707107 -0.707107 -0.000000
-0.707107 -0.000000 -0.707107
-0.707107 0.707107 0.000000
-0.000000 -1.000000 -0.000000
-0.000000 -0.707107 -0.707107
-0.000000 -0.000000 -1.000000
0.000000 0.707107 -0.707107
0.000000 1.000000 0.000000
0.707107 -0.707107 0.000000
0.707107 0.000000 -0.707107
0.707107 0.707107 0.000000
1.000000 0.000000 0.000000
This diff is collapsed.
Click to expand it.
src/CMakeLists.txt
+
2
−
0
View file @
9dd985c2
...
@@ -8,6 +8,8 @@ include_directories(${PCL_INCLUDE_DIRS})
...
@@ -8,6 +8,8 @@ include_directories(${PCL_INCLUDE_DIRS})
link_directories
(
${
PCL_LIBRARY_DIRS
}
)
link_directories
(
${
PCL_LIBRARY_DIRS
}
)
add_definitions
(
${
PCL_DEFINITIONS
}
)
add_definitions
(
${
PCL_DEFINITIONS
}
)
SET
(
CMAKE_BUILD_TYPE
"RELEASE"
)
# add the necessary include directories
# add the necessary include directories
INCLUDE_DIRECTORIES
(
.
)
INCLUDE_DIRECTORIES
(
.
)
# application source files
# application source files
...
...
This diff is collapsed.
Click to expand it.
src/finddd_descriptor.cpp
+
0
−
1
View file @
9dd985c2
...
@@ -279,7 +279,6 @@ FindddAlgorithm::FindddAlgorithm(FindddConfig new_cfg)
...
@@ -279,7 +279,6 @@ FindddAlgorithm::FindddAlgorithm(FindddConfig new_cfg)
// Main function to compute FINDDD descriptors
// Main function to compute FINDDD descriptors
void
FindddAlgorithm
::
compute_ndescs_integral_spatial_interpolation
(
pcl
::
PointCloud
<
pcl
::
PointXYZ
>&
cloud
,
DescriptorSet
&
descriptor_set
)
void
FindddAlgorithm
::
compute_ndescs_integral_spatial_interpolation
(
pcl
::
PointCloud
<
pcl
::
PointXYZ
>&
cloud
,
DescriptorSet
&
descriptor_set
)
{
{
clock_t
start
=
clock
();
clock_t
start
=
clock
();
if
(
this
->
verbose_level_
>=
2
)
if
(
this
->
verbose_level_
>=
2
)
{
{
...
...
This diff is collapsed.
Click to expand it.
src/finddd_descriptor.hpp
+
19
−
15
View file @
9dd985c2
...
@@ -306,42 +306,46 @@ protected:
...
@@ -306,42 +306,46 @@ protected:
float
num
;
float
num
;
getline
(
ifs
,
line
);
getline
(
ifs
,
line
);
std
::
istringstream
iss
(
line
);
std
::
istringstream
iss
(
line
);
int
i
=
0
;
do
do
{
{
iss
>>
num
;
iss
>>
num
;
this
->
pca_mean_
.
push_back
(
num
);
this
->
pca_mean_
.
push_back
(
num
);
}
while
(
iss
);
}
while
(
!
iss
.
eof
()
);
}
}
int
dout
=
0
;
int
dout
=
0
;
while
(
ifs
.
good
())
while
(
ifs
.
good
())
{
{
float
num
;
float
num
;
this
->
pca_matrix_
.
push_back
(
std
::
vector
<
float
>
());
getline
(
ifs
,
line
);
getline
(
ifs
,
line
);
std
::
istringstream
iss
(
line
);
//line.erase(line.find_last_not_of(" \n\r\t")+1
);
do
if
(
line
.
size
()
>
0
)
{
{
iss
>>
num
;
this
->
pca_matrix_
.
push_back
(
std
::
vector
<
float
>
());
this
->
pca_matrix_
.
back
().
push_back
(
num
);
std
::
istringstream
iss
(
line
);
}
while
(
iss
);
do
if
(
dout
==
0
)
dout
=
this
->
pca_matrix_
.
back
().
size
();
{
else
if
(
dout
!=
this
->
pca_matrix_
.
back
().
size
())
iss
>>
num
;
{
this
->
pca_matrix_
.
back
().
push_back
(
num
);
if
(
this
->
verbose_level_
>=
1
)
}
while
(
!
iss
.
eof
());
std
::
cout
<<
"Not consistent PCA data."
<<
std
::
endl
;
if
(
dout
==
0
)
dout
=
this
->
pca_matrix_
.
back
().
size
();
exit
(
-
1
);
else
if
(
dout
!=
this
->
pca_matrix_
.
back
().
size
())
{
if
(
this
->
verbose_level_
>=
1
)
std
::
cout
<<
"Not consistent PCA data. Previous PCA matrix row width: "
<<
dout
<<
". Current PCA matrix row width: "
<<
this
->
pca_matrix_
.
back
().
size
()
<<
std
::
endl
;
exit
(
-
1
);
}
}
}
}
}
if
(
this
->
pca_mean_
.
size
()
!=
this
->
pca_matrix_
.
size
())
if
(
this
->
pca_mean_
.
size
()
!=
this
->
pca_matrix_
.
size
())
{
{
if
(
this
->
verbose_level_
>=
1
)
if
(
this
->
verbose_level_
>=
1
)
std
::
cout
<<
"Not consistent PCA data
."
<<
std
::
endl
;
std
::
cout
<<
"Not consistent PCA data
: mean vector size: "
<<
this
->
pca_mean_
.
size
()
<<
" PCA matrix size: "
<<
this
->
pca_matrix_
.
size
()
<<
"x"
<<
pca_matrix_
[
0
].
size
()
<<
std
::
endl
;
exit
(
-
1
);
exit
(
-
1
);
}
}
//matrix correctly loaded, transposing for ease of use later
//matrix correctly loaded, transposing for ease of use later
std
::
vector
<
std
::
vector
<
float
>
>
PCA_t
;
std
::
vector
<
std
::
vector
<
float
>
>
PCA_t
;
PCA_t
.
resize
(
this
->
pca_matrix_
[
0
].
size
(),
std
::
vector
<
float
>
(
this
->
pca_matrix_
.
size
()));
PCA_t
.
resize
(
this
->
pca_matrix_
[
0
].
size
(),
std
::
vector
<
float
>
(
this
->
pca_matrix_
.
size
()));
for
(
int
i
=
0
;
i
<
this
->
pca_matrix_
[
0
].
size
();
i
++
)
for
(
int
i
=
0
;
i
<
this
->
pca_matrix_
[
0
].
size
();
i
++
)
for
(
int
j
=
0
;
j
<
this
->
pca_matrix_
.
size
();
j
++
)
for
(
int
j
=
0
;
j
<
this
->
pca_matrix_
.
size
();
j
++
)
{
{
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment