HXLDPara.h 5.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147
  1. /***********************************************************
  2. * File generated by the HALCON-Compiler hcomp version 20.11
  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. /***************************************************************************
  27. * Operators *
  28. ***************************************************************************/
  29. // Extract parallel XLD polygons enclosing a homogeneous area.
  30. HXLDModPara ModParallelsXld(const HImage& Image, HXLDExtPara* ExtParallels, const HTuple& Quality, Hlong MinGray, Hlong MaxGray, const HTuple& MaxStandard) const;
  31. // Extract parallel XLD polygons enclosing a homogeneous area.
  32. HXLDModPara ModParallelsXld(const HImage& Image, HXLDExtPara* ExtParallels, double Quality, Hlong MinGray, Hlong MaxGray, double MaxStandard) const;
  33. // Return information about the gray values of the area enclosed by XLD parallels.
  34. void InfoParallelsXld(const HImage& Image, double* QualityMin, double* QualityMax, Hlong* GrayMin, Hlong* GrayMax, double* StandardMin, double* StandardMax) const;
  35. // Calculate the difference of two object tuples.
  36. HXLDPara ObjDiff(const HXLDPara& ObjectsSub) const;
  37. // Copy an iconic object in the HALCON database.
  38. HXLDPara CopyObj(Hlong Index, Hlong NumObj) const;
  39. // Concatenate two iconic object tuples.
  40. HXLDPara ConcatObj(const HXLDPara& Objects2) const;
  41. // Select objects from an object tuple.
  42. HXLDPara SelectObj(const HTuple& Index) const;
  43. // Select objects from an object tuple.
  44. HXLDPara SelectObj(Hlong Index) const;
  45. // Compare iconic objects regarding equality.
  46. Hlong CompareObj(const HXLDPara& Objects2, const HTuple& Epsilon) const;
  47. // Compare iconic objects regarding equality.
  48. Hlong CompareObj(const HXLDPara& Objects2, double Epsilon) const;
  49. // Compare image objects regarding equality.
  50. Hlong TestEqualObj(const HXLDPara& 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, HXLDPara* 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, HXLDPara* 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, HXLDPara* 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, HXLDPara* Meshes, Hlong GridSpacing, const wchar_t* Rotation, const HTuple& Row, const HTuple& Column, const wchar_t* MapType) const;
  60. #endif
  61. // Choose all contours or polygons containing a given point.
  62. HXLDPara SelectXldPoint(const HTuple& Row, const HTuple& Column) const;
  63. // Choose all contours or polygons containing a given point.
  64. HXLDPara SelectXldPoint(double Row, double Column) const;
  65. // Select contours or polygons using shape features.
  66. HXLDPara SelectShapeXld(const HTuple& Features, const HString& Operation, const HTuple& Min, const HTuple& Max) const;
  67. // Select contours or polygons using shape features.
  68. HXLDPara SelectShapeXld(const HString& Features, const HString& Operation, double Min, double Max) const;
  69. // Select contours or polygons using shape features.
  70. HXLDPara SelectShapeXld(const char* Features, const char* Operation, double Min, double Max) const;
  71. #ifdef _WIN32
  72. // Select contours or polygons using shape features.
  73. HXLDPara SelectShapeXld(const wchar_t* Features, const wchar_t* Operation, double Min, double Max) const;
  74. #endif
  75. // Transform the shape of contours or polygons.
  76. HXLDPara ShapeTransXld(const HString& Type) const;
  77. // Transform the shape of contours or polygons.
  78. HXLDPara ShapeTransXld(const char* Type) const;
  79. #ifdef _WIN32
  80. // Transform the shape of contours or polygons.
  81. HXLDPara ShapeTransXld(const wchar_t* Type) const;
  82. #endif
  83. // Insert objects into an iconic object tuple.
  84. HXLDPara InsertObj(const HXLDPara& ObjectsInsert, Hlong Index) const;
  85. // Remove objects from an iconic object tuple.
  86. HXLDPara RemoveObj(const HTuple& Index) const;
  87. // Remove objects from an iconic object tuple.
  88. HXLDPara RemoveObj(Hlong Index) const;
  89. // Replaces one or more elements of an iconic object tuple.
  90. HXLDPara ReplaceObj(const HXLDPara& ObjectsReplace, const HTuple& Index) const;
  91. // Replaces one or more elements of an iconic object tuple.
  92. HXLDPara ReplaceObj(const HXLDPara& ObjectsReplace, Hlong Index) const;
  93. private:
  94. // Verify matching semantic type ('xld_para')!
  95. void AssertObjectClass();
  96. };
  97. }
  98. #endif