Skip to content

Commit

Permalink
[software] PanoramaInit: add a minimal radius for circle
Browse files Browse the repository at this point in the history
  • Loading branch information
servantftechnicolor authored and fabiencastan committed Sep 7, 2020
1 parent 9a7e364 commit 7b50f6b
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/software/pipeline/main_panoramaInit.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -216,6 +216,8 @@ class CircleDetector {
double level_centerx = _center_x / pow(2.0, level);
double level_centery = _center_y / pow(2.0, level);
double level_radius = _radius / pow(2.0, level);
int min_radius = gradients.Width() / 2;


/* Extract maximas of response */
std::vector<Eigen::Vector2d> selected_points;
Expand All @@ -229,7 +231,7 @@ class CircleDetector {
int max_x = -1;

/*Lookup possible radius*/
int start = std::max(0, int(level_radius) - uncertainty);
int start = std::max(min_radius, int(level_radius) - uncertainty);
int end = std::min(gradients.Width() - 1, int(level_radius) + uncertainty);

for (size_t x = start; x <= end; x++) {
Expand Down

0 comments on commit 7b50f6b

Please sign in to comment.