HMisc.h 26 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505
  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_HMISC
  8. #define HCPP_HMISC
  9. namespace HalconCpp
  10. {
  11. // Class grouping methods belonging to no other HALCON class.
  12. class LIntExport HMisc
  13. {
  14. public:
  15. /***************************************************************************
  16. * Operators *
  17. ***************************************************************************/
  18. // Write a tuple to a file.
  19. static void WriteTuple(const HTuple& Tuple, const HString& FileName);
  20. // Write a tuple to a file.
  21. static void WriteTuple(const HTuple& Tuple, const char* FileName);
  22. #ifdef _WIN32
  23. // Write a tuple to a file.
  24. static void WriteTuple(const HTuple& Tuple, const wchar_t* FileName);
  25. #endif
  26. // Read a tuple from a file.
  27. static HTuple ReadTuple(const HString& FileName);
  28. // Read a tuple from a file.
  29. static HTuple ReadTuple(const char* FileName);
  30. #ifdef _WIN32
  31. // Read a tuple from a file.
  32. static HTuple ReadTuple(const wchar_t* FileName);
  33. #endif
  34. // This operator is inoperable. It had the following function: Close all serial devices.
  35. static void CloseAllSerials();
  36. // This operator is inoperable. It had the following function: Clear all OCV tools.
  37. static void CloseAllOcvs();
  38. // This operator is inoperable. It had the following function: Destroy all OCR classifiers.
  39. static void CloseAllOcrs();
  40. // Concat training files.
  41. static void ConcatOcrTrainf(const HTuple& SingleFiles, const HString& ComposedFile);
  42. // Concat training files.
  43. static void ConcatOcrTrainf(const HString& SingleFiles, const HString& ComposedFile);
  44. // Concat training files.
  45. static void ConcatOcrTrainf(const char* SingleFiles, const char* ComposedFile);
  46. #ifdef _WIN32
  47. // Concat training files.
  48. static void ConcatOcrTrainf(const wchar_t* SingleFiles, const wchar_t* ComposedFile);
  49. #endif
  50. // Query which characters are stored in a (protected) training file.
  51. static HTuple ReadOcrTrainfNamesProtected(const HTuple& TrainingFile, const HTuple& Password, HTuple* CharacterCount);
  52. // Query which characters are stored in a (protected) training file.
  53. static HString ReadOcrTrainfNamesProtected(const HString& TrainingFile, const HString& Password, Hlong* CharacterCount);
  54. // Query which characters are stored in a (protected) training file.
  55. static HString ReadOcrTrainfNamesProtected(const char* TrainingFile, const char* Password, Hlong* CharacterCount);
  56. #ifdef _WIN32
  57. // Query which characters are stored in a (protected) training file.
  58. static HString ReadOcrTrainfNamesProtected(const wchar_t* TrainingFile, const wchar_t* Password, Hlong* CharacterCount);
  59. #endif
  60. // Query which characters are stored in a training file.
  61. static HTuple ReadOcrTrainfNames(const HTuple& TrainingFile, HTuple* CharacterCount);
  62. // Query which characters are stored in a training file.
  63. static HString ReadOcrTrainfNames(const HString& TrainingFile, Hlong* CharacterCount);
  64. // Query which characters are stored in a training file.
  65. static HString ReadOcrTrainfNames(const char* TrainingFile, Hlong* CharacterCount);
  66. #ifdef _WIN32
  67. // Query which characters are stored in a training file.
  68. static HString ReadOcrTrainfNames(const wchar_t* TrainingFile, Hlong* CharacterCount);
  69. #endif
  70. // This operator is inoperable. It had the following function: Delete all measure objects.
  71. static void CloseAllMeasures();
  72. // Convert spherical coordinates of a 3D point to Cartesian coordinates.
  73. static void ConvertPoint3dSpherToCart(const HTuple& Longitude, const HTuple& Latitude, const HTuple& Radius, const HString& EquatPlaneNormal, const HString& ZeroMeridian, HTuple* X, HTuple* Y, HTuple* Z);
  74. // Convert spherical coordinates of a 3D point to Cartesian coordinates.
  75. static void ConvertPoint3dSpherToCart(double Longitude, double Latitude, double Radius, const HString& EquatPlaneNormal, const HString& ZeroMeridian, double* X, double* Y, double* Z);
  76. // Convert spherical coordinates of a 3D point to Cartesian coordinates.
  77. static void ConvertPoint3dSpherToCart(double Longitude, double Latitude, double Radius, const char* EquatPlaneNormal, const char* ZeroMeridian, double* X, double* Y, double* Z);
  78. #ifdef _WIN32
  79. // Convert spherical coordinates of a 3D point to Cartesian coordinates.
  80. static void ConvertPoint3dSpherToCart(double Longitude, double Latitude, double Radius, const wchar_t* EquatPlaneNormal, const wchar_t* ZeroMeridian, double* X, double* Y, double* Z);
  81. #endif
  82. // Convert Cartesian coordinates of a 3D point to spherical coordinates.
  83. static HTuple ConvertPoint3dCartToSpher(const HTuple& X, const HTuple& Y, const HTuple& Z, const HString& EquatPlaneNormal, const HString& ZeroMeridian, HTuple* Latitude, HTuple* Radius);
  84. // Convert Cartesian coordinates of a 3D point to spherical coordinates.
  85. static double ConvertPoint3dCartToSpher(double X, double Y, double Z, const HString& EquatPlaneNormal, const HString& ZeroMeridian, double* Latitude, double* Radius);
  86. // Convert Cartesian coordinates of a 3D point to spherical coordinates.
  87. static double ConvertPoint3dCartToSpher(double X, double Y, double Z, const char* EquatPlaneNormal, const char* ZeroMeridian, double* Latitude, double* Radius);
  88. #ifdef _WIN32
  89. // Convert Cartesian coordinates of a 3D point to spherical coordinates.
  90. static double ConvertPoint3dCartToSpher(double X, double Y, double Z, const wchar_t* EquatPlaneNormal, const wchar_t* ZeroMeridian, double* Latitude, double* Radius);
  91. #endif
  92. // Read the description file of a Kalman filter.
  93. static HTuple ReadKalman(const HString& FileName, HTuple* Model, HTuple* Measurement, HTuple* Prediction);
  94. // Read the description file of a Kalman filter.
  95. static HTuple ReadKalman(const char* FileName, HTuple* Model, HTuple* Measurement, HTuple* Prediction);
  96. #ifdef _WIN32
  97. // Read the description file of a Kalman filter.
  98. static HTuple ReadKalman(const wchar_t* FileName, HTuple* Model, HTuple* Measurement, HTuple* Prediction);
  99. #endif
  100. // Read an update file of a Kalman filter.
  101. static HTuple UpdateKalman(const HString& FileName, const HTuple& DimensionIn, const HTuple& ModelIn, const HTuple& MeasurementIn, HTuple* ModelOut, HTuple* MeasurementOut);
  102. // Read an update file of a Kalman filter.
  103. static HTuple UpdateKalman(const char* FileName, const HTuple& DimensionIn, const HTuple& ModelIn, const HTuple& MeasurementIn, HTuple* ModelOut, HTuple* MeasurementOut);
  104. #ifdef _WIN32
  105. // Read an update file of a Kalman filter.
  106. static HTuple UpdateKalman(const wchar_t* FileName, const HTuple& DimensionIn, const HTuple& ModelIn, const HTuple& MeasurementIn, HTuple* ModelOut, HTuple* MeasurementOut);
  107. #endif
  108. // Estimate the current state of a system with the help of the Kalman filtering.
  109. static HTuple FilterKalman(const HTuple& Dimension, const HTuple& Model, const HTuple& Measurement, const HTuple& PredictionIn, HTuple* Estimate);
  110. // Generate a PostScript file, which describes the rectification grid.
  111. static void CreateRectificationGrid(double Width, Hlong NumSquares, const HString& GridFile);
  112. // Generate a PostScript file, which describes the rectification grid.
  113. static void CreateRectificationGrid(double Width, Hlong NumSquares, const char* GridFile);
  114. #ifdef _WIN32
  115. // Generate a PostScript file, which describes the rectification grid.
  116. static void CreateRectificationGrid(double Width, Hlong NumSquares, const wchar_t* GridFile);
  117. #endif
  118. // Generate a projection map that describes the mapping between an arbitrarily distorted image and the rectified image.
  119. static HImage GenArbitraryDistortionMap(Hlong GridSpacing, const HTuple& Row, const HTuple& Column, Hlong GridWidth, Hlong ImageWidth, Hlong ImageHeight, const HString& MapType);
  120. // Generate a projection map that describes the mapping between an arbitrarily distorted image and the rectified image.
  121. static HImage GenArbitraryDistortionMap(Hlong GridSpacing, const HTuple& Row, const HTuple& Column, Hlong GridWidth, Hlong ImageWidth, Hlong ImageHeight, const char* MapType);
  122. #ifdef _WIN32
  123. // Generate a projection map that describes the mapping between an arbitrarily distorted image and the rectified image.
  124. static HImage GenArbitraryDistortionMap(Hlong GridSpacing, const HTuple& Row, const HTuple& Column, Hlong GridWidth, Hlong ImageWidth, Hlong ImageHeight, const wchar_t* MapType);
  125. #endif
  126. // Calculate the projection of a point onto a line.
  127. static void ProjectionPl(const HTuple& Row, const HTuple& Column, const HTuple& Row1, const HTuple& Column1, const HTuple& Row2, const HTuple& Column2, HTuple* RowProj, HTuple* ColProj);
  128. // Calculate the projection of a point onto a line.
  129. static void ProjectionPl(double Row, double Column, double Row1, double Column1, double Row2, double Column2, double* RowProj, double* ColProj);
  130. // Calculate points on the perimeter of an ellipse.
  131. static void GetPointsEllipse(const HTuple& Angle, double Row, double Column, double Phi, double Radius1, double Radius2, HTuple* RowPoint, HTuple* ColPoint);
  132. // Calculate points on the perimeter of an ellipse.
  133. static void GetPointsEllipse(double Angle, double Row, double Column, double Phi, double Radius1, double Radius2, double* RowPoint, double* ColPoint);
  134. // Calculate the intersection point of two lines.
  135. static void IntersectionLl(const HTuple& RowA1, const HTuple& ColumnA1, const HTuple& RowA2, const HTuple& ColumnA2, const HTuple& RowB1, const HTuple& ColumnB1, const HTuple& RowB2, const HTuple& ColumnB2, HTuple* Row, HTuple* Column, HTuple* IsParallel);
  136. // Calculate the intersection point of two lines.
  137. static void IntersectionLl(double RowA1, double ColumnA1, double RowA2, double ColumnA2, double RowB1, double ColumnB1, double RowB2, double ColumnB2, double* Row, double* Column, Hlong* IsParallel);
  138. // Calculate the angle between one line and the horizontal axis.
  139. static HTuple AngleLx(const HTuple& Row1, const HTuple& Column1, const HTuple& Row2, const HTuple& Column2);
  140. // Calculate the angle between one line and the horizontal axis.
  141. static double AngleLx(double Row1, double Column1, double Row2, double Column2);
  142. // Calculate the angle between two lines.
  143. static HTuple AngleLl(const HTuple& RowA1, const HTuple& ColumnA1, const HTuple& RowA2, const HTuple& ColumnA2, const HTuple& RowB1, const HTuple& ColumnB1, const HTuple& RowB2, const HTuple& ColumnB2);
  144. // Calculate the angle between two lines.
  145. static double AngleLl(double RowA1, double ColumnA1, double RowA2, double ColumnA2, double RowB1, double ColumnB1, double RowB2, double ColumnB2);
  146. // Calculate the distances between a line segment and a line.
  147. static void DistanceSl(const HTuple& RowA1, const HTuple& ColumnA1, const HTuple& RowA2, const HTuple& ColumnA2, const HTuple& RowB1, const HTuple& ColumnB1, const HTuple& RowB2, const HTuple& ColumnB2, HTuple* DistanceMin, HTuple* DistanceMax);
  148. // Calculate the distances between a line segment and a line.
  149. static void DistanceSl(double RowA1, double ColumnA1, double RowA2, double ColumnA2, double RowB1, double ColumnB1, double RowB2, double ColumnB2, double* DistanceMin, double* DistanceMax);
  150. // Calculate the distances between two line segments.
  151. static void DistanceSs(const HTuple& RowA1, const HTuple& ColumnA1, const HTuple& RowA2, const HTuple& ColumnA2, const HTuple& RowB1, const HTuple& ColumnB1, const HTuple& RowB2, const HTuple& ColumnB2, HTuple* DistanceMin, HTuple* DistanceMax);
  152. // Calculate the distances between two line segments.
  153. static void DistanceSs(double RowA1, double ColumnA1, double RowA2, double ColumnA2, double RowB1, double ColumnB1, double RowB2, double ColumnB2, double* DistanceMin, double* DistanceMax);
  154. // Calculate the distances between a point and a line segment.
  155. static void DistancePs(const HTuple& Row, const HTuple& Column, const HTuple& Row1, const HTuple& Column1, const HTuple& Row2, const HTuple& Column2, HTuple* DistanceMin, HTuple* DistanceMax);
  156. // Calculate the distances between a point and a line segment.
  157. static void DistancePs(double Row, double Column, double Row1, double Column1, double Row2, double Column2, double* DistanceMin, double* DistanceMax);
  158. // Calculate the distance between one point and one line.
  159. static HTuple DistancePl(const HTuple& Row, const HTuple& Column, const HTuple& Row1, const HTuple& Column1, const HTuple& Row2, const HTuple& Column2);
  160. // Calculate the distance between one point and one line.
  161. static double DistancePl(double Row, double Column, double Row1, double Column1, double Row2, double Column2);
  162. // Calculate the distance between two points.
  163. static HTuple DistancePp(const HTuple& Row1, const HTuple& Column1, const HTuple& Row2, const HTuple& Column2);
  164. // Calculate the distance between two points.
  165. static double DistancePp(double Row1, double Column1, double Row2, double Column2);
  166. // Information on smoothing filter smooth_image.
  167. static Hlong InfoSmooth(const HString& Filter, double Alpha, HTuple* Coeffs);
  168. // Information on smoothing filter smooth_image.
  169. static Hlong InfoSmooth(const char* Filter, double Alpha, HTuple* Coeffs);
  170. #ifdef _WIN32
  171. // Information on smoothing filter smooth_image.
  172. static Hlong InfoSmooth(const wchar_t* Filter, double Alpha, HTuple* Coeffs);
  173. #endif
  174. // Generate a Gaussian noise distribution.
  175. static HTuple GaussDistribution(double Sigma);
  176. // Generate a salt-and-pepper noise distribution.
  177. static HTuple SpDistribution(const HTuple& PercentSalt, const HTuple& PercentPepper);
  178. // Generate a salt-and-pepper noise distribution.
  179. static HTuple SpDistribution(double PercentSalt, double PercentPepper);
  180. // Deserialize FFT speed optimization data.
  181. static void DeserializeFftOptimizationData(const HSerializedItem& SerializedItemHandle);
  182. // Serialize FFT speed optimization data.
  183. static HSerializedItem SerializeFftOptimizationData();
  184. // Load FFT speed optimization data from a file.
  185. static void ReadFftOptimizationData(const HString& FileName);
  186. // Load FFT speed optimization data from a file.
  187. static void ReadFftOptimizationData(const char* FileName);
  188. #ifdef _WIN32
  189. // Load FFT speed optimization data from a file.
  190. static void ReadFftOptimizationData(const wchar_t* FileName);
  191. #endif
  192. // Store FFT speed optimization data in a file.
  193. static void WriteFftOptimizationData(const HString& FileName);
  194. // Store FFT speed optimization data in a file.
  195. static void WriteFftOptimizationData(const char* FileName);
  196. #ifdef _WIN32
  197. // Store FFT speed optimization data in a file.
  198. static void WriteFftOptimizationData(const wchar_t* FileName);
  199. #endif
  200. // Optimize the runtime of the real-valued FFT.
  201. static void OptimizeRftSpeed(Hlong Width, Hlong Height, const HString& Mode);
  202. // Optimize the runtime of the real-valued FFT.
  203. static void OptimizeRftSpeed(Hlong Width, Hlong Height, const char* Mode);
  204. #ifdef _WIN32
  205. // Optimize the runtime of the real-valued FFT.
  206. static void OptimizeRftSpeed(Hlong Width, Hlong Height, const wchar_t* Mode);
  207. #endif
  208. // Optimize the runtime of the FFT.
  209. static void OptimizeFftSpeed(Hlong Width, Hlong Height, const HString& Mode);
  210. // Optimize the runtime of the FFT.
  211. static void OptimizeFftSpeed(Hlong Width, Hlong Height, const char* Mode);
  212. #ifdef _WIN32
  213. // Optimize the runtime of the FFT.
  214. static void OptimizeFftSpeed(Hlong Width, Hlong Height, const wchar_t* Mode);
  215. #endif
  216. // Return the filter coefficients of a filter in edges_image.
  217. static Hlong InfoEdges(const HString& Filter, const HString& Mode, double Alpha, HTuple* Coeffs);
  218. // Return the filter coefficients of a filter in edges_image.
  219. static Hlong InfoEdges(const char* Filter, const char* Mode, double Alpha, HTuple* Coeffs);
  220. #ifdef _WIN32
  221. // Return the filter coefficients of a filter in edges_image.
  222. static Hlong InfoEdges(const wchar_t* Filter, const wchar_t* Mode, double Alpha, HTuple* Coeffs);
  223. #endif
  224. // Copy a file to a new location.
  225. static void CopyFile(const HString& SourceFile, const HString& DestinationFile);
  226. // Copy a file to a new location.
  227. static void CopyFile(const char* SourceFile, const char* DestinationFile);
  228. #ifdef _WIN32
  229. // Copy a file to a new location.
  230. static void CopyFile(const wchar_t* SourceFile, const wchar_t* DestinationFile);
  231. #endif
  232. // Set the current working directory.
  233. static void SetCurrentDir(const HString& DirName);
  234. // Set the current working directory.
  235. static void SetCurrentDir(const char* DirName);
  236. #ifdef _WIN32
  237. // Set the current working directory.
  238. static void SetCurrentDir(const wchar_t* DirName);
  239. #endif
  240. // Get the current working directory.
  241. static HString GetCurrentDir();
  242. // Delete an empty directory.
  243. static void RemoveDir(const HString& DirName);
  244. // Delete an empty directory.
  245. static void RemoveDir(const char* DirName);
  246. #ifdef _WIN32
  247. // Delete an empty directory.
  248. static void RemoveDir(const wchar_t* DirName);
  249. #endif
  250. // Make a directory.
  251. static void MakeDir(const HString& DirName);
  252. // Make a directory.
  253. static void MakeDir(const char* DirName);
  254. #ifdef _WIN32
  255. // Make a directory.
  256. static void MakeDir(const wchar_t* DirName);
  257. #endif
  258. // List all files in a directory.
  259. static HTuple ListFiles(const HString& Directory, const HTuple& Options);
  260. // List all files in a directory.
  261. static HTuple ListFiles(const HString& Directory, const HString& Options);
  262. // List all files in a directory.
  263. static HTuple ListFiles(const char* Directory, const char* Options);
  264. #ifdef _WIN32
  265. // List all files in a directory.
  266. static HTuple ListFiles(const wchar_t* Directory, const wchar_t* Options);
  267. #endif
  268. // Delete a file.
  269. static void DeleteFile(const HString& FileName);
  270. // Delete a file.
  271. static void DeleteFile(const char* FileName);
  272. #ifdef _WIN32
  273. // Delete a file.
  274. static void DeleteFile(const wchar_t* FileName);
  275. #endif
  276. // Check whether file exists.
  277. static Hlong FileExists(const HString& FileName);
  278. // Check whether file exists.
  279. static Hlong FileExists(const char* FileName);
  280. #ifdef _WIN32
  281. // Check whether file exists.
  282. static Hlong FileExists(const wchar_t* FileName);
  283. #endif
  284. // This operator is inoperable. It had the following function: Close all open files.
  285. static void CloseAllFiles();
  286. // Select the longest input lines.
  287. static void SelectLinesLongest(const HTuple& RowBeginIn, const HTuple& ColBeginIn, const HTuple& RowEndIn, const HTuple& ColEndIn, Hlong Num, HTuple* RowBeginOut, HTuple* ColBeginOut, HTuple* RowEndOut, HTuple* ColEndOut);
  288. // Partition lines according to various criteria.
  289. static void PartitionLines(const HTuple& RowBeginIn, const HTuple& ColBeginIn, const HTuple& RowEndIn, const HTuple& ColEndIn, const HTuple& Feature, const HString& Operation, const HTuple& Min, const HTuple& Max, HTuple* RowBeginOut, HTuple* ColBeginOut, HTuple* RowEndOut, HTuple* ColEndOut, HTuple* FailRowBOut, HTuple* FailColBOut, HTuple* FailRowEOut, HTuple* FailColEOut);
  290. // Partition lines according to various criteria.
  291. static void PartitionLines(const HTuple& RowBeginIn, const HTuple& ColBeginIn, const HTuple& RowEndIn, const HTuple& ColEndIn, const HString& Feature, const HString& Operation, const HString& Min, const HString& Max, HTuple* RowBeginOut, HTuple* ColBeginOut, HTuple* RowEndOut, HTuple* ColEndOut, HTuple* FailRowBOut, HTuple* FailColBOut, HTuple* FailRowEOut, HTuple* FailColEOut);
  292. // Partition lines according to various criteria.
  293. static void PartitionLines(const HTuple& RowBeginIn, const HTuple& ColBeginIn, const HTuple& RowEndIn, const HTuple& ColEndIn, const char* Feature, const char* Operation, const char* Min, const char* Max, HTuple* RowBeginOut, HTuple* ColBeginOut, HTuple* RowEndOut, HTuple* ColEndOut, HTuple* FailRowBOut, HTuple* FailColBOut, HTuple* FailRowEOut, HTuple* FailColEOut);
  294. #ifdef _WIN32
  295. // Partition lines according to various criteria.
  296. static void PartitionLines(const HTuple& RowBeginIn, const HTuple& ColBeginIn, const HTuple& RowEndIn, const HTuple& ColEndIn, const wchar_t* Feature, const wchar_t* Operation, const wchar_t* Min, const wchar_t* Max, HTuple* RowBeginOut, HTuple* ColBeginOut, HTuple* RowEndOut, HTuple* ColEndOut, HTuple* FailRowBOut, HTuple* FailColBOut, HTuple* FailRowEOut, HTuple* FailColEOut);
  297. #endif
  298. // Select lines according to various criteria.
  299. static void SelectLines(const HTuple& RowBeginIn, const HTuple& ColBeginIn, const HTuple& RowEndIn, const HTuple& ColEndIn, const HTuple& Feature, const HString& Operation, const HTuple& Min, const HTuple& Max, HTuple* RowBeginOut, HTuple* ColBeginOut, HTuple* RowEndOut, HTuple* ColEndOut);
  300. // Select lines according to various criteria.
  301. static void SelectLines(const HTuple& RowBeginIn, const HTuple& ColBeginIn, const HTuple& RowEndIn, const HTuple& ColEndIn, const HString& Feature, const HString& Operation, const HString& Min, const HString& Max, HTuple* RowBeginOut, HTuple* ColBeginOut, HTuple* RowEndOut, HTuple* ColEndOut);
  302. // Select lines according to various criteria.
  303. static void SelectLines(const HTuple& RowBeginIn, const HTuple& ColBeginIn, const HTuple& RowEndIn, const HTuple& ColEndIn, const char* Feature, const char* Operation, const char* Min, const char* Max, HTuple* RowBeginOut, HTuple* ColBeginOut, HTuple* RowEndOut, HTuple* ColEndOut);
  304. #ifdef _WIN32
  305. // Select lines according to various criteria.
  306. static void SelectLines(const HTuple& RowBeginIn, const HTuple& ColBeginIn, const HTuple& RowEndIn, const HTuple& ColEndIn, const wchar_t* Feature, const wchar_t* Operation, const wchar_t* Min, const wchar_t* Max, HTuple* RowBeginOut, HTuple* ColBeginOut, HTuple* RowEndOut, HTuple* ColEndOut);
  307. #endif
  308. // Calculate the center of gravity, length, and orientation of a line.
  309. static void LinePosition(const HTuple& RowBegin, const HTuple& ColBegin, const HTuple& RowEnd, const HTuple& ColEnd, HTuple* RowCenter, HTuple* ColCenter, HTuple* Length, HTuple* Phi);
  310. // Calculate the center of gravity, length, and orientation of a line.
  311. static void LinePosition(double RowBegin, double ColBegin, double RowEnd, double ColEnd, double* RowCenter, double* ColCenter, double* Length, double* Phi);
  312. // Calculate the orientation of lines.
  313. static HTuple LineOrientation(const HTuple& RowBegin, const HTuple& ColBegin, const HTuple& RowEnd, const HTuple& ColEnd);
  314. // Calculate the orientation of lines.
  315. static double LineOrientation(double RowBegin, double ColBegin, double RowEnd, double ColEnd);
  316. // Approximate a contour by arcs and lines.
  317. static void ApproxChainSimple(const HTuple& Row, const HTuple& Column, HTuple* ArcCenterRow, HTuple* ArcCenterCol, HTuple* ArcAngle, HTuple* ArcBeginRow, HTuple* ArcBeginCol, HTuple* LineBeginRow, HTuple* LineBeginCol, HTuple* LineEndRow, HTuple* LineEndCol, HTuple* Order);
  318. // Approximate a contour by arcs and lines.
  319. static void ApproxChain(const HTuple& Row, const HTuple& Column, double MinWidthCoord, double MaxWidthCoord, double ThreshStart, double ThreshEnd, double ThreshStep, double MinWidthSmooth, double MaxWidthSmooth, Hlong MinWidthCurve, Hlong MaxWidthCurve, double Weight1, double Weight2, double Weight3, HTuple* ArcCenterRow, HTuple* ArcCenterCol, HTuple* ArcAngle, HTuple* ArcBeginRow, HTuple* ArcBeginCol, HTuple* LineBeginRow, HTuple* LineBeginCol, HTuple* LineEndRow, HTuple* LineEndCol, HTuple* Order);
  320. // This operator is inoperable. It had the following function: Destroy all classifiers.
  321. static void CloseAllClassBox();
  322. // Generate a calibration plate description file and a corresponding PostScript file for a calibration plate with rectangularly arranged marks.
  323. static void GenCaltab(Hlong XNum, Hlong YNum, double MarkDist, double DiameterRatio, const HString& CalPlateDescr, const HString& CalPlatePSFile);
  324. // Generate a calibration plate description file and a corresponding PostScript file for a calibration plate with rectangularly arranged marks.
  325. static void GenCaltab(Hlong XNum, Hlong YNum, double MarkDist, double DiameterRatio, const char* CalPlateDescr, const char* CalPlatePSFile);
  326. #ifdef _WIN32
  327. // Generate a calibration plate description file and a corresponding PostScript file for a calibration plate with rectangularly arranged marks.
  328. static void GenCaltab(Hlong XNum, Hlong YNum, double MarkDist, double DiameterRatio, const wchar_t* CalPlateDescr, const wchar_t* CalPlatePSFile);
  329. #endif
  330. // Generate a calibration plate description file and a corresponding PostScript file for a calibration plate with hexagonally arranged marks.
  331. static void CreateCaltab(Hlong NumRows, Hlong MarksPerRow, double Diameter, const HTuple& FinderRow, const HTuple& FinderColumn, const HString& Polarity, const HString& CalPlateDescr, const HString& CalPlatePSFile);
  332. // Generate a calibration plate description file and a corresponding PostScript file for a calibration plate with hexagonally arranged marks.
  333. static void CreateCaltab(Hlong NumRows, Hlong MarksPerRow, double Diameter, Hlong FinderRow, Hlong FinderColumn, const HString& Polarity, const HString& CalPlateDescr, const HString& CalPlatePSFile);
  334. // Generate a calibration plate description file and a corresponding PostScript file for a calibration plate with hexagonally arranged marks.
  335. static void CreateCaltab(Hlong NumRows, Hlong MarksPerRow, double Diameter, Hlong FinderRow, Hlong FinderColumn, const char* Polarity, const char* CalPlateDescr, const char* CalPlatePSFile);
  336. #ifdef _WIN32
  337. // Generate a calibration plate description file and a corresponding PostScript file for a calibration plate with hexagonally arranged marks.
  338. static void CreateCaltab(Hlong NumRows, Hlong MarksPerRow, double Diameter, Hlong FinderRow, Hlong FinderColumn, const wchar_t* Polarity, const wchar_t* CalPlateDescr, const wchar_t* CalPlatePSFile);
  339. #endif
  340. // Read the mark center points from the calibration plate description file.
  341. static void CaltabPoints(const HString& CalPlateDescr, HTuple* X, HTuple* Y, HTuple* Z);
  342. // Read the mark center points from the calibration plate description file.
  343. static void CaltabPoints(const char* CalPlateDescr, HTuple* X, HTuple* Y, HTuple* Z);
  344. #ifdef _WIN32
  345. // Read the mark center points from the calibration plate description file.
  346. static void CaltabPoints(const wchar_t* CalPlateDescr, HTuple* X, HTuple* Y, HTuple* Z);
  347. #endif
  348. // This operator is inoperable. It had the following function: Delete all background estimation data sets.
  349. static void CloseAllBgEsti();
  350. // This operator is inoperable. It had the following function: Close all image acquisition devices.
  351. static void CloseAllFramegrabbers();
  352. };
  353. }
  354. #endif