HXLDModPara.h 6.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153
  1. /***********************************************************
  2. * File generated by the HALCON-Compiler hcomp version 22.05
  3. * Usage: Interface to C++
  4. *
  5. * Software by: MVTec Software GmbH, www.mvtec.com
  6. ***********************************************************/
  7. #ifndef HCPP_HXLDMODPARA
  8. #define HCPP_HXLDMODPARA
  9. namespace HalconCpp
  10. {
  11. // Represents an instance of an XLD modified parallel object(-array).
  12. class LIntExport HXLDModPara : public HXLD
  13. {
  14. public:
  15. // Create an uninitialized instance
  16. HXLDModPara():HXLD() {}
  17. // Copy constructor
  18. HXLDModPara(const HXLDModPara& source) : HXLD(source) {}
  19. // Copy constructor
  20. HXLDModPara(const HObject& object);
  21. // Create HXLDModPara from object id. For copy=false takes
  22. // over management of input key. Type of key must match!
  23. explicit HXLDModPara(Hkey key, bool copy=true);
  24. // Access of object tuple element
  25. const HXLDModPara operator [] (Hlong index) const;
  26. // Deep copy of all data represented by this object instance
  27. HXLDModPara Clone() const;
  28. /***************************************************************************
  29. * Operators *
  30. ***************************************************************************/
  31. // Combine road hypotheses from two resolution levels.
  32. HXLDPoly CombineRoadsXld(const HXLDPoly& EdgePolygons, const HXLDExtPara& ExtParallels, const HXLDPoly& CenterLines, const HTuple& MaxAngleParallel, const HTuple& MaxAngleColinear, const HTuple& MaxDistanceParallel, const HTuple& MaxDistanceColinear) const;
  33. // Combine road hypotheses from two resolution levels.
  34. HXLDPoly CombineRoadsXld(const HXLDPoly& EdgePolygons, const HXLDExtPara& ExtParallels, const HXLDPoly& CenterLines, double MaxAngleParallel, double MaxAngleColinear, double MaxDistanceParallel, double MaxDistanceColinear) const;
  35. // Calculate the difference of two object tuples.
  36. HXLDModPara ObjDiff(const HXLDModPara& ObjectsSub) const;
  37. // Copy an iconic object in the HALCON database.
  38. HXLDModPara CopyObj(Hlong Index, Hlong NumObj) const;
  39. // Concatenate two iconic object tuples.
  40. HXLDModPara ConcatObj(const HXLDModPara& Objects2) const;
  41. // Select objects from an object tuple.
  42. HXLDModPara SelectObj(const HTuple& Index) const;
  43. // Select objects from an object tuple.
  44. HXLDModPara SelectObj(Hlong Index) const;
  45. // Compare iconic objects regarding equality.
  46. Hlong CompareObj(const HXLDModPara& Objects2, const HTuple& Epsilon) const;
  47. // Compare iconic objects regarding equality.
  48. Hlong CompareObj(const HXLDModPara& Objects2, double Epsilon) const;
  49. // Compare image objects regarding equality.
  50. Hlong TestEqualObj(const HXLDModPara& Objects2) const;
  51. // Compute the mapping between the distorted image and the rectified image based upon the points of a regular grid.
  52. HImage GenGridRectificationMap(const HImage& Image, HXLDModPara* Meshes, Hlong GridSpacing, const HTuple& Rotation, const HTuple& Row, const HTuple& Column, const HString& MapType) const;
  53. // Compute the mapping between the distorted image and the rectified image based upon the points of a regular grid.
  54. HImage GenGridRectificationMap(const HImage& Image, HXLDModPara* Meshes, Hlong GridSpacing, const HString& Rotation, const HTuple& Row, const HTuple& Column, const HString& MapType) const;
  55. // Compute the mapping between the distorted image and the rectified image based upon the points of a regular grid.
  56. HImage GenGridRectificationMap(const HImage& Image, HXLDModPara* Meshes, Hlong GridSpacing, const char* Rotation, const HTuple& Row, const HTuple& Column, const char* MapType) const;
  57. #ifdef _WIN32
  58. // Compute the mapping between the distorted image and the rectified image based upon the points of a regular grid.
  59. HImage GenGridRectificationMap(const HImage& Image, HXLDModPara* Meshes, Hlong GridSpacing, const wchar_t* Rotation, const HTuple& Row, const HTuple& Column, const wchar_t* MapType) const;
  60. #endif
  61. // Deserialize a serialized XLD object.
  62. void DeserializeXld(const HSerializedItem& SerializedItemHandle);
  63. // Serialize an XLD object.
  64. HSerializedItem SerializeXld() const;
  65. // Choose all contours or polygons containing a given point.
  66. HXLDModPara SelectXldPoint(const HTuple& Row, const HTuple& Column) const;
  67. // Choose all contours or polygons containing a given point.
  68. HXLDModPara SelectXldPoint(double Row, double Column) const;
  69. // Select contours or polygons using shape features.
  70. HXLDModPara SelectShapeXld(const HTuple& Features, const HString& Operation, const HTuple& Min, const HTuple& Max) const;
  71. // Select contours or polygons using shape features.
  72. HXLDModPara SelectShapeXld(const HString& Features, const HString& Operation, double Min, double Max) const;
  73. // Select contours or polygons using shape features.
  74. HXLDModPara SelectShapeXld(const char* Features, const char* Operation, double Min, double Max) const;
  75. #ifdef _WIN32
  76. // Select contours or polygons using shape features.
  77. HXLDModPara SelectShapeXld(const wchar_t* Features, const wchar_t* Operation, double Min, double Max) const;
  78. #endif
  79. // Transform the shape of contours or polygons.
  80. HXLDModPara ShapeTransXld(const HString& Type) const;
  81. // Transform the shape of contours or polygons.
  82. HXLDModPara ShapeTransXld(const char* Type) const;
  83. #ifdef _WIN32
  84. // Transform the shape of contours or polygons.
  85. HXLDModPara ShapeTransXld(const wchar_t* Type) const;
  86. #endif
  87. // Insert objects into an iconic object tuple.
  88. HXLDModPara InsertObj(const HXLDModPara& ObjectsInsert, Hlong Index) const;
  89. // Remove objects from an iconic object tuple.
  90. HXLDModPara RemoveObj(const HTuple& Index) const;
  91. // Remove objects from an iconic object tuple.
  92. HXLDModPara RemoveObj(Hlong Index) const;
  93. // Replaces one or more elements of an iconic object tuple.
  94. HXLDModPara ReplaceObj(const HXLDModPara& ObjectsReplace, const HTuple& Index) const;
  95. // Replaces one or more elements of an iconic object tuple.
  96. HXLDModPara ReplaceObj(const HXLDModPara& ObjectsReplace, Hlong Index) const;
  97. private:
  98. // Verify matching semantic type ('xld_mod_para')!
  99. void AssertObjectClass();
  100. };
  101. }
  102. #endif