HSurfaceMatchingResult.h 9.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189
  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_HSURFACEMATCHINGRESULT
  8. #define HCPP_HSURFACEMATCHINGRESULT
  9. namespace HalconCpp
  10. {
  11. // Represents an instance of a surface matching result.
  12. class LIntExport HSurfaceMatchingResult : public HHandle
  13. {
  14. public:
  15. // Create an uninitialized instance
  16. HSurfaceMatchingResult():HHandle() {}
  17. // Copy constructor
  18. HSurfaceMatchingResult(const HSurfaceMatchingResult& source) : HHandle(source) {}
  19. // Copy constructor
  20. HSurfaceMatchingResult(const HHandle& handle);
  21. // Create HSurfaceMatchingResult from handle, taking ownership
  22. explicit HSurfaceMatchingResult(Hlong handle);
  23. bool operator==(const HHandle& obj) const
  24. {
  25. return HHandleBase::operator==(obj);
  26. }
  27. bool operator!=(const HHandle& obj) const
  28. {
  29. return HHandleBase::operator!=(obj);
  30. }
  31. protected:
  32. // Verify matching semantic type ('surface_matching_result')!
  33. virtual void AssertType(Hphandle handle) const;
  34. public:
  35. /***************************************************************************
  36. * Operators *
  37. ***************************************************************************/
  38. // Get details of a result from surface based matching.
  39. HTuple GetSurfaceMatchingResult(const HTuple& ResultName, Hlong ResultIndex) const;
  40. // Get details of a result from surface based matching.
  41. HTuple GetSurfaceMatchingResult(const HString& ResultName, Hlong ResultIndex) const;
  42. // Get details of a result from surface based matching.
  43. HTuple GetSurfaceMatchingResult(const char* ResultName, Hlong ResultIndex) const;
  44. #ifdef _WIN32
  45. // Get details of a result from surface based matching.
  46. HTuple GetSurfaceMatchingResult(const wchar_t* ResultName, Hlong ResultIndex) const;
  47. #endif
  48. // Free the memory of a surface matching result.
  49. static void ClearSurfaceMatchingResult(const HSurfaceMatchingResultArray& SurfaceMatchingResultID);
  50. // Free the memory of a surface matching result.
  51. void ClearSurfaceMatchingResult() const;
  52. // Refine the pose of a surface model in a 3D scene.
  53. static HPoseArray RefineSurfaceModelPose(const HSurfaceModel& SurfaceModelID, const HObjectModel3D& ObjectModel3D, const HPoseArray& InitialPose, const HTuple& MinScore, const HString& ReturnResultHandle, const HTuple& GenParamName, const HTuple& GenParamValue, HTuple* Score, HSurfaceMatchingResultArray* SurfaceMatchingResultID);
  54. // Refine the pose of a surface model in a 3D scene.
  55. HPose RefineSurfaceModelPose(const HSurfaceModel& SurfaceModelID, const HObjectModel3D& ObjectModel3D, const HPose& InitialPose, double MinScore, const HString& ReturnResultHandle, const HTuple& GenParamName, const HTuple& GenParamValue, HTuple* Score);
  56. // Refine the pose of a surface model in a 3D scene.
  57. HPose RefineSurfaceModelPose(const HSurfaceModel& SurfaceModelID, const HObjectModel3D& ObjectModel3D, const HPose& InitialPose, double MinScore, const char* ReturnResultHandle, const HTuple& GenParamName, const HTuple& GenParamValue, HTuple* Score);
  58. #ifdef _WIN32
  59. // Refine the pose of a surface model in a 3D scene.
  60. HPose RefineSurfaceModelPose(const HSurfaceModel& SurfaceModelID, const HObjectModel3D& ObjectModel3D, const HPose& InitialPose, double MinScore, const wchar_t* ReturnResultHandle, const HTuple& GenParamName, const HTuple& GenParamValue, HTuple* Score);
  61. #endif
  62. // Find the best matches of a surface model in a 3D scene.
  63. static HPoseArray FindSurfaceModel(const HSurfaceModel& SurfaceModelID, const HObjectModel3D& ObjectModel3D, double RelSamplingDistance, double KeyPointFraction, const HTuple& MinScore, const HString& ReturnResultHandle, const HTuple& GenParamName, const HTuple& GenParamValue, HTuple* Score, HSurfaceMatchingResultArray* SurfaceMatchingResultID);
  64. // Find the best matches of a surface model in a 3D scene.
  65. HPose FindSurfaceModel(const HSurfaceModel& SurfaceModelID, const HObjectModel3D& ObjectModel3D, double RelSamplingDistance, double KeyPointFraction, double MinScore, const HString& ReturnResultHandle, const HTuple& GenParamName, const HTuple& GenParamValue, HTuple* Score);
  66. // Find the best matches of a surface model in a 3D scene.
  67. HPose FindSurfaceModel(const HSurfaceModel& SurfaceModelID, const HObjectModel3D& ObjectModel3D, double RelSamplingDistance, double KeyPointFraction, double MinScore, const char* ReturnResultHandle, const HTuple& GenParamName, const HTuple& GenParamValue, HTuple* Score);
  68. #ifdef _WIN32
  69. // Find the best matches of a surface model in a 3D scene.
  70. HPose FindSurfaceModel(const HSurfaceModel& SurfaceModelID, const HObjectModel3D& ObjectModel3D, double RelSamplingDistance, double KeyPointFraction, double MinScore, const wchar_t* ReturnResultHandle, const HTuple& GenParamName, const HTuple& GenParamValue, HTuple* Score);
  71. #endif
  72. // Find the best matches of a surface model in a 3D scene and images.
  73. static HPoseArray FindSurfaceModelImage(const HImage& Image, const HSurfaceModel& SurfaceModelID, const HObjectModel3D& ObjectModel3D, double RelSamplingDistance, double KeyPointFraction, const HTuple& MinScore, const HString& ReturnResultHandle, const HTuple& GenParamName, const HTuple& GenParamValue, HTuple* Score, HSurfaceMatchingResultArray* SurfaceMatchingResultID);
  74. // Find the best matches of a surface model in a 3D scene and images.
  75. HPose FindSurfaceModelImage(const HImage& Image, const HSurfaceModel& SurfaceModelID, const HObjectModel3D& ObjectModel3D, double RelSamplingDistance, double KeyPointFraction, double MinScore, const HString& ReturnResultHandle, const HTuple& GenParamName, const HTuple& GenParamValue, HTuple* Score);
  76. // Find the best matches of a surface model in a 3D scene and images.
  77. HPose FindSurfaceModelImage(const HImage& Image, const HSurfaceModel& SurfaceModelID, const HObjectModel3D& ObjectModel3D, double RelSamplingDistance, double KeyPointFraction, double MinScore, const char* ReturnResultHandle, const HTuple& GenParamName, const HTuple& GenParamValue, HTuple* Score);
  78. #ifdef _WIN32
  79. // Find the best matches of a surface model in a 3D scene and images.
  80. HPose FindSurfaceModelImage(const HImage& Image, const HSurfaceModel& SurfaceModelID, const HObjectModel3D& ObjectModel3D, double RelSamplingDistance, double KeyPointFraction, double MinScore, const wchar_t* ReturnResultHandle, const HTuple& GenParamName, const HTuple& GenParamValue, HTuple* Score);
  81. #endif
  82. // Refine the pose of a surface model in a 3D scene and in images.
  83. static HPoseArray RefineSurfaceModelPoseImage(const HImage& Image, const HSurfaceModel& SurfaceModelID, const HObjectModel3D& ObjectModel3D, const HPoseArray& InitialPose, const HTuple& MinScore, const HString& ReturnResultHandle, const HTuple& GenParamName, const HTuple& GenParamValue, HTuple* Score, HSurfaceMatchingResultArray* SurfaceMatchingResultID);
  84. // Refine the pose of a surface model in a 3D scene and in images.
  85. HPose RefineSurfaceModelPoseImage(const HImage& Image, const HSurfaceModel& SurfaceModelID, const HObjectModel3D& ObjectModel3D, const HPose& InitialPose, double MinScore, const HString& ReturnResultHandle, const HTuple& GenParamName, const HTuple& GenParamValue, HTuple* Score);
  86. // Refine the pose of a surface model in a 3D scene and in images.
  87. HPose RefineSurfaceModelPoseImage(const HImage& Image, const HSurfaceModel& SurfaceModelID, const HObjectModel3D& ObjectModel3D, const HPose& InitialPose, double MinScore, const char* ReturnResultHandle, const HTuple& GenParamName, const HTuple& GenParamValue, HTuple* Score);
  88. #ifdef _WIN32
  89. // Refine the pose of a surface model in a 3D scene and in images.
  90. HPose RefineSurfaceModelPoseImage(const HImage& Image, const HSurfaceModel& SurfaceModelID, const HObjectModel3D& ObjectModel3D, const HPose& InitialPose, double MinScore, const wchar_t* ReturnResultHandle, const HTuple& GenParamName, const HTuple& GenParamValue, HTuple* Score);
  91. #endif
  92. };
  93. // forward declarations and types for internal array implementation
  94. template<class T> class HSmartPtr;
  95. template<class T> class HHandleBaseArrayRef;
  96. typedef HHandleBaseArrayRef<HSurfaceMatchingResult> HSurfaceMatchingResultArrayRef;
  97. typedef HSmartPtr< HSurfaceMatchingResultArrayRef > HSurfaceMatchingResultArrayPtr;
  98. // Represents multiple tool instances
  99. class LIntExport HSurfaceMatchingResultArray : public HHandleBaseArray
  100. {
  101. public:
  102. // Create empty array
  103. HSurfaceMatchingResultArray();
  104. // Create array from native array of tool instances
  105. HSurfaceMatchingResultArray(HSurfaceMatchingResult* classes, Hlong length);
  106. // Copy constructor
  107. HSurfaceMatchingResultArray(const HSurfaceMatchingResultArray &tool_array);
  108. // Destructor
  109. virtual ~HSurfaceMatchingResultArray();
  110. // Assignment operator
  111. HSurfaceMatchingResultArray &operator=(const HSurfaceMatchingResultArray &tool_array);
  112. // Clears array and all tool instances
  113. virtual void Clear();
  114. // Get array of native tool instances
  115. const HSurfaceMatchingResult* Tools() const;
  116. // Get number of tools
  117. virtual Hlong Length() const;
  118. // Create tool array from tuple of handles
  119. virtual void SetFromTuple(const HTuple& handles);
  120. // Get tuple of handles for tool array
  121. virtual HTuple ConvertToTuple() const;
  122. protected:
  123. // Smart pointer to internal data container
  124. HSurfaceMatchingResultArrayPtr *mArrayPtr;
  125. };
  126. }
  127. #endif