Skip to content

Commit

Permalink
Refactor code for PanelSimpleDetector class
Browse files Browse the repository at this point in the history
  • Loading branch information
Ar-Ray-code committed Jan 2, 2024
1 parent 6dc1286 commit 3e83096
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions detector2d_plugins/src/panel_simple_detector.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,9 @@ Detection2DArray PanelSimpleDetector::detect(const cv::Mat & image)
return pose;
}

void PanelSimpleDetector::draw(const cv::Mat & image, const CenterPoints & center_points, const std::string & window_name)
void PanelSimpleDetector::draw(
const cv::Mat & image, const CenterPoints & center_points,
const std::string & window_name)
{
cv::Mat3b canvas = image.clone();
for (auto center_point : center_points) {
Expand All @@ -76,7 +78,9 @@ CenterPoints PanelSimpleDetector::get_center_points(const Contours & contours)
return center_points;
}

CenterPoints PanelSimpleDetector::merge_center_points(const CenterPoints & center_points, const int & width)
CenterPoints PanelSimpleDetector::merge_center_points(
const CenterPoints & center_points,
const int & width)
{
CenterPoints merged_center_points;
uint32_t threshold = width * 0.05;
Expand Down

0 comments on commit 3e83096

Please sign in to comment.