HXLDPara.h 6.0 KB

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