24 #include <asr_halcon_bridge/halcon_image.h> 25 #include <boost/regex.hpp> 28 #include <boost/thread.hpp> 90 HalconCpp::HRegion region;
91 region.GenRectangle1(row1, column1, row2, column2);
92 HalconCpp::HImage croppedImage =
fixedImage.ReduceDomain(region);
93 croppedImage = croppedImage.ChangeFormat(croppedImage.Width(), croppedImage.Height());
103 img = img.ZoomImageSize(480, 360,
"bilinear");
162 choice_image->Insert(wxString(
"<No selection>", wxConvUTF8), 0);
211 if ((msg->encoding ==
"bgr8") || (msg->encoding ==
"rgb8") || (msg->encoding ==
"mono8")) {
214 fixedImage = *halcon_bridge::toHalconCopy(*msg)->image;
242 HalconCpp::HImage img;
243 std::string enc =
"rgb8";
246 std::string filename_str = input_path.string() + std::string(
choice_test_image->GetStringSelection().mb_str());
247 img = HalconCpp::HImage(filename_str.c_str());
250 img = *halcon_bridge::toHalconCopy(msg)->image;
253 HalconCpp::HTuple sc, search_all_row, search_all_column, search_row, search_column, model_row, model_column;
254 HalconCpp::HTuple color(255);
256 img = img.Rgb1ToGray();
265 double set_score = boost::lexical_cast<
double>(
trim(std::string(
edit_score_2D->GetValue().mb_str())));
266 if ((set_score <= 0) || (set_score >= 1)) {
269 img.FindUncalibDescriptorModel(
desc_model, HalconCpp::HTuple(), HalconCpp::HTuple(), HalconCpp::HTuple(), HalconCpp::HTuple(), set_score, 1,
"inlier_ratio", &sc);
274 desc_model.GetDescriptorModelPoints(
"search",
"all", &search_all_row, &search_all_column);
277 desc_model.GetDescriptorModelPoints(
"search", 0, &search_row, &search_column);
279 if (search_row.Length() > 0) {
280 HalconCpp::HRegion points;
281 points.GenRegionPoints(search_row, search_column);
282 HalconCpp::HString type =
"fill";
283 img = points.PaintRegion(img, color, type);
287 HalconCpp::HTuple matrix_tuple =
desc_model.GetDescriptorModelResults(0,
"homography");
288 HalconCpp::HHomMat2D matrix;
289 matrix.SetFromTuple(matrix_tuple);
291 double trans_x, trans_y, trans_w;
292 trans_x = matrix.ProjectiveTransPoint2d(vertical_offset, horizontal_offset, 1, &trans_y, &trans_w);
294 int tex_point_row = (int) (trans_x / trans_w);
295 int tex_point_column = (int) (trans_y / trans_w);
297 HalconCpp::HXLDCont tex_point;
298 tex_point.GenCircleContourXld(tex_point_row, tex_point_column, 10, 0, 6.28318,
"positive", 1);
299 img = tex_point.PaintXld(img, color);
308 }
catch (HalconCpp::HException exc) {
312 if (sc.Length() > 0) {
322 desc_model.GetDescriptorModelPoints(
"model",
"all", &model_row, &model_column);
328 paint_thread.timed_join(boost::posix_time::millisec(100));
348 EndModal(wxID_CANCEL);
354 sensor_msgs::ImageConstPtr msg;
366 wxMessageDialog *dial =
new wxMessageDialog(
this,
367 wxT(
"Are you sure you want to cancel?"), wxT(
"Cancel"),
368 wxYES_NO | wxNO_DEFAULT | wxICON_QUESTION);
369 if (dial->ShowModal() == wxID_YES) {
373 EndModal(wxID_CANCEL);
383 wxBitmap* empty =
new wxBitmap(wxImage(480, 360));
386 choice_image->Insert(wxString(
"<No selection>", wxConvUTF8), 0);
401 std::vector<boost::filesystem::path> files;
405 std::sort(files.begin(), files.end());
406 for (
unsigned int i = 0; i < files.size(); i++) {
407 choice_image->AppendString(wxString(files[i].
string().c_str(), wxConvUTF8));
414 std::vector<std::string> image_topics;
418 for (ros::master::V_TopicInfo::iterator it = master_topics.begin() ; it != master_topics.end(); it++) {
420 if (info.
datatype ==
"sensor_msgs/Image") {
421 image_topics.push_back(info.
name);
424 std::sort(image_topics.begin(), image_topics.end());
425 for (
unsigned int i = 0; i < image_topics.size(); i++) {
426 choice_image->Insert(wxString(image_topics.at(i).c_str(), wxConvUTF8),i + 1);
516 std::string str = std::string(
choice_image->GetStringSelection().mb_str());
520 wxString
filename = wxString(input_path.string().c_str(), wxConvUTF8) +
choice_image->GetStringSelection();
521 wxImage image(filename);
522 image = image.Scale(480, 360);
528 std::string filename_str = input_path.string() + std::string(
choice_image->GetStringSelection().mb_str());
529 fixedImage = HalconCpp::HImage(filename_str.c_str());
553 wxBitmap* empty =
new wxBitmap(wxImage(480, 360));
573 std::vector<boost::filesystem::path> files;
577 std::sort(files.begin(), files.end());
578 for (
unsigned int i = 0; i < files.size(); i++) {
579 choice_test_image->AppendString(wxString(files[i].
string().c_str(), wxConvUTF8));
586 std::vector<std::string> image_topics;
590 for (ros::master::V_TopicInfo::iterator it = master_topics.begin() ; it != master_topics.end(); it++) {
592 if (info.
datatype ==
"sensor_msgs/Image") {
593 image_topics.push_back(info.
name);
596 std::sort(image_topics.begin(), image_topics.end());
597 for (
unsigned int i = 0; i < image_topics.size(); i++) {
598 choice_test_image->Insert(wxString(image_topics.at(i).c_str(), wxConvUTF8),i + 1);
612 wxImage image(filename);
613 image = image.Scale(480, 360);
654 wxMessageDialog *dial =
new wxMessageDialog(
this,
655 wxT(
"No descriptor model with current parameters available. Do you want to create one? This can take several minutes!"), wxT(
"Warning"),
656 wxYES_NO | wxNO_DEFAULT | wxICON_QUESTION);
657 if (dial->ShowModal() == wxID_YES) {
664 int depth = boost::lexical_cast<
int>(
trim(std::string(
edit_depth->GetValue().mb_str())));
665 int number_ferns = boost::lexical_cast<
int>(
trim(std::string(
edit_fern_number->GetValue().mb_str())));
666 int patch_size = boost::lexical_cast<
int>(
trim(std::string(
edit_patch_size->GetValue().mb_str())));
667 double min_scale = boost::lexical_cast<
double>(
trim(std::string(
edit_min_scale->GetValue().mb_str())));
668 double max_scale = boost::lexical_cast<
double>(
trim(std::string(
edit_max_scale->GetValue().mb_str())));
671 CreateTestModelDialog *createTestModeldialog =
new CreateTestModelDialog(
this, &
desc_model,
fixedImage.CropRectangle1(row1, column1, row2, column2), depth, number_ferns, patch_size, min_scale, max_scale, use_color);
672 if (createTestModeldialog ->ShowModal() == wxID_OK) {
692 wxMessageDialog *dial =
new wxMessageDialog(
this,
693 wxT(
"Error creating model"), wxT(
"Error"), wxOK | wxICON_ERROR);
699 wxMessageDialog *dial =
new wxMessageDialog(
this,
700 wxT(
"No image selected!"), wxT(
"Warning"), wxOK | wxICON_WARNING);
704 wxMessageDialog *dial =
new wxMessageDialog(
this,
705 wxT(
"No test image topic selected!"), wxT(
"Warning"), wxOK | wxICON_WARNING);
720 wxMessageDialog *dial =
new wxMessageDialog(
this,
721 wxT(
"Are you sure you want to cancel?"), wxT(
"Cancel"),
722 wxYES_NO | wxNO_DEFAULT | wxICON_QUESTION);
723 if (dial->ShowModal() == wxID_YES) {
727 EndModal(wxID_CANCEL);
737 std::string score_2D_string =
trim(std::string(
edit_score_2D->GetValue().mb_str()));
746 std::string depth_string =
trim(std::string(
edit_depth->GetValue().mb_str()));
755 std::string min_scale_string =
trim(std::string(
edit_min_scale->GetValue().mb_str()));
758 std::string max_scale_string =
trim(std::string(
edit_max_scale->GetValue().mb_str()));
762 if (
check_string_redex(orientation_x_string, boost::regex(
"^[-+]?[0-9]+(\\.[0-9]+)?$"))) {
765 if (
check_string_redex(orientation_y_string, boost::regex(
"^[-+]?[0-9]+(\\.[0-9]+)?$"))) {
768 if (
check_string_redex(orientation_z_string, boost::regex(
"^[-+]?[0-9]+(\\.[0-9]+)?$"))) {
770 bool axes_valid =
true;
773 std::string axis_1_x_string =
trim(std::string(
edit_axis_1_x->GetValue().mb_str()));
776 std::string axis_1_y_string =
trim(std::string(
edit_axis_1_y->GetValue().mb_str()));
779 std::string axis_1_z_string =
trim(std::string(
edit_axis_1_z->GetValue().mb_str()));
783 double axis_1_x = boost::lexical_cast<
double>(
trim(std::string(
edit_axis_1_x->GetValue().mb_str())));
784 double axis_1_y = boost::lexical_cast<
double>(
trim(std::string(
edit_axis_1_y->GetValue().mb_str())));
785 double axis_1_z = boost::lexical_cast<
double>(
trim(std::string(
edit_axis_1_z->GetValue().mb_str())));
786 double axis_1_angle = boost::lexical_cast<
double>(
trim(std::string(
edit_axis_1_angle->GetValue().mb_str())));
787 Eigen::Vector3d axis_1(axis_1_x, axis_1_y, axis_1_z);
793 std::string axis_2_x_string =
trim(std::string(
edit_axis_2_x->GetValue().mb_str()));
796 std::string axis_2_y_string =
trim(std::string(
edit_axis_2_y->GetValue().mb_str()));
799 std::string axis_2_z_string =
trim(std::string(
edit_axis_2_z->GetValue().mb_str()));
803 double axis_2_x = boost::lexical_cast<
double>(
trim(std::string(
edit_axis_2_x->GetValue().mb_str())));
804 double axis_2_y = boost::lexical_cast<
double>(
trim(std::string(
edit_axis_2_y->GetValue().mb_str())));
805 double axis_2_z = boost::lexical_cast<
double>(
trim(std::string(
edit_axis_2_z->GetValue().mb_str())));
806 double axis_2_angle = boost::lexical_cast<
double>(
trim(std::string(
edit_axis_2_angle->GetValue().mb_str())));
807 Eigen::Vector3d axis_2(axis_2_x, axis_2_y, axis_2_z);
813 wxMessageDialog *dial =
new wxMessageDialog(
this,
814 wxT(
"Axis 2 (z) is not valid!"), wxT(
"Error"), wxOK | wxICON_ERROR);
819 wxMessageDialog *dial =
new wxMessageDialog(
this,
820 wxT(
"Axis 2 (y) is not valid!"), wxT(
"Error"), wxOK | wxICON_ERROR);
825 wxMessageDialog *dial =
new wxMessageDialog(
this,
826 wxT(
"Axis 2 (x) is not valid!"), wxT(
"Error"), wxOK | wxICON_ERROR);
834 wxMessageDialog *dial =
new wxMessageDialog(
this,
835 wxT(
"Axis 1 (z) is not valid!"), wxT(
"Error"), wxOK | wxICON_ERROR);
840 wxMessageDialog *dial =
new wxMessageDialog(
this,
841 wxT(
"Axis 1 (y) is not valid!"), wxT(
"Error"), wxOK | wxICON_ERROR);
846 wxMessageDialog *dial =
new wxMessageDialog(
this,
847 wxT(
"Axis 1 (x) is not valid!"), wxT(
"Error"), wxOK | wxICON_ERROR);
863 double orientation_x = boost::lexical_cast<
double>(
trim(std::string(
edit_orientation_x->GetValue().mb_str())));
864 double orientation_y = boost::lexical_cast<
double>(
trim(std::string(
edit_orientation_y->GetValue().mb_str())));
865 double orientation_z = boost::lexical_cast<
double>(
trim(std::string(
edit_orientation_z->GetValue().mb_str())));
866 Eigen::Vector3d orientation(orientation_x, orientation_y, orientation_z);
868 double score_2D = boost::lexical_cast<
double>(
trim(std::string(
edit_score_2D->GetValue().mb_str())));
874 int depth = boost::lexical_cast<
int>(
trim(std::string(
edit_depth->GetValue().mb_str())));
876 int number_ferns = boost::lexical_cast<
int>(
trim(std::string(
edit_fern_number->GetValue().mb_str())));
878 int patch_size = boost::lexical_cast<
int>(
trim(std::string(
edit_patch_size->GetValue().mb_str())));
880 double min_scale = boost::lexical_cast<
double>(
trim(std::string(
edit_min_scale->GetValue().mb_str())));
882 double max_scale = boost::lexical_cast<
double>(
trim(std::string(
edit_max_scale->GetValue().mb_str())));
899 wxMessageDialog *dial =
new wxMessageDialog(
this,
900 wxT(
"Orientation (z) is not valid!"), wxT(
"Error"), wxOK | wxICON_ERROR);
904 wxMessageDialog *dial =
new wxMessageDialog(
this,
905 wxT(
"Orientation (y) is not valid!"), wxT(
"Error"), wxOK | wxICON_ERROR);
909 wxMessageDialog *dial =
new wxMessageDialog(
this,
910 wxT(
"Orientation (x) is not valid!"), wxT(
"Error"), wxOK | wxICON_ERROR);
914 wxMessageDialog *dial =
new wxMessageDialog(
this,
915 wxT(
"Max. scale is not valid!"), wxT(
"Error"), wxOK | wxICON_ERROR);
919 wxMessageDialog *dial =
new wxMessageDialog(
this,
920 wxT(
"Min. scale is not valid!"), wxT(
"Error"), wxOK | wxICON_ERROR);
924 wxMessageDialog *dial =
new wxMessageDialog(
this,
925 wxT(
"Patch size is not valid!"), wxT(
"Error"), wxOK | wxICON_ERROR);
929 wxMessageDialog *dial =
new wxMessageDialog(
this,
930 wxT(
"Fern number is not valid!"), wxT(
"Error"), wxOK | wxICON_ERROR);
934 wxMessageDialog *dial =
new wxMessageDialog(
this,
935 wxT(
"Depth is not valid!"), wxT(
"Error"), wxOK | wxICON_ERROR);
939 wxMessageDialog *dial =
new wxMessageDialog(
this,
940 wxT(
"Horizontal offset is not valid!"), wxT(
"Error"), wxOK | wxICON_ERROR);
944 wxMessageDialog *dial =
new wxMessageDialog(
this,
945 wxT(
"Vertical offset is not valid!"), wxT(
"Error"), wxOK | wxICON_ERROR);
949 wxMessageDialog *dial =
new wxMessageDialog(
this,
950 wxT(
"Score is not valid!"), wxT(
"Error"), wxOK | wxICON_ERROR);
954 wxMessageDialog *dial =
new wxMessageDialog(
this,
955 wxT(
"No image selected!"), wxT(
"Error"), wxOK | wxICON_ERROR);
981 int upperLeftRow = boost::lexical_cast<
int>(upperLeftRowString);
982 int lowerRightRow = boost::lexical_cast<
int>(lowerRightRowString);
985 if (lowerRightRow <= upperLeftRow) {
1011 int upperLeftColumn = boost::lexical_cast<
int>(upperLeftColumnString);
1012 int lowerRightColumn = boost::lexical_cast<
int>(lowerRightColumnString);
1015 if (lowerRightColumn <= upperLeftColumn) {
1043 int lowerRightRow = boost::lexical_cast<
int>(lowerRightRowString);
1044 int upperLeftRow = boost::lexical_cast<
int>(upperLeftRowString);
1045 if ((lowerRightRow <= slider_lower_right_row->GetMax()) && (lowerRightRow >= 2)) {
1047 if (upperLeftRow >= lowerRightRow) {
1074 int lowerRightColumn = boost::lexical_cast<
int>(lowerRightColumnString);
1075 int upperLeftColumn = boost::lexical_cast<
int>(upperLeftColumnString);
1076 if ((lowerRightColumn <= slider_lower_right_column->GetMax()) && (lowerRightColumn >= 2)) {
1078 if (upperLeftColumn >= lowerRightColumn) {
1100 if (upperLeftRowValue <= slider_upper_left_row->GetMax() - 2) {
1122 if (upperLeftColumnValue <= slider_upper_left_column->GetMax() - 2) {
1144 if (lowerRightRowValue >= 2) {
1166 if (lowerRightColumnValue >= 2) {
1255 std::string depth_string =
trim(std::string(
edit_depth->GetValue().mb_str()));
1257 int depth = boost::lexical_cast<
int>(
trim(std::string(
edit_depth->GetValue().mb_str())));
1258 if ((depth <= 0) || (depth > 15)) {
1266 HalconCpp::HTuple detName, detValue, descName, descParam;
1267 desc_model.GetDescriptorModelParams(&detName, &detValue, &descName, &descParam);
1268 int curr_depth = boost::lexical_cast<
int>(
trim(std::string(
edit_depth->GetValue().mb_str())));
1269 if (curr_depth != (
int)descParam[0]) {
1280 int fern_number = boost::lexical_cast<
int>(
trim(std::string(
edit_fern_number->GetValue().mb_str())));
1281 if ((fern_number <= 0) || (fern_number > 500)) {
1289 HalconCpp::HTuple detName, detValue, descName, descParam;
1290 desc_model.GetDescriptorModelParams(&detName, &detValue, &descName, &descParam);
1291 int curr_ferns = boost::lexical_cast<
int>(
trim(std::string(
edit_fern_number->GetValue().mb_str())));
1292 if (curr_ferns != (
int)descParam[1]) {
1303 int patch_size = boost::lexical_cast<
int>(
trim(std::string(
edit_patch_size->GetValue().mb_str())));
1304 if ((patch_size <= 10) || (patch_size > 40) || (patch_size % 2 == 0)) {
1312 HalconCpp::HTuple detName, detValue, descName, descParam;
1313 desc_model.GetDescriptorModelParams(&detName, &detValue, &descName, &descParam);
1314 int curr_patches = boost::lexical_cast<
int>(
trim(std::string(
edit_patch_size->GetValue().mb_str())));
1315 if (curr_patches != (
int)descParam[2]) {
1324 std::string min_scale_string =
trim(std::string(
edit_min_scale->GetValue().mb_str()));
1326 double min_scale = boost::lexical_cast<
double>(
trim(std::string(
edit_min_scale->GetValue().mb_str())));
1327 if ((min_scale < 0.2) || (min_scale > 1.2)) {
1335 HalconCpp::HTuple detName, detValue, descName, descParam;
1336 desc_model.GetDescriptorModelParams(&detName, &detValue, &descName, &descParam);
1337 double curr_min_scale = boost::lexical_cast<
double>(
trim(std::string(
edit_min_scale->GetValue().mb_str())));
1338 if (curr_min_scale != (
double)descParam[8]) {
1347 std::string max_scale_string =
trim(std::string(
edit_max_scale->GetValue().mb_str()));
1349 double max_scale = boost::lexical_cast<
double>(
trim(std::string(
edit_max_scale->GetValue().mb_str())));
1350 if ((max_scale < 0.8) || (max_scale > 1.8)) {
1358 HalconCpp::HTuple detName, detValue, descName, descParam;
1359 desc_model.GetDescriptorModelParams(&detName, &detValue, &descName, &descParam);
1360 double curr_max_scale = boost::lexical_cast<
double>(
trim(std::string(
edit_max_scale->GetValue().mb_str())));
1361 if (curr_max_scale != (
double)descParam[9]) {
1407 double angle = boost::lexical_cast<
double>(
trim(std::string(
edit_axis_1_angle->GetValue().mb_str())));
1408 if ((angle <= 0) || (angle >= 360)) {
1444 double angle = boost::lexical_cast<
double>(
trim(std::string(
edit_axis_2_angle->GetValue().mb_str())));
1445 if ((angle <= 0) || (angle >= 360)) {
void onEditTextOrientationZ(wxFocusEvent &event)
wxStaticText * label_axis_2_angle
void onEditTextMaxScaleEnter(wxCommandEvent &event)
wxButton * button_start_test
Eigen::Vector3d getOrientation()
void onModelCameraImage(const sensor_msgs::Image::ConstPtr &msg)
The callback function for the image-topic-subscriber.
void setScore2D(double score_2D)
wxTextCtrl * edit_lower_right_column
void enableGuiElementsTest(bool enable=true)
Enables/Disables all Gui-elements which are not used during testing.
void onEditTextAxis2AngleEnter(wxCommandEvent &event)
void onEditTextAxis1ZEnter(wxCommandEvent &event)
void onEditTextScoreEnter(wxCommandEvent &event)
void onEditTextAxis2YEnter(wxCommandEvent &event)
void onEditTextOrientationXEnter(wxCommandEvent &event)
wxTextCtrl * edit_axis_2_z
void onEditTextOrientationYEnter(wxCommandEvent &event)
void onEditTextAxis1Angle(wxFocusEvent &event)
wxTextCtrl * edit_upper_left_row
wxTextCtrl * edit_axis_2_angle
void onCheckUseColor(wxCommandEvent &event)
void onEditTextPatchSizeEnter(wxCommandEvent &event)
wxStaticText * label_matched_points_value
wxStaticText * label_search_points_value
wxTextCtrl * edit_horizontal_offset
wxSlider * slider_lower_right_column
void onEditTextLowerRightRowEnter(wxCommandEvent &event)
wxTextCtrl * edit_axis_2_x
void onButtonStartTestClicked(wxCommandEvent &event)
Subscriber subscribe(const std::string &topic, uint32_t queue_size, void(T::*fp)(M), T *obj, const TransportHints &transport_hints=TransportHints())
wxString trimDoubleString(wxString input)
Formats the given string by removing fractional zeros at the end of it.
wxTextCtrl * edit_min_scale
void onEditTextUpperLeftRow(wxFocusEvent &event)
Eigen::Vector3d getAxis2()
void onEditTextVerticalOffset(wxFocusEvent &event)
void onSlideUpperLeftRow(wxScrollEvent &event)
wxStaticText * label_average_matched_points_value
void onChoiceImage(wxCommandEvent &event)
wxStaticText * label_axis_2_y
void setImage(HalconCpp::HImage image)
HalconCpp::HImage getOriginalImage()
wxTextCtrl * edit_vertical_offset
wxTextCtrl * edit_orientation_z
void onEditTextDepth(wxFocusEvent &event)
ROSCPP_DECL bool getTopics(V_TopicInfo &topics)
wxTextCtrl * edit_orientation_x
wxImagePanel * image_model
wxStaticText * label_axis_1_angle
wxStaticText * label_average_score_value
void onEditTextAxis2ZEnter(wxCommandEvent &event)
void setPatchSize(int patch_size)
void setAxis2Angle(double axis2_angle)
wxTextCtrl * edit_patch_size
wxTextCtrl * edit_fern_number
void onChoiceTestImage(wxCommandEvent &event)
void setAxis2(Eigen::Vector3d axis2)
void onEditTextScore(wxFocusEvent &event)
wxButton * button_end_test
void setOriginalImage(HalconCpp::HImage original_image)
std::vector< TopicInfo > V_TopicInfo
void onCheckUseCurrentImage(wxCommandEvent &event)
wxStaticText * label_axis_2
void setMinScale(double min_scale)
wxCheckBox * check_use_color
void onEditTextAxis2Z(wxFocusEvent &event)
void onEditTextHorizontalOffsetEnter(wxCommandEvent &event)
void onEditTextAxis1Y(wxFocusEvent &event)
HalconCpp::HDescriptorModel desc_model
wxTextCtrl * edit_axis_2_y
wxChoice * choice_image_source
Eigen::Vector3d getAxis1()
wxStaticText * label_axis_1_y
std::string trim(std::string input)
Removes spaces from the beginning and end of the given string.
wxTextCtrl * edit_upper_left_column
void onUpdate(wxTimerEvent &evt)
The callback function for the update-timer.
HalconCpp::HImage fixedImage
wxStaticText * label_axis_1_z
void onEditTextUpperLeftColumnEnter(wxCommandEvent &event)
boost::thread paint_thread
void setOrientation(Eigen::Vector3d orientation)
wxSlider * slider_upper_left_row
void setHorizontalOffset(int horizontal_offset)
wxStaticText * label_axis_1_x
void onEditTextHorizontalOffset(wxFocusEvent &event)
const std::string ROTATIONTYPE_CYLINDER
wxStaticText * label_average_time_value
wxStaticText * label_model_points_value
void onChoiceImageSource(wxCommandEvent &event)
wxSlider * slider_lower_right_row
wxTextCtrl * edit_lower_right_row
void onTestCameraImage(const sensor_msgs::Image::ConstPtr &msg, bool use_file)
The callback function for the test-image-topic-subscriber.
void onEditTextLowerRightColumn(wxFocusEvent &event)
void OnDialogClose(wxCloseEvent &event)
const std::string ROTATIONTYPE_SPHERE
wxSlider * slider_upper_left_column
void onEditTextAxis1AngleEnter(wxCommandEvent &event)
void setNumberFerns(int number_ferns)
ViewParamsWrapper * params
void onEditTextPatchSize(wxFocusEvent &event)
void onEditTextAxis2Y(wxFocusEvent &event)
void onEditTextOrientationX(wxFocusEvent &event)
int getHorizontalOffset()
wxTextCtrl * edit_score_2D
void setMaxScale(double max_scale)
const std::string ROTATIONTYPE_NO_ROTATION
void enableGuiElements(bool enable=true)
Enables/Disables the Gui-elements used for setting the parameters.
void onCheckUpsideDown(wxCommandEvent &event)
void setUserColor(bool use_color)
ros::Subscriber image_model_sub
void onEditTextAxis1YEnter(wxCommandEvent &event)
void onEditTextMaxScale(wxFocusEvent &event)
wxChoice * choice_test_image
void onEditTextLowerRightColumnEnter(wxCommandEvent &event)
void onEditTextFernNumber(wxFocusEvent &event)
void onButtonEndTestClicked(wxCommandEvent &event)
void onEditTextAxis1X(wxFocusEvent &event)
void setAxis1(Eigen::Vector3d axis1)
bool check_string_redex(std::string to_check, boost::regex regex)
Checks a string with the given regex.
ROSLIB_DECL std::string getPath(const std::string &package_name)
void onButtonSaveClicked(wxCommandEvent &event)
void onEditTextAxis1Z(wxFocusEvent &event)
void onEditTextMinScaleEnter(wxCommandEvent &event)
wxStaticText * label_score_value
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.
wxCheckBox * check_fix_current_image
ros::Subscriber image_test_sub
wxStaticText * label_axis_2_z
void onEditTextDepthEnter(wxCommandEvent &event)
std::string getRotationType()
wxTextCtrl * edit_max_scale
bool desc_model_available
void onEditTextAxis2XEnter(wxCommandEvent &event)
void setImage(wxBitmap *image)
wxBitmap * createBitmap(const sensor_msgs::Image::ConstPtr &msg, int width, int height)
Converts a ros-image-message to a bitmap-file used by wxwidgets.
void onEditTextOrientationZEnter(wxCommandEvent &event)
void setIsValid(bool is_valid)
wxChoice * choice_test_image_source
void onEditTextUpperLeftColumn(wxFocusEvent &event)
void onEditTextUpperLeftRowEnter(wxCommandEvent &event)
wxStaticText * label_time_value
void onEditTextVerticalOffsetEnter(wxCommandEvent &event)
void onEditTextFernNumberEnter(wxCommandEvent &event)
wxTextCtrl * edit_axis_1_x
void paint_test_image(HalconCpp::HImage img)
Shows the given image on the right image panel.
wxImagePanel * image_test
wxCheckBox * check_invertable
void updateImageOnCrop()
Updates the shown image (left panel) after it was cropped with the sliders.
void onEditTextOrientationY(wxFocusEvent &event)
void onEditTextAxis2X(wxFocusEvent &event)
void onButtonCancelClicked(wxCommandEvent &event)
ViewCreatorDialog(wxWindow *parent, ViewParamsWrapper *params)
The constructor of this class.
void onSlideLowerRightColumn(wxScrollEvent &event)
wxTextCtrl * edit_axis_1_z
void onChoiceTestImageSource(wxCommandEvent &event)
void onSlideUpperLeftColumn(wxScrollEvent &event)
void onEditTextMinScale(wxFocusEvent &event)
ROSCPP_DECL void spinOnce()
void setAxis1Angle(double axis1_angle)
const std::string INPUT_FOLDER
wxTextCtrl * edit_axis_1_angle
void onEditTextAxis1XEnter(wxCommandEvent &event)
wxStaticText * label_axis_1
wxTextCtrl * edit_axis_1_y
wxStaticText * label_model_available_value
void onSlideLowerRightRow(wxScrollEvent &event)
void setVerticalOffset(int vertical_offset)
bool fixed_image_available
wxStaticText * label_frame_number_value
void onEditTextLowerRightRow(wxFocusEvent &event)
void setImageBounds(int row1, int column1, int row2, int column2)
wxStaticText * label_axis_2_x
wxTextCtrl * edit_orientation_y
void onEditTextAxis2Angle(wxFocusEvent &event)
void setIsInvertible(bool is_invertible)