Skip to content

Commit

Permalink
Add more printouts to sample drawing
Browse files Browse the repository at this point in the history
  • Loading branch information
JacksonCampolattaro committed Aug 7, 2020
1 parent d3ba9f7 commit dc74af1
Showing 1 changed file with 8 additions and 2 deletions.
Expand Up @@ -1131,11 +1131,12 @@ class Efficient_RANSAC {

std::cerr << (cur ? " node found" : " node not found") << std::endl;

// std::cerr << " relevant node: " << cur << std::endl;

if (!cur)
return false;

std::cerr << " node contains " << cur->size() << " points" << std::endl;

// Count point indices that map to -1 in the shape index
std::size_t enough = 0;
for (auto j : cur->points()) {
if (shapeIndex[j] == -1) {
Expand All @@ -1145,12 +1146,17 @@ class Efficient_RANSAC {
}
}

std::cerr << " enough: " << enough << std::endl;

if (enough >= requiredSamples) {
do {
std::size_t p = CGAL::get_default_random().
uniform_int<std::size_t>(0, cur->size() - 1);
// TODO: I'm not sure if dereferencing this is working correctly
std::size_t j = *(cur->points().begin() + p);

std::cerr << " j: " << j << std::endl;

if (shapeIndex[j] == -1)
indices.insert(j);
} while (indices.size() < requiredSamples);
Expand Down

0 comments on commit dc74af1

Please sign in to comment.