Go to the documentation of this file.00001
00021 #ifndef UTILS_H_
00022 #define UTILS_H_
00023
00024 #include <boost/regex.hpp>
00025 #include <wx/wx.h>
00026 #include <sensor_msgs/Image.h>
00027 #include <HalconCpp.h>
00028 #include <boost/filesystem.hpp>
00029 #include <Eigen/Dense>
00030
00037 const std::string ROTATIONTYPE_NO_ROTATION = "No Rotation";
00038
00040 const std::string ROTATIONTYPE_CYLINDER = "Cylinder";
00041
00043 const std::string ROTATIONTYPE_SPHERE = "Sphere";
00044
00046 const std::string INPUT_FOLDER = "/trainer_data/input";
00047
00049 const std::string OUTPUT_FOLDER = "/trainer_data/output";
00050
00051
00057 bool check_string_redex(std::string to_check, boost::regex regex);
00058
00064 std::string trim(std::string input);
00065
00075 wxBitmap* createBitmap(const sensor_msgs::Image::ConstPtr& msg, int width, int height);
00076
00086 wxBitmap* createBitmap(HalconCpp::HImage image, int width, int height);
00087
00095 wxString trimDoubleString(wxString input);
00096
00104 void get_all_files_with_ext(const boost::filesystem::path& root, const std::string& ext, std::vector<boost::filesystem::path>& ret);
00105
00114 HalconCpp::HImage drawBoundingBox(HalconCpp::HImage image, std::vector<Eigen::Vector2i> corner_points);
00115
00116 #endif //UTILS_H_