HDeformableModel.h 31 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381
  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_HDEFORMABLEMODEL
  8. #define HCPP_HDEFORMABLEMODEL
  9. namespace HalconCpp
  10. {
  11. // Represents an instance of a deformable model for matching.
  12. class LIntExport HDeformableModel : public HHandle
  13. {
  14. public:
  15. // Create an uninitialized instance
  16. HDeformableModel():HHandle() {}
  17. // Copy constructor
  18. HDeformableModel(const HDeformableModel& source) : HHandle(source) {}
  19. // Copy constructor
  20. HDeformableModel(const HHandle& handle);
  21. // Create HDeformableModel from handle, taking ownership
  22. explicit HDeformableModel(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 ('deformable_model')!
  33. virtual void AssertType(Hphandle handle) const;
  34. public:
  35. // Deep copy of all data represented by this object instance
  36. HDeformableModel Clone() const;
  37. /*****************************************************************************
  38. * Operator-based class constructors
  39. *****************************************************************************/
  40. // read_deformable_model: Read a deformable model from a file.
  41. explicit HDeformableModel(const HString& FileName);
  42. // read_deformable_model: Read a deformable model from a file.
  43. explicit HDeformableModel(const char* FileName);
  44. #ifdef _WIN32
  45. // read_deformable_model: Read a deformable model from a file.
  46. explicit HDeformableModel(const wchar_t* FileName);
  47. #endif
  48. // create_planar_calib_deformable_model_xld: Prepare a deformable model for planar calibrated matching from XLD contours.
  49. explicit HDeformableModel(const HXLDCont& Contours, const HCamPar& CamParam, const HPose& ReferencePose, const HTuple& NumLevels, const HTuple& AngleStart, const HTuple& AngleExtent, const HTuple& AngleStep, double ScaleRMin, const HTuple& ScaleRMax, const HTuple& ScaleRStep, double ScaleCMin, const HTuple& ScaleCMax, const HTuple& ScaleCStep, const HTuple& Optimization, const HString& Metric, Hlong MinContrast, const HTuple& GenParamName, const HTuple& GenParamValue);
  50. // create_planar_calib_deformable_model_xld: Prepare a deformable model for planar calibrated matching from XLD contours.
  51. explicit HDeformableModel(const HXLDCont& Contours, const HCamPar& CamParam, const HPose& ReferencePose, Hlong NumLevels, const HTuple& AngleStart, const HTuple& AngleExtent, double AngleStep, double ScaleRMin, const HTuple& ScaleRMax, double ScaleRStep, double ScaleCMin, const HTuple& ScaleCMax, double ScaleCStep, const HString& Optimization, const HString& Metric, Hlong MinContrast, const HTuple& GenParamName, const HTuple& GenParamValue);
  52. // create_planar_calib_deformable_model_xld: Prepare a deformable model for planar calibrated matching from XLD contours.
  53. explicit HDeformableModel(const HXLDCont& Contours, const HCamPar& CamParam, const HPose& ReferencePose, Hlong NumLevels, const HTuple& AngleStart, const HTuple& AngleExtent, double AngleStep, double ScaleRMin, const HTuple& ScaleRMax, double ScaleRStep, double ScaleCMin, const HTuple& ScaleCMax, double ScaleCStep, const char* Optimization, const char* Metric, Hlong MinContrast, const HTuple& GenParamName, const HTuple& GenParamValue);
  54. #ifdef _WIN32
  55. // create_planar_calib_deformable_model_xld: Prepare a deformable model for planar calibrated matching from XLD contours.
  56. explicit HDeformableModel(const HXLDCont& Contours, const HCamPar& CamParam, const HPose& ReferencePose, Hlong NumLevels, const HTuple& AngleStart, const HTuple& AngleExtent, double AngleStep, double ScaleRMin, const HTuple& ScaleRMax, double ScaleRStep, double ScaleCMin, const HTuple& ScaleCMax, double ScaleCStep, const wchar_t* Optimization, const wchar_t* Metric, Hlong MinContrast, const HTuple& GenParamName, const HTuple& GenParamValue);
  57. #endif
  58. // create_planar_uncalib_deformable_model_xld: Prepare a deformable model for planar uncalibrated matching from XLD contours.
  59. explicit HDeformableModel(const HXLDCont& Contours, const HTuple& NumLevels, const HTuple& AngleStart, const HTuple& AngleExtent, const HTuple& AngleStep, double ScaleRMin, const HTuple& ScaleRMax, const HTuple& ScaleRStep, double ScaleCMin, const HTuple& ScaleCMax, const HTuple& ScaleCStep, const HTuple& Optimization, const HString& Metric, Hlong MinContrast, const HTuple& GenParamName, const HTuple& GenParamValue);
  60. // create_planar_uncalib_deformable_model_xld: Prepare a deformable model for planar uncalibrated matching from XLD contours.
  61. explicit HDeformableModel(const HXLDCont& Contours, Hlong NumLevels, const HTuple& AngleStart, const HTuple& AngleExtent, double AngleStep, double ScaleRMin, const HTuple& ScaleRMax, double ScaleRStep, double ScaleCMin, const HTuple& ScaleCMax, double ScaleCStep, const HString& Optimization, const HString& Metric, Hlong MinContrast, const HTuple& GenParamName, const HTuple& GenParamValue);
  62. // create_planar_uncalib_deformable_model_xld: Prepare a deformable model for planar uncalibrated matching from XLD contours.
  63. explicit HDeformableModel(const HXLDCont& Contours, Hlong NumLevels, const HTuple& AngleStart, const HTuple& AngleExtent, double AngleStep, double ScaleRMin, const HTuple& ScaleRMax, double ScaleRStep, double ScaleCMin, const HTuple& ScaleCMax, double ScaleCStep, const char* Optimization, const char* Metric, Hlong MinContrast, const HTuple& GenParamName, const HTuple& GenParamValue);
  64. #ifdef _WIN32
  65. // create_planar_uncalib_deformable_model_xld: Prepare a deformable model for planar uncalibrated matching from XLD contours.
  66. explicit HDeformableModel(const HXLDCont& Contours, Hlong NumLevels, const HTuple& AngleStart, const HTuple& AngleExtent, double AngleStep, double ScaleRMin, const HTuple& ScaleRMax, double ScaleRStep, double ScaleCMin, const HTuple& ScaleCMax, double ScaleCStep, const wchar_t* Optimization, const wchar_t* Metric, Hlong MinContrast, const HTuple& GenParamName, const HTuple& GenParamValue);
  67. #endif
  68. // create_planar_calib_deformable_model: Create a deformable model for calibrated perspective matching.
  69. explicit HDeformableModel(const HImage& Template, const HCamPar& CamParam, const HPose& ReferencePose, const HTuple& NumLevels, const HTuple& AngleStart, const HTuple& AngleExtent, const HTuple& AngleStep, double ScaleRMin, const HTuple& ScaleRMax, const HTuple& ScaleRStep, double ScaleCMin, const HTuple& ScaleCMax, const HTuple& ScaleCStep, const HTuple& Optimization, const HString& Metric, const HTuple& Contrast, const HTuple& MinContrast, const HTuple& GenParamName, const HTuple& GenParamValue);
  70. // create_planar_calib_deformable_model: Create a deformable model for calibrated perspective matching.
  71. explicit HDeformableModel(const HImage& Template, const HCamPar& CamParam, const HPose& ReferencePose, Hlong NumLevels, const HTuple& AngleStart, const HTuple& AngleExtent, double AngleStep, double ScaleRMin, const HTuple& ScaleRMax, double ScaleRStep, double ScaleCMin, const HTuple& ScaleCMax, double ScaleCStep, const HString& Optimization, const HString& Metric, const HTuple& Contrast, Hlong MinContrast, const HTuple& GenParamName, const HTuple& GenParamValue);
  72. // create_planar_calib_deformable_model: Create a deformable model for calibrated perspective matching.
  73. explicit HDeformableModel(const HImage& Template, const HCamPar& CamParam, const HPose& ReferencePose, Hlong NumLevels, const HTuple& AngleStart, const HTuple& AngleExtent, double AngleStep, double ScaleRMin, const HTuple& ScaleRMax, double ScaleRStep, double ScaleCMin, const HTuple& ScaleCMax, double ScaleCStep, const char* Optimization, const char* Metric, const HTuple& Contrast, Hlong MinContrast, const HTuple& GenParamName, const HTuple& GenParamValue);
  74. #ifdef _WIN32
  75. // create_planar_calib_deformable_model: Create a deformable model for calibrated perspective matching.
  76. explicit HDeformableModel(const HImage& Template, const HCamPar& CamParam, const HPose& ReferencePose, Hlong NumLevels, const HTuple& AngleStart, const HTuple& AngleExtent, double AngleStep, double ScaleRMin, const HTuple& ScaleRMax, double ScaleRStep, double ScaleCMin, const HTuple& ScaleCMax, double ScaleCStep, const wchar_t* Optimization, const wchar_t* Metric, const HTuple& Contrast, Hlong MinContrast, const HTuple& GenParamName, const HTuple& GenParamValue);
  77. #endif
  78. // create_planar_uncalib_deformable_model: Creates a deformable model for uncalibrated, perspective matching.
  79. explicit HDeformableModel(const HImage& Template, const HTuple& NumLevels, const HTuple& AngleStart, const HTuple& AngleExtent, const HTuple& AngleStep, double ScaleRMin, const HTuple& ScaleRMax, const HTuple& ScaleRStep, double ScaleCMin, const HTuple& ScaleCMax, const HTuple& ScaleCStep, const HTuple& Optimization, const HString& Metric, const HTuple& Contrast, const HTuple& MinContrast, const HTuple& GenParamName, const HTuple& GenParamValue);
  80. // create_planar_uncalib_deformable_model: Creates a deformable model for uncalibrated, perspective matching.
  81. explicit HDeformableModel(const HImage& Template, Hlong NumLevels, const HTuple& AngleStart, const HTuple& AngleExtent, double AngleStep, double ScaleRMin, const HTuple& ScaleRMax, double ScaleRStep, double ScaleCMin, const HTuple& ScaleCMax, double ScaleCStep, const HString& Optimization, const HString& Metric, const HTuple& Contrast, Hlong MinContrast, const HTuple& GenParamName, const HTuple& GenParamValue);
  82. // create_planar_uncalib_deformable_model: Creates a deformable model for uncalibrated, perspective matching.
  83. explicit HDeformableModel(const HImage& Template, Hlong NumLevels, const HTuple& AngleStart, const HTuple& AngleExtent, double AngleStep, double ScaleRMin, const HTuple& ScaleRMax, double ScaleRStep, double ScaleCMin, const HTuple& ScaleCMax, double ScaleCStep, const char* Optimization, const char* Metric, const HTuple& Contrast, Hlong MinContrast, const HTuple& GenParamName, const HTuple& GenParamValue);
  84. #ifdef _WIN32
  85. // create_planar_uncalib_deformable_model: Creates a deformable model for uncalibrated, perspective matching.
  86. explicit HDeformableModel(const HImage& Template, Hlong NumLevels, const HTuple& AngleStart, const HTuple& AngleExtent, double AngleStep, double ScaleRMin, const HTuple& ScaleRMax, double ScaleRStep, double ScaleCMin, const HTuple& ScaleCMax, double ScaleCStep, const wchar_t* Optimization, const wchar_t* Metric, const HTuple& Contrast, Hlong MinContrast, const HTuple& GenParamName, const HTuple& GenParamValue);
  87. #endif
  88. /***************************************************************************
  89. * Operators *
  90. ***************************************************************************/
  91. // Return the origin (reference point) of a deformable model.
  92. void GetDeformableModelOrigin(double* Row, double* Column) const;
  93. // Set the origin (reference point) of a deformable model.
  94. void SetDeformableModelOrigin(double Row, double Column) const;
  95. // Set selected parameters of the deformable model.
  96. void SetDeformableModelParam(const HTuple& GenParamName, const HTuple& GenParamValue) const;
  97. // Return the parameters of a deformable model.
  98. HTuple GetDeformableModelParams(const HTuple& GenParamName) const;
  99. // Return the parameters of a deformable model.
  100. HTuple GetDeformableModelParams(const HString& GenParamName) const;
  101. // Return the parameters of a deformable model.
  102. HTuple GetDeformableModelParams(const char* GenParamName) const;
  103. #ifdef _WIN32
  104. // Return the parameters of a deformable model.
  105. HTuple GetDeformableModelParams(const wchar_t* GenParamName) const;
  106. #endif
  107. // Return the contour representation of a deformable model.
  108. HXLDCont GetDeformableModelContours(Hlong Level) const;
  109. // Deserialize a deformable model.
  110. void DeserializeDeformableModel(const HSerializedItem& SerializedItemHandle);
  111. // Serialize a deformable model.
  112. HSerializedItem SerializeDeformableModel() const;
  113. // Read a deformable model from a file.
  114. void ReadDeformableModel(const HString& FileName);
  115. // Read a deformable model from a file.
  116. void ReadDeformableModel(const char* FileName);
  117. #ifdef _WIN32
  118. // Read a deformable model from a file.
  119. void ReadDeformableModel(const wchar_t* FileName);
  120. #endif
  121. // Write a deformable model to a file.
  122. void WriteDeformableModel(const HString& FileName) const;
  123. // Write a deformable model to a file.
  124. void WriteDeformableModel(const char* FileName) const;
  125. #ifdef _WIN32
  126. // Write a deformable model to a file.
  127. void WriteDeformableModel(const wchar_t* FileName) const;
  128. #endif
  129. // Free the memory of a deformable model.
  130. static void ClearDeformableModel(const HDeformableModelArray& ModelID);
  131. // Free the memory of a deformable model.
  132. void ClearDeformableModel() const;
  133. // Find the best matches of a local deformable model in an image.
  134. HImage FindLocalDeformableModel(const HImage& Image, HImage* VectorField, HXLDCont* DeformedContours, double AngleStart, double AngleExtent, double ScaleRMin, double ScaleRMax, double ScaleCMin, double ScaleCMax, double MinScore, Hlong NumMatches, double MaxOverlap, Hlong NumLevels, double Greediness, const HTuple& ResultType, const HTuple& GenParamName, const HTuple& GenParamValue, HTuple* Score, HTuple* Row, HTuple* Column) const;
  135. // Find the best matches of a calibrated deformable model in an image and return their 3D pose.
  136. HPoseArray FindPlanarCalibDeformableModel(const HImage& Image, double AngleStart, double AngleExtent, double ScaleRMin, double ScaleRMax, double ScaleCMin, double ScaleCMax, double MinScore, Hlong NumMatches, double MaxOverlap, const HTuple& NumLevels, double Greediness, const HTuple& GenParamName, const HTuple& GenParamValue, HTuple* CovPose, HTuple* Score) const;
  137. // Find the best matches of a calibrated deformable model in an image and return their 3D pose.
  138. HPose FindPlanarCalibDeformableModel(const HImage& Image, double AngleStart, double AngleExtent, double ScaleRMin, double ScaleRMax, double ScaleCMin, double ScaleCMax, double MinScore, Hlong NumMatches, double MaxOverlap, Hlong NumLevels, double Greediness, const HTuple& GenParamName, const HTuple& GenParamValue, HTuple* CovPose, HTuple* Score) const;
  139. // Find the best matches of a planar projective invariant deformable model in an image.
  140. HHomMat2DArray FindPlanarUncalibDeformableModel(const HImage& Image, double AngleStart, double AngleExtent, double ScaleRMin, double ScaleRMax, double ScaleCMin, double ScaleCMax, double MinScore, Hlong NumMatches, double MaxOverlap, const HTuple& NumLevels, double Greediness, const HTuple& GenParamName, const HTuple& GenParamValue, HTuple* Score) const;
  141. // Find the best matches of a planar projective invariant deformable model in an image.
  142. HHomMat2D FindPlanarUncalibDeformableModel(const HImage& Image, double AngleStart, double AngleExtent, double ScaleRMin, double ScaleRMax, double ScaleCMin, double ScaleCMax, double MinScore, Hlong NumMatches, double MaxOverlap, Hlong NumLevels, double Greediness, const HTuple& GenParamName, const HTuple& GenParamValue, HTuple* Score) const;
  143. // Set the metric of a local deformable model that was created from XLD contours.
  144. void SetLocalDeformableModelMetric(const HImage& Image, const HImage& VectorField, const HString& Metric) const;
  145. // Set the metric of a local deformable model that was created from XLD contours.
  146. void SetLocalDeformableModelMetric(const HImage& Image, const HImage& VectorField, const char* Metric) const;
  147. #ifdef _WIN32
  148. // Set the metric of a local deformable model that was created from XLD contours.
  149. void SetLocalDeformableModelMetric(const HImage& Image, const HImage& VectorField, const wchar_t* Metric) const;
  150. #endif
  151. // Set the metric of a planar calibrated deformable model that was created from XLD contours.
  152. void SetPlanarCalibDeformableModelMetric(const HImage& Image, const HPose& Pose, const HString& Metric) const;
  153. // Set the metric of a planar calibrated deformable model that was created from XLD contours.
  154. void SetPlanarCalibDeformableModelMetric(const HImage& Image, const HPose& Pose, const char* Metric) const;
  155. #ifdef _WIN32
  156. // Set the metric of a planar calibrated deformable model that was created from XLD contours.
  157. void SetPlanarCalibDeformableModelMetric(const HImage& Image, const HPose& Pose, const wchar_t* Metric) const;
  158. #endif
  159. // Set the metric of a planar uncalibrated deformable model that was created from XLD contours.
  160. void SetPlanarUncalibDeformableModelMetric(const HImage& Image, const HHomMat2D& HomMat2D, const HString& Metric) const;
  161. // Set the metric of a planar uncalibrated deformable model that was created from XLD contours.
  162. void SetPlanarUncalibDeformableModelMetric(const HImage& Image, const HHomMat2D& HomMat2D, const char* Metric) const;
  163. #ifdef _WIN32
  164. // Set the metric of a planar uncalibrated deformable model that was created from XLD contours.
  165. void SetPlanarUncalibDeformableModelMetric(const HImage& Image, const HHomMat2D& HomMat2D, const wchar_t* Metric) const;
  166. #endif
  167. // Prepare a deformable model for local deformable matching from XLD contours.
  168. void CreateLocalDeformableModelXld(const HXLDCont& Contours, const HTuple& NumLevels, const HTuple& AngleStart, const HTuple& AngleExtent, const HTuple& AngleStep, double ScaleRMin, const HTuple& ScaleRMax, const HTuple& ScaleRStep, double ScaleCMin, const HTuple& ScaleCMax, const HTuple& ScaleCStep, const HTuple& Optimization, const HString& Metric, Hlong MinContrast, const HTuple& GenParamName, const HTuple& GenParamValue);
  169. // Prepare a deformable model for local deformable matching from XLD contours.
  170. void CreateLocalDeformableModelXld(const HXLDCont& Contours, Hlong NumLevels, const HTuple& AngleStart, const HTuple& AngleExtent, double AngleStep, double ScaleRMin, const HTuple& ScaleRMax, double ScaleRStep, double ScaleCMin, const HTuple& ScaleCMax, double ScaleCStep, const HString& Optimization, const HString& Metric, Hlong MinContrast, const HTuple& GenParamName, const HTuple& GenParamValue);
  171. // Prepare a deformable model for local deformable matching from XLD contours.
  172. void CreateLocalDeformableModelXld(const HXLDCont& Contours, Hlong NumLevels, const HTuple& AngleStart, const HTuple& AngleExtent, double AngleStep, double ScaleRMin, const HTuple& ScaleRMax, double ScaleRStep, double ScaleCMin, const HTuple& ScaleCMax, double ScaleCStep, const char* Optimization, const char* Metric, Hlong MinContrast, const HTuple& GenParamName, const HTuple& GenParamValue);
  173. #ifdef _WIN32
  174. // Prepare a deformable model for local deformable matching from XLD contours.
  175. void CreateLocalDeformableModelXld(const HXLDCont& Contours, Hlong NumLevels, const HTuple& AngleStart, const HTuple& AngleExtent, double AngleStep, double ScaleRMin, const HTuple& ScaleRMax, double ScaleRStep, double ScaleCMin, const HTuple& ScaleCMax, double ScaleCStep, const wchar_t* Optimization, const wchar_t* Metric, Hlong MinContrast, const HTuple& GenParamName, const HTuple& GenParamValue);
  176. #endif
  177. // Prepare a deformable model for planar calibrated matching from XLD contours.
  178. void CreatePlanarCalibDeformableModelXld(const HXLDCont& Contours, const HCamPar& CamParam, const HPose& ReferencePose, const HTuple& NumLevels, const HTuple& AngleStart, const HTuple& AngleExtent, const HTuple& AngleStep, double ScaleRMin, const HTuple& ScaleRMax, const HTuple& ScaleRStep, double ScaleCMin, const HTuple& ScaleCMax, const HTuple& ScaleCStep, const HTuple& Optimization, const HString& Metric, Hlong MinContrast, const HTuple& GenParamName, const HTuple& GenParamValue);
  179. // Prepare a deformable model for planar calibrated matching from XLD contours.
  180. void CreatePlanarCalibDeformableModelXld(const HXLDCont& Contours, const HCamPar& CamParam, const HPose& ReferencePose, Hlong NumLevels, const HTuple& AngleStart, const HTuple& AngleExtent, double AngleStep, double ScaleRMin, const HTuple& ScaleRMax, double ScaleRStep, double ScaleCMin, const HTuple& ScaleCMax, double ScaleCStep, const HString& Optimization, const HString& Metric, Hlong MinContrast, const HTuple& GenParamName, const HTuple& GenParamValue);
  181. // Prepare a deformable model for planar calibrated matching from XLD contours.
  182. void CreatePlanarCalibDeformableModelXld(const HXLDCont& Contours, const HCamPar& CamParam, const HPose& ReferencePose, Hlong NumLevels, const HTuple& AngleStart, const HTuple& AngleExtent, double AngleStep, double ScaleRMin, const HTuple& ScaleRMax, double ScaleRStep, double ScaleCMin, const HTuple& ScaleCMax, double ScaleCStep, const char* Optimization, const char* Metric, Hlong MinContrast, const HTuple& GenParamName, const HTuple& GenParamValue);
  183. #ifdef _WIN32
  184. // Prepare a deformable model for planar calibrated matching from XLD contours.
  185. void CreatePlanarCalibDeformableModelXld(const HXLDCont& Contours, const HCamPar& CamParam, const HPose& ReferencePose, Hlong NumLevels, const HTuple& AngleStart, const HTuple& AngleExtent, double AngleStep, double ScaleRMin, const HTuple& ScaleRMax, double ScaleRStep, double ScaleCMin, const HTuple& ScaleCMax, double ScaleCStep, const wchar_t* Optimization, const wchar_t* Metric, Hlong MinContrast, const HTuple& GenParamName, const HTuple& GenParamValue);
  186. #endif
  187. // Prepare a deformable model for planar uncalibrated matching from XLD contours.
  188. void CreatePlanarUncalibDeformableModelXld(const HXLDCont& Contours, const HTuple& NumLevels, const HTuple& AngleStart, const HTuple& AngleExtent, const HTuple& AngleStep, double ScaleRMin, const HTuple& ScaleRMax, const HTuple& ScaleRStep, double ScaleCMin, const HTuple& ScaleCMax, const HTuple& ScaleCStep, const HTuple& Optimization, const HString& Metric, Hlong MinContrast, const HTuple& GenParamName, const HTuple& GenParamValue);
  189. // Prepare a deformable model for planar uncalibrated matching from XLD contours.
  190. void CreatePlanarUncalibDeformableModelXld(const HXLDCont& Contours, Hlong NumLevels, const HTuple& AngleStart, const HTuple& AngleExtent, double AngleStep, double ScaleRMin, const HTuple& ScaleRMax, double ScaleRStep, double ScaleCMin, const HTuple& ScaleCMax, double ScaleCStep, const HString& Optimization, const HString& Metric, Hlong MinContrast, const HTuple& GenParamName, const HTuple& GenParamValue);
  191. // Prepare a deformable model for planar uncalibrated matching from XLD contours.
  192. void CreatePlanarUncalibDeformableModelXld(const HXLDCont& Contours, Hlong NumLevels, const HTuple& AngleStart, const HTuple& AngleExtent, double AngleStep, double ScaleRMin, const HTuple& ScaleRMax, double ScaleRStep, double ScaleCMin, const HTuple& ScaleCMax, double ScaleCStep, const char* Optimization, const char* Metric, Hlong MinContrast, const HTuple& GenParamName, const HTuple& GenParamValue);
  193. #ifdef _WIN32
  194. // Prepare a deformable model for planar uncalibrated matching from XLD contours.
  195. void CreatePlanarUncalibDeformableModelXld(const HXLDCont& Contours, Hlong NumLevels, const HTuple& AngleStart, const HTuple& AngleExtent, double AngleStep, double ScaleRMin, const HTuple& ScaleRMax, double ScaleRStep, double ScaleCMin, const HTuple& ScaleCMax, double ScaleCStep, const wchar_t* Optimization, const wchar_t* Metric, Hlong MinContrast, const HTuple& GenParamName, const HTuple& GenParamValue);
  196. #endif
  197. // Creates a deformable model for local, deformable matching.
  198. void CreateLocalDeformableModel(const HImage& Template, const HTuple& NumLevels, const HTuple& AngleStart, const HTuple& AngleExtent, const HTuple& AngleStep, double ScaleRMin, const HTuple& ScaleRMax, const HTuple& ScaleRStep, double ScaleCMin, const HTuple& ScaleCMax, const HTuple& ScaleCStep, const HTuple& Optimization, const HString& Metric, const HTuple& Contrast, const HTuple& MinContrast, const HTuple& GenParamName, const HTuple& GenParamValue);
  199. // Creates a deformable model for local, deformable matching.
  200. void CreateLocalDeformableModel(const HImage& Template, Hlong NumLevels, const HTuple& AngleStart, const HTuple& AngleExtent, double AngleStep, double ScaleRMin, const HTuple& ScaleRMax, double ScaleRStep, double ScaleCMin, const HTuple& ScaleCMax, double ScaleCStep, const HString& Optimization, const HString& Metric, const HTuple& Contrast, Hlong MinContrast, const HTuple& GenParamName, const HTuple& GenParamValue);
  201. // Creates a deformable model for local, deformable matching.
  202. void CreateLocalDeformableModel(const HImage& Template, Hlong NumLevels, const HTuple& AngleStart, const HTuple& AngleExtent, double AngleStep, double ScaleRMin, const HTuple& ScaleRMax, double ScaleRStep, double ScaleCMin, const HTuple& ScaleCMax, double ScaleCStep, const char* Optimization, const char* Metric, const HTuple& Contrast, Hlong MinContrast, const HTuple& GenParamName, const HTuple& GenParamValue);
  203. #ifdef _WIN32
  204. // Creates a deformable model for local, deformable matching.
  205. void CreateLocalDeformableModel(const HImage& Template, Hlong NumLevels, const HTuple& AngleStart, const HTuple& AngleExtent, double AngleStep, double ScaleRMin, const HTuple& ScaleRMax, double ScaleRStep, double ScaleCMin, const HTuple& ScaleCMax, double ScaleCStep, const wchar_t* Optimization, const wchar_t* Metric, const HTuple& Contrast, Hlong MinContrast, const HTuple& GenParamName, const HTuple& GenParamValue);
  206. #endif
  207. // Create a deformable model for calibrated perspective matching.
  208. void CreatePlanarCalibDeformableModel(const HImage& Template, const HCamPar& CamParam, const HPose& ReferencePose, const HTuple& NumLevels, const HTuple& AngleStart, const HTuple& AngleExtent, const HTuple& AngleStep, double ScaleRMin, const HTuple& ScaleRMax, const HTuple& ScaleRStep, double ScaleCMin, const HTuple& ScaleCMax, const HTuple& ScaleCStep, const HTuple& Optimization, const HString& Metric, const HTuple& Contrast, const HTuple& MinContrast, const HTuple& GenParamName, const HTuple& GenParamValue);
  209. // Create a deformable model for calibrated perspective matching.
  210. void CreatePlanarCalibDeformableModel(const HImage& Template, const HCamPar& CamParam, const HPose& ReferencePose, Hlong NumLevels, const HTuple& AngleStart, const HTuple& AngleExtent, double AngleStep, double ScaleRMin, const HTuple& ScaleRMax, double ScaleRStep, double ScaleCMin, const HTuple& ScaleCMax, double ScaleCStep, const HString& Optimization, const HString& Metric, const HTuple& Contrast, Hlong MinContrast, const HTuple& GenParamName, const HTuple& GenParamValue);
  211. // Create a deformable model for calibrated perspective matching.
  212. void CreatePlanarCalibDeformableModel(const HImage& Template, const HCamPar& CamParam, const HPose& ReferencePose, Hlong NumLevels, const HTuple& AngleStart, const HTuple& AngleExtent, double AngleStep, double ScaleRMin, const HTuple& ScaleRMax, double ScaleRStep, double ScaleCMin, const HTuple& ScaleCMax, double ScaleCStep, const char* Optimization, const char* Metric, const HTuple& Contrast, Hlong MinContrast, const HTuple& GenParamName, const HTuple& GenParamValue);
  213. #ifdef _WIN32
  214. // Create a deformable model for calibrated perspective matching.
  215. void CreatePlanarCalibDeformableModel(const HImage& Template, const HCamPar& CamParam, const HPose& ReferencePose, Hlong NumLevels, const HTuple& AngleStart, const HTuple& AngleExtent, double AngleStep, double ScaleRMin, const HTuple& ScaleRMax, double ScaleRStep, double ScaleCMin, const HTuple& ScaleCMax, double ScaleCStep, const wchar_t* Optimization, const wchar_t* Metric, const HTuple& Contrast, Hlong MinContrast, const HTuple& GenParamName, const HTuple& GenParamValue);
  216. #endif
  217. // Creates a deformable model for uncalibrated, perspective matching.
  218. void CreatePlanarUncalibDeformableModel(const HImage& Template, const HTuple& NumLevels, const HTuple& AngleStart, const HTuple& AngleExtent, const HTuple& AngleStep, double ScaleRMin, const HTuple& ScaleRMax, const HTuple& ScaleRStep, double ScaleCMin, const HTuple& ScaleCMax, const HTuple& ScaleCStep, const HTuple& Optimization, const HString& Metric, const HTuple& Contrast, const HTuple& MinContrast, const HTuple& GenParamName, const HTuple& GenParamValue);
  219. // Creates a deformable model for uncalibrated, perspective matching.
  220. void CreatePlanarUncalibDeformableModel(const HImage& Template, Hlong NumLevels, const HTuple& AngleStart, const HTuple& AngleExtent, double AngleStep, double ScaleRMin, const HTuple& ScaleRMax, double ScaleRStep, double ScaleCMin, const HTuple& ScaleCMax, double ScaleCStep, const HString& Optimization, const HString& Metric, const HTuple& Contrast, Hlong MinContrast, const HTuple& GenParamName, const HTuple& GenParamValue);
  221. // Creates a deformable model for uncalibrated, perspective matching.
  222. void CreatePlanarUncalibDeformableModel(const HImage& Template, Hlong NumLevels, const HTuple& AngleStart, const HTuple& AngleExtent, double AngleStep, double ScaleRMin, const HTuple& ScaleRMax, double ScaleRStep, double ScaleCMin, const HTuple& ScaleCMax, double ScaleCStep, const char* Optimization, const char* Metric, const HTuple& Contrast, Hlong MinContrast, const HTuple& GenParamName, const HTuple& GenParamValue);
  223. #ifdef _WIN32
  224. // Creates a deformable model for uncalibrated, perspective matching.
  225. void CreatePlanarUncalibDeformableModel(const HImage& Template, Hlong NumLevels, const HTuple& AngleStart, const HTuple& AngleExtent, double AngleStep, double ScaleRMin, const HTuple& ScaleRMax, double ScaleRStep, double ScaleCMin, const HTuple& ScaleCMax, double ScaleCStep, const wchar_t* Optimization, const wchar_t* Metric, const HTuple& Contrast, Hlong MinContrast, const HTuple& GenParamName, const HTuple& GenParamValue);
  226. #endif
  227. };
  228. // forward declarations and types for internal array implementation
  229. template<class T> class HSmartPtr;
  230. template<class T> class HHandleBaseArrayRef;
  231. typedef HHandleBaseArrayRef<HDeformableModel> HDeformableModelArrayRef;
  232. typedef HSmartPtr< HDeformableModelArrayRef > HDeformableModelArrayPtr;
  233. // Represents multiple tool instances
  234. class LIntExport HDeformableModelArray : public HHandleBaseArray
  235. {
  236. public:
  237. // Create empty array
  238. HDeformableModelArray();
  239. // Create array from native array of tool instances
  240. HDeformableModelArray(HDeformableModel* classes, Hlong length);
  241. // Copy constructor
  242. HDeformableModelArray(const HDeformableModelArray &tool_array);
  243. // Destructor
  244. virtual ~HDeformableModelArray();
  245. // Assignment operator
  246. HDeformableModelArray &operator=(const HDeformableModelArray &tool_array);
  247. // Clears array and all tool instances
  248. virtual void Clear();
  249. // Get array of native tool instances
  250. const HDeformableModel* Tools() const;
  251. // Get number of tools
  252. virtual Hlong Length() const;
  253. // Create tool array from tuple of handles
  254. virtual void SetFromTuple(const HTuple& handles);
  255. // Get tuple of handles for tool array
  256. virtual HTuple ConvertToTuple() const;
  257. protected:
  258. // Smart pointer to internal data container
  259. HDeformableModelArrayPtr *mArrayPtr;
  260. };
  261. }
  262. #endif