Skip to content

Commit

Permalink
パラメータ調整
Browse files Browse the repository at this point in the history
  • Loading branch information
Kuwamai committed Jan 11, 2024
1 parent d780339 commit 9b46ee1
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions sciurus17_examples/src/color_detection.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -109,9 +109,11 @@ void ColorDetection::image_callback(const sensor_msgs::msg::Image::SharedPtr msg
RCLCPP_DEBUG_STREAM(this->get_logger(), "Detect at" << object_point << ".");

// 検出領域と検出位置を描画
cv::Scalar color(256, 0, 256);
cv::drawContours(img_annotated, contours, max_area_i, color, 2);
cv::circle(img_annotated, object_point, 10, color, -1);
const cv::Scalar ANNOTATE_COLOR(256, 0, 256);
const int ANNOTATE_THICKNESS = 4;
const int ANNOTATE_RADIUS = 10;
cv::drawContours(img_annotated, contours, max_area_i, ANNOTATE_COLOR, ANNOTATE_THICKNESS);
cv::circle(img_annotated, object_point, ANNOTATE_RADIUS, ANNOTATE_COLOR, -1);

// 画像の中心を原点とした検出位置に変換
cv::Point2d translated_object_point;
Expand Down

0 comments on commit 9b46ee1

Please sign in to comment.