HBaseGP.h 6.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165
  1. /*****************************************************************************
  2. * HBaseGP.h
  3. *****************************************************************************
  4. *
  5. * Project: HALCON/libhalcon
  6. * Description: Basic tools
  7. *
  8. * (c) 1996-2020 by MVTec Software GmbH
  9. * www.mvtec.com
  10. *
  11. *****************************************************************************
  12. *
  13. *
  14. */
  15. #ifndef HBASEGP_H
  16. #define HBASEGP_H
  17. #if defined(__cplusplus)
  18. extern "C" {
  19. #endif
  20. extern HLibExport Herror HSetImageTime(Hproc_handle proc_handle,
  21. Himage* image);
  22. extern HLibExport Herror HImageName2Type(const char* str, HINT* kind);
  23. extern HLibExport Herror HPrepNewImage(Hproc_handle proc_handle, HIMGDIM width,
  24. HIMGDIM height);
  25. extern HLibExport double Hatan2(double x, double y);
  26. extern HLibExport Herror HStripQuotes(Hproc_handle proc_handle, char* in,
  27. char** out);
  28. /* for some functions we have an old version without the Hproc_handle parameter
  29. * -> keep them for binary compatibility (The progress versions before
  30. * HALCON 18.12 must be binary compatible with all current
  31. * image acquisition interfaces released with HALCON 13)
  32. * and a new version with Hproc_handle for optimizing the memory allocation */
  33. extern HLibExport char* HGetHalconRoot();
  34. extern HLibExport char* HGetHalconRootPh(Hproc_handle ph);
  35. #if defined(__APPLE__)
  36. extern HLibExport char* HGetHalconFrameworkRootPh(Hproc_handle ph);
  37. #endif
  38. extern HLibExport char* HGetHalconLibraryPath();
  39. extern HLibExport char* HGetHalconLibraryPathPh(Hproc_handle ph);
  40. extern HLibExport HBOOL HSetEnv(const char* name, const char* value);
  41. extern HLibExport HBOOL HSetEnvPh(Hproc_handle ph, const char* name,
  42. const char* value);
  43. extern HLibExport char* HGetEnv(const char* name);
  44. extern HLibExport char* HGetEnvPh(Hproc_handle ph, const char* name);
  45. extern HLibExport void HGetEnvFree(char* mem);
  46. extern HLibExport Herror HGetEnvFreePh(Hproc_handle ph, char* mem);
  47. extern HLibExport char* HGetEnvRaw(Hproc_handle ph, const char* name);
  48. extern HLibExport Herror HIncrRL(Hproc_handle proc_handle);
  49. extern HLibExport Herror HIncrRLNum(Hproc_handle proc_handle, size_t num);
  50. extern HLibExport Herror HCopyData(const void* source, void* destination,
  51. size_t size);
  52. extern HLibExport Herror HSetData(void* c, HINT val, size_t size);
  53. #define HBackupDataLocal(PROC_HANDLE, SRC_PTR, NUM, DEST_PTR) \
  54. HXBackupDataLocal(PROC_HANDLE, (const void*)SRC_PTR, \
  55. sizeof(*SRC_PTR) * NUM, (void*)(DEST_PTR))
  56. extern HLibExport Herror HXBackupDataLocal(Hproc_handle proc_id,
  57. const void* source, size_t size,
  58. void* destination);
  59. #define HRestoreData(SRC_PTR, NUM, DEST_PTR) \
  60. HCopyData((const void*)SRC_PTR, (void*)(DEST_PTR), sizeof(*SRC_PTR) * NUM)
  61. extern HLibExport Herror HClearData(void* c, size_t size);
  62. extern HLibExport Herror HCopyImage(const Himage* in, Himage* out);
  63. extern HLibExport Herror HClearImage(Himage* image);
  64. extern HLibExport Herror HSetImage(Himage* image, double grayval);
  65. extern HLibExport Herror HAdaptImsize(Hproc_handle proc_handle, HIMGDIM width,
  66. HIMGDIM height);
  67. extern HLibExport Herror HFreeTmpImage(Hproc_handle proc_handle,
  68. Himage* image);
  69. extern HLibExport Herror HTmpImage(Hproc_handle proc_handle, Himage* image,
  70. HINT kind, HIMGDIM width, HIMGDIM height,
  71. HBOOL clear);
  72. extern HLibExport Herror HFreeLocalImage(Hproc_handle proc_handle,
  73. Himage* image);
  74. extern HLibExport Herror HLocalImageToGlobal(Hproc_handle proc_handle,
  75. Himage* image);
  76. extern HLibExport Herror HLocalImage(Hproc_handle proc_handle, Himage* image,
  77. HINT kind, HIMGDIM width, HIMGDIM height,
  78. HBOOL clear);
  79. extern HLibExport Herror HCrImage(Hproc_handle proc_handle, Hkey key_in,
  80. HINT num, HINT type, HIMGDIM width,
  81. HIMGDIM height, Hkey* key_out,
  82. Himage* image);
  83. extern HLibExport Herror HCrImageMatrix(Hproc_handle proc_id, Himage* image,
  84. Hkey key);
  85. extern HLibExport Herror HCrImageMKeyCkD(Hproc_handle proc_handle,
  86. Hrlregion* domain[], Hkey key_in[],
  87. HINT num_keys, HINT num, HINT type,
  88. HIMGDIM width, HIMGDIM height,
  89. Hkey* key_out, Himage* image);
  90. extern HLibExport Herror HCrImageMKey(Hproc_handle proc_handle, Hkey key_in[],
  91. HINT num_keys, HINT num, HINT type,
  92. HIMGDIM width, HIMGDIM height,
  93. Hkey* key_out, Himage* image);
  94. extern HLibExport Herror HFreeImage(Hproc_handle proc_handle, Himage* image);
  95. extern HLibExport Herror HNewImage(Hproc_handle proc_handle, Himage* image,
  96. HINT kind, HIMGDIM width, HIMGDIM height);
  97. extern HLibExport Herror HAllocImageMatrix(Hproc_handle proc_handle,
  98. Himage* image, HINT kind,
  99. HIMGDIM width, HIMGDIM height,
  100. HBOOL clear);
  101. extern HLibExport Herror HNewImagePtr(Hproc_handle proc_handle, Himage* image,
  102. HINT kind, HIMGDIM width, HIMGDIM height,
  103. void* data, HBOOL initImg);
  104. Herror HSortDouble(Hproc_handle proc_handle, double* array, INT4_8 num,
  105. HBOOL ascending);
  106. Herror HSortINT4_8(Hproc_handle proc_handle, INT4_8* array, INT4_8 num,
  107. HBOOL ascending);
  108. Herror HSortString(Hproc_handle proc_handle, char** array, INT4_8 num,
  109. HBOOL ascending);
  110. Herror HSortHcpar(Hproc_handle proc_handle, Hcpar* array, INT4_8 num,
  111. HBOOL ascending);
  112. #if defined(__cplusplus)
  113. }
  114. #endif
  115. #endif