00001 00021 #ifndef OBJECT_DESCRIPTOR_H 00022 #define OBJECT_DESCRIPTOR_H 00023 00024 #include <string> 00025 #include <HalconCpp.h> 00026 #include "object_view_descriptor.h" 00027 00028 00029 namespace descriptor_surface_based_recognition { 00030 00034 class ObjectDescriptor { 00035 00036 private: 00037 00039 std::string name_; 00040 00042 HalconCpp::HSurfaceModel surface_model_; 00043 00045 std::string mesh_name_; 00046 00048 int rotation_model_type_; 00049 00051 Eigen::Vector3d orientation_; 00052 00054 double diameter_; 00055 00057 double score_3D_; 00058 00060 std::vector<ObjectViewDescriptor> model_view_descriptors_; 00061 00063 bool valid_object_; 00064 00066 int instance_count_; 00067 00068 bool use_pose_val_; 00069 00070 public: 00071 00075 static const int ROTATION_MODEL_NONE = 0; 00076 static const int ROTATION_MODEL_CYLINDER = 1; 00077 static const int ROTATION_MODEL_SPHERE = 2; 00078 00086 ObjectDescriptor(std::string folder_path, std::string xml_path, int instance_count, bool use_pose_val); 00087 00093 bool isValid() const; 00094 00098 std::string getName() const; 00099 HalconCpp::HSurfaceModel getSurfaceModel() const; 00100 std::string getMesh() const; 00101 int getRotationModelType() const; 00102 Eigen::Vector3d getOrientation() const; 00103 double getDiameter() const; 00104 double getScore3D() const; 00105 int getInstanceCount() const; 00106 std::vector<ObjectViewDescriptor> getModelViewDescriptors() const; 00107 bool getUsePoseVal() const; 00108 00112 void setCount(int count); 00113 void setUsePoseVal(bool usePoseVal); 00114 }; 00115 00116 } 00117 #endif