Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
ofxaddons
ofxCloudLib
Commits
b00827fa
Commit
b00827fa
authored
Oct 13, 2018
by
artificiel
Browse files
EuclidianExtractor: skippe l'extraction si cloud->size() < 10
parent
77dcc014
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/ofxCloudLib/EuclidianExtractor.hpp
View file @
b00827fa
...
...
@@ -61,14 +61,17 @@ class EuclidianExtractor : public ofThread
while
(
to_extract_
.
receive
(
cloud
))
{
// if (cloud->size() > 10) {
// TS_START("EuclidianExtraction");
std
::
vector
<
pcl
::
PointIndices
>
cluster_indices
;
pcl
::
PointCloud
<
pcl
::
PointXYZRGBA
>::
Ptr
supercloudFilteredRGBA
;
supercloudFilteredRGBA
.
reset
(
new
pcl
::
PointCloud
<
pcl
::
PointXYZRGBA
>
);
auto
fresh_clouds
=
make_shared
<
vector
<
shared_ptr
<
SmartCloud
>>>
();
if
(
cloud
->
size
()
>
10
)
{
pcl
::
search
::
KdTree
<
pcl
::
PointXYZ
>::
Ptr
tree
(
new
pcl
::
search
::
KdTree
<
pcl
::
PointXYZ
>
);
tree
->
setInputCloud
(
cloud
);
...
...
@@ -80,9 +83,6 @@ class EuclidianExtractor : public ofThread
ec
.
setInputCloud
(
cloud
);
ec
.
extract
(
cluster_indices
);
supercloudFilteredRGBA
.
reset
(
new
pcl
::
PointCloud
<
pcl
::
PointXYZRGBA
>
);
auto
fresh_clouds
=
make_shared
<
vector
<
shared_ptr
<
SmartCloud
>>>
();
for
(
std
::
vector
<
pcl
::
PointIndices
>::
const_iterator
it
=
cluster_indices
.
begin
();
it
!=
cluster_indices
.
end
();
++
it
)
{
// nécessaire de copier, ou simplement passer des indices???
...
...
@@ -101,6 +101,7 @@ class EuclidianExtractor : public ofThread
}
fresh_clouds
->
back
().
get
()
->
setup
();
}
}
vector
<
shared_ptr
<
ClusterMesh
>>::
iterator
clusterMesh
;
vector
<
shared_ptr
<
SmartCloud
>>
candidateClouds
=
newClouds
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment