From 5df6d4a26a2af641632519b17ba56a633a0230b3 Mon Sep 17 00:00:00 2001 From: YusukeKato Date: Mon, 5 Feb 2024 16:51:14 +0900 Subject: [PATCH] =?UTF-8?q?detecting=5Fline()=E3=82=92detect=5Fline()?= =?UTF-8?q?=E3=81=AB=E5=A4=89=E6=9B=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../camera_line_follower_component.hpp | 2 +- src/camera_line_follower_component.cpp | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/include/raspimouse_ros2_examples/camera_line_follower_component.hpp b/include/raspimouse_ros2_examples/camera_line_follower_component.hpp index 0e7a756..262cacd 100644 --- a/include/raspimouse_ros2_examples/camera_line_follower_component.hpp +++ b/include/raspimouse_ros2_examples/camera_line_follower_component.hpp @@ -61,7 +61,7 @@ class Camera_Follower : public rclcpp_lifecycle::LifecycleNode const cv::Mat & frame, sensor_msgs::msg::Image & msg) const; - bool detecting_line(const cv::Mat & input_frame, cv::Mat & result_frame); + bool detect_line(const cv::Mat & input_frame, cv::Mat & result_frame); rclcpp_lifecycle::node_interfaces::LifecycleNodeInterface::CallbackReturn on_configure(const rclcpp_lifecycle::State &); diff --git a/src/camera_line_follower_component.cpp b/src/camera_line_follower_component.cpp index 62e33f7..61c80a2 100644 --- a/src/camera_line_follower_component.cpp +++ b/src/camera_line_follower_component.cpp @@ -52,7 +52,7 @@ void Camera_Follower::image_callback(const sensor_msgs::msg::Image::SharedPtr ms cv::cvtColor(cv_img->image, frame, CV_RGB2BGR); if (!frame.empty()) { - object_is_detected_ = detecting_line(frame, result_frame); + object_is_detected_ = detect_line(frame, result_frame); convert_frame_to_message(result_frame, *result_msg); result_image_pub_->publish(std::move(result_msg)); } @@ -127,7 +127,7 @@ void Camera_Follower::convert_frame_to_message( msg.header.frame_id = "camera_frame"; } -bool Camera_Follower::detecting_line(const cv::Mat & input_frame, cv::Mat & result_frame) +bool Camera_Follower::detect_line(const cv::Mat & input_frame, cv::Mat & result_frame) { // Specific colors are extracted from the input image and converted to binary values. cv::Mat gray;