SMACC2
|
#include <image_tools/cv_mat_sensor_msgs_image_type_adapter.hpp>
#include <rclcpp/rclcpp.hpp>
#include <sensor_msgs/msg/image.hpp>
#include <std_msgs/msg/int32.hpp>
#include <iostream>
#include <opencv2/opencv.hpp>
#include <opencv2/features2d.hpp>
Go to the source code of this file.
Functions | |
RCLCPP_USING_CUSTOM_TYPE_AS_ROS_MESSAGE_TYPE (image_tools::ROSCvMatContainer, sensor_msgs::msg::Image) | |
void | segmentColor (const cv::Mat &inputRGB, int hueMean, int hueWindow, cv::Mat &out) |
int | testImage (cv::Mat &input, cv::Mat &debugImage, std::string colorName, int hueMean, int hueWindow) |
int | testRed (cv::Mat &input, cv::Mat &debugImage) |
int | testBlue (cv::Mat &input, cv::Mat &debugImage) |
int | testGreen (cv::Mat &input, cv::Mat &debugImage) |
int | testRed (std::string path, cv::Mat &debugImage) |
int | testBlue (std::string path, cv::Mat &debugImage) |
int | testGreen (std::string path, cv::Mat &debugImage) |
void | update () |
void | callback (const image_tools::ROSCvMatContainer &img) |
int | main (int argc, char **argv) |
Variables | |
rclcpp::Publisher< std_msgs::msg::Int32 >::SharedPtr | detectionPub |
rclcpp::Publisher< image_tools::ROSCvMatContainer >::SharedPtr | debugImagePub |
rclcpp::Subscription< image_tools::ROSCvMatContainer >::SharedPtr | imageSub |
void callback | ( | const image_tools::ROSCvMatContainer & | img | ) |
Definition at line 133 of file opencv_perception_node.cpp.
References image_tools::ROSCvMatContainer::cv_mat(), debugImagePub, detectionPub, image_tools::ROSCvMatContainer::header(), testBlue(), testGreen(), and testRed().
Referenced by smacc2::utils::Bind< 1 >::bindaux(), smacc2::utils::Bind< 2 >::bindaux(), smacc2::utils::Bind< 3 >::bindaux(), smacc2::utils::Bind< 4 >::bindaux(), smacc2::introspection::EventGeneratorHandler::configureEventGenerator(), smacc2::introspection::StateReactorHandler::configureStateReactor(), smacc2::ISmaccClient::connectSignal(), smacc2::StateReactor::createEventCallback(), smacc2::ISmaccStateMachine::createSignalConnection(), main(), smacc2::client_bases::SmaccActionClientBase< ActionType >::onAborted(), smacc2::client_bases::SmaccActionClientBase< ActionType >::onCancelled(), smacc2::components::CpTopicSubscriber< MessageType >::onFirstMessageReceived(), smacc2::client_bases::SmaccSubscriberClient< MessageType >::onFirstMessageReceived(), cl_keyboard::ClKeyboard::OnKeyPress(), smacc2::components::CpTopicSubscriber< MessageType >::onMessageReceived(), smacc2::client_bases::SmaccSubscriberClient< MessageType >::onMessageReceived(), cl_multirole_sensor::ClMultiroleSensor< MessageType >::onMessageTimeout(), smacc2::client_bases::SmaccActionClientBase< ActionType >::onSucceeded(), and smacc2::state_reactors::SrConditional< TEv >::SrConditional().
int main | ( | int | argc, |
char ** | argv | ||
) |
Definition at line 165 of file opencv_perception_node.cpp.
References callback(), debugImagePub, detectionPub, imageSub, and update().
RCLCPP_USING_CUSTOM_TYPE_AS_ROS_MESSAGE_TYPE | ( | image_tools::ROSCvMatContainer | , |
sensor_msgs::msg::Image | |||
) |
void segmentColor | ( | const cv::Mat & | inputRGB, |
int | hueMean, | ||
int | hueWindow, | ||
cv::Mat & | out | ||
) |
Definition at line 42 of file opencv_perception_node.cpp.
Referenced by testImage().
int testBlue | ( | cv::Mat & | input, |
cv::Mat & | debugImage | ||
) |
Definition at line 101 of file opencv_perception_node.cpp.
References testImage().
Referenced by callback().
int testBlue | ( | std::string | path, |
cv::Mat & | debugImage | ||
) |
Definition at line 117 of file opencv_perception_node.cpp.
References testImage().
int testGreen | ( | cv::Mat & | input, |
cv::Mat & | debugImage | ||
) |
Definition at line 106 of file opencv_perception_node.cpp.
References testImage().
Referenced by callback().
int testGreen | ( | std::string | path, |
cv::Mat & | debugImage | ||
) |
Definition at line 123 of file opencv_perception_node.cpp.
References testImage().
int testImage | ( | cv::Mat & | input, |
cv::Mat & | debugImage, | ||
std::string | colorName, | ||
int | hueMean, | ||
int | hueWindow | ||
) |
Definition at line 50 of file opencv_perception_node.cpp.
References segmentColor().
Referenced by testBlue(), testGreen(), and testRed().
int testRed | ( | cv::Mat & | input, |
cv::Mat & | debugImage | ||
) |
Definition at line 96 of file opencv_perception_node.cpp.
References testImage().
Referenced by callback().
int testRed | ( | std::string | path, |
cv::Mat & | debugImage | ||
) |
Definition at line 111 of file opencv_perception_node.cpp.
References testImage().
void update | ( | ) |
Definition at line 129 of file opencv_perception_node.cpp.
Referenced by main().
rclcpp::Publisher<image_tools::ROSCvMatContainer>::SharedPtr debugImagePub |
Definition at line 39 of file opencv_perception_node.cpp.
Referenced by callback(), and main().
rclcpp::Publisher<std_msgs::msg::Int32>::SharedPtr detectionPub |
Definition at line 38 of file opencv_perception_node.cpp.
Referenced by callback(), and main().
rclcpp::Subscription<image_tools::ROSCvMatContainer>::SharedPtr imageSub |
Definition at line 40 of file opencv_perception_node.cpp.
Referenced by main().