HObjectModel3D.h 46 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811
  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_HOBJECTMODEL3D
  8. #define HCPP_HOBJECTMODEL3D
  9. namespace HalconCpp
  10. {
  11. // Represents an instance of a 3D object model.
  12. class LIntExport HObjectModel3D : public HHandle
  13. {
  14. public:
  15. // Copy constructor
  16. HObjectModel3D(const HObjectModel3D& source) : HHandle(source) {}
  17. // Copy constructor
  18. HObjectModel3D(const HHandle& handle);
  19. // Create HObjectModel3D from handle, taking ownership
  20. explicit HObjectModel3D(Hlong handle);
  21. bool operator==(const HHandle& obj) const
  22. {
  23. return HHandleBase::operator==(obj);
  24. }
  25. bool operator!=(const HHandle& obj) const
  26. {
  27. return HHandleBase::operator!=(obj);
  28. }
  29. protected:
  30. // Verify matching semantic type ('object_model_3d')!
  31. virtual void AssertType(Hphandle handle) const;
  32. public:
  33. // Deep copy of all data represented by this object instance
  34. HObjectModel3D Clone() const;
  35. /*****************************************************************************
  36. * Operator-based class constructors
  37. *****************************************************************************/
  38. // gen_empty_object_model_3d: Create an empty 3D object model.
  39. explicit HObjectModel3D();
  40. // gen_object_model_3d_from_points: Create a 3D object model that represents a point cloud from a set of 3D points.
  41. explicit HObjectModel3D(const HTuple& X, const HTuple& Y, const HTuple& Z);
  42. // gen_object_model_3d_from_points: Create a 3D object model that represents a point cloud from a set of 3D points.
  43. explicit HObjectModel3D(double X, double Y, double Z);
  44. // xyz_to_object_model_3d: Transform 3D points from images to a 3D object model.
  45. explicit HObjectModel3D(const HImage& X, const HImage& Y, const HImage& Z);
  46. // read_object_model_3d: Read a 3D object model from a file.
  47. explicit HObjectModel3D(const HString& FileName, const HTuple& Scale, const HTuple& GenParamName, const HTuple& GenParamValue, HTuple* Status);
  48. // read_object_model_3d: Read a 3D object model from a file.
  49. explicit HObjectModel3D(const HString& FileName, const HString& Scale, const HString& GenParamName, const HString& GenParamValue, HString* Status);
  50. // read_object_model_3d: Read a 3D object model from a file.
  51. explicit HObjectModel3D(const char* FileName, const char* Scale, const char* GenParamName, const char* GenParamValue, HString* Status);
  52. #ifdef _WIN32
  53. // read_object_model_3d: Read a 3D object model from a file.
  54. explicit HObjectModel3D(const wchar_t* FileName, const wchar_t* Scale, const wchar_t* GenParamName, const wchar_t* GenParamValue, HString* Status);
  55. #endif
  56. /***************************************************************************
  57. * Operators *
  58. ***************************************************************************/
  59. // Get the result of a calibrated measurement performed with the sheet-of-light technique as a 3D object model.
  60. void GetSheetOfLightResultObjectModel3d(const HSheetOfLightModel& SheetOfLightModelID);
  61. // Fit 3D primitives into a set of 3D points.
  62. static HObjectModel3DArray FitPrimitivesObjectModel3d(const HObjectModel3DArray& ObjectModel3D, const HTuple& GenParamName, const HTuple& GenParamValue);
  63. // Fit 3D primitives into a set of 3D points.
  64. HObjectModel3D FitPrimitivesObjectModel3d(const HTuple& GenParamName, const HTuple& GenParamValue) const;
  65. // Segment a set of 3D points into sub-sets with similar characteristics.
  66. static HObjectModel3DArray SegmentObjectModel3d(const HObjectModel3DArray& ObjectModel3D, const HTuple& GenParamName, const HTuple& GenParamValue);
  67. // Segment a set of 3D points into sub-sets with similar characteristics.
  68. HObjectModel3D SegmentObjectModel3d(const HTuple& GenParamName, const HTuple& GenParamValue) const;
  69. // Calculate the 3D surface normals of a 3D object model.
  70. static HObjectModel3DArray SurfaceNormalsObjectModel3d(const HObjectModel3DArray& ObjectModel3D, const HString& Method, const HTuple& GenParamName, const HTuple& GenParamValue);
  71. // Calculate the 3D surface normals of a 3D object model.
  72. HObjectModel3D SurfaceNormalsObjectModel3d(const HString& Method, const HTuple& GenParamName, const HTuple& GenParamValue) const;
  73. // Calculate the 3D surface normals of a 3D object model.
  74. HObjectModel3D SurfaceNormalsObjectModel3d(const char* Method, const HTuple& GenParamName, const HTuple& GenParamValue) const;
  75. #ifdef _WIN32
  76. // Calculate the 3D surface normals of a 3D object model.
  77. HObjectModel3D SurfaceNormalsObjectModel3d(const wchar_t* Method, const HTuple& GenParamName, const HTuple& GenParamValue) const;
  78. #endif
  79. // Smooth the 3D points of a 3D object model.
  80. static HObjectModel3DArray SmoothObjectModel3d(const HObjectModel3DArray& ObjectModel3D, const HString& Method, const HTuple& GenParamName, const HTuple& GenParamValue);
  81. // Smooth the 3D points of a 3D object model.
  82. HObjectModel3D SmoothObjectModel3d(const HString& Method, const HTuple& GenParamName, const HTuple& GenParamValue) const;
  83. // Smooth the 3D points of a 3D object model.
  84. HObjectModel3D SmoothObjectModel3d(const char* Method, const HTuple& GenParamName, const HTuple& GenParamValue) const;
  85. #ifdef _WIN32
  86. // Smooth the 3D points of a 3D object model.
  87. HObjectModel3D SmoothObjectModel3d(const wchar_t* Method, const HTuple& GenParamName, const HTuple& GenParamValue) const;
  88. #endif
  89. // Create a surface triangulation for a 3D object model.
  90. static HObjectModel3DArray TriangulateObjectModel3d(const HObjectModel3DArray& ObjectModel3D, const HString& Method, const HTuple& GenParamName, const HTuple& GenParamValue, HTuple* Information);
  91. // Create a surface triangulation for a 3D object model.
  92. HObjectModel3D TriangulateObjectModel3d(const HString& Method, const HTuple& GenParamName, const HTuple& GenParamValue, Hlong* Information) const;
  93. // Create a surface triangulation for a 3D object model.
  94. HObjectModel3D TriangulateObjectModel3d(const char* Method, const HTuple& GenParamName, const HTuple& GenParamValue, Hlong* Information) const;
  95. #ifdef _WIN32
  96. // Create a surface triangulation for a 3D object model.
  97. HObjectModel3D TriangulateObjectModel3d(const wchar_t* Method, const HTuple& GenParamName, const HTuple& GenParamValue, Hlong* Information) const;
  98. #endif
  99. // Reconstruct surface from calibrated multi-view stereo images.
  100. void ReconstructSurfaceStereo(const HImage& Images, const HStereoModel& StereoModelID);
  101. // Refine the position and deformation of a deformable surface model in a 3D scene.
  102. HTuple RefineDeformableSurfaceModel(const HDeformableSurfaceModel& DeformableSurfaceModel, double RelSamplingDistance, const HObjectModel3D& InitialDeformationObjectModel3D, const HTuple& GenParamName, const HTuple& GenParamValue, HDeformableSurfaceMatchingResultArray* DeformableSurfaceMatchingResult) const;
  103. // Refine the position and deformation of a deformable surface model in a 3D scene.
  104. double RefineDeformableSurfaceModel(const HDeformableSurfaceModel& DeformableSurfaceModel, double RelSamplingDistance, const HObjectModel3D& InitialDeformationObjectModel3D, const HString& GenParamName, const HString& GenParamValue, HDeformableSurfaceMatchingResult* DeformableSurfaceMatchingResult) const;
  105. // Refine the position and deformation of a deformable surface model in a 3D scene.
  106. double RefineDeformableSurfaceModel(const HDeformableSurfaceModel& DeformableSurfaceModel, double RelSamplingDistance, const HObjectModel3D& InitialDeformationObjectModel3D, const char* GenParamName, const char* GenParamValue, HDeformableSurfaceMatchingResult* DeformableSurfaceMatchingResult) const;
  107. #ifdef _WIN32
  108. // Refine the position and deformation of a deformable surface model in a 3D scene.
  109. double RefineDeformableSurfaceModel(const HDeformableSurfaceModel& DeformableSurfaceModel, double RelSamplingDistance, const HObjectModel3D& InitialDeformationObjectModel3D, const wchar_t* GenParamName, const wchar_t* GenParamValue, HDeformableSurfaceMatchingResult* DeformableSurfaceMatchingResult) const;
  110. #endif
  111. // Find the best match of a deformable surface model in a 3D scene.
  112. HTuple FindDeformableSurfaceModel(const HDeformableSurfaceModel& DeformableSurfaceModel, double RelSamplingDistance, const HTuple& MinScore, const HTuple& GenParamName, const HTuple& GenParamValue, HDeformableSurfaceMatchingResultArray* DeformableSurfaceMatchingResult) const;
  113. // Find the best match of a deformable surface model in a 3D scene.
  114. double FindDeformableSurfaceModel(const HDeformableSurfaceModel& DeformableSurfaceModel, double RelSamplingDistance, double MinScore, const HTuple& GenParamName, const HTuple& GenParamValue, HDeformableSurfaceMatchingResult* DeformableSurfaceMatchingResult) const;
  115. // Add a sample deformation to a deformable surface model
  116. static void AddDeformableSurfaceModelSample(const HDeformableSurfaceModel& DeformableSurfaceModel, const HObjectModel3DArray& ObjectModel3D);
  117. // Add a sample deformation to a deformable surface model
  118. void AddDeformableSurfaceModelSample(const HDeformableSurfaceModel& DeformableSurfaceModel) const;
  119. // Create the data structure needed to perform deformable surface-based matching.
  120. HDeformableSurfaceModel CreateDeformableSurfaceModel(double RelSamplingDistance, const HTuple& GenParamName, const HTuple& GenParamValue) const;
  121. // Create the data structure needed to perform deformable surface-based matching.
  122. HDeformableSurfaceModel CreateDeformableSurfaceModel(double RelSamplingDistance, const HString& GenParamName, const HString& GenParamValue) const;
  123. // Create the data structure needed to perform deformable surface-based matching.
  124. HDeformableSurfaceModel CreateDeformableSurfaceModel(double RelSamplingDistance, const char* GenParamName, const char* GenParamValue) const;
  125. #ifdef _WIN32
  126. // Create the data structure needed to perform deformable surface-based matching.
  127. HDeformableSurfaceModel CreateDeformableSurfaceModel(double RelSamplingDistance, const wchar_t* GenParamName, const wchar_t* GenParamValue) const;
  128. #endif
  129. // Refine the pose of a surface model in a 3D scene.
  130. HPoseArray RefineSurfaceModelPose(const HSurfaceModel& SurfaceModelID, const HPoseArray& InitialPose, const HTuple& MinScore, const HString& ReturnResultHandle, const HTuple& GenParamName, const HTuple& GenParamValue, HTuple* Score, HSurfaceMatchingResultArray* SurfaceMatchingResultID) const;
  131. // Refine the pose of a surface model in a 3D scene.
  132. HPose RefineSurfaceModelPose(const HSurfaceModel& SurfaceModelID, const HPose& InitialPose, double MinScore, const HString& ReturnResultHandle, const HTuple& GenParamName, const HTuple& GenParamValue, HTuple* Score, HSurfaceMatchingResult* SurfaceMatchingResultID) const;
  133. // Refine the pose of a surface model in a 3D scene.
  134. HPose RefineSurfaceModelPose(const HSurfaceModel& SurfaceModelID, const HPose& InitialPose, double MinScore, const char* ReturnResultHandle, const HTuple& GenParamName, const HTuple& GenParamValue, HTuple* Score, HSurfaceMatchingResult* SurfaceMatchingResultID) const;
  135. #ifdef _WIN32
  136. // Refine the pose of a surface model in a 3D scene.
  137. HPose RefineSurfaceModelPose(const HSurfaceModel& SurfaceModelID, const HPose& InitialPose, double MinScore, const wchar_t* ReturnResultHandle, const HTuple& GenParamName, const HTuple& GenParamValue, HTuple* Score, HSurfaceMatchingResult* SurfaceMatchingResultID) const;
  138. #endif
  139. // Find the best matches of a surface model in a 3D scene.
  140. HPoseArray FindSurfaceModel(const HSurfaceModel& SurfaceModelID, double RelSamplingDistance, double KeyPointFraction, const HTuple& MinScore, const HString& ReturnResultHandle, const HTuple& GenParamName, const HTuple& GenParamValue, HTuple* Score, HSurfaceMatchingResultArray* SurfaceMatchingResultID) const;
  141. // Find the best matches of a surface model in a 3D scene.
  142. HPose FindSurfaceModel(const HSurfaceModel& SurfaceModelID, double RelSamplingDistance, double KeyPointFraction, double MinScore, const HString& ReturnResultHandle, const HTuple& GenParamName, const HTuple& GenParamValue, HTuple* Score, HSurfaceMatchingResult* SurfaceMatchingResultID) const;
  143. // Find the best matches of a surface model in a 3D scene.
  144. HPose FindSurfaceModel(const HSurfaceModel& SurfaceModelID, double RelSamplingDistance, double KeyPointFraction, double MinScore, const char* ReturnResultHandle, const HTuple& GenParamName, const HTuple& GenParamValue, HTuple* Score, HSurfaceMatchingResult* SurfaceMatchingResultID) const;
  145. #ifdef _WIN32
  146. // Find the best matches of a surface model in a 3D scene.
  147. HPose FindSurfaceModel(const HSurfaceModel& SurfaceModelID, double RelSamplingDistance, double KeyPointFraction, double MinScore, const wchar_t* ReturnResultHandle, const HTuple& GenParamName, const HTuple& GenParamValue, HTuple* Score, HSurfaceMatchingResult* SurfaceMatchingResultID) const;
  148. #endif
  149. // Create the data structure needed to perform surface-based matching.
  150. HSurfaceModel CreateSurfaceModel(double RelSamplingDistance, const HTuple& GenParamName, const HTuple& GenParamValue) const;
  151. // Create the data structure needed to perform surface-based matching.
  152. HSurfaceModel CreateSurfaceModel(double RelSamplingDistance, const HString& GenParamName, const HString& GenParamValue) const;
  153. // Create the data structure needed to perform surface-based matching.
  154. HSurfaceModel CreateSurfaceModel(double RelSamplingDistance, const char* GenParamName, const char* GenParamValue) const;
  155. #ifdef _WIN32
  156. // Create the data structure needed to perform surface-based matching.
  157. HSurfaceModel CreateSurfaceModel(double RelSamplingDistance, const wchar_t* GenParamName, const wchar_t* GenParamValue) const;
  158. #endif
  159. // Simplify a triangulated 3D object model.
  160. static HObjectModel3DArray SimplifyObjectModel3d(const HObjectModel3DArray& ObjectModel3D, const HString& Method, const HTuple& Amount, const HTuple& GenParamName, const HTuple& GenParamValue);
  161. // Simplify a triangulated 3D object model.
  162. HObjectModel3D SimplifyObjectModel3d(const HString& Method, double Amount, const HTuple& GenParamName, const HTuple& GenParamValue) const;
  163. // Simplify a triangulated 3D object model.
  164. HObjectModel3D SimplifyObjectModel3d(const char* Method, double Amount, const HTuple& GenParamName, const HTuple& GenParamValue) const;
  165. #ifdef _WIN32
  166. // Simplify a triangulated 3D object model.
  167. HObjectModel3D SimplifyObjectModel3d(const wchar_t* Method, double Amount, const HTuple& GenParamName, const HTuple& GenParamValue) const;
  168. #endif
  169. // Compute the distances of the points of one 3D object model to another 3D object model.
  170. void DistanceObjectModel3d(const HObjectModel3D& ObjectModel3DTo, const HPose& Pose, const HTuple& MaxDistance, const HTuple& GenParamName, const HTuple& GenParamValue) const;
  171. // Compute the distances of the points of one 3D object model to another 3D object model.
  172. void DistanceObjectModel3d(const HObjectModel3D& ObjectModel3DTo, const HPose& Pose, double MaxDistance, const HString& GenParamName, const HString& GenParamValue) const;
  173. // Compute the distances of the points of one 3D object model to another 3D object model.
  174. void DistanceObjectModel3d(const HObjectModel3D& ObjectModel3DTo, const HPose& Pose, double MaxDistance, const char* GenParamName, const char* GenParamValue) const;
  175. #ifdef _WIN32
  176. // Compute the distances of the points of one 3D object model to another 3D object model.
  177. void DistanceObjectModel3d(const HObjectModel3D& ObjectModel3DTo, const HPose& Pose, double MaxDistance, const wchar_t* GenParamName, const wchar_t* GenParamValue) const;
  178. #endif
  179. // Combine several 3D object models to a new 3D object model.
  180. static HObjectModel3D UnionObjectModel3d(const HObjectModel3DArray& ObjectModels3D, const HString& Method);
  181. // Combine several 3D object models to a new 3D object model.
  182. HObjectModel3D UnionObjectModel3d(const HString& Method) const;
  183. // Combine several 3D object models to a new 3D object model.
  184. HObjectModel3D UnionObjectModel3d(const char* Method) const;
  185. #ifdef _WIN32
  186. // Combine several 3D object models to a new 3D object model.
  187. HObjectModel3D UnionObjectModel3d(const wchar_t* Method) const;
  188. #endif
  189. // Set attributes of a 3D object model.
  190. void SetObjectModel3dAttribMod(const HTuple& AttribName, const HString& AttachExtAttribTo, const HTuple& AttribValues) const;
  191. // Set attributes of a 3D object model.
  192. void SetObjectModel3dAttribMod(const HString& AttribName, const HString& AttachExtAttribTo, double AttribValues) const;
  193. // Set attributes of a 3D object model.
  194. void SetObjectModel3dAttribMod(const char* AttribName, const char* AttachExtAttribTo, double AttribValues) const;
  195. #ifdef _WIN32
  196. // Set attributes of a 3D object model.
  197. void SetObjectModel3dAttribMod(const wchar_t* AttribName, const wchar_t* AttachExtAttribTo, double AttribValues) const;
  198. #endif
  199. // Set attributes of a 3D object model.
  200. HObjectModel3D SetObjectModel3dAttrib(const HTuple& AttribName, const HString& AttachExtAttribTo, const HTuple& AttribValues) const;
  201. // Set attributes of a 3D object model.
  202. HObjectModel3D SetObjectModel3dAttrib(const HString& AttribName, const HString& AttachExtAttribTo, double AttribValues) const;
  203. // Set attributes of a 3D object model.
  204. HObjectModel3D SetObjectModel3dAttrib(const char* AttribName, const char* AttachExtAttribTo, double AttribValues) const;
  205. #ifdef _WIN32
  206. // Set attributes of a 3D object model.
  207. HObjectModel3D SetObjectModel3dAttrib(const wchar_t* AttribName, const wchar_t* AttachExtAttribTo, double AttribValues) const;
  208. #endif
  209. // Create an empty 3D object model.
  210. void GenEmptyObjectModel3d();
  211. // Sample a 3D object model.
  212. static HObjectModel3DArray SampleObjectModel3d(const HObjectModel3DArray& ObjectModel3D, const HString& Method, const HTuple& SampleDistance, const HTuple& GenParamName, const HTuple& GenParamValue);
  213. // Sample a 3D object model.
  214. HObjectModel3D SampleObjectModel3d(const HString& Method, double SampleDistance, const HTuple& GenParamName, const HTuple& GenParamValue) const;
  215. // Sample a 3D object model.
  216. HObjectModel3D SampleObjectModel3d(const char* Method, double SampleDistance, const HTuple& GenParamName, const HTuple& GenParamValue) const;
  217. #ifdef _WIN32
  218. // Sample a 3D object model.
  219. HObjectModel3D SampleObjectModel3d(const wchar_t* Method, double SampleDistance, const HTuple& GenParamName, const HTuple& GenParamValue) const;
  220. #endif
  221. // Improve the relative transformations between 3D object models based on their overlaps.
  222. static HHomMat3DArray RegisterObjectModel3dGlobal(const HObjectModel3DArray& ObjectModels3D, const HHomMat3DArray& HomMats3D, const HTuple& From, const HTuple& To, const HTuple& GenParamName, const HTuple& GenParamValue, HTuple* Scores);
  223. // Improve the relative transformations between 3D object models based on their overlaps.
  224. HHomMat3DArray RegisterObjectModel3dGlobal(const HHomMat3DArray& HomMats3D, const HString& From, Hlong To, const HTuple& GenParamName, const HTuple& GenParamValue, HTuple* Scores) const;
  225. // Improve the relative transformations between 3D object models based on their overlaps.
  226. HHomMat3DArray RegisterObjectModel3dGlobal(const HHomMat3DArray& HomMats3D, const char* From, Hlong To, const HTuple& GenParamName, const HTuple& GenParamValue, HTuple* Scores) const;
  227. #ifdef _WIN32
  228. // Improve the relative transformations between 3D object models based on their overlaps.
  229. HHomMat3DArray RegisterObjectModel3dGlobal(const HHomMat3DArray& HomMats3D, const wchar_t* From, Hlong To, const HTuple& GenParamName, const HTuple& GenParamValue, HTuple* Scores) const;
  230. #endif
  231. // Search for a transformation between two 3D object models.
  232. HPose RegisterObjectModel3dPair(const HObjectModel3D& ObjectModel3D2, const HString& Method, const HTuple& GenParamName, const HTuple& GenParamValue, HTuple* Score) const;
  233. // Search for a transformation between two 3D object models.
  234. HPose RegisterObjectModel3dPair(const HObjectModel3D& ObjectModel3D2, const HString& Method, const HString& GenParamName, double GenParamValue, HTuple* Score) const;
  235. // Search for a transformation between two 3D object models.
  236. HPose RegisterObjectModel3dPair(const HObjectModel3D& ObjectModel3D2, const char* Method, const char* GenParamName, double GenParamValue, HTuple* Score) const;
  237. #ifdef _WIN32
  238. // Search for a transformation between two 3D object models.
  239. HPose RegisterObjectModel3dPair(const HObjectModel3D& ObjectModel3D2, const wchar_t* Method, const wchar_t* GenParamName, double GenParamValue, HTuple* Score) const;
  240. #endif
  241. // Create a 3D object model that represents a point cloud from a set of 3D points.
  242. void GenObjectModel3dFromPoints(const HTuple& X, const HTuple& Y, const HTuple& Z);
  243. // Create a 3D object model that represents a point cloud from a set of 3D points.
  244. void GenObjectModel3dFromPoints(double X, double Y, double Z);
  245. // Create a 3D object model that represents a box.
  246. static HObjectModel3DArray GenBoxObjectModel3d(const HPoseArray& Pose, const HTuple& LengthX, const HTuple& LengthY, const HTuple& LengthZ);
  247. // Create a 3D object model that represents a box.
  248. void GenBoxObjectModel3d(const HPose& Pose, double LengthX, double LengthY, double LengthZ);
  249. // Create a 3D object model that represents a plane.
  250. void GenPlaneObjectModel3d(const HPose& Pose, const HTuple& XExtent, const HTuple& YExtent);
  251. // Create a 3D object model that represents a plane.
  252. void GenPlaneObjectModel3d(const HPose& Pose, double XExtent, double YExtent);
  253. // Create a 3D object model that represents a sphere from x,y,z coordinates.
  254. static HObjectModel3DArray GenSphereObjectModel3dCenter(const HTuple& X, const HTuple& Y, const HTuple& Z, const HTuple& Radius);
  255. // Create a 3D object model that represents a sphere from x,y,z coordinates.
  256. void GenSphereObjectModel3dCenter(double X, double Y, double Z, double Radius);
  257. // Create a 3D object model that represents a sphere.
  258. static HObjectModel3DArray GenSphereObjectModel3d(const HPoseArray& Pose, const HTuple& Radius);
  259. // Create a 3D object model that represents a sphere.
  260. void GenSphereObjectModel3d(const HPose& Pose, double Radius);
  261. // Create a 3D object model that represents a cylinder.
  262. static HObjectModel3DArray GenCylinderObjectModel3d(const HPoseArray& Pose, const HTuple& Radius, const HTuple& MinExtent, const HTuple& MaxExtent);
  263. // Create a 3D object model that represents a cylinder.
  264. void GenCylinderObjectModel3d(const HPose& Pose, double Radius, double MinExtent, double MaxExtent);
  265. // Calculate the smallest bounding box around the points of a 3D object model.
  266. static HPoseArray SmallestBoundingBoxObjectModel3d(const HObjectModel3DArray& ObjectModel3D, const HString& Type, HTuple* Length1, HTuple* Length2, HTuple* Length3);
  267. // Calculate the smallest bounding box around the points of a 3D object model.
  268. HPose SmallestBoundingBoxObjectModel3d(const HString& Type, double* Length1, double* Length2, double* Length3) const;
  269. // Calculate the smallest bounding box around the points of a 3D object model.
  270. HPose SmallestBoundingBoxObjectModel3d(const char* Type, double* Length1, double* Length2, double* Length3) const;
  271. #ifdef _WIN32
  272. // Calculate the smallest bounding box around the points of a 3D object model.
  273. HPose SmallestBoundingBoxObjectModel3d(const wchar_t* Type, double* Length1, double* Length2, double* Length3) const;
  274. #endif
  275. // Calculate the smallest sphere around the points of a 3D object model.
  276. static HTuple SmallestSphereObjectModel3d(const HObjectModel3DArray& ObjectModel3D, HTuple* Radius);
  277. // Calculate the smallest sphere around the points of a 3D object model.
  278. HTuple SmallestSphereObjectModel3d(double* Radius) const;
  279. // Intersect a 3D object model with a plane.
  280. static HObjectModel3DArray IntersectPlaneObjectModel3d(const HObjectModel3DArray& ObjectModel3D, const HPoseArray& Plane);
  281. // Intersect a 3D object model with a plane.
  282. HObjectModel3D IntersectPlaneObjectModel3d(const HPose& Plane) const;
  283. // Calculate the convex hull of a 3D object model.
  284. static HObjectModel3DArray ConvexHullObjectModel3d(const HObjectModel3DArray& ObjectModel3D);
  285. // Calculate the convex hull of a 3D object model.
  286. HObjectModel3D ConvexHullObjectModel3d() const;
  287. // Select 3D object models from an array of 3D object models according to global features.
  288. static HObjectModel3DArray SelectObjectModel3d(const HObjectModel3DArray& ObjectModel3D, const HTuple& Feature, const HString& Operation, const HTuple& MinValue, const HTuple& MaxValue);
  289. // Select 3D object models from an array of 3D object models according to global features.
  290. HObjectModel3D SelectObjectModel3d(const HString& Feature, const HString& Operation, double MinValue, double MaxValue) const;
  291. // Select 3D object models from an array of 3D object models according to global features.
  292. HObjectModel3D SelectObjectModel3d(const char* Feature, const char* Operation, double MinValue, double MaxValue) const;
  293. #ifdef _WIN32
  294. // Select 3D object models from an array of 3D object models according to global features.
  295. HObjectModel3D SelectObjectModel3d(const wchar_t* Feature, const wchar_t* Operation, double MinValue, double MaxValue) const;
  296. #endif
  297. // Calculate the area of all faces of a 3D object model.
  298. static HTuple AreaObjectModel3d(const HObjectModel3DArray& ObjectModel3D);
  299. // Calculate the area of all faces of a 3D object model.
  300. double AreaObjectModel3d() const;
  301. // Calculate the maximal diameter of a 3D object model.
  302. static HTuple MaxDiameterObjectModel3d(const HObjectModel3DArray& ObjectModel3D);
  303. // Calculate the maximal diameter of a 3D object model.
  304. double MaxDiameterObjectModel3d() const;
  305. // Calculates the mean or the central moment of second order for a 3D object model.
  306. static HTuple MomentsObjectModel3d(const HObjectModel3DArray& ObjectModel3D, const HTuple& MomentsToCalculate);
  307. // Calculates the mean or the central moment of second order for a 3D object model.
  308. double MomentsObjectModel3d(const HString& MomentsToCalculate) const;
  309. // Calculates the mean or the central moment of second order for a 3D object model.
  310. double MomentsObjectModel3d(const char* MomentsToCalculate) const;
  311. #ifdef _WIN32
  312. // Calculates the mean or the central moment of second order for a 3D object model.
  313. double MomentsObjectModel3d(const wchar_t* MomentsToCalculate) const;
  314. #endif
  315. // Calculate the volume of a 3D object model.
  316. static HTuple VolumeObjectModel3dRelativeToPlane(const HObjectModel3DArray& ObjectModel3D, const HPoseArray& Plane, const HTuple& Mode, const HTuple& UseFaceOrientation);
  317. // Calculate the volume of a 3D object model.
  318. double VolumeObjectModel3dRelativeToPlane(const HPose& Plane, const HString& Mode, const HString& UseFaceOrientation) const;
  319. // Calculate the volume of a 3D object model.
  320. double VolumeObjectModel3dRelativeToPlane(const HPose& Plane, const char* Mode, const char* UseFaceOrientation) const;
  321. #ifdef _WIN32
  322. // Calculate the volume of a 3D object model.
  323. double VolumeObjectModel3dRelativeToPlane(const HPose& Plane, const wchar_t* Mode, const wchar_t* UseFaceOrientation) const;
  324. #endif
  325. // Remove points from a 3D object model by projecting it to a virtual view and removing all points outside of a given region.
  326. static HObjectModel3DArray ReduceObjectModel3dByView(const HRegion& Region, const HObjectModel3DArray& ObjectModel3D, const HCamPar& CamParam, const HPoseArray& Pose);
  327. // Remove points from a 3D object model by projecting it to a virtual view and removing all points outside of a given region.
  328. HObjectModel3D ReduceObjectModel3dByView(const HRegion& Region, const HCamPar& CamParam, const HPose& Pose) const;
  329. // Determine the connected components of the 3D object model.
  330. static HObjectModel3DArray ConnectionObjectModel3d(const HObjectModel3DArray& ObjectModel3D, const HTuple& Feature, const HTuple& Value);
  331. // Determine the connected components of the 3D object model.
  332. HObjectModel3DArray ConnectionObjectModel3d(const HString& Feature, double Value) const;
  333. // Determine the connected components of the 3D object model.
  334. HObjectModel3DArray ConnectionObjectModel3d(const char* Feature, double Value) const;
  335. #ifdef _WIN32
  336. // Determine the connected components of the 3D object model.
  337. HObjectModel3DArray ConnectionObjectModel3d(const wchar_t* Feature, double Value) const;
  338. #endif
  339. // Apply a threshold to an attribute of 3D object models.
  340. static HObjectModel3DArray SelectPointsObjectModel3d(const HObjectModel3DArray& ObjectModel3D, const HTuple& Attrib, const HTuple& MinValue, const HTuple& MaxValue);
  341. // Apply a threshold to an attribute of 3D object models.
  342. HObjectModel3D SelectPointsObjectModel3d(const HString& Attrib, double MinValue, double MaxValue) const;
  343. // Apply a threshold to an attribute of 3D object models.
  344. HObjectModel3D SelectPointsObjectModel3d(const char* Attrib, double MinValue, double MaxValue) const;
  345. #ifdef _WIN32
  346. // Apply a threshold to an attribute of 3D object models.
  347. HObjectModel3D SelectPointsObjectModel3d(const wchar_t* Attrib, double MinValue, double MaxValue) const;
  348. #endif
  349. // Get the depth or the index of a displayed 3D object model.
  350. static HTuple GetDispObjectModel3dInfo(const HWindow& WindowHandle, const HTuple& Row, const HTuple& Column, const HTuple& Information);
  351. // Get the depth or the index of a displayed 3D object model.
  352. static Hlong GetDispObjectModel3dInfo(const HWindow& WindowHandle, double Row, double Column, const HString& Information);
  353. // Get the depth or the index of a displayed 3D object model.
  354. static Hlong GetDispObjectModel3dInfo(const HWindow& WindowHandle, double Row, double Column, const char* Information);
  355. #ifdef _WIN32
  356. // Get the depth or the index of a displayed 3D object model.
  357. static Hlong GetDispObjectModel3dInfo(const HWindow& WindowHandle, double Row, double Column, const wchar_t* Information);
  358. #endif
  359. // Render 3D object models to get an image.
  360. static HImage RenderObjectModel3d(const HObjectModel3DArray& ObjectModel3D, const HCamPar& CamParam, const HPoseArray& Pose, const HTuple& GenParamName, const HTuple& GenParamValue);
  361. // Render 3D object models to get an image.
  362. HImage RenderObjectModel3d(const HCamPar& CamParam, const HPose& Pose, const HTuple& GenParamName, const HTuple& GenParamValue) const;
  363. // Display 3D object models.
  364. static void DispObjectModel3d(const HWindow& WindowHandle, const HObjectModel3DArray& ObjectModel3D, const HCamPar& CamParam, const HPoseArray& Pose, const HTuple& GenParamName, const HTuple& GenParamValue);
  365. // Display 3D object models.
  366. void DispObjectModel3d(const HWindow& WindowHandle, const HCamPar& CamParam, const HPose& Pose, const HTuple& GenParamName, const HTuple& GenParamValue) const;
  367. // Copy a 3D object model.
  368. HObjectModel3D CopyObjectModel3d(const HTuple& Attributes) const;
  369. // Copy a 3D object model.
  370. HObjectModel3D CopyObjectModel3d(const HString& Attributes) const;
  371. // Copy a 3D object model.
  372. HObjectModel3D CopyObjectModel3d(const char* Attributes) const;
  373. #ifdef _WIN32
  374. // Copy a 3D object model.
  375. HObjectModel3D CopyObjectModel3d(const wchar_t* Attributes) const;
  376. #endif
  377. // Prepare a 3D object model for a certain operation.
  378. static void PrepareObjectModel3d(const HObjectModel3DArray& ObjectModel3D, const HString& Purpose, const HString& OverwriteData, const HTuple& GenParamName, const HTuple& GenParamValue);
  379. // Prepare a 3D object model for a certain operation.
  380. void PrepareObjectModel3d(const HString& Purpose, const HString& OverwriteData, const HTuple& GenParamName, const HTuple& GenParamValue) const;
  381. // Prepare a 3D object model for a certain operation.
  382. void PrepareObjectModel3d(const char* Purpose, const char* OverwriteData, const HTuple& GenParamName, const HTuple& GenParamValue) const;
  383. #ifdef _WIN32
  384. // Prepare a 3D object model for a certain operation.
  385. void PrepareObjectModel3d(const wchar_t* Purpose, const wchar_t* OverwriteData, const HTuple& GenParamName, const HTuple& GenParamValue) const;
  386. #endif
  387. // Transform 3D points from a 3D object model to images.
  388. static HImage ObjectModel3dToXyz(HImage* Y, HImage* Z, const HObjectModel3DArray& ObjectModel3D, const HString& Type, const HCamPar& CamParam, const HPose& Pose);
  389. // Transform 3D points from a 3D object model to images.
  390. HImage ObjectModel3dToXyz(HImage* Y, HImage* Z, const HString& Type, const HCamPar& CamParam, const HPose& Pose) const;
  391. // Transform 3D points from a 3D object model to images.
  392. HImage ObjectModel3dToXyz(HImage* Y, HImage* Z, const char* Type, const HCamPar& CamParam, const HPose& Pose) const;
  393. #ifdef _WIN32
  394. // Transform 3D points from a 3D object model to images.
  395. HImage ObjectModel3dToXyz(HImage* Y, HImage* Z, const wchar_t* Type, const HCamPar& CamParam, const HPose& Pose) const;
  396. #endif
  397. // Transform 3D points from images to a 3D object model.
  398. void XyzToObjectModel3d(const HImage& X, const HImage& Y, const HImage& Z);
  399. // Return attributes of 3D object models.
  400. static HTuple GetObjectModel3dParams(const HObjectModel3DArray& ObjectModel3D, const HTuple& GenParamName);
  401. // Return attributes of 3D object models.
  402. HTuple GetObjectModel3dParams(const HTuple& GenParamName) const;
  403. // Project a 3D object model into image coordinates.
  404. HXLDCont ProjectObjectModel3d(const HCamPar& CamParam, const HPose& Pose, const HTuple& GenParamName, const HTuple& GenParamValue) const;
  405. // Project a 3D object model into image coordinates.
  406. HXLDCont ProjectObjectModel3d(const HCamPar& CamParam, const HPose& Pose, const HString& GenParamName, const HString& GenParamValue) const;
  407. // Project a 3D object model into image coordinates.
  408. HXLDCont ProjectObjectModel3d(const HCamPar& CamParam, const HPose& Pose, const char* GenParamName, const char* GenParamValue) const;
  409. #ifdef _WIN32
  410. // Project a 3D object model into image coordinates.
  411. HXLDCont ProjectObjectModel3d(const HCamPar& CamParam, const HPose& Pose, const wchar_t* GenParamName, const wchar_t* GenParamValue) const;
  412. #endif
  413. // Apply a rigid 3D transformation to 3D object models.
  414. static HObjectModel3DArray RigidTransObjectModel3d(const HObjectModel3DArray& ObjectModel3D, const HPoseArray& Pose);
  415. // Apply a rigid 3D transformation to 3D object models.
  416. HObjectModel3D RigidTransObjectModel3d(const HPose& Pose) const;
  417. // Apply an arbitrary projective 3D transformation to 3D object models.
  418. static HObjectModel3DArray ProjectiveTransObjectModel3d(const HObjectModel3DArray& ObjectModel3D, const HHomMat3D& HomMat3D);
  419. // Apply an arbitrary projective 3D transformation to 3D object models.
  420. HObjectModel3D ProjectiveTransObjectModel3d(const HHomMat3D& HomMat3D) const;
  421. // Apply an arbitrary affine 3D transformation to 3D object models.
  422. static HObjectModel3DArray AffineTransObjectModel3d(const HObjectModel3DArray& ObjectModel3D, const HHomMat3DArray& HomMat3D);
  423. // Apply an arbitrary affine 3D transformation to 3D object models.
  424. HObjectModel3D AffineTransObjectModel3d(const HHomMat3D& HomMat3D) const;
  425. // Free the memory of a 3D object model.
  426. static void ClearObjectModel3d(const HObjectModel3DArray& ObjectModel3D);
  427. // Free the memory of a 3D object model.
  428. void ClearObjectModel3d() const;
  429. // Serialize a 3D object model.
  430. HSerializedItem SerializeObjectModel3d() const;
  431. // Deserialize a serialized 3D object model.
  432. void DeserializeObjectModel3d(const HSerializedItem& SerializedItemHandle);
  433. // Writes a 3D object model to a file.
  434. void WriteObjectModel3d(const HString& FileType, const HString& FileName, const HTuple& GenParamName, const HTuple& GenParamValue) const;
  435. // Writes a 3D object model to a file.
  436. void WriteObjectModel3d(const HString& FileType, const HString& FileName, const HString& GenParamName, const HString& GenParamValue) const;
  437. // Writes a 3D object model to a file.
  438. void WriteObjectModel3d(const char* FileType, const char* FileName, const char* GenParamName, const char* GenParamValue) const;
  439. #ifdef _WIN32
  440. // Writes a 3D object model to a file.
  441. void WriteObjectModel3d(const wchar_t* FileType, const wchar_t* FileName, const wchar_t* GenParamName, const wchar_t* GenParamValue) const;
  442. #endif
  443. // Read a 3D object model from a file.
  444. HTuple ReadObjectModel3d(const HString& FileName, const HTuple& Scale, const HTuple& GenParamName, const HTuple& GenParamValue);
  445. // Read a 3D object model from a file.
  446. HString ReadObjectModel3d(const HString& FileName, const HString& Scale, const HString& GenParamName, const HString& GenParamValue);
  447. // Read a 3D object model from a file.
  448. HString ReadObjectModel3d(const char* FileName, const char* Scale, const char* GenParamName, const char* GenParamValue);
  449. #ifdef _WIN32
  450. // Read a 3D object model from a file.
  451. HString ReadObjectModel3d(const wchar_t* FileName, const wchar_t* Scale, const wchar_t* GenParamName, const wchar_t* GenParamValue);
  452. #endif
  453. // Compute the calibrated scene flow between two stereo image pairs.
  454. static HObjectModel3DArray SceneFlowCalib(const HImage& ImageRect1T1, const HImage& ImageRect2T1, const HImage& ImageRect1T2, const HImage& ImageRect2T2, const HImage& Disparity, const HTuple& SmoothingFlow, const HTuple& SmoothingDisparity, const HTuple& GenParamName, const HTuple& GenParamValue, const HCamPar& CamParamRect1, const HCamPar& CamParamRect2, const HPose& RelPoseRect);
  455. // Compute the calibrated scene flow between two stereo image pairs.
  456. void SceneFlowCalib(const HImage& ImageRect1T1, const HImage& ImageRect2T1, const HImage& ImageRect1T2, const HImage& ImageRect2T2, const HImage& Disparity, double SmoothingFlow, double SmoothingDisparity, const HString& GenParamName, const HString& GenParamValue, const HCamPar& CamParamRect1, const HCamPar& CamParamRect2, const HPose& RelPoseRect);
  457. // Compute the calibrated scene flow between two stereo image pairs.
  458. void SceneFlowCalib(const HImage& ImageRect1T1, const HImage& ImageRect2T1, const HImage& ImageRect1T2, const HImage& ImageRect2T2, const HImage& Disparity, double SmoothingFlow, double SmoothingDisparity, const char* GenParamName, const char* GenParamValue, const HCamPar& CamParamRect1, const HCamPar& CamParamRect2, const HPose& RelPoseRect);
  459. #ifdef _WIN32
  460. // Compute the calibrated scene flow between two stereo image pairs.
  461. void SceneFlowCalib(const HImage& ImageRect1T1, const HImage& ImageRect2T1, const HImage& ImageRect1T2, const HImage& ImageRect2T2, const HImage& Disparity, double SmoothingFlow, double SmoothingDisparity, const wchar_t* GenParamName, const wchar_t* GenParamValue, const HCamPar& CamParamRect1, const HCamPar& CamParamRect2, const HPose& RelPoseRect);
  462. #endif
  463. // Find edges in a 3D object model.
  464. HObjectModel3D EdgesObjectModel3d(const HTuple& MinAmplitude, const HTuple& GenParamName, const HTuple& GenParamValue) const;
  465. // Find edges in a 3D object model.
  466. HObjectModel3D EdgesObjectModel3d(double MinAmplitude, const HString& GenParamName, double GenParamValue) const;
  467. // Find edges in a 3D object model.
  468. HObjectModel3D EdgesObjectModel3d(double MinAmplitude, const char* GenParamName, double GenParamValue) const;
  469. #ifdef _WIN32
  470. // Find edges in a 3D object model.
  471. HObjectModel3D EdgesObjectModel3d(double MinAmplitude, const wchar_t* GenParamName, double GenParamValue) const;
  472. #endif
  473. // Find the best matches of a surface model in a 3D scene and images.
  474. HPoseArray FindSurfaceModelImage(const HImage& Image, const HSurfaceModel& SurfaceModelID, double RelSamplingDistance, double KeyPointFraction, const HTuple& MinScore, const HString& ReturnResultHandle, const HTuple& GenParamName, const HTuple& GenParamValue, HTuple* Score, HSurfaceMatchingResultArray* SurfaceMatchingResultID) const;
  475. // Find the best matches of a surface model in a 3D scene and images.
  476. HPose FindSurfaceModelImage(const HImage& Image, const HSurfaceModel& SurfaceModelID, double RelSamplingDistance, double KeyPointFraction, double MinScore, const HString& ReturnResultHandle, const HTuple& GenParamName, const HTuple& GenParamValue, HTuple* Score, HSurfaceMatchingResult* SurfaceMatchingResultID) const;
  477. // Find the best matches of a surface model in a 3D scene and images.
  478. HPose FindSurfaceModelImage(const HImage& Image, const HSurfaceModel& SurfaceModelID, double RelSamplingDistance, double KeyPointFraction, double MinScore, const char* ReturnResultHandle, const HTuple& GenParamName, const HTuple& GenParamValue, HTuple* Score, HSurfaceMatchingResult* SurfaceMatchingResultID) const;
  479. #ifdef _WIN32
  480. // Find the best matches of a surface model in a 3D scene and images.
  481. HPose FindSurfaceModelImage(const HImage& Image, const HSurfaceModel& SurfaceModelID, double RelSamplingDistance, double KeyPointFraction, double MinScore, const wchar_t* ReturnResultHandle, const HTuple& GenParamName, const HTuple& GenParamValue, HTuple* Score, HSurfaceMatchingResult* SurfaceMatchingResultID) const;
  482. #endif
  483. // Refine the pose of a surface model in a 3D scene and in images.
  484. HPoseArray RefineSurfaceModelPoseImage(const HImage& Image, const HSurfaceModel& SurfaceModelID, const HPoseArray& InitialPose, const HTuple& MinScore, const HString& ReturnResultHandle, const HTuple& GenParamName, const HTuple& GenParamValue, HTuple* Score, HSurfaceMatchingResultArray* SurfaceMatchingResultID) const;
  485. // Refine the pose of a surface model in a 3D scene and in images.
  486. HPose RefineSurfaceModelPoseImage(const HImage& Image, const HSurfaceModel& SurfaceModelID, const HPose& InitialPose, double MinScore, const HString& ReturnResultHandle, const HTuple& GenParamName, const HTuple& GenParamValue, HTuple* Score, HSurfaceMatchingResult* SurfaceMatchingResultID) const;
  487. // Refine the pose of a surface model in a 3D scene and in images.
  488. HPose RefineSurfaceModelPoseImage(const HImage& Image, const HSurfaceModel& SurfaceModelID, const HPose& InitialPose, double MinScore, const char* ReturnResultHandle, const HTuple& GenParamName, const HTuple& GenParamValue, HTuple* Score, HSurfaceMatchingResult* SurfaceMatchingResultID) const;
  489. #ifdef _WIN32
  490. // Refine the pose of a surface model in a 3D scene and in images.
  491. HPose RefineSurfaceModelPoseImage(const HImage& Image, const HSurfaceModel& SurfaceModelID, const HPose& InitialPose, double MinScore, const wchar_t* ReturnResultHandle, const HTuple& GenParamName, const HTuple& GenParamValue, HTuple* Score, HSurfaceMatchingResult* SurfaceMatchingResultID) const;
  492. #endif
  493. // Fuse 3D object models into a surface.
  494. static HObjectModel3D FuseObjectModel3d(const HObjectModel3DArray& ObjectModel3D, const HTuple& BoundingBox, const HTuple& Resolution, const HTuple& SurfaceTolerance, const HTuple& MinThickness, const HTuple& Smoothing, const HTuple& NormalDirection, const HTuple& GenParamName, const HTuple& GenParamValue);
  495. // Fuse 3D object models into a surface.
  496. HObjectModel3D FuseObjectModel3d(const HTuple& BoundingBox, double Resolution, double SurfaceTolerance, double MinThickness, double Smoothing, const HString& NormalDirection, const HTuple& GenParamName, const HTuple& GenParamValue) const;
  497. // Fuse 3D object models into a surface.
  498. HObjectModel3D FuseObjectModel3d(const HTuple& BoundingBox, double Resolution, double SurfaceTolerance, double MinThickness, double Smoothing, const char* NormalDirection, const HTuple& GenParamName, const HTuple& GenParamValue) const;
  499. #ifdef _WIN32
  500. // Fuse 3D object models into a surface.
  501. HObjectModel3D FuseObjectModel3d(const HTuple& BoundingBox, double Resolution, double SurfaceTolerance, double MinThickness, double Smoothing, const wchar_t* NormalDirection, const HTuple& GenParamName, const HTuple& GenParamValue) const;
  502. #endif
  503. // Find boxes in 3D data.
  504. HPoseArray FindBox3d(const HTuple& SideLen1, const HTuple& SideLen2, const HTuple& SideLen3, const HTuple& MinScore, const HDict& GenParam, HTuple* Score, HObjectModel3DArray* ObjectModel3DBox, HDict* BoxInformation) const;
  505. // Find boxes in 3D data.
  506. HPose FindBox3d(const HTuple& SideLen1, const HTuple& SideLen2, const HTuple& SideLen3, double MinScore, const HDict& GenParam, HTuple* Score, HObjectModel3DArray* ObjectModel3DBox, HDict* BoxInformation) const;
  507. // Remove attributes of a 3D object model.
  508. HObjectModel3D RemoveObjectModel3dAttrib(const HTuple& Attributes) const;
  509. // Remove attributes of a 3D object model.
  510. HObjectModel3D RemoveObjectModel3dAttrib(const HString& Attributes) const;
  511. // Remove attributes of a 3D object model.
  512. HObjectModel3D RemoveObjectModel3dAttrib(const char* Attributes) const;
  513. #ifdef _WIN32
  514. // Remove attributes of a 3D object model.
  515. HObjectModel3D RemoveObjectModel3dAttrib(const wchar_t* Attributes) const;
  516. #endif
  517. // Remove attributes of a 3D object model.
  518. void RemoveObjectModel3dAttribMod(const HTuple& Attributes) const;
  519. // Remove attributes of a 3D object model.
  520. void RemoveObjectModel3dAttribMod(const HString& Attributes) const;
  521. // Remove attributes of a 3D object model.
  522. void RemoveObjectModel3dAttribMod(const char* Attributes) const;
  523. #ifdef _WIN32
  524. // Remove attributes of a 3D object model.
  525. void RemoveObjectModel3dAttribMod(const wchar_t* Attributes) const;
  526. #endif
  527. };
  528. // forward declarations and types for internal array implementation
  529. template<class T> class HSmartPtr;
  530. template<class T> class HHandleBaseArrayRef;
  531. typedef HHandleBaseArrayRef<HObjectModel3D> HObjectModel3DArrayRef;
  532. typedef HSmartPtr< HObjectModel3DArrayRef > HObjectModel3DArrayPtr;
  533. // Represents multiple tool instances
  534. class LIntExport HObjectModel3DArray : public HHandleBaseArray
  535. {
  536. public:
  537. // Create empty array
  538. HObjectModel3DArray();
  539. // Create array from native array of tool instances
  540. HObjectModel3DArray(HObjectModel3D* classes, Hlong length);
  541. // Copy constructor
  542. HObjectModel3DArray(const HObjectModel3DArray &tool_array);
  543. // Destructor
  544. virtual ~HObjectModel3DArray();
  545. // Assignment operator
  546. HObjectModel3DArray &operator=(const HObjectModel3DArray &tool_array);
  547. // Clears array and all tool instances
  548. virtual void Clear();
  549. // Get array of native tool instances
  550. const HObjectModel3D* Tools() const;
  551. // Get number of tools
  552. virtual Hlong Length() const;
  553. // Create tool array from tuple of handles
  554. virtual void SetFromTuple(const HTuple& handles);
  555. // Get tuple of handles for tool array
  556. virtual HTuple ConvertToTuple() const;
  557. protected:
  558. // Smart pointer to internal data container
  559. HObjectModel3DArrayPtr *mArrayPtr;
  560. };
  561. }
  562. #endif