Utils.h
Go to the documentation of this file.
1 
21 #ifndef UTILS_H_
22 #define UTILS_H_
23 
24 #include <boost/regex.hpp>
25 #include <wx/wx.h>
26 #include <sensor_msgs/Image.h>
27 #include <HalconCpp.h>
28 #include <boost/filesystem.hpp>
29 #include <Eigen/Dense>
30 
37 const std::string ROTATIONTYPE_NO_ROTATION = "No Rotation";
38 
40 const std::string ROTATIONTYPE_CYLINDER = "Cylinder";
41 
43 const std::string ROTATIONTYPE_SPHERE = "Sphere";
44 
46 const std::string INPUT_FOLDER = "/trainer_data/input";
47 
49 const std::string OUTPUT_FOLDER = "/trainer_data/output";
50 
51 
57 bool check_string_redex(std::string to_check, boost::regex regex);
58 
64 std::string trim(std::string input);
65 
75 wxBitmap* createBitmap(const sensor_msgs::Image::ConstPtr& msg, int width, int height);
76 
86 wxBitmap* createBitmap(HalconCpp::HImage image, int width, int height);
87 
95 wxString trimDoubleString(wxString input);
96 
104 void get_all_files_with_ext(const boost::filesystem::path& root, const std::string& ext, std::vector<boost::filesystem::path>& ret);
105 
114 HalconCpp::HImage drawBoundingBox(HalconCpp::HImage image, std::vector<Eigen::Vector2i> corner_points);
115 
116 #endif //UTILS_H_
wxString trimDoubleString(wxString input)
Formats the given string by removing fractional zeros at the end of it.
Definition: Utils.cpp:86
HalconCpp::HImage drawBoundingBox(HalconCpp::HImage image, std::vector< Eigen::Vector2i > corner_points)
Draws a bounding box on the given image with the also given corner-points.
Definition: Utils.cpp:118
std::string trim(std::string input)
Removes spaces from the beginning and end of the given string.
Definition: Utils.cpp:34
const std::string ROTATIONTYPE_CYLINDER
Definition: Utils.h:40
const std::string ROTATIONTYPE_SPHERE
Definition: Utils.h:43
const std::string ROTATIONTYPE_NO_ROTATION
Definition: Utils.h:37
bool check_string_redex(std::string to_check, boost::regex regex)
Checks a string with the given regex.
Definition: Utils.cpp:27
void get_all_files_with_ext(const boost::filesystem::path &root, const std::string &ext, std::vector< boost::filesystem::path > &ret)
Gets all files in a directory with a specific extension.
Definition: Utils.cpp:103
wxBitmap * createBitmap(const sensor_msgs::Image::ConstPtr &msg, int width, int height)
Converts a ros-image-message to a bitmap-file used by wxwidgets.
Definition: Utils.cpp:40
const std::string INPUT_FOLDER
Definition: Utils.h:46
const std::string OUTPUT_FOLDER
Definition: Utils.h:49


asr_descriptor_surface_based_recognition
Author(s): Allgeyer Tobias, Hutmacher Robin, Meißner Pascal
autogenerated on Mon Dec 16 2019 03:31:15