HXLDExtPara.h 5.6 KB

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