浏览代码

original version

XP 2 年之前
当前提交
f66c281d7c
共有 100 个文件被更改,包括 39719 次插入0 次删除
  1. 23 0
      .qmake.stash
  2. 二进制
      3rdparty/CvxCamera/bin/CvxCamera.dll
  3. 7 0
      3rdparty/CvxCamera/include/cvx_camera_global.h
  4. 128 0
      3rdparty/CvxCamera/include/cvxcamera.h
  5. 51 0
      3rdparty/CvxCamera/include/defs.h
  6. 二进制
      3rdparty/CvxCamera/lib/CvxCamera.lib
  7. 54 0
      3rdparty/ImgProcessAlg/include/FeatureMatching.h
  8. 72 0
      3rdparty/ImgProcessAlg/include/ImgProcessAlg.h
  9. 7 0
      3rdparty/ImgProcessAlg/include/ImgProcessGlobal.h
  10. 二进制
      3rdparty/ImgProcessAlg/lib/ImgProcessAlg.lib
  11. 69 0
      3rdparty/include22/BarcodeAlgDllApi.h
  12. 5816 0
      3rdparty/include22/CameraApi.h
  13. 6876 0
      3rdparty/include22/CameraApiLoad.h
  14. 1015 0
      3rdparty/include22/CameraDefine.H
  15. 333 0
      3rdparty/include22/CameraGrabber.h
  16. 380 0
      3rdparty/include22/CameraImage.h
  17. 118 0
      3rdparty/include22/CameraStatus.h
  18. 50 0
      3rdparty/include22/SenseCameraDll/defs.h
  19. 146 0
      3rdparty/include22/SenseCameraDll/mv_camera.h
  20. 1 0
      3rdparty/include22/SenseCameraDll/mv_camera_imp.h.h
  21. 0 0
      3rdparty/include22/SenseCameraDll/sense_camera_adapter.cpp
  22. 95 0
      3rdparty/include22/SenseCameraDll/sense_camera_adapter.h
  23. 7 0
      3rdparty/include22/SenseCameraDll/sense_camera_global.h
  24. 57 0
      3rdparty/include22/SenseCameraDll/sense_ctrl_frame_grabber.h
  25. 50 0
      3rdparty/include22/SenseCameraDll/sense_gx_camera_imp.h
  26. 43 0
      3rdparty/include22/SenseCameraDll/sense_mvs_camera_imp.h
  27. 59 0
      3rdparty/include22/SenseCameraDll/sense_simulate_camera_imp.h
  28. 365 0
      3rdparty/include22/halcon/HBase.h
  29. 199 0
      3rdparty/include22/halcon/HConst.h
  30. 214 0
      3rdparty/include22/halcon/HCtype.h
  31. 61 0
      3rdparty/include22/halcon/HDeclSpec.h
  32. 3556 0
      3rdparty/include22/halcon/HErrorDef.h
  33. 118 0
      3rdparty/include22/halcon/HExtern.h
  34. 191 0
      3rdparty/include22/halcon/HIntDef.h
  35. 79 0
      3rdparty/include22/halcon/HInterfaceC.h
  36. 1816 0
      3rdparty/include22/halcon/HMacro.h
  37. 218 0
      3rdparty/include22/halcon/HParallel.h
  38. 3870 0
      3rdparty/include22/halcon/HProto.h
  39. 93 0
      3rdparty/include22/halcon/HVersNum.h
  40. 40 0
      3rdparty/include22/halcon/Halcon.h
  41. 27 0
      3rdparty/include22/halcon/HalconC.h
  42. 544 0
      3rdparty/include22/halcon/HalconCDefs.h
  43. 530 0
      3rdparty/include22/halcon/IPType.h
  44. 236 0
      3rdparty/include22/halcon/com/HalconCOM.h
  45. 519 0
      3rdparty/include22/halcon/com/HalconXimport.h
  46. 63 0
      3rdparty/include22/halcon/com/HalconXimport.idl
  47. 54 0
      3rdparty/include22/halcon/com/HalconXimport_i.c
  48. 208 0
      3rdparty/include22/halcon/halconc/Hdevthread.h
  49. 225 0
      3rdparty/include22/halcon/halconc/Hvector.h
  50. 317 0
      3rdparty/include22/halcon/halconcpp/HBarCode.h
  51. 152 0
      3rdparty/include22/halcon/halconcpp/HBarrier.h
  52. 180 0
      3rdparty/include22/halcon/halconcpp/HBeadInspectionModel.h
  53. 166 0
      3rdparty/include22/halcon/halconcpp/HBgEsti.h
  54. 293 0
      3rdparty/include22/halcon/halconcpp/HCalibData.h
  55. 558 0
      3rdparty/include22/halcon/halconcpp/HCamPar.h
  56. 222 0
      3rdparty/include22/halcon/halconcpp/HCameraSetupModel.h
  57. 215 0
      3rdparty/include22/halcon/halconcpp/HClassBox.h
  58. 291 0
      3rdparty/include22/halcon/halconcpp/HClassGmm.h
  59. 222 0
      3rdparty/include22/halcon/halconcpp/HClassKnn.h
  60. 151 0
      3rdparty/include22/halcon/halconcpp/HClassLUT.h
  61. 336 0
      3rdparty/include22/halcon/halconcpp/HClassMlp.h
  62. 308 0
      3rdparty/include22/halcon/halconcpp/HClassSvm.h
  63. 269 0
      3rdparty/include22/halcon/halconcpp/HClassTrainData.h
  64. 146 0
      3rdparty/include22/halcon/halconcpp/HColorTransLUT.h
  65. 267 0
      3rdparty/include22/halcon/halconcpp/HComponentModel.h
  66. 258 0
      3rdparty/include22/halcon/halconcpp/HComponentTraining.h
  67. 178 0
      3rdparty/include22/halcon/halconcpp/HComputeDevice.h
  68. 161 0
      3rdparty/include22/halcon/halconcpp/HCondition.h
  69. 102 0
      3rdparty/include22/halcon/halconcpp/HDataBase.h
  70. 272 0
      3rdparty/include22/halcon/halconcpp/HDataCode2D.h
  71. 380 0
      3rdparty/include22/halcon/halconcpp/HDeformableModel.h
  72. 152 0
      3rdparty/include22/halcon/halconcpp/HDeformableSurfaceMatchingResult.h
  73. 240 0
      3rdparty/include22/halcon/halconcpp/HDeformableSurfaceModel.h
  74. 281 0
      3rdparty/include22/halcon/halconcpp/HDescriptorModel.h
  75. 134 0
      3rdparty/include22/halcon/halconcpp/HDevThread.h
  76. 58 0
      3rdparty/include22/halcon/halconcpp/HDevWindowStack.h
  77. 261 0
      3rdparty/include22/halcon/halconcpp/HDict.h
  78. 197 0
      3rdparty/include22/halcon/halconcpp/HDlClassifier.h
  79. 141 0
      3rdparty/include22/halcon/halconcpp/HDlClassifierResult.h
  80. 144 0
      3rdparty/include22/halcon/halconcpp/HDlClassifierTrainResult.h
  81. 137 0
      3rdparty/include22/halcon/halconcpp/HDlDevice.h
  82. 250 0
      3rdparty/include22/halcon/halconcpp/HDlModel.h
  83. 215 0
      3rdparty/include22/halcon/halconcpp/HDlModelOcr.h
  84. 168 0
      3rdparty/include22/halcon/halconcpp/HDlPrune.h
  85. 243 0
      3rdparty/include22/halcon/halconcpp/HDrawingObject.h
  86. 189 0
      3rdparty/include22/halcon/halconcpp/HDualQuaternion.h
  87. 158 0
      3rdparty/include22/halcon/halconcpp/HEvent.h
  88. 198 0
      3rdparty/include22/halcon/halconcpp/HException.h
  89. 157 0
      3rdparty/include22/halcon/halconcpp/HFeatureSet.h
  90. 184 0
      3rdparty/include22/halcon/halconcpp/HFile.h
  91. 226 0
      3rdparty/include22/halcon/halconcpp/HFramegrabber.h
  92. 233 0
      3rdparty/include22/halcon/halconcpp/HFunction1D.h
  93. 149 0
      3rdparty/include22/halcon/halconcpp/HGnuplot.h
  94. 138 0
      3rdparty/include22/halcon/halconcpp/HHandle.h
  95. 183 0
      3rdparty/include22/halcon/halconcpp/HHandleBase.h
  96. 533 0
      3rdparty/include22/halcon/halconcpp/HHomMat2D.h
  97. 187 0
      3rdparty/include22/halcon/halconcpp/HHomMat3D.h
  98. 195 0
      3rdparty/include22/halcon/halconcpp/HIOChannel.h
  99. 241 0
      3rdparty/include22/halcon/halconcpp/HIODevice.h
  100. 0 0
      3rdparty/include22/halcon/halconcpp/HIOStream.h

+ 23 - 0
.qmake.stash

@@ -0,0 +1,23 @@
1
+QMAKE_CXX.QT_COMPILER_STDCXX = 199711L
2
+QMAKE_CXX.QMAKE_MSC_VER = 1933
3
+QMAKE_CXX.QMAKE_MSC_FULL_VER = 193331629
4
+QMAKE_CXX.COMPILER_MACROS = \
5
+    QT_COMPILER_STDCXX \
6
+    QMAKE_MSC_VER \
7
+    QMAKE_MSC_FULL_VER
8
+QMAKE_CXX.INCDIRS = \
9
+    E:\\VS2022\\VC\\Tools\\MSVC\\14.33.31629\\include \
10
+    E:\\VS2022\\VC\\Tools\\MSVC\\14.33.31629\\ATLMFC\\include \
11
+    E:\\VS2022\\VC\\Auxiliary\\VS\\include \
12
+    "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.20348.0\\ucrt" \
13
+    "C:\\Program Files (x86)\\Windows Kits\\10\\\\include\\10.0.20348.0\\\\um" \
14
+    "C:\\Program Files (x86)\\Windows Kits\\10\\\\include\\10.0.20348.0\\\\shared" \
15
+    "C:\\Program Files (x86)\\Windows Kits\\10\\\\include\\10.0.20348.0\\\\winrt" \
16
+    "C:\\Program Files (x86)\\Windows Kits\\10\\\\include\\10.0.20348.0\\\\cppwinrt" \
17
+    "C:\\Program Files (x86)\\Windows Kits\\NETFXSDK\\4.8\\include\\um"
18
+QMAKE_CXX.LIBDIRS = \
19
+    E:\\VS2022\\VC\\Tools\\MSVC\\14.33.31629\\ATLMFC\\lib\\x64 \
20
+    E:\\VS2022\\VC\\Tools\\MSVC\\14.33.31629\\lib\\x64 \
21
+    "C:\\Program Files (x86)\\Windows Kits\\NETFXSDK\\4.8\\lib\\um\\x64" \
22
+    "C:\\Program Files (x86)\\Windows Kits\\10\\lib\\10.0.20348.0\\ucrt\\x64" \
23
+    "C:\\Program Files (x86)\\Windows Kits\\10\\\\lib\\10.0.20348.0\\\\um\\x64"

二进制
3rdparty/CvxCamera/bin/CvxCamera.dll


+ 7 - 0
3rdparty/CvxCamera/include/cvx_camera_global.h

@@ -0,0 +1,7 @@
1
+#pragma once
2
+
3
+#if defined(CVXCAMERAX64_EXPORTS)
4
+#define CVX_EXPORT __declspec(dllexport)
5
+#else
6
+#define CVX_EXPORT __declspec(dllimport)
7
+#endif

+ 128 - 0
3rdparty/CvxCamera/include/cvxcamera.h

@@ -0,0 +1,128 @@
1
+#pragma once
2
+#include "cvx_camera_global.h"
3
+#include <stdint.h>
4
+#include  <string>
5
+#include <vector>
6
+
7
+#ifdef USE_OPENCV
8
+#include "opencv2/opencv.hpp"
9
+#endif // USE_OPENCV
10
+
11
+#ifdef USE_HALCON
12
+#include <HalconCpp.h>
13
+#endif // USE_HALCON
14
+
15
+namespace cv
16
+{
17
+    class Mat;
18
+}
19
+namespace HalconCpp
20
+{
21
+    class HObject;
22
+}
23
+
24
+enum E_CameraType
25
+{
26
+    TYPE_HK = 0,
27
+    TYPE_DAHENG = 1,
28
+    TYPE_BASLER,
29
+    TYPE_SIMULATE
30
+};
31
+
32
+
33
+class CVX_EXPORT CvxCamera
34
+{
35
+public:
36
+    virtual ~CvxCamera(){}
37
+    enum E_PIXEL_TYPE
38
+    {
39
+        PIXEL_TYPE_GVSP_MONO8,
40
+        PIXEL_TYPE_GVSP_RGB8
41
+
42
+    };
43
+    enum E_TRIGGER_MODE
44
+    {
45
+        TRIGGER_MODE_OFF = 0,
46
+        TRIGGER_MODE_ON,
47
+    };
48
+    enum E_TRIGGER_SOURCE
49
+    {
50
+        TRIGGER_SOURCE_SOFT = 0,
51
+        TRIGGER_SOURCE_LINE0,
52
+        TRIGGER_SOURCE_LINE2,
53
+        TRIGGER_SOURCE_LINE3,
54
+        TRIGGER_SOURCE_Anyway,
55
+    };
56
+
57
+    static std::shared_ptr<CvxCamera> createInstance(E_CameraType type);
58
+
59
+
60
+    virtual int64_t enumDevicesSN(std::vector<std::string>& sn) = 0;
61
+    virtual int64_t openCamera(const char* camSN) = 0;
62
+    virtual int64_t setInitParameters() = 0;
63
+    virtual std::string   getCameraSN() = 0;
64
+    virtual int64_t getCameraImageSize(int64_t &size) = 0;
65
+    virtual int64_t   getCameraImageWidth(int64_t& width) = 0;
66
+    virtual int64_t   getCameraImageHeigth(int64_t& height) = 0;
67
+#ifdef USE_OPENCV
68
+    virtual int64_t getOneImage(cv::Mat& img) = 0;
69
+    virtual int64_t takeSingleImage(cv::Mat& img) = 0;//软触发并取一次图
70
+#endif
71
+#ifdef USE_HALCON
72
+    virtual int64_t getOneImage(HalconCpp::HObject& img) = 0;
73
+    virtual int64_t takeSingleImage(HalconCpp::HObject& img) = 0;//软触发并取一次图
74
+#endif // USE_HALCON
75
+
76
+    virtual int64_t closeCamera() = 0 ;
77
+    virtual int64_t reConnectCamera() = 0;
78
+    virtual int64_t clearCameraBuf() = 0;
79
+    virtual int64_t startGrabbing() = 0;
80
+    virtual int64_t stopGrabbing() = 0;
81
+    virtual int64_t softTriggerOnce() = 0;//软触发一次
82
+    virtual int64_t setPixelType(E_PIXEL_TYPE type) = 0; //设置图像格式
83
+    virtual int64_t setTriggerMode(E_TRIGGER_MODE mode) = 0; //设置触发模式
84
+    virtual int64_t setTriggerSource(E_TRIGGER_SOURCE source) = 0; //设置触发源
85
+    virtual float   getExposureTime() = 0;//获取设备当前曝光时间
86
+    virtual int64_t setExposureTime(float expTime) = 0;//设置曝光
87
+    virtual int64_t setTriggerDelay(int delay) = 0; //设置触发延时
88
+    virtual int64_t setGain(float gainValue) = 0; //设置增益
89
+    virtual float getGain() = 0;//获取增益
90
+
91
+    enum 
92
+    {
93
+        IMAGESIZE_DEFAULT_WIDTH = 2590,
94
+        IMAGESIZE_DEFAULT_HEIGHT = 1944,
95
+    };
96
+    enum {
97
+        SUCCESS = 0,
98
+        ACTION_FAILED_UNDO = -100001,
99
+        GAMERA_UNKOWN_CONTROLLER = -98000,
100
+        GAMERA_FAILED_NODEVICE,
101
+        GAMERA_FAILED_ALLOCATE,
102
+        GAMERA_FAILED_OVERCONNECT,
103
+        GAMERA_FAILED_TOCONNECT,
104
+        GAMERA_FAILED_UNCONNECTED,
105
+        GAMERA_FAILED_SETEXPOSURE,
106
+        GAMERA_FAILED_INACTION,
107
+        GAMERA_FAILED_TIMEOUTEXEC,
108
+        GAMERA_FAILED_NOIMAGEACC,
109
+        GAMERA_FAILED_IMAGEBUFLEN,
110
+        GAMERA_FAILED_STDEXCEPTION,
111
+        GAMERA_FAILED_UNKNOWNEXCEPTION,
112
+        GAMERA_FAILED_GETIMAGE,
113
+        ERROR_UNDEFINE
114
+    };
115
+
116
+
117
+protected:
118
+    CvxCamera(){}
119
+};
120
+
121
+
122
+
123
+
124
+
125
+
126
+
127
+
128
+

+ 51 - 0
3rdparty/CvxCamera/include/defs.h

@@ -0,0 +1,51 @@
1
+#pragma once
2
+#include <stdio.h>
3
+#include "log.h"
4
+#ifdef _WIN32
5
+#define filename(x) strrchr(x,'\\')?strrchr(x,'\\')+1:x
6
+#else
7
+#if __GNUC__ >= 4
8
+#define filename(x) strrchr(x,'/')?strrchr(x,'/')+1:x
9
+#endif
10
+#endif
11
+
12
+//
13
+//
14
+//#define CREATE_LOG_HEAD \
15
+//char acLogStr[1024*4] = {0};\
16
+//int  iHeadLength = sprintf_s(acLogStr, 1024*4, "[%s:%d] %s:   ", filename(__FILE__), __LINE__, __FUNCTION__);\
17
+//
18
+//#define  LOG_TRACE(...) \
19
+//{\
20
+//    CREATE_LOG_HEAD\
21
+//    snprintf(acLogStr+iHeadLength, sizeof(acLogStr)-iHeadLength, __VA_ARGS__);\
22
+//    printf("[TRACE] %s", acLogStr);\
23
+//}
24
+//
25
+//#define  LOG_DEBUG(...) \
26
+//{\
27
+//    CREATE_LOG_HEAD\
28
+//    sprintf_s(acLogStr+iHeadLength, sizeof(acLogStr)-iHeadLength, __VA_ARGS__);\
29
+//    printf("[DEBUG] %s", acLogStr);\
30
+//}
31
+//
32
+//#define  LOG_INFO(...) \
33
+//{\
34
+//    CREATE_LOG_HEAD\
35
+//    snprintf(acLogStr+iHeadLength, sizeof(acLogStr)-iHeadLength, __VA_ARGS__);\
36
+//    printf("[INFO] %s", acLogStr);\
37
+//}
38
+//
39
+//#define  LOG_WARN(...) \
40
+//{\
41
+//    CREATE_LOG_HEAD\
42
+//    snprintf(acLogStr+iHeadLength, sizeof(acLogStr)-iHeadLength, __VA_ARGS__);\
43
+//    printf("[WARN] %s", acLogStr);\
44
+//}
45
+//
46
+//#define  LOG_ERROR(...) \
47
+//{\
48
+//    CREATE_LOG_HEAD\
49
+//    snprintf(acLogStr+iHeadLength, sizeof(acLogStr)-iHeadLength, __VA_ARGS__);\
50
+//    printf("[ERROR] %s", acLogStr);\
51
+//}

二进制
3rdparty/CvxCamera/lib/CvxCamera.lib


+ 54 - 0
3rdparty/ImgProcessAlg/include/FeatureMatching.h

@@ -0,0 +1,54 @@
1
+/*****************************************************************************
2
+*                                                                            *
3
+*  @file     FeatureMatching.h                                               *
4
+*  @brief    »ùÓÚorbµÄÌØÕ÷µãÆ¥Åä												 *
5
+*  Details.                                                                  *
6
+*                                                                            *
7
+*  @author   X P                                                             *
8
+*  @version  1.0.0.0                                                         *
9
+*  @date     2023-03-28                                                      *
10
+*  @license  GNU General Public License (GPL)                                *
11
+*                                                                            *
12
+*****************************************************************************/
13
+
14
+#ifndef _FEATURE_MATCHING_H_
15
+#define _FEATURE_MATCHING_H_
16
+
17
+#include <opencv2/opencv.hpp>
18
+#include <xfeatures2d.hpp>
19
+#include <qpoint.h>
20
+#include "ImgProcessGlobal.h"
21
+
22
+using namespace std;
23
+
24
+class CVX_PROCESS_EXPORT FeatureMatching
25
+{
26
+
27
+public:
28
+	FeatureMatching();
29
+	~FeatureMatching();
30
+	void ExtractDescriptors(const cv::Mat spread, int id);
31
+	void Matching(cv::Mat& homMat2d, float thresh = 30.f);
32
+	void AffineImage(cv::Mat &out);
33
+	void AffinePoint(const QPoint& pointOri, QPoint& pointDst);
34
+	static void AffinePoint(const cv::Mat& homMat2d,const QPoint& pointOri, QPoint& pointDst);
35
+private:
36
+	
37
+	int features_;
38
+	float scale_factory_;
39
+	int pyramid_levels_;
40
+	cv::Ptr<cv::ORB> orb_;
41
+	//cv::Ptr<cv::xfeatures2d::SURF> orb_;
42
+	typedef vector<cv::KeyPoint> KeyPoints;
43
+	cv::Mat spreads_[2];
44
+
45
+	cv::Mat homMat2d;
46
+	KeyPoints keypoints_[2];
47
+	cv::Mat descriptors_[2];
48
+};
49
+
50
+#endif
51
+
52
+
53
+
54
+

+ 72 - 0
3rdparty/ImgProcessAlg/include/ImgProcessAlg.h

@@ -0,0 +1,72 @@
1
+#pragma once
2
+#include "ImgProcessGlobal.h"
3
+#include "FeatureMatching.h"
4
+
5
+
6
+#if defined(_MSC_VER)
7
+#include <BaseTsd.h>
8
+typedef SSIZE_T ssize_t;
9
+#endif
10
+
11
+
12
+enum IBorderType {
13
+	IBORDER_CLAMP = (1 << 0),
14
+	IBORDER_MIRROR = (1 << 1),
15
+	IBORDER_REPEAT = (1 << 2),
16
+	IBORDER_CONSTANT = (1 << 3)
17
+};
18
+
19
+namespace IBorder 
20
+{
21
+	template<typename T>
22
+	T value(T value, T len, IBorderType type)
23
+	{
24
+		switch (type) {
25
+		case IBORDER_CLAMP: if (value < 0)
26
+			return 0;
27
+			if (value >= len)
28
+				return len - 1;
29
+			return value;
30
+		case IBORDER_MIRROR:
31
+			if (value < 0)
32
+				return -((value + 1) % len);
33
+			if (value >= len)
34
+				return len - 1 - value % len;
35
+			return value;
36
+		case IBORDER_REPEAT:
37
+			if (value < 0)
38
+				return len - 1 + ((value + 1) % len);
39
+			if (value >= len)
40
+				return value % len;
41
+			return value;
42
+		case IBORDER_CONSTANT:
43
+		default:
44
+			if (value < 0 || value >= len) return -1;
45
+		}
46
+		return -1;
47
+	}
48
+}
49
+
50
+static float g_gauss3_data[] = { 0.25f, 0.5f, 0.25f };
51
+static float g_gauss5_data[] = { 1.0f / 17.0f, 4.0f / 17.0f, 7.0f / 17.0f, 4.0f / 17.0f, 1.0f / 17.0f };
52
+static float g_gauss7_data[] = { 1.0f / 226.0f, 12.0f / 226.0f, 55.0f / 226.0f, 90.0f / 226.0f, 55.0f / 226.0f, 12.0f / 226.0f, 1.0f / 226.0f };
53
+static float g_derivate7_data[] = { -1.0f,-1.0f,-1.0f, 0.f, 1.0f,1.0f ,1.0f };
54
+static float g_derivate21_data[] = { -1.0f,-1.0f,-1.0f,-1.0f,-1.0f,-1.0f,-1.0f,-1.0f,-1.0f,-1.0f, 0.f, 1.0f,1.0f ,1.0f, 1.0f,1.0f ,1.0f, 1.0f,1.0f ,1.0f,1.0f };
55
+static float g_mean3_data[] = { 1.0f / 3.0f, 1.0f / 3.0f, 1.0f / 3.0f };
56
+static float g_mean5_data[] = { 1.0f / 5.0f, 1.0f / 5.0f, 1.0f / 5.0f, 1.0f / 5.0f, 1.0f / 5.0f };
57
+static float g_mean7_data[] = { 1.0f / 7.0f, 1.0f / 7.0f, 1.0f / 7.0f, 1.0f / 7.0f, 1.0f / 7.0f, 1.0f / 7.0f, 1.0f / 7.0f };
58
+static float g_mean11_data[] = { 1.0f / 11.0f, 1.0f / 11.0f, 1.0f / 11.0f, 1.0f / 11.0f, 1.0f / 11.0f, 1.0f / 11.0f, 1.0f / 11.0f, 1.0f / 11.0f, 1.0f / 11.0f, 1.0f / 11.0f, 1.0f / 11.0f };
59
+
60
+void CVX_PROCESS_EXPORT mulValue1f(float* dst, float const* src, const float value, const size_t n);
61
+
62
+
63
+void CVX_PROCESS_EXPORT convolveHorizontal1f(float* dst, const float* src, const size_t width, float const* weights, const size_t wn, IBorderType btype);
64
+
65
+float CVX_PROCESS_EXPORT ncc(const float* src1, const float* src2, const size_t n);
66
+
67
+cv::Mat CVX_PROCESS_EXPORT plotSignals1D(std::vector<float> projArray, int plotImageHeight = -1);
68
+
69
+//¼ÆËãͼÏñµÄÇåÎú¶È
70
+float CVX_PROCESS_EXPORT calImgSharpness(cv::Mat Pic, cv::Rect roi);
71
+
72
+int CVX_PROCESS_EXPORT calRoiInfo(const cv::Mat& m, int& idxL, int& idxR, int& idyT, int& idyB, float rectExpandWidthFactor = 0.05, int sampleStep = 40, int gradientThresh = 50);

+ 7 - 0
3rdparty/ImgProcessAlg/include/ImgProcessGlobal.h

@@ -0,0 +1,7 @@
1
+#pragma once
2
+
3
+#if defined(IMG_PROCESS_EXPORTS)
4
+#define CVX_PROCESS_EXPORT __declspec(dllexport)
5
+#else
6
+#define CVX_PROCESS_EXPORT __declspec(dllimport)
7
+#endif

二进制
3rdparty/ImgProcessAlg/lib/ImgProcessAlg.lib


+ 69 - 0
3rdparty/include22/BarcodeAlgDllApi.h

@@ -0,0 +1,69 @@
1
+/*****************************************************************************
2
+模块名      : FmmAlg
3
+文件名      : FmmAlgDllApi.h
4
+相关文件    :
5
+文件实现功能:
6
+作者        : XP
7
+版本        : 1.0.0
8
+-----------------------------------------------------------------------------
9
+修改记录:
10
+
11
+******************************************************************************/
12
+#pragma once
13
+#ifdef DLL_EXPORTS
14
+#define EXPORT_API __declspec(dllexport)
15
+#else
16
+#define EXPORT_API __declspec(dllimport)
17
+#endif
18
+
19
+
20
+#ifndef EXPORT_API_C
21
+	#define EXPORT_API_C extern "C" EXPORT_API
22
+#endif // !EXPORT_API_C
23
+
24
+
25
+#ifndef IN
26
+#define IN
27
+#endif
28
+#ifndef OUT
29
+#define OUT
30
+#endif
31
+#ifndef INOUT
32
+#define INOUT
33
+#endif
34
+
35
+namespace HalconCpp
36
+{
37
+	class HObject;
38
+	class HTuple;
39
+}
40
+
41
+struct AlgInfo
42
+{
43
+	const char* version;		//	版本号
44
+	const char* name;			//	算法名称	
45
+	const char* lastUpdated;	//	更新日期
46
+	const char* updateDescribe;	//	最新修改记录
47
+};
48
+
49
+
50
+//获取算法信息
51
+EXPORT_API_C int getAlgInfo(OUT AlgInfo& algInfo);
52
+
53
+
54
+
55
+/// <summary>
56
+/// 读取配置文件,(最先运行)
57
+/// </summary>
58
+/// <param name="xmlPath">xml路径</param>
59
+/// <returns>函数运行成功为0</returns>
60
+EXPORT_API int loadConfigParams(IN const char* xmlPath);
61
+
62
+/// <summary>
63
+/// 处理函数
64
+/// </summary>
65
+/// <param name="image">输入图像</param>
66
+/// <param name="outXlds">输出xld信息</param>
67
+/// <param name="barcodes">读取的barcodes</param>
68
+/// <returns></returns>
69
+EXPORT_API void  process(IN const  HalconCpp::HObject& ho_Image, OUT HalconCpp::HObject& ho_outXlds, OUT HalconCpp::HTuple& hv_barcodes, OUT HalconCpp::HTuple hv_flag);

文件差异内容过多而无法显示
+ 5816 - 0
3rdparty/include22/CameraApi.h


文件差异内容过多而无法显示
+ 6876 - 0
3rdparty/include22/CameraApiLoad.h


文件差异内容过多而无法显示
+ 1015 - 0
3rdparty/include22/CameraDefine.H


+ 333 - 0
3rdparty/include22/CameraGrabber.h

@@ -0,0 +1,333 @@
1
+#ifndef _MV_CAMERA_GRABBER_H_
2
+#define _MV_CAMERA_GRABBER_H_
3
+
4
+#include "CameraDefine.h"
5
+#include "CameraStatus.h"
6
+
7
+
8
+/// @ingroup GRABBER_CREATE
9
+/// \~chinese
10
+/// \brief 弹出相机列表让用户选择要打开的相机
11
+/// \param [out] Grabber 返回新创建的采集器
12
+/// \return 成功返回 CAMERA_STATUS_SUCCESS(0)。否则返回非0值的错误码, 请参考 CameraStatus.h 中错误码的定义。
13
+/// \note 本函数内部使用了 @link CameraInit @endlink 打开相机,因此可以使用 @link CameraGrabber_GetCameraHandle @endlink 获取相机句柄,进而使用其他SDK API来操作相机。
14
+/// \~english
15
+/// \brief Pop-up camera list allows the user to select the camera to open
16
+/// \param [out] Grabber returns newly created grabber
17
+/// \return Returns CAMERA_STATUS_SUCCESS(0) successfully. Otherwise, it returns a non-zero error code. Please refer to the definition of the error code in CameraStatus.h.
18
+/// \note This function uses @link CameraInit @endlink internally to open the camera, so you can use @link CameraGrabber_GetCameraHandle @endlink to get the camera handle and use other SDK APIs to operate the camera.
19
+MVSDK_API CameraSdkStatus __stdcall CameraGrabber_CreateFromDevicePage(
20
+	void** Grabber
21
+	);
22
+
23
+/// @ingroup GRABBER_CREATE
24
+/// \~chinese
25
+/// \brief 使用相机列表索引创建Grabber
26
+/// \param [out] Grabber 返回新创建的采集器
27
+/// \param [in] Index 相机索引
28
+/// \return 成功返回 CAMERA_STATUS_SUCCESS(0)。否则返回非0值的错误码, 请参考 CameraStatus.h 中错误码的定义。
29
+/// \note 本函数内部使用了 @link CameraInit @endlink 打开相机,因此可以使用 @link CameraGrabber_GetCameraHandle @endlink 获取相机句柄,进而使用其他SDK API来操作相机。
30
+/// \~english
31
+/// \brief Creating a Grabber Using a Camera List Index
32
+/// \param [out] Grabber returns newly created grabber
33
+/// \param [in] Index Camera index
34
+/// \return Returns CAMERA_STATUS_SUCCESS(0) successfully. Otherwise, it returns a non-zero error code. Please refer to the definition of the error code in CameraStatus.h.
35
+/// \note This function uses @link CameraInit @endlink internally to open the camera, so you can use @link CameraGrabber_GetCameraHandle @endlink to get the camera handle and use other SDK APIs to operate the camera.
36
+MVSDK_API CameraSdkStatus __stdcall CameraGrabber_CreateByIndex(
37
+	void** Grabber,
38
+	int Index
39
+	);
40
+
41
+/// @ingroup GRABBER_CREATE
42
+/// \~chinese
43
+/// \brief 使用相机名称创建Grabber
44
+/// \param [out] Grabber 返回新创建的采集器
45
+/// \param [in] Name 相机名称。@link #tSdkCameraDevInfo.acFriendlyName @endlink
46
+/// \return 成功返回 CAMERA_STATUS_SUCCESS(0)。否则返回非0值的错误码, 请参考 CameraStatus.h 中错误码的定义。
47
+/// \note 本函数内部使用了 @link CameraInit @endlink 打开相机,因此可以使用 @link CameraGrabber_GetCameraHandle @endlink 获取相机句柄,进而使用其他SDK API来操作相机。
48
+/// \~english
49
+/// \brief Create a Grabber with a Camera Name
50
+/// \param [out] Grabber returns newly created grabber
51
+/// \param [in] Name Camera name.@link #tSdkCameraDevInfo.acFriendlyName @endlink
52
+/// \return Returns CAMERA_STATUS_SUCCESS(0) successfully. Otherwise, it returns a non-zero error code. Please refer to the definition of the error code in CameraStatus.h.
53
+/// \note This function uses @link CameraInit @endlink internally to open the camera, so you can use @link CameraGrabber_GetCameraHandle @endlink to get the camera handle and use other SDK APIs to operate the camera.
54
+MVSDK_API CameraSdkStatus __stdcall CameraGrabber_CreateByName(
55
+	void** Grabber,
56
+	char* Name
57
+	);
58
+
59
+/// @ingroup GRABBER_CREATE
60
+/// \~chinese
61
+/// \brief 从设备信息创建Grabber
62
+/// \param [out] Grabber 返回新创建的采集器
63
+/// \param [in] pDevInfo 设备信息。@link #CameraEnumerateDevice @endlink
64
+/// \return 成功返回 CAMERA_STATUS_SUCCESS(0)。否则返回非0值的错误码, 请参考 CameraStatus.h 中错误码的定义。
65
+/// \note 本函数内部使用了 @link CameraInit @endlink 打开相机,因此可以使用 @link CameraGrabber_GetCameraHandle @endlink 获取相机句柄,进而使用其他SDK API来操作相机。
66
+/// \~english
67
+/// \brief Create Grabber from device info
68
+/// \param [out] Grabber returns newly created grabber
69
+/// \param [in] pDevInfo device information. @link #CameraEnumerateDevice @endlink
70
+/// \return Returns CAMERA_STATUS_SUCCESS(0) successfully. Otherwise, it returns a non-zero error code. Please refer to the definition of the error code in CameraStatus.h.
71
+/// \note This function uses @link CameraInit @endlink internally to open the camera, so you can use @link CameraGrabber_GetCameraHandle @endlink to get the camera handle and use other SDK APIs to operate the camera.
72
+MVSDK_API CameraSdkStatus __stdcall CameraGrabber_Create(
73
+	void** Grabber,
74
+	tSdkCameraDevInfo* pDevInfo
75
+	);
76
+
77
+/// @ingroup GRABBER_DESTROY
78
+/// \~chinese
79
+/// \brief 销毁Grabber
80
+/// \param [in] Grabber 采集器
81
+/// \return 成功返回 CAMERA_STATUS_SUCCESS(0)。否则返回非0值的错误码, 请参考 CameraStatus.h 中错误码的定义。
82
+/// \~english
83
+/// \brief Destroy Grabber
84
+/// \param [in] Grabber
85
+/// \return Returns CAMERA_STATUS_SUCCESS(0) successfully. Otherwise, it returns a non-zero error code. Please refer to the definition of the error code in CameraStatus.h.
86
+MVSDK_API CameraSdkStatus __stdcall CameraGrabber_Destroy(
87
+	void* Grabber
88
+	);
89
+
90
+/// @ingroup GRABBER_CTRL
91
+/// \~chinese
92
+/// \brief 设置预览视频的显示窗口
93
+/// \param [in] Grabber 采集器
94
+/// \param [in] hWnd 显示窗口的窗口句柄
95
+/// \return 成功返回 CAMERA_STATUS_SUCCESS(0)。否则返回非0值的错误码, 请参考 CameraStatus.h 中错误码的定义。
96
+/// \~english
97
+/// \brief Set the preview video display window
98
+/// \param [in] Grabber
99
+/// \param [in] hWnd window handle of the display window
100
+/// \return Returns CAMERA_STATUS_SUCCESS(0) successfully. Otherwise, it returns a non-zero error code. Please refer to the definition of the error code in CameraStatus.h.
101
+MVSDK_API CameraSdkStatus __stdcall CameraGrabber_SetHWnd(
102
+	void* Grabber,
103
+	HWND hWnd
104
+	);
105
+
106
+/// @ingroup GRABBER_CTRL
107
+/// \~chinese
108
+/// \brief 设置Grabber取图时使用的优先级
109
+/// \param [in] Grabber 采集器
110
+/// \param [in] Priority 取图优先级 详见:@link #emCameraGetImagePriority @endlink
111
+/// \return 成功返回 CAMERA_STATUS_SUCCESS(0)。否则返回非0值的错误码, 请参考 CameraStatus.h 中错误码的定义。
112
+/// \~english
113
+/// \brief Sets the priority used by Grabber when fetching graphs
114
+/// \param [in] Grabber
115
+/// \param [in] Priority GetImageBuffer priority, For details see: @link #emCameraGetImagePriority @endlink
116
+/// \return Returns CAMERA_STATUS_SUCCESS(0) successfully. Otherwise, it returns a non-zero error code. Please refer to the definition of the error code in CameraStatus.h.
117
+MVSDK_API CameraSdkStatus __stdcall CameraGrabber_SetPriority(
118
+	void* Grabber,
119
+	UINT Priority
120
+	);
121
+
122
+/// @ingroup GRABBER_CTRL
123
+/// \~chinese
124
+/// \brief 开始采集
125
+/// \param [in] Grabber 采集器
126
+/// \return 成功返回 CAMERA_STATUS_SUCCESS(0)。否则返回非0值的错误码, 请参考 CameraStatus.h 中错误码的定义。
127
+/// \note Grabber必须进入采集状态,采集回调、抓图等功能才能正常运作
128
+/// \~english
129
+/// \brief Start Grabber
130
+/// \param [in] Grabber
131
+/// \return Returns CAMERA_STATUS_SUCCESS(0) successfully. Otherwise, it returns a non-zero error code. Please refer to the definition of the error code in CameraStatus.h.
132
+/// \note Grabber must enter the acquisition state, grab callbacks, snapshot and other functions in order to function properly
133
+MVSDK_API CameraSdkStatus __stdcall CameraGrabber_StartLive(
134
+	void* Grabber
135
+	);
136
+
137
+/// @ingroup GRABBER_CTRL
138
+/// \~chinese
139
+/// \brief 停止采集
140
+/// \param [in] Grabber 采集器
141
+/// \return 成功返回 CAMERA_STATUS_SUCCESS(0)。否则返回非0值的错误码, 请参考 CameraStatus.h 中错误码的定义。
142
+/// \warning 本函数内部会等待所有回调函数结束后才返回调用者,并且在等待时会派发windows消息。
143
+/// \~english
144
+/// \brief Stop Grabber
145
+/// \param [in] Grabber
146
+/// \return Returns CAMERA_STATUS_SUCCESS(0) successfully. Otherwise, it returns a non-zero error code. Please refer to the definition of the error code in CameraStatus.h.
147
+/// \warning This function will wait for all callbacks to end before returning to the caller,And it will dispatch windows messages while waiting.
148
+MVSDK_API CameraSdkStatus __stdcall CameraGrabber_StopLive(
149
+	void* Grabber
150
+	);
151
+
152
+/// @ingroup GRABBER_SNAPSHOT
153
+/// \~chinese
154
+/// \brief 同步抓图
155
+/// \param [in] Grabber 采集器
156
+/// \param [out] Image 返回抓取到的图像 \note 需要调用@link #CameraImage_Destroy @endlink释放
157
+/// \param [in] TimeOut 超时时间(毫秒)
158
+/// \return 成功返回 CAMERA_STATUS_SUCCESS(0)。否则返回非0值的错误码, 请参考 CameraStatus.h 中错误码的定义。
159
+/// \~english
160
+/// \brief Synchronized snapshot
161
+/// \param [in] Grabber
162
+/// \param [out] Image Returns Captured Image \note Need to Call @link #CameraImage_Destroy @endlink Release
163
+/// \param [in] TimeOut Timeout (milliseconds)
164
+/// \return Returns CAMERA_STATUS_SUCCESS(0) successfully. Otherwise, it returns a non-zero error code. Please refer to the definition of the error code in CameraStatus.h.
165
+MVSDK_API CameraSdkStatus __stdcall CameraGrabber_SaveImage(
166
+	void* Grabber,
167
+	void** Image,
168
+	DWORD TimeOut
169
+	);
170
+
171
+/// @ingroup GRABBER_SNAPSHOT
172
+/// \~chinese
173
+/// \brief 提交一个异步的抓图请求,提交成功后待抓图完成会回调用户设置的完成函数
174
+/// \param [in] Grabber 采集器
175
+/// \return 成功返回 CAMERA_STATUS_SUCCESS(0)。否则返回非0值的错误码, 请参考 CameraStatus.h 中错误码的定义。
176
+/// \see CameraGrabber_SetSaveImageCompleteCallback
177
+/// \~english
178
+/// \brief Submit an asynchronous snapshot request, complete the user's completion function after the completion of the submission.
179
+/// \param [in] Grabber
180
+/// \return Returns CAMERA_STATUS_SUCCESS(0) successfully. Otherwise, it returns a non-zero error code. Please refer to the definition of the error code in CameraStatus.h.
181
+/// \see CameraGrabber_SetSaveImageCompleteCallback
182
+MVSDK_API CameraSdkStatus __stdcall CameraGrabber_SaveImageAsync(
183
+	void* Grabber
184
+	);
185
+
186
+/// @ingroup GRABBER_SNAPSHOT
187
+/// \~chinese
188
+/// \brief 提交一个异步的抓图请求,提交成功后待抓图完成会回调用户设置的完成函数
189
+/// \param [in] Grabber 采集器
190
+/// \param [in] UserData 用户数据,可使用 @link CameraImage_GetUserData @endlink 从Image获取此值
191
+/// \return 成功返回 CAMERA_STATUS_SUCCESS(0)。否则返回非0值的错误码, 请参考 CameraStatus.h 中错误码的定义。
192
+/// \see CameraGrabber_SetSaveImageCompleteCallback
193
+/// \~english
194
+/// \brief Submit an asynchronous snapshot request, complete the user's completion function after the completion of the submission.
195
+/// \param [in] Grabber
196
+/// \param [in] UserData user data, which can be obtained from Image using @link CameraImage_GetUserData @endlink
197
+/// \return Returns CAMERA_STATUS_SUCCESS(0) successfully. Otherwise, it returns a non-zero error code. Please refer to the definition of the error code in CameraStatus.h.
198
+/// \see CameraGrabber_SetSaveImageCompleteCallback
199
+MVSDK_API CameraSdkStatus __stdcall CameraGrabber_SaveImageAsyncEx(
200
+	void* Grabber,
201
+	void* UserData
202
+	);
203
+
204
+/// @ingroup GRABBER_SNAPSHOT
205
+/// \~chinese
206
+/// \brief 设置异步方式抓图的完成函数
207
+/// \param [in] Grabber 采集器
208
+/// \param [in] Callback 当异步抓图任务完成时被调用
209
+/// \param [in] Context 当Callback被调用时,作为参数传入Callback
210
+/// \return 成功返回 CAMERA_STATUS_SUCCESS(0)。否则返回非0值的错误码, 请参考 CameraStatus.h 中错误码的定义。
211
+/// \see CameraGrabber_SaveImageAsync CameraGrabber_SaveImageAsyncEx
212
+/// \~english
213
+/// \brief Set the completion function of asynchronous mode snapshot
214
+/// \param [in] Grabber
215
+/// \param [in] Callback Callback is called when the asynchronous snapshot task completes
216
+/// \param [in] Context Passed as a parameter when the Callback is invoked
217
+/// \return Returns CAMERA_STATUS_SUCCESS(0) successfully. Otherwise, it returns a non-zero error code. Please refer to the definition of the error code in CameraStatus.h.
218
+/// \see CameraGrabber_SaveImageAsync CameraGrabber_SaveImageAsyncEx
219
+MVSDK_API CameraSdkStatus __stdcall CameraGrabber_SetSaveImageCompleteCallback(
220
+	void* Grabber,
221
+	pfnCameraGrabberSaveImageComplete Callback,
222
+	void* Context
223
+	);
224
+
225
+/// @ingroup GRABBER_CB
226
+/// \~chinese
227
+/// \brief 设置帧监听函数
228
+/// \param [in] Grabber 采集器
229
+/// \param [in] Listener 监听函数
230
+/// \param [in] Context 当Listener被调用时,作为参数传入Listener
231
+/// \return 成功返回 CAMERA_STATUS_SUCCESS(0)。否则返回非0值的错误码, 请参考 CameraStatus.h 中错误码的定义。
232
+/// \~english
233
+/// \brief Set frame listening function
234
+/// \param [in] Grabber
235
+/// \param [in] Listener listener function
236
+/// \param [in] Context Passed as a parameter when the Listener is invoked
237
+/// \return Returns CAMERA_STATUS_SUCCESS(0) successfully. Otherwise, it returns a non-zero error code. Please refer to the definition of the error code in CameraStatus.h.
238
+MVSDK_API CameraSdkStatus __stdcall CameraGrabber_SetFrameListener(
239
+	void* Grabber,
240
+	pfnCameraGrabberFrameListener Listener,
241
+	void* Context
242
+	);
243
+
244
+/// @ingroup GRABBER_CB
245
+/// \~chinese
246
+/// \brief 设置RAW数据回调函数
247
+/// \param [in] Grabber 采集器
248
+/// \param [in] Callback Raw回调函数
249
+/// \param [in] Context 当Callback被调用时,作为参数传入Callback
250
+/// \return 成功返回 CAMERA_STATUS_SUCCESS(0)。否则返回非0值的错误码, 请参考 CameraStatus.h 中错误码的定义。
251
+/// \~english
252
+/// \brief Set RAW data callback function
253
+/// \param [in] Grabber
254
+/// \param [in] Callback Raw data callback function
255
+/// \param [in] Context Passed as a parameter when the Callback is invoked
256
+/// \return Returns CAMERA_STATUS_SUCCESS(0) successfully. Otherwise, it returns a non-zero error code. Please refer to the definition of the error code in CameraStatus.h.
257
+MVSDK_API CameraSdkStatus __stdcall CameraGrabber_SetRawCallback(
258
+	void* Grabber,
259
+	pfnCameraGrabberFrameCallback Callback,
260
+	void* Context
261
+	);
262
+
263
+/// @ingroup GRABBER_CB
264
+/// \~chinese
265
+/// \brief 设置RGB回调函数
266
+/// \param [in] Grabber 采集器
267
+/// \param [in] Callback RGB回调函数
268
+/// \param [in] Context 当Callback被调用时,作为参数传入Callback
269
+/// \return 成功返回 CAMERA_STATUS_SUCCESS(0)。否则返回非0值的错误码, 请参考 CameraStatus.h 中错误码的定义。
270
+/// \~english
271
+/// \brief Set RGB callback function
272
+/// \param [in] Grabber
273
+/// \param [in] Callback RGB data callback function
274
+/// \param [in] Context Passed as a parameter when the Callback is invoked
275
+/// \return Returns CAMERA_STATUS_SUCCESS(0) successfully. Otherwise, it returns a non-zero error code. Please refer to the definition of the error code in CameraStatus.h.
276
+MVSDK_API CameraSdkStatus __stdcall CameraGrabber_SetRGBCallback(
277
+	void* Grabber,
278
+	pfnCameraGrabberFrameCallback Callback,
279
+	void* Context
280
+	);
281
+
282
+/// @ingroup GRABBER_CTRL
283
+/// \~chinese
284
+/// \brief 获取相机句柄
285
+/// \param [in] Grabber 采集器
286
+/// \param [out] hCamera 返回的相机句柄
287
+/// \return 成功返回 CAMERA_STATUS_SUCCESS(0)。否则返回非0值的错误码, 请参考 CameraStatus.h 中错误码的定义。
288
+/// \~english
289
+/// \brief Get camera handle
290
+/// \param [in] Grabber
291
+/// \param [out] hCamera returned camera handle
292
+/// \return Returns CAMERA_STATUS_SUCCESS(0) successfully. Otherwise, it returns a non-zero error code. Please refer to the definition of the error code in CameraStatus.h.
293
+MVSDK_API CameraSdkStatus __stdcall CameraGrabber_GetCameraHandle(
294
+	void* Grabber,
295
+	CameraHandle *hCamera
296
+	);
297
+
298
+/// @ingroup GRABBER_CTRL
299
+/// \~chinese
300
+/// \brief 获取帧统计信息
301
+/// \param [in] Grabber 采集器
302
+/// \param [out] stat 返回的统计信息
303
+/// \return 成功返回 CAMERA_STATUS_SUCCESS(0)。否则返回非0值的错误码, 请参考 CameraStatus.h 中错误码的定义。
304
+/// \~english
305
+/// \brief Get frame statistics
306
+/// \param [in] Grabber
307
+/// \param [out] stat returned statistics
308
+/// \return Returns CAMERA_STATUS_SUCCESS(0) successfully. Otherwise, it returns a non-zero error code. Please refer to the definition of the error code in CameraStatus.h.
309
+MVSDK_API CameraSdkStatus __stdcall CameraGrabber_GetStat(
310
+	void* Grabber,
311
+	tSdkGrabberStat *stat
312
+	);
313
+
314
+/// @ingroup GRABBER_CTRL
315
+/// \~chinese
316
+/// \brief 获取相机DevInfo
317
+/// \param [in] Grabber 采集器
318
+/// \param [out] DevInfo 返回的相机DevInfo
319
+/// \return 成功返回 CAMERA_STATUS_SUCCESS(0)。否则返回非0值的错误码, 请参考 CameraStatus.h 中错误码的定义。
320
+/// \~english
321
+/// \brief Get Camera DevInfo
322
+/// \param [in] Grabber
323
+/// \param [out] DevInfo Returns Camera DevInfo
324
+/// \return Returns CAMERA_STATUS_SUCCESS(0) successfully. Otherwise, it returns a non-zero error code. Please refer to the definition of the error code in CameraStatus.h.
325
+MVSDK_API CameraSdkStatus __stdcall CameraGrabber_GetCameraDevInfo(
326
+	void* Grabber,
327
+	tSdkCameraDevInfo *DevInfo
328
+	);
329
+
330
+
331
+
332
+
333
+#endif // _MV_CAMERA_GRABBER_H_

+ 380 - 0
3rdparty/include22/CameraImage.h

@@ -0,0 +1,380 @@
1
+#ifndef _MV_CAMERA_IMAGE_H_
2
+#define _MV_CAMERA_IMAGE_H_
3
+
4
+#include "CameraDefine.h"
5
+#include "CameraStatus.h"
6
+
7
+
8
+/// @ingroup MV_IMAGE
9
+/// \~chinese
10
+/// \brief 创建一个新的Image
11
+/// \param [out] Image 新创建的图片
12
+/// \param [in] pFrameBuffer 帧数据
13
+/// \param [in] pFrameHead 帧头
14
+/// \param [in] bCopy TRUE: 复制出一份新的帧数据   FALSE: 不复制,直接使用pFrameBuffer指向的缓冲区
15
+/// \return 成功返回 CAMERA_STATUS_SUCCESS(0)。否则返回非0值的错误码, 请参考 CameraStatus.h 中错误码的定义。
16
+/// \~english
17
+/// \brief Create a new Image
18
+/// \param [out] Image Newly Created Image
19
+/// \param [in] pFrameBuffer frame data
20
+/// \param [in] pFrameHead Frame Header
21
+/// \param [in] bCopy TRUE: Copy a new frame data FALSE: Do not copy, directly use the buffer pointed to by pFrameBuffer
22
+/// \return Returns CAMERA_STATUS_SUCCESS(0) successfully. Otherwise, it returns a non-zero error code. Please refer to the definition of the error code in CameraStatus.h.
23
+MVSDK_API CameraSdkStatus __stdcall CameraImage_Create(
24
+	void** Image,
25
+	BYTE *pFrameBuffer, 
26
+	tSdkFrameHead* pFrameHead,
27
+	BOOL bCopy
28
+	);
29
+
30
+/// @ingroup MV_IMAGE
31
+/// \~chinese
32
+/// \brief 创建一个空的Image
33
+/// \param [out] Image 新创建的图片
34
+/// \return 成功返回 CAMERA_STATUS_SUCCESS(0)。否则返回非0值的错误码, 请参考 CameraStatus.h 中错误码的定义。
35
+/// \~english
36
+/// \brief Create an empty Image
37
+/// \param [out] Image Newly Created Image
38
+/// \return Returns CAMERA_STATUS_SUCCESS(0) successfully. Otherwise, it returns a non-zero error code. Please refer to the definition of the error code in CameraStatus.h.
39
+MVSDK_API CameraSdkStatus __stdcall CameraImage_CreateEmpty(
40
+	void** Image
41
+	);
42
+
43
+/// @ingroup MV_IMAGE
44
+/// \~chinese
45
+/// \brief 销毁Image
46
+/// \param [in] Image
47
+/// \return 成功返回 CAMERA_STATUS_SUCCESS(0)。否则返回非0值的错误码, 请参考 CameraStatus.h 中错误码的定义。
48
+/// \~english
49
+/// \brief Destroy Image
50
+/// \param [in] Image
51
+/// \return Returns CAMERA_STATUS_SUCCESS(0) successfully. Otherwise, it returns a non-zero error code. Please refer to the definition of the error code in CameraStatus.h.
52
+MVSDK_API CameraSdkStatus __stdcall CameraImage_Destroy(
53
+	void* Image
54
+	);
55
+
56
+/// @ingroup MV_IMAGE
57
+/// \~chinese
58
+/// \brief 从Image获取帧数据和帧头
59
+/// \param [in] Image
60
+/// \param [out] DataBuffer 帧数据
61
+/// \param [out] Head 帧头
62
+/// \return 成功返回 CAMERA_STATUS_SUCCESS(0)。否则返回非0值的错误码, 请参考 CameraStatus.h 中错误码的定义。
63
+/// \~english
64
+/// \brief Get frame data and frame header from Image
65
+/// \param [in] Image
66
+/// \param [out] DataBuffer Frame Data
67
+/// \param [out] Head header
68
+/// \return Returns CAMERA_STATUS_SUCCESS(0) successfully. Otherwise, it returns a non-zero error code. Please refer to the definition of the error code in CameraStatus.h.
69
+MVSDK_API CameraSdkStatus __stdcall CameraImage_GetData(
70
+	void* Image,
71
+	BYTE** DataBuffer,
72
+	tSdkFrameHead** Head
73
+	);
74
+
75
+/// @ingroup MV_IMAGE
76
+/// \~chinese
77
+/// \brief 获取Image的用户自定义数据
78
+/// \param [in] Image
79
+/// \param [out] UserData 返回用户自定义数据
80
+/// \return 成功返回 CAMERA_STATUS_SUCCESS(0)。否则返回非0值的错误码, 请参考 CameraStatus.h 中错误码的定义。
81
+/// \~english
82
+/// \brief Get User's Custom Data of Image
83
+/// \param [in] Image
84
+/// \param [out] UserData returns user-defined data
85
+/// \return Returns CAMERA_STATUS_SUCCESS(0) successfully. Otherwise, it returns a non-zero error code. Please refer to the definition of the error code in CameraStatus.h.
86
+MVSDK_API CameraSdkStatus __stdcall CameraImage_GetUserData(
87
+	void* Image,
88
+	void** UserData
89
+	);
90
+
91
+/// @ingroup MV_IMAGE
92
+/// \~chinese
93
+/// \brief 设置Image的用户自定义数据
94
+/// \param [in] Image
95
+/// \param [in] UserData 用户自定义数据
96
+/// \return 成功返回 CAMERA_STATUS_SUCCESS(0)。否则返回非0值的错误码, 请参考 CameraStatus.h 中错误码的定义。
97
+/// \~english
98
+/// \brief Set user-defined data for Image
99
+/// \param [in] Image
100
+/// \param [in] UserData User-defined data
101
+/// \return Returns CAMERA_STATUS_SUCCESS(0) successfully. Otherwise, it returns a non-zero error code. Please refer to the definition of the error code in CameraStatus.h.
102
+MVSDK_API CameraSdkStatus __stdcall CameraImage_SetUserData(
103
+	void* Image,
104
+	void* UserData
105
+	);
106
+
107
+/// @ingroup MV_IMAGE
108
+/// \~chinese
109
+/// \brief 判断一个Image是否为空
110
+/// \param [in] Image
111
+/// \param [out] IsEmpty 为空返回:TRUE(1)  否则返回:FALSE(0)
112
+/// \return 成功返回 CAMERA_STATUS_SUCCESS(0)。否则返回非0值的错误码, 请参考 CameraStatus.h 中错误码的定义。
113
+/// \~english
114
+/// \brief Determine if an Image is empty
115
+/// \param [in] Image
116
+/// \param [out] IsEmpty Empty Returns: TRUE(1) Otherwise returns: FALSE(0)
117
+/// \return Returns CAMERA_STATUS_SUCCESS(0) successfully. Otherwise, it returns a non-zero error code. Please refer to the definition of the error code in CameraStatus.h.
118
+MVSDK_API CameraSdkStatus __stdcall CameraImage_IsEmpty(
119
+	void* Image,
120
+	BOOL* IsEmpty
121
+	);
122
+
123
+/// @ingroup MV_IMAGE
124
+/// \~chinese
125
+/// \brief 绘制Image到指定窗口
126
+/// \param [in] Image
127
+/// \param [in] hWnd 目的窗口
128
+/// \param [in] Algorithm 缩放算法  0:快速但质量稍差  1:速度慢但质量好
129
+/// \return 成功返回 CAMERA_STATUS_SUCCESS(0)。否则返回非0值的错误码, 请参考 CameraStatus.h 中错误码的定义。
130
+/// \~english
131
+/// \brief Draw Image to the specified window
132
+/// \param [in] Image
133
+/// \param [in] hWnd destination window
134
+/// \param [in] Algorithm scaling algorithm 0:fast but slightly worse quality  1:slower but better quality
135
+/// \return Returns CAMERA_STATUS_SUCCESS(0) successfully. Otherwise, it returns a non-zero error code. Please refer to the definition of the error code in CameraStatus.h.
136
+MVSDK_API CameraSdkStatus __stdcall CameraImage_Draw(
137
+	void* Image,
138
+	HWND hWnd,
139
+	int Algorithm
140
+	);
141
+
142
+/// @ingroup MV_IMAGE
143
+/// \~chinese
144
+/// \brief 拉升绘制Image到指定窗口
145
+/// \param [in] Image
146
+/// \param [in] hWnd 目的窗口
147
+/// \param [in] Algorithm 缩放算法  0:快速但质量稍差  1:速度慢但质量好
148
+/// \return 成功返回 CAMERA_STATUS_SUCCESS(0)。否则返回非0值的错误码, 请参考 CameraStatus.h 中错误码的定义。
149
+/// \~english
150
+/// \brief Pull up drawing Image to the specified window
151
+/// \param [in] Image
152
+/// \param [in] hWnd destination window
153
+/// \param [in] Algorithm scaling algorithm 0:fast but slightly worse quality  1:slower but better quality
154
+/// \return Returns CAMERA_STATUS_SUCCESS(0) successfully. Otherwise, it returns a non-zero error code. Please refer to the definition of the error code in CameraStatus.h.
155
+MVSDK_API CameraSdkStatus __stdcall CameraImage_DrawFit(
156
+	void* Image,
157
+	HWND hWnd,
158
+	int Algorithm
159
+	);
160
+
161
+/// @ingroup MV_IMAGE
162
+/// \~chinese
163
+/// \brief 绘制Image到指定DC
164
+/// \param [in] Image
165
+/// \param [in] hDC 目的DC
166
+/// \param [in] Algorithm 缩放算法  0:快速但质量稍差  1:速度慢但质量好
167
+/// \param [in] xDst 目标矩形的左上角X坐标
168
+/// \param [in] yDst 目标矩形的左上角Y坐标
169
+/// \param [in] cxDst 目标矩形的宽度
170
+/// \param [in] cyDst 目标矩形的高度
171
+/// \return 成功返回 CAMERA_STATUS_SUCCESS(0)。否则返回非0值的错误码, 请参考 CameraStatus.h 中错误码的定义。
172
+/// \~english
173
+/// \brief Draw Image to specified DC
174
+/// \param [in] Image
175
+/// \param [in] hDC destination DC
176
+/// \param [in] Algorithm scaling algorithm 0:fast but slightly worse quality   1:slower but better quality
177
+/// \param [in] xDst The X coordinate of the upper left corner of the target rectangle
178
+/// \param [in] yDst The Y coordinate of the upper left corner of the target rectangle
179
+/// \param [in] cxDst Width of target rectangle
180
+/// \param [in] cyDst Height of target rectangle
181
+/// \return Returns CAMERA_STATUS_SUCCESS(0) successfully. Otherwise, it returns a non-zero error code. Please refer to the definition of the error code in CameraStatus.h.
182
+MVSDK_API CameraSdkStatus __stdcall CameraImage_DrawToDC(
183
+	void* Image,
184
+	HDC hDC,
185
+	int Algorithm,
186
+	int xDst,
187
+	int yDst,
188
+	int cxDst,
189
+	int cyDst
190
+	);
191
+
192
+/// @ingroup MV_IMAGE
193
+/// \~chinese
194
+/// \brief 拉升绘制Image到指定DC
195
+/// \param [in] Image
196
+/// \param [in] hDC 目的DC
197
+/// \param [in] Algorithm 缩放算法  0:快速但质量稍差  1:速度慢但质量好
198
+/// \param [in] xDst 目标矩形的左上角X坐标
199
+/// \param [in] yDst 目标矩形的左上角Y坐标
200
+/// \param [in] cxDst 目标矩形的宽度
201
+/// \param [in] cyDst 目标矩形的高度
202
+/// \return 成功返回 CAMERA_STATUS_SUCCESS(0)。否则返回非0值的错误码, 请参考 CameraStatus.h 中错误码的定义。
203
+/// \~english
204
+/// \brief Pull up drawing Image to specified DC
205
+/// \param [in] Image
206
+/// \param [in] hDC destination DC
207
+/// \param [in] Algorithm scaling algorithm 0:fast but slightly worse quality   1:slower but better quality
208
+/// \param [in] xDst The X coordinate of the upper left corner of the target rectangle
209
+/// \param [in] yDst The Y coordinate of the upper left corner of the target rectangle
210
+/// \param [in] cxDst Width of target rectangle
211
+/// \param [in] cyDst Height of target rectangle
212
+/// \return Returns CAMERA_STATUS_SUCCESS(0) successfully. Otherwise, it returns a non-zero error code. Please refer to the definition of the error code in CameraStatus.h.
213
+MVSDK_API CameraSdkStatus __stdcall CameraImage_DrawToDCFit(
214
+	void* Image,
215
+	HDC hDC,
216
+	int Algorithm,
217
+	int xDst,
218
+	int yDst,
219
+	int cxDst,
220
+	int cyDst
221
+	);
222
+
223
+/// @ingroup MV_IMAGE
224
+/// \~chinese
225
+/// \brief 绘制Image到指定窗口(不缩放)
226
+/// \param [in] Image
227
+/// \param [in] hWnd 目的窗口
228
+/// \param [in] xDst 目标矩形的左上角X坐标
229
+/// \param [in] yDst 目标矩形的左上角Y坐标
230
+/// \param [in] cxDst 目标矩形的宽度
231
+/// \param [in] cyDst 目标矩形的高度
232
+/// \param [in] xSrc 图像矩形的左上角X坐标
233
+/// \param [in] ySrc 图像矩形的左上角Y坐标
234
+/// \return 成功返回 CAMERA_STATUS_SUCCESS(0)。否则返回非0值的错误码, 请参考 CameraStatus.h 中错误码的定义。
235
+/// \~english
236
+/// \brief Draw Image to specified window (without scaling)
237
+/// \param [in] Image
238
+/// \param [in] hWnd destination window
239
+/// \param [in] xDst The X coordinate of the upper left corner of the target rectangle
240
+/// \param [in] yDst The Y coordinate of the upper left corner of the target rectangle
241
+/// \param [in] cxDst Width of target rectangle
242
+/// \param [in] cyDst Height of target rectangle
243
+/// \param [in] xSrc X coordinate of the upper left corner of the image rectangle
244
+/// \param [in] ySrc Y coordinate of the upper left corner of the image rectangle
245
+/// \return Returns CAMERA_STATUS_SUCCESS(0) successfully. Otherwise, it returns a non-zero error code. Please refer to the definition of the error code in CameraStatus.h.
246
+MVSDK_API CameraSdkStatus __stdcall CameraImage_BitBlt(
247
+	void* Image,
248
+	HWND hWnd,
249
+	int xDst,
250
+	int yDst,
251
+	int cxDst,
252
+	int cyDst,
253
+	int xSrc,
254
+	int ySrc
255
+	);
256
+
257
+/// @ingroup MV_IMAGE
258
+/// \~chinese
259
+/// \brief 绘制Image到指定DC(不缩放)
260
+/// \param [in] Image
261
+/// \param [in] hDC 目的DC
262
+/// \param [in] xDst 目标矩形的左上角X坐标
263
+/// \param [in] yDst 目标矩形的左上角Y坐标
264
+/// \param [in] cxDst 目标矩形的宽度
265
+/// \param [in] cyDst 目标矩形的高度
266
+/// \param [in] xSrc 图像矩形的左上角X坐标
267
+/// \param [in] ySrc 图像矩形的左上角Y坐标
268
+/// \return 成功返回 CAMERA_STATUS_SUCCESS(0)。否则返回非0值的错误码, 请参考 CameraStatus.h 中错误码的定义。
269
+/// \~english
270
+/// \brief Draw Image to specified DC (without scaling)
271
+/// \param [in] Image
272
+/// \param [in] hDC destination DC
273
+/// \param [in] xDst The X coordinate of the upper left corner of the target rectangle
274
+/// \param [in] yDst The Y coordinate of the upper left corner of the target rectangle
275
+/// \param [in] cxDst Width of target rectangle
276
+/// \param [in] cyDst Height of target rectangle
277
+/// \param [in] xSrc X coordinate of the upper left corner of the image rectangle
278
+/// \param [in] ySrc Y coordinate of the upper left corner of the image rectangle
279
+/// \return Returns CAMERA_STATUS_SUCCESS(0) successfully. Otherwise, it returns a non-zero error code. Please refer to the definition of the error code in CameraStatus.h.
280
+MVSDK_API CameraSdkStatus __stdcall CameraImage_BitBltToDC(
281
+	void* Image,
282
+	HDC hDC,
283
+	int xDst,
284
+	int yDst,
285
+	int cxDst,
286
+	int cyDst,
287
+	int xSrc,
288
+	int ySrc
289
+	);
290
+
291
+/// @ingroup MV_IMAGE
292
+/// \~chinese
293
+/// \brief 以bmp格式保存Image
294
+/// \param [in] Image
295
+/// \param [in] FileName 文件名
296
+/// \return 成功返回 CAMERA_STATUS_SUCCESS(0)。否则返回非0值的错误码, 请参考 CameraStatus.h 中错误码的定义。
297
+/// \~english
298
+/// \brief Save Image as bmp
299
+/// \param [in] Image
300
+/// \param [in] FileName file name
301
+/// \return Returns CAMERA_STATUS_SUCCESS(0) successfully. Otherwise, it returns a non-zero error code. Please refer to the definition of the error code in CameraStatus.h.
302
+MVSDK_API CameraSdkStatus __stdcall CameraImage_SaveAsBmp(
303
+	void* Image,
304
+	char const* FileName
305
+	);
306
+
307
+/// @ingroup MV_IMAGE
308
+/// \~chinese
309
+/// \brief 以jpg格式保存Image
310
+/// \param [in] Image
311
+/// \param [in] FileName 文件名
312
+/// \param [in] Quality 保存质量(1-100),100为质量最佳但文件也最大
313
+/// \return 成功返回 CAMERA_STATUS_SUCCESS(0)。否则返回非0值的错误码, 请参考 CameraStatus.h 中错误码的定义。
314
+/// \~english
315
+/// \brief Save Image as jpg
316
+/// \param [in] Image
317
+/// \param [in] FileName file name
318
+/// \param [in] Quality save quality (1-100), 100 is the best quality but the file is also the largest
319
+/// \return Returns CAMERA_STATUS_SUCCESS(0) successfully. Otherwise, it returns a non-zero error code. Please refer to the definition of the error code in CameraStatus.h.
320
+MVSDK_API CameraSdkStatus __stdcall CameraImage_SaveAsJpeg(
321
+	void* Image,
322
+	char const* FileName,
323
+	BYTE  Quality
324
+	);
325
+
326
+/// @ingroup MV_IMAGE
327
+/// \~chinese
328
+/// \brief 以png格式保存Image
329
+/// \param [in] Image
330
+/// \param [in] FileName 文件名
331
+/// \return 成功返回 CAMERA_STATUS_SUCCESS(0)。否则返回非0值的错误码, 请参考 CameraStatus.h 中错误码的定义。
332
+/// \~english
333
+/// \brief Save Image as png
334
+/// \param [in] Image
335
+/// \param [in] FileName file name
336
+/// \return Returns CAMERA_STATUS_SUCCESS(0) successfully. Otherwise, it returns a non-zero error code. Please refer to the definition of the error code in CameraStatus.h.
337
+MVSDK_API CameraSdkStatus __stdcall CameraImage_SaveAsPng(
338
+	void* Image,
339
+	char const* FileName
340
+	);
341
+
342
+/// @ingroup MV_IMAGE
343
+/// \~chinese
344
+/// \brief 以raw格式保存Image
345
+/// \param [in] Image
346
+/// \param [in] FileName 文件名
347
+/// \param [in] Format 0: 8Bit Raw     1: 16Bit Raw
348
+/// \return 成功返回 CAMERA_STATUS_SUCCESS(0)。否则返回非0值的错误码, 请参考 CameraStatus.h 中错误码的定义。
349
+/// \~english
350
+/// \brief Save Image as raw
351
+/// \param [in] Image
352
+/// \param [in] FileName file name
353
+/// \param [in] Format 0: 8Bit Raw     1: 16Bit Raw
354
+/// \return Returns CAMERA_STATUS_SUCCESS(0) successfully. Otherwise, it returns a non-zero error code. Please refer to the definition of the error code in CameraStatus.h.
355
+MVSDK_API CameraSdkStatus __stdcall CameraImage_SaveAsRaw(
356
+	void* Image,
357
+	char const* FileName,
358
+	int Format
359
+	);
360
+
361
+/// @ingroup MV_IMAGE
362
+/// \~chinese
363
+/// \brief 从Image创建一个IPicture
364
+/// \param [in] Image
365
+/// \param [out] NewPic 新创建的IPicture
366
+/// \return 成功返回 CAMERA_STATUS_SUCCESS(0)。否则返回非0值的错误码, 请参考 CameraStatus.h 中错误码的定义。
367
+/// \~english
368
+/// \brief Create an IPicture from an Image
369
+/// \param [in] Image
370
+/// \param [out] NewPic Newly created IPicture
371
+/// \return Returns CAMERA_STATUS_SUCCESS(0) successfully. Otherwise, it returns a non-zero error code. Please refer to the definition of the error code in CameraStatus.h.
372
+MVSDK_API CameraSdkStatus __stdcall CameraImage_IPicture(
373
+	void* Image,
374
+	IPicture** NewPic
375
+	);
376
+
377
+
378
+
379
+
380
+#endif // _MV_CAMERA_IMAGE_H_

+ 118 - 0
3rdparty/include22/CameraStatus.h

@@ -0,0 +1,118 @@
1
+#ifndef __CAMERA_STATUS_DEF__
2
+#define __CAMERA_STATUS_DEF__
3
+
4
+/// @ingroup MV_TYPEDEF
5
+/// \~chinese SDK错误码
6
+/// \~english SDK error code
7
+typedef int CameraSdkStatus;
8
+
9
+
10
+/*常用的宏*/
11
+#define SDK_SUCCESS(_FUC_)              (_FUC_ == CAMERA_STATUS_SUCCESS)
12
+
13
+#define SDK_UNSUCCESS(_FUC_)            (_FUC_ != CAMERA_STATUS_SUCCESS)
14
+
15
+#define SDK_UNSUCCESS_RETURN(_FUC_,RET) if((RET = _FUC_) != CAMERA_STATUS_SUCCESS)\
16
+                                        {\
17
+                                            return RET;\
18
+                                        }
19
+
20
+#define SDK_UNSUCCESS_BREAK(_FUC_)      if(_FUC_ != CAMERA_STATUS_SUCCESS)\
21
+                                        {\
22
+                                            break;\
23
+                                        }
24
+
25
+
26
+/// @ingroup MV_MACRO_TYPE 
27
+/// @{
28
+/* 常用错误  */
29
+
30
+#define CAMERA_STATUS_SUCCESS                    0   ///< \~chinese 操作成功 \~english Successful
31
+#define CAMERA_STATUS_FAILED                    -1   ///< \~chinese 操作失败 \~english operation failed
32
+#define CAMERA_STATUS_INTERNAL_ERROR            -2   ///< \~chinese 内部错误 \~english internal error
33
+#define CAMERA_STATUS_UNKNOW                    -3   ///< \~chinese 未知错误 \~english unknown error
34
+#define CAMERA_STATUS_NOT_SUPPORTED             -4   ///< \~chinese 不支持该功能 \~english Does not support this feature
35
+#define CAMERA_STATUS_NOT_INITIALIZED           -5   ///< \~chinese 初始化未完成 \~english Incomplete initialization
36
+#define CAMERA_STATUS_PARAMETER_INVALID         -6   ///< \~chinese 参数无效 \~english Invalid argument
37
+#define CAMERA_STATUS_PARAMETER_OUT_OF_BOUND    -7   ///< \~chinese 参数越界 \~english Out of bounds of parameters
38
+#define CAMERA_STATUS_UNENABLED                 -8   ///< \~chinese 未使能 \~english Not enabled
39
+#define CAMERA_STATUS_USER_CANCEL               -9   ///< \~chinese 用户手动取消了,比如roi面板点击取消,返回 \~english The user manually canceled, such as roi panel click cancel, return
40
+#define CAMERA_STATUS_PATH_NOT_FOUND            -10  ///< \~chinese 注册表中没有找到对应的路径 \~english The corresponding path was not found in the registry
41
+#define CAMERA_STATUS_SIZE_DISMATCH             -11  ///< \~chinese 获得图像数据长度和定义的尺寸不匹配 \~english The length of the obtained image data does not match the defined size
42
+#define CAMERA_STATUS_TIME_OUT                  -12  ///< \~chinese 超时错误 \~english Timeout error
43
+#define CAMERA_STATUS_IO_ERROR                  -13  ///< \~chinese 硬件IO错误 \~english Hardware IO error
44
+#define CAMERA_STATUS_COMM_ERROR                -14  ///< \~chinese 通讯错误 \~english Communication error
45
+#define CAMERA_STATUS_BUS_ERROR                 -15  ///< \~chinese 总线错误 \~english Bus error
46
+#define CAMERA_STATUS_NO_DEVICE_FOUND           -16  ///< \~chinese 没有发现设备 \~english No device found
47
+#define CAMERA_STATUS_NO_LOGIC_DEVICE_FOUND     -17  ///< \~chinese 未找到逻辑设备 \~english Logical device not found
48
+#define CAMERA_STATUS_DEVICE_IS_OPENED          -18  ///< \~chinese 设备已经打开 \~english The device is already open
49
+#define CAMERA_STATUS_DEVICE_IS_CLOSED          -19  ///< \~chinese 设备已经关闭 \~english Device is off
50
+#define CAMERA_STATUS_DEVICE_VEDIO_CLOSED       -20  ///< \~chinese 没有打开设备视频,调用录像相关的函数时,如果相机视频没有打开,则回返回该错误。 \~english Without opening the device video, when the video-related function is called, if the camera video is not open, the error is returned back.
51
+#define CAMERA_STATUS_NO_MEMORY                 -21  ///< \~chinese 没有足够系统内存 \~english Not enough system memory
52
+#define CAMERA_STATUS_FILE_CREATE_FAILED        -22  ///< \~chinese 创建文件失败 \~english Failed to create file
53
+#define CAMERA_STATUS_FILE_INVALID              -23  ///< \~chinese 文件格式无效 \~english Invalid file format
54
+#define CAMERA_STATUS_WRITE_PROTECTED           -24  ///< \~chinese 写保护,不可写 \~english Write protection, not write
55
+#define CAMERA_STATUS_GRAB_FAILED               -25  ///< \~chinese 数据采集失败 \~english Data collection failed
56
+#define CAMERA_STATUS_LOST_DATA                 -26  ///< \~chinese 数据丢失,不完整 \~english Loss of data, incomplete
57
+#define CAMERA_STATUS_EOF_ERROR                 -27  ///< \~chinese 未接收到帧结束符 \~english No frame terminator received
58
+#define CAMERA_STATUS_BUSY                      -28  ///< \~chinese 正忙(上一次操作还在进行中),此次操作不能进行 \~english Busy (last operation is still in progress), this operation cannot be performed
59
+#define CAMERA_STATUS_WAIT                      -29  ///< \~chinese 需要等待(进行操作的条件不成立),可以再次尝试 \~english Need to wait (condition of operation is not established), can try again
60
+#define CAMERA_STATUS_IN_PROCESS                -30  ///< \~chinese 正在进行,已经被操作过 \~english Ongoing, has been operated
61
+#define CAMERA_STATUS_IIC_ERROR                 -31  ///< \~chinese IIC传输错误 \~english IIC transmission error
62
+#define CAMERA_STATUS_SPI_ERROR                 -32  ///< \~chinese SPI传输错误 \~english SPI transmission error
63
+#define CAMERA_STATUS_USB_CONTROL_ERROR         -33  ///< \~chinese USB控制传输错误 \~english USB control transmission error
64
+#define CAMERA_STATUS_USB_BULK_ERROR            -34  ///< \~chinese USB BULK传输错误 \~english USB BULK transmission error
65
+#define CAMERA_STATUS_SOCKET_INIT_ERROR         -35  ///< \~chinese 网络传输套件初始化失败 \~english Network Transport Suite Initialization Failed
66
+#define CAMERA_STATUS_GIGE_FILTER_INIT_ERROR    -36  ///< \~chinese 网络相机内核过滤驱动初始化失败,请检查是否正确安装了驱动,或者重新安装。 \~english The webcam kernel filter driver failed to initialize. Please check if the driver is installed correctly or reinstall it.
67
+#define CAMERA_STATUS_NET_SEND_ERROR            -37  ///< \~chinese 网络数据发送错误 \~english Network data sending error
68
+#define CAMERA_STATUS_DEVICE_LOST               -38  ///< \~chinese 与网络相机失去连接,心跳检测超时 \~english Lost connection with webcam, heartbeat timeout
69
+#define CAMERA_STATUS_DATA_RECV_LESS            -39  ///< \~chinese 接收到的字节数比请求的少  \~english Received fewer bytes than requested
70
+#define CAMERA_STATUS_FUNCTION_LOAD_FAILED      -40  ///< \~chinese 从文件中加载程序失败 \~english Failed to load program from file
71
+#define CAMERA_STATUS_CRITICAL_FILE_LOST        -41  ///< \~chinese 程序运行所必须的文件丢失。 \~english The file necessary to run the program is missing.
72
+#define CAMERA_STATUS_SENSOR_ID_DISMATCH        -42  ///< \~chinese 固件和程序不匹配,原因是下载了错误的固件。 \~english The firmware and program do not match because the wrong firmware was downloaded.
73
+#define CAMERA_STATUS_OUT_OF_RANGE              -43  ///< \~chinese 参数超出有效范围。 \~english The parameter is out of valid range.
74
+#define CAMERA_STATUS_REGISTRY_ERROR            -44  ///< \~chinese 安装程序注册错误。请重新安装程序,或者运行安装目录Setup/Installer.exe \~english Setup registration error. Please reinstall the program, or run the installation directory Setup/Installer.exe
75
+#define CAMERA_STATUS_ACCESS_DENY               -45  ///< \~chinese 禁止访问。指定相机已经被其他程序占用时,再申请访问该相机,会返回该状态。(一个相机不能被多个程序同时访问) \~english No Access. When the specified camera has been occupied by another program, it will return to this state if you request to access the camera. (A camera cannot be accessed simultaneously by multiple programs)
76
+#define CAMERA_STATUS_CAMERA_NEED_RESET         -46  ///< \~chinese 表示相机需要复位后才能正常使用,此时请让相机断电重启,或者重启操作系统后,便可正常使用。 \~english It means that the camera needs to be reset before it can be used normally. At this time, please make the camera power off and restart, or restart the operating system, then it can be used normally.
77
+#define CAMERA_STATUS_ISP_MOUDLE_NOT_INITIALIZED -47 ///< \~chinese ISP模块未初始化 \~english ISP module is not initialized
78
+#define CAMERA_STATUS_ISP_DATA_CRC_ERROR        -48  ///< \~chinese 数据校验错误 \~english Data check error
79
+#define CAMERA_STATUS_MV_TEST_FAILED            -49  ///< \~chinese 数据测试失败 \~english Data test failed
80
+#define CAMERA_STATUS_INTERNAL_ERR1             -50	 ///< \~chinese 内部错误1 \~english Internal error 1
81
+#define CAMERA_STATUS_U3V_NO_CONTROL_EP			-51	 ///< \~chinese U3V控制端点未找到 \~english U3V control endpoint not found
82
+#define CAMERA_STATUS_U3V_CONTROL_ERROR			-52	 ///< \~chinese U3V控制通讯错误 \~english U3V control communication error
83
+#define CAMERA_STATUS_INVALID_FRIENDLY_NAME		-53	 ///< \~chinese 无效的设备名,名字里不能包含以下字符(\/:*?"<>|") \~english Invalid device name, the name cannot contain the following characters (\/:*?"<>|")
84
+#define CAMERA_STATUS_FORMAT_ERROR				-54	 ///< \~chinese 格式错误 \~english Format error
85
+#define CAMERA_STATUS_PCIE_OPEN_ERROR			-55  ///< \~chinese PCIE设备打开失败 \~english PCIE device open failed
86
+#define CAMERA_STATUS_PCIE_COMM_ERROR			-56  ///< \~chinese PCIE设备通讯失败 \~english PCIE device communication failed
87
+#define CAMERA_STATUS_PCIE_DDR_ERROR			-57  ///< \~chinese PCIE DDR错误 \~english PCIE DDR error
88
+
89
+
90
+
91
+//和AIA制定的标准相同
92
+/*#define CAMERA_AIA_SUCCESS                        0x0000 */
93
+#define CAMERA_AIA_PACKET_RESEND                          0x0100 ///< \~chinese 该帧需要重传 \~english The frame needs to be retransmitted
94
+#define CAMERA_AIA_NOT_IMPLEMENTED                        0x8001 ///< \~chinese 设备不支持的命令 \~english Device does not support commands
95
+#define CAMERA_AIA_INVALID_PARAMETER                      0x8002 ///< \~chinese 命令参数非法 \~english Illegal command parameters
96
+#define CAMERA_AIA_INVALID_ADDRESS                        0x8003 ///< \~chinese 不可访问的地址 \~english Inaccessible address
97
+#define CAMERA_AIA_WRITE_PROTECT                          0x8004 ///< \~chinese 访问的对象不可写 \~english The accessed object cannot be written
98
+#define CAMERA_AIA_BAD_ALIGNMENT                          0x8005 ///< \~chinese 访问的地址没有按照要求对齐 \~english Visited address is not aligned as required
99
+#define CAMERA_AIA_ACCESS_DENIED                          0x8006 ///< \~chinese 没有访问权限 \~english No access
100
+#define CAMERA_AIA_BUSY                                   0x8007 ///< \~chinese 命令正在处理中 \~english Command is processing
101
+#define CAMERA_AIA_DEPRECATED                             0x8008 ///< \~chinese 0x8008-0x0800B  0x800F  该指令已经废弃 \~english 0x8008-0x0800B 0x800F This instruction has been deprecated
102
+#define CAMERA_AIA_PACKET_UNAVAILABLE                     0x800C ///< \~chinese 包无效 \~english Invalid package
103
+#define CAMERA_AIA_DATA_OVERRUN                           0x800D ///< \~chinese 数据溢出,通常是收到的数据比需要的多 \~english Data overflow, usually more data than needed
104
+#define CAMERA_AIA_INVALID_HEADER                         0x800E ///< \~chinese 数据包头部中某些区域与协议不匹配 \~english Some areas in the packet header do not match the protocol
105
+#define CAMERA_AIA_PACKET_NOT_YET_AVAILABLE               0x8010 ///< \~chinese 图像分包数据还未准备好,多用于触发模式,应用程序访问超时 \~english Image packet data is not ready yet. It is mostly used in trigger mode. Application access timeout
106
+#define CAMERA_AIA_PACKET_AND_PREV_REMOVED_FROM_MEMORY    0x8011 ///< \~chinese 需要访问的分包已经不存在。多用于重传时数据已经不在缓冲区中 \~english Subcontracts that require access no longer exist. Mostly used for data retransmission is not in the buffer
107
+#define CAMERA_AIA_PACKET_REMOVED_FROM_MEMORY             0x8012 ///< \~chinese CAMERA_AIA_PACKET_AND_PREV_REMOVED_FROM_MEMORY \~english CAMERA_AIA_PACKET_AND_PREV_REMOVED_FROM_MEMORY
108
+#define CAMERA_AIA_NO_REF_TIME                            0x0813 ///< \~chinese 没有参考时钟源。多用于时间同步的命令执行时 \~english There is no reference clock source. When used for time synchronization commands
109
+#define CAMERA_AIA_PACKET_TEMPORARILY_UNAVAILABLE         0x0814 ///< \~chinese 由于信道带宽问题,当前分包暂时不可用,需稍后进行访问 \~english Due to channel bandwidth issues, the current subcontracting is temporarily unavailable and needs to be accessed later
110
+#define CAMERA_AIA_OVERFLOW                               0x0815 ///< \~chinese 设备端数据溢出,通常是队列已满 \~english Data overflow on the device, usually the queue is full
111
+#define CAMERA_AIA_ACTION_LATE                            0x0816 ///< \~chinese 命令执行已经超过有效的指定时间 \~english Command execution has exceeded valid specified time
112
+#define CAMERA_AIA_ERROR                                  0x8FFF ///< \~chinese 错误 \~english error
113
+
114
+/// @} end of MV_MACRO_TYPE
115
+
116
+                                        
117
+
118
+#endif

+ 50 - 0
3rdparty/include22/SenseCameraDll/defs.h

@@ -0,0 +1,50 @@
1
+#pragma once
2
+#include <stdio.h>
3
+#ifdef _WIN32
4
+#define filename(x) strrchr(x,'\\')?strrchr(x,'\\')+1:x
5
+#else
6
+#if __GNUC__ >= 4
7
+#define filename(x) strrchr(x,'/')?strrchr(x,'/')+1:x
8
+#endif
9
+#endif
10
+
11
+
12
+
13
+#define CREATE_LOG_HEAD \
14
+char acLogStr[1024*4] = {0};\
15
+int  iHeadLength = sprintf_s(acLogStr, 1024*4, "[%s:%d] %s:   ", filename(__FILE__), __LINE__, __FUNCTION__);\
16
+
17
+#define  LOG_TRACE(...) \
18
+{\
19
+    CREATE_LOG_HEAD\
20
+    snprintf(acLogStr+iHeadLength, sizeof(acLogStr)-iHeadLength, __VA_ARGS__);\
21
+    printf("[TRACE] %s", acLogStr);\
22
+}
23
+
24
+#define  LOG_DEBUG(...) \
25
+{\
26
+    CREATE_LOG_HEAD\
27
+    sprintf_s(acLogStr+iHeadLength, sizeof(acLogStr)-iHeadLength, __VA_ARGS__);\
28
+    printf("[DEBUG] %s", acLogStr);\
29
+}
30
+
31
+#define  LOG_INFO(...) \
32
+{\
33
+    CREATE_LOG_HEAD\
34
+    snprintf(acLogStr+iHeadLength, sizeof(acLogStr)-iHeadLength, __VA_ARGS__);\
35
+    printf("[INFO] %s", acLogStr);\
36
+}
37
+
38
+#define  LOG_WARN(...) \
39
+{\
40
+    CREATE_LOG_HEAD\
41
+    snprintf(acLogStr+iHeadLength, sizeof(acLogStr)-iHeadLength, __VA_ARGS__);\
42
+    printf("[WARN] %s", acLogStr);\
43
+}
44
+
45
+#define  LOG_ERROR(...) \
46
+{\
47
+    CREATE_LOG_HEAD\
48
+    snprintf(acLogStr+iHeadLength, sizeof(acLogStr)-iHeadLength, __VA_ARGS__);\
49
+    printf("[ERROR] %s", acLogStr);\
50
+}

+ 146 - 0
3rdparty/include22/SenseCameraDll/mv_camera.h

@@ -0,0 +1,146 @@
1
+/************************************************************************/
2
+/* 以C++接口为基础,对常用函数进行二次封装,方便用户使用                */
3
+/************************************************************************/
4
+
5
+#ifndef _MV_CAMERA_H_
6
+#define _MV_CAMERA_H_
7
+
8
+#include "MvCameraControl.h"
9
+#include <string.h>
10
+
11
+#ifndef MV_NULL
12
+#define MV_NULL    0
13
+#endif
14
+
15
+class CMvCamera
16
+{
17
+public:
18
+    CMvCamera();
19
+    ~CMvCamera();
20
+
21
+    // ch:获取SDK版本号 | en:Get SDK Version
22
+    static int GetSDKVersion();
23
+
24
+    // ch:枚举设备 | en:Enumerate Device
25
+    static int EnumDevices(unsigned int nTLayerType, MV_CC_DEVICE_INFO_LIST* pstDevList);
26
+
27
+    // ch:判断设备是否可达 | en:Is the device accessible
28
+    static bool IsDeviceAccessible(MV_CC_DEVICE_INFO* pstDevInfo, unsigned int nAccessMode);
29
+
30
+    // ch:打开设备 | en:Open Device
31
+    int Open(MV_CC_DEVICE_INFO* pstDeviceInfo);
32
+
33
+    // ch:关闭设备 | en:Close Device
34
+    int Close();
35
+
36
+    // ch:判断相机是否处于连接状态 | en:Is The Device Connected
37
+    bool IsDeviceConnected();
38
+
39
+    // ch:注册图像数据回调 | en:Register Image Data CallBack
40
+    int RegisterImageCallBack(void(__stdcall* cbOutput)(unsigned char * pData, MV_FRAME_OUT_INFO_EX* pFrameInfo, void* pUser), void* pUser);
41
+
42
+    // ch:开启抓图 | en:Start Grabbing
43
+    int StartGrabbing();
44
+
45
+    // ch:停止抓图 | en:Stop Grabbing
46
+    int StopGrabbing();
47
+
48
+    // ch:主动获取一帧图像数据 | en:Get one frame initiatively
49
+    int GetImageBuffer(MV_FRAME_OUT* pFrame, int nMsec);
50
+
51
+    // ch:释放图像缓存 | en:Free image buffer
52
+    int FreeImageBuffer(MV_FRAME_OUT* pFrame);
53
+
54
+    // ch:显示一帧图像 | en:Display one frame image
55
+    int DisplayOneFrame(MV_DISPLAY_FRAME_INFO* pDisplayInfo);
56
+
57
+    // ch:设置SDK内部图像缓存节点个数 | en:Set the number of the internal image cache nodes in SDK
58
+    int SetImageNodeNum(unsigned int nNum);
59
+
60
+    // ch:获取设备信息 | en:Get device information
61
+    int GetDeviceInfo(MV_CC_DEVICE_INFO* pstDevInfo);
62
+
63
+    // ch:获取GEV相机的统计信息 | en:Get detect info of GEV camera
64
+    int GetGevAllMatchInfo(MV_MATCH_INFO_NET_DETECT* pMatchInfoNetDetect);
65
+
66
+    // ch:获取U3V相机的统计信息 | en:Get detect info of U3V camera
67
+    int GetU3VAllMatchInfo(MV_MATCH_INFO_USB_DETECT* pMatchInfoUSBDetect);
68
+
69
+#pragma region 一些详细控制参数设置
70
+
71
+
72
+#pragma endregion
73
+
74
+
75
+    // ch:获取和设置Int型参数,如 Width和Height,详细内容参考SDK安装目录下的 MvCameraNode.xlsx 文件
76
+    // en:Get Int type parameters, such as Width and Height, for details please refer to MvCameraNode.xlsx file under SDK installation directory
77
+    int GetIntValue(IN const char* strKey, OUT MVCC_INTVALUE_EX *pIntValue);
78
+    int SetIntValue(IN const char* strKey, IN int64_t nValue);
79
+
80
+    // ch:获取和设置Enum型参数,如 PixelFormat,详细内容参考SDK安装目录下的 MvCameraNode.xlsx 文件
81
+    // en:Get Enum type parameters, such as PixelFormat, for details please refer to MvCameraNode.xlsx file under SDK installation directory
82
+    int GetEnumValue(IN const char* strKey, OUT MVCC_ENUMVALUE *pEnumValue);
83
+    int SetEnumValue(IN const char* strKey, IN unsigned int nValue);
84
+    int SetEnumValueByString(IN const char* strKey, IN const char* sValue);
85
+
86
+    // ch:获取和设置Float型参数,如 ExposureTime和Gain,详细内容参考SDK安装目录下的 MvCameraNode.xlsx 文件
87
+    // en:Get Float type parameters, such as ExposureTime and Gain, for details please refer to MvCameraNode.xlsx file under SDK installation directory
88
+    int GetFloatValue(IN const char* strKey, OUT MVCC_FLOATVALUE *pFloatValue);
89
+    int SetFloatValue(IN const char* strKey, IN float fValue);
90
+
91
+    // ch:获取和设置Bool型参数,如 ReverseX,详细内容参考SDK安装目录下的 MvCameraNode.xlsx 文件
92
+    // en:Get Bool type parameters, such as ReverseX, for details please refer to MvCameraNode.xlsx file under SDK installation directory
93
+    int GetBoolValue(IN const char* strKey, OUT bool *pbValue);
94
+    int SetBoolValue(IN const char* strKey, IN bool bValue);
95
+
96
+    // ch:获取和设置String型参数,如 DeviceUserID,详细内容参考SDK安装目录下的 MvCameraNode.xlsx 文件UserSetSave
97
+    // en:Get String type parameters, such as DeviceUserID, for details please refer to MvCameraNode.xlsx file under SDK installation directory
98
+    int GetStringValue(IN const char* strKey, MVCC_STRINGVALUE *pStringValue);
99
+    int SetStringValue(IN const char* strKey, IN const char * strValue);
100
+
101
+    // ch:执行一次Command型命令,如 UserSetSave,详细内容参考SDK安装目录下的 MvCameraNode.xlsx 文件
102
+    // en:Execute Command once, such as UserSetSave, for details please refer to MvCameraNode.xlsx file under SDK installation directory
103
+    int CommandExecute(IN const char* strKey);
104
+
105
+    // ch:探测网络最佳包大小(只对GigE相机有效) | en:Detection network optimal package size(It only works for the GigE camera)
106
+    int GetOptimalPacketSize(unsigned int* pOptimalPacketSize);
107
+
108
+    // ch:注册消息异常回调 | en:Register Message Exception CallBack
109
+    int RegisterExceptionCallBack(void(__stdcall* cbException)(unsigned int nMsgType, void* pUser), void* pUser);
110
+
111
+    // ch:注册单个事件回调 | en:Register Event CallBack
112
+    int RegisterEventCallBack(const char* pEventName, void(__stdcall* cbEvent)(MV_EVENT_OUT_INFO * pEventInfo, void* pUser), void* pUser);
113
+
114
+    // ch:强制IP | en:Force IP
115
+    int ForceIp(unsigned int nIP, unsigned int nSubNetMask, unsigned int nDefaultGateWay);
116
+
117
+    // ch:配置IP方式 | en:IP configuration method
118
+    int SetIpConfig(unsigned int nType);
119
+
120
+    // ch:设置网络传输模式 | en:Set Net Transfer Mode
121
+    int SetNetTransMode(unsigned int nType);
122
+
123
+    // ch:像素格式转换 | en:Pixel format conversion
124
+    int ConvertPixelType(MV_CC_PIXEL_CONVERT_PARAM* pstCvtParam);
125
+
126
+    // ch:保存图片 | en:save image
127
+    int SaveImage(MV_SAVE_IMAGE_PARAM_EX* pstParam);
128
+    int SaveImageToFile(MV_SAVE_IMG_TO_FILE_PARAM* pstSaveFileParam);
129
+
130
+private:
131
+
132
+    void*               m_hDevHandle;
133
+	MV_CC_DEVICE_INFO	m_stDeviceInfo;
134
+
135
+};
136
+
137
+#endif//_MV_CAMERA_H_
138
+
139
+
140
+////	//设置Enum型参数-相机图像格式
141
+//	//注意点1:相机图像格式设置时,只有在MV_CC_Startgrab接口调用前才能设置,取流过程中,不能修改图像格式
142
+//nRet = MV_CC_SetEnumValue(handle, "PixelFormat", PixelType_Gvsp_Mono12);
143
+//if (MV_OK != nRet)
144
+//{
145
+//    printf("error: Set PixelFormat fail [%x]\n", nRet);
146
+//}

+ 1 - 0
3rdparty/include22/SenseCameraDll/mv_camera_imp.h.h

@@ -0,0 +1 @@
1
+#pragma once

+ 0 - 0
3rdparty/include22/SenseCameraDll/sense_camera_adapter.cpp


+ 95 - 0
3rdparty/include22/SenseCameraDll/sense_camera_adapter.h

@@ -0,0 +1,95 @@
1
+#pragma once
2
+#include "sense_camera_global.h"
3
+#include <stdint.h>
4
+#include  <string>
5
+#include <vector>
6
+
7
+#ifdef USE_OPENCV
8
+#include "opencv2/opencv.hpp"
9
+#endif // USE_OPENCV
10
+
11
+#ifdef USE_HALCON
12
+#include <HalconCpp.h>
13
+#endif // USE_HALCON
14
+
15
+namespace cv
16
+{
17
+    class Mat;
18
+}
19
+namespace HalconCpp
20
+{
21
+    class HObject;
22
+}
23
+
24
+
25
+class SENSE_EXPORT CameraAdapter
26
+{
27
+public:
28
+
29
+    enum class E_TRIGGER_MODE
30
+    {
31
+        TRIGGER_MODE_ON = 0,
32
+        TRIGGER_MODE_OFF,
33
+    };
34
+    enum class E_TRIGGER_SOURCE
35
+    {
36
+        TRIGGER_SOURCE_SOFT = 0,
37
+        TRIGGER_SOURCE_LINE0,
38
+        TRIGGER_SOURCE_LINE2,
39
+        TRIGGER_SOURCE_LINE3,
40
+    };
41
+    virtual int64_t openCamera(const char* camSN) = 0;
42
+    virtual int64_t setInitParameters() = 0;
43
+#ifdef USE_OPENCV
44
+    virtual int64_t getOneImage(cv::Mat& img) = 0;
45
+    virtual int64_t takeSingleImage(cv::Mat& img) = 0;//软触发并取一次图
46
+#endif
47
+#ifdef USE_HALCON
48
+    virtual int64_t getOneImage(HalconCpp::HObject& img) = 0;
49
+    virtual int64_t takeSingleImage(HalconCpp::HObject& img) = 0;//软触发并取一次图
50
+#endif // USE_HALCON
51
+
52
+    virtual int64_t closeCamera() = 0 ;
53
+    virtual int64_t reConnectCamera() = 0;
54
+    virtual void    clearCameraBuf() = 0;
55
+    virtual int64_t startGrabbing() = 0;
56
+    virtual int64_t stopGrabbing() = 0;
57
+    virtual int64_t softTriggerOnce() = 0;//软触发一次
58
+    virtual double  getExposureTime() = 0; ////获取设备当前曝光时间
59
+    virtual void    setTriggerMode(E_TRIGGER_MODE mode) = 0; //设置设备曝光时间
60
+    virtual void    setTriggerSource(E_TRIGGER_SOURCE source) = 0; //设置触发源
61
+    enum 
62
+    {
63
+        IMAGESIZE_DEFAULT_WIDTH = 2590,
64
+        IMAGESIZE_DEFAULT_HEIGHT = 1944,
65
+    };
66
+    enum {
67
+        SUCCESS = 0,
68
+        ACTION_FAILED_UNDO = -100001,
69
+        GAMERA_UNKOWN_CONTROLLER = -98000,
70
+        GAMERA_FAILED_NODEVICE,
71
+        GAMERA_FAILED_ALLOCATE,
72
+        GAMERA_FAILED_OVERCONNECT,
73
+        GAMERA_FAILED_TOCONNECT,
74
+        GAMERA_FAILED_UNCONNECTED,
75
+        GAMERA_FAILED_SETEXPOSURE,
76
+        GAMERA_FAILED_INACTION,
77
+        GAMERA_FAILED_TIMEOUTEXEC,
78
+        GAMERA_FAILED_NOIMAGEACC,
79
+        GAMERA_FAILED_IMAGEBUFLEN,
80
+        GAMERA_FAILED_STDEXCEPTION,
81
+        GAMERA_FAILED_UNKNOWNEXCEPTION,
82
+        GAMERA_FAILED_GETIMAGE,
83
+        ERROR_UNDEFINE
84
+    };
85
+
86
+};
87
+
88
+
89
+
90
+
91
+
92
+
93
+
94
+
95
+

+ 7 - 0
3rdparty/include22/SenseCameraDll/sense_camera_global.h

@@ -0,0 +1,7 @@
1
+#pragma once
2
+
3
+#if defined(SENSECAMERAX64_EXPORTS)
4
+#define SENSE_EXPORT __declspec(dllexport)
5
+#else
6
+#define SENSE_EXPORT __declspec(dllimport)
7
+#endif

+ 57 - 0
3rdparty/include22/SenseCameraDll/sense_ctrl_frame_grabber.h

@@ -0,0 +1,57 @@
1
+#pragma once
2
+#include "sense_camera_global.h"
3
+#include "sense_camera_adapter.h"
4
+#include <memory>
5
+
6
+
7
+class SENSE_EXPORT CtrlFrameGrabber
8
+{
9
+
10
+public:
11
+    enum E_CameraType
12
+    {
13
+        TYPE_HK = 0,
14
+        TYPE_DAHENG = 1,
15
+        TYPE_BASLER,
16
+        TYPE_SIMULATE
17
+    };
18
+    enum 
19
+    {
20
+        CAM_MAXNUM = 9,
21
+    };
22
+    //单例函数指针获取
23
+    static CtrlFrameGrabber* getInstance();
24
+    static void releaseInstance();
25
+    static long enumDevicesSN(std::vector<std::string>& vecCamSn, CtrlFrameGrabber::E_CameraType type);
26
+    long connectCam(long index, std::string& sn, long type);
27
+    long reConnectCam(long index);
28
+    long disconnectCam(long index);
29
+    long disconnectALL();
30
+    long getType(long index);
31
+#ifdef USE_OPENCV
32
+    long getOneImage(long index, cv::Mat& img);
33
+    long takeSingleImage(long index, cv::Mat& img);
34
+#endif
35
+#ifdef USE_HALCON
36
+    long getOneImage(long index, HalconCpp::HObject& img);
37
+    long takeSingleImage(long index, HalconCpp::HObject& img);//软触发并取一次图
38
+#endif // USE_HALCON
39
+
40
+
41
+
42
+    void clearCameraBuf(long index);
43
+    long startGrabbing(long index);
44
+    long stopGrabbing(long index);
45
+    long softTriggerOnce(long index);
46
+    void setTriggerMode(long index,CameraAdapter::E_TRIGGER_MODE mode); //设置设备曝光时间
47
+    void setTriggerSource(long index, CameraAdapter::E_TRIGGER_SOURCE source);
48
+private:
49
+    explicit CtrlFrameGrabber();
50
+    ~CtrlFrameGrabber();
51
+private:
52
+    static CtrlFrameGrabber*    m_handle;
53
+    CameraAdapter*              m_pCamAr[CtrlFrameGrabber::CAM_MAXNUM];//ProSYS::CAM_MAXNUM
54
+    long                        m_pTypeAr[CtrlFrameGrabber::CAM_MAXNUM];//ProSYS::CAM_MAXNUM
55
+
56
+
57
+};

+ 50 - 0
3rdparty/include22/SenseCameraDll/sense_gx_camera_imp.h

@@ -0,0 +1,50 @@
1
+#pragma once
2
+#include "sense_camera_adapter.h"
3
+#include "GalaxyIncludes.h"
4
+#include <atomic>
5
+//大恒相机
6
+
7
+class CameraDahengImp : public CameraAdapter
8
+{
9
+public:
10
+	CameraDahengImp();
11
+	~CameraDahengImp();
12
+	int64_t enumDevicesSN(std::vector<std::string>& sn);
13
+	virtual int64_t setInitParameters();
14
+	virtual int64_t openCamera(const char* strDeviceSN);
15
+
16
+#ifdef USE_OPENCV
17
+	virtual int64_t getOneImage(cv::Mat& img);
18
+	virtual int64_t takeSingleImage(cv::Mat& img);
19
+#endif // USE_OPENCV
20
+
21
+#ifdef USE_HALCON
22
+	virtual int64_t getOneImage(HalconCpp::HObject& img);
23
+	virtual int64_t takeSingleImage(HalconCpp::HObject& img);//软触发并取一次图
24
+#endif // USE_HALCON
25
+
26
+
27
+	virtual int64_t softTriggerOnce();	//软触发一次
28
+	virtual int64_t closeCamera();
29
+	virtual int64_t reConnectCamera();
30
+	virtual void	clearCameraBuf();
31
+	virtual int64_t startGrabbing();
32
+	virtual int64_t stopGrabbing();
33
+	virtual double	getExposureTime();
34
+	virtual void	setTriggerMode(E_TRIGGER_MODE mode);
35
+	virtual void	setTriggerSource(E_TRIGGER_SOURCE source);
36
+private:
37
+	std::atomic_bool			bIsStreamOpen= false;			///< 设备流是否已打开标识
38
+	std::atomic_bool			bIsDeviceOpen = false;          ///< 设备是否已打开标识
39
+	std::atomic_bool			m_bIsColor = false;				///< 是否支持彩色
40
+	std::atomic_bool            m_bStartGrabbing = false;       ///< 设备采集标识
41
+	CImageDataPointer           m_objImageDataPtr;              ///< GetImage获取的图像
42
+	CGXDevicePointer            m_objDevicePtr;                 ///< 设备句柄
43
+	CGXStreamPointer            m_objStreamPtr;                 ///< 设备流对象
44
+	CGXFeatureControlPointer    m_objFeatureControlPtr;         ///< 属性控制器
45
+	CGXFeatureControlPointer    m_objStreamFeatureControlPtr;   ///< 流层控制器对象
46
+	GX_VALID_BIT_LIST			_getBestValudBit(GX_PIXEL_FORMAT_ENTRY emPixelFormatEntry);
47
+	void						_isSupportColor();
48
+	///判断PixelFormat是否为8位
49
+	bool						_isPixelFormat8(GX_PIXEL_FORMAT_ENTRY emPixelFormatEntry);
50
+};

+ 43 - 0
3rdparty/include22/SenseCameraDll/sense_mvs_camera_imp.h

@@ -0,0 +1,43 @@
1
+#pragma once
2
+#include "sense_camera_adapter.h"
3
+#include "mv_camera.h"
4
+#include <atomic>
5
+//大恒相机
6
+
7
+class CameraHaiKangImp : public CameraAdapter
8
+{
9
+public:
10
+	CameraHaiKangImp();
11
+	~CameraHaiKangImp();
12
+	int64_t			enumDevicesSN(std::vector<std::string>& sn);
13
+	virtual int64_t setInitParameters();
14
+	virtual int64_t openCamera(const char* strDeviceSN);
15
+#ifdef USE_OPENCV
16
+	virtual int64_t getOneImage(cv::Mat& img);
17
+	virtual int64_t takeSingleImage(cv::Mat& img);
18
+#endif // USE_OPENCV
19
+
20
+#ifdef USE_HALCON
21
+	virtual int64_t getOneImage(HalconCpp::HObject& img);
22
+	virtual int64_t takeSingleImage(HalconCpp::HObject& img);//软触发并取一次图
23
+#endif // USE_HALCON
24
+
25
+
26
+
27
+	virtual int64_t softTriggerOnce();	//软触发一次
28
+	virtual int64_t closeCamera();
29
+	virtual int64_t reConnectCamera();
30
+	virtual void	clearCameraBuf();
31
+	virtual int64_t startGrabbing();
32
+	virtual int64_t stopGrabbing();
33
+	virtual void	setTriggerMode(E_TRIGGER_MODE mode);
34
+	virtual void	setTriggerSource(E_TRIGGER_SOURCE source);
35
+	virtual double  getExposureTime();
36
+private:
37
+	std::atomic_bool			bIsDeviceOpen = false;          ///< 设备是否已打开标识
38
+	std::atomic_bool			m_bIsColor = false;				///< 是否支持彩色
39
+	std::atomic_bool            m_bStartGrabbing = false;       ///< 设备采集标识
40
+	std::string                 m_mSNstr = "";					///< 相机SN
41
+	CMvCamera					m_pcMyCamera;					// ch:CMyCamera封装了常用接口 | en:CMyCamera packed commonly used interface
42
+	
43
+};

+ 59 - 0
3rdparty/include22/SenseCameraDll/sense_simulate_camera_imp.h

@@ -0,0 +1,59 @@
1
+#pragma once
2
+#include "sense_camera_adapter.h"
3
+
4
+class CameraSimulateImp : public CameraAdapter
5
+{
6
+public:
7
+    explicit CameraSimulateImp();
8
+    ~CameraSimulateImp();
9
+
10
+    virtual int64_t openCamera();
11
+
12
+    virtual int64_t openCamera(const char* camSN);
13
+
14
+    virtual int64_t closeCamera();
15
+
16
+    virtual int64_t setInitParameters();
17
+
18
+    virtual std::string   getCameraSN();
19
+
20
+    virtual int64_t getCameraImageSize();
21
+
22
+    virtual int64_t getCameraImageWidth();
23
+
24
+    virtual int64_t getCameraImageHeigth();
25
+
26
+    virtual int64_t setExposureTime(int64_t tvalue);
27
+
28
+    virtual double  getExposureTime();
29
+
30
+    virtual int64_t shotOneFrame();
31
+
32
+#ifdef USE_OPENCV
33
+    virtual int64_t getOneImage(cv::Mat& img);
34
+    virtual int64_t takeSingleImage(cv::Mat& img);
35
+#endif // USE_OPENCV
36
+
37
+#ifdef USE_HALCON
38
+    virtual int64_t getOneImage(HalconCpp::HObject& img);
39
+    virtual int64_t takeSingleImage(HalconCpp::HObject& img);//Èí´¥·¢²¢È¡Ò»´Îͼ
40
+#endif // USE_HALCON
41
+
42
+    virtual int64_t setRetryTimes(uint32_t tvalue);
43
+    virtual int64_t doshotOneExec();
44
+	virtual int64_t reConnectCamera();
45
+    virtual int64_t waitshotOneDone();
46
+    virtual int64_t startGrabbing();
47
+    virtual int64_t stopGrabbing();
48
+    virtual int64_t softTriggerOnce();
49
+    virtual int64_t getImageOneFrame(unsigned char* pbuf, int64_t buflen, int64_t& iwidth, int64_t& iheight, int64_t& isizebytes,int32_t queuebuf = 1);
50
+    virtual void  setTriggerMode(E_TRIGGER_MODE mode);
51
+    virtual void  setTriggerSource(E_TRIGGER_SOURCE source);
52
+	virtual void  clearCameraBuf();
53
+private:
54
+    std::string                 _mCamSN;
55
+    uint32_t                    _mMaxRetry;
56
+    int64_t                     _mExpTime;
57
+
58
+};
59
+

+ 365 - 0
3rdparty/include22/halcon/HBase.h

@@ -0,0 +1,365 @@
1
+/*****************************************************************************
2
+ * HBase.h
3
+ *****************************************************************************
4
+ *
5
+ * Project:     HALCON/libhalcon
6
+ * Description: Basic definitions for HALCON, HALCON/C, HALCON/C++
7
+ *              and other language interfaces
8
+ *
9
+ * (c) 1996-2020 by MVTec Software GmbH
10
+ *                  www.mvtec.com
11
+ *
12
+ *****************************************************************************/
13
+
14
+#ifndef HBASE_H
15
+#define HBASE_H
16
+
17
+#include <stdlib.h> /* NULL */
18
+#include "HIntDef.h"
19
+
20
+typedef   void*   VOIDP;
21
+
22
+/*****************************************************************************/
23
+/* Parameter passing (Control parameters)                                    */
24
+/*****************************************************************************/
25
+#define UNDEF_PAR        0       /* Parameter type: no defined type          */
26
+#define LONG_PAR         1       /* Parameter type: long                     */
27
+#define FLOAT_PAR        2       /* Parameter type: float                    */
28
+#define STRING_PAR       4       /* Parameter type: string                   */
29
+#define HANDLE_PAR       16      /* Parameter type: handle (arbitrary data)  */
30
+#define INT_PAR          LONG_PAR    /* Parameter type: int                  */
31
+#define DOUBLE_PAR       FLOAT_PAR   /* Parameter type: double               */
32
+#define MIXED_PAR        8           /* Parameter type: Hcpar                */
33
+#define MAX_TUPLE_TYPE   HANDLE_PAR  /* maximum type number                  */
34
+/* Possible parameter types for a single element: */
35
+#define ANY_ELEM         (LONG_PAR|FLOAT_PAR|STRING_PAR|HANDLE_PAR)
36
+/* Possible parameter types for a tuple: */
37
+#define ANY_TUPLE        (ANY_ELEM|MIXED_PAR)
38
+/*                       32          reserved */
39
+#define POINTER_PAR      64        /* Parameter type: pointer to any type    */
40
+#define TUPLE_PAR        128       /* Parameter type: pointer to tuple       */
41
+#define MAX_PAR          HANDLE_PAR
42
+
43
+
44
+/*****************************************************************************/
45
+/* Constants and basic types                                                 */
46
+/*****************************************************************************/
47
+#define MAX_TUPLE_LENGTH 1000000   /* max. length of a tuple                 */
48
+#define MAX_STRING       1024      /* max. length of a string                */
49
+
50
+typedef UINT4            Herror;   /* Type function values (error messages)  */
51
+
52
+typedef  long *Hkey;               /* primary key in DB (for iconic objects) */
53
+#define  UNDEF_KEY   (Hkey)(0)     /* Undefined iconic object                */
54
+
55
+
56
+/*****************************************************************************/
57
+/* Structures for passing parameters between language interface and core     */
58
+/*****************************************************************************/
59
+#ifndef HC_NO_STRUCT_MEMBER_ALIGNMENT
60
+/* sets the struct member alignment to avoid problems if
61
+ * the settings of the user differ to those of the HALCON
62
+ * version. (8 is the default alignment, generally) */
63
+# pragma pack(push,8)
64
+#endif
65
+
66
+
67
+/*****************************************************************************/
68
+/* HALCON procedure (operator) handle                                        */
69
+/*****************************************************************************/
70
+/* This data structure contains all informations about an instance of an     */
71
+/* HALCON operator or an HALCON thread derived from an HALCON operator       */
72
+/* instance. The contained information describes the processing context of   */
73
+/* HALCON operators (e.g. parameter values, debugging information, etc.).    */
74
+/*****************************************************************************/
75
+typedef void *Hproc_handle;
76
+
77
+
78
+/*****************************************************************************/
79
+/* Structures, Functions and Defines for Handles                             */
80
+/*****************************************************************************/
81
+
82
+struct HStreamBufferT;
83
+struct HhandleListT;
84
+
85
+/****************************************************************************/
86
+/** HSignalTypeEnum: List of signals that can be sent to handles
87
+ ****************************************************************************
88
+ * This enum defines a set of signals that can be sent to the
89
+ * signalling callback of handles.  Note that the callback functions must
90
+ * ignore any signal that they do not understand.
91
+ ****************************************************************************/
92
+typedef enum {
93
+  eSignalNone = 0,   /**< No signal */
94
+  eSignalStartAbort, /**< Initiate abort: stop running, abort mutexes etc. */
95
+  eSignalAbort,      /**< Finalize abort, wait for resources to finish */
96
+  eSignalRestore,    /**< After abortion is complete, restore mutexes etc. */
97
+} HSignalTypeEnum;
98
+
99
+typedef Herror (*HHandleSerializeFunc)(Hproc_handle, struct HStreamBufferT *,
100
+                                       void *);
101
+typedef Herror (*HHandleDeserializeFunc)(Hproc_handle, struct HStreamBufferT *,
102
+                                         void **);
103
+typedef Herror (*HHandleDestructorFunc)(Hproc_handle, void *);
104
+typedef Herror (*HHandleSignalFunc)(HSignalTypeEnum signal, void *);
105
+
106
+/****************************************************************************/
107
+/** HHandleInfo holds handle type information.
108
+ ****************************************************************************
109
+ * This structure exists once per handle type (usually per sem_type).
110
+ * It contains basic, static, constant information about that type.
111
+ * Most notably, it contains pointers to the functions that operate on the
112
+ * handles (clear, serialize, deserialize and signal).
113
+ *
114
+ * Handles (instances) of types where the cb_signal callback is not NULL are
115
+ * stored in a list that allows calling the signal callback for each of them.
116
+ *
117
+ * All serialized items must have a unique header, usually a string, that
118
+ * identifies them. 'header' contains a pointer to that header, allowing
119
+ * other functions to identify a serialized item based on its header.
120
+ * If no (de)serialization function is set, header must be NULL.
121
+ *
122
+ * \ingroup data_structures_handles
123
+ ****************************************************************************/
124
+typedef struct H_HANDLE_TYPE {
125
+  INT4_8                 type_id;        /**< Type ID */
126
+  const char *           sem_type;       /**< sem_type of the handle */
127
+  HHandleSerializeFunc   cb_serialize;   /**< Serialize this handle type */
128
+  HHandleDeserializeFunc cb_deserialize; /**< Deserialize this handle type */
129
+  const char *           header;         /**< Serialization header */
130
+  HHandleDestructorFunc  cb_clear;       /**< Clear this handle type */
131
+  HHandleSignalFunc      cb_signal;      /**< Signal (for semaphores etc.) */
132
+  struct HhandleListT *  list;           /**< List of handles, or NULL */
133
+} HHandleInfo;
134
+
135
+
136
+/****************************************************************************/
137
+/** HANDLE_INFO_INITIALIZER: Convenience macro for initializing HHandleInfo
138
+ ****************************************************************************/
139
+#  define HANDLE_INFO_INITIALIZER(TYPE_ID, SEM_TYPE, FUN_SERIALIZE,           \
140
+                                  FUN_DESERIALIZE, HEADER_STRING, FUN_CLEAR,  \
141
+                                  FUN_SIGNAL, LIST)                           \
142
+    {                                                                         \
143
+      (INT4_8)(TYPE_ID), (SEM_TYPE), (HHandleSerializeFunc)(FUN_SERIALIZE),   \
144
+          (HHandleDeserializeFunc)(FUN_DESERIALIZE), HEADER_STRING,           \
145
+          (HHandleDestructorFunc)(FUN_CLEAR),                                 \
146
+          (HHandleSignalFunc)(FUN_SIGNAL), (LIST)                             \
147
+    }
148
+
149
+/****************************************************************************/
150
+/** HANDLE_INFO_INITIALIZER_NOSER: Convenience macro for init. HHandleInfo
151
+ ****************************************************************************
152
+ * Use this macro for handles that cannot be (de)serialized.
153
+ ****************************************************************************/
154
+#  define HANDLE_INFO_INITIALIZER_NOSER(TYPE_ID, SEM_TYPE, FUN_CLEAR,         \
155
+                                        FUN_SIGNAL, LIST)                     \
156
+    {                                                                         \
157
+      (INT4_8)(TYPE_ID), (SEM_TYPE), (HHandleSerializeFunc)NULL,              \
158
+          (HHandleDeserializeFunc)NULL, (const char *)NULL,                   \
159
+          (HHandleDestructorFunc)(FUN_CLEAR),                                 \
160
+          (HHandleSignalFunc)(FUN_SIGNAL), (LIST)                             \
161
+    }
162
+
163
+typedef struct HhandleT *Hphandle;
164
+
165
+typedef union
166
+{
167
+  INT4_8   l;             /* 4/8 byte integer                       (input)  */
168
+  double   d;             /* 8 byte real                            (input)  */
169
+  char     *s;            /* pointer to strings                     (input)  */
170
+  double   f;             /* 8 byte real (legacy 11.0)              (input)  */
171
+  Hphandle h;             /* Pointer to handle                      (input)  */
172
+} Hpar;                   /* parameter passing for the C interface           */
173
+
174
+typedef union
175
+{
176
+  INT4_8  *l;             /* 4/8 byte integer                       (output) */
177
+  double  *d;             /* 8 byte real,                           (output) */
178
+  char    *s;             /* pointer to strings                     (output) */
179
+  void   *p;              /* pointer to var. of any type (e.g. tuple)(output)*/
180
+  double  *f;             /* 8 byte real, (legacy 11.0)             (output) */
181
+} Hvar;                   /* parameter passing for the C interface           */
182
+
183
+typedef struct
184
+{
185
+  Hpar   par;             /* values                                          */
186
+  HINT   type;            /* type flag                                       */
187
+} Hcpar;                  /* parameter passing for the C interface           */
188
+
189
+typedef struct
190
+{
191
+  Hvar   var;             /* values                                          */
192
+  HINT   type;            /* type flag                                       */
193
+} Hcvar;                  /* parameter passing for the C interface           */
194
+
195
+typedef union {
196
+  INT4_8   *l;
197
+  double   *d;
198
+  char     **s;
199
+  Hcpar    *cpar;
200
+  Hphandle *h;
201
+} Hcelem; /* pure type array */
202
+
203
+
204
+typedef struct HCTUPLE
205
+{
206
+  Hpar  val;
207
+  HINT  type;
208
+  /*
209
+   * Add manual padding here so that a Hcpar can be mapped to a Hctuple exactly,
210
+   * including the padding compilers insert at the end of data structures to
211
+   * align the entire structure to the largest alignment of any structure
212
+   * member. Note that on 32 bit Linux for Intel, Hcpar is aligned to 4 bytes,
213
+   * so no manual padding is necessary on that architecture (only).
214
+   */
215
+#if !(defined(__linux__) && defined(__i386__))
216
+  char   pad[sizeof(Hcpar)-sizeof(Hpar)-sizeof(HINT)];
217
+#endif
218
+  INT4_8 num;                   /* number of set array elements */
219
+  INT4_8 capacity;              /* allocated array length */
220
+  HINT  free;                   /* free array elem when destroying tuple? */
221
+  Hcelem elem;                  /* the actual array */
222
+} Hctuple;
223
+#define HCTUPLE_INITIALIZER {{0},UNDEF_PAR,{0},0,0,0,{NULL}}
224
+
225
+typedef struct
226
+{
227
+  Hcvar   *variables;     /* variables (of application) to write back values */
228
+  Hcpar   *element;       /* tuple element(s)                                */
229
+  INT4_8  num_el;         /* number of used elements                         */
230
+  INT4_8  length;         /* total length of array (incl. unused elements)   */
231
+} Hcvtuple;               /* for passing control parameter variables from    */
232
+                          /* the language to the core interface              */
233
+#ifndef HC_NO_STRUCT_MEMBER_ALIGNMENT
234
+# pragma pack(pop)
235
+#endif
236
+
237
+/*****************************************************************************/
238
+/* Bool constants                                                            */
239
+/*****************************************************************************/
240
+#ifdef TRUE
241
+#undef TRUE
242
+#endif
243
+#define TRUE             true
244
+
245
+#ifdef FALSE
246
+#undef FALSE
247
+#endif
248
+#define FALSE            false
249
+
250
+
251
+/*****************************************************************************/
252
+/* Pixel types of HALCON images                                              */
253
+/*****************************************************************************/
254
+#define UNDEF_IMAGE   (HINT)0
255
+#define BYTE_IMAGE    (HINT)(1<<0)
256
+#define INT4_IMAGE    (HINT)(1<<1)
257
+#define LONG_IMAGE    INT4_IMAGE
258
+#define FLOAT_IMAGE   (HINT)(1<<2)
259
+#define DIR_IMAGE     (HINT)(1<<3)
260
+#define CYCLIC_IMAGE  (HINT)(1<<4)
261
+#define INT1_IMAGE    (HINT)(1<<5)
262
+/* (1<<6) omitted so far -> use it for next new image type */
263
+#define COMPLEX_IMAGE (HINT)(1<<7)
264
+/* (1<<8) omitted so far -> use it for next new image type */
265
+#define INT2_IMAGE    (HINT)(1<<9)
266
+#define UINT2_IMAGE   (HINT)(1<<10)
267
+#define VF_IMAGE      (HINT)(1<<11)
268
+#define INT8_IMAGE    (HINT)(1<<12)
269
+
270
+/*****************************************************************************/
271
+/* Type of HALCON vector field images                                        */
272
+/*****************************************************************************/
273
+#define VF_ABSOLUTE   (INT4)0
274
+#define VF_RELATIVE   (INT4)(1<<0)
275
+
276
+
277
+/*****************************************************************************/
278
+/* data types for handling pthreads (POSIX threads) and mutex variables      */
279
+/*****************************************************************************/
280
+typedef void*          H_pthread_t;            /* pthread handle             */
281
+typedef void*          H_pthread_mutex_t;      /* pthread mutex data type    */
282
+typedef void*          H_pthread_cond_t;       /* pthread condition variable */
283
+typedef void*          H_pthread_barrier_t;    /* pthread barrier variable */
284
+
285
+
286
+/*****************************************************************************/
287
+/* signature of the callback functions for drawing objects                   */
288
+/*****************************************************************************/
289
+
290
+#ifndef _WIN32
291
+#define __stdcall
292
+#endif
293
+typedef Herror (__stdcall *HDrawObjectCallback)(Hphandle DrawHandle,
294
+                                                Hphandle WindowHandle,
295
+                                                char* type);
296
+
297
+/*****************************************************************************/
298
+/* signature of the callback functions for buffer window content updates     */
299
+/*****************************************************************************/
300
+typedef Herror (__stdcall *HUpdateContentCallback)(void *context);
301
+
302
+/*****************************************************************************/
303
+/* signature of the callback function for license recheck failure callbacks  */
304
+/*****************************************************************************/
305
+typedef void (__stdcall *HLicenseRecheckFailedCallback)(void *context,
306
+                                                        Herror error);
307
+
308
+/* A define for the restrict qualifier */
309
+#if !defined(H_RESTRICT)
310
+# if defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
311
+   /* Compiler is in C99 mode and should know about the restrict qualifier */
312
+#  define H_RESTRICT restrict
313
+# else
314
+#  if (defined(_WIN32) && defined(_MSC_VER) && _MSC_VER >= 1400) || defined(__INTEL_COMPILER)
315
+    /* Intel Compilers and grown-up Microsoft Compilers always know a __restrict */
316
+#   define H_RESTRICT __restrict
317
+#  elif (defined(__linux) || defined(__APPLE__)) && defined(__GNUC__)
318
+    /* Gcc knows about __restrict__ since at least gcc 3.0 */
319
+#   define H_RESTRICT __restrict__
320
+#  elif defined(__TI_COMPILER_VERSION__)
321
+    /* TI's cgtools know about restrict. */
322
+#   define H_RESTRICT restrict
323
+#  else
324
+#   define H_RESTRICT
325
+#  endif
326
+# endif /* __STDC_VERSION__ */
327
+#endif /* H_RESTRICT */
328
+
329
+
330
+/* A define for the inline qualifier */
331
+#if !defined(H_INLINE)
332
+#ifdef __cplusplus
333
+#define H_INLINE inline
334
+#else
335
+#if defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
336
+/* compiler is in C99 mode and should know about the inline qualifier */
337
+#  define H_INLINE inline
338
+#else
339
+#if defined(_WIN32) || defined(__alpha) || defined(__sgi)
340
+#  define H_INLINE __inline
341
+#else
342
+#if defined(__linux) || defined(__APPLE__)
343
+#  define H_INLINE __inline__
344
+#else
345
+#if defined(__sun)
346
+#  define H_INLINE inline
347
+#else
348
+#  define H_INLINE
349
+#endif
350
+#endif
351
+#endif
352
+#endif /* __STDC_VERSION__ */
353
+#endif /* #ifdef __cplusplus .. else */
354
+#endif /* H_INLINE */
355
+
356
+/* A define to force functions to be inlined */
357
+#if defined(_WIN32)
358
+#define H_FORCEINLINE __forceinline
359
+#elif (defined(__linux) || defined(__APPLE__)) && defined(__GNUC__)
360
+#define H_FORCEINLINE H_INLINE __attribute__((always_inline))
361
+#else
362
+#define H_FORCEINLINE H_INLINE
363
+#endif
364
+
365
+#endif /* ifndef HBASE_H */

+ 199 - 0
3rdparty/include22/halcon/HConst.h

@@ -0,0 +1,199 @@
1
+/*****************************************************************************
2
+ * HConst.h
3
+ *****************************************************************************
4
+ *
5
+ * Project:     HALCON/libhalcon
6
+ * Description: Definition of constants
7
+ *
8
+ * (c) 1996-2020 by MVTec Software GmbH
9
+ *                  www.mvtec.com
10
+ *
11
+ *****************************************************************************/
12
+
13
+#ifndef HCONST_H
14
+#define HCONST_H
15
+
16
+/*****************************************************************************/
17
+/*****************************************************************************/
18
+/*             General constants for the HALCON library                      */
19
+/*****************************************************************************/
20
+/*****************************************************************************/
21
+
22
+
23
+/* Data Base */
24
+#define H_UNDEFINED  UNDEF_KEY /* Ctype.h, CORE*.c do not change */
25
+
26
+
27
+/*****************************************************************************/
28
+/* Max. values for the library                                               */
29
+/*****************************************************************************/
30
+#if !defined(HC_LARGE_IMAGES)
31
+#define LD_MAX_FORMAT             15
32
+#else
33
+#define LD_MAX_FORMAT             30
34
+#endif
35
+#define MAX_FORMAT                (1<<LD_MAX_FORMAT)
36
+
37
+#define RL_LENGTH                 1       /* Only for typedef                */
38
+#define DEF_RL_LENGTH             50000   /* initial value for CurrentRL     */
39
+#define OBJ_PER_PROC              5000    /* Typical # of objects per param. */
40
+#define FILE_TRANS_SIZE           1024*16 /* max. # of byte per read call    */
41
+#define MAX_FILES                 20      /* max. # of open files            */
42
+#define MAX_EDGE_LENGTH1          101     /* max. filter size                */
43
+#define MAX_CLUSTER               1024    /* LearnNDim,ClassNDim             */
44
+#define MAX_CONVOL                50000   /* IPConvol.c (> 10000!)           */
45
+#define MAX_IMAGE_DIR             (16*MAX_STRING) /* length of the image dir */
46
+#define MAX_GRAPHIC_COLOR         64/* max. number of graphics colors in LUT */
47
+#define MAX_COLOR_NAME_LENGTH     40 /* max. length of a color name          */
48
+
49
+
50
+/*****************************************************************************/
51
+/* Environment variables of HALCON                                           */
52
+/*****************************************************************************/
53
+#define HALCONROOT                "HALCONROOT"       /* Environment variable */
54
+#define HALCONIMAGES              "HALCONIMAGES"     /* Environment variable */
55
+#define HALCONHELP                "HALCONHELP"       /* Environment variable */
56
+#define HALCONSPY                 "HALCONSPY"        /* Environment variable */
57
+#define HALCONEXTENSIONS          "HALCONEXTENSIONS" /* Environment variable */
58
+#define HALCONEXAMPLES            "HALCONEXAMPLES"   /* Environment variable */
59
+
60
+
61
+/*****************************************************************************/
62
+/* Core Interface and operator implementation                                */
63
+/*****************************************************************************/
64
+#define MAX_INP_OBJ_PAR           9       /* max # input object parameters   */
65
+#define MAX_OUTP_OBJ_PAR          9       /* max # output object parameters  */
66
+#define MAX_INP_CTRL_PAR          20      /* max # inpput control parameters */
67
+#define MAX_OUTP_CTRL_PAR         20      /* max # output control parameters */
68
+#define MAX_CHAPTER                2      /* max # chapters / operator       */
69
+#define MAX_CHAPTER_PROC         300      /* max # operators / chapter       */
70
+
71
+#define MAX_KEY_NAME              5       /* old */
72
+#define KEY_NAME_LENGTH           20      /* old */
73
+#define MAX_BUFFER                10      /* old */
74
+
75
+/* Shortcut for object access */
76
+#define REGION                    0       /* object component: region        */
77
+#define CHORD                     0       /* object component: region (old)  */
78
+#define IMAGE1                    1       /* object component: 1st image     */
79
+#define IMAGE2                    2       /* object component: 2nd image     */
80
+#define IMAGE3                    3       /* object component: 3rd image     */
81
+#define IMAGE4                    4       /* object component: 4th image     */
82
+#define IMAGE5                    5       /* object component: 5th image     */
83
+#define IMAGE6                    6       /* object component: 6th image     */
84
+#define IMAGE7                    7       /* object component: 7th image     */
85
+#define IMAGE8                    8       /* object component: 8th image     */
86
+
87
+
88
+#define REGION_ID                 1
89
+#define IMAGE_ID                  2
90
+#define OBJECT_ID                 3
91
+#define TUPLE_ID                  4
92
+#define XLD_CONTOUR_ID            5
93
+#define XLD_POLYGON_ID            6
94
+#define XLD_PARALLEL_ID           7
95
+#define XLD_MOD_PARALLEL_ID       8
96
+#define XLD_EXT_PARALLEL_ID       9
97
+#define MIN_XLD_ID                XLD_CONTOUR_ID
98
+#define MAX_XLD_ID                XLD_EXT_PARALLEL_ID
99
+#define STD_FREE                  HFree
100
+
101
+/*****************************************************************************/
102
+/* File extensions                                                           */
103
+/*****************************************************************************/
104
+
105
+#define TRAINF_EXT                "trf"   /* OCR training file               */
106
+#define OCR_EXT                   "fnt"   /* OCR                             */
107
+#define OCR_BOX_EXT               "obc"   /* OCR box classifier              */
108
+#define OCR_MLP_EXT               "omc"   /* OCR MLP classifier              */
109
+#define OCR_SVM_EXT               "osc"   /* OCR SVM classifier              */
110
+#define OCR_KNN_EXT               "onc"   /* OCR kNN classifier              */
111
+#define OCR_KNN_EXT_LEGACY        "okc"   /* OCR kNN classifier (legacy)     */
112
+#define OCR_CNN_EXT               "occ"   /* OCR CNN classifier              */
113
+#define OCV_EXT                   "ocv"   /* OCV                             */
114
+#define PS_EXTENSION              "ps"    /* Postscript                      */
115
+#define TIFF_EXTENSION            "tiff"  /* TIFF                            */
116
+#define EXP_EXTENSION             "exp"   /* Extension image description     */
117
+#define IMAGE_EXTENSION           "ima"   /* Extension HALCON image          */
118
+#define REGION_EXTENSION          "reg"   /* Extension region file           */
119
+#define FILTER_EXTENSION          "fil"   /* Extension convol filters        */
120
+#define LUT_EXTENSION             "lut"   /* Extension LUT                   */
121
+#define GREYSE_EXT                "gse"   /* Extension gray struct element   */
122
+#define BMP_EXTENSION             "bmp"   /* Extension Windows-BMP           */
123
+#define DEEP_LEARNING_EXTENSION   "hdl"   /* Extension deep networks         */
124
+#define DEEP_OCR_EXT                "hdo"   /* Extension ocr deep networks     */
125
+
126
+
127
+
128
+
129
+/*****************************************************************************/
130
+/* Mathematical constants                                                    */
131
+/*****************************************************************************/
132
+
133
+#ifndef PI
134
+#ifdef  M_PI
135
+#define PI               M_PI
136
+#else
137
+#define PI               3.14159265358979323846
138
+#endif
139
+#endif
140
+#ifndef PI_2
141
+#define PI_2             (PI / 2.0)
142
+#endif
143
+#ifndef PI_4
144
+#define PI_4             (PI / 4.0)
145
+#endif
146
+
147
+
148
+/*****************************************************************************/
149
+/* Thread handling                                                           */
150
+/*****************************************************************************/
151
+
152
+#define GLOBAL_ID             NULL         /* 'global' operator handle       */
153
+#define DEFAULT_AGENTS_NR     4            /* default # for agents           */
154
+
155
+/* controlling the access to global/local context variables (see HInstance.c)*/
156
+#define GV_WRITE_INFO         0            /* Flag: write global context var.*/
157
+#define GV_READ_INFO          1            /* Flag: read global context var. */
158
+#define GV_INIT_INFO          2            /* Flag: init. global context var.*/
159
+#define GV_GET_ADRESS         3            /* Flag: get address of var.      */
160
+#define GV_REALLOC_A          4            /* Flag: realloc an array         */
161
+#define GV_LOCK               5            /* Flag: lock a mutex variable    */
162
+#define GV_UNLOCK             6            /* Flag: unlock a mutex variable  */
163
+#define GV_BOR_INFO           7            /* Flag: bitwise OR with variable */
164
+#define GV_BAND_INFO          8            /* Flag: bitwise AND with variable*/
165
+#define GV_WRITE_REF          9            /* Flag: write in reference var.; */
166
+                                    /* (forces changes in reference version) */
167
+#define GV_READ_REF          10            /* Flag: read from reference var. */
168
+
169
+/*****************************************************************************/
170
+/* H_SYS_INFO_READ_ONLY                                                      */
171
+/*****************************************************************************/
172
+
173
+#define CLOCK_MODE_PROCESSOR_TIME      0  /* clock mode */
174
+#define CLOCK_MODE_ELAPSED_TIME        1
175
+#define CLOCK_MODE_PERFORMANCE_COUNTER 2
176
+#define CLOCK_MODE_MULTIMEDIA_TIMER    3
177
+#define CLOCK_MODE_PROCESS_TIME        4
178
+#define OCR_TRAINFILE_VERSION1_0       1  /* file version when writing OCR */
179
+#define OCR_TRAINFILE_VERSION2_0       2  /* trainf */
180
+#define OCR_TRAINFILE_VERSION3_0       3  /* trainf + UINT2 images */
181
+#define H_ENCODING_NATIVE              1  /* local8bit character encoding    */
182
+#define H_ENCODING_UTF8                2  /* UTF-8 character encoding        */
183
+#define H_ENCODING_HLIB                3  /* encoding that is used by hlib   */
184
+#define H_ENCODING_ASCII               4  /* promise that a passed string is
185
+                                           * pure ASCII                      */
186
+#define H_ENCODING_SYSTEM              5  /* promise that a passed string is
187
+                                           * in system encoding: which is the
188
+                                           * locale under Linux, utf8 on Mac,
189
+                                           * and for Windows not needed      */
190
+#define H_ENCODING_AUTO                6  /* generic mode for detecting the
191
+                                           * encoding automatically */
192
+#define H_ENCODING_LATIN1              7  /* promise that a passed string is
193
+                                             pure latin-1 */
194
+#define TIMER_MODE_ELAPSED_TIME        0
195
+#define TIMER_MODE_MULTIMEDIA_TIMER    1
196
+#define TIMER_MODE_PERFORMANCE_COUNTER 2
197
+
198
+
199
+#endif

+ 214 - 0
3rdparty/include22/halcon/HCtype.h

@@ -0,0 +1,214 @@
1
+/*****************************************************************************
2
+ * HCtype.h
3
+ *****************************************************************************
4
+ *
5
+ * Project:      HALCON/libhalcon
6
+ * Description:  (Global) data structures defining the processing context
7
+ *               for HALCON operator instances and HALCON operator threads
8
+ *
9
+ * (c) 1996-2020 by MVTec Software GmbH
10
+ *               www.mvtec.com
11
+ *
12
+ *****************************************************************************/
13
+
14
+#ifndef HCTYPE_H
15
+#define HCTYPE_H
16
+
17
+#include "HErrorDef.h" /* -> H_MSG_OK */
18
+#include "IPType.h" /* -> HBOOL */
19
+
20
+#if defined(__cplusplus)
21
+extern "C" {
22
+#endif
23
+
24
+
25
+#ifndef HC_NO_STRUCT_MEMBER_ALIGNMENT 
26
+/* sets the struct member alignment to avoid problems if 
27
+ * the settings of the user differ to those of the HALCON
28
+ * version. (8 is the default alignment, generally) */
29
+# pragma pack(push,8) 
30
+#endif
31
+
32
+/*---------------------------------------------------------------------------
33
+ * aop_split_t defines CORE-AOP levels 
34
+ *---------------------------------------------------------------------------*/
35
+typedef enum {split_tuple=0, split_channel, split_domain, split_num} 
36
+  aop_split_t;
37
+
38
+
39
+/*---------------------------------------------------------------------------*/
40
+/* ATTENTION! Increase H_OPERATOR_INFO_VERSION/DERIVATE whenever you change
41
+ *            or add operator info identifyers
42
+ *            The version number is composed as follows:
43
+ *            Version#32 := [Major#8 Minor#8 OptionalInfo16]
44
+ *            whereas major#8 denotes a 1 byte coded mojor version number,
45
+ *            Minor#8 denotes a 1 byte coded minor version number,
46
+ *            OptionalInfo16 denotes a 16 bit coded bitfield of optional coded
47
+ *            operator information 
48
+ *---------------------------------------------------------------------------*/
49
+#define H_OPERATOR_INFO_VERSION  0x0400  /* 4.0 */
50
+
51
+#ifndef HC_NO_COMPUTE_DEVICES
52
+# define HOI_COMPUTE_DEVICES (1<<0)  /* Bit0: information for compute device
53
+                                      * support available */
54
+#else
55
+# define HOI_COMPUTE_DEVICES 0
56
+#endif
57
+
58
+#define H_OPERATOR_INFO_DERIVATE ( (H_OPERATOR_INFO_VERSION<<16) |  \
59
+                                   HOI_COMPUTE_DEVICES)
60
+
61
+/* HALCON operator info identifyers: */
62
+#define HOIID_NumInpObjPar        0
63
+#define HOIID_NumOutpObjPar       1
64
+#define HOIID_NumInpCtrlPar       2
65
+#define HOIID_NumOutpCtrlPar      3
66
+#define HOIID_LogicalName         4
67
+#define HOIID_PhysicalName        5
68
+#define HOIID_ParameterName       6
69
+#define HOIID_ParameterType       7   /* [2] */
70
+#define HOIID_process_excl_local  8 
71
+#define HOIID_parallelization     9
72
+#define HOIID_splitIOPmask       10   /*[split_num]*/
73
+#define HOIID_tupleIOPmask       11   /*[split_num]*/
74
+#define HOIID_splitIOPref        12   /*[split_num]*/
75
+#define HOIID_RegionPost         13
76
+#define HOIID_ParameterCosts     14   /*[MAX_INP_CTRL_PAR]*/
77
+#define HOIID_ParameterPost      15   /*[MAX_OUTP_CTRL_PAR]*/
78
+#define HOIID_aopCost            16
79
+#define HOIID_numCost            17
80
+#define HOIID_parallelMinCosts   18
81
+#define HOIID_parallelRegionsplit 19
82
+#define HOIID_HelpIndex          20
83
+#define HOIID_InfoLength         21
84
+#define HOIID_Class              22   /*[MAX_CHAPTER]*/
85
+#define HOIID_ClassName          23   /*[MAX_CHAPTER]*/
86
+#define HOIID_package_id         24
87
+
88
+/* --- compute devices: */
89
+#define HOIID_compute_device     25
90
+#define HOIID_cd_supported_image_kinds 26
91
+#define HOIID_cd_supported_values 27
92
+#define HOIID_cd_supported_values_num 28
93
+
94
+#define HOIID_procedure          50
95
+#define HOIID_module             51
96
+
97
+
98
+/*---------------------------------------------------------------------------
99
+ * HXPkgOpenId initializes extension package structures and checks 
100
+ * compatibility.
101
+ *---------------------------------------------------------------------------*/
102
+extern HLibExport Herror HXPkgOpenId( INT4 xpkg_id, UINT4 halcon_version, 
103
+                                      UINT4 opinfo_version,
104
+                                      HINT op_num, HINT *osid);
105
+
106
+/*---------------------------------------------------------------------------
107
+ * HXPkgSetOpInfo sets operator information of a specific extension package 
108
+ * operator.
109
+ *---------------------------------------------------------------------------*/
110
+extern HLibExport Herror HXPkgSetOpInfo( INT4 xpkg_id, INT4 op_id, 
111
+                                         INT4 oi_id, ...);
112
+
113
+
114
+/*---------------------------------------------------------------------------*/
115
+/* H_OPERATOR_PARAMETERS - data structure that contains the operator
116
+ * parameters passed to the language interface. This information is only valid
117
+ * for the processing time of the associated instance/HALCON thread.
118
+ * All read/write accesses to the information are done exclusively
119
+ * (thus different HALCON threads of the same instance differ in the
120
+ * content of this structure).
121
+ *---------------------------------------------------------------------------*/
122
+typedef struct 
123
+{
124
+  /*-------------------------------- operator parameters --------------------*/
125
+  /*______________________________________________input object parameters:___*/
126
+  Hkey    *InpObjList[MAX_INP_OBJ_PAR+1]; /* for every input object par      *
127
+                                           * an array of object keys         */
128
+  Hkey    InpObjSingle[MAX_INP_OBJ_PAR+1]; /* used, when the array of obj 
129
+                                            * keys has size 1                */
130
+  INT4_8  InpObjNum[MAX_INP_OBJ_PAR+1];  /* number of objects per input obj. *
131
+                                          * parameter; index: 1..inp_obj     */
132
+  INT1    freeIOP[MAX_INP_OBJ_PAR+1];
133
+  
134
+  /*_____________________________________________input control parameters:___*/
135
+  Hctuple **InpCtrlList;  /* used to access inp. ctrl handles */
136
+  Hctuple *InpCtrlStack[MAX_INP_CTRL_PAR];/* stores interf./Single references*/
137
+  Hctuple InpCtrlNested[MAX_INP_CTRL_PAR]; /* holds tuple trunks, eg for pure
138
+                                            * type input ctrls(single values)*/
139
+  HBOOL   ctrl_inherited;   /* true, if all ctrl. values are inherited from 
140
+                             * a father instance (only important for 
141
+                             * correctly freeing the InpCtrlList).           */
142
+  
143
+#if 0
144
+  Hctuple *InpCtrlList;     /* for handling inp. ctrl. values;               */
145
+  Hctuple *InpCtrlNested;   /* for storing inp. ctrl. values; 
146
+                             * one Hctuple element per parameter             */
147
+  INT1    *freeICP;         /* inp ctrl values were copied or passed 
148
+                             * by reference                                  */
149
+  HBOOL   ctrl_inherited;   /* true, if all ctrl. values are inherited from 
150
+                             * a father instance (only important for 
151
+                             * correctly freeing the InpCtrlList).
152
+                             *                                               */
153
+#endif
154
+  /*_____________________________________________output object parameters:___*/
155
+  Hkey    *OutpObjList[MAX_OUTP_OBJ_PAR+1];/* for every output object par.   *
156
+                                            * an array of objects keys       */
157
+  INT4_8  OutpObjNum[MAX_OUTP_OBJ_PAR+1];  /* number of objects per output   *
158
+                                            * object par.; index: 1..        */
159
+  INT4_8  OutpObjLen[MAX_OUTP_OBJ_PAR+1];  /* length of OutpObjList per      *
160
+                                            * output object par.; index: 1.. */
161
+  /*____________________________________________output control parameters:___*/
162
+  Hctuple **OutpCtrlList;      /* used to access outp. ctrl parameters   */
163
+  Hctuple *OutpCtrlStack[MAX_OUTP_CTRL_PAR]; /* stores interface/Nested ref. */
164
+  Hctuple OutpCtrlNested[MAX_OUTP_CTRL_PAR]; /* holds tuple trunks for output
165
+                                              * ctrl values (eg, pure type 
166
+                                              * operators)   */
167
+  UINT4    freeOCP; /* bitcoded free flag: 8*sizof(freeOCP)>=MAX_OUTP_CTRL_PAR*/
168
+
169
+} H_OPERATOR_PARAMETERS;
170
+
171
+
172
+/*---------------------------------------------------------------------------*/
173
+/* H_OPERATOR_SHARED - data structure that is shared among internal threads.
174
+ *---------------------------------------------------------------------------*/
175
+typedef struct
176
+{
177
+  INT4 run_state;
178
+} H_OPERATOR_SHARED;
179
+
180
+typedef enum
181
+{
182
+  ph_ready        = 0,
183
+  ph_running      = H_MSG_OK,
184
+  ph_break        = H_ERR_BREAK,
185
+  ph_hen_canceled = H_ERR_HEN_CANCEL,
186
+  ph_canceled     = H_ERR_CANCEL
187
+} HRunState;
188
+
189
+typedef struct HLISTEL
190
+{ /* placeholder for internal double linked list element type */
191
+  struct HLISTEL* prev;
192
+  struct HLISTEL* next;
193
+} H_LIST_EL;
194
+
195
+
196
+typedef struct HALCON_OPERATOR_HANDLE
197
+{
198
+  H_LIST_EL list_el; /*list_el must be defined in the first place*/
199
+  void*     generator;
200
+  INT4      proc_index;         /* Index of HALCON operator        */
201
+  H_OPERATOR_PARAMETERS* param; /* operator parameters (thread-specific) */
202
+  H_OPERATOR_SHARED*     shared_data; /*shared operator data*/
203
+} H_OPHANDLE;
204
+typedef H_OPHANDLE* Hophandle_;
205
+
206
+#ifndef HC_NO_STRUCT_MEMBER_ALIGNMENT 
207
+#pragma pack(pop)
208
+#endif
209
+
210
+#if defined(__cplusplus)
211
+}
212
+#endif
213
+
214
+#endif

+ 61 - 0
3rdparty/include22/halcon/HDeclSpec.h

@@ -0,0 +1,61 @@
1
+/*****************************************************************************
2
+ * HDeclSpec.h
3
+ *****************************************************************************
4
+ *
5
+ * Project:     HALCON/libhalcon
6
+ * Description: Windows DLL specifications
7
+ *
8
+ * (c) 1996-2020 by MVTec Software GmbH
9
+ *                  www.mvtec.com
10
+ *
11
+ *****************************************************************************/
12
+
13
+#ifndef HALCON_DECL_SPEC_H
14
+#define HALCON_DECL_SPEC_H
15
+
16
+/* HALCON library. If _HLibStatic is defined, HALCON is a static library. */
17
+#if defined(_HLibStatic)
18
+#  define HLibExport
19
+#elif defined(_WIN32) && !defined(_NODLL)
20
+#  if defined(_HLibDLL)
21
+#    define HLibExport __declspec(dllexport)
22
+#  else
23
+#    define HLibExport __declspec(dllimport)
24
+#  endif
25
+#elif defined(__GNUC__) && (__GNUC__ >= 4)
26
+#  define HLibExport __attribute__((visibility("default")))
27
+#else
28
+#  define HLibExport
29
+#endif
30
+
31
+/*
32
+ * HALCON language interfaces. If _LIntExport is defined, the language
33
+ * interfaces are static libraries.
34
+ */
35
+#if defined(_LIntStatic)
36
+#  define LIntExport
37
+#elif defined(_WIN32) && !defined(_NODLL)
38
+#  if defined(_LIntDLL)
39
+#    define LIntExport __declspec(dllexport)
40
+#  else
41
+#    define LIntExport __declspec(dllimport)
42
+#  endif
43
+#elif defined(__GNUC__) && (__GNUC__ >= 4)
44
+#  define LIntExport __attribute__((visibility("default")))
45
+#else
46
+#  define LIntExport
47
+#endif
48
+
49
+/* Extension packages. These are always shared libraries / DLLs */
50
+#if defined(_WIN32)
51
+#  define HUserExport __declspec(dllexport)
52
+#  define HUserImport __declspec(dllimport)
53
+#elif defined(__GNUC__) && (__GNUC__ >= 4)
54
+#  define HUserExport __attribute__((visibility("default")))
55
+#  define HUserImport
56
+#else
57
+#  define HUserExport
58
+#  define HUserImport
59
+#endif
60
+
61
+#endif

文件差异内容过多而无法显示
+ 3556 - 0
3rdparty/include22/halcon/HErrorDef.h


+ 118 - 0
3rdparty/include22/halcon/HExtern.h

@@ -0,0 +1,118 @@
1
+/*****************************************************************************
2
+ * HExtern.h
3
+ *****************************************************************************
4
+ *
5
+ * Project:     HALCON/libhalcon
6
+ * Description: External variables and some global procedures for
7
+ *              language interfaces
8
+ *
9
+ * (c) 1996-2020 by MVTec Software GmbH
10
+ *                  www.mvtec.com
11
+ *
12
+ *****************************************************************************/
13
+
14
+#ifndef HEXTERN_H
15
+#define HEXTERN_H
16
+
17
+#if defined(__cplusplus)
18
+extern "C" {
19
+#endif
20
+
21
+/* global variables for image processing                                     */
22
+                                                /* procedures description    */
23
+extern HLibExport HINT         HDoLowError;     /* error messages of HALCON  */
24
+extern HLibExport INT4         HLowErrorAction[4]; /* action for HALCON low  */
25
+                                                   /* level error messages   */
26
+extern HLibExport HINT         HDoLicenseError; /* license msgs of HALCON    */
27
+extern HLibExport HINT         HUseSpinLock;    /* sync initialization of
28
+                                                 * Parallel HALCON           */
29
+extern HLibExport HINT         HStartUpThreadPool;  /* start thread pool
30
+                                                     * initially? */
31
+extern HLibExport HINT         HShutdownThreadPool; /* shutdown thread pool
32
+                                                     * on termination? */
33
+extern HLibExport HINT         HShuttingDown; /* currently terminating and
34
+                                               * unloading HALCON Library? */
35
+
36
+/* Convenience function accessors as some development environments */
37
+/* do not directly support importing variables from C DLLs.        */
38
+
39
+extern HLibExport void __stdcall HSetDoLicenseError(HINT value);
40
+extern HLibExport void __stdcall HSetUseSpinLock(HINT value);
41
+extern HLibExport void __stdcall HSetStartUpThreadPool(HINT value);
42
+extern HLibExport void __stdcall HSetShutdownThreadPool(HINT value);
43
+
44
+extern HLibExport HINT __stdcall HGetDoLicenseError(void);
45
+extern HLibExport HINT __stdcall HGetUseSpinLock(void);
46
+extern HLibExport HINT __stdcall HGetStartUpThreadPool(void);
47
+extern HLibExport HINT __stdcall HGetShutdownThreadPool(void);
48
+extern HLibExport HINT __stdcall HGetShuttingDown(void);
49
+
50
+/* remark: the structure above contains global HALCON system variables       */
51
+/* which are (in the normal case) exclusively accessible via a valid         */
52
+/* procedure handle and by using specific functions of the HALCON-Lib        */
53
+/* source code file HInstance.c; those functions contain synchronization     */
54
+/* mechanisms to guarantee a correct access to the variables even in case of */
55
+/* a parallel/multithreaded/reentrant HALCON version.                        */
56
+/* Nevertheless the structure is propagated here so that it also can be used */
57
+/* directly, but this should be done VERY CAREFULLY!! At the moment it is    */
58
+/* only used directly within HDevelop, which means no problem, because       */
59
+/* HDevelop works strictly sequentially, i.e. it calls all HALCON            */
60
+/* operators one after another;                                              */
61
+
62
+/* Functions to tell HALCON library the interface from which it gets accessed.
63
+ * This enables the library to adapt its default behaviour.                  */
64
+extern HLibExport void __stdcall HSetHDevelopInt(HINT AccessByHDevelop);
65
+extern HLibExport HINT __stdcall HGetHDevelopInt(void);
66
+extern HLibExport void __stdcall HSetCOMInt(HINT AccessByCOM);
67
+extern HLibExport HINT __stdcall HGetCOMInt(void);
68
+
69
+/* Function to tell HALCON library about the console */
70
+#ifdef WIN32
71
+extern HLibExport void __stdcall HSetConsole(HINT ProcessId);
72
+#endif
73
+
74
+/* Function to register a license recheck failure callback. */
75
+extern HLibExport void __stdcall
76
+HSetLicenseRecheckFailedCallback(HLicenseRecheckFailedCallback callback,
77
+                                 void *context);
78
+
79
+/* FinalizeHALCONLibrary prepares HALCON for finalization. It should be called
80
+ * right before unloading the HALCON Library.
81
+ * Return Value: H_ERR_FINI_USR_THREAD if there are still user threads running
82
+ * that were using HALCON functionality. No resources are freed in this case.
83
+ */
84
+extern HLibExport HINT __stdcall FinalizeHALCONLibrary(void);
85
+
86
+/* Callback interface for operators to signal their progress and current
87
+ * status.  External applications can register to receive such updates using
88
+ * set_system('add_progress_callback', CallbackFunction).
89
+ *
90
+ * The registered callback is called by selected operators to signal their
91
+ * progress and supply an update in text form. The parameters of the callback
92
+ * are:
93
+ * - id: Operating system specific thread identifier. Note that with Automatic
94
+ *       Operator Parallelization (AOP), the callback can be called from a
95
+ *       different thread than the one used to call the operator. The id is
96
+ *       thread independent and unique for the current operator call.
97
+ *       It is the result of GetCurrentThreadId() (Windows) or pthread_self
98
+ *       (UNIX) of the main thread used to call the operator.
99
+ * - operator_name: Name of the operator that is executing
100
+ * - progress: >=0: the current progress of the operator between 0 and 1.
101
+ *                  Note that the progress is only an approximation.
102
+ *             -1: No progress available (only a message)
103
+ *             -2: the operator has finished execution. The application should
104
+ *                 clean up any resources allocated for the operator.
105
+ *                 Note that this call is done only for operators that
106
+ *                 previously sent a progress update.
107
+ * - message: If not NULL, a message about the operator's progress in english.
108
+ */
109
+typedef void(__stdcall *HProgressBarCallback)(Hlong       id,
110
+                                              const char *operator_name,
111
+                                              double      progress,
112
+                                              const char *message);
113
+
114
+#if defined(__cplusplus)
115
+}
116
+#endif
117
+
118
+#endif

+ 191 - 0
3rdparty/include22/halcon/HIntDef.h

@@ -0,0 +1,191 @@
1
+/*****************************************************************************
2
+ * HIntDef.h
3
+ *****************************************************************************
4
+ *
5
+ * Project:     HALCON/libhalcon
6
+ * Description: Definition of HALCON data types
7
+ *              These definitions can be controlled by the compiler
8
+ *              The size of the data type is always in byte _not_ in bits
9
+ *
10
+ * (c) 1996-2020 by MVTec Software GmbH
11
+ *                  www.mvtec.com
12
+ *
13
+ *****************************************************************************/
14
+
15
+#ifndef HINTDEF_H
16
+#define HINTDEF_H
17
+
18
+#ifndef __midl
19
+#  include <float.h>  /* FLT_MAX, DBL_MAX, ... */
20
+#  include <limits.h> /* LONG_MAX, INT_MAX, ... */
21
+#  include <stdlib.h> /* RAND_MAX */
22
+#endif
23
+
24
+#include "hclib/hclib_types.h"    /* C99 standard integer types    */
25
+
26
+typedef int HINT;           /* Signed integer. HALCON assumes at least
27
+                               4 bytes */
28
+typedef unsigned int HUINT; /* Unsigned integer. HALCON assumes at least
29
+                               4 bytes */
30
+#define HUINT_MIN 0
31
+
32
+#ifndef _DOUBLE8
33
+typedef double DOUBLE8;
34
+#else
35
+typdef _DOUBLE8 DOUBLE8;
36
+#endif
37
+
38
+#ifdef __vxworks
39
+#  include <types/vxTypesBase.h>
40
+#  ifndef DBL_MAX
41
+#    define DBL_MAX _ARCH_DBL_MAX
42
+#  endif
43
+#  ifndef DBL_MIN
44
+#    define DBL_MIN _ARCH_DBL_MIN
45
+#  endif
46
+#  ifndef FLT_MAX
47
+#    define FLT_MAX _ARCH_FLT_MAX
48
+#  endif
49
+#  ifndef FLT_MIN
50
+#    define FLT_MIN _ARCH_FLT_MIN
51
+#  endif
52
+#endif
53
+
54
+/* float and double epsilons: These are the differences between 1 and
55
+   the smallest floating point number of type float/double that is
56
+   greater than 1. As we assume IEEE 754 floating point arithmetic,
57
+   the following values are used. */
58
+#ifndef FLT_EPSILON
59
+#  define FLT_EPSILON 1.19209290e-07F
60
+#endif
61
+
62
+#ifndef DBL_EPSILON
63
+#  define DBL_EPSILON 2.2204460492503131e-16
64
+#endif
65
+
66
+#ifndef RAND_MAX
67
+#  define RAND_MAX MAXINT
68
+#endif
69
+
70
+typedef int8_t INT1; /* signed integer, 1 byte */
71
+#define INT1_MIN INT8_MIN
72
+#define INT1_MAX INT8_MAX
73
+
74
+typedef uint8_t UINT1; /* unsigned integer, 1 byte */
75
+#define UINT1_MIN 0
76
+#define UINT1_MAX UINT8_MAX
77
+
78
+typedef int16_t INT2; /* signed integer, 2 bytes */
79
+#define INT2_MIN INT16_MIN
80
+#define INT2_MAX INT16_MAX
81
+
82
+typedef uint16_t UINT2; /* unsigned integer, 2 bytes */
83
+#define UINT2_MIN 0
84
+#define UINT2_MAX UINT16_MAX
85
+
86
+typedef int32_t INT4; /* signed integer, 4 bytes */
87
+#define INT4_MIN INT32_MIN
88
+#define INT4_MAX INT32_MAX
89
+
90
+typedef uint32_t UINT4; /* unsigned integer, 4 bytes */
91
+#define UINT4_MIN 0
92
+#define UINT4_MAX UINT32_MAX
93
+
94
+/*
95
+ * Defining HINT4_8 and UINT4_8 to be 64 bits on 64 bit systems and 32 bits on
96
+ * 32 bit systems is a bit tricky. The obvious solution would be to use
97
+ * intptr_t and uintptr_t, but this causes problems on platforms where
98
+ * 'intptr_t' is ultimately derived from 'int'. Our C++ language interface has
99
+ * overloaded functions with variants taking both 'int' and 'Hlong' parameters,
100
+ * which is only allowed if 'int' and 'Hlong' are distinct types. Since typedef
101
+ * does not create distinct types in C++, we must make sure 'Hlong' is
102
+ * ultimately derived from a different type. The 'long' type nicely fits our
103
+ * requirements, as it is 64 bits on all our supported platforms except for 64
104
+ * bit Windows, and 32 bits on all 32 bit platforms (except for TI C6X DSPs
105
+ * using COFF object format - which is obsolete - where it is 40 bits).
106
+ */
107
+#if defined(_WIN64)
108
+typedef __int64 HINT4_8;
109
+typedef __int64 INT4_8;
110
+#  define INT4_8_FORMAT "I64"
111
+#  define INT4_8_MIN _I64_MIN
112
+#  define INT4_8_MAX _I64_MAX
113
+
114
+typedef unsigned __int64 UINT4_8;
115
+#  define UINT4_8_MIN 0UL
116
+#  define UINT4_8_MAX _UI64_MAX
117
+#  define UINT4_8_FORMAT INT4_8_FORMAT
118
+
119
+#else
120
+typedef long    HINT4_8;
121
+typedef long    INT4_8;
122
+#  define INT4_8_MIN LONG_MIN
123
+#  define INT4_8_MAX LONG_MAX
124
+#  define INT4_8_FORMAT "l"
125
+
126
+typedef unsigned long UINT4_8;
127
+#  define UINT4_8_MIN 0UL
128
+#  define UINT4_8_MAX ULONG_MAX
129
+#  define UINT4_8_FORMAT INT4_8_FORMAT
130
+#endif
131
+
132
+/* Hlong/Hulong is the same as INT4_8/UINT4_8 */
133
+typedef INT4_8 Hlong;
134
+#define HLONG_MIN INT4_8_MIN
135
+#define HLONG_MAX INT4_8_MAX
136
+#define HLONG_FORMAT INT4_8_FORMAT
137
+#define LONG_FORMAT INT4_8_FORMAT /* deprecated, use HLONG_FORMAT     */
138
+
139
+typedef UINT4_8 Hulong;
140
+#define HULONG_MIN UINT4_8_MIN
141
+#define HULONG_MAX UINT4_8_MAX
142
+
143
+typedef int64_t HINT8; /* signed integer, 8 bytes */
144
+#define HINT8_MIN INT64_MIN
145
+#define HINT8_MAX INT64_MAX
146
+#if defined(_WIN32)
147
+#  define HINT8_FORMAT "I64"
148
+#else
149
+#  define HINT8_FORMAT "ll"
150
+#endif
151
+
152
+typedef uint64_t HUINT8; /* unsigned integer, 8 bytes */
153
+#define HUINT8_MIN 0U
154
+#define HUINT8_MAX UINT64_MAX
155
+
156
+#if !defined(HC_LARGE_IMAGES)
157
+#  define HIMGCOOR_MIN INT2_MIN
158
+#  define HIMGCOOR_MAX INT2_MAX
159
+#  define HITEMCNT_MIN INT4_MIN
160
+#  define HITEMCNT_MAX INT4_MAX
161
+#  define HSUBCOOR_MIN FLT_MIN
162
+#  define HSUBCOOR_MAX FLT_MAX
163
+#  define HSUBCOOR_EPS FLT_EPSILON
164
+#  define HSUBATTR_MIN FLT_MIN
165
+#  define HSUBATTR_MAX FLT_MAX
166
+#else
167
+#  define HIMGCOOR_MIN INT4_MIN
168
+#  define HIMGCOOR_MAX INT4_MAX
169
+#  define HITEMCNT_MIN INT4_8_MIN
170
+#  define HITEMCNT_MAX INT4_8_MAX
171
+#  define HSUBCOOR_MIN DBL_MIN
172
+#  define HSUBCOOR_MAX DBL_MAX
173
+#  define HSUBCOOR_EPS DBL_EPSILON
174
+#  define HSUBATTR_MIN DBL_MIN
175
+#  define HSUBATTR_MAX DBL_MAX
176
+#endif
177
+
178
+/*
179
+ * Define the largest double that can be safely casted to INT4_8 without
180
+ * turning negative.
181
+ */
182
+#if INT4_8_MAX == INT4_MAX
183
+#  define INT_4_8_MAXDOUBLE (double)INT4_MAX
184
+#else
185
+#  define INT_4_8_MAXDOUBLE (double)(HINT8_MAX - 1023)
186
+#endif
187
+
188
+/* At least an address must fit into MACHINE_WORD */
189
+typedef intptr_t MACHINE_WORD;
190
+
191
+#endif /* !HINTDEF_H */

+ 79 - 0
3rdparty/include22/halcon/HInterfaceC.h

@@ -0,0 +1,79 @@
1
+/*****************************************************************************
2
+ * HInterfaceC.h
3
+ *****************************************************************************
4
+ *
5
+ * Project:      HALCON/HLib
6
+ * Description:  Prototypes for HALCON/C interface
7
+ *
8
+ * (c) 1996-2020 by MVTec Software GmbH
9
+ *                  www.mvtec.com
10
+ *
11
+ *****************************************************************************/
12
+
13
+#ifndef HINTERFACE_C_H
14
+#define HINTERFACE_C_H
15
+
16
+/*===========================================================================*/
17
+/*                             Defines                                      */
18
+/*===========================================================================*/
19
+
20
+
21
+/*===========================================================================*/
22
+/*                             Prototypes                                    */
23
+/*===========================================================================*/
24
+extern LIntExport Herror HcErrorHandling(Hproc_handle ph, Herror err);
25
+
26
+extern LIntExport Herror HcException(HINT op_id, Herror err);
27
+
28
+extern LIntExport Herror HcPreCall(HINT proc_index, Hproc_handle* ph);
29
+
30
+extern LIntExport Herror HcCall(Hproc_handle ph);
31
+
32
+extern LIntExport Herror HcPostCall(Hproc_handle ph, Herror err);
33
+
34
+extern LIntExport Herror HcStoreIO(Hproc_handle ph, HINT par,
35
+                                   Hobject inObjVar);
36
+
37
+extern LIntExport Herror HcStoreICL(Hproc_handle ph, HINT par, Hlong value);
38
+
39
+extern LIntExport Herror HcStoreICD(Hproc_handle ph, HINT par, double value);
40
+
41
+extern LIntExport Herror HcStoreICS(Hproc_handle ph, HINT par,
42
+                                    char const* value);
43
+extern LIntExport Herror HcStoreICSEnc(Hproc_handle ph, HINT par,
44
+                                       char const* value);
45
+
46
+extern LIntExport Herror HcStoreICT(Hproc_handle ph, HINT par,
47
+                                    Htuple const* value);
48
+extern LIntExport Herror HcStoreICTEnc(Hproc_handle ph, HINT par,
49
+                                       Htuple const* value);
50
+
51
+
52
+extern LIntExport void HcInitOC(Hproc_handle ph, HINT par);
53
+extern LIntExport void HcInitOCD(Hproc_handle ph, HINT par);
54
+extern LIntExport void HcInitOCL(Hproc_handle ph, HINT par);
55
+extern LIntExport void HcInitOCS(Hproc_handle ph, HINT par);
56
+extern LIntExport void HcInitOCT(Hproc_handle ph, HINT par, Hctuple* ctuple);
57
+
58
+extern LIntExport Herror HcStoreOO(Hproc_handle ph, HINT par,
59
+                                   Hobject* outObjVar, Herror err);
60
+
61
+extern LIntExport Herror HcStoreOCL(Hproc_handle ph, HINT par,
62
+                                    Hlong* outCtrlVar, Herror err);
63
+
64
+extern LIntExport Herror HcStoreOCD(Hproc_handle ph, HINT par,
65
+                                    double* outCtrlVar, Herror err);
66
+
67
+extern LIntExport Herror HcStoreOCS(Hproc_handle ph, HINT par,
68
+                                    char* outCtrlVar, Herror err);
69
+
70
+extern LIntExport Herror HcStoreOCSEnc(Hproc_handle ph, HINT par,
71
+                                       char* outCtrlVar, Herror err);
72
+
73
+extern LIntExport Herror HcStoreOCT(Hproc_handle ph, HINT par,
74
+                                    Htuple* outCtrlVar, Herror err);
75
+
76
+extern LIntExport Herror HcStoreOCTEnc(Hproc_handle ph, HINT par,
77
+                                       Htuple* outCtrlVar, Herror err);
78
+
79
+#endif

文件差异内容过多而无法显示
+ 1816 - 0
3rdparty/include22/halcon/HMacro.h


+ 218 - 0
3rdparty/include22/halcon/HParallel.h

@@ -0,0 +1,218 @@
1
+/*****************************************************************************
2
+ * HParallel.h
3
+ *****************************************************************************
4
+ *
5
+ * Project:      HALCON/HLib
6
+ * Description:  Basic constants for controlling the automatic 
7
+ *               parallelization of HALCON operators and 
8
+ *               programs (operator sequences)
9
+ *
10
+ * (c) 1996-2020 by MVTec Software GmbH
11
+ *                  www.mvtec.com
12
+ *
13
+ *****************************************************************************/
14
+
15
+#ifndef HCPAR_H
16
+#define HCPAR_H
17
+
18
+#if defined(__cplusplus)
19
+extern "C" {
20
+#endif
21
+
22
+/* --- Defines -------------------------------------------------- */
23
+# if defined(_POSIX_THREADS)
24
+#  define H_POSIX_THREADS
25
+# elif defined(_WIN32)
26
+#  define H_WIN32_THREADS
27
+# endif
28
+/* else: no synchronization and threads used */
29
+
30
+
31
+# if !defined (H_PARALLEL) || \
32
+     !(defined(H_WIN32_THREADS)||defined(H_POSIX_THREADS)) 
33
+  /* Sequential HALCON or no synchronization specified */
34
+#  define H_NO_SPIN_LOCK
35
+#  if defined H_TSD
36
+#    undef H_TSD  /* no thread specific data */
37
+#  endif
38
+# else
39
+#  define H_TSD /* use thread specific data */
40
+# endif
41
+
42
+
43
+
44
+/*===========================================================================*/
45
+/*                                Constants                                  */
46
+/*===========================================================================*/
47
+/* -------- (knowledge default values and control weights) ----------------- */
48
+
49
+/* constants for describing how to process an operator:                      */
50
+#define HAG_PAR_INDEPENDENT   0            /* completely independent of other
51
+                                            * operators, i.e., can run with
52
+                                            * exclusive operators in parallel*/
53
+#define HAG_PAR_NO_RESTRICT   1<<0         /* no restriction                 */
54
+#define HAG_PAR_LOCAL         1<<1         /* force local processing         */
55
+                                           /* by main thread/process         */
56
+#define HAG_PAR_MUTUAL        1<<2         /* force processing under mutual  */
57
+                                           /* exclusion, i.e. the same       */
58
+                                           /* operator may only run once at  */
59
+                                           /* a time                         */
60
+#define HAG_PAR_EXCLUSIVE     1<<3         /* force exclusive processing,    */
61
+                                           /* i.e. no other operator may run */
62
+                                           /* while this operator works      */
63
+
64
+
65
+/* default control values:                                                   */
66
+#define HAG_KW_CHORD_NUM      1            /* minimal num. of chords for par.*/
67
+#define HAG_KW_MIN_COSTS      16300        /* minimal costs for which to par.*/
68
+#define HAG_KW_PAR_COSTS      308          /* weight of ctrl. par. costs     */
69
+#define HAG_KW_CPU_RATING     10           /* threshold for assigning a cpu  */
70
+
71
+
72
+/* -------- (postprocessing of control parameters) ------------------------- */
73
+#define HAG_PAR_NOCT          1            /* no need of ctrl. par. postproc.*/
74
+                                           /* =>adopt par. of 1. H. thread   */
75
+#define HAG_PAR_TUCT_ADD      2            /* add ctrl. par.s ;       tuple  */
76
+#define HAG_PAR_CHCT_ADD      4            /* add ctrl. par.s ;       channel*/
77
+                                           /* (must be 2*HAG_PAR_TUCT_ADD)   */
78
+#define HAG_PAR_RECT_ADD      8            /* add ctrl. par.s ;       res.de.*/
79
+                                           /* (must be 4*HAG_PAR_TUCT_ADD)   */
80
+#define HAG_PAR_TUCT_MIN      16           /* minimum of ctrl. par.s; tuple  */
81
+#define HAG_PAR_CHCT_MIN      32           /* minimum of ctrl. par.s; channel*/
82
+#define HAG_PAR_RECT_MIN      64           /* minimum of ctrl. par.s; res.de.*/
83
+#define HAG_PAR_TUCT_MAX      128          /* maximum of ctrl. par.s; tuple  */
84
+#define HAG_PAR_CHCT_MAX      256          /* maximum of ctrl. par.s; channel*/
85
+#define HAG_PAR_RECT_MAX      512          /* maximum of ctrl. par.s; res.de.*/
86
+#define HAG_PAR_TUCT_CON      1024         /* concatenate ctrl. par.s;tuple  */
87
+#define HAG_PAR_CHCT_CON      2048         /* concatenate ctrl. par.s;channel*/
88
+#define HAG_PAR_RECT_CON      4096         /* concatenate ctrl. par.s;res.de.*/
89
+                                           /* ATTENTION: the difference in   */
90
+                                           /* the codes for tuples/channels/ */
91
+                                           /* resources must always show the */
92
+                                           /* above scheme of *2 and *4!     */
93
+                                           /* Because this is used in the    */
94
+                                           /* HAgent-source code; e.g.:      */
95
+                                           /* HAG_PAR_CHCT_MIN is assumed to */
96
+                                           /* be HAG_PAR_TUCT_MIN*2          */
97
+#define HAG_PAR_TUCT          1170         /* postprocess ctrl. par.; tuple  */
98
+/* remark: this is a shortcut for: HAG_PAR_TUCT_ADD | HAG_PAR_TUCT_MIN |     */
99
+/*                                 HAG_PAR_TUCT_MAX | HAG_PAR_TUCT_CON       */
100
+#define HAG_PAR_CHCT          2340         /* postprocess ctrl. par.; channel*/
101
+                                           /* (must be 2*HAG_PAR_TUCT)       */
102
+#define HAG_PAR_RECT          4680         /* postprocess ctrl. par.; res.de.*/
103
+                                           /* (must be 4*HAG_PAR_TUCT)       */
104
+
105
+/* -------- (postprocessing of domains/region components of output objects)  */
106
+#define HAG_PAR_REG_NONE      0            /* no post processing             */
107
+#define HAG_PAR_REG_CONSI     (1<<0)       /* concatenation of (disjuntive)  */
108
+                                           /* result regions for single      */
109
+                                           /* input iconic parameter         */
110
+#define HAG_PAR_REG_CONMU     (1<<1)       /* concatenation of (disjuntive)  */
111
+                                           /* result regions for multiple    */
112
+                                           /* input iconic parameters        */
113
+#define HAG_PAR_REG_CONMAN    (1<<2)       /* manual concatenation of        */
114
+                                           /* result regions for multiple    */
115
+                                           /* input iconic parameters        */
116
+                                           /* Use HAG_PAR_REG_CONMAN if your */
117
+                                           /* the output region is variable, */
118
+                                           /* and not dependent on the input */
119
+                                           /* iconic parameters              */
120
+
121
+/* -------- (task-/operator-/thread-parallelization; chances and states) --- */
122
+/* -------- (and postprocessing of control parameters) --------------------- */
123
+/* The following constants symbolize different methods of parallelization.   */
124
+/* Their values are built up according to the following rules:               */
125
+/*     Bit  0   signals multithreading ability (see HAG_PAR_MT)              */
126
+/*     Bits 1-6 signal which method of parallelization can be used:          */
127
+#define HAG_PAR_SEQ           0            /* all operators are called       */
128
+                                           /* sequentially => no need of     */
129
+                                           /* synchronization; no automatic  */
130
+                                           /* parallelization                */
131
+#define HAG_PAR_MT            (1<<0)       /* "multithreading" context;      */
132
+                                           /* operators may called in        */
133
+                                           /* parallel use synchronization   */
134
+                                           /* mechanisms for reentrancy,     */
135
+                                           /* but don't use automatic par.   */
136
+#define HAG_PAR_FORCE         (1<<1)       /* force parallelization if 
137
+                                            * supported */
138
+#define HAG_PAR_NONE          (1<<2)       /* no parallelization 'lucrative' */
139
+                                           /* is set explicitely, if the 
140
+                                            * hardware/operator training 
141
+                                            * showed that the processing does 
142
+                                            * not speed up by parallelization*/
143
+#define HAG_PAR_TUPL          (1<<5)       /* tuple parallelization possible */
144
+#define HAG_PAR_CHNL          (1<<6)       /* channel paralleli. is possible */
145
+#define HAG_PAR_RESC          (1<<7)       /* resource decomposition possible*/
146
+#define HAG_PAR_REIF          (1<<8)       /* res. dec. at image filtering   */
147
+#define HAG_PAR_PART          (1<<9)    /* partial automatic parallelization: 
148
+                                         * an operator is parallelized 
149
+                                         * manually within the hlib */
150
+#define HAG_PAR_PAIF          (1<<10)   /* internal domain parallelization */
151
+
152
+
153
+/* constants for describing the overall processing context:                  */
154
+#define HAG_PAR_SPLIT_NONE    0
155
+#define HAG_PAR_SPLIT_DOMAIN  (HAG_PAR_RESC|HAG_PAR_REIF)
156
+  /* ^domain parallelization */
157
+#define HAG_PAR_INTERFACE     (HAG_PAR_TUPL|HAG_PAR_CHNL|HAG_PAR_REIF)
158
+  /* ^parallelization by interface */
159
+#define HAG_PAR_INTERNAL      (HAG_PAR_PART|HAG_PAR_PAIF)
160
+  /* ^manual, internal parallelization */
161
+#define HAG_PAR_ALL       (HAG_PAR_TUPL|HAG_PAR_CHNL|HAG_PAR_RESC|HAG_PAR_REIF|HAG_PAR_PART|HAG_PAR_PAIF)
162
+
163
+/* remark: all following "TRUE" values (!=0) mean in any case that HALCON    */
164
+/* works in a parallel manner and needs synchronization mechanisms           */
165
+#define HAG_PAR_TUPL_MT      ( HAG_PAR_TUPL | HAG_PAR_MT)
166
+#define HAG_PAR_CHNL_MT      ( HAG_PAR_CHNL | HAG_PAR_MT)
167
+#define HAG_PAR_RESC_MT      ( HAG_PAR_RESC | HAG_PAR_MT)
168
+#define HAG_PAR_REIF_MT      ( HAG_PAR_REIF | HAG_PAR_MT)
169
+#define HAG_PAR_DOM_MT       ( HAG_PAR_REIF_MT | HAG_PAR_RESC_MT)
170
+#define HAG_PAR_PART_MT      ( HAG_PAR_PART | HAG_PAR_MT)
171
+#define HAG_PAR_PAIF_MT      ( HAG_PAR_PAIF | HAG_PAR_MT)
172
+
173
+#define HAG_PAR_DPAR_MT      ( HAG_PAR_TUPL_MT|HAG_PAR_CHNL_MT|\
174
+                               HAG_PAR_RESC_MT|HAG_PAR_REIF_MT|\
175
+                               HAG_PAR_PART_MT|HAG_PAR_PAIF_MT)
176
+                                           /* "multithreading" context (see  */
177
+                                           /* above) AND use automatic       */
178
+                                           /* data parallelization for       */
179
+                                           /* processing operators (default) */
180
+
181
+                                          /* tuple & channel p. & res. dec. */
182
+/*     Bits 8-23 currently not used                                          */
183
+/* #define                    128           *                                */
184
+/* #define                    256           *                                */
185
+/* #define                    512           *                                */
186
+/* #define                    1024          *                                */
187
+/* #define                    2048          *                                */
188
+/* #define                    4096          *                                */
189
+/* #define                    8192          *                                */
190
+/* #define                    16384         *                                */
191
+/* #define                    32768         *                                */
192
+/* #define                    65536         *                                */
193
+/* #define                    131072        *                                */
194
+/* #define                    262144        *                                */
195
+/* #define                    524288        *                                */
196
+/* #define                    1048576       *                                */
197
+/* #define                    2097152       *                                */
198
+/* #define                    4194304       *                                */
199
+/*     Bits 24-31 signal which parallelization steps have already been       */
200
+/*     done for the actual task/operator/thread:                             */
201
+#define HAG_PAR_TUPLED        (1<<24)      /* tuple parallelized             */
202
+#define HAG_PAR_CHNLED        (1<<25)      /* channel parallelized           */
203
+#define HAG_PAR_RESCED        (1<<26)      /* resources already decomposed   */
204
+#define HAG_PAR_REIFED        (1<<27)      /* res. decom. at image filtering */
205
+
206
+/*--------------------    Compute Device constants      ---------------------*/
207
+#define  COMPUTE_DEVICE_NONE    0
208
+#define  COMPUTE_DEVICE_OpenCL  1
209
+
210
+/* H_OPERATOR_INFO.compute_device bit field defines */
211
+#define  COMPUTE_DEVICE_BIT_NONE     0
212
+#define  COMPUTE_DEVICE_BIT_OpenCL   (1<<(COMPUTE_DEVICE_OpenCL))
213
+
214
+#if defined(__cplusplus)
215
+}
216
+#endif
217
+
218
+#endif

文件差异内容过多而无法显示
+ 3870 - 0
3rdparty/include22/halcon/HProto.h


+ 93 - 0
3rdparty/include22/halcon/HVersNum.h

@@ -0,0 +1,93 @@
1
+/*****************************************************************************
2
+ * HVersNum.h
3
+ *****************************************************************************
4
+ *
5
+ * Project:     HALCON/libhalcon
6
+ * Description: Current version of the HALCON library
7
+ *
8
+ * (c) 1996-2020 by MVTec Software GmbH
9
+ *                  www.mvtec.com
10
+ *
11
+ *****************************************************************************/
12
+
13
+#ifndef HLIB_MAJOR_NUM
14
+# define HLIB_MAJOR_NUM         20
15
+#endif
16
+
17
+#ifndef HLIB_MINOR_NUM
18
+# define HLIB_MINOR_NUM         11
19
+#endif
20
+
21
+#ifndef HLIB_REVISION_NUM
22
+# define HLIB_REVISION_NUM       0
23
+#endif
24
+
25
+#ifndef HLIB_BUILD_NUM
26
+# define HLIB_BUILD_NUM          0
27
+#endif
28
+
29
+
30
+#ifndef HLIB_PRODUCT_VERSION
31
+/* major_number.minor_number.maintenance_number.build_number */
32
+# define HLIB_PRODUCT_VERSION   HVERSNUM_STR(HLIB_MAJOR_NUM) "."        \
33
+  HVERSNUM_STR(HLIB_MINOR_NUM) "." HVERSNUM_STR(HLIB_REVISION_NUM)      \
34
+    "." HVERSNUM_STR(HLIB_BUILD_NUM)
35
+#endif
36
+
37
+#ifndef HLIB_FILE_VERSION
38
+# define HLIB_FILE_VERSION  HLIB_PRODUCT_VERSION
39
+#endif
40
+
41
+#if HLIB_REVISION_NUM == 0
42
+# define HC_PROGRESS_EDITION
43
+# define HALCON_PRODUCT_NAME "HALCON Progress Edition"
44
+#else
45
+# define HALCON_PRODUCT_NAME "HALCON Steady Edition"
46
+#endif
47
+
48
+/* --- Derived version numbers (with according helper macros) --- */
49
+#ifndef HVERSNUM_STR
50
+# define HVERSNUM_STR(S) HVERSNUM_STRX(S)
51
+# define HVERSNUM_STRX(S) #S
52
+#endif
53
+
54
+#ifndef HVERSNUM_GLUE
55
+# define HVERSNUM_GLUE(A,B)  HVERSNUM_GLUEX(A,B)
56
+# define HVERSNUM_GLUEX(A,B) A ## B
57
+#endif
58
+
59
+#ifndef HLIB_VERSION
60
+# define HLIB_VERSION       HVERSNUM_STR(HLIB_MAJOR_NUM) "." HVERSNUM_STR(HLIB_MINOR_NUM)
61
+#endif
62
+
63
+#ifndef HLIB_HEX_VERSION
64
+# define HLIB_HEX_VERSION    (((HLIB_MAJOR_NUM)<<8) + ((HLIB_MINOR_NUM)<<0))
65
+#endif
66
+
67
+#ifndef HLIB_VERSION_NUM
68
+/* deprecated: */
69
+# define HLIB_VERSION_NUM        HVERSNUM_GLUE(HLIB_MAJOR_NUM,HVERSNUM_GLUE(.,HLIB_MINOR_NUM))
70
+#endif
71
+
72
+
73
+#ifndef HLIB_REVISION
74
+# if HLIB_REVISION_NUM > 0
75
+#  define HLIB_REVISION         HVERSNUM_STR(HLIB_REVISION_NUM)
76
+# else
77
+
78
+#  define HLIB_REVISION         ""
79
+# endif
80
+#endif
81
+
82
+
83
+#ifndef HALCON_VERSION
84
+# define HALCON_VERSION(major,minor,revision)   \
85
+  HALCON_VERSIONX(major,minor,revision)
86
+# define HALCON_VERSIONX(major,minor,revision)  \
87
+  (((major)<<16) + ((minor)<<8) + (revision))
88
+#endif
89
+
90
+#ifndef HALCON_VERSION_CODE
91
+# define HALCON_VERSION_CODE  HALCON_VERSION(HLIB_MAJOR_NUM,HLIB_MINOR_NUM,\
92
+                                             HLIB_REVISION_NUM)
93
+#endif

+ 40 - 0
3rdparty/include22/halcon/Halcon.h

@@ -0,0 +1,40 @@
1
+/*****************************************************************************
2
+ * Halcon.h
3
+ *****************************************************************************
4
+ *
5
+ * Project:      HALCON/HLib
6
+ * Description:  Includes all header files for HALCON library
7
+ *
8
+ * (c) 1996-2020 by MVTec Software GmbH
9
+ *                  www.mvtec.com
10
+ *
11
+ *****************************************************************************/
12
+
13
+#ifndef HALCON_H
14
+#define HALCON_H
15
+
16
+/* needed system includes */
17
+#include <math.h>
18
+#include <stdio.h>
19
+#include <string.h>
20
+#include <time.h>
21
+
22
+#include "HVersNum.h"
23
+#include "HIntDef.h"
24
+#include "HDeclSpec.h"
25
+#include "HErrorDef.h"
26
+#include "HConst.h"
27
+#include "HBase.h"
28
+#include "IPType.h"
29
+#include "HParallel.h"
30
+#include "hlib/HAlloc.h"
31
+#include "HMacro.h"
32
+#include "HExtern.h"
33
+#include "hlib/HBaseGP.h"
34
+#include "hlib/IOSpy.h"
35
+#include "hlib/HInstance.h"
36
+#include "hlib/DBNew.h"
37
+#include "hlib/CORE1.h"
38
+#include "hlib/HXLD.h"
39
+#include "hlib/HError.h"
40
+#endif

+ 27 - 0
3rdparty/include22/halcon/HalconC.h

@@ -0,0 +1,27 @@
1
+/*****************************************************************************
2
+ * HalconC.h
3
+ *****************************************************************************
4
+ *
5
+ * Project:     HALCON/libhalcon
6
+ * Description: Defines, types, and declarations for HALCON/C
7
+ *
8
+ * (c) 1996-2020 by MVTec Software GmbH
9
+ *                  www.mvtec.com
10
+ *
11
+ ****************************************************************************/
12
+
13
+#ifndef HALCON_C_H
14
+#define HALCON_C_H
15
+
16
+
17
+#include "HalconCDefs.h"
18
+#include "HInterfaceC.h"
19
+#include "halconc/Hvector.h"  /* HALCON/C vector implementation */
20
+
21
+/*
22
+ * generated prototypes for all HALCON operators
23
+ *--------------------------------------------------------------------------*/
24
+#include "HProto.h"
25
+
26
+
27
+#endif

+ 544 - 0
3rdparty/include22/halcon/HalconCDefs.h

@@ -0,0 +1,544 @@
1
+/*****************************************************************************
2
+ * HalconCDefs.h
3
+ *****************************************************************************
4
+ *
5
+ * Project:     HALCON/libhalcon
6
+ * Description: Defines, types, and declarations for HALCON/C
7
+ *
8
+ * (c) 1996-2020 by MVTec Software GmbH
9
+ *                  www.mvtec.com
10
+ *
11
+ ****************************************************************************/
12
+
13
+#ifndef HALCON_C_DEFS_H
14
+#define HALCON_C_DEFS_H
15
+
16
+#include "HParallel.h"
17
+#include "HIntDef.h"
18
+#include "HDeclSpec.h"
19
+#include "HErrorDef.h"
20
+#include "HConst.h"
21
+#include "HBase.h"
22
+#include "IPType.h"
23
+#include "HMacro.h"
24
+#include "HExtern.h"
25
+
26
+#include <string.h>
27
+
28
+#define     UNDEF_TYPE  (-1)  /* Type after deleting a tuple               */
29
+                              /* instead of STRING_PAR, INT_PAR, etc       */
30
+
31
+/*
32
+ * Data of type Hobject is a pointer into the HALCON object data base.
33
+ * Thus it has to be treated as a magic number and must not be changed
34
+ * by the user.
35
+ */
36
+typedef Hkey     Hobject;      /* Pointer to HALCON iconic data            */
37
+
38
+
39
+/*
40
+ * The data structure Htuple is used to pass control data to the
41
+ * HALCON operators and get various kinds to non iconic data back
42
+ * to the application.
43
+ * Creating, access and deletion must only be done with the
44
+ * supplied procedures. For global, static initialization, the
45
+ * HTUPLE_INITIALIZER  macro is provided.
46
+ */
47
+typedef Hctuple Htuple;
48
+#define HTUPLE_INITIALIZER HCTUPLE_INITIALIZER
49
+
50
+
51
+/*
52
+ * Constants
53
+ */
54
+#ifdef HC_LEGACY_PAR
55
+#define _                 (Hlong*)0      /* anonyme Variable               */
56
+#define _i                (Hlong*)0      /* anonyme Variable (long)        */
57
+#define _d                (double*)0     /* anonyme Variable (double)      */
58
+#define _s                (char*)0       /* anonyme Variable (string)      */
59
+#define _t                (Htuple*)0     /* anonyme Variable (Tupel)       */
60
+#endif
61
+
62
+#define HALCONC_HNULL     ((Hphandle)0)  /* undefined handle               */
63
+
64
+#define NO_OBJECTS        (Hobject)(1)   /* leere Objektliste          */
65
+#define EMPTY_REGION      (Hobject)(2)   /* Objekt mit leerer Region   */
66
+#if 0
67
+#define FULL_REGION       (Hobject)(3)   /* Objekt mit maximaler Region*/
68
+#endif
69
+
70
+
71
+#if defined(__cplusplus)
72
+extern "C" {
73
+#endif
74
+
75
+LIntExport void SetHcInterfaceStringEncodingIsUtf8(int is_utf8);
76
+LIntExport int  IsHcInterfaceStringEncodingUtf8();
77
+
78
+
79
+LIntExport void* CMalloc(size_t size, const char* file, INT4_8 line);
80
+LIntExport void  CFree(void* mem, const char* file, INT4_8 line);
81
+
82
+/* HALCON/C interface utility functions */
83
+
84
+LIntExport void  Mcreate_tuple(Htuple* t, Hlong l, char const* file, int line);
85
+LIntExport void  Mcreate_tuple_type(Htuple* t, Hlong l, int type,
86
+                                    char const* file, int line);
87
+LIntExport void  Mcopy_tuple(Htuple const* input, Htuple* output,
88
+                             char const* file, int line);
89
+LIntExport void  Mattach_tuple(Htuple* H_RESTRICT src, Htuple* H_RESTRICT dest,
90
+                               char const* file, int line);
91
+LIntExport void  Mresize_tuple(Htuple* input, Hlong LEN, char const* file,
92
+                               int line);
93
+LIntExport void  Mdestroy_tuple(Htuple* t, char const* file, int line);
94
+LIntExport Hlong Mlength_tuple(Htuple const* t, char const* file, int line);
95
+LIntExport void  Mset_i(Htuple* t, Hlong v, Hlong i, char const* file,
96
+                        int line);
97
+LIntExport void  Mset_d(Htuple* t, double v, Hlong i, char const* file,
98
+                        int line);
99
+LIntExport void  Mset_s(Htuple* t, char const* v, Hlong i, const char* file,
100
+                        int line);
101
+LIntExport void  Mset_s_from_utf8(Htuple* t, char const* v, Hlong i,
102
+                                  const char* file, int line);
103
+LIntExport void  Mset_s_from_local8bit(Htuple* t, char const* v, Hlong i,
104
+                                       const char* file, int line);
105
+#ifdef _WIN32
106
+LIntExport void  Mset_s_from_wcs(Htuple* t, wchar_t const* v, Hlong i,
107
+                                 const char* file, int line);
108
+#endif
109
+LIntExport void  Mset_s_len(Htuple* t, Hlong len, Hlong i, char const* file,
110
+                            int line);
111
+
112
+LIntExport void  Mset_h(Htuple* t, Hphandle v, Hlong i, const char* file,
113
+                        int line);
114
+LIntExport Hlong  Mget_i(Htuple const* t, Hlong i, char const* file, int line);
115
+LIntExport double Mget_d(Htuple const* t, Hlong i, char const* file, int line);
116
+LIntExport char const* Mget_s(Htuple const* t, Hlong i, char const* file,
117
+                              int line);
118
+
119
+LIntExport Hlong Mget_s_to_utf8(char* dest, Hlong dest_size, Htuple const* t,
120
+                                Hlong i, char const* file, int line);
121
+LIntExport Hlong Mget_s_to_local8bit(char* dest, Hlong dest_size,
122
+                                     Htuple const* t, Hlong i,
123
+                                     char const* file, int line);
124
+#ifdef _WIN32
125
+LIntExport Hlong Mget_s_to_wcs(wchar_t* dest, Hlong dest_size, Htuple const* t,
126
+                               Hlong i, char const* file, int line);
127
+#endif
128
+
129
+LIntExport Hphandle Mget_h(Htuple const* t, Hlong i, char const* file,
130
+                           int line);
131
+LIntExport int Mget_type(Htuple const* t, Hlong i, char const* file, int line);
132
+
133
+/* functions combining (re)creation and one value setting */
134
+LIntExport void Mcreate_tuple_i(Htuple* t, Hlong value, char const* file,
135
+                                int line);
136
+LIntExport void Mcreate_tuple_d(Htuple* t, double value, char const* file,
137
+                                int line);
138
+LIntExport void Mcreate_tuple_s(Htuple* t, char const* value, char const* file,
139
+                                int line);
140
+LIntExport void Mcreate_tuple_s_from_utf8(Htuple* t, char const* value,
141
+                                          char const* file, int line);
142
+LIntExport void Mcreate_tuple_s_from_local8bit(Htuple* t, char const* value,
143
+                                               char const* file, int line);
144
+#ifdef _WIN32
145
+LIntExport void Mcreate_tuple_s_from_wcs(Htuple* t, wchar_t const* value,
146
+                                         char const* file, int line);
147
+#endif
148
+LIntExport void Mcreate_tuple_h(Htuple* t, Hphandle value, char const* file,
149
+                                int line);
150
+LIntExport void Mreuse_tuple_i(Htuple* t, Hlong value, char const* file,
151
+                               int line);
152
+LIntExport void Mreuse_tuple_d(Htuple* t, double value, char const* file,
153
+                               int line);
154
+LIntExport void Mreuse_tuple_s(Htuple* t, char const* value, char const* file,
155
+                               int line);
156
+LIntExport void Mreuse_tuple_s_from_utf8(Htuple* t, char const* value,
157
+                                         char const* file, int line);
158
+LIntExport void Mreuse_tuple_s_from_local8bit(Htuple* t, char const* value,
159
+                                              char const* file, int line);
160
+#ifdef _WIN32
161
+LIntExport void Mreuse_tuple_s_from_wcs(Htuple* t, wchar_t const* value,
162
+                                        char const* file, int line);
163
+#endif
164
+LIntExport void Mreuse_tuple_h(Htuple* t, Hphandle value, char const* file,
165
+                               int line);
166
+
167
+
168
+LIntExport void F_create_tuple_type(Htuple* H_RESTRICT htuple, Hlong len,
169
+                                    HINT type);
170
+LIntExport void F_create_tuple(Htuple* H_RESTRICT htuple, Hlong l);
171
+LIntExport void F_copy_tuple(Htuple const* H_RESTRICT in,
172
+                             Htuple* H_RESTRICT out);
173
+LIntExport void F_attach_tuple(Htuple* H_RESTRICT src,
174
+                               Htuple* H_RESTRICT dest);
175
+LIntExport void F_resize_tuple(Htuple* H_RESTRICT htuple, Hlong LEN);
176
+LIntExport void F_destroy_tuple(Htuple* H_RESTRICT htuple);
177
+LIntExport void F_set_i(Htuple* H_RESTRICT t, Hlong value, Hlong idx);
178
+LIntExport void F_set_d(Htuple* H_RESTRICT t, double value, Hlong idx);
179
+LIntExport void F_set_s(Htuple* H_RESTRICT t, char const* H_RESTRICT val,
180
+                        Hlong idx);
181
+LIntExport void F_set_s_from_utf8(Htuple* H_RESTRICT t,
182
+                                  char const* H_RESTRICT val, Hlong idx);
183
+LIntExport void F_set_s_from_local8bit(Htuple* H_RESTRICT t,
184
+                                       char const* H_RESTRICT val, Hlong idx);
185
+#ifdef _WIN32
186
+LIntExport void F_set_s_from_wcs(Htuple* H_RESTRICT t,
187
+                                 wchar_t const* H_RESTRICT val, Hlong idx);
188
+#endif
189
+LIntExport void F_set_h(Htuple* H_RESTRICT t, Hphandle val, Hlong idx);
190
+
191
+LIntExport void F_init_i(Htuple* H_RESTRICT t, Hlong value, Hlong idx);
192
+LIntExport void F_init_d(Htuple* H_RESTRICT t, double value, Hlong idx);
193
+LIntExport void F_init_s(Htuple* H_RESTRICT t, char const* H_RESTRICT value,
194
+                         Hlong idx);
195
+LIntExport void F_init_s_from_utf8(Htuple* H_RESTRICT t,
196
+                                   char const* H_RESTRICT value, Hlong idx);
197
+LIntExport void F_init_s_from_local8bit(Htuple* H_RESTRICT t,
198
+                                        char const* H_RESTRICT value,
199
+                                        Hlong                  idx);
200
+#ifdef _WIN32
201
+LIntExport void F_init_s_from_wcs(Htuple* H_RESTRICT t,
202
+                                  wchar_t const* H_RESTRICT value, Hlong idx);
203
+#endif
204
+LIntExport void F_init_s_len(Htuple* H_RESTRICT t, Hlong len, Hlong idx);
205
+LIntExport void F_init_h(Htuple* H_RESTRICT t, Hphandle value, Hlong idx);
206
+
207
+LIntExport Hlong       F_get_i(Htuple const* H_RESTRICT t, Hlong idx);
208
+LIntExport double      F_get_d(Htuple const* H_RESTRICT t, Hlong idx);
209
+LIntExport char const* F_get_s(Htuple const* H_RESTRICT t, Hlong idx);
210
+LIntExport Hlong F_get_s_to_utf8(char* dest, Hlong dest_size,
211
+                                 Htuple const* H_RESTRICT t, Hlong i);
212
+LIntExport Hlong F_get_s_to_local8bit(char* dest, Hlong dest_size,
213
+                                      Htuple const* H_RESTRICT t, Hlong i);
214
+#ifdef _WIN32
215
+LIntExport Hlong F_get_s_to_wcs(wchar_t* dest, Hlong dest_size,
216
+                                Htuple const* H_RESTRICT t, Hlong i);
217
+#endif
218
+LIntExport Hphandle F_get_h(Htuple const* H_RESTRICT t, Hlong idx);
219
+
220
+
221
+/* functions combining (re)creation and one value setting */
222
+LIntExport void F_create_tuple_i(Htuple* H_RESTRICT t, Hlong val);
223
+LIntExport void F_create_tuple_d(Htuple* H_RESTRICT t, double val);
224
+LIntExport void F_create_tuple_s(Htuple* H_RESTRICT t, char const* val);
225
+LIntExport void F_create_tuple_s_from_utf8(Htuple* H_RESTRICT t,
226
+                                           char const*        val);
227
+LIntExport void F_create_tuple_s_from_local8bit(Htuple* H_RESTRICT t,
228
+                                                char const*        val);
229
+#ifdef _WIN32
230
+LIntExport void F_create_tuple_s_from_wcs(Htuple* H_RESTRICT t,
231
+                                          wchar_t const*     val);
232
+#endif
233
+LIntExport void F_create_tuple_h(Htuple* H_RESTRICT t, Hphandle val);
234
+
235
+LIntExport void F_reuse_tuple_i(Htuple* H_RESTRICT t, Hlong val);
236
+LIntExport void F_reuse_tuple_d(Htuple* H_RESTRICT t, double val);
237
+LIntExport void F_reuse_tuple_s(Htuple* H_RESTRICT t,
238
+                                char const* H_RESTRICT val);
239
+LIntExport void F_reuse_tuple_s_from_utf8(Htuple* H_RESTRICT t,
240
+                                          char const* H_RESTRICT val);
241
+LIntExport void F_reuse_tuple_s_from_local8bit(Htuple* H_RESTRICT t,
242
+                                               char const* H_RESTRICT val);
243
+#ifdef _WIN32
244
+LIntExport void F_reuse_tuple_s_from_wcs(Htuple* H_RESTRICT t,
245
+                                         wchar_t const* H_RESTRICT val);
246
+#endif
247
+LIntExport void F_reuse_tuple_h(Htuple* H_RESTRICT t, Hphandle val);
248
+
249
+
250
+/* new generic HALCON operator call style:
251
+ * - the operator is called by an id that is returned by get_operator_id;
252
+ *    attention: this id may differ for different HALCON versions
253
+ * - the tuple arrays are passed directly to the call -> this method is
254
+ *   thread safe
255
+ *---------------------------------------------------------------------------*/
256
+LIntExport int    get_operator_id(char const* name);
257
+LIntExport Herror T_call_halcon_by_id(int id, Hobject const in_objs[],
258
+                                      Hobject      out_objs[],
259
+                                      Htuple const in_ctrls[],
260
+                                      Htuple       out_ctrls[]);
261
+
262
+/* old generic HALCON operator call style (legacy)
263
+ * the parameters are set befor calling T_call_halcon with set_*_[t|o]par
264
+ * this approach is not thread safe without additional synchronisation
265
+ *---------------------------------------------------------------------------*/
266
+LIntExport void   set_in_tpar(Htuple* t, int i);
267
+LIntExport void   set_out_tpar(Htuple* t, int i);
268
+LIntExport void   set_in_opar(Hobject o, int i);
269
+LIntExport void   set_out_opar(Hobject* o, int i);
270
+LIntExport Herror T_call_halcon(const char* n);
271
+
272
+/* obsolete method, kept inside for compatibility reasons, returns always 0
273
+ *---------------------------------------------------------------------------*/
274
+LIntExport Hlong num_tuple(void);
275
+
276
+/*
277
+ * The following functions can be used to emulate the behavior of
278
+ * HDevelop graphics windows for HALCON graphics windows. They are primarily
279
+ * intended for usage in C programs exported from HDevelop programs containing
280
+ * HDevelop window operators (e.g. dev_set_window, dev_open_window,
281
+ * dev_close_window...). On multithreaded systems, every thread has its own
282
+ * graphics windows stack.
283
+ *---------------------------------------------------------------------------*/
284
+LIntExport void hdev_window_stack_push(const Htuple win_handle);
285
+LIntExport void hdev_window_stack_pop(Htuple* win_handle);
286
+LIntExport void hdev_window_stack_get_active(Htuple* win_handle);
287
+LIntExport void hdev_window_stack_set_active(const Htuple win_handle);
288
+LIntExport int  hdev_window_stack_is_open(void);
289
+LIntExport void hdev_window_stack_close_all(void);
290
+
291
+/*
292
+ * The following functions are kept for downward compatibility only.
293
+ * DO NOT USE !!!
294
+ * Use the hdev_window_stack_... functions instead !
295
+ *---------------------------------------------------------------------------*/
296
+LIntExport void  window_stack_push(Hlong win_handle);
297
+LIntExport Hlong window_stack_pop(void);
298
+LIntExport Hlong window_stack_get_active(void);
299
+LIntExport void  window_stack_set_active(Hlong win_handle);
300
+LIntExport int   window_stack_is_open(void);
301
+LIntExport void  window_stack_close_all(void);
302
+
303
+/* Used in C programs exported from HDevelop */
304
+LIntExport Herror replace_elements(Htuple* htuple, Htuple* index,
305
+                                   Htuple const* replace_val);
306
+
307
+#if defined(__cplusplus)
308
+}
309
+#endif
310
+
311
+#if !defined(H_NO_INLINE) && !defined(H_INLINE)
312
+#  define H_NO_INLINE
313
+#endif
314
+
315
+
316
+/*
317
+ * Short versions for the tuple operators
318
+ */
319
+#ifndef HC_HIDE_SHORT_VERSIONS
320
+    #define CT(TUP,LEN)              create_tuple(TUP,LEN)
321
+    #define CPT(TUP,Out)             copy_tuple(TUP,Out)
322
+    #define RT(TUP,LEN)              resize_tuple(TUP,LEN)
323
+    #define DT(TUP)                  destroy_tuple(TUP)
324
+    #define LT(TUP)                  length_tuple(TUP)
325
+    #define SS(TUP,VAL,IDX)          set_s(TUP,VAL,IDX)
326
+    #define SS_U8(TUP,VAL,IDX)       set_s_from_utf8(TUP,VAL,IDX)
327
+    #define SS_LOC(TUP,VAL,IDX)      set_s_from_local8bit(TUP,VAL,IDX)
328
+    #ifdef _WIN32
329
+    #define SS_W(TUP,VAL,IDX)        set_s_from_wcs(TUP,VAL,IDX)
330
+    #endif
331
+    #define SI(TUP,VAL,IDX)          set_i(TUP,VAL,IDX)
332
+    #define SD(TUP,VAL,IDX)          set_d(TUP,VAL,IDX)
333
+    #define SH(TUP,VAL,IDX)          set_h(TUP,VAL,IDX)
334
+    #define GS(TUP,IDX)              get_s(TUP,IDX)
335
+    #define GS_U8(BUF,SIZE,TUP,IDX)  get_s_to_utf8(BUF,SIZE,TUP,IDX)
336
+    #define GS_LOC(BUF,SIZE,TUP,IDX) get_s_to_local8bit(BUF,SIZE,TUP,IDX)
337
+    #ifdef _WIN32
338
+    #define GS_W(BUF,SIZE,TUP,IDX)   get_s_to_wcs(BUF,SIZE,TUP,IDX)
339
+    #endif
340
+    #define GI(TUP,IDX)              get_i(TUP,IDX)
341
+    #define GD(TUP,IDX)              get_d(TUP,IDX)
342
+    #define GH(TUP,IDX)              get_h(TUP,IDX)
343
+    #define GT(TUP,IDX)              get_type(TUP,IDX)
344
+
345
+    #define TC(PROC_NAME)            T_call_halcon(PROC_NAME)
346
+    #define IT(TUP,NUM)              set_in_tpar(&(TUP),NUM)
347
+    #define OT(TUP,NUM)              set_out_tpar(TUP,NUM)
348
+    #define IO(OBJ,NUM)              set_in_opar(OBJ,NUM)
349
+    #define OO(OBJ,NUM)              set_out_opar(OBJ,NUM)
350
+#endif
351
+
352
+#ifdef HC_FAST /* Compiler option for tested programs */
353
+
354
+
355
+#  define C_TUPLE_IDX_TYPE(PCTUPLE, IDX)                                      \
356
+    ((MIXED_PAR != (PCTUPLE)->type)                                           \
357
+         ? (PCTUPLE)->type                                                    \
358
+         : (IDX < (PCTUPLE)->num) ? (PCTUPLE)->elem.cpar[IDX].type            \
359
+                                  : UNDEF_PAR)
360
+
361
+#  define length_tuple(TUP) ((TUP).num)
362
+#  define get_type(TUP, IDX) (C_TUPLE_IDX_TYPE(&(TUP), IDX))
363
+
364
+#  define create_tuple(TUP, LEN) F_create_tuple(TUP, LEN)
365
+#  define create_tuple_type(TUP, LEN, TYP) F_create_tuple_type(TUP, LEN, TYP)
366
+#  define destroy_tuple(TUP) F_destroy_tuple(&(TUP))
367
+#  define copy_tuple(TUP_I, TUP_O) F_copy_tuple(&(TUP_I), TUP_O)
368
+#  define attach_tuple(TUP_S, TUP_D) F_attach_tuple(&(TUP_S), TUP_D)
369
+#  define resize_tuple(TUP, LEN) F_resize_tuple(TUP, LEN)
370
+
371
+#  define create_tuple_i(TUP, VAL) F_create_tuple_i(TUP, VAL)
372
+#  define create_tuple_d(TUP, VAL) F_create_tuple_d(TUP, VAL)
373
+#  define create_tuple_s(TUP, VAL) F_create_tuple_s(TUP, VAL)
374
+#  define create_tuple_s_from_utf8(TUP, VAL)                                  \
375
+    F_create_tuple_s_from_utf8(TUP, VAL)
376
+#  define create_tuple_s_from_local8bit(TUP, VAL)                             \
377
+    F_create_tuple_s_from_local8bit(TUP, VAL)
378
+#  ifdef _WIN32
379
+#    define create_tuple_s_from_wcs(TUP, VAL)                                 \
380
+      F_create_tuple_s_from_wcs(TUP, VAL)
381
+#  endif
382
+#  define create_tuple_h(TUP, VAL) F_create_tuple_h(TUP, VAL)
383
+
384
+#  define reuse_tuple_i(TUP, VAL) F_reuse_tuple_i(TUP, VAL)
385
+#  define reuse_tuple_d(TUP, VAL) F_reuse_tuple_d(TUP, VAL)
386
+#  define reuse_tuple_s(TUP, VAL) F_reuse_tuple_s(TUP, VAL)
387
+#  define reuse_tuple_s_from_utf8(TUP, VAL) F_reuse_tuple_s_from_utf8(TUP, VAL)
388
+#  define reuse_tuple_s_from_local8bit(TUP, VAL)                              \
389
+    F_reuse_tuple_s_from_local8bit(TUP, VAL)
390
+#  ifdef _WIN32
391
+#    define reuse_tuple_s_from_wcs(TUP, VAL) F_reuse_tuple_s_from_wcs(TUP, VAL)
392
+#  endif
393
+#  define reuse_tuple_h(TUP, VAL) F_reuse_tuple_h(TUP, VAL)
394
+
395
+#  define init_i(TUP, VAL, IDX) F_init_i(&(TUP), VAL, IDX)
396
+#  define init_d(TUP, VAL, IDX) F_init_d(&(TUP), VAL, IDX)
397
+#  define init_s(TUP, VAL, IDX) F_init_s(&(TUP), VAL, IDX)
398
+#  define init_s_len(TUP, LEN, IDX) F_init_s_len(&(TUP), LEN, IDX)
399
+#  define init_s_from_utf8(TUP, VAL, IDX) F_init_s_from_utf8(&(TUP), VAL, IDX)
400
+#  define init_s_from_local8bit(TUP, VAL, IDX)                                \
401
+    F_init_s_from_local8bit(&(TUP), VAL, IDX)
402
+#  ifdef _WIN32
403
+#    define init_s_from_wcs(TUP, VAL, IDX) F_init_s_from_wcs(&(TUP), VAL, IDX)
404
+#  endif
405
+#  define init_h(TUP, VAL, IDX) F_init_h(&(TUP), VAL, IDX)
406
+
407
+#  define at_i(TUP, IDX)                                                      \
408
+    ((LONG_PAR == (TUP).type) ? (TUP).elem.l[IDX]                             \
409
+                              : (TUP).elem.cpar[IDX].par.l /*MIXED_PAR*/)
410
+#  define at_d(TUP, IDX)                                                      \
411
+    ((DOUBLE_PAR == (TUP).type) ? (TUP).elem.f[IDX]                           \
412
+                                : (TUP).elem.cpar[IDX].par.f /*MIXED_PAR*/)
413
+#  define at_s(TUP, IDX)                                                      \
414
+    ((char const*const)((STRING_PAR == (TUP).type)                            \
415
+                                ? (TUP).elem.s[IDX]                           \
416
+                                : (TUP).elem.cpar[IDX].par.s /*MIXED_PAR*/)
417
+#  define at_h(TUP, IDX)                                                      \
418
+    ((char const*const)((HANDLE_PAR == (TUP).type)                            \
419
+                                ? (TUP).elem.h[IDX]                           \
420
+                                : (TUP).elem.cpar[IDX].par.h /*MIXED_PAR*/)
421
+
422
+
423
+#  define set_i(TUP, VAL, IDX) F_set_i(&(TUP), VAL, IDX)
424
+#  define set_d(TUP, VAL, IDX) F_set_d(&(TUP), VAL, IDX)
425
+#  define set_s(TUP, VAL, IDX) F_set_s(&(TUP), VAL, IDX)
426
+#  define set_s_from_utf8(TUP, VAL, IDX) F_set_s_from_utf8(&(TUP), VAL, IDX)
427
+#  define set_s_from_local8bit(TUP, VAL, IDX)                                 \
428
+    F_set_s_from_local8bit(&(TUP), VAL, IDX)
429
+#  ifdef _WIN32
430
+#    define set_s_from_wcs(TUP, VAL, IDX) F_set_s_from_wcs(&(TUP), VAL, IDX)
431
+#  endif
432
+#  define set_h(TUP, VAL, IDX) F_set_h(&(TUP), VAL, IDX)
433
+
434
+#  define get_i(TUP, IDX) F_get_i(&(TUP), IDX)
435
+#  define get_d(TUP, IDX) F_get_d(&(TUP), IDX)
436
+#  define get_s(TUP, IDX) F_get_s(&(TUP), IDX)
437
+#  define get_s_to_utf8(BUF, SIZE, TUP, IDX)                                  \
438
+    F_get_s_to_utf8(BUF, SIZE, &(TUP), IDX)
439
+#  define get_s_to_local8bit(BUF, SIZE, TUP, IDX)                             \
440
+    F_get_s_to_local8bit(BUF, SIZE, &(TUP), IDX)
441
+#  ifdef _WIN32
442
+#    define get_s_to_wcs(BUF, SIZE, TUP, IDX)                                 \
443
+      F_get_to_wcs(BUF, SIZE, &(TUP), IDX)
444
+#  endif
445
+#  define get_h(TUP, IDX) F_get_h(&(TUP), IDX)
446
+
447
+
448
+#else /* := #ifndef HC_FAST -> paranoiac version */
449
+
450
+
451
+#  define create_tuple(TUP, LEN) Mcreate_tuple(TUP, LEN, __FILE__, __LINE__)
452
+#  define create_tuple_type(TUP, LEN, TYP)                                    \
453
+    Mcreate_tuple_type(TUP, LEN, TYP, __FILE__, __LINE__)
454
+#  define destroy_tuple(TUP) Mdestroy_tuple(&(TUP), __FILE__, __LINE__)
455
+#  define copy_tuple(TUP_I, TUP_O)                                            \
456
+    Mcopy_tuple(&(TUP_I), TUP_O, __FILE__, __LINE__)
457
+#  define attach_tuple(TUP_S, TUP_D)                                          \
458
+    Mattach_tuple(&(TUP_S), TUP_D, __FILE__, __LINE__)
459
+#  define resize_tuple(TUP, LEN) Mresize_tuple(TUP, LEN, __FILE__, __LINE__)
460
+
461
+#  define length_tuple(TUP) Mlength_tuple(&(TUP), __FILE__, __LINE__)
462
+#  define get_type(TUP, IDX) Mget_type(&(TUP), IDX, __FILE__, __LINE__)
463
+
464
+#  define init_i(TUP, VAL, IDX) Mset_i(&(TUP), VAL, IDX, __FILE__, __LINE__)
465
+#  define init_d(TUP, VAL, IDX) Mset_d(&(TUP), VAL, IDX, __FILE__, __LINE__)
466
+#  define init_s(TUP, VAL, IDX) Mset_s(&(TUP), VAL, IDX, __FILE__, __LINE__)
467
+#  define init_s_len(TUP, LEN, IDX)                                           \
468
+    Mset_s_len(&(TUP), LEN, IDX, __FILE__, __LINE__)
469
+#  define init_s_from_utf8(TUP, VAL, IDX)                                     \
470
+    Minit_s_from_utf8(&(TUP), VAL, IDX, __FILE__, __LINE__)
471
+#  define init_s_from_local8bit(TUP, VAL, IDX)                                \
472
+    Minit_s_from_local8bit(&(TUP), VAL, IDX, __FILE__, __LINE__)
473
+#  ifdef _WIN32
474
+#    define init_s_from_wcs(TUP, VAL, IDX)                                    \
475
+      Minit_s_from_wcs(&(TUP), VAL, IDX, __FILE__, __LINE__)
476
+#  endif
477
+#  define init_h(TUP, VAL, IDX) Mset_h(&(TUP), VAL, IDX, __FILE__, __LINE__)
478
+
479
+#  define set_i(TUP, VAL, IDX) Mset_i(&(TUP), VAL, IDX, __FILE__, __LINE__)
480
+#  define set_d(TUP, VAL, IDX) Mset_d(&(TUP), VAL, IDX, __FILE__, __LINE__)
481
+#  define set_s(TUP, VAL, IDX) Mset_s(&(TUP), VAL, IDX, __FILE__, __LINE__)
482
+#  define set_s_from_utf8(TUP, VAL, IDX)                                      \
483
+    Mset_s_from_utf8(&(TUP), VAL, IDX, __FILE__, __LINE__)
484
+#  define set_s_from_local8bit(TUP, VAL, IDX)                                 \
485
+    Mset_s_from_local8bit(&(TUP), VAL, IDX, __FILE__, __LINE__)
486
+#  ifdef _WIN32
487
+#    define set_s_from_wcs(TUP, VAL, IDX)                                     \
488
+      Mset_s_from_wcs(&(TUP), VAL, IDX, __FILE__, __LINE__)
489
+#  endif
490
+#  define set_h(TUP, VAL, IDX) Mset_h(&(TUP), VAL, IDX, __FILE__, __LINE__)
491
+
492
+#  define get_i(TUP, IDX) Mget_i(&(TUP), IDX, __FILE__, __LINE__)
493
+#  define get_d(TUP, IDX) Mget_d(&(TUP), IDX, __FILE__, __LINE__)
494
+#  define get_s(TUP, IDX) Mget_s(&(TUP), IDX, __FILE__, __LINE__)
495
+#  define get_h(TUP, IDX) Mget_h(&(TUP), IDX, __FILE__, __LINE__)
496
+#  define get_s_to_utf8(BUF, SIZE, TUP, IDX)                                  \
497
+    Mget_s_to_utf8(BUF, SIZE, &(TUP), IDX, __FILE__, __LINE__)
498
+#  define get_s_to_local8bit(BUF, SIZE, TUP, IDX)                             \
499
+    Mget_s_to_local8bit(BUF, SIZE, &(TUP), IDX, __FILE__, __LINE__)
500
+#  ifdef _WIN32
501
+#    define get_s_to_wcs(BUF, SIZE, TUP, IDX)                                 \
502
+      Mget_s_to_wcs(BUF, SIZE, &(TUP), IDX, __FILE__, __LINE__)
503
+#  endif
504
+
505
+#  define at_i(TUP, IDX) Mget_i(&(TUP), IDX, __FILE__, __LINE__)
506
+#  define at_d(TUP, IDX) Mget_d(&(TUP), IDX, __FILE__, __LINE__)
507
+#  define at_s(TUP, IDX) Mget_s(&(TUP), IDX, __FILE__, __LINE__)
508
+#  define at_h(TUP, IDX) Mget_h(&(TUP), IDX, __FILE__, __LINE__)
509
+
510
+#  define create_tuple_i(TUP, VAL)                                            \
511
+    Mcreate_tuple_i(TUP, VAL, __FILE__, __LINE__)
512
+#  define create_tuple_d(TUP, VAL)                                            \
513
+    Mcreate_tuple_d(TUP, VAL, __FILE__, __LINE__)
514
+#  define create_tuple_s(TUP, VAL)                                            \
515
+    Mcreate_tuple_s(TUP, VAL, __FILE__, __LINE__)
516
+#  define create_tuple_h(TUP, VAL)                                            \
517
+    Mcreate_tuple_h(TUP, VAL, __FILE__, __LINE__)
518
+#  define create_tuple_s_from_utf8(TUP, VAL)                                  \
519
+    Mcreate_tuple_s_from_utf8(TUP, VAL, __FILE__, __LINE__)
520
+#  define create_tuple_s_from_local8bit(TUP, VAL)                             \
521
+    Mcreate_tuple_s_from_local8bit(TUP, VAL, __FILE__, __LINE__)
522
+#  ifdef _WIN32
523
+#    define create_tuple_s_from_wcs(TUP, VAL)                                 \
524
+      Mcreate_tuple_s_from_wcs(TUP, VAL, __FILE__, __LINE__)
525
+#  endif
526
+
527
+#  define reuse_tuple_i(TUP, VAL) Mreuse_tuple_i(TUP, VAL, __FILE__, __LINE__)
528
+#  define reuse_tuple_d(TUP, VAL) Mreuse_tuple_d(TUP, VAL, __FILE__, __LINE__)
529
+#  define reuse_tuple_s(TUP, VAL) Mreuse_tuple_s(TUP, VAL, __FILE__, __LINE__)
530
+#  define reuse_tuple_h(TUP, VAL) Mreuse_tuple_h(TUP, VAL, __FILE__, __LINE__)
531
+#  define reuse_tuple_s_from_utf8(TUP, VAL)                                   \
532
+    Mreuse_tuple_s_from_utf8(TUP, VAL, __FILE__, __LINE__)
533
+#  define reuse_tuple_s_from_local8bit(TUP, VAL)                              \
534
+    Mreuse_tuple_s_from_local8bit(TUP, VAL, __FILE__, __LINE__)
535
+#  ifdef _WIN32
536
+#    define reuse_tuple_s_from_wcs(TUP, VAL)                                  \
537
+      Mreuse_tuple_s_from_wcs(TUP, VAL, __FILE__, __LINE__)
538
+#  endif
539
+
540
+
541
+#endif  /* ifdef HC_FAST .. else */
542
+
543
+
544
+#endif

+ 530 - 0
3rdparty/include22/halcon/IPType.h

@@ -0,0 +1,530 @@
1
+/*****************************************************************************
2
+ * IPType.h
3
+ *****************************************************************************
4
+ *
5
+ * Project:     HALCON/libhalcon
6
+ * Description: Types for image processing and language interfaces
7
+ *
8
+ * (c) 1996-2020 by MVTec Software GmbH
9
+ *                  www.mvtec.com
10
+ *
11
+ *****************************************************************************/
12
+
13
+#ifndef IPTYPE_H
14
+#define IPTYPE_H
15
+
16
+#ifndef HC_NO_STRUCT_MEMBER_ALIGNMENT 
17
+/* sets the struct member alignment to avoid problems if 
18
+ * the settings of the user differ to those of the HALCON
19
+ * version. (8 is the default alignment, generally) */
20
+# pragma pack(push,8) 
21
+#endif
22
+
23
+typedef  bool  HBOOL;                  /* TRUE (1) or FALSE (0) */
24
+typedef  UINT1 HBYTE;                  /* unsigned Byte */
25
+
26
+
27
+#if !defined(HC_LARGE_IMAGES)
28
+typedef INT4 HIMGDIM;   /* Image dimension, e.g., width and height */
29
+typedef INT2 HIMGCOOR;  /* Image coordinates, e.g, row and column */
30
+typedef INT4 HLINCOOR;  /* Linearized image coordinates */
31
+typedef INT4 HIMGCNT;   /* Number of pixels, e.g., area or buffer size */
32
+typedef INT4 HITEMCNT;  /* Number of elements, e.g., contours or runlengths */
33
+typedef float HSUBCOOR; /* Sub-pixel precise coordinates */
34
+typedef float HSUBATTR; /* Sub-pixel precise attributes of contours */
35
+#else
36
+typedef INT4 HIMGDIM;
37
+typedef INT4 HIMGCOOR;
38
+typedef INT4_8 HLINCOOR;
39
+typedef INT4_8 HIMGCNT;
40
+typedef INT4_8 HITEMCNT;
41
+typedef double HSUBCOOR;
42
+typedef double HSUBATTR;
43
+#endif
44
+
45
+
46
+/****************************************************************************/
47
+/*  Types for images                                                        */
48
+/****************************************************************************/
49
+
50
+typedef void* (*HImageAllocProc)(size_t size);
51
+typedef void  (*HImageFreeProc)(void *mem);
52
+
53
+typedef struct {
54
+  float re;                  /* real part                                   */
55
+  float im;                  /* imaginary part                              */
56
+} HComplexPixel;
57
+
58
+typedef struct {
59
+  INT2 *p;                   /* pointer to gray vales                       */
60
+  INT1 num_bits;             /* number of used bits                         */
61
+} HInt2Pixel;
62
+
63
+typedef struct {
64
+  UINT2 *p;                  /* pointer to gray vales                       */
65
+  INT1  num_bits;            /* number of used bits                         */
66
+} HUInt2Pixel;
67
+
68
+typedef struct {
69
+  float *row;                /* row direction                               */
70
+  float *col;                /* column direction                            */
71
+  INT4  kind;                /* VF_ABSOLUTE or VF_RELATIVE                  */
72
+} HVFPixel;
73
+
74
+typedef union {
75
+  HBYTE         *b;         /* 0..255 (BYTE_IMAGE)                          */
76
+  HBYTE         *z;         /* 0..255 mod 256 (CYCLIC_IMAGE)                */
77
+  HBYTE         *d;         /* orientation 0..180 (DIR_IMAGE)               */
78
+  INT1          *i;         /* -127..126 (INT1_IMAGE)                       */
79
+  INT4          *l;         /* 4 byte integer (LONG_IMAGE)                  */
80
+  HINT8         *i8;        /* 8 byte integer (INT8_IMAGE)                  */
81
+  float         *f;         /* 4 byte real (FLOAT_IMAGE)                    */
82
+  HVFPixel      vf;         /* vector field (VF_IMAGE)                      */
83
+  HComplexPixel *c;         /* complex image (COMPLEX_IMAGE)                */
84
+  HInt2Pixel    s;          /* 2 bytes with sign (INT2_IMAGE)               */
85
+  HUInt2Pixel   u;          /* 2 bytes without sign (UINT2_IMAGE)           */
86
+} HPixelImage;
87
+
88
+typedef struct {
89
+  HINT        kind;         /* pixel type                                   */
90
+  HPixelImage pixel;        /* pixel data                                   */
91
+  HIMGDIM     width;        /* image width                                  */
92
+  HIMGDIM     height;       /* image height                                 */
93
+  HImageFreeProc free_proc; /* function for deallocating image data         */
94
+  HBOOL       free;         /* free image data when deleting image          */
95
+  /* time of creation of image                                              */
96
+  UINT2       msec;         /* milliseconds 0..999                          */
97
+  UINT1       sec;          /* seconds 0..59                                */
98
+  UINT1       min;          /* minutes 0.59                                 */
99
+  UINT1       hour;         /* 0..23                                        */
100
+  UINT1       day;          /* 1..31                                        */
101
+  UINT2       yday;         /* 1..366                                       */
102
+  UINT1       mon;          /* 1..12                                        */
103
+  UINT2       year;         /* 19xx                                         */
104
+} Himage;
105
+
106
+/* Information file for HALCON image file format (.exp)                     */
107
+typedef struct {
108
+  INT4 width;               /* width of image                               */
109
+  INT4 kind;                /* Pixel type                                   */
110
+  INT4 height;              /* height of image                              */
111
+  char info[1000-4];        /* for further use                              */
112
+} Himage_exp;
113
+    
114
+/* Information header for HALCON image file format                          */
115
+typedef struct {
116
+  INT4 version_number;      /* version number of the ima file format       */
117
+  INT4 num_images;           /* number of images in file                    */
118
+  HBOOL is_msb_first;        /* is most significant bit first (byte order)  */
119
+} Himage_hobj_file_header;
120
+
121
+/* Information header for HALCON image file format  - for each image        */
122
+typedef struct {
123
+  INT4 width;               /* width of image                               */
124
+  INT4 height;              /* height of image                              */
125
+  INT4 num_channels;        /* channels in image                            */
126
+} Himage_hobj_image_header;
127
+
128
+
129
+typedef HBYTE *Hbits;       /* Binary image                                 */
130
+
131
+
132
+/****************************************************************************/
133
+/*                       Regionen                                           */
134
+/****************************************************************************/
135
+
136
+
137
+/* Index range for coordinates of run length regions                        */
138
+#define MAX_COORD (MAX_FORMAT-1)
139
+#define MIN_COORD (-MAX_COORD)
140
+
141
+/* Data type for a single run of a region encoded with runlength encoding   */
142
+typedef struct {
143
+  HIMGCOOR l;               /* line number (row) of run                     */
144
+  HIMGCOOR cb;              /* column index of beginning of run             */
145
+  HIMGCOOR ce;              /* column index of ending of run                */
146
+} Hrun;
147
+
148
+/* vertical run */
149
+typedef struct {
150
+  HIMGCOOR c;               /* column index of run                          */
151
+  HIMGCOOR lb;              /* row index of beginning of run                */
152
+  HIMGCOOR le;              /* row index of ending of run                   */
153
+} Hvrun;
154
+
155
+#define SHAPE_RECTANGLE1     (UINT1)1
156
+#define SHAPE_RECTANGLE2     (UINT1)2
157
+#define SHAPE_CIRCLE         (UINT1)3
158
+#define SHAPE_ELLIPSE        (UINT1)4
159
+
160
+/* Bit-array to check if a feature of a region was calculated               */
161
+typedef struct {
162
+  unsigned int shape               : 1;
163
+  unsigned int is_convex           : 1;
164
+  unsigned int is_filled           : 1;
165
+  unsigned int is_connected4       : 1;
166
+  unsigned int is_connected8       : 1;
167
+  unsigned int is_thin             : 1;
168
+  unsigned int circularity         : 1;
169
+  unsigned int compactness         : 1;
170
+  unsigned int contlength          : 1;
171
+  unsigned int convexity           : 1;
172
+  unsigned int phi                 : 1;
173
+  unsigned int elliptic_axis       : 1;   /* ra, rb                         */
174
+  unsigned int elliptic_shape      : 1;   /* ra_, rb_                       */
175
+  unsigned int excentricity        : 1;   /* anisometry,bulkiness,str_faktor*/
176
+  unsigned int moments             : 1;   /* m11, m20, m02, ia, ib          */
177
+  unsigned int center_area         : 1;   /* row, col, area                 */
178
+  unsigned int smallest_rectangle1 : 1;   /* row1,col1,row2,col2            */
179
+  unsigned int smallest_rectangle2 : 1;   /* row_rect, col_rect, phi_rect,  */
180
+                                          /* length1, length2               */
181
+  unsigned int smallest_circle     : 1;   /* row_circle, col_circle, radius */
182
+  unsigned int min_max_chord       : 1;   /* longest/shortest run           */
183
+  unsigned int min_max_chord_gap   : 1;   /* longest/shortest run (holes)   */
184
+  unsigned int rectangularity      : 1;
185
+} HFeatureFlags;
186
+
187
+
188
+/* Shape feature caching inside the region structure                        */
189
+typedef struct {
190
+  union {
191
+    HFeatureFlags single;
192
+    long          all;      /* if possible use 64 bits!                     */
193
+  }               def;
194
+  UINT1    shape;           /* SHAPE_*                                      */
195
+  HBOOL    is_convex;
196
+  HBOOL    is_filled;
197
+  HBOOL    is_connected4;
198
+  HBOOL    is_connected8;
199
+  HBOOL    is_thin;         /* one pixel thin                               */
200
+  double   circularity;
201
+  double   compactness;
202
+  double   contlength;
203
+  double   convexity;
204
+  double   phi;
205
+  double   ra, rb;          /* elliptic_axis                                */
206
+  double   ra_, rb_;        /* elliptic_shape                               */
207
+  double   anisometry, bulkiness, structure_factor;
208
+  double   m11, m20, m02, ia, ib;
209
+  double   row, col;
210
+  HIMGCNT  area;
211
+  HIMGCOOR row1, col1, row2, col2;
212
+  double   row_rect, col_rect, phi_rect, length1, length2;
213
+  double   row_circle, col_circle, radius;
214
+  HIMGCOOR min_chord, max_chord;
215
+  HIMGCOOR min_chord_gap, max_chord_gap;
216
+  double rectangularity;
217
+} HRegFeature;
218
+
219
+
220
+typedef struct {
221
+  HBOOL       is_compl;     /* region is complement                         */
222
+  HITEMCNT    num;          /* number of runs                               */
223
+  HITEMCNT    num_max;      /* maximum number of runs                       */
224
+  HRegFeature feature;      /* already processed features                   */
225
+  Hrun        *rl;          /* pointer on array of run lengths              */
226
+} Hrlregion;
227
+
228
+
229
+/* vertical runlength encoding */
230
+typedef struct {
231
+  HBOOL       is_compl;     /* region is complement                         */
232
+  HITEMCNT    num;          /* number of runs                               */
233
+  HITEMCNT    num_max;      /* maximum number of runs                       */
234
+  HRegFeature feature;      /* already processed features                   */
235
+  Hvrun       *rc;          /* array of runs                                */
236
+} Hvrlregion;
237
+
238
+/* Data structure for fast single pixel access for Hrlregion regions        */
239
+typedef struct {
240
+  HIMGCOOR min, max;        /* Min/Max row index                            */
241
+  Hrun     *rl;             /* pointer to runs of the region                */
242
+  HITEMCNT *first;          /* array of index values (row begin)            */
243
+  HITEMCNT *last;           /* array of index values (row end)              */
244
+  HBOOL    *no_row;         /* is there this row available?                 */
245
+} Hrlaccess;
246
+
247
+/* Data structure for a multichannel image                                  */
248
+typedef struct {
249
+  Himage    *channels;      /* Channels of the multichannel image           */
250
+  Hrlregion *region;        /* Domain of the multichannel image             */
251
+  HINT      num_channels;   /* Number of channels of the multichannel image */
252
+} HMultiChannelImage;
253
+
254
+
255
+/****************************************
256
+ *
257
+ ****************************************/
258
+/* simple contour with long coordinates and variable allocation length */
259
+typedef struct {
260
+  HIMGCOOR *row;                    /* row values                           */
261
+  HIMGCOOR *col;                    /* columns values                       */
262
+  HITEMCNT num;                     /* length of contour (number of points) */
263
+  HITEMCNT max_num;                 /* allocated points of contour          */
264
+} Hcontvar;
265
+
266
+/* simple contour with float coordinates and variable allocation length */
267
+typedef struct {
268
+  HSUBCOOR *row;                    /* row values                           */
269
+  HSUBCOOR *col;                    /* columns values                       */
270
+  HITEMCNT num;                     /* length of contour (number of points) */
271
+  HITEMCNT max_num;                 /* allocated points of contour          */
272
+} Hfcontvar;
273
+
274
+/* Countour as chain code                                                   */
275
+typedef struct {
276
+  HIMGCOOR l, c;                 /* Start point (row,column)                */
277
+  HBYTE    *cc;                  /* array of chain code                     */
278
+  HITEMCNT num;                  /* length of contour (number of points)    */
279
+} Hchain_code;
280
+
281
+
282
+/* line (start and end point)                                               */
283
+typedef struct {
284
+  HSUBCOOR row1, col1;      /* Start point                                  */
285
+  HSUBCOOR row2, col2;      /* End point                                    */
286
+} Hline;
287
+
288
+/* Array of lines                                                           */
289
+typedef struct {
290
+  HITEMCNT num;
291
+  Hline    *line;
292
+} Hlines;
293
+
294
+
295
+
296
+/****************************************************************************/
297
+/*                       Distribution                                       */
298
+/****************************************************************************/
299
+
300
+#define HISTO_LEN   256
301
+typedef HIMGCNT Hhisto_abs[HISTO_LEN];
302
+typedef double Hhisto_rel[HISTO_LEN];
303
+
304
+
305
+#define MAX_DISTR   (2*256+1)
306
+#define NULL_DISTR  256
307
+
308
+
309
+
310
+/****************************************************************************/
311
+/*              Misc. image processing                                      */
312
+/****************************************************************************/
313
+
314
+/* Convolution (Convol and FFT)                                             */
315
+typedef struct {
316
+  INT4  f;
317
+  INT4  *gk;
318
+  INT4  num_max;
319
+} Hconv_mask_s;
320
+
321
+/* 2 dimensional convolution masks                                          */
322
+typedef struct {
323
+  HIMGCOOR min_row,max_row;
324
+  HIMGCOOR min_col,max_col;
325
+  INT4     norm;
326
+  INT4     num;
327
+  HIMGCOOR row[MAX_CONVOL];
328
+  HIMGCOOR col[MAX_CONVOL];
329
+  HLINCOOR koor[MAX_CONVOL];
330
+  INT4     m[MAX_CONVOL];
331
+} Hconv_mask_2;
332
+
333
+/* 1 dimensional convolution masks                                          */
334
+typedef struct {
335
+  HIMGCOOR min_col, max_col;
336
+  INT4     norm;
337
+  INT4     num;
338
+  HIMGCOOR col[MAX_CONVOL];
339
+  INT4     m[MAX_CONVOL];
340
+} Hconv_mask_1;
341
+
342
+
343
+/* Color (name plus RGB values)                                             */
344
+typedef struct {
345
+  HBYTE red;
346
+  HBYTE green;
347
+  HBYTE blue;
348
+  char  name[MAX_COLOR_NAME_LENGTH];
349
+} Hcolor;
350
+
351
+
352
+
353
+/****************************************************************************/
354
+/*                  Extended Line Description (XLD)                         */
355
+/****************************************************************************/
356
+
357
+/****************************************************************************/
358
+/* XLD-Object Contour                                                       */
359
+/****************************************************************************/
360
+
361
+typedef enum cont_class {
362
+  cont_unknown,     /* unknown                                              */
363
+  cont_no_junc,     /* neither start nor end point points are junctions     */
364
+  cont_start_junc,  /* start point is a junction                            */
365
+  cont_end_junc,    /* end point is a junction                              */
366
+  cont_both_junc,   /* both start and end point are junctions               */
367
+  cont_closed       /* closed contour                                       */
368
+} Hcont_class;
369
+
370
+typedef struct cont_attrib {
371
+  char     *name;   /* name of the attribute                                */
372
+  HSUBATTR *val;    /* value of the attribute (per point)                   */
373
+} Hcont_attrib;
374
+
375
+typedef struct cont_global_attrib {
376
+  char     *name;   /* name of the global attribute                         */
377
+  HSUBATTR val;     /* value of the attribute (per contour)                 */
378
+} Hcont_global_attrib;
379
+
380
+typedef struct cont_type {
381
+  HITEMCNT            num;        /* number of points along the contour     */
382
+  HSUBCOOR            *row;       /* points / row indices (y coordinates)   */
383
+  HSUBCOOR            *col;       /* points / column indices (x coord.)     */
384
+  Hcont_class         cont_class; /* contour class                          */
385
+  INT4                num_attrib; /* number of additional attributes        */
386
+  Hcont_attrib        *attribs;   /* additional attributes (for each point) */
387
+  INT4                num_global; /* number of additional global attributes */
388
+  Hcont_global_attrib *global;    /* additional attributes (per contour)    */
389
+  INT4                h;          /* auxiliary (temporary)                  */
390
+} Hcont;
391
+
392
+
393
+/****************************************************************************/
394
+/* XLD-Objects: polygons                                                    */
395
+/****************************************************************************/
396
+
397
+typedef struct lin_seg_type {
398
+  HSUBCOOR row, col; /* control points of the polygon                       */
399
+  HSUBATTR length;   /* length of the line from the cur. to the next point  */
400
+  HSUBATTR phi;      /* orientation (rad) of this line                      */
401
+  Hkey  ref;         /* data base key of the underlying contour             */
402
+  HITEMCNT  first;   /* index of the first point of the underlying contour  */
403
+  HITEMCNT  last;    /* index of the last contour point                     */
404
+} Hline_seg;
405
+
406
+typedef struct poly_type {
407
+  HITEMCNT  num_line;  /* number of lines                                   */
408
+  HITEMCNT  len_line;  /* maximum number of lines (size of the array lines) */
409
+  Hline_seg *lines;    /* control points of the polygon                     */
410
+} Hpoly;
411
+
412
+
413
+/****************************************************************************/
414
+/* XLD-Objects: parallels                                                   */
415
+/****************************************************************************/
416
+
417
+typedef struct para_poly_type {
418
+  Hkey     poly1;    /* Pointer to 1st polygon of the relation (P1)         */
419
+  Hkey     poly2;    /* Pointer to 2nd polygon of the relation (P2)         */
420
+  HITEMCNT first1;   /* Index of the start line segm. of the parallel in P1 */
421
+  HITEMCNT last1;    /* Index of the end line segment of the parallel in P1 */
422
+  HITEMCNT first2;   /* Index of the start line segm. of the parallel in P2 */
423
+  HITEMCNT last2;    /* Index of the end line segment of the parallel in P2 */
424
+  double   quality;  /* Measure of the degree of parallelism of the polygons*/
425
+} Hpara_poly;
426
+
427
+
428
+/****************************************************************************/
429
+/* XLD-Objects parallel object borders                                      */
430
+/****************************************************************************/
431
+
432
+typedef struct mod_para_type {
433
+  Hkey     poly1;    /* Pointer to 1st polygon of the relation (P1)         */
434
+  Hkey     poly2;    /* Pointer to 2nd polygon of the relation (P2)         */
435
+  HITEMCNT first1;   /* Index of the start line segm. of the parallel in P1 */
436
+  HITEMCNT last1;    /* Index of the end line segment of the parallel in P1 */
437
+  HITEMCNT first2;   /* Index of the start line segm. of the parallel in P2 */
438
+  HITEMCNT last2;    /* Index of the end line segment of the parallel in P2 */
439
+  HSUBATTR first1_dist; /* Half distance of the first line of P1 to P2      */
440
+  HSUBATTR last1_dist;  /* Half distance of the last line of P1 to P2       */
441
+  HSUBATTR first2_dist; /* Half distance of the first line of P2 to P1      */
442
+  HSUBATTR last2_dist;  /* Half distance of the last line of P2 to P1       */
443
+  INT2  dir1;        /* Position of P1 relative to P2:                      */
444
+                     /*   dir1 = 1: P2 is to the right of P1                */
445
+                     /*   dir1 = -1: P2 is to the left of P1                */
446
+  INT2  dir2;        /* Position of P2 relative to P1:                      */
447
+                     /*   dir2 = 1: P1 is to the right of P2                */
448
+                     /*   dir2 = -1: P1 is to the left of P2                */
449
+} Hmod_para;
450
+
451
+/****************************************************************************/
452
+/* XLD-Objects Extended object borders                                      */
453
+/****************************************************************************/
454
+
455
+typedef struct ext_para_type {
456
+  Hkey     poly1;    /* Pointer to 1st polygon of the relation (P1)         */
457
+  Hkey     poly2;    /* Pointer to 2nd polygon of the relation (P2)         */
458
+  HITEMCNT first1;   /* Index of the start line segm. of the parallel in P1 */
459
+  HITEMCNT last1;    /* Index of the end line segment of the parallel in P1 */
460
+  HITEMCNT first2;   /* Index of the start line segm. of the parallel in P2 */
461
+  HITEMCNT last2;    /* Index of the end line segment of the parallel in P2 */
462
+} Hext_para;
463
+
464
+
465
+/****************************************************************************/
466
+/* Homogeneous coordiantes: Hhom_mat_[23]d / Hproj_mat_[23]d                */
467
+/****************************************************************************/
468
+typedef double Hhom_mat_2d[2][3];
469
+typedef double (*H_RESTRICT pHhom_mat_2d)[3]; /* pointer type variant of Hhom_mat_2d   */
470
+typedef double (*puHhom_mat_2d)[3]; /* unrestricted pointer type variant of Hhom_mat_2d   */
471
+typedef double Hhom_mat_3d[3][4];
472
+typedef double (*H_RESTRICT pHhom_mat_3d)[4]; /* pointer type variant of Hhom_mat_3d   */
473
+typedef double (*puHhom_mat_3d)[4]; /* unrestricted pointer type variant of Hhom_mat_3d   */
474
+typedef double Hproj_mat_2d[3][3];
475
+typedef double (*H_RESTRICT pHproj_mat_2d)[3]; /* pointer type variant of Hproj_mat_2d */
476
+typedef double (*puHproj_mat_2d)[3];         /* unrestricted pointer type variant of Hproj_mat_2d */
477
+typedef double Hproj_mat_3d[4][4];
478
+typedef double (*H_RESTRICT pHproj_mat_3d)[4]; /* pointer type variant of Hproj_mat_3d */
479
+typedef double (*puHproj_mat_3d)[4];         /* unrestricted pointer type variant of Hproj_mat_3d */
480
+
481
+
482
+
483
+/****************************************************************************/
484
+/* 1D-Functions                                                             */
485
+/****************************************************************************/
486
+
487
+typedef struct {
488
+  INT4  num;          /* Number of elements in x and y                      */
489
+  float *x;           /* Array of the x-values of the function (always set) */
490
+  float *y;           /* Array of the y-values of the function              */
491
+  float xmin;         /* Minimum x value (always set)                       */
492
+  float xmax;         /* Maximum x value (always set)                       */
493
+  float xdist;        /* Distance of x-values if they are equidistant       */
494
+  HBOOL is_equidist;  /* Are the x-values equidistant?                      */
495
+} Hfunction_1d;
496
+
497
+
498
+
499
+
500
+/****************************************************************************/
501
+/*  Parameter passing (inside library and for language interfaces)          */
502
+/****************************************************************************/
503
+
504
+typedef union {
505
+  INT4_8 *l;                /* 4-8 Byte integer                             */
506
+  double *f;                /* 8 Byte real                                  */
507
+  char   *s;                /* Pointer to string                            */
508
+} DPHpar;                   /* For HALCON/C                                 */
509
+
510
+
511
+typedef union {
512
+  INT4_8  l;                /* 4-8 Byte integer                             */
513
+  double  f;                /* 8 Byte real                                  */
514
+  char    *s;               /* Pointer to string                            */
515
+} DVHpar;                   /* For HALCON/C                                 */
516
+
517
+
518
+/****************************************************************************/
519
+/*  Type for callback function for HALCON low level error messages          */
520
+/****************************************************************************/
521
+
522
+#ifndef _WIN32
523
+#define __stdcall
524
+#endif
525
+typedef void  (__stdcall *HLowLevelErrorCallbackProc)(const char *err);
526
+
527
+#ifndef HC_NO_STRUCT_MEMBER_ALIGNMENT 
528
+# pragma pack(pop) /* unset struct member alignment */
529
+#endif
530
+#endif

+ 236 - 0
3rdparty/include22/halcon/com/HalconCOM.h

@@ -0,0 +1,236 @@
1
+/*****************************************************************************
2
+ * HalconCOM.h
3
+ ***************************************************************************** 
4
+ *
5
+ * Project:     HALCON/COM
6
+ * Description: Defines, types, and declarations for HALCON/COM,
7
+ *              required for building COM extension packages
8
+ *
9
+ * (c) 1996-2020 by MVTec Software GmbH
10
+ *               www.mvtec.com 
11
+ * 
12
+ *****************************************************************************/
13
+
14
+#ifndef HALCON_COM_H
15
+#define HALCON_COM_H
16
+
17
+#include <windows.h>
18
+#include "HIntDef.h"
19
+#include "HBase.h"
20
+#include "HDeclSpec.h"
21
+#include "HConst.h"
22
+#include "IPType.h"
23
+#include "HCtype.h"
24
+
25
+/* FindText, CreateMutex, CreateEvent, and DeleteFile are also functions of
26
+ * the Windows API. They are defines on FindTextW, CreateMutexW, CreateEventW,
27
+ * and DelteFileW if UNICODE is defined, otherwise they are defines on
28
+ * FindTextA, CreateMutexA, CreateMutexA, and DeleteFileA.
29
+ * These defines are undefined here. If you want to use the corresponding
30
+ * Windows API calls, you must use FindTextA, FindTextW, CreateMutexA,
31
+ * CreateMutexW, CreateEventA, CreateEventW, DeleteFileA, or DeleteFileW
32
+ * directly. */
33
+#undef FindText
34
+#undef CreateMutex
35
+#undef CreateEvent
36
+#undef DeleteFile
37
+
38
+/* Error codes */
39
+
40
+#define HALCONX_ERR_BASE (0x80040000UL + 2048UL)
41
+#define HALCONX_COMINT_ERR_BASE (0x80040000UL + 1024UL)
42
+
43
+#define HXC_WRONG_INTERFACE (HALCONX_COMINT_ERR_BASE + 1UL)
44
+#define HXC_CANT_ACCESS_HANDLE (HALCONX_COMINT_ERR_BASE + 2UL)
45
+#define HXC_SRC_OBJECT_NOT_INITIALIZED (HALCONX_COMINT_ERR_BASE + 3UL)
46
+#define HXC_TUPLE_CONVERSION_ERROR (HALCONX_COMINT_ERR_BASE + 4UL)
47
+#define HXC_NULL_POINTER (HALCONX_COMINT_ERR_BASE + 5UL)
48
+
49
+#ifndef HALCON_C_H
50
+
51
+typedef Hkey     Hobject;     /* ID of iconic HALCON objects    */
52
+
53
+typedef struct                /* Tuple representation           */
54
+{
55
+  Hcpar   *tuple;
56
+  INT_PTR length;
57
+} Htuple;
58
+
59
+#define UNDEF_TYPE  (-1)      /* Uninitialized tuple type       */
60
+
61
+#endif
62
+
63
+#ifdef __cplusplus
64
+extern "C" {
65
+#endif
66
+
67
+
68
+/* Prototypes of interface functions */
69
+
70
+extern LIntExport char *HMessage_COMInt(Herror message) ;
71
+
72
+extern LIntExport Herror 
73
+HcomPreCall(INT proc_index, Hproc_handle *proc_handle);
74
+
75
+extern LIntExport Herror 
76
+HcomCall(Hproc_handle proc_handle);
77
+
78
+extern LIntExport Herror 
79
+HcomPostCall(Hproc_handle proc_handle,Herror err);
80
+
81
+extern LIntExport Herror 
82
+HcomStoreIO(Hproc_handle proc_handle,INT par,Hobject inObjVar);
83
+
84
+extern LIntExport Herror 
85
+HcomStoreICL(Hproc_handle proc_handle,INT par,Hlong value);
86
+
87
+extern LIntExport Herror 
88
+HcomStoreICD(Hproc_handle proc_handle,INT par,double value);
89
+
90
+extern LIntExport Herror 
91
+HcomStoreICT(Hproc_handle proc_handle,INT par,Htuple value);
92
+
93
+extern LIntExport Herror 
94
+HcomStoreICTOOL(Hproc_handle proc_handle, INT par, Htuple value);
95
+
96
+extern LIntExport Herror 
97
+HcomStoreOO(Hproc_handle proc_handle,INT par,Hobject *outObjVar,Herror err);
98
+
99
+extern LIntExport Herror 
100
+HcomStoreOCL(Hproc_handle proc_handle,INT par, Hlong *outCtrlVar,Herror err);
101
+
102
+extern LIntExport Herror 
103
+HcomStoreOCD(Hproc_handle proc_handle,INT par,double *outCtrlVar,Herror err);
104
+
105
+extern LIntExport Herror 
106
+HcomStoreOCT(Hproc_handle proc_handle,INT par,Htuple *outCtrlVar,Herror err);
107
+
108
+extern LIntExport Herror 
109
+HcomStoreOCTOOL(Hproc_handle proc_handle, INT par, Htuple *outCtrlVar, 
110
+                Herror err);
111
+
112
+/* Higher level signatures based on COM types */
113
+
114
+extern LIntExport Herror 
115
+HcomStoreIOHandleAccess(Hproc_handle proc_handle, INT par, 
116
+                        CComQIPtr<IHandleAccess, &IID_IHandleAccess> piha);
117
+
118
+extern LIntExport Herror 
119
+HcomStoreOOHandleAccess(Hproc_handle proc_handle, INT par, 
120
+                       CComQIPtr<IHandleAccess, &IID_IHandleAccess> piha,
121
+                       Herror errorStatus);
122
+
123
+extern LIntExport Herror 
124
+HcomStoreITOOLHandleAccess(Hproc_handle proc_handle, INT par, 
125
+                           CComQIPtr<IHandleAccess, &IID_IHandleAccess> piha);
126
+
127
+extern LIntExport Herror 
128
+HcomStoreOTOOLHandleAccess(Hproc_handle proc_handle, INT par,
129
+                           CComQIPtr<IHandleAccess, &IID_IHandleAccess> piha,
130
+                           Herror errorStatus);
131
+
132
+extern LIntExport Herror 
133
+HcomStoreICV(Hproc_handle proc_handle, INT par, VARIANT value);
134
+
135
+extern LIntExport Herror 
136
+HcomStoreOCV(Hproc_handle proc_handle, INT par, VARIANT *value, Herror err);
137
+
138
+extern LIntExport Herror 
139
+HcomStoreICBSTR(Hproc_handle proc_handle, INT par, BSTR value);
140
+
141
+extern LIntExport Herror 
142
+HcomStoreOCBSTR(Hproc_handle proc_handle, INT par, BSTR *value, Herror err);
143
+
144
+
145
+#ifdef __cplusplus
146
+}
147
+#endif
148
+
149
+
150
+/* Conversions between tuples and COM data types */
151
+
152
+#define VARCONVERT varconvert
153
+#define TUPLECONVERT tupleconvert
154
+
155
+extern LIntExport 
156
+void varconvert(Htuple *dest, const INT_PTR arg, const char *par_name);
157
+
158
+extern LIntExport 
159
+void varconvert(Htuple *dest, const double arg, const char *par_name);
160
+
161
+extern LIntExport 
162
+void varconvert(Htuple *dest, const BSTR arg, const char *par_name);
163
+
164
+extern LIntExport 
165
+void varconvert(Hctuple *dest, const BSTR arg, const char *par_name);
166
+
167
+extern LIntExport 
168
+void varconvert(Htuple *dest, const VARIANT &arg, const char *par_name);
169
+
170
+extern LIntExport 
171
+void varconvert(Hctuple *dest, const VARIANT &arg, const char *par_name);
172
+
173
+extern LIntExport 
174
+void tupleconvert(Htuple &val, INT_PTR *lVal, char *par_name);
175
+
176
+extern LIntExport 
177
+void tupleconvert(Htuple &val, VARIANT_BOOL *bVal, char *par_name);
178
+
179
+extern LIntExport 
180
+void tupleconvert(Htuple &val, double *dVal, char *par_name);
181
+
182
+extern LIntExport 
183
+void tupleconvert(Htuple &val, BSTR *bstrVal, char *par_name);
184
+
185
+extern LIntExport 
186
+void tupleconvert(Hctuple *val, BSTR *bstrVal, char *par_name);
187
+
188
+extern LIntExport 
189
+void tupleconvert(Htuple &val, VARIANT *varVal, char *par_name);
190
+
191
+extern LIntExport 
192
+void tupleconvert(Hctuple *val, VARIANT *varVal, char *par_name);
193
+
194
+class ConversionException
195
+{
196
+public:
197
+  char *msg;
198
+  ConversionException(char *m)
199
+  {
200
+    msg = ::new char [strlen(m)+1];
201
+    strcpy(msg, m);
202
+  }
203
+  ConversionException(const ConversionException &src)
204
+  {
205
+    msg = ::new char [strlen(src.msg)+1];
206
+    strcpy(msg, src.msg);
207
+  }
208
+  ~ConversionException(void)
209
+  {
210
+    delete [] msg;
211
+  }
212
+};
213
+
214
+/* Macros for storing object parameters */
215
+
216
+#define HCOMSTOREIO(INDEX,NAME) \
217
+  if (NAME == NULL) \
218
+    errorStatus = HXC_NULL_POINTER - HALCONX_ERR_BASE; \
219
+  else \
220
+  { \
221
+    CComQIPtr<IHandleAccess, &IID_IHandleAccess> piha(NAME); \
222
+    errorStatus = HcomStoreIOHandleAccess(ph,INDEX,piha); \
223
+  }
224
+
225
+#ifndef HALCON_COM_INTERNAL_H
226
+
227
+#define HCOMSTOREOO(INDEX,NAME,TYPE) \
228
+  CComQIPtr<I##TYPE, &IID_I##TYPE> p##NAME;                             \
229
+  p##NAME.CoCreateInstance(L"HalconX." L#TYPE);                         \
230
+  CComQIPtr<IHandleAccess, &IID_IHandleAccess> pi##NAME(p##NAME);       \
231
+  errorStatus = HcomStoreOOHandleAccess(ph,INDEX,pi##NAME,errorStatus); \
232
+  p##NAME->QueryInterface(IID_I##TYPE, (void**)NAME)
233
+
234
+#endif
235
+
236
+#endif

+ 519 - 0
3rdparty/include22/halcon/com/HalconXimport.h

@@ -0,0 +1,519 @@
1
+/* this ALWAYS GENERATED file contains the definitions for the interfaces */
2
+
3
+
4
+/* File created by MIDL compiler version 5.01.0164 */
5
+/* at Sat Feb 26 17:53:32 2000
6
+ */
7
+/* Compiler settings for C:\Halcon\source\packages\grayfeat\source\com\HalconXimport.idl:
8
+    Os (OptLev=s), W1, Zp8, env=Win32, ms_ext, c_ext
9
+    error checks: allocation ref bounds_check enum stub_data 
10
+*/
11
+//@@MIDL_FILE_HEADING(  )
12
+
13
+
14
+/* verify that the <rpcndr.h> version is high enough to compile this file*/
15
+#ifndef __REQUIRED_RPCNDR_H_VERSION__
16
+#define __REQUIRED_RPCNDR_H_VERSION__ 440
17
+#endif
18
+
19
+#include "rpc.h"
20
+#include "rpcndr.h"
21
+
22
+#ifndef __RPCNDR_H_VERSION__
23
+#error this stub requires an updated version of <rpcndr.h>
24
+#endif // __RPCNDR_H_VERSION__
25
+
26
+#ifndef COM_NO_WINDOWS_H
27
+#include "windows.h"
28
+#include "ole2.h"
29
+#endif /*COM_NO_WINDOWS_H*/
30
+
31
+#ifndef __HalconXimport_h__
32
+#define __HalconXimport_h__
33
+
34
+#ifdef __cplusplus
35
+extern "C"{
36
+#endif 
37
+
38
+/* Forward Declarations */ 
39
+
40
+#ifndef __IHObjectX_FWD_DEFINED__
41
+#define __IHObjectX_FWD_DEFINED__
42
+typedef interface IHObjectX IHObjectX;
43
+#endif  /* __IHObjectX_FWD_DEFINED__ */
44
+
45
+
46
+#ifndef __IHUntypedObjectX_FWD_DEFINED__
47
+#define __IHUntypedObjectX_FWD_DEFINED__
48
+typedef interface IHUntypedObjectX IHUntypedObjectX;
49
+#endif  /* __IHUntypedObjectX_FWD_DEFINED__ */
50
+
51
+
52
+#ifndef __IHandleAccess_FWD_DEFINED__
53
+#define __IHandleAccess_FWD_DEFINED__
54
+typedef interface IHandleAccess IHandleAccess;
55
+#endif  /* __IHandleAccess_FWD_DEFINED__ */
56
+
57
+
58
+/* header files for imported files */
59
+#include "oaidl.h"
60
+#include "ocidl.h"
61
+
62
+void __RPC_FAR * __RPC_USER MIDL_user_allocate(size_t);
63
+void __RPC_USER MIDL_user_free( void __RPC_FAR * ); 
64
+
65
+#ifndef __IHObjectX_INTERFACE_DEFINED__
66
+#define __IHObjectX_INTERFACE_DEFINED__
67
+
68
+/* interface IHObjectX */
69
+/* [unique][helpstring][dual][uuid][object] */ 
70
+
71
+
72
+EXTERN_C const IID IID_IHObjectX;
73
+
74
+#if defined(__cplusplus) && !defined(CINTERFACE)
75
+    
76
+    MIDL_INTERFACE("6ebd90c3-d219-11d2-ade5-0000c00f4ef9")
77
+    IHObjectX : public IDispatch
78
+    {
79
+    public:
80
+    };
81
+    
82
+#else   /* C style interface */
83
+
84
+#pragma pack(push,8) /* sets the struct member alignment to 8 (default) */
85
+
86
+    typedef struct IHObjectXVtbl
87
+    {
88
+        BEGIN_INTERFACE
89
+        
90
+        HRESULT ( STDMETHODCALLTYPE __RPC_FAR *QueryInterface )( 
91
+            IHObjectX __RPC_FAR * This,
92
+            /* [in] */ REFIID riid,
93
+            /* [iid_is][out] */ void __RPC_FAR *__RPC_FAR *ppvObject);
94
+        
95
+        ULONG ( STDMETHODCALLTYPE __RPC_FAR *AddRef )( 
96
+            IHObjectX __RPC_FAR * This);
97
+        
98
+        ULONG ( STDMETHODCALLTYPE __RPC_FAR *Release )( 
99
+            IHObjectX __RPC_FAR * This);
100
+        
101
+        HRESULT ( STDMETHODCALLTYPE __RPC_FAR *GetTypeInfoCount )( 
102
+            IHObjectX __RPC_FAR * This,
103
+            /* [out] */ UINT __RPC_FAR *pctinfo);
104
+        
105
+        HRESULT ( STDMETHODCALLTYPE __RPC_FAR *GetTypeInfo )( 
106
+            IHObjectX __RPC_FAR * This,
107
+            /* [in] */ UINT iTInfo,
108
+            /* [in] */ LCID lcid,
109
+            /* [out] */ ITypeInfo __RPC_FAR *__RPC_FAR *ppTInfo);
110
+        
111
+        HRESULT ( STDMETHODCALLTYPE __RPC_FAR *GetIDsOfNames )( 
112
+            IHObjectX __RPC_FAR * This,
113
+            /* [in] */ REFIID riid,
114
+            /* [size_is][in] */ LPOLESTR __RPC_FAR *rgszNames,
115
+            /* [in] */ UINT cNames,
116
+            /* [in] */ LCID lcid,
117
+            /* [size_is][out] */ DISPID __RPC_FAR *rgDispId);
118
+        
119
+        /* [local] */ HRESULT ( STDMETHODCALLTYPE __RPC_FAR *Invoke )( 
120
+            IHObjectX __RPC_FAR * This,
121
+            /* [in] */ DISPID dispIdMember,
122
+            /* [in] */ REFIID riid,
123
+            /* [in] */ LCID lcid,
124
+            /* [in] */ WORD wFlags,
125
+            /* [out][in] */ DISPPARAMS __RPC_FAR *pDispParams,
126
+            /* [out] */ VARIANT __RPC_FAR *pVarResult,
127
+            /* [out] */ EXCEPINFO __RPC_FAR *pExcepInfo,
128
+            /* [out] */ UINT __RPC_FAR *puArgErr);
129
+        
130
+        END_INTERFACE
131
+    } IHObjectXVtbl;
132
+
133
+#pragma pack(pop)
134
+
135
+    interface IHObjectX
136
+    {
137
+        CONST_VTBL struct IHObjectXVtbl __RPC_FAR *lpVtbl;
138
+    };
139
+
140
+    
141
+
142
+#ifdef COBJMACROS
143
+
144
+
145
+#define IHObjectX_QueryInterface(This,riid,ppvObject) \
146
+    (This)->lpVtbl -> QueryInterface(This,riid,ppvObject)
147
+
148
+#define IHObjectX_AddRef(This)  \
149
+    (This)->lpVtbl -> AddRef(This)
150
+
151
+#define IHObjectX_Release(This) \
152
+    (This)->lpVtbl -> Release(This)
153
+
154
+
155
+#define IHObjectX_GetTypeInfoCount(This,pctinfo)  \
156
+    (This)->lpVtbl -> GetTypeInfoCount(This,pctinfo)
157
+
158
+#define IHObjectX_GetTypeInfo(This,iTInfo,lcid,ppTInfo) \
159
+    (This)->lpVtbl -> GetTypeInfo(This,iTInfo,lcid,ppTInfo)
160
+
161
+#define IHObjectX_GetIDsOfNames(This,riid,rgszNames,cNames,lcid,rgDispId) \
162
+    (This)->lpVtbl -> GetIDsOfNames(This,riid,rgszNames,cNames,lcid,rgDispId)
163
+
164
+#define IHObjectX_Invoke(This,dispIdMember,riid,lcid,wFlags,pDispParams,pVarResult,pExcepInfo,puArgErr) \
165
+    (This)->lpVtbl -> Invoke(This,dispIdMember,riid,lcid,wFlags,pDispParams,pVarResult,pExcepInfo,puArgErr)
166
+
167
+
168
+#endif /* COBJMACROS */
169
+
170
+
171
+#endif  /* C style interface */
172
+
173
+
174
+
175
+
176
+#endif  /* __IHObjectX_INTERFACE_DEFINED__ */
177
+
178
+
179
+#ifndef __IHUntypedObjectX_INTERFACE_DEFINED__
180
+#define __IHUntypedObjectX_INTERFACE_DEFINED__
181
+
182
+/* interface IHUntypedObjectX */
183
+/* [unique][helpstring][dual][uuid][object] */ 
184
+
185
+
186
+EXTERN_C const IID IID_IHUntypedObjectX;
187
+
188
+#if defined(__cplusplus) && !defined(CINTERFACE)
189
+    
190
+    MIDL_INTERFACE("6ebd90c4-d219-11d2-ade5-0000c00f4ef9")
191
+    IHUntypedObjectX : public IDispatch
192
+    {
193
+    public:
194
+    };
195
+    
196
+#else   /* C style interface */
197
+
198
+#pragma pack(push,8) /* sets the struct member alignment to 8 (default) */
199
+
200
+    typedef struct IHUntypedObjectXVtbl
201
+    {
202
+        BEGIN_INTERFACE
203
+        
204
+        HRESULT ( STDMETHODCALLTYPE __RPC_FAR *QueryInterface )( 
205
+            IHUntypedObjectX __RPC_FAR * This,
206
+            /* [in] */ REFIID riid,
207
+            /* [iid_is][out] */ void __RPC_FAR *__RPC_FAR *ppvObject);
208
+        
209
+        ULONG ( STDMETHODCALLTYPE __RPC_FAR *AddRef )( 
210
+            IHUntypedObjectX __RPC_FAR * This);
211
+        
212
+        ULONG ( STDMETHODCALLTYPE __RPC_FAR *Release )( 
213
+            IHUntypedObjectX __RPC_FAR * This);
214
+        
215
+        HRESULT ( STDMETHODCALLTYPE __RPC_FAR *GetTypeInfoCount )( 
216
+            IHUntypedObjectX __RPC_FAR * This,
217
+            /* [out] */ UINT __RPC_FAR *pctinfo);
218
+        
219
+        HRESULT ( STDMETHODCALLTYPE __RPC_FAR *GetTypeInfo )( 
220
+            IHUntypedObjectX __RPC_FAR * This,
221
+            /* [in] */ UINT iTInfo,
222
+            /* [in] */ LCID lcid,
223
+            /* [out] */ ITypeInfo __RPC_FAR *__RPC_FAR *ppTInfo);
224
+        
225
+        HRESULT ( STDMETHODCALLTYPE __RPC_FAR *GetIDsOfNames )( 
226
+            IHUntypedObjectX __RPC_FAR * This,
227
+            /* [in] */ REFIID riid,
228
+            /* [size_is][in] */ LPOLESTR __RPC_FAR *rgszNames,
229
+            /* [in] */ UINT cNames,
230
+            /* [in] */ LCID lcid,
231
+            /* [size_is][out] */ DISPID __RPC_FAR *rgDispId);
232
+        
233
+        /* [local] */ HRESULT ( STDMETHODCALLTYPE __RPC_FAR *Invoke )( 
234
+            IHUntypedObjectX __RPC_FAR * This,
235
+            /* [in] */ DISPID dispIdMember,
236
+            /* [in] */ REFIID riid,
237
+            /* [in] */ LCID lcid,
238
+            /* [in] */ WORD wFlags,
239
+            /* [out][in] */ DISPPARAMS __RPC_FAR *pDispParams,
240
+            /* [out] */ VARIANT __RPC_FAR *pVarResult,
241
+            /* [out] */ EXCEPINFO __RPC_FAR *pExcepInfo,
242
+            /* [out] */ UINT __RPC_FAR *puArgErr);
243
+        
244
+        END_INTERFACE
245
+    } IHUntypedObjectXVtbl;
246
+
247
+#pragma pack(pop)
248
+
249
+    interface IHUntypedObjectX
250
+    {
251
+        CONST_VTBL struct IHUntypedObjectXVtbl __RPC_FAR *lpVtbl;
252
+    };
253
+
254
+    
255
+
256
+#ifdef COBJMACROS
257
+
258
+
259
+#define IHUntypedObjectX_QueryInterface(This,riid,ppvObject)  \
260
+    (This)->lpVtbl -> QueryInterface(This,riid,ppvObject)
261
+
262
+#define IHUntypedObjectX_AddRef(This) \
263
+    (This)->lpVtbl -> AddRef(This)
264
+
265
+#define IHUntypedObjectX_Release(This)  \
266
+    (This)->lpVtbl -> Release(This)
267
+
268
+
269
+#define IHUntypedObjectX_GetTypeInfoCount(This,pctinfo) \
270
+    (This)->lpVtbl -> GetTypeInfoCount(This,pctinfo)
271
+
272
+#define IHUntypedObjectX_GetTypeInfo(This,iTInfo,lcid,ppTInfo)  \
273
+    (This)->lpVtbl -> GetTypeInfo(This,iTInfo,lcid,ppTInfo)
274
+
275
+#define IHUntypedObjectX_GetIDsOfNames(This,riid,rgszNames,cNames,lcid,rgDispId)  \
276
+    (This)->lpVtbl -> GetIDsOfNames(This,riid,rgszNames,cNames,lcid,rgDispId)
277
+
278
+#define IHUntypedObjectX_Invoke(This,dispIdMember,riid,lcid,wFlags,pDispParams,pVarResult,pExcepInfo,puArgErr)  \
279
+    (This)->lpVtbl -> Invoke(This,dispIdMember,riid,lcid,wFlags,pDispParams,pVarResult,pExcepInfo,puArgErr)
280
+
281
+
282
+#endif /* COBJMACROS */
283
+
284
+
285
+#endif  /* C style interface */
286
+
287
+
288
+
289
+
290
+#endif  /* __IHUntypedObjectX_INTERFACE_DEFINED__ */
291
+
292
+
293
+#ifndef __IHandleAccess_INTERFACE_DEFINED__
294
+#define __IHandleAccess_INTERFACE_DEFINED__
295
+
296
+/* interface IHandleAccess */
297
+/* [unique][helpstring][dual][uuid][object] */ 
298
+
299
+
300
+EXTERN_C const IID IID_IHandleAccess;
301
+
302
+#if defined(__cplusplus) && !defined(CINTERFACE)
303
+    
304
+    MIDL_INTERFACE("6ebd90d2-d219-11d2-ade5-0000c00f4ef9")
305
+    IHandleAccess : public IDispatch
306
+    {
307
+    public:
308
+        virtual /* [helpstring][hidden][id] */ HRESULT STDMETHODCALLTYPE HandleAccess( 
309
+            /* [retval][out] */ long __RPC_FAR *rVal) = 0;
310
+        
311
+        virtual /* [helpstring][hidden][id] */ HRESULT STDMETHODCALLTYPE HandleEnterCriticalSection( void) = 0;
312
+        
313
+        virtual /* [helpstring][hidden][id] */ HRESULT STDMETHODCALLTYPE HandleLeaveCriticalSection( void) = 0;
314
+        
315
+        virtual /* [helpstring][hidden][id] */ HRESULT STDMETHODCALLTYPE HandleCleanUp( 
316
+            /* [in] */ BOOL CallDestructor) = 0;
317
+        
318
+        virtual /* [helpstring][id] */ HRESULT STDMETHODCALLTYPE HandleIsValid( 
319
+            /* [retval][out] */ long __RPC_FAR *isValid) = 0;
320
+        
321
+    };
322
+    
323
+#else   /* C style interface */
324
+
325
+#pragma pack(push,8)
326
+
327
+    typedef struct IHandleAccessVtbl
328
+    {
329
+        BEGIN_INTERFACE
330
+        
331
+        HRESULT ( STDMETHODCALLTYPE __RPC_FAR *QueryInterface )( 
332
+            IHandleAccess __RPC_FAR * This,
333
+            /* [in] */ REFIID riid,
334
+            /* [iid_is][out] */ void __RPC_FAR *__RPC_FAR *ppvObject);
335
+        
336
+        ULONG ( STDMETHODCALLTYPE __RPC_FAR *AddRef )( 
337
+            IHandleAccess __RPC_FAR * This);
338
+        
339
+        ULONG ( STDMETHODCALLTYPE __RPC_FAR *Release )( 
340
+            IHandleAccess __RPC_FAR * This);
341
+        
342
+        HRESULT ( STDMETHODCALLTYPE __RPC_FAR *GetTypeInfoCount )( 
343
+            IHandleAccess __RPC_FAR * This,
344
+            /* [out] */ UINT __RPC_FAR *pctinfo);
345
+        
346
+        HRESULT ( STDMETHODCALLTYPE __RPC_FAR *GetTypeInfo )( 
347
+            IHandleAccess __RPC_FAR * This,
348
+            /* [in] */ UINT iTInfo,
349
+            /* [in] */ LCID lcid,
350
+            /* [out] */ ITypeInfo __RPC_FAR *__RPC_FAR *ppTInfo);
351
+        
352
+        HRESULT ( STDMETHODCALLTYPE __RPC_FAR *GetIDsOfNames )( 
353
+            IHandleAccess __RPC_FAR * This,
354
+            /* [in] */ REFIID riid,
355
+            /* [size_is][in] */ LPOLESTR __RPC_FAR *rgszNames,
356
+            /* [in] */ UINT cNames,
357
+            /* [in] */ LCID lcid,
358
+            /* [size_is][out] */ DISPID __RPC_FAR *rgDispId);
359
+        
360
+        /* [local] */ HRESULT ( STDMETHODCALLTYPE __RPC_FAR *Invoke )( 
361
+            IHandleAccess __RPC_FAR * This,
362
+            /* [in] */ DISPID dispIdMember,
363
+            /* [in] */ REFIID riid,
364
+            /* [in] */ LCID lcid,
365
+            /* [in] */ WORD wFlags,
366
+            /* [out][in] */ DISPPARAMS __RPC_FAR *pDispParams,
367
+            /* [out] */ VARIANT __RPC_FAR *pVarResult,
368
+            /* [out] */ EXCEPINFO __RPC_FAR *pExcepInfo,
369
+            /* [out] */ UINT __RPC_FAR *puArgErr);
370
+        
371
+        /* [helpstring][hidden][id] */ HRESULT ( STDMETHODCALLTYPE __RPC_FAR *HandleAccess )( 
372
+            IHandleAccess __RPC_FAR * This,
373
+            /* [retval][out] */ long __RPC_FAR *rVal);
374
+        
375
+        /* [helpstring][hidden][id] */ HRESULT ( STDMETHODCALLTYPE __RPC_FAR *HandleEnterCriticalSection )( 
376
+            IHandleAccess __RPC_FAR * This);
377
+        
378
+        /* [helpstring][hidden][id] */ HRESULT ( STDMETHODCALLTYPE __RPC_FAR *HandleLeaveCriticalSection )( 
379
+            IHandleAccess __RPC_FAR * This);
380
+        
381
+        /* [helpstring][hidden][id] */ HRESULT ( STDMETHODCALLTYPE __RPC_FAR *HandleCleanUp )( 
382
+            IHandleAccess __RPC_FAR * This,
383
+            /* [in] */ BOOL CallDestructor);
384
+        
385
+        /* [helpstring][id] */ HRESULT ( STDMETHODCALLTYPE __RPC_FAR *HandleIsValid )( 
386
+            IHandleAccess __RPC_FAR * This,
387
+            /* [retval][out] */ long __RPC_FAR *isValid);
388
+        
389
+        END_INTERFACE
390
+    } IHandleAccessVtbl;
391
+
392
+#pragma pack(pop)
393
+
394
+    interface IHandleAccess
395
+    {
396
+        CONST_VTBL struct IHandleAccessVtbl __RPC_FAR *lpVtbl;
397
+    };
398
+
399
+    
400
+
401
+#ifdef COBJMACROS
402
+
403
+
404
+#define IHandleAccess_QueryInterface(This,riid,ppvObject) \
405
+    (This)->lpVtbl -> QueryInterface(This,riid,ppvObject)
406
+
407
+#define IHandleAccess_AddRef(This)  \
408
+    (This)->lpVtbl -> AddRef(This)
409
+
410
+#define IHandleAccess_Release(This) \
411
+    (This)->lpVtbl -> Release(This)
412
+
413
+
414
+#define IHandleAccess_GetTypeInfoCount(This,pctinfo)  \
415
+    (This)->lpVtbl -> GetTypeInfoCount(This,pctinfo)
416
+
417
+#define IHandleAccess_GetTypeInfo(This,iTInfo,lcid,ppTInfo) \
418
+    (This)->lpVtbl -> GetTypeInfo(This,iTInfo,lcid,ppTInfo)
419
+
420
+#define IHandleAccess_GetIDsOfNames(This,riid,rgszNames,cNames,lcid,rgDispId) \
421
+    (This)->lpVtbl -> GetIDsOfNames(This,riid,rgszNames,cNames,lcid,rgDispId)
422
+
423
+#define IHandleAccess_Invoke(This,dispIdMember,riid,lcid,wFlags,pDispParams,pVarResult,pExcepInfo,puArgErr) \
424
+    (This)->lpVtbl -> Invoke(This,dispIdMember,riid,lcid,wFlags,pDispParams,pVarResult,pExcepInfo,puArgErr)
425
+
426
+
427
+#define IHandleAccess_HandleAccess(This,rVal) \
428
+    (This)->lpVtbl -> HandleAccess(This,rVal)
429
+
430
+#define IHandleAccess_HandleEnterCriticalSection(This)  \
431
+    (This)->lpVtbl -> HandleEnterCriticalSection(This)
432
+
433
+#define IHandleAccess_HandleLeaveCriticalSection(This)  \
434
+    (This)->lpVtbl -> HandleLeaveCriticalSection(This)
435
+
436
+#define IHandleAccess_HandleCleanUp(This,CallDestructor)  \
437
+    (This)->lpVtbl -> HandleCleanUp(This,CallDestructor)
438
+
439
+#define IHandleAccess_HandleIsValid(This,isValid) \
440
+    (This)->lpVtbl -> HandleIsValid(This,isValid)
441
+
442
+#endif /* COBJMACROS */
443
+
444
+
445
+#endif  /* C style interface */
446
+
447
+
448
+
449
+/* [helpstring][hidden][id] */ HRESULT STDMETHODCALLTYPE IHandleAccess_HandleAccess_Proxy( 
450
+    IHandleAccess __RPC_FAR * This,
451
+    /* [retval][out] */ long __RPC_FAR *rVal);
452
+
453
+
454
+void __RPC_STUB IHandleAccess_HandleAccess_Stub(
455
+    IRpcStubBuffer *This,
456
+    IRpcChannelBuffer *_pRpcChannelBuffer,
457
+    PRPC_MESSAGE _pRpcMessage,
458
+    DWORD *_pdwStubPhase);
459
+
460
+
461
+/* [helpstring][hidden][id] */ HRESULT STDMETHODCALLTYPE IHandleAccess_HandleEnterCriticalSection_Proxy( 
462
+    IHandleAccess __RPC_FAR * This);
463
+
464
+
465
+void __RPC_STUB IHandleAccess_HandleEnterCriticalSection_Stub(
466
+    IRpcStubBuffer *This,
467
+    IRpcChannelBuffer *_pRpcChannelBuffer,
468
+    PRPC_MESSAGE _pRpcMessage,
469
+    DWORD *_pdwStubPhase);
470
+
471
+
472
+/* [helpstring][hidden][id] */ HRESULT STDMETHODCALLTYPE IHandleAccess_HandleLeaveCriticalSection_Proxy( 
473
+    IHandleAccess __RPC_FAR * This);
474
+
475
+
476
+void __RPC_STUB IHandleAccess_HandleLeaveCriticalSection_Stub(
477
+    IRpcStubBuffer *This,
478
+    IRpcChannelBuffer *_pRpcChannelBuffer,
479
+    PRPC_MESSAGE _pRpcMessage,
480
+    DWORD *_pdwStubPhase);
481
+
482
+
483
+/* [helpstring][hidden][id] */ HRESULT STDMETHODCALLTYPE IHandleAccess_HandleCleanUp_Proxy( 
484
+    IHandleAccess __RPC_FAR * This,
485
+    /* [in] */ BOOL CallDestructor);
486
+
487
+
488
+void __RPC_STUB IHandleAccess_HandleCleanUp_Stub(
489
+    IRpcStubBuffer *This,
490
+    IRpcChannelBuffer *_pRpcChannelBuffer,
491
+    PRPC_MESSAGE _pRpcMessage,
492
+    DWORD *_pdwStubPhase);
493
+
494
+
495
+/* [helpstring][id] */ HRESULT STDMETHODCALLTYPE IHandleAccess_HandleIsValid_Proxy( 
496
+    IHandleAccess __RPC_FAR * This,
497
+    /* [retval][out] */ long __RPC_FAR *isValid);
498
+
499
+
500
+void __RPC_STUB IHandleAccess_HandleIsValid_Stub(
501
+    IRpcStubBuffer *This,
502
+    IRpcChannelBuffer *_pRpcChannelBuffer,
503
+    PRPC_MESSAGE _pRpcMessage,
504
+    DWORD *_pdwStubPhase);
505
+
506
+
507
+
508
+#endif  /* __IHandleAccess_INTERFACE_DEFINED__ */
509
+
510
+
511
+/* Additional Prototypes for ALL interfaces */
512
+
513
+/* end of Additional Prototypes */
514
+
515
+#ifdef __cplusplus
516
+}
517
+#endif
518
+
519
+#endif

+ 63 - 0
3rdparty/include22/halcon/com/HalconXimport.idl

@@ -0,0 +1,63 @@
1
+/*****************************************************************************
2
+ * HalconXimport.idl
3
+ ***************************************************************************** 
4
+ *
5
+ * Project:     HALCON/COM
6
+ * Description: Interfaces required for building COM extension packages
7
+ *
8
+ * (c) 1996-2020 by MVTec Software GmbH
9
+ *               www.mvtec.com 
10
+ * 
11
+ *****************************************************************************/
12
+
13
+import "oaidl.idl";
14
+import "ocidl.idl";
15
+
16
+// Interface: IHObjectX
17
+[
18
+  object,
19
+  uuid(6ebd90c3-d219-11d2-ade5-0000c00f4ef9),
20
+  dual,
21
+  helpstring("Instance of an iconic object. Base class for HImage, HRegion,..."),
22
+  pointer_default(unique)
23
+]
24
+interface IHObjectX : IDispatch
25
+{
26
+}
27
+
28
+// Interface: IHUntypedObjectX
29
+[
30
+  object,
31
+  uuid(6ebd90c4-d219-11d2-ade5-0000c00f4ef9),
32
+  dual,
33
+  helpstring("weak typed data type for object parameters."),
34
+  pointer_default(unique)
35
+]
36
+interface IHUntypedObjectX : IDispatch
37
+{
38
+}
39
+
40
+
41
+
42
+// Interface: IHandleAccess
43
+[
44
+  object,
45
+  uuid(6ebd90d2-d219-11d2-ade5-0000c00f4ef9),
46
+  dual,
47
+  helpstring("interface for accessing the handle"),
48
+  pointer_default(unique)
49
+]
50
+interface IHandleAccess : IDispatch
51
+{
52
+    [id(0), hidden, helpstring("read out the handle...")]
53
+        HRESULT HandleAccess([out, retval] long *rVal);
54
+    [id(1), hidden, helpstring("set the semaphore")]
55
+        HRESULT HandleEnterCriticalSection();
56
+    [id(2), hidden, helpstring("release the semaphore")]
57
+        HRESULT HandleLeaveCriticalSection();
58
+    [id(3), hidden, helpstring("call the class destructor")]
59
+        HRESULT HandleCleanUp([in] BOOL CallDestructor);
60
+    [id(4), helpstring("check handle - is the object valid?")]
61
+        HRESULT HandleIsValid([out, retval] long *isValid);
62
+}
63
+

+ 54 - 0
3rdparty/include22/halcon/com/HalconXimport_i.c

@@ -0,0 +1,54 @@
1
+/* this file contains the actual definitions of */
2
+/* the IIDs and CLSIDs */
3
+
4
+/* link this file in with the server and any clients */
5
+
6
+
7
+/* File created by MIDL compiler version 5.01.0164 */
8
+/* at Sat Feb 26 17:53:32 2000
9
+ */
10
+/* Compiler settings for C:\Halcon\source\packages\grayfeat\source\com\HalconXimport.idl:
11
+    Os (OptLev=s), W1, Zp8, env=Win32, ms_ext, c_ext
12
+    error checks: allocation ref bounds_check enum stub_data 
13
+*/
14
+//@@MIDL_FILE_HEADING(  )
15
+#ifdef __cplusplus
16
+extern "C"{
17
+#endif 
18
+
19
+
20
+#ifndef __IID_DEFINED__
21
+#define __IID_DEFINED__
22
+
23
+#pragma pack(push,8) /* sets the struct member alignment to 8 bytes (default)*/
24
+
25
+typedef struct _IID
26
+{
27
+    unsigned long x;
28
+    unsigned short s1;
29
+    unsigned short s2;
30
+    unsigned char  c[8];
31
+} IID;
32
+
33
+#pragma pack(pop)
34
+
35
+#endif // __IID_DEFINED__
36
+
37
+#ifndef CLSID_DEFINED
38
+#define CLSID_DEFINED
39
+typedef IID CLSID;
40
+#endif // CLSID_DEFINED
41
+
42
+const IID IID_IHObjectX = {0x6ebd90c3,0xd219,0x11d2,{0xad,0xe5,0x00,0x00,0xc0,0x0f,0x4e,0xf9}};
43
+
44
+
45
+const IID IID_IHUntypedObjectX = {0x6ebd90c4,0xd219,0x11d2,{0xad,0xe5,0x00,0x00,0xc0,0x0f,0x4e,0xf9}};
46
+
47
+
48
+const IID IID_IHandleAccess = {0x6ebd90d2,0xd219,0x11d2,{0xad,0xe5,0x00,0x00,0xc0,0x0f,0x4e,0xf9}};
49
+
50
+
51
+#ifdef __cplusplus
52
+}
53
+#endif
54
+

+ 208 - 0
3rdparty/include22/halcon/halconc/Hdevthread.h

@@ -0,0 +1,208 @@
1
+/*****************************************************************************
2
+ * Hdevthread.h
3
+ *****************************************************************************
4
+ *
5
+ * Project:     HALCON/C
6
+ * Description: generic HALCON/C thread interface for hdevelop's HALCON/C
7
+ *              export (for internal use only, signatures and functionality 
8
+ *              may change )
9
+ *
10
+ * (c) 2014-2020 by MVTec Software GmbH
11
+ *                  www.mvtec.com
12
+ *
13
+ ****************************************************************************/
14
+
15
+#ifndef HDEVTHREAD_H
16
+#define HDEVTHREAD_H
17
+
18
+#if defined(__cplusplus)
19
+extern "C" {
20
+#endif
21
+
22
+typedef Hlong Hdevthread;
23
+typedef Hlong Hdevthread_context;
24
+#define HDEVTHREAD_UNDEF          0
25
+#define HDEVTHREAD_CONTEXT_UNDEF  0
26
+
27
+/**************************************************************************
28
+ * HALCON/C Hdevthread interface
29
+ * This interface is for HDevelop C-Export only!
30
+ **************************************************************************/
31
+
32
+/* A thread context marks for the started thread the period the father
33
+ * (=caller) thread stays within the function in which the thread was
34
+ * started. This period is equivalent to the period the output parameters of
35
+ * procedure started within a thread are valid. I.e., a thread has to be
36
+ * joined in the function where it was started if the output parameters
37
+ * should be used.
38
+ * The procedure that is starting a thread has to call create_hdevthread_context
39
+ * after entering (at least before starting the first thread).
40
+ * clear_hdevthread_contex must be called before leaving the calling procedure,
41
+ * but at least after the last join call within this procedure (if present).
42
+ */
43
+LIntExport Herror
44
+create_hdevthread_context( Hdevthread_context *H_RESTRICT context_handle);
45
+LIntExport Herror
46
+clear_hdevthread_context( Hdevthread_context context_handle);
47
+
48
+/* create_hdevthread allocates and initializes a HALCON/C thread handle
49
+ * 'hthread_handle'. This handle will hold the input and output parameters
50
+ * of the procedure that should be called as thread. Therefore, the basic
51
+ * address of this procedure is passed in 'proc' (arbitrary sequence of
52
+ * input/output HALCON/C types, return type void). Accordingly, the total
53
+ * number of input object parameters (iop_num), output object parameters
54
+ * (oop_num), input vector parameters (ivp_num), output vector parameters
55
+ * (ovp_num), input control parameters (icp_num) and output control
56
+ * parameters (ocp_num) of the procedure is passed. The thread instance will
57
+ * be owned  by the started thread and needn't be cleared by the calling
58
+ * thread. */
59
+LIntExport Herror
60
+create_hdevthread( Hdevthread_context const context_handle, void const *proc,
61
+                   Hlong ip_num, Hlong op_num,
62
+                   Hdevthread *H_RESTRICT hthread_handle);
63
+
64
+/* exit thread is called at the end of the thread's execution and clears
65
+ * the hthread handle. */
66
+LIntExport Herror
67
+exit_hdevthread( Hdevthread hthread_handle);
68
+
69
+/* clear_hdevthread frees all data hold by the hthread handle. Generally,
70
+ * it will be called by exit_hdevthread implicitly and needn't be called
71
+ * explicitly. */
72
+LIntExport Herror
73
+clear_hdevthread( Hdevthread hthread_handle);
74
+
75
+/* -------------------------------------------------------------------
76
+ * Functions to set the input/output parameters of the procedure 'proc'
77
+ * within the father thread before starting the new (child) thread:
78
+ * -------------------------------------------------------------------*/
79
+/* set_hdevthread_iop sets a input object parameter of the procedure that should
80
+ * be started as a thread. The object parameter
81
+ * is copied (lazy copy). parpos denotes the x-th occurrence of an input
82
+ * object parameter within the signature of proc, starting with 0.*/
83
+LIntExport Herror
84
+set_hdevthread_iop( Hdevthread hthread_handle, Hlong parpos, Hobject const obj);
85
+
86
+/* set_hdevthread_oop sets a reference on a output object parameter of the
87
+ * procedure that should be started as a thread. parpos denotes the x-th
88
+ * occurrence of an output object parameter within the signature of proc,
89
+ * starting with 0.*/
90
+LIntExport Herror
91
+bind_hdevthread_oop( Hdevthread hthread_handle, Hlong parpos, HBOOL glb_flag,
92
+                     Hobject *obj);
93
+
94
+/* set_hdevthread_ivp sets a input vector parameter (Hvector) of the procedure
95
+ * that should be started as a thread. The input parameter is copied
96
+ * (deep copy). parpos denotes the x-th occurrence of the input vector
97
+ * parameter within the signature of proc, starting with 0.*/
98
+LIntExport Herror
99
+set_hdevthread_ivp( Hdevthread hthread_handle, Hlong parpos, 
100
+                    Hvector const vector);
101
+
102
+/* set_hdevthread_ovp sets the reference on a output vector parameter (Hvector*)
103
+ * of the procedure that should be started as a thread. If a sub vector
104
+ * should be set, the reference of the original vector is passed in  vector,
105
+ * the indices of the sub vector are passed in vec_idx.
106
+ * parpos denotes the x-th occurrence of the output vector
107
+ * parameter within the signature of proc, starting with 0.*/
108
+LIntExport Herror
109
+bind_hdevthread_ovp( Hdevthread hthread_handle, Hlong parpos, HBOOL glb_flag,
110
+                     Hvector *vector, Htuple const vec_idx);
111
+
112
+/* set_hdevthread_icp sets a input control parameter (Htuple) of the procedure
113
+ * that should be started as a thread. The control parameter is copied
114
+ * (deep copy). parpos denotes the x-th occurrence of the input
115
+ * control parameter within the signature of proc, starting with 0.*/
116
+LIntExport Herror
117
+set_hdevthread_icp( Hdevthread hthread_handle, Hlong parpos,
118
+                    Htuple const tpl);
119
+
120
+/* bind_hdevthread_ocp sets a reference on a output control parameter (Htuple*)
121
+ * of the procedure that should be started as a thread.
122
+ * parpos denotes the x-th
123
+ * occurrence of an output control parameter within the signature of proc,
124
+ * starting with 0.*/
125
+LIntExport Herror
126
+bind_hdevthread_ocp( Hdevthread hthread_handle, Hlong parpos, HBOOL glb_flag,
127
+                     Htuple *H_RESTRICT tpl);
128
+
129
+/* -------------------------------------------------------------------
130
+ * Functions to set the input/output parameters of the procedure 'proc'
131
+ * within the child thread:
132
+ * -------------------------------------------------------------------*/
133
+/* get_hdevthread_iop returns a reference on the copied object set with
134
+ * set_hdevthread_iop. */
135
+LIntExport Herror
136
+get_hdevthread_iop( Hdevthread const hthread_handle, Hlong parpos,
137
+                    Hobject *H_RESTRICT* obj);
138
+
139
+/* overwrite_hdevthread_oop writes back the output object parameter on the
140
+ * reference passed in set_hdevthread_oop. */
141
+LIntExport Herror
142
+store_hdevthread_oop( Hdevthread hthread_handle,Hlong parpos,Hobject const obj);
143
+
144
+/* get_hdevthread_ivp returns a reference on the copied vector parameter
145
+ * set with set_hdevthread_ivp. */
146
+LIntExport Herror
147
+get_hdevthread_ivp( Hdevthread const hthread_handle,
148
+                    Hlong parpos, Hvector *H_RESTRICT* vec);
149
+
150
+/* store_hdevthread_ovp writes back the output (sub) vector parameter
151
+ * (generated with create_hdevthread_ovp) on the reference passed in
152
+ * set_hdevthread_ovp. */
153
+LIntExport Herror
154
+store_hdevthread_ovp( Hdevthread hthread_handle, Hlong parpos,
155
+                      Hvector const vector);
156
+
157
+/* get_hdevthread_icp returns a reference on the copied tuple control parameter
158
+ * set with set_hdevthread_icp. */
159
+LIntExport Herror
160
+get_hdevthread_icp( Hdevthread const hthread_handle,
161
+                    Hlong parpos, Htuple *H_RESTRICT* tpl);
162
+
163
+/* store_hdevthread_ocp writes back the output control parameter on the
164
+ * reference passed in set_hdevthread_ocp. */
165
+LIntExport Herror
166
+store_hdevthread_ocp( Hdevthread hthread_handle, Hlong parpos,
167
+		      Htuple const tpl);
168
+
169
+/* start_hdevthread is called by the father thread to start the thread after
170
+ * the parameters are set. Contrary to par_start_hdevthread, start_hdevthread can
171
+ * be used when no thread has to join with the started thread. No thread id
172
+ * is returned, therefore.
173
+ * Attention: Different to HDevelop, the child thread must not run anymore
174
+ * when exiting the program or unloading the HALCON library. Violating this
175
+ * rule might lead to a segmentation fault on exit/unload,
176
+ *  especially on unix systems. */
177
+LIntExport Herror
178
+start_hdevthread( Hdevthread const hthread_handle);
179
+
180
+/* par_start_hdevthread is called by the father thread to start the thread after
181
+ * the parameters are set. Contrary to start_thread, a thread id (par_handle)
182
+ * is returned that can be used by par_join to wait for the started thread
183
+ * exiting.
184
+ * Attention: Different to HDevelop, the child thread must not run anymore
185
+ * when exiting the program or unloading the HALCON library. Violating this
186
+ * rule might lead to a segmentation fault on exit/unload,
187
+ *  especially on unix systems. */
188
+LIntExport Herror
189
+par_start_hdevthread( Hdevthread const hthread_handle,
190
+                      Htuple *H_RESTRICT par_handle);
191
+
192
+/* call_hdevthread_proc calls the procedure specified in create_hdevthread
193
+ * synchronously. This must be used for synchronous procedure calls, when
194
+ * the procedure was started as thread with the same output parameters within
195
+ *  the same hthread context.  */
196
+LIntExport Herror
197
+call_hdevthread_proc( Hdevthread const hthread_handle);
198
+
199
+/* T_par_join_hdevthread waits until all threads addressed by their thread id in
200
+ * par_handle finished. */
201
+LIntExport Herror
202
+T_par_join_hdevthread( Htuple const par_handles);
203
+
204
+#if defined(__cplusplus)
205
+}
206
+#endif
207
+
208
+#endif

+ 225 - 0
3rdparty/include22/halcon/halconc/Hvector.h

@@ -0,0 +1,225 @@
1
+/*****************************************************************************
2
+ * Hvector.h
3
+ *****************************************************************************
4
+ *
5
+ * Project:     HALCON/C
6
+ * Description: HALCON/C implementation of HDevelop vectors
7
+ *
8
+ * (c) 2014-2020 by MVTec Software GmbH
9
+ *                  www.mvtec.com
10
+ *
11
+ ****************************************************************************/
12
+
13
+#ifndef HVECTOR_H
14
+#define HVECTOR_H
15
+
16
+#if defined(__cplusplus)
17
+extern "C" {
18
+#endif
19
+
20
+/*
21
+ * The data structure Hvector is used to the vector functionality of the
22
+ * hdevelop language. Creating, access and deletion must only be done with the
23
+ * supplied procedures.
24
+ */
25
+typedef Hlong Hvector; /* Handle implementation of vector */
26
+typedef enum {
27
+  eVector=0x05EC0000,eTupleVector,eTupleLeaf,eObjectVector,eObjectLeaf
28
+} Hvectype;
29
+
30
+#define HVECTOR_UNDEF 0
31
+
32
+/**************************************************************************
33
+ * Hvector functionality
34
+ *************************************************************************/
35
+
36
+/* create_obj_vector creates an empty vector of dimension dim. The vector is
37
+ * returned in vec and can contain objects only.*/
38
+LIntExport Herror V_create_obj_vector(Hlong dim, Hvector *H_RESTRICT vec);
39
+
40
+/* create_tuple_vector creates an empty vector of dimension dim. The vector is
41
+ * returned in vec and can contain tuples only.*/
42
+LIntExport Herror V_create_tuple_vector(Hlong dim, Hvector *H_RESTRICT vec);
43
+
44
+/* destroy_vector frees the vector, its subvectors and leafs of any type and
45
+ * dimension. */
46
+LIntExport Herror V_destroy_vector(Hvector vec);
47
+
48
+/* copy_vector returns a copy of src in dest. Deep copy is performed. */
49
+LIntExport Herror V_copy_vector(Hvector const src, Hvector *H_RESTRICT dest);
50
+
51
+/* set_vector_elem sets a sub vector subvec in vector vec. Therefore,
52
+ * index addresses a sub vector that gets replaced by subvec. The old sub
53
+ * vector is freed if existing. Otherwise, vec is extended accordingly (and
54
+ * initialized with empty elements) to fulfill index.(self modifying)
55
+ * Precondition: type(subvec) == type(vec) && dim(vec) == dim(subvec)+|index|
56
+ */
57
+LIntExport Herror V_set_vector_elem(Hvector vec, Htuple const vec_idx,
58
+                                    Hvector const subvec);
59
+
60
+/* set_vector_obj sets a iconic object obj in vector vec. Therefore,
61
+ * vec_idx addresses an object in vec that gets replaced by obj. The old
62
+ * iconic object in vec is freed if existing. Otherwise, vec is extended
63
+ * accordingly (and initialized with empty elements) to fulfill vec_idx.(self
64
+ * modifying)
65
+ * Precondition: type(vec) == eObjectVector && dim(vec) == dim(subvec)+|index|
66
+ */
67
+LIntExport Herror V_set_vector_obj(Hobject const obj, Hvector vec,
68
+                                   Htuple const vec_idx);
69
+
70
+/* set_vector_tuple sets a tuple tpl in vector vec. Therefore,
71
+ * vec_idx addresses a tuple in vec that gets replaced by obj. The old tuple
72
+ * in vec is freed if existing. Otherwise, vec is extended accordingly (and
73
+ * initialized with empty elements) to fulfill vec_idx.(self modifying)
74
+ * Precondition: type(vec) == eTupleVector && dim(vec) == |index|
75
+ */
76
+LIntExport Herror V_set_vector_tuple(Hvector vec, Htuple const vec_idx,
77
+                                     Htuple const tpl);
78
+
79
+/* set_vector_tuple_elem executes a self modifying tuple_replace in the indexed
80
+ * tuple in vec. vec_idx is a tuple of n=dim elements and indexes the tuple
81
+ * in vec. tpl_idx contains the tuple indices to be replaced. val contains
82
+ * the values to set.
83
+ * If the length of any sub vector indexed by vec_idx is not sufficient,
84
+ * set_vector_tuple_elem extends it automatically (initialized with empty
85
+ * elements).
86
+ * Precondition: type(vec) == eTupleVector && dim(vec) == |vec_idx|. */
87
+LIntExport Herror V_set_vector_tuple_elem(Hvector vec, Htuple const vec_idx,
88
+                                          Htuple const tpl_idx, 
89
+                                          Htuple const val);
90
+
91
+
92
+/* get_vector_elem returns a copy of the sub vector of vec at index. The
93
+ * error H_ERR_WIPV2 is returned if any value of index addresses an element
94
+ * of a sub vector of vec beyond its length.
95
+ * Remark: dim(subvec) = dim(vec)-|index|
96
+ *         type(subvec) = type(vec) */
97
+LIntExport Herror V_get_vector_elem(Hvector const vec, Htuple const index,
98
+                                    Hvector *H_RESTRICT subvec);
99
+
100
+/* get_vector_obj returns a copy of an iconic object of vec at index. The
101
+ * error H_ERR_WIPV2 is returned if any value of index addresses an element of a
102
+ * sub vector of vec beyond its length.
103
+ * Precondition: dim(vec) == |index| && type(vec) == eObjectVector */
104
+LIntExport Herror V_get_vector_obj(Hobject *H_RESTRICT obj, Hvector const vec,
105
+                                   Htuple const index);
106
+
107
+/* get_vector_tuple returns a copy of a tuple of vector vec at index. The
108
+ * error H_ERR_WIPV2 is returned if any value of index addresses an element of
109
+ * a sub vector of vec beyond its length.
110
+ * Precondition: dim(vec) == |index| && type(vec) == eTupleVector */
111
+LIntExport Herror V_get_vector_tuple( Hvector const vec, Htuple const index,
112
+                                      Htuple *H_RESTRICT tpl);
113
+
114
+
115
+/* concat_vector appends vec2 at vec1 and returns the concatenated vector in
116
+ * concat. vec1 and vec2 have to be of same dimension and type. */
117
+LIntExport Herror V_concat_vector(Hvector const vec1, Hvector const vec2,
118
+                                  Hvector *H_RESTRICT vec_concat);
119
+
120
+/* insert_vector_elem inserts a vector ins at position ins_idx into a
121
+ * sub vector of vec, indexed by vec_idx.
122
+ * Different to set_vector_elem, the length of the sub vector indexed by
123
+ * vec_idx gets increased by one. (self modifying)
124
+ * Precondition: dim(vec) == dim(ins)+|vec_ins|
125
+ *               type(ins) == type(vec)
126
+ *               |ins_idx| == 1 */
127
+LIntExport Herror V_insert_vector_elem(Hvector vec, Htuple const vec_idx,
128
+                                       Htuple const ins_idx,
129
+                                       Hvector const ins);
130
+
131
+/* remove_vector_elem is the counterpart of insert_vector_elem. It frees all
132
+ * contents at position rmv_idx of a sub vector indexed by vec_idx.
133
+ * If the sub vector indexed by vec_idx does not exist, it gets created.
134
+ * The length of the sub vector indexed by vec_idx gets decreased by one,
135
+ * when rmv_idx is smaller than the length of the sub vector. (self modifying)
136
+ * Precondition: dim(vec)>=|vec_idx| */
137
+LIntExport Herror V_remove_vector_elem(Hvector vec, Htuple const vec_idx,
138
+                                       Htuple const rmv_idx);
139
+
140
+/* clear_vector frees all contents of a sub vector of vec and makes it empty.
141
+ * The sub vector is indexed by 'index'. Type and dimension of the sub
142
+ * vector remain. (self modifying)
143
+ * Precondition: dim(vec)>=|index| */
144
+LIntExport Herror V_clear_vector(Hvector vec, Htuple const index);
145
+
146
+/* insert_vector_obj inserts an iconic object obj at position ins_idx into a
147
+ * sub vector of vec, indexed by vec_idx.
148
+ * Different to set_vector_obj, the length of the sub vector indexed by
149
+ * vec_idx gets increased by one. (self modifying)
150
+ * Precondition: dim(vec) == |vec_ins|
151
+ *               type(vec) == eObjectVector
152
+ *               |ins_idx| == 1 */
153
+LIntExport Herror V_insert_vector_obj(Hobject const obj, Hvector vec,
154
+                                      Htuple const vec_idx,Htuple const ins_idx);
155
+
156
+/* insert_vector_tupel inserts a tuple tpl at position ins_idx into a
157
+ * sub vector of vec, indexed by vec_idx.
158
+ * Different to set_vector_tuple, the length of the sub vector indexed by
159
+ * vec_idx gets increased by one. (self modifying)
160
+ * Precondition: dim(vec) == |vec_ins|
161
+ *               type(vec) == eTupleVector
162
+ *               |ins_idx| == 1 */
163
+LIntExport Herror V_insert_vector_tuple(Hvector vec, Htuple const vec_idx,
164
+                                        Htuple const ins_idx, Htuple const tpl);
165
+
166
+/* convert_vector_to_tuple concatenates the tuple leafs of a tuple vector
167
+ * vec  into one tuple tpl.
168
+ * Precondition: type(vec) == eTupleVector */
169
+LIntExport Herror V_convert_vector_to_tuple( Hvector const vec, 
170
+                                             Htuple *H_RESTRICT tpl);
171
+
172
+/* convert_tuple_to_vector_1d separates the tuple elements of tpl according
173
+ * to the length values in lengths into new sub tuples and generates a new
174
+ * tuple vector vec with all these tuples as leafs. If lengths contains only
175
+ * one value, tpl is separated into tuples of the same length (with the last
176
+ * tuple containing the residuum).
177
+ * Precondition: |lengths|==1 || sum(lengths)==|tpl|
178
+ *   dim(vec)=1, type(vec)=eTupleVector */
179
+LIntExport Herror V_convert_tuple_to_vector_1d( Htuple const tpl,
180
+                                                Htuple const lengths,
181
+                                                Hvector *H_RESTRICT vec);
182
+
183
+/* vector_equal returns TRUE if both vectors are identic. I.e.
184
+ * both vectors have the same 'tree', the same type, and test_equal_obj
185
+ * (tuple_equal, respectively) is true for all leafs. Else, equal is set
186
+ * to FALSE.*/
187
+LIntExport Herror V_vector_equal(Hvector const vec1, Hvector const vec2,
188
+                                 HBOOL *H_RESTRICT equal);
189
+
190
+/* vector_dim returns the dimensionality of the vector vec */
191
+LIntExport Herror V_vector_dim(Hvector const vec, Hlong *H_RESTRICT dim);
192
+
193
+/* vector type returns the type of the vector. eTupleVector, eObjectVector
194
+ * are possible values */
195
+LIntExport Herror V_vector_type(Hvector const vec, Hvectype *H_RESTRICT type);
196
+
197
+/* vector_length returns the number of elements in vec */
198
+LIntExport Herror V_vector_length(Hvector const vec,
199
+                                  Hlong *H_RESTRICT length);
200
+
201
+/* V_sub_vector_length returns the number of elements of a sub vector of vec,
202
+ * indexed by vec_idx. Passing an empty tuple for vec_idx receives the same 
203
+ * result as V_vector_length. */
204
+LIntExport Herror V_sub_vector_length(Hvector const vec, Htuple const vec_idx,
205
+                                      Hlong *H_RESTRICT length);
206
+
207
+/* Some printf auxiliary functions for debug support. They allow to transform
208
+ * the basic HALCON/C data types into readable strings.
209
+ * str points to a pre-allocated buffer of size bytes.
210
+ * Upon successful completion, the Hsnprintf_* functions shall return the
211
+ * number of bytes that would be written to str had size been sufficiently
212
+ * large excluding the terminating null byte. If an output error was
213
+ * encountered, these functions shall return a negative value.*/
214
+LIntExport int Hsnprintf_Hvector( char *H_RESTRICT str, Hlong size,
215
+                                  Hvector const vec);
216
+LIntExport int Hsnprintf_Htuple( char *H_RESTRICT str, Hlong size,
217
+                                  Htuple const tpl);
218
+LIntExport int Hsnprintf_Hobject( char *H_RESTRICT str, Hlong size,
219
+                                  Hobject const obj);
220
+
221
+#if defined(__cplusplus)
222
+}
223
+#endif
224
+
225
+#endif

+ 317 - 0
3rdparty/include22/halcon/halconcpp/HBarCode.h

@@ -0,0 +1,317 @@
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
+
8
+
9
+#ifndef HCPP_HBARCODE
10
+#define HCPP_HBARCODE
11
+
12
+namespace HalconCpp
13
+{
14
+
15
+// Represents an instance of a bar code reader.
16
+class LIntExport HBarCode : public HHandle
17
+{
18
+
19
+public:
20
+
21
+  // Create an uninitialized instance
22
+  HBarCode():HHandle() {}
23
+
24
+  // Copy constructor
25
+  HBarCode(const HBarCode& source) : HHandle(source) {}
26
+
27
+  // Copy constructor
28
+  HBarCode(const HHandle& handle);
29
+
30
+  // Create HBarCode from handle, taking ownership
31
+  explicit HBarCode(Hlong handle);
32
+
33
+  bool operator==(const HHandle& obj) const
34
+  {
35
+    return HHandleBase::operator==(obj);
36
+  }
37
+
38
+  bool operator!=(const HHandle& obj) const
39
+  {
40
+    return HHandleBase::operator!=(obj);
41
+  }
42
+
43
+protected:
44
+
45
+  // Verify matching semantic type ('barcode')!
46
+  virtual void AssertType(Hphandle handle) const;
47
+
48
+public:
49
+
50
+  // Deep copy of all data represented by this object instance
51
+  HBarCode Clone() const;
52
+
53
+
54
+
55
+/*****************************************************************************
56
+ * Operator-based class constructors
57
+ *****************************************************************************/
58
+
59
+  // read_bar_code_model: Read a bar code model from a file and create a new model.
60
+  explicit HBarCode(const HString& FileName);
61
+
62
+  // read_bar_code_model: Read a bar code model from a file and create a new model.
63
+  explicit HBarCode(const char* FileName);
64
+
65
+#ifdef _WIN32
66
+  // read_bar_code_model: Read a bar code model from a file and create a new model.
67
+  explicit HBarCode(const wchar_t* FileName);
68
+#endif
69
+
70
+  // create_bar_code_model: Create a model of a bar code reader.
71
+  explicit HBarCode(const HTuple& GenParamName, const HTuple& GenParamValue);
72
+
73
+  // create_bar_code_model: Create a model of a bar code reader.
74
+  explicit HBarCode(const HString& GenParamName, double GenParamValue);
75
+
76
+  // create_bar_code_model: Create a model of a bar code reader.
77
+  explicit HBarCode(const char* GenParamName, double GenParamValue);
78
+
79
+#ifdef _WIN32
80
+  // create_bar_code_model: Create a model of a bar code reader.
81
+  explicit HBarCode(const wchar_t* GenParamName, double GenParamValue);
82
+#endif
83
+
84
+
85
+
86
+
87
+  /***************************************************************************
88
+   * Operators                                                               *
89
+   ***************************************************************************/
90
+
91
+  // Deserialize a bar code model.
92
+  void DeserializeBarCodeModel(const HSerializedItem& SerializedItemHandle);
93
+
94
+  // Serialize a bar code model.
95
+  HSerializedItem SerializeBarCodeModel() const;
96
+
97
+  // Read a bar code model from a file and create a new model.
98
+  void ReadBarCodeModel(const HString& FileName);
99
+
100
+  // Read a bar code model from a file and create a new model.
101
+  void ReadBarCodeModel(const char* FileName);
102
+
103
+#ifdef _WIN32
104
+  // Read a bar code model from a file and create a new model.
105
+  void ReadBarCodeModel(const wchar_t* FileName);
106
+#endif
107
+
108
+  // Write a bar code model to a file.
109
+  void WriteBarCodeModel(const HString& FileName) const;
110
+
111
+  // Write a bar code model to a file.
112
+  void WriteBarCodeModel(const char* FileName) const;
113
+
114
+#ifdef _WIN32
115
+  // Write a bar code model to a file.
116
+  void WriteBarCodeModel(const wchar_t* FileName) const;
117
+#endif
118
+
119
+  // Access iconic objects that were created during the search or decoding of bar code symbols.
120
+  HObject GetBarCodeObject(const HTuple& CandidateHandle, const HString& ObjectName) const;
121
+
122
+  // Access iconic objects that were created during the search or decoding of bar code symbols.
123
+  HObject GetBarCodeObject(const HString& CandidateHandle, const HString& ObjectName) const;
124
+
125
+  // Access iconic objects that were created during the search or decoding of bar code symbols.
126
+  HObject GetBarCodeObject(const char* CandidateHandle, const char* ObjectName) const;
127
+
128
+#ifdef _WIN32
129
+  // Access iconic objects that were created during the search or decoding of bar code symbols.
130
+  HObject GetBarCodeObject(const wchar_t* CandidateHandle, const wchar_t* ObjectName) const;
131
+#endif
132
+
133
+  // Get the alphanumerical results that were accumulated during the decoding of bar code symbols.
134
+  HTuple GetBarCodeResult(const HTuple& CandidateHandle, const HString& ResultName) const;
135
+
136
+  // Get the alphanumerical results that were accumulated during the decoding of bar code symbols.
137
+  HTuple GetBarCodeResult(const HString& CandidateHandle, const HString& ResultName) const;
138
+
139
+  // Get the alphanumerical results that were accumulated during the decoding of bar code symbols.
140
+  HTuple GetBarCodeResult(const char* CandidateHandle, const char* ResultName) const;
141
+
142
+#ifdef _WIN32
143
+  // Get the alphanumerical results that were accumulated during the decoding of bar code symbols.
144
+  HTuple GetBarCodeResult(const wchar_t* CandidateHandle, const wchar_t* ResultName) const;
145
+#endif
146
+
147
+  // Decode bar code symbols within a rectangle.
148
+  HTuple DecodeBarCodeRectangle2(const HImage& Image, const HTuple& CodeType, const HTuple& Row, const HTuple& Column, const HTuple& Phi, const HTuple& Length1, const HTuple& Length2) const;
149
+
150
+  // Decode bar code symbols within a rectangle.
151
+  HString DecodeBarCodeRectangle2(const HImage& Image, const HString& CodeType, double Row, double Column, double Phi, double Length1, double Length2) const;
152
+
153
+  // Decode bar code symbols within a rectangle.
154
+  HString DecodeBarCodeRectangle2(const HImage& Image, const char* CodeType, double Row, double Column, double Phi, double Length1, double Length2) const;
155
+
156
+#ifdef _WIN32
157
+  // Decode bar code symbols within a rectangle.
158
+  HString DecodeBarCodeRectangle2(const HImage& Image, const wchar_t* CodeType, double Row, double Column, double Phi, double Length1, double Length2) const;
159
+#endif
160
+
161
+  // Detect and read bar code symbols in an image.
162
+  HRegion FindBarCode(const HImage& Image, const HTuple& CodeType, HTuple* DecodedDataStrings) const;
163
+
164
+  // Detect and read bar code symbols in an image.
165
+  HRegion FindBarCode(const HImage& Image, const HString& CodeType, HString* DecodedDataStrings) const;
166
+
167
+  // Detect and read bar code symbols in an image.
168
+  HRegion FindBarCode(const HImage& Image, const char* CodeType, HString* DecodedDataStrings) const;
169
+
170
+#ifdef _WIN32
171
+  // Detect and read bar code symbols in an image.
172
+  HRegion FindBarCode(const HImage& Image, const wchar_t* CodeType, HString* DecodedDataStrings) const;
173
+#endif
174
+
175
+  // Get the names of the parameters that can be used in set_bar_code* and get_bar_code* operators for a given bar code model
176
+  HTuple QueryBarCodeParams(const HString& Properties) const;
177
+
178
+  // Get the names of the parameters that can be used in set_bar_code* and get_bar_code* operators for a given bar code model
179
+  HTuple QueryBarCodeParams(const char* Properties) const;
180
+
181
+#ifdef _WIN32
182
+  // Get the names of the parameters that can be used in set_bar_code* and get_bar_code* operators for a given bar code model
183
+  HTuple QueryBarCodeParams(const wchar_t* Properties) const;
184
+#endif
185
+
186
+  // Get parameters that are used by the bar code reader when processing a specific bar code type. 
187
+  HTuple GetBarCodeParamSpecific(const HTuple& CodeTypes, const HTuple& GenParamName) const;
188
+
189
+  // Get parameters that are used by the bar code reader when processing a specific bar code type. 
190
+  HTuple GetBarCodeParamSpecific(const HString& CodeTypes, const HString& GenParamName) const;
191
+
192
+  // Get parameters that are used by the bar code reader when processing a specific bar code type. 
193
+  HTuple GetBarCodeParamSpecific(const char* CodeTypes, const char* GenParamName) const;
194
+
195
+#ifdef _WIN32
196
+  // Get parameters that are used by the bar code reader when processing a specific bar code type. 
197
+  HTuple GetBarCodeParamSpecific(const wchar_t* CodeTypes, const wchar_t* GenParamName) const;
198
+#endif
199
+
200
+  // Get one or several parameters that describe the bar code model.
201
+  HTuple GetBarCodeParam(const HTuple& GenParamName) const;
202
+
203
+  // Get one or several parameters that describe the bar code model.
204
+  HTuple GetBarCodeParam(const HString& GenParamName) const;
205
+
206
+  // Get one or several parameters that describe the bar code model.
207
+  HTuple GetBarCodeParam(const char* GenParamName) const;
208
+
209
+#ifdef _WIN32
210
+  // Get one or several parameters that describe the bar code model.
211
+  HTuple GetBarCodeParam(const wchar_t* GenParamName) const;
212
+#endif
213
+
214
+  // Set selected parameters of the bar code model for selected bar code types
215
+  void SetBarCodeParamSpecific(const HTuple& CodeTypes, const HTuple& GenParamName, const HTuple& GenParamValue) const;
216
+
217
+  // Set selected parameters of the bar code model for selected bar code types
218
+  void SetBarCodeParamSpecific(const HString& CodeTypes, const HString& GenParamName, const HTuple& GenParamValue) const;
219
+
220
+  // Set selected parameters of the bar code model for selected bar code types
221
+  void SetBarCodeParamSpecific(const char* CodeTypes, const char* GenParamName, const HTuple& GenParamValue) const;
222
+
223
+#ifdef _WIN32
224
+  // Set selected parameters of the bar code model for selected bar code types
225
+  void SetBarCodeParamSpecific(const wchar_t* CodeTypes, const wchar_t* GenParamName, const HTuple& GenParamValue) const;
226
+#endif
227
+
228
+  // Set selected parameters of the bar code model.
229
+  void SetBarCodeParam(const HTuple& GenParamName, const HTuple& GenParamValue) const;
230
+
231
+  // Set selected parameters of the bar code model.
232
+  void SetBarCodeParam(const HString& GenParamName, double GenParamValue) const;
233
+
234
+  // Set selected parameters of the bar code model.
235
+  void SetBarCodeParam(const char* GenParamName, double GenParamValue) const;
236
+
237
+#ifdef _WIN32
238
+  // Set selected parameters of the bar code model.
239
+  void SetBarCodeParam(const wchar_t* GenParamName, double GenParamValue) const;
240
+#endif
241
+
242
+  // Delete a bar code model and free the allocated memory
243
+  static void ClearBarCodeModel(const HBarCodeArray& BarCodeHandle);
244
+
245
+  // Delete a bar code model and free the allocated memory
246
+  void ClearBarCodeModel() const;
247
+
248
+  // Create a model of a bar code reader.
249
+  void CreateBarCodeModel(const HTuple& GenParamName, const HTuple& GenParamValue);
250
+
251
+  // Create a model of a bar code reader.
252
+  void CreateBarCodeModel(const HString& GenParamName, double GenParamValue);
253
+
254
+  // Create a model of a bar code reader.
255
+  void CreateBarCodeModel(const char* GenParamName, double GenParamValue);
256
+
257
+#ifdef _WIN32
258
+  // Create a model of a bar code reader.
259
+  void CreateBarCodeModel(const wchar_t* GenParamName, double GenParamValue);
260
+#endif
261
+
262
+};
263
+
264
+// forward declarations and types for internal array implementation
265
+
266
+template<class T> class HSmartPtr;
267
+template<class T> class HHandleBaseArrayRef;
268
+
269
+typedef HHandleBaseArrayRef<HBarCode> HBarCodeArrayRef;
270
+typedef HSmartPtr< HBarCodeArrayRef > HBarCodeArrayPtr;
271
+
272
+
273
+// Represents multiple tool instances
274
+class LIntExport HBarCodeArray : public HHandleBaseArray
275
+{
276
+
277
+public:
278
+
279
+  // Create empty array
280
+  HBarCodeArray();
281
+
282
+  // Create array from native array of tool instances
283
+  HBarCodeArray(HBarCode* classes, Hlong length);
284
+
285
+  // Copy constructor
286
+  HBarCodeArray(const HBarCodeArray &tool_array);
287
+
288
+  // Destructor
289
+  virtual ~HBarCodeArray();
290
+
291
+  // Assignment operator
292
+  HBarCodeArray &operator=(const HBarCodeArray &tool_array);
293
+
294
+  // Clears array and all tool instances
295
+  virtual void Clear();
296
+
297
+  // Get array of native tool instances
298
+  const HBarCode* Tools() const;
299
+
300
+  // Get number of tools
301
+  virtual Hlong Length() const;
302
+
303
+  // Create tool array from tuple of handles
304
+  virtual void SetFromTuple(const HTuple& handles);
305
+
306
+  // Get tuple of handles for tool array
307
+  virtual HTuple ConvertToTuple() const;
308
+
309
+protected:
310
+
311
+// Smart pointer to internal data container
312
+   HBarCodeArrayPtr *mArrayPtr;
313
+};
314
+
315
+}
316
+
317
+#endif

+ 152 - 0
3rdparty/include22/halcon/halconcpp/HBarrier.h

@@ -0,0 +1,152 @@
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
+
8
+
9
+#ifndef HCPP_HBARRIER
10
+#define HCPP_HBARRIER
11
+
12
+namespace HalconCpp
13
+{
14
+
15
+// Represents an instance of a barrier synchronization object.
16
+class LIntExport HBarrier : public HHandle
17
+{
18
+
19
+public:
20
+
21
+  // Create an uninitialized instance
22
+  HBarrier():HHandle() {}
23
+
24
+  // Copy constructor
25
+  HBarrier(const HBarrier& source) : HHandle(source) {}
26
+
27
+  // Copy constructor
28
+  HBarrier(const HHandle& handle);
29
+
30
+  // Create HBarrier from handle, taking ownership
31
+  explicit HBarrier(Hlong handle);
32
+
33
+  bool operator==(const HHandle& obj) const
34
+  {
35
+    return HHandleBase::operator==(obj);
36
+  }
37
+
38
+  bool operator!=(const HHandle& obj) const
39
+  {
40
+    return HHandleBase::operator!=(obj);
41
+  }
42
+
43
+protected:
44
+
45
+  // Verify matching semantic type ('barrier')!
46
+  virtual void AssertType(Hphandle handle) const;
47
+
48
+public:
49
+
50
+
51
+
52
+/*****************************************************************************
53
+ * Operator-based class constructors
54
+ *****************************************************************************/
55
+
56
+  // create_barrier: Create a barrier synchronization object.
57
+  explicit HBarrier(const HTuple& AttribName, const HTuple& AttribValue, Hlong TeamSize);
58
+
59
+  // create_barrier: Create a barrier synchronization object.
60
+  explicit HBarrier(const HString& AttribName, const HString& AttribValue, Hlong TeamSize);
61
+
62
+  // create_barrier: Create a barrier synchronization object.
63
+  explicit HBarrier(const char* AttribName, const char* AttribValue, Hlong TeamSize);
64
+
65
+#ifdef _WIN32
66
+  // create_barrier: Create a barrier synchronization object.
67
+  explicit HBarrier(const wchar_t* AttribName, const wchar_t* AttribValue, Hlong TeamSize);
68
+#endif
69
+
70
+
71
+
72
+
73
+  /***************************************************************************
74
+   * Operators                                                               *
75
+   ***************************************************************************/
76
+
77
+  // Destroy a barrier synchronization object.
78
+  void ClearBarrier() const;
79
+
80
+  // Wait on the release of a barrier synchronization object.
81
+  void WaitBarrier() const;
82
+
83
+  // Create a barrier synchronization object.
84
+  void CreateBarrier(const HTuple& AttribName, const HTuple& AttribValue, Hlong TeamSize);
85
+
86
+  // Create a barrier synchronization object.
87
+  void CreateBarrier(const HString& AttribName, const HString& AttribValue, Hlong TeamSize);
88
+
89
+  // Create a barrier synchronization object.
90
+  void CreateBarrier(const char* AttribName, const char* AttribValue, Hlong TeamSize);
91
+
92
+#ifdef _WIN32
93
+  // Create a barrier synchronization object.
94
+  void CreateBarrier(const wchar_t* AttribName, const wchar_t* AttribValue, Hlong TeamSize);
95
+#endif
96
+
97
+};
98
+
99
+// forward declarations and types for internal array implementation
100
+
101
+template<class T> class HSmartPtr;
102
+template<class T> class HHandleBaseArrayRef;
103
+
104
+typedef HHandleBaseArrayRef<HBarrier> HBarrierArrayRef;
105
+typedef HSmartPtr< HBarrierArrayRef > HBarrierArrayPtr;
106
+
107
+
108
+// Represents multiple tool instances
109
+class LIntExport HBarrierArray : public HHandleBaseArray
110
+{
111
+
112
+public:
113
+
114
+  // Create empty array
115
+  HBarrierArray();
116
+
117
+  // Create array from native array of tool instances
118
+  HBarrierArray(HBarrier* classes, Hlong length);
119
+
120
+  // Copy constructor
121
+  HBarrierArray(const HBarrierArray &tool_array);
122
+
123
+  // Destructor
124
+  virtual ~HBarrierArray();
125
+
126
+  // Assignment operator
127
+  HBarrierArray &operator=(const HBarrierArray &tool_array);
128
+
129
+  // Clears array and all tool instances
130
+  virtual void Clear();
131
+
132
+  // Get array of native tool instances
133
+  const HBarrier* Tools() const;
134
+
135
+  // Get number of tools
136
+  virtual Hlong Length() const;
137
+
138
+  // Create tool array from tuple of handles
139
+  virtual void SetFromTuple(const HTuple& handles);
140
+
141
+  // Get tuple of handles for tool array
142
+  virtual HTuple ConvertToTuple() const;
143
+
144
+protected:
145
+
146
+// Smart pointer to internal data container
147
+   HBarrierArrayPtr *mArrayPtr;
148
+};
149
+
150
+}
151
+
152
+#endif

+ 180 - 0
3rdparty/include22/halcon/halconcpp/HBeadInspectionModel.h

@@ -0,0 +1,180 @@
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
+
8
+
9
+#ifndef HCPP_HBEADINSPECTIONMODEL
10
+#define HCPP_HBEADINSPECTIONMODEL
11
+
12
+namespace HalconCpp
13
+{
14
+
15
+// Represents an instance of the data structure used to inspect beads.
16
+class LIntExport HBeadInspectionModel : public HHandle
17
+{
18
+
19
+public:
20
+
21
+  // Create an uninitialized instance
22
+  HBeadInspectionModel():HHandle() {}
23
+
24
+  // Copy constructor
25
+  HBeadInspectionModel(const HBeadInspectionModel& source) : HHandle(source) {}
26
+
27
+  // Copy constructor
28
+  HBeadInspectionModel(const HHandle& handle);
29
+
30
+  // Create HBeadInspectionModel from handle, taking ownership
31
+  explicit HBeadInspectionModel(Hlong handle);
32
+
33
+  bool operator==(const HHandle& obj) const
34
+  {
35
+    return HHandleBase::operator==(obj);
36
+  }
37
+
38
+  bool operator!=(const HHandle& obj) const
39
+  {
40
+    return HHandleBase::operator!=(obj);
41
+  }
42
+
43
+protected:
44
+
45
+  // Verify matching semantic type ('bead_inspection_model')!
46
+  virtual void AssertType(Hphandle handle) const;
47
+
48
+public:
49
+
50
+
51
+
52
+/*****************************************************************************
53
+ * Operator-based class constructors
54
+ *****************************************************************************/
55
+
56
+  // create_bead_inspection_model: Create a model to inspect beads or adhesive in images.
57
+  explicit HBeadInspectionModel(const HXLD& BeadContour, const HTuple& TargetThickness, const HTuple& ThicknessTolerance, const HTuple& PositionTolerance, const HString& Polarity, const HTuple& GenParamName, const HTuple& GenParamValue);
58
+
59
+  // create_bead_inspection_model: Create a model to inspect beads or adhesive in images.
60
+  explicit HBeadInspectionModel(const HXLD& BeadContour, Hlong TargetThickness, Hlong ThicknessTolerance, Hlong PositionTolerance, const HString& Polarity, const HString& GenParamName, Hlong GenParamValue);
61
+
62
+  // create_bead_inspection_model: Create a model to inspect beads or adhesive in images.
63
+  explicit HBeadInspectionModel(const HXLD& BeadContour, Hlong TargetThickness, Hlong ThicknessTolerance, Hlong PositionTolerance, const char* Polarity, const char* GenParamName, Hlong GenParamValue);
64
+
65
+#ifdef _WIN32
66
+  // create_bead_inspection_model: Create a model to inspect beads or adhesive in images.
67
+  explicit HBeadInspectionModel(const HXLD& BeadContour, Hlong TargetThickness, Hlong ThicknessTolerance, Hlong PositionTolerance, const wchar_t* Polarity, const wchar_t* GenParamName, Hlong GenParamValue);
68
+#endif
69
+
70
+
71
+
72
+
73
+  /***************************************************************************
74
+   * Operators                                                               *
75
+   ***************************************************************************/
76
+
77
+  // Get the value of a parameter in a specific bead inspection model.
78
+  HTuple GetBeadInspectionParam(const HTuple& GenParamName) const;
79
+
80
+  // Get the value of a parameter in a specific bead inspection model.
81
+  HTuple GetBeadInspectionParam(const HString& GenParamName) const;
82
+
83
+  // Get the value of a parameter in a specific bead inspection model.
84
+  HTuple GetBeadInspectionParam(const char* GenParamName) const;
85
+
86
+#ifdef _WIN32
87
+  // Get the value of a parameter in a specific bead inspection model.
88
+  HTuple GetBeadInspectionParam(const wchar_t* GenParamName) const;
89
+#endif
90
+
91
+  // Set parameters of the bead inspection model.
92
+  void SetBeadInspectionParam(const HTuple& GenParamName, const HTuple& GenParamValue) const;
93
+
94
+  // Set parameters of the bead inspection model.
95
+  void SetBeadInspectionParam(const HString& GenParamName, const HString& GenParamValue) const;
96
+
97
+  // Set parameters of the bead inspection model.
98
+  void SetBeadInspectionParam(const char* GenParamName, const char* GenParamValue) const;
99
+
100
+#ifdef _WIN32
101
+  // Set parameters of the bead inspection model.
102
+  void SetBeadInspectionParam(const wchar_t* GenParamName, const wchar_t* GenParamValue) const;
103
+#endif
104
+
105
+  // Inspect beads in an image, as defined by the bead inspection model.
106
+  HXLD ApplyBeadInspectionModel(const HImage& Image, HXLD* RightContour, HXLD* ErrorSegment, HTuple* ErrorType) const;
107
+
108
+  // Delete the bead inspection model and free the allocated memory.
109
+  void ClearBeadInspectionModel() const;
110
+
111
+  // Create a model to inspect beads or adhesive in images.
112
+  void CreateBeadInspectionModel(const HXLD& BeadContour, const HTuple& TargetThickness, const HTuple& ThicknessTolerance, const HTuple& PositionTolerance, const HString& Polarity, const HTuple& GenParamName, const HTuple& GenParamValue);
113
+
114
+  // Create a model to inspect beads or adhesive in images.
115
+  void CreateBeadInspectionModel(const HXLD& BeadContour, Hlong TargetThickness, Hlong ThicknessTolerance, Hlong PositionTolerance, const HString& Polarity, const HString& GenParamName, Hlong GenParamValue);
116
+
117
+  // Create a model to inspect beads or adhesive in images.
118
+  void CreateBeadInspectionModel(const HXLD& BeadContour, Hlong TargetThickness, Hlong ThicknessTolerance, Hlong PositionTolerance, const char* Polarity, const char* GenParamName, Hlong GenParamValue);
119
+
120
+#ifdef _WIN32
121
+  // Create a model to inspect beads or adhesive in images.
122
+  void CreateBeadInspectionModel(const HXLD& BeadContour, Hlong TargetThickness, Hlong ThicknessTolerance, Hlong PositionTolerance, const wchar_t* Polarity, const wchar_t* GenParamName, Hlong GenParamValue);
123
+#endif
124
+
125
+};
126
+
127
+// forward declarations and types for internal array implementation
128
+
129
+template<class T> class HSmartPtr;
130
+template<class T> class HHandleBaseArrayRef;
131
+
132
+typedef HHandleBaseArrayRef<HBeadInspectionModel> HBeadInspectionModelArrayRef;
133
+typedef HSmartPtr< HBeadInspectionModelArrayRef > HBeadInspectionModelArrayPtr;
134
+
135
+
136
+// Represents multiple tool instances
137
+class LIntExport HBeadInspectionModelArray : public HHandleBaseArray
138
+{
139
+
140
+public:
141
+
142
+  // Create empty array
143
+  HBeadInspectionModelArray();
144
+
145
+  // Create array from native array of tool instances
146
+  HBeadInspectionModelArray(HBeadInspectionModel* classes, Hlong length);
147
+
148
+  // Copy constructor
149
+  HBeadInspectionModelArray(const HBeadInspectionModelArray &tool_array);
150
+
151
+  // Destructor
152
+  virtual ~HBeadInspectionModelArray();
153
+
154
+  // Assignment operator
155
+  HBeadInspectionModelArray &operator=(const HBeadInspectionModelArray &tool_array);
156
+
157
+  // Clears array and all tool instances
158
+  virtual void Clear();
159
+
160
+  // Get array of native tool instances
161
+  const HBeadInspectionModel* Tools() const;
162
+
163
+  // Get number of tools
164
+  virtual Hlong Length() const;
165
+
166
+  // Create tool array from tuple of handles
167
+  virtual void SetFromTuple(const HTuple& handles);
168
+
169
+  // Get tuple of handles for tool array
170
+  virtual HTuple ConvertToTuple() const;
171
+
172
+protected:
173
+
174
+// Smart pointer to internal data container
175
+   HBeadInspectionModelArrayPtr *mArrayPtr;
176
+};
177
+
178
+}
179
+
180
+#endif

+ 166 - 0
3rdparty/include22/halcon/halconcpp/HBgEsti.h

@@ -0,0 +1,166 @@
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
+
8
+
9
+#ifndef HCPP_HBGESTI
10
+#define HCPP_HBGESTI
11
+
12
+namespace HalconCpp
13
+{
14
+
15
+// Represents an instance of a background estimator.
16
+class LIntExport HBgEsti : public HHandle
17
+{
18
+
19
+public:
20
+
21
+  // Create an uninitialized instance
22
+  HBgEsti():HHandle() {}
23
+
24
+  // Copy constructor
25
+  HBgEsti(const HBgEsti& source) : HHandle(source) {}
26
+
27
+  // Copy constructor
28
+  HBgEsti(const HHandle& handle);
29
+
30
+  // Create HBgEsti from handle, taking ownership
31
+  explicit HBgEsti(Hlong handle);
32
+
33
+  bool operator==(const HHandle& obj) const
34
+  {
35
+    return HHandleBase::operator==(obj);
36
+  }
37
+
38
+  bool operator!=(const HHandle& obj) const
39
+  {
40
+    return HHandleBase::operator!=(obj);
41
+  }
42
+
43
+protected:
44
+
45
+  // Verify matching semantic type ('bg_estimation')!
46
+  virtual void AssertType(Hphandle handle) const;
47
+
48
+public:
49
+
50
+
51
+
52
+/*****************************************************************************
53
+ * Operator-based class constructors
54
+ *****************************************************************************/
55
+
56
+  // create_bg_esti: Generate and initialize a data set for the background estimation.
57
+  explicit HBgEsti(const HImage& InitializeImage, double Syspar1, double Syspar2, const HString& GainMode, double Gain1, double Gain2, const HString& AdaptMode, double MinDiff, Hlong StatNum, double ConfidenceC, double TimeC);
58
+
59
+  // create_bg_esti: Generate and initialize a data set for the background estimation.
60
+  explicit HBgEsti(const HImage& InitializeImage, double Syspar1, double Syspar2, const char* GainMode, double Gain1, double Gain2, const char* AdaptMode, double MinDiff, Hlong StatNum, double ConfidenceC, double TimeC);
61
+
62
+#ifdef _WIN32
63
+  // create_bg_esti: Generate and initialize a data set for the background estimation.
64
+  explicit HBgEsti(const HImage& InitializeImage, double Syspar1, double Syspar2, const wchar_t* GainMode, double Gain1, double Gain2, const wchar_t* AdaptMode, double MinDiff, Hlong StatNum, double ConfidenceC, double TimeC);
65
+#endif
66
+
67
+
68
+
69
+
70
+  /***************************************************************************
71
+   * Operators                                                               *
72
+   ***************************************************************************/
73
+
74
+  // Delete the background estimation data set.
75
+  void CloseBgEsti() const;
76
+
77
+  // Return the estimated background image.
78
+  HImage GiveBgEsti() const;
79
+
80
+  // Change the estimated background image.
81
+  void UpdateBgEsti(const HImage& PresentImage, const HRegion& UpDateRegion) const;
82
+
83
+  // Estimate the background and return the foreground region.
84
+  HRegion RunBgEsti(const HImage& PresentImage) const;
85
+
86
+  // Return the parameters of the data set.
87
+  double GetBgEstiParams(double* Syspar2, HString* GainMode, double* Gain1, double* Gain2, HString* AdaptMode, double* MinDiff, Hlong* StatNum, double* ConfidenceC, double* TimeC) const;
88
+
89
+  // Change the parameters of the data set.
90
+  void SetBgEstiParams(double Syspar1, double Syspar2, const HString& GainMode, double Gain1, double Gain2, const HString& AdaptMode, double MinDiff, Hlong StatNum, double ConfidenceC, double TimeC) const;
91
+
92
+  // Change the parameters of the data set.
93
+  void SetBgEstiParams(double Syspar1, double Syspar2, const char* GainMode, double Gain1, double Gain2, const char* AdaptMode, double MinDiff, Hlong StatNum, double ConfidenceC, double TimeC) const;
94
+
95
+#ifdef _WIN32
96
+  // Change the parameters of the data set.
97
+  void SetBgEstiParams(double Syspar1, double Syspar2, const wchar_t* GainMode, double Gain1, double Gain2, const wchar_t* AdaptMode, double MinDiff, Hlong StatNum, double ConfidenceC, double TimeC) const;
98
+#endif
99
+
100
+  // Generate and initialize a data set for the background estimation.
101
+  void CreateBgEsti(const HImage& InitializeImage, double Syspar1, double Syspar2, const HString& GainMode, double Gain1, double Gain2, const HString& AdaptMode, double MinDiff, Hlong StatNum, double ConfidenceC, double TimeC);
102
+
103
+  // Generate and initialize a data set for the background estimation.
104
+  void CreateBgEsti(const HImage& InitializeImage, double Syspar1, double Syspar2, const char* GainMode, double Gain1, double Gain2, const char* AdaptMode, double MinDiff, Hlong StatNum, double ConfidenceC, double TimeC);
105
+
106
+#ifdef _WIN32
107
+  // Generate and initialize a data set for the background estimation.
108
+  void CreateBgEsti(const HImage& InitializeImage, double Syspar1, double Syspar2, const wchar_t* GainMode, double Gain1, double Gain2, const wchar_t* AdaptMode, double MinDiff, Hlong StatNum, double ConfidenceC, double TimeC);
109
+#endif
110
+
111
+};
112
+
113
+// forward declarations and types for internal array implementation
114
+
115
+template<class T> class HSmartPtr;
116
+template<class T> class HHandleBaseArrayRef;
117
+
118
+typedef HHandleBaseArrayRef<HBgEsti> HBgEstiArrayRef;
119
+typedef HSmartPtr< HBgEstiArrayRef > HBgEstiArrayPtr;
120
+
121
+
122
+// Represents multiple tool instances
123
+class LIntExport HBgEstiArray : public HHandleBaseArray
124
+{
125
+
126
+public:
127
+
128
+  // Create empty array
129
+  HBgEstiArray();
130
+
131
+  // Create array from native array of tool instances
132
+  HBgEstiArray(HBgEsti* classes, Hlong length);
133
+
134
+  // Copy constructor
135
+  HBgEstiArray(const HBgEstiArray &tool_array);
136
+
137
+  // Destructor
138
+  virtual ~HBgEstiArray();
139
+
140
+  // Assignment operator
141
+  HBgEstiArray &operator=(const HBgEstiArray &tool_array);
142
+
143
+  // Clears array and all tool instances
144
+  virtual void Clear();
145
+
146
+  // Get array of native tool instances
147
+  const HBgEsti* Tools() const;
148
+
149
+  // Get number of tools
150
+  virtual Hlong Length() const;
151
+
152
+  // Create tool array from tuple of handles
153
+  virtual void SetFromTuple(const HTuple& handles);
154
+
155
+  // Get tuple of handles for tool array
156
+  virtual HTuple ConvertToTuple() const;
157
+
158
+protected:
159
+
160
+// Smart pointer to internal data container
161
+   HBgEstiArrayPtr *mArrayPtr;
162
+};
163
+
164
+}
165
+
166
+#endif

+ 293 - 0
3rdparty/include22/halcon/halconcpp/HCalibData.h

@@ -0,0 +1,293 @@
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
+
8
+
9
+#ifndef HCPP_HCALIBDATA
10
+#define HCPP_HCALIBDATA
11
+
12
+namespace HalconCpp
13
+{
14
+
15
+// Represents an instance of a camera calibration model.
16
+class LIntExport HCalibData : public HHandle
17
+{
18
+
19
+public:
20
+
21
+  // Create an uninitialized instance
22
+  HCalibData():HHandle() {}
23
+
24
+  // Copy constructor
25
+  HCalibData(const HCalibData& source) : HHandle(source) {}
26
+
27
+  // Copy constructor
28
+  HCalibData(const HHandle& handle);
29
+
30
+  // Create HCalibData from handle, taking ownership
31
+  explicit HCalibData(Hlong handle);
32
+
33
+  bool operator==(const HHandle& obj) const
34
+  {
35
+    return HHandleBase::operator==(obj);
36
+  }
37
+
38
+  bool operator!=(const HHandle& obj) const
39
+  {
40
+    return HHandleBase::operator!=(obj);
41
+  }
42
+
43
+protected:
44
+
45
+  // Verify matching semantic type ('calib_data')!
46
+  virtual void AssertType(Hphandle handle) const;
47
+
48
+public:
49
+
50
+  // Deep copy of all data represented by this object instance
51
+  HCalibData Clone() const;
52
+
53
+
54
+
55
+/*****************************************************************************
56
+ * Operator-based class constructors
57
+ *****************************************************************************/
58
+
59
+  // read_calib_data: Restore a calibration data model from a file.
60
+  explicit HCalibData(const HString& FileName);
61
+
62
+  // read_calib_data: Restore a calibration data model from a file.
63
+  explicit HCalibData(const char* FileName);
64
+
65
+#ifdef _WIN32
66
+  // read_calib_data: Restore a calibration data model from a file.
67
+  explicit HCalibData(const wchar_t* FileName);
68
+#endif
69
+
70
+  // create_calib_data: Create a HALCON calibration data model.
71
+  explicit HCalibData(const HString& CalibSetup, Hlong NumCameras, Hlong NumCalibObjects);
72
+
73
+  // create_calib_data: Create a HALCON calibration data model.
74
+  explicit HCalibData(const char* CalibSetup, Hlong NumCameras, Hlong NumCalibObjects);
75
+
76
+#ifdef _WIN32
77
+  // create_calib_data: Create a HALCON calibration data model.
78
+  explicit HCalibData(const wchar_t* CalibSetup, Hlong NumCameras, Hlong NumCalibObjects);
79
+#endif
80
+
81
+
82
+
83
+
84
+  /***************************************************************************
85
+   * Operators                                                               *
86
+   ***************************************************************************/
87
+
88
+  // Free the memory of a calibration data model.
89
+  void ClearCalibData() const;
90
+
91
+  // Deserialize a serialized calibration data model.
92
+  void DeserializeCalibData(const HSerializedItem& SerializedItemHandle);
93
+
94
+  // Serialize a calibration data model.
95
+  HSerializedItem SerializeCalibData() const;
96
+
97
+  // Restore a calibration data model from a file.
98
+  void ReadCalibData(const HString& FileName);
99
+
100
+  // Restore a calibration data model from a file.
101
+  void ReadCalibData(const char* FileName);
102
+
103
+#ifdef _WIN32
104
+  // Restore a calibration data model from a file.
105
+  void ReadCalibData(const wchar_t* FileName);
106
+#endif
107
+
108
+  // Store a calibration data model into a file.
109
+  void WriteCalibData(const HString& FileName) const;
110
+
111
+  // Store a calibration data model into a file.
112
+  void WriteCalibData(const char* FileName) const;
113
+
114
+#ifdef _WIN32
115
+  // Store a calibration data model into a file.
116
+  void WriteCalibData(const wchar_t* FileName) const;
117
+#endif
118
+
119
+  // Perform a hand-eye calibration.
120
+  HTuple CalibrateHandEye() const;
121
+
122
+  // Determine all camera parameters by a simultaneous minimization process.
123
+  double CalibrateCameras() const;
124
+
125
+  // Remove a data set from a calibration data model.
126
+  void RemoveCalibData(const HString& ItemType, const HTuple& ItemIdx) const;
127
+
128
+  // Remove a data set from a calibration data model.
129
+  void RemoveCalibData(const HString& ItemType, Hlong ItemIdx) const;
130
+
131
+  // Remove a data set from a calibration data model.
132
+  void RemoveCalibData(const char* ItemType, Hlong ItemIdx) const;
133
+
134
+#ifdef _WIN32
135
+  // Remove a data set from a calibration data model.
136
+  void RemoveCalibData(const wchar_t* ItemType, Hlong ItemIdx) const;
137
+#endif
138
+
139
+  // Set data in a calibration data model.
140
+  void SetCalibData(const HString& ItemType, const HTuple& ItemIdx, const HString& DataName, const HTuple& DataValue) const;
141
+
142
+  // Set data in a calibration data model.
143
+  void SetCalibData(const HString& ItemType, Hlong ItemIdx, const HString& DataName, const HString& DataValue) const;
144
+
145
+  // Set data in a calibration data model.
146
+  void SetCalibData(const char* ItemType, Hlong ItemIdx, const char* DataName, const char* DataValue) const;
147
+
148
+#ifdef _WIN32
149
+  // Set data in a calibration data model.
150
+  void SetCalibData(const wchar_t* ItemType, Hlong ItemIdx, const wchar_t* DataName, const wchar_t* DataValue) const;
151
+#endif
152
+
153
+  // Find the HALCON calibration plate and set the extracted points and contours in a calibration data model.
154
+  void FindCalibObject(const HImage& Image, Hlong CameraIdx, Hlong CalibObjIdx, Hlong CalibObjPoseIdx, const HTuple& GenParamName, const HTuple& GenParamValue) const;
155
+
156
+  // Remove observation data from a calibration data model.
157
+  void RemoveCalibDataObserv(Hlong CameraIdx, Hlong CalibObjIdx, Hlong CalibObjPoseIdx) const;
158
+
159
+  // Get contour-based observation data from a calibration data model.
160
+  HXLDCont GetCalibDataObservContours(const HString& ContourName, Hlong CameraIdx, Hlong CalibObjIdx, Hlong CalibObjPoseIdx) const;
161
+
162
+  // Get contour-based observation data from a calibration data model.
163
+  HXLDCont GetCalibDataObservContours(const char* ContourName, Hlong CameraIdx, Hlong CalibObjIdx, Hlong CalibObjPoseIdx) const;
164
+
165
+#ifdef _WIN32
166
+  // Get contour-based observation data from a calibration data model.
167
+  HXLDCont GetCalibDataObservContours(const wchar_t* ContourName, Hlong CameraIdx, Hlong CalibObjIdx, Hlong CalibObjPoseIdx) const;
168
+#endif
169
+
170
+  // Get observed calibration object poses from a calibration data model.
171
+  HPose GetCalibDataObservPose(Hlong CameraIdx, Hlong CalibObjIdx, Hlong CalibObjPoseIdx) const;
172
+
173
+  // Set observed calibration object poses in a calibration data model.
174
+  void SetCalibDataObservPose(Hlong CameraIdx, Hlong CalibObjIdx, Hlong CalibObjPoseIdx, const HPose& ObjInCameraPose) const;
175
+
176
+  // Get point-based observation data from a calibration data model.
177
+  void GetCalibDataObservPoints(Hlong CameraIdx, Hlong CalibObjIdx, Hlong CalibObjPoseIdx, HTuple* Row, HTuple* Column, HTuple* Index, HTuple* Pose) const;
178
+
179
+  // Set point-based observation data in a calibration data model.
180
+  void SetCalibDataObservPoints(Hlong CameraIdx, Hlong CalibObjIdx, Hlong CalibObjPoseIdx, const HTuple& Row, const HTuple& Column, const HTuple& Index, const HTuple& Pose) const;
181
+
182
+  // Query information about the relations between cameras, calibration objects, and calibration object poses.
183
+  HTuple QueryCalibDataObservIndices(const HString& ItemType, Hlong ItemIdx, HTuple* Index2) const;
184
+
185
+  // Query information about the relations between cameras, calibration objects, and calibration object poses.
186
+  HTuple QueryCalibDataObservIndices(const char* ItemType, Hlong ItemIdx, HTuple* Index2) const;
187
+
188
+#ifdef _WIN32
189
+  // Query information about the relations between cameras, calibration objects, and calibration object poses.
190
+  HTuple QueryCalibDataObservIndices(const wchar_t* ItemType, Hlong ItemIdx, HTuple* Index2) const;
191
+#endif
192
+
193
+  // Query data stored or computed in a calibration data model.
194
+  HTuple GetCalibData(const HString& ItemType, const HTuple& ItemIdx, const HTuple& DataName) const;
195
+
196
+  // Query data stored or computed in a calibration data model.
197
+  HTuple GetCalibData(const HString& ItemType, Hlong ItemIdx, const HString& DataName) const;
198
+
199
+  // Query data stored or computed in a calibration data model.
200
+  HTuple GetCalibData(const char* ItemType, Hlong ItemIdx, const char* DataName) const;
201
+
202
+#ifdef _WIN32
203
+  // Query data stored or computed in a calibration data model.
204
+  HTuple GetCalibData(const wchar_t* ItemType, Hlong ItemIdx, const wchar_t* DataName) const;
205
+#endif
206
+
207
+  // Define a calibration object in a calibration model.
208
+  void SetCalibDataCalibObject(Hlong CalibObjIdx, const HTuple& CalibObjDescr) const;
209
+
210
+  // Define a calibration object in a calibration model.
211
+  void SetCalibDataCalibObject(Hlong CalibObjIdx, double CalibObjDescr) const;
212
+
213
+  // Set type and initial parameters of a camera in a calibration data model.
214
+  void SetCalibDataCamParam(const HTuple& CameraIdx, const HTuple& CameraType, const HCamPar& CameraParam) const;
215
+
216
+  // Set type and initial parameters of a camera in a calibration data model.
217
+  void SetCalibDataCamParam(const HTuple& CameraIdx, const HString& CameraType, const HCamPar& CameraParam) const;
218
+
219
+  // Set type and initial parameters of a camera in a calibration data model.
220
+  void SetCalibDataCamParam(const HTuple& CameraIdx, const char* CameraType, const HCamPar& CameraParam) const;
221
+
222
+#ifdef _WIN32
223
+  // Set type and initial parameters of a camera in a calibration data model.
224
+  void SetCalibDataCamParam(const HTuple& CameraIdx, const wchar_t* CameraType, const HCamPar& CameraParam) const;
225
+#endif
226
+
227
+  // Create a HALCON calibration data model.
228
+  void CreateCalibData(const HString& CalibSetup, Hlong NumCameras, Hlong NumCalibObjects);
229
+
230
+  // Create a HALCON calibration data model.
231
+  void CreateCalibData(const char* CalibSetup, Hlong NumCameras, Hlong NumCalibObjects);
232
+
233
+#ifdef _WIN32
234
+  // Create a HALCON calibration data model.
235
+  void CreateCalibData(const wchar_t* CalibSetup, Hlong NumCameras, Hlong NumCalibObjects);
236
+#endif
237
+
238
+};
239
+
240
+// forward declarations and types for internal array implementation
241
+
242
+template<class T> class HSmartPtr;
243
+template<class T> class HHandleBaseArrayRef;
244
+
245
+typedef HHandleBaseArrayRef<HCalibData> HCalibDataArrayRef;
246
+typedef HSmartPtr< HCalibDataArrayRef > HCalibDataArrayPtr;
247
+
248
+
249
+// Represents multiple tool instances
250
+class LIntExport HCalibDataArray : public HHandleBaseArray
251
+{
252
+
253
+public:
254
+
255
+  // Create empty array
256
+  HCalibDataArray();
257
+
258
+  // Create array from native array of tool instances
259
+  HCalibDataArray(HCalibData* classes, Hlong length);
260
+
261
+  // Copy constructor
262
+  HCalibDataArray(const HCalibDataArray &tool_array);
263
+
264
+  // Destructor
265
+  virtual ~HCalibDataArray();
266
+
267
+  // Assignment operator
268
+  HCalibDataArray &operator=(const HCalibDataArray &tool_array);
269
+
270
+  // Clears array and all tool instances
271
+  virtual void Clear();
272
+
273
+  // Get array of native tool instances
274
+  const HCalibData* Tools() const;
275
+
276
+  // Get number of tools
277
+  virtual Hlong Length() const;
278
+
279
+  // Create tool array from tuple of handles
280
+  virtual void SetFromTuple(const HTuple& handles);
281
+
282
+  // Get tuple of handles for tool array
283
+  virtual HTuple ConvertToTuple() const;
284
+
285
+protected:
286
+
287
+// Smart pointer to internal data container
288
+   HCalibDataArrayPtr *mArrayPtr;
289
+};
290
+
291
+}
292
+
293
+#endif

文件差异内容过多而无法显示
+ 558 - 0
3rdparty/include22/halcon/halconcpp/HCamPar.h


+ 222 - 0
3rdparty/include22/halcon/halconcpp/HCameraSetupModel.h

@@ -0,0 +1,222 @@
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
+
8
+
9
+#ifndef HCPP_HCAMERASETUPMODEL
10
+#define HCPP_HCAMERASETUPMODEL
11
+
12
+namespace HalconCpp
13
+{
14
+
15
+// Represents an instance of a camera setup model.
16
+class LIntExport HCameraSetupModel : public HHandle
17
+{
18
+
19
+public:
20
+
21
+  // Create an uninitialized instance
22
+  HCameraSetupModel():HHandle() {}
23
+
24
+  // Copy constructor
25
+  HCameraSetupModel(const HCameraSetupModel& source) : HHandle(source) {}
26
+
27
+  // Copy constructor
28
+  HCameraSetupModel(const HHandle& handle);
29
+
30
+  bool operator==(const HHandle& obj) const
31
+  {
32
+    return HHandleBase::operator==(obj);
33
+  }
34
+
35
+  bool operator!=(const HHandle& obj) const
36
+  {
37
+    return HHandleBase::operator!=(obj);
38
+  }
39
+
40
+protected:
41
+
42
+  // Verify matching semantic type ('camera_setup_model')!
43
+  virtual void AssertType(Hphandle handle) const;
44
+
45
+public:
46
+
47
+  // Deep copy of all data represented by this object instance
48
+  HCameraSetupModel Clone() const;
49
+
50
+
51
+
52
+/*****************************************************************************
53
+ * Operator-based class constructors
54
+ *****************************************************************************/
55
+
56
+  // read_camera_setup_model: Restore a camera setup model from a file.
57
+  explicit HCameraSetupModel(const HString& FileName);
58
+
59
+  // read_camera_setup_model: Restore a camera setup model from a file.
60
+  explicit HCameraSetupModel(const char* FileName);
61
+
62
+#ifdef _WIN32
63
+  // read_camera_setup_model: Restore a camera setup model from a file.
64
+  explicit HCameraSetupModel(const wchar_t* FileName);
65
+#endif
66
+
67
+  // create_camera_setup_model: Create a model for a setup of calibrated cameras.
68
+  explicit HCameraSetupModel(Hlong NumCameras);
69
+
70
+
71
+
72
+
73
+  /***************************************************************************
74
+   * Operators                                                               *
75
+   ***************************************************************************/
76
+
77
+  // Create a HALCON stereo model.
78
+  HStereoModel CreateStereoModel(const HString& Method, const HTuple& GenParamName, const HTuple& GenParamValue) const;
79
+
80
+  // Create a HALCON stereo model.
81
+  HStereoModel CreateStereoModel(const HString& Method, const HString& GenParamName, const HTuple& GenParamValue) const;
82
+
83
+  // Create a HALCON stereo model.
84
+  HStereoModel CreateStereoModel(const char* Method, const char* GenParamName, const HTuple& GenParamValue) const;
85
+
86
+#ifdef _WIN32
87
+  // Create a HALCON stereo model.
88
+  HStereoModel CreateStereoModel(const wchar_t* Method, const wchar_t* GenParamName, const HTuple& GenParamValue) const;
89
+#endif
90
+
91
+  // Free the memory of a calibration setup model.
92
+  void ClearCameraSetupModel() const;
93
+
94
+  // Serialize a camera setup model.
95
+  HSerializedItem SerializeCameraSetupModel() const;
96
+
97
+  // Deserialize a serialized camera setup model.
98
+  void DeserializeCameraSetupModel(const HSerializedItem& SerializedItemHandle);
99
+
100
+  // Store a camera setup model into a file.
101
+  void WriteCameraSetupModel(const HString& FileName) const;
102
+
103
+  // Store a camera setup model into a file.
104
+  void WriteCameraSetupModel(const char* FileName) const;
105
+
106
+#ifdef _WIN32
107
+  // Store a camera setup model into a file.
108
+  void WriteCameraSetupModel(const wchar_t* FileName) const;
109
+#endif
110
+
111
+  // Restore a camera setup model from a file.
112
+  void ReadCameraSetupModel(const HString& FileName);
113
+
114
+  // Restore a camera setup model from a file.
115
+  void ReadCameraSetupModel(const char* FileName);
116
+
117
+#ifdef _WIN32
118
+  // Restore a camera setup model from a file.
119
+  void ReadCameraSetupModel(const wchar_t* FileName);
120
+#endif
121
+
122
+  // Get generic camera setup model parameters.
123
+  HTuple GetCameraSetupParam(const HTuple& CameraIdx, const HString& GenParamName) const;
124
+
125
+  // Get generic camera setup model parameters.
126
+  HTuple GetCameraSetupParam(Hlong CameraIdx, const HString& GenParamName) const;
127
+
128
+  // Get generic camera setup model parameters.
129
+  HTuple GetCameraSetupParam(Hlong CameraIdx, const char* GenParamName) const;
130
+
131
+#ifdef _WIN32
132
+  // Get generic camera setup model parameters.
133
+  HTuple GetCameraSetupParam(Hlong CameraIdx, const wchar_t* GenParamName) const;
134
+#endif
135
+
136
+  // Set generic camera setup model parameters.
137
+  void SetCameraSetupParam(const HTuple& CameraIdx, const HString& GenParamName, const HTuple& GenParamValue) const;
138
+
139
+  // Set generic camera setup model parameters.
140
+  void SetCameraSetupParam(Hlong CameraIdx, const HString& GenParamName, double GenParamValue) const;
141
+
142
+  // Set generic camera setup model parameters.
143
+  void SetCameraSetupParam(Hlong CameraIdx, const char* GenParamName, double GenParamValue) const;
144
+
145
+#ifdef _WIN32
146
+  // Set generic camera setup model parameters.
147
+  void SetCameraSetupParam(Hlong CameraIdx, const wchar_t* GenParamName, double GenParamValue) const;
148
+#endif
149
+
150
+  // Define type, parameters, and relative pose of a camera in a camera setup model.
151
+  void SetCameraSetupCamParam(const HTuple& CameraIdx, const HTuple& CameraType, const HCamPar& CameraParam, const HTuple& CameraPose) const;
152
+
153
+  // Define type, parameters, and relative pose of a camera in a camera setup model.
154
+  void SetCameraSetupCamParam(const HTuple& CameraIdx, const HString& CameraType, const HCamPar& CameraParam, const HTuple& CameraPose) const;
155
+
156
+  // Define type, parameters, and relative pose of a camera in a camera setup model.
157
+  void SetCameraSetupCamParam(const HTuple& CameraIdx, const char* CameraType, const HCamPar& CameraParam, const HTuple& CameraPose) const;
158
+
159
+#ifdef _WIN32
160
+  // Define type, parameters, and relative pose of a camera in a camera setup model.
161
+  void SetCameraSetupCamParam(const HTuple& CameraIdx, const wchar_t* CameraType, const HCamPar& CameraParam, const HTuple& CameraPose) const;
162
+#endif
163
+
164
+  // Create a model for a setup of calibrated cameras.
165
+  void CreateCameraSetupModel(Hlong NumCameras);
166
+
167
+};
168
+
169
+// forward declarations and types for internal array implementation
170
+
171
+template<class T> class HSmartPtr;
172
+template<class T> class HHandleBaseArrayRef;
173
+
174
+typedef HHandleBaseArrayRef<HCameraSetupModel> HCameraSetupModelArrayRef;
175
+typedef HSmartPtr< HCameraSetupModelArrayRef > HCameraSetupModelArrayPtr;
176
+
177
+
178
+// Represents multiple tool instances
179
+class LIntExport HCameraSetupModelArray : public HHandleBaseArray
180
+{
181
+
182
+public:
183
+
184
+  // Create empty array
185
+  HCameraSetupModelArray();
186
+
187
+  // Create array from native array of tool instances
188
+  HCameraSetupModelArray(HCameraSetupModel* classes, Hlong length);
189
+
190
+  // Copy constructor
191
+  HCameraSetupModelArray(const HCameraSetupModelArray &tool_array);
192
+
193
+  // Destructor
194
+  virtual ~HCameraSetupModelArray();
195
+
196
+  // Assignment operator
197
+  HCameraSetupModelArray &operator=(const HCameraSetupModelArray &tool_array);
198
+
199
+  // Clears array and all tool instances
200
+  virtual void Clear();
201
+
202
+  // Get array of native tool instances
203
+  const HCameraSetupModel* Tools() const;
204
+
205
+  // Get number of tools
206
+  virtual Hlong Length() const;
207
+
208
+  // Create tool array from tuple of handles
209
+  virtual void SetFromTuple(const HTuple& handles);
210
+
211
+  // Get tuple of handles for tool array
212
+  virtual HTuple ConvertToTuple() const;
213
+
214
+protected:
215
+
216
+// Smart pointer to internal data container
217
+   HCameraSetupModelArrayPtr *mArrayPtr;
218
+};
219
+
220
+}
221
+
222
+#endif

+ 215 - 0
3rdparty/include22/halcon/halconcpp/HClassBox.h

@@ -0,0 +1,215 @@
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
+
8
+
9
+#ifndef HCPP_HCLASSBOX
10
+#define HCPP_HCLASSBOX
11
+
12
+namespace HalconCpp
13
+{
14
+
15
+// Represents an instance of a classifier.
16
+class LIntExport HClassBox : public HHandle
17
+{
18
+
19
+public:
20
+
21
+  // Copy constructor
22
+  HClassBox(const HClassBox& source) : HHandle(source) {}
23
+
24
+  // Copy constructor
25
+  HClassBox(const HHandle& handle);
26
+
27
+  // Create HClassBox from handle, taking ownership
28
+  explicit HClassBox(Hlong handle);
29
+
30
+  bool operator==(const HHandle& obj) const
31
+  {
32
+    return HHandleBase::operator==(obj);
33
+  }
34
+
35
+  bool operator!=(const HHandle& obj) const
36
+  {
37
+    return HHandleBase::operator!=(obj);
38
+  }
39
+
40
+protected:
41
+
42
+  // Verify matching semantic type ('class_box')!
43
+  virtual void AssertType(Hphandle handle) const;
44
+
45
+public:
46
+
47
+  // Deep copy of all data represented by this object instance
48
+  HClassBox Clone() const;
49
+
50
+
51
+
52
+/*****************************************************************************
53
+ * Operator-based class constructors
54
+ *****************************************************************************/
55
+
56
+  // create_class_box: Create a new classifier.
57
+  explicit HClassBox();
58
+
59
+
60
+
61
+
62
+  /***************************************************************************
63
+   * Operators                                                               *
64
+   ***************************************************************************/
65
+
66
+  // Train a classificator using a multi-channel image.
67
+  void LearnNdimBox(const HRegion& Foreground, const HRegion& Background, const HImage& MultiChannelImage) const;
68
+
69
+  // Classify pixels using hyper-cuboids.
70
+  HRegion ClassNdimBox(const HImage& MultiChannelImage) const;
71
+
72
+  // Deserialize a serialized classifier.
73
+  void DeserializeClassBox(const HSerializedItem& SerializedItemHandle) const;
74
+
75
+  // Serialize a classifier.
76
+  HSerializedItem SerializeClassBox() const;
77
+
78
+  // Save a classifier in a file.
79
+  void WriteClassBox(const HString& FileName) const;
80
+
81
+  // Save a classifier in a file.
82
+  void WriteClassBox(const char* FileName) const;
83
+
84
+#ifdef _WIN32
85
+  // Save a classifier in a file.
86
+  void WriteClassBox(const wchar_t* FileName) const;
87
+#endif
88
+
89
+  // Set system parameters for classification.
90
+  void SetClassBoxParam(const HString& Flag, const HTuple& Value) const;
91
+
92
+  // Set system parameters for classification.
93
+  void SetClassBoxParam(const HString& Flag, double Value) const;
94
+
95
+  // Set system parameters for classification.
96
+  void SetClassBoxParam(const char* Flag, double Value) const;
97
+
98
+#ifdef _WIN32
99
+  // Set system parameters for classification.
100
+  void SetClassBoxParam(const wchar_t* Flag, double Value) const;
101
+#endif
102
+
103
+  // Read a classifier from a file.
104
+  void ReadClassBox(const HString& FileName) const;
105
+
106
+  // Read a classifier from a file.
107
+  void ReadClassBox(const char* FileName) const;
108
+
109
+#ifdef _WIN32
110
+  // Read a classifier from a file.
111
+  void ReadClassBox(const wchar_t* FileName) const;
112
+#endif
113
+
114
+  // Train the classifier with one data set.
115
+  void LearnSampsetBox(const HFeatureSet& SampKey, const HString& Outfile, Hlong NSamples, double StopError, Hlong ErrorN) const;
116
+
117
+  // Train the classifier with one data set.
118
+  void LearnSampsetBox(const HFeatureSet& SampKey, const char* Outfile, Hlong NSamples, double StopError, Hlong ErrorN) const;
119
+
120
+#ifdef _WIN32
121
+  // Train the classifier with one data set.
122
+  void LearnSampsetBox(const HFeatureSet& SampKey, const wchar_t* Outfile, Hlong NSamples, double StopError, Hlong ErrorN) const;
123
+#endif
124
+
125
+  // Train the classifier.
126
+  void LearnClassBox(const HTuple& Features, Hlong Class) const;
127
+
128
+  // Get information about the current parameter.
129
+  HTuple GetClassBoxParam(const HString& Flag) const;
130
+
131
+  // Get information about the current parameter.
132
+  HTuple GetClassBoxParam(const char* Flag) const;
133
+
134
+#ifdef _WIN32
135
+  // Get information about the current parameter.
136
+  HTuple GetClassBoxParam(const wchar_t* Flag) const;
137
+#endif
138
+
139
+  // Destroy the classifier.
140
+  void CloseClassBox() const;
141
+
142
+  // Create a new classifier.
143
+  void CreateClassBox();
144
+
145
+  // Describe the classes of a box classifier.
146
+  HTuple DescriptClassBox(Hlong Dimensions, HTuple* BoxIdx, HTuple* BoxLowerBound, HTuple* BoxHigherBound, HTuple* BoxNumSamplesTrain, HTuple* BoxNumSamplesWrong) const;
147
+
148
+  // Describe the classes of a box classifier.
149
+  Hlong DescriptClassBox(Hlong Dimensions, Hlong* BoxIdx, Hlong* BoxLowerBound, Hlong* BoxHigherBound, Hlong* BoxNumSamplesTrain, Hlong* BoxNumSamplesWrong) const;
150
+
151
+  // Classify a set of arrays.
152
+  double TestSampsetBox(const HFeatureSet& SampKey) const;
153
+
154
+  // Classify a tuple of attributes with rejection class.
155
+  Hlong EnquireRejectClassBox(const HTuple& FeatureList) const;
156
+
157
+  // Classify a tuple of attributes.
158
+  Hlong EnquireClassBox(const HTuple& FeatureList) const;
159
+
160
+};
161
+
162
+// forward declarations and types for internal array implementation
163
+
164
+template<class T> class HSmartPtr;
165
+template<class T> class HHandleBaseArrayRef;
166
+
167
+typedef HHandleBaseArrayRef<HClassBox> HClassBoxArrayRef;
168
+typedef HSmartPtr< HClassBoxArrayRef > HClassBoxArrayPtr;
169
+
170
+
171
+// Represents multiple tool instances
172
+class LIntExport HClassBoxArray : public HHandleBaseArray
173
+{
174
+
175
+public:
176
+
177
+  // Create empty array
178
+  HClassBoxArray();
179
+
180
+  // Create array from native array of tool instances
181
+  HClassBoxArray(HClassBox* classes, Hlong length);
182
+
183
+  // Copy constructor
184
+  HClassBoxArray(const HClassBoxArray &tool_array);
185
+
186
+  // Destructor
187
+  virtual ~HClassBoxArray();
188
+
189
+  // Assignment operator
190
+  HClassBoxArray &operator=(const HClassBoxArray &tool_array);
191
+
192
+  // Clears array and all tool instances
193
+  virtual void Clear();
194
+
195
+  // Get array of native tool instances
196
+  const HClassBox* Tools() const;
197
+
198
+  // Get number of tools
199
+  virtual Hlong Length() const;
200
+
201
+  // Create tool array from tuple of handles
202
+  virtual void SetFromTuple(const HTuple& handles);
203
+
204
+  // Get tuple of handles for tool array
205
+  virtual HTuple ConvertToTuple() const;
206
+
207
+protected:
208
+
209
+// Smart pointer to internal data container
210
+   HClassBoxArrayPtr *mArrayPtr;
211
+};
212
+
213
+}
214
+
215
+#endif

+ 291 - 0
3rdparty/include22/halcon/halconcpp/HClassGmm.h

@@ -0,0 +1,291 @@
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
+
8
+
9
+#ifndef HCPP_HCLASSGMM
10
+#define HCPP_HCLASSGMM
11
+
12
+namespace HalconCpp
13
+{
14
+
15
+// Represents an instance of a Gaussian mixture model.
16
+class LIntExport HClassGmm : public HHandle
17
+{
18
+
19
+public:
20
+
21
+  // Create an uninitialized instance
22
+  HClassGmm():HHandle() {}
23
+
24
+  // Copy constructor
25
+  HClassGmm(const HClassGmm& source) : HHandle(source) {}
26
+
27
+  // Copy constructor
28
+  HClassGmm(const HHandle& handle);
29
+
30
+  // Create HClassGmm from handle, taking ownership
31
+  explicit HClassGmm(Hlong handle);
32
+
33
+  bool operator==(const HHandle& obj) const
34
+  {
35
+    return HHandleBase::operator==(obj);
36
+  }
37
+
38
+  bool operator!=(const HHandle& obj) const
39
+  {
40
+    return HHandleBase::operator!=(obj);
41
+  }
42
+
43
+protected:
44
+
45
+  // Verify matching semantic type ('class_gmm')!
46
+  virtual void AssertType(Hphandle handle) const;
47
+
48
+public:
49
+
50
+  // Deep copy of all data represented by this object instance
51
+  HClassGmm Clone() const;
52
+
53
+
54
+
55
+/*****************************************************************************
56
+ * Operator-based class constructors
57
+ *****************************************************************************/
58
+
59
+  // read_class_gmm: Read a Gaussian Mixture Model from a file.
60
+  explicit HClassGmm(const HString& FileName);
61
+
62
+  // read_class_gmm: Read a Gaussian Mixture Model from a file.
63
+  explicit HClassGmm(const char* FileName);
64
+
65
+#ifdef _WIN32
66
+  // read_class_gmm: Read a Gaussian Mixture Model from a file.
67
+  explicit HClassGmm(const wchar_t* FileName);
68
+#endif
69
+
70
+  // create_class_gmm: Create a Gaussian Mixture Model for classification
71
+  explicit HClassGmm(Hlong NumDim, Hlong NumClasses, const HTuple& NumCenters, const HString& CovarType, const HString& Preprocessing, Hlong NumComponents, Hlong RandSeed);
72
+
73
+  // create_class_gmm: Create a Gaussian Mixture Model for classification
74
+  explicit HClassGmm(Hlong NumDim, Hlong NumClasses, Hlong NumCenters, const HString& CovarType, const HString& Preprocessing, Hlong NumComponents, Hlong RandSeed);
75
+
76
+  // create_class_gmm: Create a Gaussian Mixture Model for classification
77
+  explicit HClassGmm(Hlong NumDim, Hlong NumClasses, Hlong NumCenters, const char* CovarType, const char* Preprocessing, Hlong NumComponents, Hlong RandSeed);
78
+
79
+#ifdef _WIN32
80
+  // create_class_gmm: Create a Gaussian Mixture Model for classification
81
+  explicit HClassGmm(Hlong NumDim, Hlong NumClasses, Hlong NumCenters, const wchar_t* CovarType, const wchar_t* Preprocessing, Hlong NumComponents, Hlong RandSeed);
82
+#endif
83
+
84
+
85
+
86
+
87
+  /***************************************************************************
88
+   * Operators                                                               *
89
+   ***************************************************************************/
90
+
91
+  // Classify an image with a Gaussian Mixture Model.
92
+  HRegion ClassifyImageClassGmm(const HImage& Image, double RejectionThreshold) const;
93
+
94
+  // Add training samples from an image to the training data of a Gaussian Mixture Model.
95
+  void AddSamplesImageClassGmm(const HImage& Image, const HRegion& ClassRegions, double Randomize) const;
96
+
97
+  // Get the training data of a Gaussian Mixture Model (GMM).
98
+  HClassTrainData GetClassTrainDataGmm() const;
99
+
100
+  // Add training data to a Gaussian Mixture Model (GMM).
101
+  void AddClassTrainDataGmm(const HClassTrainData& ClassTrainDataHandle) const;
102
+
103
+  // Selects an optimal combination from a set of features to classify the  provided data.
104
+  HTuple SelectFeatureSetGmm(const HClassTrainData& ClassTrainDataHandle, const HString& SelectionMethod, const HTuple& GenParamName, const HTuple& GenParamValue, HTuple* Score);
105
+
106
+  // Selects an optimal combination from a set of features to classify the  provided data.
107
+  HTuple SelectFeatureSetGmm(const HClassTrainData& ClassTrainDataHandle, const HString& SelectionMethod, const HString& GenParamName, double GenParamValue, HTuple* Score);
108
+
109
+  // Selects an optimal combination from a set of features to classify the  provided data.
110
+  HTuple SelectFeatureSetGmm(const HClassTrainData& ClassTrainDataHandle, const char* SelectionMethod, const char* GenParamName, double GenParamValue, HTuple* Score);
111
+
112
+#ifdef _WIN32
113
+  // Selects an optimal combination from a set of features to classify the  provided data.
114
+  HTuple SelectFeatureSetGmm(const HClassTrainData& ClassTrainDataHandle, const wchar_t* SelectionMethod, const wchar_t* GenParamName, double GenParamValue, HTuple* Score);
115
+#endif
116
+
117
+  // Create a look-up table using a gaussian mixture model to classify byte images.
118
+  HClassLUT CreateClassLutGmm(const HTuple& GenParamName, const HTuple& GenParamValue) const;
119
+
120
+  // Clear a Gaussian Mixture Model.
121
+  static void ClearClassGmm(const HClassGmmArray& GMMHandle);
122
+
123
+  // Clear a Gaussian Mixture Model.
124
+  void ClearClassGmm() const;
125
+
126
+  // Clear the training data of a Gaussian Mixture Model.
127
+  static void ClearSamplesClassGmm(const HClassGmmArray& GMMHandle);
128
+
129
+  // Clear the training data of a Gaussian Mixture Model.
130
+  void ClearSamplesClassGmm() const;
131
+
132
+  // Deserialize a serialized Gaussian Mixture Model.
133
+  void DeserializeClassGmm(const HSerializedItem& SerializedItemHandle);
134
+
135
+  // Serialize a Gaussian Mixture Model (GMM).
136
+  HSerializedItem SerializeClassGmm() const;
137
+
138
+  // Read a Gaussian Mixture Model from a file.
139
+  void ReadClassGmm(const HString& FileName);
140
+
141
+  // Read a Gaussian Mixture Model from a file.
142
+  void ReadClassGmm(const char* FileName);
143
+
144
+#ifdef _WIN32
145
+  // Read a Gaussian Mixture Model from a file.
146
+  void ReadClassGmm(const wchar_t* FileName);
147
+#endif
148
+
149
+  // Write a Gaussian Mixture Model to a file.
150
+  void WriteClassGmm(const HString& FileName) const;
151
+
152
+  // Write a Gaussian Mixture Model to a file.
153
+  void WriteClassGmm(const char* FileName) const;
154
+
155
+#ifdef _WIN32
156
+  // Write a Gaussian Mixture Model to a file.
157
+  void WriteClassGmm(const wchar_t* FileName) const;
158
+#endif
159
+
160
+  // Read the training data of a Gaussian Mixture Model from a file.
161
+  void ReadSamplesClassGmm(const HString& FileName) const;
162
+
163
+  // Read the training data of a Gaussian Mixture Model from a file.
164
+  void ReadSamplesClassGmm(const char* FileName) const;
165
+
166
+#ifdef _WIN32
167
+  // Read the training data of a Gaussian Mixture Model from a file.
168
+  void ReadSamplesClassGmm(const wchar_t* FileName) const;
169
+#endif
170
+
171
+  // Write the training data of a Gaussian Mixture Model to a file.
172
+  void WriteSamplesClassGmm(const HString& FileName) const;
173
+
174
+  // Write the training data of a Gaussian Mixture Model to a file.
175
+  void WriteSamplesClassGmm(const char* FileName) const;
176
+
177
+#ifdef _WIN32
178
+  // Write the training data of a Gaussian Mixture Model to a file.
179
+  void WriteSamplesClassGmm(const wchar_t* FileName) const;
180
+#endif
181
+
182
+  // Calculate the class of a feature vector by a Gaussian Mixture Model.
183
+  HTuple ClassifyClassGmm(const HTuple& Features, Hlong Num, HTuple* ClassProb, HTuple* Density, HTuple* KSigmaProb) const;
184
+
185
+  // Evaluate a feature vector by a Gaussian Mixture Model.
186
+  HTuple EvaluateClassGmm(const HTuple& Features, double* Density, double* KSigmaProb) const;
187
+
188
+  // Train a Gaussian Mixture Model.
189
+  HTuple TrainClassGmm(Hlong MaxIter, double Threshold, const HString& ClassPriors, double Regularize, HTuple* Iter) const;
190
+
191
+  // Train a Gaussian Mixture Model.
192
+  HTuple TrainClassGmm(Hlong MaxIter, double Threshold, const char* ClassPriors, double Regularize, HTuple* Iter) const;
193
+
194
+#ifdef _WIN32
195
+  // Train a Gaussian Mixture Model.
196
+  HTuple TrainClassGmm(Hlong MaxIter, double Threshold, const wchar_t* ClassPriors, double Regularize, HTuple* Iter) const;
197
+#endif
198
+
199
+  // Compute the information content of the preprocessed feature vectors of a GMM.
200
+  HTuple GetPrepInfoClassGmm(const HString& Preprocessing, HTuple* CumInformationCont) const;
201
+
202
+  // Compute the information content of the preprocessed feature vectors of a GMM.
203
+  HTuple GetPrepInfoClassGmm(const char* Preprocessing, HTuple* CumInformationCont) const;
204
+
205
+#ifdef _WIN32
206
+  // Compute the information content of the preprocessed feature vectors of a GMM.
207
+  HTuple GetPrepInfoClassGmm(const wchar_t* Preprocessing, HTuple* CumInformationCont) const;
208
+#endif
209
+
210
+  // Return the number of training samples stored in the training data of a Gaussian Mixture Model (GMM).
211
+  Hlong GetSampleNumClassGmm() const;
212
+
213
+  // Return a training sample from the training data of a Gaussian Mixture Models (GMM).
214
+  HTuple GetSampleClassGmm(Hlong NumSample, Hlong* ClassID) const;
215
+
216
+  // Add a training sample to the training data of a Gaussian Mixture Model.
217
+  void AddSampleClassGmm(const HTuple& Features, Hlong ClassID, double Randomize) const;
218
+
219
+  // Return the parameters of a Gaussian Mixture Model.
220
+  Hlong GetParamsClassGmm(Hlong* NumClasses, HTuple* MinCenters, HTuple* MaxCenters, HString* CovarType) const;
221
+
222
+  // Create a Gaussian Mixture Model for classification
223
+  void CreateClassGmm(Hlong NumDim, Hlong NumClasses, const HTuple& NumCenters, const HString& CovarType, const HString& Preprocessing, Hlong NumComponents, Hlong RandSeed);
224
+
225
+  // Create a Gaussian Mixture Model for classification
226
+  void CreateClassGmm(Hlong NumDim, Hlong NumClasses, Hlong NumCenters, const HString& CovarType, const HString& Preprocessing, Hlong NumComponents, Hlong RandSeed);
227
+
228
+  // Create a Gaussian Mixture Model for classification
229
+  void CreateClassGmm(Hlong NumDim, Hlong NumClasses, Hlong NumCenters, const char* CovarType, const char* Preprocessing, Hlong NumComponents, Hlong RandSeed);
230
+
231
+#ifdef _WIN32
232
+  // Create a Gaussian Mixture Model for classification
233
+  void CreateClassGmm(Hlong NumDim, Hlong NumClasses, Hlong NumCenters, const wchar_t* CovarType, const wchar_t* Preprocessing, Hlong NumComponents, Hlong RandSeed);
234
+#endif
235
+
236
+};
237
+
238
+// forward declarations and types for internal array implementation
239
+
240
+template<class T> class HSmartPtr;
241
+template<class T> class HHandleBaseArrayRef;
242
+
243
+typedef HHandleBaseArrayRef<HClassGmm> HClassGmmArrayRef;
244
+typedef HSmartPtr< HClassGmmArrayRef > HClassGmmArrayPtr;
245
+
246
+
247
+// Represents multiple tool instances
248
+class LIntExport HClassGmmArray : public HHandleBaseArray
249
+{
250
+
251
+public:
252
+
253
+  // Create empty array
254
+  HClassGmmArray();
255
+
256
+  // Create array from native array of tool instances
257
+  HClassGmmArray(HClassGmm* classes, Hlong length);
258
+
259
+  // Copy constructor
260
+  HClassGmmArray(const HClassGmmArray &tool_array);
261
+
262
+  // Destructor
263
+  virtual ~HClassGmmArray();
264
+
265
+  // Assignment operator
266
+  HClassGmmArray &operator=(const HClassGmmArray &tool_array);
267
+
268
+  // Clears array and all tool instances
269
+  virtual void Clear();
270
+
271
+  // Get array of native tool instances
272
+  const HClassGmm* Tools() const;
273
+
274
+  // Get number of tools
275
+  virtual Hlong Length() const;
276
+
277
+  // Create tool array from tuple of handles
278
+  virtual void SetFromTuple(const HTuple& handles);
279
+
280
+  // Get tuple of handles for tool array
281
+  virtual HTuple ConvertToTuple() const;
282
+
283
+protected:
284
+
285
+// Smart pointer to internal data container
286
+   HClassGmmArrayPtr *mArrayPtr;
287
+};
288
+
289
+}
290
+
291
+#endif

+ 222 - 0
3rdparty/include22/halcon/halconcpp/HClassKnn.h

@@ -0,0 +1,222 @@
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
+
8
+
9
+#ifndef HCPP_HCLASSKNN
10
+#define HCPP_HCLASSKNN
11
+
12
+namespace HalconCpp
13
+{
14
+
15
+// Represents an instance of a k-NearestNeighbor classifier.
16
+class LIntExport HClassKnn : public HHandle
17
+{
18
+
19
+public:
20
+
21
+  // Create an uninitialized instance
22
+  HClassKnn():HHandle() {}
23
+
24
+  // Copy constructor
25
+  HClassKnn(const HClassKnn& source) : HHandle(source) {}
26
+
27
+  // Copy constructor
28
+  HClassKnn(const HHandle& handle);
29
+
30
+  // Create HClassKnn from handle, taking ownership
31
+  explicit HClassKnn(Hlong handle);
32
+
33
+  bool operator==(const HHandle& obj) const
34
+  {
35
+    return HHandleBase::operator==(obj);
36
+  }
37
+
38
+  bool operator!=(const HHandle& obj) const
39
+  {
40
+    return HHandleBase::operator!=(obj);
41
+  }
42
+
43
+protected:
44
+
45
+  // Verify matching semantic type ('class_knn')!
46
+  virtual void AssertType(Hphandle handle) const;
47
+
48
+public:
49
+
50
+  // Deep copy of all data represented by this object instance
51
+  HClassKnn Clone() const;
52
+
53
+
54
+
55
+/*****************************************************************************
56
+ * Operator-based class constructors
57
+ *****************************************************************************/
58
+
59
+  // read_class_knn: Read the k-NN classifier from a file.
60
+  explicit HClassKnn(const HString& FileName);
61
+
62
+  // read_class_knn: Read the k-NN classifier from a file.
63
+  explicit HClassKnn(const char* FileName);
64
+
65
+#ifdef _WIN32
66
+  // read_class_knn: Read the k-NN classifier from a file.
67
+  explicit HClassKnn(const wchar_t* FileName);
68
+#endif
69
+
70
+  // create_class_knn: Create a k-nearest neighbors (k-NN) classifier.
71
+  explicit HClassKnn(const HTuple& NumDim);
72
+
73
+
74
+
75
+
76
+  /***************************************************************************
77
+   * Operators                                                               *
78
+   ***************************************************************************/
79
+
80
+  // Classify an image with a k-Nearest-Neighbor classifier.
81
+  HRegion ClassifyImageClassKnn(const HImage& Image, HImage* DistanceImage, double RejectionThreshold) const;
82
+
83
+  // Add training samples from an image to the training data of a k-Nearest-Neighbor classifier.
84
+  void AddSamplesImageClassKnn(const HImage& Image, const HRegion& ClassRegions) const;
85
+
86
+  // Get the training data of a k-nearest neighbors (k-NN) classifier.
87
+  HClassTrainData GetClassTrainDataKnn() const;
88
+
89
+  // Add training data to a k-nearest neighbors (k-NN) classifier.
90
+  void AddClassTrainDataKnn(const HClassTrainData& ClassTrainDataHandle) const;
91
+
92
+  // Selects an optimal subset from a set of features to solve a certain  classification problem.
93
+  HTuple SelectFeatureSetKnn(const HClassTrainData& ClassTrainDataHandle, const HString& SelectionMethod, const HTuple& GenParamName, const HTuple& GenParamValue, HTuple* Score);
94
+
95
+  // Selects an optimal subset from a set of features to solve a certain  classification problem.
96
+  HTuple SelectFeatureSetKnn(const HClassTrainData& ClassTrainDataHandle, const HString& SelectionMethod, const HString& GenParamName, double GenParamValue, HTuple* Score);
97
+
98
+  // Selects an optimal subset from a set of features to solve a certain  classification problem.
99
+  HTuple SelectFeatureSetKnn(const HClassTrainData& ClassTrainDataHandle, const char* SelectionMethod, const char* GenParamName, double GenParamValue, HTuple* Score);
100
+
101
+#ifdef _WIN32
102
+  // Selects an optimal subset from a set of features to solve a certain  classification problem.
103
+  HTuple SelectFeatureSetKnn(const HClassTrainData& ClassTrainDataHandle, const wchar_t* SelectionMethod, const wchar_t* GenParamName, double GenParamValue, HTuple* Score);
104
+#endif
105
+
106
+  // Clear a k-NN classifier.
107
+  void ClearClassKnn() const;
108
+
109
+  // Return the number of training samples stored in the training data of a k-nearest neighbors (k-NN) classifier.
110
+  Hlong GetSampleNumClassKnn() const;
111
+
112
+  // Return a training sample from the training data of a k-nearest neighbors  (k-NN) classifier.
113
+  HTuple GetSampleClassKnn(Hlong IndexSample, HTuple* ClassID) const;
114
+
115
+  // Deserialize a serialized k-NN classifier.
116
+  void DeserializeClassKnn(const HSerializedItem& SerializedItemHandle);
117
+
118
+  // Serialize a k-NN classifier.
119
+  HSerializedItem SerializeClassKnn() const;
120
+
121
+  // Read the k-NN classifier from a file.
122
+  void ReadClassKnn(const HString& FileName);
123
+
124
+  // Read the k-NN classifier from a file.
125
+  void ReadClassKnn(const char* FileName);
126
+
127
+#ifdef _WIN32
128
+  // Read the k-NN classifier from a file.
129
+  void ReadClassKnn(const wchar_t* FileName);
130
+#endif
131
+
132
+  // Save the k-NN classifier in a file.
133
+  void WriteClassKnn(const HString& FileName) const;
134
+
135
+  // Save the k-NN classifier in a file.
136
+  void WriteClassKnn(const char* FileName) const;
137
+
138
+#ifdef _WIN32
139
+  // Save the k-NN classifier in a file.
140
+  void WriteClassKnn(const wchar_t* FileName) const;
141
+#endif
142
+
143
+  // Get parameters of a k-NN classification.
144
+  HTuple GetParamsClassKnn(const HTuple& GenParamName) const;
145
+
146
+  // Set parameters for k-NN classification.
147
+  void SetParamsClassKnn(const HTuple& GenParamName, const HTuple& GenParamValue) const;
148
+
149
+  // Search for the next neighbors for a given feature vector.
150
+  HTuple ClassifyClassKnn(const HTuple& Features, HTuple* Rating) const;
151
+
152
+  // Creates the search trees for a k-NN classifier.
153
+  void TrainClassKnn(const HTuple& GenParamName, const HTuple& GenParamValue) const;
154
+
155
+  // Add a sample to a  k-nearest neighbors (k-NN) classifier.
156
+  void AddSampleClassKnn(const HTuple& Features, const HTuple& ClassID) const;
157
+
158
+  // Add a sample to a  k-nearest neighbors (k-NN) classifier.
159
+  void AddSampleClassKnn(double Features, Hlong ClassID) const;
160
+
161
+  // Create a k-nearest neighbors (k-NN) classifier.
162
+  void CreateClassKnn(const HTuple& NumDim);
163
+
164
+  // Create a look-up table using a k-nearest neighbors classifier (k-NN) to classify byte images.
165
+  HClassLUT CreateClassLutKnn(const HTuple& GenParamName, const HTuple& GenParamValue) const;
166
+
167
+};
168
+
169
+// forward declarations and types for internal array implementation
170
+
171
+template<class T> class HSmartPtr;
172
+template<class T> class HHandleBaseArrayRef;
173
+
174
+typedef HHandleBaseArrayRef<HClassKnn> HClassKnnArrayRef;
175
+typedef HSmartPtr< HClassKnnArrayRef > HClassKnnArrayPtr;
176
+
177
+
178
+// Represents multiple tool instances
179
+class LIntExport HClassKnnArray : public HHandleBaseArray
180
+{
181
+
182
+public:
183
+
184
+  // Create empty array
185
+  HClassKnnArray();
186
+
187
+  // Create array from native array of tool instances
188
+  HClassKnnArray(HClassKnn* classes, Hlong length);
189
+
190
+  // Copy constructor
191
+  HClassKnnArray(const HClassKnnArray &tool_array);
192
+
193
+  // Destructor
194
+  virtual ~HClassKnnArray();
195
+
196
+  // Assignment operator
197
+  HClassKnnArray &operator=(const HClassKnnArray &tool_array);
198
+
199
+  // Clears array and all tool instances
200
+  virtual void Clear();
201
+
202
+  // Get array of native tool instances
203
+  const HClassKnn* Tools() const;
204
+
205
+  // Get number of tools
206
+  virtual Hlong Length() const;
207
+
208
+  // Create tool array from tuple of handles
209
+  virtual void SetFromTuple(const HTuple& handles);
210
+
211
+  // Get tuple of handles for tool array
212
+  virtual HTuple ConvertToTuple() const;
213
+
214
+protected:
215
+
216
+// Smart pointer to internal data container
217
+   HClassKnnArrayPtr *mArrayPtr;
218
+};
219
+
220
+}
221
+
222
+#endif

+ 151 - 0
3rdparty/include22/halcon/halconcpp/HClassLUT.h

@@ -0,0 +1,151 @@
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
+
8
+
9
+#ifndef HCPP_HCLASSLUT
10
+#define HCPP_HCLASSLUT
11
+
12
+namespace HalconCpp
13
+{
14
+
15
+// Represents an instance of a classification lookup table
16
+class LIntExport HClassLUT : public HHandle
17
+{
18
+
19
+public:
20
+
21
+  // Create an uninitialized instance
22
+  HClassLUT():HHandle() {}
23
+
24
+  // Copy constructor
25
+  HClassLUT(const HClassLUT& source) : HHandle(source) {}
26
+
27
+  // Copy constructor
28
+  HClassLUT(const HHandle& handle);
29
+
30
+  // Create HClassLUT from handle, taking ownership
31
+  explicit HClassLUT(Hlong handle);
32
+
33
+  bool operator==(const HHandle& obj) const
34
+  {
35
+    return HHandleBase::operator==(obj);
36
+  }
37
+
38
+  bool operator!=(const HHandle& obj) const
39
+  {
40
+    return HHandleBase::operator!=(obj);
41
+  }
42
+
43
+protected:
44
+
45
+  // Verify matching semantic type ('class_lut')!
46
+  virtual void AssertType(Hphandle handle) const;
47
+
48
+public:
49
+
50
+
51
+
52
+/*****************************************************************************
53
+ * Operator-based class constructors
54
+ *****************************************************************************/
55
+
56
+  // create_class_lut_knn: Create a look-up table using a k-nearest neighbors classifier (k-NN) to classify byte images.
57
+  explicit HClassLUT(const HClassKnn& KNNHandle, const HTuple& GenParamName, const HTuple& GenParamValue);
58
+
59
+  // create_class_lut_gmm: Create a look-up table using a gaussian mixture model to classify byte images.
60
+  explicit HClassLUT(const HClassGmm& GMMHandle, const HTuple& GenParamName, const HTuple& GenParamValue);
61
+
62
+  // create_class_lut_svm: Create a look-up table using a Support-Vector-Machine to classify byte images.
63
+  explicit HClassLUT(const HClassSvm& SVMHandle, const HTuple& GenParamName, const HTuple& GenParamValue);
64
+
65
+  // create_class_lut_mlp: Create a look-up table using a multi-layer perceptron to classify byte images.
66
+  explicit HClassLUT(const HClassMlp& MLPHandle, const HTuple& GenParamName, const HTuple& GenParamValue);
67
+
68
+
69
+
70
+
71
+  /***************************************************************************
72
+   * Operators                                                               *
73
+   ***************************************************************************/
74
+
75
+  // Classify a byte image using a look-up table.
76
+  HRegion ClassifyImageClassLut(const HImage& Image) const;
77
+
78
+  // Clear a look-up table classifier.
79
+  static void ClearClassLut(const HClassLUTArray& ClassLUTHandle);
80
+
81
+  // Clear a look-up table classifier.
82
+  void ClearClassLut() const;
83
+
84
+  // Create a look-up table using a k-nearest neighbors classifier (k-NN) to classify byte images.
85
+  void CreateClassLutKnn(const HClassKnn& KNNHandle, const HTuple& GenParamName, const HTuple& GenParamValue);
86
+
87
+  // Create a look-up table using a gaussian mixture model to classify byte images.
88
+  void CreateClassLutGmm(const HClassGmm& GMMHandle, const HTuple& GenParamName, const HTuple& GenParamValue);
89
+
90
+  // Create a look-up table using a Support-Vector-Machine to classify byte images.
91
+  void CreateClassLutSvm(const HClassSvm& SVMHandle, const HTuple& GenParamName, const HTuple& GenParamValue);
92
+
93
+  // Create a look-up table using a multi-layer perceptron to classify byte images.
94
+  void CreateClassLutMlp(const HClassMlp& MLPHandle, const HTuple& GenParamName, const HTuple& GenParamValue);
95
+
96
+};
97
+
98
+// forward declarations and types for internal array implementation
99
+
100
+template<class T> class HSmartPtr;
101
+template<class T> class HHandleBaseArrayRef;
102
+
103
+typedef HHandleBaseArrayRef<HClassLUT> HClassLUTArrayRef;
104
+typedef HSmartPtr< HClassLUTArrayRef > HClassLUTArrayPtr;
105
+
106
+
107
+// Represents multiple tool instances
108
+class LIntExport HClassLUTArray : public HHandleBaseArray
109
+{
110
+
111
+public:
112
+
113
+  // Create empty array
114
+  HClassLUTArray();
115
+
116
+  // Create array from native array of tool instances
117
+  HClassLUTArray(HClassLUT* classes, Hlong length);
118
+
119
+  // Copy constructor
120
+  HClassLUTArray(const HClassLUTArray &tool_array);
121
+
122
+  // Destructor
123
+  virtual ~HClassLUTArray();
124
+
125
+  // Assignment operator
126
+  HClassLUTArray &operator=(const HClassLUTArray &tool_array);
127
+
128
+  // Clears array and all tool instances
129
+  virtual void Clear();
130
+
131
+  // Get array of native tool instances
132
+  const HClassLUT* Tools() const;
133
+
134
+  // Get number of tools
135
+  virtual Hlong Length() const;
136
+
137
+  // Create tool array from tuple of handles
138
+  virtual void SetFromTuple(const HTuple& handles);
139
+
140
+  // Get tuple of handles for tool array
141
+  virtual HTuple ConvertToTuple() const;
142
+
143
+protected:
144
+
145
+// Smart pointer to internal data container
146
+   HClassLUTArrayPtr *mArrayPtr;
147
+};
148
+
149
+}
150
+
151
+#endif

+ 336 - 0
3rdparty/include22/halcon/halconcpp/HClassMlp.h

@@ -0,0 +1,336 @@
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
+
8
+
9
+#ifndef HCPP_HCLASSMLP
10
+#define HCPP_HCLASSMLP
11
+
12
+namespace HalconCpp
13
+{
14
+
15
+// Represents an instance of a multilayer perceptron.
16
+class LIntExport HClassMlp : public HHandle
17
+{
18
+
19
+public:
20
+
21
+  // Create an uninitialized instance
22
+  HClassMlp():HHandle() {}
23
+
24
+  // Copy constructor
25
+  HClassMlp(const HClassMlp& source) : HHandle(source) {}
26
+
27
+  // Copy constructor
28
+  HClassMlp(const HHandle& handle);
29
+
30
+  // Create HClassMlp from handle, taking ownership
31
+  explicit HClassMlp(Hlong handle);
32
+
33
+  bool operator==(const HHandle& obj) const
34
+  {
35
+    return HHandleBase::operator==(obj);
36
+  }
37
+
38
+  bool operator!=(const HHandle& obj) const
39
+  {
40
+    return HHandleBase::operator!=(obj);
41
+  }
42
+
43
+protected:
44
+
45
+  // Verify matching semantic type ('class_mlp')!
46
+  virtual void AssertType(Hphandle handle) const;
47
+
48
+public:
49
+
50
+  // Deep copy of all data represented by this object instance
51
+  HClassMlp Clone() const;
52
+
53
+
54
+
55
+/*****************************************************************************
56
+ * Operator-based class constructors
57
+ *****************************************************************************/
58
+
59
+  // read_class_mlp: Read a multilayer perceptron from a file.
60
+  explicit HClassMlp(const HString& FileName);
61
+
62
+  // read_class_mlp: Read a multilayer perceptron from a file.
63
+  explicit HClassMlp(const char* FileName);
64
+
65
+#ifdef _WIN32
66
+  // read_class_mlp: Read a multilayer perceptron from a file.
67
+  explicit HClassMlp(const wchar_t* FileName);
68
+#endif
69
+
70
+  // create_class_mlp: Create a multilayer perceptron for classification or regression.
71
+  explicit HClassMlp(Hlong NumInput, Hlong NumHidden, Hlong NumOutput, const HString& OutputFunction, const HString& Preprocessing, Hlong NumComponents, Hlong RandSeed);
72
+
73
+  // create_class_mlp: Create a multilayer perceptron for classification or regression.
74
+  explicit HClassMlp(Hlong NumInput, Hlong NumHidden, Hlong NumOutput, const char* OutputFunction, const char* Preprocessing, Hlong NumComponents, Hlong RandSeed);
75
+
76
+#ifdef _WIN32
77
+  // create_class_mlp: Create a multilayer perceptron for classification or regression.
78
+  explicit HClassMlp(Hlong NumInput, Hlong NumHidden, Hlong NumOutput, const wchar_t* OutputFunction, const wchar_t* Preprocessing, Hlong NumComponents, Hlong RandSeed);
79
+#endif
80
+
81
+
82
+
83
+
84
+  /***************************************************************************
85
+   * Operators                                                               *
86
+   ***************************************************************************/
87
+
88
+  // Classify an image with a multilayer perceptron.
89
+  HRegion ClassifyImageClassMlp(const HImage& Image, double RejectionThreshold) const;
90
+
91
+  // Add training samples from an image to the training data of a multilayer perceptron.
92
+  void AddSamplesImageClassMlp(const HImage& Image, const HRegion& ClassRegions) const;
93
+
94
+  // Get the training data of a multilayer perceptron (MLP).
95
+  HClassTrainData GetClassTrainDataMlp() const;
96
+
97
+  // Add training data to a multilayer perceptron (MLP).
98
+  void AddClassTrainDataMlp(const HClassTrainData& ClassTrainDataHandle) const;
99
+
100
+  // Selects an optimal combination of features to classify the provided data.
101
+  HTuple SelectFeatureSetMlp(const HClassTrainData& ClassTrainDataHandle, const HString& SelectionMethod, const HTuple& GenParamName, const HTuple& GenParamValue, HTuple* Score);
102
+
103
+  // Selects an optimal combination of features to classify the provided data.
104
+  HTuple SelectFeatureSetMlp(const HClassTrainData& ClassTrainDataHandle, const HString& SelectionMethod, const HString& GenParamName, double GenParamValue, HTuple* Score);
105
+
106
+  // Selects an optimal combination of features to classify the provided data.
107
+  HTuple SelectFeatureSetMlp(const HClassTrainData& ClassTrainDataHandle, const char* SelectionMethod, const char* GenParamName, double GenParamValue, HTuple* Score);
108
+
109
+#ifdef _WIN32
110
+  // Selects an optimal combination of features to classify the provided data.
111
+  HTuple SelectFeatureSetMlp(const HClassTrainData& ClassTrainDataHandle, const wchar_t* SelectionMethod, const wchar_t* GenParamName, double GenParamValue, HTuple* Score);
112
+#endif
113
+
114
+  // Create a look-up table using a multi-layer perceptron to classify byte images.
115
+  HClassLUT CreateClassLutMlp(const HTuple& GenParamName, const HTuple& GenParamValue) const;
116
+
117
+  // Clear a multilayer perceptron.
118
+  static void ClearClassMlp(const HClassMlpArray& MLPHandle);
119
+
120
+  // Clear a multilayer perceptron.
121
+  void ClearClassMlp() const;
122
+
123
+  // Clear the training data of a multilayer perceptron.
124
+  static void ClearSamplesClassMlp(const HClassMlpArray& MLPHandle);
125
+
126
+  // Clear the training data of a multilayer perceptron.
127
+  void ClearSamplesClassMlp() const;
128
+
129
+  // Deserialize a serialized multilayer perceptron.
130
+  void DeserializeClassMlp(const HSerializedItem& SerializedItemHandle);
131
+
132
+  // Serialize a multilayer perceptron (MLP).
133
+  HSerializedItem SerializeClassMlp() const;
134
+
135
+  // Read a multilayer perceptron from a file.
136
+  void ReadClassMlp(const HString& FileName);
137
+
138
+  // Read a multilayer perceptron from a file.
139
+  void ReadClassMlp(const char* FileName);
140
+
141
+#ifdef _WIN32
142
+  // Read a multilayer perceptron from a file.
143
+  void ReadClassMlp(const wchar_t* FileName);
144
+#endif
145
+
146
+  // Write a multilayer perceptron to a file.
147
+  void WriteClassMlp(const HString& FileName) const;
148
+
149
+  // Write a multilayer perceptron to a file.
150
+  void WriteClassMlp(const char* FileName) const;
151
+
152
+#ifdef _WIN32
153
+  // Write a multilayer perceptron to a file.
154
+  void WriteClassMlp(const wchar_t* FileName) const;
155
+#endif
156
+
157
+  // Read the training data of a multilayer perceptron from a file.
158
+  void ReadSamplesClassMlp(const HString& FileName) const;
159
+
160
+  // Read the training data of a multilayer perceptron from a file.
161
+  void ReadSamplesClassMlp(const char* FileName) const;
162
+
163
+#ifdef _WIN32
164
+  // Read the training data of a multilayer perceptron from a file.
165
+  void ReadSamplesClassMlp(const wchar_t* FileName) const;
166
+#endif
167
+
168
+  // Write the training data of a multilayer perceptron to a file.
169
+  void WriteSamplesClassMlp(const HString& FileName) const;
170
+
171
+  // Write the training data of a multilayer perceptron to a file.
172
+  void WriteSamplesClassMlp(const char* FileName) const;
173
+
174
+#ifdef _WIN32
175
+  // Write the training data of a multilayer perceptron to a file.
176
+  void WriteSamplesClassMlp(const wchar_t* FileName) const;
177
+#endif
178
+
179
+  // Calculate the class of a feature vector by a multilayer perceptron.
180
+  HTuple ClassifyClassMlp(const HTuple& Features, const HTuple& Num, HTuple* Confidence) const;
181
+
182
+  // Calculate the class of a feature vector by a multilayer perceptron.
183
+  Hlong ClassifyClassMlp(const HTuple& Features, const HTuple& Num, double* Confidence) const;
184
+
185
+  // Calculate the evaluation of a feature vector by a multilayer perceptron.
186
+  HTuple EvaluateClassMlp(const HTuple& Features) const;
187
+
188
+  // Train a multilayer perceptron.
189
+  double TrainClassMlp(Hlong MaxIterations, double WeightTolerance, double ErrorTolerance, HTuple* ErrorLog) const;
190
+
191
+  // Compute the information content of the preprocessed feature vectors of a multilayer perceptron.
192
+  HTuple GetPrepInfoClassMlp(const HString& Preprocessing, HTuple* CumInformationCont) const;
193
+
194
+  // Compute the information content of the preprocessed feature vectors of a multilayer perceptron.
195
+  HTuple GetPrepInfoClassMlp(const char* Preprocessing, HTuple* CumInformationCont) const;
196
+
197
+#ifdef _WIN32
198
+  // Compute the information content of the preprocessed feature vectors of a multilayer perceptron.
199
+  HTuple GetPrepInfoClassMlp(const wchar_t* Preprocessing, HTuple* CumInformationCont) const;
200
+#endif
201
+
202
+  // Return the number of training samples stored in the training data of a multilayer perceptron.
203
+  Hlong GetSampleNumClassMlp() const;
204
+
205
+  // Return a training sample from the training data of a multilayer perceptron.
206
+  HTuple GetSampleClassMlp(Hlong IndexSample, HTuple* Target) const;
207
+
208
+  // Get the parameters of a rejection class.
209
+  HTuple GetRejectionParamsClassMlp(const HTuple& GenParamName) const;
210
+
211
+  // Get the parameters of a rejection class.
212
+  HTuple GetRejectionParamsClassMlp(const HString& GenParamName) const;
213
+
214
+  // Get the parameters of a rejection class.
215
+  HTuple GetRejectionParamsClassMlp(const char* GenParamName) const;
216
+
217
+#ifdef _WIN32
218
+  // Get the parameters of a rejection class.
219
+  HTuple GetRejectionParamsClassMlp(const wchar_t* GenParamName) const;
220
+#endif
221
+
222
+  // Set the parameters of a rejection class.
223
+  void SetRejectionParamsClassMlp(const HTuple& GenParamName, const HTuple& GenParamValue) const;
224
+
225
+  // Set the parameters of a rejection class.
226
+  void SetRejectionParamsClassMlp(const HString& GenParamName, const HString& GenParamValue) const;
227
+
228
+  // Set the parameters of a rejection class.
229
+  void SetRejectionParamsClassMlp(const char* GenParamName, const char* GenParamValue) const;
230
+
231
+#ifdef _WIN32
232
+  // Set the parameters of a rejection class.
233
+  void SetRejectionParamsClassMlp(const wchar_t* GenParamName, const wchar_t* GenParamValue) const;
234
+#endif
235
+
236
+  // Add a training sample to the training data of a multilayer perceptron.
237
+  void AddSampleClassMlp(const HTuple& Features, const HTuple& Target) const;
238
+
239
+  // Add a training sample to the training data of a multilayer perceptron.
240
+  void AddSampleClassMlp(const HTuple& Features, Hlong Target) const;
241
+
242
+  // Return the regularization parameters of a multilayer perceptron.
243
+  HTuple GetRegularizationParamsClassMlp(const HString& GenParamName) const;
244
+
245
+  // Return the regularization parameters of a multilayer perceptron.
246
+  HTuple GetRegularizationParamsClassMlp(const char* GenParamName) const;
247
+
248
+#ifdef _WIN32
249
+  // Return the regularization parameters of a multilayer perceptron.
250
+  HTuple GetRegularizationParamsClassMlp(const wchar_t* GenParamName) const;
251
+#endif
252
+
253
+  // Set the regularization parameters of a multilayer perceptron.
254
+  void SetRegularizationParamsClassMlp(const HString& GenParamName, const HTuple& GenParamValue) const;
255
+
256
+  // Set the regularization parameters of a multilayer perceptron.
257
+  void SetRegularizationParamsClassMlp(const HString& GenParamName, double GenParamValue) const;
258
+
259
+  // Set the regularization parameters of a multilayer perceptron.
260
+  void SetRegularizationParamsClassMlp(const char* GenParamName, double GenParamValue) const;
261
+
262
+#ifdef _WIN32
263
+  // Set the regularization parameters of a multilayer perceptron.
264
+  void SetRegularizationParamsClassMlp(const wchar_t* GenParamName, double GenParamValue) const;
265
+#endif
266
+
267
+  // Return the parameters of a multilayer perceptron.
268
+  Hlong GetParamsClassMlp(Hlong* NumHidden, Hlong* NumOutput, HString* OutputFunction, HString* Preprocessing, Hlong* NumComponents) const;
269
+
270
+  // Create a multilayer perceptron for classification or regression.
271
+  void CreateClassMlp(Hlong NumInput, Hlong NumHidden, Hlong NumOutput, const HString& OutputFunction, const HString& Preprocessing, Hlong NumComponents, Hlong RandSeed);
272
+
273
+  // Create a multilayer perceptron for classification or regression.
274
+  void CreateClassMlp(Hlong NumInput, Hlong NumHidden, Hlong NumOutput, const char* OutputFunction, const char* Preprocessing, Hlong NumComponents, Hlong RandSeed);
275
+
276
+#ifdef _WIN32
277
+  // Create a multilayer perceptron for classification or regression.
278
+  void CreateClassMlp(Hlong NumInput, Hlong NumHidden, Hlong NumOutput, const wchar_t* OutputFunction, const wchar_t* Preprocessing, Hlong NumComponents, Hlong RandSeed);
279
+#endif
280
+
281
+};
282
+
283
+// forward declarations and types for internal array implementation
284
+
285
+template<class T> class HSmartPtr;
286
+template<class T> class HHandleBaseArrayRef;
287
+
288
+typedef HHandleBaseArrayRef<HClassMlp> HClassMlpArrayRef;
289
+typedef HSmartPtr< HClassMlpArrayRef > HClassMlpArrayPtr;
290
+
291
+
292
+// Represents multiple tool instances
293
+class LIntExport HClassMlpArray : public HHandleBaseArray
294
+{
295
+
296
+public:
297
+
298
+  // Create empty array
299
+  HClassMlpArray();
300
+
301
+  // Create array from native array of tool instances
302
+  HClassMlpArray(HClassMlp* classes, Hlong length);
303
+
304
+  // Copy constructor
305
+  HClassMlpArray(const HClassMlpArray &tool_array);
306
+
307
+  // Destructor
308
+  virtual ~HClassMlpArray();
309
+
310
+  // Assignment operator
311
+  HClassMlpArray &operator=(const HClassMlpArray &tool_array);
312
+
313
+  // Clears array and all tool instances
314
+  virtual void Clear();
315
+
316
+  // Get array of native tool instances
317
+  const HClassMlp* Tools() const;
318
+
319
+  // Get number of tools
320
+  virtual Hlong Length() const;
321
+
322
+  // Create tool array from tuple of handles
323
+  virtual void SetFromTuple(const HTuple& handles);
324
+
325
+  // Get tuple of handles for tool array
326
+  virtual HTuple ConvertToTuple() const;
327
+
328
+protected:
329
+
330
+// Smart pointer to internal data container
331
+   HClassMlpArrayPtr *mArrayPtr;
332
+};
333
+
334
+}
335
+
336
+#endif

+ 308 - 0
3rdparty/include22/halcon/halconcpp/HClassSvm.h

@@ -0,0 +1,308 @@
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
+
8
+
9
+#ifndef HCPP_HCLASSSVM
10
+#define HCPP_HCLASSSVM
11
+
12
+namespace HalconCpp
13
+{
14
+
15
+// Represents an instance of a support vector machine.
16
+class LIntExport HClassSvm : public HHandle
17
+{
18
+
19
+public:
20
+
21
+  // Create an uninitialized instance
22
+  HClassSvm():HHandle() {}
23
+
24
+  // Copy constructor
25
+  HClassSvm(const HClassSvm& source) : HHandle(source) {}
26
+
27
+  // Copy constructor
28
+  HClassSvm(const HHandle& handle);
29
+
30
+  // Create HClassSvm from handle, taking ownership
31
+  explicit HClassSvm(Hlong handle);
32
+
33
+  bool operator==(const HHandle& obj) const
34
+  {
35
+    return HHandleBase::operator==(obj);
36
+  }
37
+
38
+  bool operator!=(const HHandle& obj) const
39
+  {
40
+    return HHandleBase::operator!=(obj);
41
+  }
42
+
43
+protected:
44
+
45
+  // Verify matching semantic type ('class_svm')!
46
+  virtual void AssertType(Hphandle handle) const;
47
+
48
+public:
49
+
50
+  // Deep copy of all data represented by this object instance
51
+  HClassSvm Clone() const;
52
+
53
+
54
+
55
+/*****************************************************************************
56
+ * Operator-based class constructors
57
+ *****************************************************************************/
58
+
59
+  // read_class_svm: Read a support vector machine from a file.
60
+  explicit HClassSvm(const HString& FileName);
61
+
62
+  // read_class_svm: Read a support vector machine from a file.
63
+  explicit HClassSvm(const char* FileName);
64
+
65
+#ifdef _WIN32
66
+  // read_class_svm: Read a support vector machine from a file.
67
+  explicit HClassSvm(const wchar_t* FileName);
68
+#endif
69
+
70
+  // create_class_svm: Create a support vector machine for pattern classification.
71
+  explicit HClassSvm(Hlong NumFeatures, const HString& KernelType, double KernelParam, double Nu, Hlong NumClasses, const HString& Mode, const HString& Preprocessing, Hlong NumComponents);
72
+
73
+  // create_class_svm: Create a support vector machine for pattern classification.
74
+  explicit HClassSvm(Hlong NumFeatures, const char* KernelType, double KernelParam, double Nu, Hlong NumClasses, const char* Mode, const char* Preprocessing, Hlong NumComponents);
75
+
76
+#ifdef _WIN32
77
+  // create_class_svm: Create a support vector machine for pattern classification.
78
+  explicit HClassSvm(Hlong NumFeatures, const wchar_t* KernelType, double KernelParam, double Nu, Hlong NumClasses, const wchar_t* Mode, const wchar_t* Preprocessing, Hlong NumComponents);
79
+#endif
80
+
81
+
82
+
83
+
84
+  /***************************************************************************
85
+   * Operators                                                               *
86
+   ***************************************************************************/
87
+
88
+  // Classify an image with a support vector machine.
89
+  HRegion ClassifyImageClassSvm(const HImage& Image) const;
90
+
91
+  // Add training samples from an image to the training data of a support vector machine.
92
+  void AddSamplesImageClassSvm(const HImage& Image, const HRegion& ClassRegions) const;
93
+
94
+  // Get the training data of a support vector machine (SVM).
95
+  HClassTrainData GetClassTrainDataSvm() const;
96
+
97
+  // Add training data to a support vector machine (SVM).
98
+  void AddClassTrainDataSvm(const HClassTrainData& ClassTrainDataHandle) const;
99
+
100
+  // Selects an optimal combination of features to classify the provided data.
101
+  HTuple SelectFeatureSetSvm(const HClassTrainData& ClassTrainDataHandle, const HString& SelectionMethod, const HTuple& GenParamName, const HTuple& GenParamValue, HTuple* Score);
102
+
103
+  // Selects an optimal combination of features to classify the provided data.
104
+  HTuple SelectFeatureSetSvm(const HClassTrainData& ClassTrainDataHandle, const HString& SelectionMethod, const HString& GenParamName, double GenParamValue, HTuple* Score);
105
+
106
+  // Selects an optimal combination of features to classify the provided data.
107
+  HTuple SelectFeatureSetSvm(const HClassTrainData& ClassTrainDataHandle, const char* SelectionMethod, const char* GenParamName, double GenParamValue, HTuple* Score);
108
+
109
+#ifdef _WIN32
110
+  // Selects an optimal combination of features to classify the provided data.
111
+  HTuple SelectFeatureSetSvm(const HClassTrainData& ClassTrainDataHandle, const wchar_t* SelectionMethod, const wchar_t* GenParamName, double GenParamValue, HTuple* Score);
112
+#endif
113
+
114
+  // Create a look-up table using a Support-Vector-Machine to classify byte images.
115
+  HClassLUT CreateClassLutSvm(const HTuple& GenParamName, const HTuple& GenParamValue) const;
116
+
117
+  // Clear a support vector machine.
118
+  static void ClearClassSvm(const HClassSvmArray& SVMHandle);
119
+
120
+  // Clear a support vector machine.
121
+  void ClearClassSvm() const;
122
+
123
+  // Clear the training data of a support vector machine.
124
+  static void ClearSamplesClassSvm(const HClassSvmArray& SVMHandle);
125
+
126
+  // Clear the training data of a support vector machine.
127
+  void ClearSamplesClassSvm() const;
128
+
129
+  // Deserialize a serialized support vector machine (SVM).
130
+  void DeserializeClassSvm(const HSerializedItem& SerializedItemHandle);
131
+
132
+  // Serialize a support vector machine (SVM).
133
+  HSerializedItem SerializeClassSvm() const;
134
+
135
+  // Read a support vector machine from a file.
136
+  void ReadClassSvm(const HString& FileName);
137
+
138
+  // Read a support vector machine from a file.
139
+  void ReadClassSvm(const char* FileName);
140
+
141
+#ifdef _WIN32
142
+  // Read a support vector machine from a file.
143
+  void ReadClassSvm(const wchar_t* FileName);
144
+#endif
145
+
146
+  // Write a support vector machine to a file.
147
+  void WriteClassSvm(const HString& FileName) const;
148
+
149
+  // Write a support vector machine to a file.
150
+  void WriteClassSvm(const char* FileName) const;
151
+
152
+#ifdef _WIN32
153
+  // Write a support vector machine to a file.
154
+  void WriteClassSvm(const wchar_t* FileName) const;
155
+#endif
156
+
157
+  // Read the training data of a support vector machine from a file.
158
+  void ReadSamplesClassSvm(const HString& FileName) const;
159
+
160
+  // Read the training data of a support vector machine from a file.
161
+  void ReadSamplesClassSvm(const char* FileName) const;
162
+
163
+#ifdef _WIN32
164
+  // Read the training data of a support vector machine from a file.
165
+  void ReadSamplesClassSvm(const wchar_t* FileName) const;
166
+#endif
167
+
168
+  // Write the training data of a support vector machine to a file.
169
+  void WriteSamplesClassSvm(const HString& FileName) const;
170
+
171
+  // Write the training data of a support vector machine to a file.
172
+  void WriteSamplesClassSvm(const char* FileName) const;
173
+
174
+#ifdef _WIN32
175
+  // Write the training data of a support vector machine to a file.
176
+  void WriteSamplesClassSvm(const wchar_t* FileName) const;
177
+#endif
178
+
179
+  // Evaluate a feature vector by a support vector machine.
180
+  HTuple EvaluateClassSvm(const HTuple& Features) const;
181
+
182
+  // Classify a feature vector by a support vector machine.
183
+  HTuple ClassifyClassSvm(const HTuple& Features, const HTuple& Num) const;
184
+
185
+  // Approximate a trained support vector machine by a reduced support vector machine for faster classification.
186
+  HClassSvm ReduceClassSvm(const HString& Method, Hlong MinRemainingSV, double MaxError) const;
187
+
188
+  // Approximate a trained support vector machine by a reduced support vector machine for faster classification.
189
+  HClassSvm ReduceClassSvm(const char* Method, Hlong MinRemainingSV, double MaxError) const;
190
+
191
+#ifdef _WIN32
192
+  // Approximate a trained support vector machine by a reduced support vector machine for faster classification.
193
+  HClassSvm ReduceClassSvm(const wchar_t* Method, Hlong MinRemainingSV, double MaxError) const;
194
+#endif
195
+
196
+  // Train a support vector machine.
197
+  void TrainClassSvm(double Epsilon, const HTuple& TrainMode) const;
198
+
199
+  // Train a support vector machine.
200
+  void TrainClassSvm(double Epsilon, const HString& TrainMode) const;
201
+
202
+  // Train a support vector machine.
203
+  void TrainClassSvm(double Epsilon, const char* TrainMode) const;
204
+
205
+#ifdef _WIN32
206
+  // Train a support vector machine.
207
+  void TrainClassSvm(double Epsilon, const wchar_t* TrainMode) const;
208
+#endif
209
+
210
+  // Compute the information content of the preprocessed feature vectors of a support vector machine
211
+  HTuple GetPrepInfoClassSvm(const HString& Preprocessing, HTuple* CumInformationCont) const;
212
+
213
+  // Compute the information content of the preprocessed feature vectors of a support vector machine
214
+  HTuple GetPrepInfoClassSvm(const char* Preprocessing, HTuple* CumInformationCont) const;
215
+
216
+#ifdef _WIN32
217
+  // Compute the information content of the preprocessed feature vectors of a support vector machine
218
+  HTuple GetPrepInfoClassSvm(const wchar_t* Preprocessing, HTuple* CumInformationCont) const;
219
+#endif
220
+
221
+  // Return the number of support vectors of a support vector machine.
222
+  Hlong GetSupportVectorNumClassSvm(HTuple* NumSVPerSVM) const;
223
+
224
+  // Return the index of a support vector from a trained support vector machine.
225
+  double GetSupportVectorClassSvm(Hlong IndexSupportVector) const;
226
+
227
+  // Return the number of training samples stored in the training data of a support vector machine.
228
+  Hlong GetSampleNumClassSvm() const;
229
+
230
+  // Return a training sample from the training data of a support vector machine.
231
+  HTuple GetSampleClassSvm(Hlong IndexSample, Hlong* Target) const;
232
+
233
+  // Add a training sample to the training data of a support vector machine.
234
+  void AddSampleClassSvm(const HTuple& Features, const HTuple& Class) const;
235
+
236
+  // Add a training sample to the training data of a support vector machine.
237
+  void AddSampleClassSvm(const HTuple& Features, Hlong Class) const;
238
+
239
+  // Return the parameters of a support vector machine.
240
+  Hlong GetParamsClassSvm(HString* KernelType, double* KernelParam, double* Nu, Hlong* NumClasses, HString* Mode, HString* Preprocessing, Hlong* NumComponents) const;
241
+
242
+  // Create a support vector machine for pattern classification.
243
+  void CreateClassSvm(Hlong NumFeatures, const HString& KernelType, double KernelParam, double Nu, Hlong NumClasses, const HString& Mode, const HString& Preprocessing, Hlong NumComponents);
244
+
245
+  // Create a support vector machine for pattern classification.
246
+  void CreateClassSvm(Hlong NumFeatures, const char* KernelType, double KernelParam, double Nu, Hlong NumClasses, const char* Mode, const char* Preprocessing, Hlong NumComponents);
247
+
248
+#ifdef _WIN32
249
+  // Create a support vector machine for pattern classification.
250
+  void CreateClassSvm(Hlong NumFeatures, const wchar_t* KernelType, double KernelParam, double Nu, Hlong NumClasses, const wchar_t* Mode, const wchar_t* Preprocessing, Hlong NumComponents);
251
+#endif
252
+
253
+};
254
+
255
+// forward declarations and types for internal array implementation
256
+
257
+template<class T> class HSmartPtr;
258
+template<class T> class HHandleBaseArrayRef;
259
+
260
+typedef HHandleBaseArrayRef<HClassSvm> HClassSvmArrayRef;
261
+typedef HSmartPtr< HClassSvmArrayRef > HClassSvmArrayPtr;
262
+
263
+
264
+// Represents multiple tool instances
265
+class LIntExport HClassSvmArray : public HHandleBaseArray
266
+{
267
+
268
+public:
269
+
270
+  // Create empty array
271
+  HClassSvmArray();
272
+
273
+  // Create array from native array of tool instances
274
+  HClassSvmArray(HClassSvm* classes, Hlong length);
275
+
276
+  // Copy constructor
277
+  HClassSvmArray(const HClassSvmArray &tool_array);
278
+
279
+  // Destructor
280
+  virtual ~HClassSvmArray();
281
+
282
+  // Assignment operator
283
+  HClassSvmArray &operator=(const HClassSvmArray &tool_array);
284
+
285
+  // Clears array and all tool instances
286
+  virtual void Clear();
287
+
288
+  // Get array of native tool instances
289
+  const HClassSvm* Tools() const;
290
+
291
+  // Get number of tools
292
+  virtual Hlong Length() const;
293
+
294
+  // Create tool array from tuple of handles
295
+  virtual void SetFromTuple(const HTuple& handles);
296
+
297
+  // Get tuple of handles for tool array
298
+  virtual HTuple ConvertToTuple() const;
299
+
300
+protected:
301
+
302
+// Smart pointer to internal data container
303
+   HClassSvmArrayPtr *mArrayPtr;
304
+};
305
+
306
+}
307
+
308
+#endif

+ 269 - 0
3rdparty/include22/halcon/halconcpp/HClassTrainData.h

@@ -0,0 +1,269 @@
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
+
8
+
9
+#ifndef HCPP_HCLASSTRAINDATA
10
+#define HCPP_HCLASSTRAINDATA
11
+
12
+namespace HalconCpp
13
+{
14
+
15
+// Represents an instance of a training data management class.
16
+class LIntExport HClassTrainData : public HHandle
17
+{
18
+
19
+public:
20
+
21
+  // Create an uninitialized instance
22
+  HClassTrainData():HHandle() {}
23
+
24
+  // Copy constructor
25
+  HClassTrainData(const HClassTrainData& source) : HHandle(source) {}
26
+
27
+  // Copy constructor
28
+  HClassTrainData(const HHandle& handle);
29
+
30
+  bool operator==(const HHandle& obj) const
31
+  {
32
+    return HHandleBase::operator==(obj);
33
+  }
34
+
35
+  bool operator!=(const HHandle& obj) const
36
+  {
37
+    return HHandleBase::operator!=(obj);
38
+  }
39
+
40
+protected:
41
+
42
+  // Verify matching semantic type ('class_train_data')!
43
+  virtual void AssertType(Hphandle handle) const;
44
+
45
+public:
46
+
47
+  // Deep copy of all data represented by this object instance
48
+  HClassTrainData Clone() const;
49
+
50
+
51
+
52
+/*****************************************************************************
53
+ * Operator-based class constructors
54
+ *****************************************************************************/
55
+
56
+  // read_class_train_data: Read the training data for classifiers from a file.
57
+  explicit HClassTrainData(const HString& FileName);
58
+
59
+  // read_class_train_data: Read the training data for classifiers from a file.
60
+  explicit HClassTrainData(const char* FileName);
61
+
62
+#ifdef _WIN32
63
+  // read_class_train_data: Read the training data for classifiers from a file.
64
+  explicit HClassTrainData(const wchar_t* FileName);
65
+#endif
66
+
67
+  // create_class_train_data: Create a handle for training data for classifiers.
68
+  explicit HClassTrainData(Hlong NumDim);
69
+
70
+
71
+
72
+
73
+  /***************************************************************************
74
+   * Operators                                                               *
75
+   ***************************************************************************/
76
+
77
+  // Deserialize serialized training data for classifiers.
78
+  void DeserializeClassTrainData(const HSerializedItem& SerializedItemHandle);
79
+
80
+  // Serialize training data for classifiers.
81
+  HSerializedItem SerializeClassTrainData() const;
82
+
83
+  // Read the training data for classifiers from a file.
84
+  void ReadClassTrainData(const HString& FileName);
85
+
86
+  // Read the training data for classifiers from a file.
87
+  void ReadClassTrainData(const char* FileName);
88
+
89
+#ifdef _WIN32
90
+  // Read the training data for classifiers from a file.
91
+  void ReadClassTrainData(const wchar_t* FileName);
92
+#endif
93
+
94
+  // Save the training data for classifiers in a file.
95
+  void WriteClassTrainData(const HString& FileName) const;
96
+
97
+  // Save the training data for classifiers in a file.
98
+  void WriteClassTrainData(const char* FileName) const;
99
+
100
+#ifdef _WIN32
101
+  // Save the training data for classifiers in a file.
102
+  void WriteClassTrainData(const wchar_t* FileName) const;
103
+#endif
104
+
105
+  // Select certain features from training data to create  training data containing less features.
106
+  HClassTrainData SelectSubFeatureClassTrainData(const HTuple& SubFeatureIndices) const;
107
+
108
+  // Define subfeatures in training data.
109
+  void SetFeatureLengthsClassTrainData(const HTuple& SubFeatureLength, const HTuple& Names) const;
110
+
111
+  // Get the training data of a Gaussian Mixture Model (GMM).
112
+  void GetClassTrainDataGmm(const HClassGmm& GMMHandle);
113
+
114
+  // Add training data to a Gaussian Mixture Model (GMM).
115
+  void AddClassTrainDataGmm(const HClassGmm& GMMHandle) const;
116
+
117
+  // Get the training data of a multilayer perceptron (MLP).
118
+  void GetClassTrainDataMlp(const HClassMlp& MLPHandle);
119
+
120
+  // Add training data to a multilayer perceptron (MLP).
121
+  void AddClassTrainDataMlp(const HClassMlp& MLPHandle) const;
122
+
123
+  // Get the training data of a k-nearest neighbors (k-NN) classifier.
124
+  void GetClassTrainDataKnn(const HClassKnn& KNNHandle);
125
+
126
+  // Add training data to a k-nearest neighbors (k-NN) classifier.
127
+  void AddClassTrainDataKnn(const HClassKnn& KNNHandle) const;
128
+
129
+  // Get the training data of a support vector machine (SVM).
130
+  void GetClassTrainDataSvm(const HClassSvm& SVMHandle);
131
+
132
+  // Add training data to a support vector machine (SVM).
133
+  void AddClassTrainDataSvm(const HClassSvm& SVMHandle) const;
134
+
135
+  // Return the number of training samples stored in the training data.
136
+  Hlong GetSampleNumClassTrainData() const;
137
+
138
+  // Return a training sample from training data.
139
+  HTuple GetSampleClassTrainData(Hlong IndexSample, Hlong* ClassID) const;
140
+
141
+  // Clears training data for classifiers.
142
+  void ClearClassTrainData() const;
143
+
144
+  // Add a training sample to training data.
145
+  void AddSampleClassTrainData(const HString& Order, const HTuple& Features, const HTuple& ClassID) const;
146
+
147
+  // Add a training sample to training data.
148
+  void AddSampleClassTrainData(const char* Order, const HTuple& Features, const HTuple& ClassID) const;
149
+
150
+#ifdef _WIN32
151
+  // Add a training sample to training data.
152
+  void AddSampleClassTrainData(const wchar_t* Order, const HTuple& Features, const HTuple& ClassID) const;
153
+#endif
154
+
155
+  // Create a handle for training data for classifiers.
156
+  void CreateClassTrainData(Hlong NumDim);
157
+
158
+  // Selects an optimal combination of features to classify the provided data.
159
+  HClassMlp SelectFeatureSetMlp(const HString& SelectionMethod, const HTuple& GenParamName, const HTuple& GenParamValue, HTuple* SelectedFeatureIndices, HTuple* Score) const;
160
+
161
+  // Selects an optimal combination of features to classify the provided data.
162
+  HClassMlp SelectFeatureSetMlp(const HString& SelectionMethod, const HString& GenParamName, double GenParamValue, HTuple* SelectedFeatureIndices, HTuple* Score) const;
163
+
164
+  // Selects an optimal combination of features to classify the provided data.
165
+  HClassMlp SelectFeatureSetMlp(const char* SelectionMethod, const char* GenParamName, double GenParamValue, HTuple* SelectedFeatureIndices, HTuple* Score) const;
166
+
167
+#ifdef _WIN32
168
+  // Selects an optimal combination of features to classify the provided data.
169
+  HClassMlp SelectFeatureSetMlp(const wchar_t* SelectionMethod, const wchar_t* GenParamName, double GenParamValue, HTuple* SelectedFeatureIndices, HTuple* Score) const;
170
+#endif
171
+
172
+  // Selects an optimal combination of features to classify the provided data.
173
+  HClassSvm SelectFeatureSetSvm(const HString& SelectionMethod, const HTuple& GenParamName, const HTuple& GenParamValue, HTuple* SelectedFeatureIndices, HTuple* Score) const;
174
+
175
+  // Selects an optimal combination of features to classify the provided data.
176
+  HClassSvm SelectFeatureSetSvm(const HString& SelectionMethod, const HString& GenParamName, double GenParamValue, HTuple* SelectedFeatureIndices, HTuple* Score) const;
177
+
178
+  // Selects an optimal combination of features to classify the provided data.
179
+  HClassSvm SelectFeatureSetSvm(const char* SelectionMethod, const char* GenParamName, double GenParamValue, HTuple* SelectedFeatureIndices, HTuple* Score) const;
180
+
181
+#ifdef _WIN32
182
+  // Selects an optimal combination of features to classify the provided data.
183
+  HClassSvm SelectFeatureSetSvm(const wchar_t* SelectionMethod, const wchar_t* GenParamName, double GenParamValue, HTuple* SelectedFeatureIndices, HTuple* Score) const;
184
+#endif
185
+
186
+  // Selects an optimal combination from a set of features to classify the  provided data.
187
+  HClassGmm SelectFeatureSetGmm(const HString& SelectionMethod, const HTuple& GenParamName, const HTuple& GenParamValue, HTuple* SelectedFeatureIndices, HTuple* Score) const;
188
+
189
+  // Selects an optimal combination from a set of features to classify the  provided data.
190
+  HClassGmm SelectFeatureSetGmm(const HString& SelectionMethod, const HString& GenParamName, double GenParamValue, HTuple* SelectedFeatureIndices, HTuple* Score) const;
191
+
192
+  // Selects an optimal combination from a set of features to classify the  provided data.
193
+  HClassGmm SelectFeatureSetGmm(const char* SelectionMethod, const char* GenParamName, double GenParamValue, HTuple* SelectedFeatureIndices, HTuple* Score) const;
194
+
195
+#ifdef _WIN32
196
+  // Selects an optimal combination from a set of features to classify the  provided data.
197
+  HClassGmm SelectFeatureSetGmm(const wchar_t* SelectionMethod, const wchar_t* GenParamName, double GenParamValue, HTuple* SelectedFeatureIndices, HTuple* Score) const;
198
+#endif
199
+
200
+  // Selects an optimal subset from a set of features to solve a certain  classification problem.
201
+  HClassKnn SelectFeatureSetKnn(const HString& SelectionMethod, const HTuple& GenParamName, const HTuple& GenParamValue, HTuple* SelectedFeatureIndices, HTuple* Score) const;
202
+
203
+  // Selects an optimal subset from a set of features to solve a certain  classification problem.
204
+  HClassKnn SelectFeatureSetKnn(const HString& SelectionMethod, const HString& GenParamName, double GenParamValue, HTuple* SelectedFeatureIndices, HTuple* Score) const;
205
+
206
+  // Selects an optimal subset from a set of features to solve a certain  classification problem.
207
+  HClassKnn SelectFeatureSetKnn(const char* SelectionMethod, const char* GenParamName, double GenParamValue, HTuple* SelectedFeatureIndices, HTuple* Score) const;
208
+
209
+#ifdef _WIN32
210
+  // Selects an optimal subset from a set of features to solve a certain  classification problem.
211
+  HClassKnn SelectFeatureSetKnn(const wchar_t* SelectionMethod, const wchar_t* GenParamName, double GenParamValue, HTuple* SelectedFeatureIndices, HTuple* Score) const;
212
+#endif
213
+
214
+};
215
+
216
+// forward declarations and types for internal array implementation
217
+
218
+template<class T> class HSmartPtr;
219
+template<class T> class HHandleBaseArrayRef;
220
+
221
+typedef HHandleBaseArrayRef<HClassTrainData> HClassTrainDataArrayRef;
222
+typedef HSmartPtr< HClassTrainDataArrayRef > HClassTrainDataArrayPtr;
223
+
224
+
225
+// Represents multiple tool instances
226
+class LIntExport HClassTrainDataArray : public HHandleBaseArray
227
+{
228
+
229
+public:
230
+
231
+  // Create empty array
232
+  HClassTrainDataArray();
233
+
234
+  // Create array from native array of tool instances
235
+  HClassTrainDataArray(HClassTrainData* classes, Hlong length);
236
+
237
+  // Copy constructor
238
+  HClassTrainDataArray(const HClassTrainDataArray &tool_array);
239
+
240
+  // Destructor
241
+  virtual ~HClassTrainDataArray();
242
+
243
+  // Assignment operator
244
+  HClassTrainDataArray &operator=(const HClassTrainDataArray &tool_array);
245
+
246
+  // Clears array and all tool instances
247
+  virtual void Clear();
248
+
249
+  // Get array of native tool instances
250
+  const HClassTrainData* Tools() const;
251
+
252
+  // Get number of tools
253
+  virtual Hlong Length() const;
254
+
255
+  // Create tool array from tuple of handles
256
+  virtual void SetFromTuple(const HTuple& handles);
257
+
258
+  // Get tuple of handles for tool array
259
+  virtual HTuple ConvertToTuple() const;
260
+
261
+protected:
262
+
263
+// Smart pointer to internal data container
264
+   HClassTrainDataArrayPtr *mArrayPtr;
265
+};
266
+
267
+}
268
+
269
+#endif

+ 146 - 0
3rdparty/include22/halcon/halconcpp/HColorTransLUT.h

@@ -0,0 +1,146 @@
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
+
8
+
9
+#ifndef HCPP_HCOLORTRANSLUT
10
+#define HCPP_HCOLORTRANSLUT
11
+
12
+namespace HalconCpp
13
+{
14
+
15
+// Represents an instance of a color space transformation lookup table
16
+class LIntExport HColorTransLUT : public HHandle
17
+{
18
+
19
+public:
20
+
21
+  // Create an uninitialized instance
22
+  HColorTransLUT():HHandle() {}
23
+
24
+  // Copy constructor
25
+  HColorTransLUT(const HColorTransLUT& source) : HHandle(source) {}
26
+
27
+  // Copy constructor
28
+  HColorTransLUT(const HHandle& handle);
29
+
30
+  // Create HColorTransLUT from handle, taking ownership
31
+  explicit HColorTransLUT(Hlong handle);
32
+
33
+  bool operator==(const HHandle& obj) const
34
+  {
35
+    return HHandleBase::operator==(obj);
36
+  }
37
+
38
+  bool operator!=(const HHandle& obj) const
39
+  {
40
+    return HHandleBase::operator!=(obj);
41
+  }
42
+
43
+protected:
44
+
45
+  // Verify matching semantic type ('color_trans_lut')!
46
+  virtual void AssertType(Hphandle handle) const;
47
+
48
+public:
49
+
50
+
51
+
52
+/*****************************************************************************
53
+ * Operator-based class constructors
54
+ *****************************************************************************/
55
+
56
+  // create_color_trans_lut: Creates the look-up-table for transformation of an image from the RGB color space to an arbitrary color space.
57
+  explicit HColorTransLUT(const HString& ColorSpace, const HString& TransDirection, Hlong NumBits);
58
+
59
+  // create_color_trans_lut: Creates the look-up-table for transformation of an image from the RGB color space to an arbitrary color space.
60
+  explicit HColorTransLUT(const char* ColorSpace, const char* TransDirection, Hlong NumBits);
61
+
62
+#ifdef _WIN32
63
+  // create_color_trans_lut: Creates the look-up-table for transformation of an image from the RGB color space to an arbitrary color space.
64
+  explicit HColorTransLUT(const wchar_t* ColorSpace, const wchar_t* TransDirection, Hlong NumBits);
65
+#endif
66
+
67
+
68
+
69
+
70
+  /***************************************************************************
71
+   * Operators                                                               *
72
+   ***************************************************************************/
73
+
74
+  // Release the look-up-table needed for color space transformation.
75
+  void ClearColorTransLut() const;
76
+
77
+  // Color space transformation using pre-generated look-up-table.
78
+  HImage ApplyColorTransLut(const HImage& Image1, const HImage& Image2, const HImage& Image3, HImage* ImageResult2, HImage* ImageResult3) const;
79
+
80
+  // Creates the look-up-table for transformation of an image from the RGB color space to an arbitrary color space.
81
+  void CreateColorTransLut(const HString& ColorSpace, const HString& TransDirection, Hlong NumBits);
82
+
83
+  // Creates the look-up-table for transformation of an image from the RGB color space to an arbitrary color space.
84
+  void CreateColorTransLut(const char* ColorSpace, const char* TransDirection, Hlong NumBits);
85
+
86
+#ifdef _WIN32
87
+  // Creates the look-up-table for transformation of an image from the RGB color space to an arbitrary color space.
88
+  void CreateColorTransLut(const wchar_t* ColorSpace, const wchar_t* TransDirection, Hlong NumBits);
89
+#endif
90
+
91
+};
92
+
93
+// forward declarations and types for internal array implementation
94
+
95
+template<class T> class HSmartPtr;
96
+template<class T> class HHandleBaseArrayRef;
97
+
98
+typedef HHandleBaseArrayRef<HColorTransLUT> HColorTransLUTArrayRef;
99
+typedef HSmartPtr< HColorTransLUTArrayRef > HColorTransLUTArrayPtr;
100
+
101
+
102
+// Represents multiple tool instances
103
+class LIntExport HColorTransLUTArray : public HHandleBaseArray
104
+{
105
+
106
+public:
107
+
108
+  // Create empty array
109
+  HColorTransLUTArray();
110
+
111
+  // Create array from native array of tool instances
112
+  HColorTransLUTArray(HColorTransLUT* classes, Hlong length);
113
+
114
+  // Copy constructor
115
+  HColorTransLUTArray(const HColorTransLUTArray &tool_array);
116
+
117
+  // Destructor
118
+  virtual ~HColorTransLUTArray();
119
+
120
+  // Assignment operator
121
+  HColorTransLUTArray &operator=(const HColorTransLUTArray &tool_array);
122
+
123
+  // Clears array and all tool instances
124
+  virtual void Clear();
125
+
126
+  // Get array of native tool instances
127
+  const HColorTransLUT* Tools() const;
128
+
129
+  // Get number of tools
130
+  virtual Hlong Length() const;
131
+
132
+  // Create tool array from tuple of handles
133
+  virtual void SetFromTuple(const HTuple& handles);
134
+
135
+  // Get tuple of handles for tool array
136
+  virtual HTuple ConvertToTuple() const;
137
+
138
+protected:
139
+
140
+// Smart pointer to internal data container
141
+   HColorTransLUTArrayPtr *mArrayPtr;
142
+};
143
+
144
+}
145
+
146
+#endif

文件差异内容过多而无法显示
+ 267 - 0
3rdparty/include22/halcon/halconcpp/HComponentModel.h


+ 258 - 0
3rdparty/include22/halcon/halconcpp/HComponentTraining.h

@@ -0,0 +1,258 @@
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
+
8
+
9
+#ifndef HCPP_HCOMPONENTTRAINING
10
+#define HCPP_HCOMPONENTTRAINING
11
+
12
+namespace HalconCpp
13
+{
14
+
15
+// Represents an instance of a training result for the component-based matching.
16
+class LIntExport HComponentTraining : public HHandle
17
+{
18
+
19
+public:
20
+
21
+  // Create an uninitialized instance
22
+  HComponentTraining():HHandle() {}
23
+
24
+  // Copy constructor
25
+  HComponentTraining(const HComponentTraining& source) : HHandle(source) {}
26
+
27
+  // Copy constructor
28
+  HComponentTraining(const HHandle& handle);
29
+
30
+  // Create HComponentTraining from handle, taking ownership
31
+  explicit HComponentTraining(Hlong handle);
32
+
33
+  bool operator==(const HHandle& obj) const
34
+  {
35
+    return HHandleBase::operator==(obj);
36
+  }
37
+
38
+  bool operator!=(const HHandle& obj) const
39
+  {
40
+    return HHandleBase::operator!=(obj);
41
+  }
42
+
43
+protected:
44
+
45
+  // Verify matching semantic type ('component_training')!
46
+  virtual void AssertType(Hphandle handle) const;
47
+
48
+public:
49
+
50
+  // Deep copy of all data represented by this object instance
51
+  HComponentTraining Clone() const;
52
+
53
+
54
+
55
+/*****************************************************************************
56
+ * Operator-based class constructors
57
+ *****************************************************************************/
58
+
59
+  // train_model_components: Train components and relations for the component-based matching.
60
+  explicit HComponentTraining(const HImage& ModelImage, const HRegion& InitialComponents, const HImage& TrainingImages, HRegion* ModelComponents, const HTuple& ContrastLow, const HTuple& ContrastHigh, const HTuple& MinSize, const HTuple& MinScore, const HTuple& SearchRowTol, const HTuple& SearchColumnTol, const HTuple& SearchAngleTol, const HString& TrainingEmphasis, const HString& AmbiguityCriterion, double MaxContourOverlap, double ClusterThreshold);
61
+
62
+  // train_model_components: Train components and relations for the component-based matching.
63
+  explicit HComponentTraining(const HImage& ModelImage, const HRegion& InitialComponents, const HImage& TrainingImages, HRegion* ModelComponents, Hlong ContrastLow, Hlong ContrastHigh, Hlong MinSize, double MinScore, Hlong SearchRowTol, Hlong SearchColumnTol, double SearchAngleTol, const HString& TrainingEmphasis, const HString& AmbiguityCriterion, double MaxContourOverlap, double ClusterThreshold);
64
+
65
+  // train_model_components: Train components and relations for the component-based matching.
66
+  explicit HComponentTraining(const HImage& ModelImage, const HRegion& InitialComponents, const HImage& TrainingImages, HRegion* ModelComponents, Hlong ContrastLow, Hlong ContrastHigh, Hlong MinSize, double MinScore, Hlong SearchRowTol, Hlong SearchColumnTol, double SearchAngleTol, const char* TrainingEmphasis, const char* AmbiguityCriterion, double MaxContourOverlap, double ClusterThreshold);
67
+
68
+#ifdef _WIN32
69
+  // train_model_components: Train components and relations for the component-based matching.
70
+  explicit HComponentTraining(const HImage& ModelImage, const HRegion& InitialComponents, const HImage& TrainingImages, HRegion* ModelComponents, Hlong ContrastLow, Hlong ContrastHigh, Hlong MinSize, double MinScore, Hlong SearchRowTol, Hlong SearchColumnTol, double SearchAngleTol, const wchar_t* TrainingEmphasis, const wchar_t* AmbiguityCriterion, double MaxContourOverlap, double ClusterThreshold);
71
+#endif
72
+
73
+
74
+
75
+
76
+  /***************************************************************************
77
+   * Operators                                                               *
78
+   ***************************************************************************/
79
+
80
+  // Prepare a component model for matching based on trained components.
81
+  HComponentModel CreateTrainedComponentModel(double AngleStart, double AngleExtent, const HTuple& MinContrastComp, const HTuple& MinScoreComp, const HTuple& NumLevelsComp, const HTuple& AngleStepComp, const HString& OptimizationComp, const HTuple& MetricComp, const HTuple& PregenerationComp, HTuple* RootRanking) const;
82
+
83
+  // Prepare a component model for matching based on trained components.
84
+  HComponentModel CreateTrainedComponentModel(double AngleStart, double AngleExtent, Hlong MinContrastComp, double MinScoreComp, Hlong NumLevelsComp, double AngleStepComp, const HString& OptimizationComp, const HString& MetricComp, const HString& PregenerationComp, Hlong* RootRanking) const;
85
+
86
+  // Prepare a component model for matching based on trained components.
87
+  HComponentModel CreateTrainedComponentModel(double AngleStart, double AngleExtent, Hlong MinContrastComp, double MinScoreComp, Hlong NumLevelsComp, double AngleStepComp, const char* OptimizationComp, const char* MetricComp, const char* PregenerationComp, Hlong* RootRanking) const;
88
+
89
+#ifdef _WIN32
90
+  // Prepare a component model for matching based on trained components.
91
+  HComponentModel CreateTrainedComponentModel(double AngleStart, double AngleExtent, Hlong MinContrastComp, double MinScoreComp, Hlong NumLevelsComp, double AngleStepComp, const wchar_t* OptimizationComp, const wchar_t* MetricComp, const wchar_t* PregenerationComp, Hlong* RootRanking) const;
92
+#endif
93
+
94
+  // Free the memory of a component training result.
95
+  void ClearTrainingComponents() const;
96
+
97
+  // Return the relations between the model components that are contained in a training result.
98
+  HRegion GetComponentRelations(Hlong ReferenceComponent, const HTuple& Image, HTuple* Row, HTuple* Column, HTuple* Phi, HTuple* Length1, HTuple* Length2, HTuple* AngleStart, HTuple* AngleExtent) const;
99
+
100
+  // Return the relations between the model components that are contained in a training result.
101
+  HRegion GetComponentRelations(Hlong ReferenceComponent, const HString& Image, double* Row, double* Column, double* Phi, double* Length1, double* Length2, double* AngleStart, double* AngleExtent) const;
102
+
103
+  // Return the relations between the model components that are contained in a training result.
104
+  HRegion GetComponentRelations(Hlong ReferenceComponent, const char* Image, double* Row, double* Column, double* Phi, double* Length1, double* Length2, double* AngleStart, double* AngleExtent) const;
105
+
106
+#ifdef _WIN32
107
+  // Return the relations between the model components that are contained in a training result.
108
+  HRegion GetComponentRelations(Hlong ReferenceComponent, const wchar_t* Image, double* Row, double* Column, double* Phi, double* Length1, double* Length2, double* AngleStart, double* AngleExtent) const;
109
+#endif
110
+
111
+  // Return the initial or model components in a certain image.
112
+  HRegion GetTrainingComponents(const HTuple& Components, const HTuple& Image, const HString& MarkOrientation, HTuple* Row, HTuple* Column, HTuple* Angle, HTuple* Score) const;
113
+
114
+  // Return the initial or model components in a certain image.
115
+  HRegion GetTrainingComponents(const HString& Components, const HString& Image, const HString& MarkOrientation, double* Row, double* Column, double* Angle, double* Score) const;
116
+
117
+  // Return the initial or model components in a certain image.
118
+  HRegion GetTrainingComponents(const char* Components, const char* Image, const char* MarkOrientation, double* Row, double* Column, double* Angle, double* Score) const;
119
+
120
+#ifdef _WIN32
121
+  // Return the initial or model components in a certain image.
122
+  HRegion GetTrainingComponents(const wchar_t* Components, const wchar_t* Image, const wchar_t* MarkOrientation, double* Row, double* Column, double* Angle, double* Score) const;
123
+#endif
124
+
125
+  // Modify the relations within a training result.
126
+  void ModifyComponentRelations(const HTuple& ReferenceComponent, const HTuple& ToleranceComponent, const HTuple& PositionTolerance, const HTuple& AngleTolerance) const;
127
+
128
+  // Modify the relations within a training result.
129
+  void ModifyComponentRelations(const HString& ReferenceComponent, const HString& ToleranceComponent, double PositionTolerance, double AngleTolerance) const;
130
+
131
+  // Modify the relations within a training result.
132
+  void ModifyComponentRelations(const char* ReferenceComponent, const char* ToleranceComponent, double PositionTolerance, double AngleTolerance) const;
133
+
134
+#ifdef _WIN32
135
+  // Modify the relations within a training result.
136
+  void ModifyComponentRelations(const wchar_t* ReferenceComponent, const wchar_t* ToleranceComponent, double PositionTolerance, double AngleTolerance) const;
137
+#endif
138
+
139
+  // Deserialize a component training result.
140
+  void DeserializeTrainingComponents(const HSerializedItem& SerializedItemHandle);
141
+
142
+  // Serialize a component training result.
143
+  HSerializedItem SerializeTrainingComponents() const;
144
+
145
+  // Read a component training result from a file.
146
+  void ReadTrainingComponents(const HString& FileName);
147
+
148
+  // Read a component training result from a file.
149
+  void ReadTrainingComponents(const char* FileName);
150
+
151
+#ifdef _WIN32
152
+  // Read a component training result from a file.
153
+  void ReadTrainingComponents(const wchar_t* FileName);
154
+#endif
155
+
156
+  // Write a component training result to a file.
157
+  void WriteTrainingComponents(const HString& FileName) const;
158
+
159
+  // Write a component training result to a file.
160
+  void WriteTrainingComponents(const char* FileName) const;
161
+
162
+#ifdef _WIN32
163
+  // Write a component training result to a file.
164
+  void WriteTrainingComponents(const wchar_t* FileName) const;
165
+#endif
166
+
167
+  // Adopt new parameters that are used to create the model components into the training result.
168
+  HRegion ClusterModelComponents(const HImage& TrainingImages, const HString& AmbiguityCriterion, double MaxContourOverlap, double ClusterThreshold) const;
169
+
170
+  // Adopt new parameters that are used to create the model components into the training result.
171
+  HRegion ClusterModelComponents(const HImage& TrainingImages, const char* AmbiguityCriterion, double MaxContourOverlap, double ClusterThreshold) const;
172
+
173
+#ifdef _WIN32
174
+  // Adopt new parameters that are used to create the model components into the training result.
175
+  HRegion ClusterModelComponents(const HImage& TrainingImages, const wchar_t* AmbiguityCriterion, double MaxContourOverlap, double ClusterThreshold) const;
176
+#endif
177
+
178
+  // Inspect the rigid model components obtained from the training.
179
+  HRegion InspectClusteredComponents(const HString& AmbiguityCriterion, double MaxContourOverlap, double ClusterThreshold) const;
180
+
181
+  // Inspect the rigid model components obtained from the training.
182
+  HRegion InspectClusteredComponents(const char* AmbiguityCriterion, double MaxContourOverlap, double ClusterThreshold) const;
183
+
184
+#ifdef _WIN32
185
+  // Inspect the rigid model components obtained from the training.
186
+  HRegion InspectClusteredComponents(const wchar_t* AmbiguityCriterion, double MaxContourOverlap, double ClusterThreshold) const;
187
+#endif
188
+
189
+  // Train components and relations for the component-based matching.
190
+  HRegion TrainModelComponents(const HImage& ModelImage, const HRegion& InitialComponents, const HImage& TrainingImages, const HTuple& ContrastLow, const HTuple& ContrastHigh, const HTuple& MinSize, const HTuple& MinScore, const HTuple& SearchRowTol, const HTuple& SearchColumnTol, const HTuple& SearchAngleTol, const HString& TrainingEmphasis, const HString& AmbiguityCriterion, double MaxContourOverlap, double ClusterThreshold);
191
+
192
+  // Train components and relations for the component-based matching.
193
+  HRegion TrainModelComponents(const HImage& ModelImage, const HRegion& InitialComponents, const HImage& TrainingImages, Hlong ContrastLow, Hlong ContrastHigh, Hlong MinSize, double MinScore, Hlong SearchRowTol, Hlong SearchColumnTol, double SearchAngleTol, const HString& TrainingEmphasis, const HString& AmbiguityCriterion, double MaxContourOverlap, double ClusterThreshold);
194
+
195
+  // Train components and relations for the component-based matching.
196
+  HRegion TrainModelComponents(const HImage& ModelImage, const HRegion& InitialComponents, const HImage& TrainingImages, Hlong ContrastLow, Hlong ContrastHigh, Hlong MinSize, double MinScore, Hlong SearchRowTol, Hlong SearchColumnTol, double SearchAngleTol, const char* TrainingEmphasis, const char* AmbiguityCriterion, double MaxContourOverlap, double ClusterThreshold);
197
+
198
+#ifdef _WIN32
199
+  // Train components and relations for the component-based matching.
200
+  HRegion TrainModelComponents(const HImage& ModelImage, const HRegion& InitialComponents, const HImage& TrainingImages, Hlong ContrastLow, Hlong ContrastHigh, Hlong MinSize, double MinScore, Hlong SearchRowTol, Hlong SearchColumnTol, double SearchAngleTol, const wchar_t* TrainingEmphasis, const wchar_t* AmbiguityCriterion, double MaxContourOverlap, double ClusterThreshold);
201
+#endif
202
+
203
+};
204
+
205
+// forward declarations and types for internal array implementation
206
+
207
+template<class T> class HSmartPtr;
208
+template<class T> class HHandleBaseArrayRef;
209
+
210
+typedef HHandleBaseArrayRef<HComponentTraining> HComponentTrainingArrayRef;
211
+typedef HSmartPtr< HComponentTrainingArrayRef > HComponentTrainingArrayPtr;
212
+
213
+
214
+// Represents multiple tool instances
215
+class LIntExport HComponentTrainingArray : public HHandleBaseArray
216
+{
217
+
218
+public:
219
+
220
+  // Create empty array
221
+  HComponentTrainingArray();
222
+
223
+  // Create array from native array of tool instances
224
+  HComponentTrainingArray(HComponentTraining* classes, Hlong length);
225
+
226
+  // Copy constructor
227
+  HComponentTrainingArray(const HComponentTrainingArray &tool_array);
228
+
229
+  // Destructor
230
+  virtual ~HComponentTrainingArray();
231
+
232
+  // Assignment operator
233
+  HComponentTrainingArray &operator=(const HComponentTrainingArray &tool_array);
234
+
235
+  // Clears array and all tool instances
236
+  virtual void Clear();
237
+
238
+  // Get array of native tool instances
239
+  const HComponentTraining* Tools() const;
240
+
241
+  // Get number of tools
242
+  virtual Hlong Length() const;
243
+
244
+  // Create tool array from tuple of handles
245
+  virtual void SetFromTuple(const HTuple& handles);
246
+
247
+  // Get tuple of handles for tool array
248
+  virtual HTuple ConvertToTuple() const;
249
+
250
+protected:
251
+
252
+// Smart pointer to internal data container
253
+   HComponentTrainingArrayPtr *mArrayPtr;
254
+};
255
+
256
+}
257
+
258
+#endif

+ 178 - 0
3rdparty/include22/halcon/halconcpp/HComputeDevice.h

@@ -0,0 +1,178 @@
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
+
8
+
9
+#ifndef HCPP_HCOMPUTEDEVICE
10
+#define HCPP_HCOMPUTEDEVICE
11
+
12
+namespace HalconCpp
13
+{
14
+
15
+// Class representing a compute device handle.
16
+class LIntExport HComputeDevice : public HHandle
17
+{
18
+
19
+public:
20
+
21
+  // Create an uninitialized instance
22
+  HComputeDevice():HHandle() {}
23
+
24
+  // Copy constructor
25
+  HComputeDevice(const HComputeDevice& source) : HHandle(source) {}
26
+
27
+  // Copy constructor
28
+  HComputeDevice(const HHandle& handle);
29
+
30
+  bool operator==(const HHandle& obj) const
31
+  {
32
+    return HHandleBase::operator==(obj);
33
+  }
34
+
35
+  bool operator!=(const HHandle& obj) const
36
+  {
37
+    return HHandleBase::operator!=(obj);
38
+  }
39
+
40
+protected:
41
+
42
+  // Verify matching semantic type ('compute_device')!
43
+  virtual void AssertType(Hphandle handle) const;
44
+
45
+public:
46
+
47
+
48
+
49
+/*****************************************************************************
50
+ * Operator-based class constructors
51
+ *****************************************************************************/
52
+
53
+  // open_compute_device: Open a compute device.
54
+  explicit HComputeDevice(Hlong DeviceIdentifier);
55
+
56
+
57
+
58
+
59
+  /***************************************************************************
60
+   * Operators                                                               *
61
+   ***************************************************************************/
62
+
63
+  // Query compute device parameters.
64
+  HTuple GetComputeDeviceParam(const HString& GenParamName) const;
65
+
66
+  // Query compute device parameters.
67
+  HTuple GetComputeDeviceParam(const char* GenParamName) const;
68
+
69
+#ifdef _WIN32
70
+  // Query compute device parameters.
71
+  HTuple GetComputeDeviceParam(const wchar_t* GenParamName) const;
72
+#endif
73
+
74
+  // Set parameters of an compute device.
75
+  void SetComputeDeviceParam(const HString& GenParamName, const HTuple& GenParamValue) const;
76
+
77
+  // Set parameters of an compute device.
78
+  void SetComputeDeviceParam(const HString& GenParamName, const HString& GenParamValue) const;
79
+
80
+  // Set parameters of an compute device.
81
+  void SetComputeDeviceParam(const char* GenParamName, const char* GenParamValue) const;
82
+
83
+#ifdef _WIN32
84
+  // Set parameters of an compute device.
85
+  void SetComputeDeviceParam(const wchar_t* GenParamName, const wchar_t* GenParamValue) const;
86
+#endif
87
+
88
+  // Close all compute devices.
89
+  static void ReleaseAllComputeDevices();
90
+
91
+  // Close a compute_device.
92
+  void ReleaseComputeDevice() const;
93
+
94
+  // Deactivate all compute devices.
95
+  static void DeactivateAllComputeDevices();
96
+
97
+  // Deactivate a compute device.
98
+  void DeactivateComputeDevice() const;
99
+
100
+  // Activate a compute device.
101
+  void ActivateComputeDevice() const;
102
+
103
+  // Initialize a compute device.
104
+  void InitComputeDevice(const HTuple& Operators) const;
105
+
106
+  // Open a compute device.
107
+  void OpenComputeDevice(Hlong DeviceIdentifier);
108
+
109
+  // Get information on a compute device.
110
+  static HTuple GetComputeDeviceInfo(Hlong DeviceIdentifier, const HString& InfoName);
111
+
112
+  // Get information on a compute device.
113
+  static HTuple GetComputeDeviceInfo(Hlong DeviceIdentifier, const char* InfoName);
114
+
115
+#ifdef _WIN32
116
+  // Get information on a compute device.
117
+  static HTuple GetComputeDeviceInfo(Hlong DeviceIdentifier, const wchar_t* InfoName);
118
+#endif
119
+
120
+  // Get the list of available compute devices.
121
+  static HTuple QueryAvailableComputeDevices();
122
+
123
+};
124
+
125
+// forward declarations and types for internal array implementation
126
+
127
+template<class T> class HSmartPtr;
128
+template<class T> class HHandleBaseArrayRef;
129
+
130
+typedef HHandleBaseArrayRef<HComputeDevice> HComputeDeviceArrayRef;
131
+typedef HSmartPtr< HComputeDeviceArrayRef > HComputeDeviceArrayPtr;
132
+
133
+
134
+// Represents multiple tool instances
135
+class LIntExport HComputeDeviceArray : public HHandleBaseArray
136
+{
137
+
138
+public:
139
+
140
+  // Create empty array
141
+  HComputeDeviceArray();
142
+
143
+  // Create array from native array of tool instances
144
+  HComputeDeviceArray(HComputeDevice* classes, Hlong length);
145
+
146
+  // Copy constructor
147
+  HComputeDeviceArray(const HComputeDeviceArray &tool_array);
148
+
149
+  // Destructor
150
+  virtual ~HComputeDeviceArray();
151
+
152
+  // Assignment operator
153
+  HComputeDeviceArray &operator=(const HComputeDeviceArray &tool_array);
154
+
155
+  // Clears array and all tool instances
156
+  virtual void Clear();
157
+
158
+  // Get array of native tool instances
159
+  const HComputeDevice* Tools() const;
160
+
161
+  // Get number of tools
162
+  virtual Hlong Length() const;
163
+
164
+  // Create tool array from tuple of handles
165
+  virtual void SetFromTuple(const HTuple& handles);
166
+
167
+  // Get tuple of handles for tool array
168
+  virtual HTuple ConvertToTuple() const;
169
+
170
+protected:
171
+
172
+// Smart pointer to internal data container
173
+   HComputeDeviceArrayPtr *mArrayPtr;
174
+};
175
+
176
+}
177
+
178
+#endif

+ 161 - 0
3rdparty/include22/halcon/halconcpp/HCondition.h

@@ -0,0 +1,161 @@
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
+
8
+
9
+#ifndef HCPP_HCONDITION
10
+#define HCPP_HCONDITION
11
+
12
+namespace HalconCpp
13
+{
14
+
15
+// Represents an instance of a condition synchronization object.
16
+class LIntExport HCondition : public HHandle
17
+{
18
+
19
+public:
20
+
21
+  // Create an uninitialized instance
22
+  HCondition():HHandle() {}
23
+
24
+  // Copy constructor
25
+  HCondition(const HCondition& source) : HHandle(source) {}
26
+
27
+  // Copy constructor
28
+  HCondition(const HHandle& handle);
29
+
30
+  // Create HCondition from handle, taking ownership
31
+  explicit HCondition(Hlong handle);
32
+
33
+  bool operator==(const HHandle& obj) const
34
+  {
35
+    return HHandleBase::operator==(obj);
36
+  }
37
+
38
+  bool operator!=(const HHandle& obj) const
39
+  {
40
+    return HHandleBase::operator!=(obj);
41
+  }
42
+
43
+protected:
44
+
45
+  // Verify matching semantic type ('condition')!
46
+  virtual void AssertType(Hphandle handle) const;
47
+
48
+public:
49
+
50
+
51
+
52
+/*****************************************************************************
53
+ * Operator-based class constructors
54
+ *****************************************************************************/
55
+
56
+  // create_condition: Create a condition variable synchronization object.
57
+  explicit HCondition(const HTuple& AttribName, const HTuple& AttribValue);
58
+
59
+  // create_condition: Create a condition variable synchronization object.
60
+  explicit HCondition(const HString& AttribName, const HString& AttribValue);
61
+
62
+  // create_condition: Create a condition variable synchronization object.
63
+  explicit HCondition(const char* AttribName, const char* AttribValue);
64
+
65
+#ifdef _WIN32
66
+  // create_condition: Create a condition variable synchronization object.
67
+  explicit HCondition(const wchar_t* AttribName, const wchar_t* AttribValue);
68
+#endif
69
+
70
+
71
+
72
+
73
+  /***************************************************************************
74
+   * Operators                                                               *
75
+   ***************************************************************************/
76
+
77
+  // Destroy a condition synchronization object.
78
+  void ClearCondition() const;
79
+
80
+  // Signal a condition synchronization object.
81
+  void BroadcastCondition() const;
82
+
83
+  // Signal a condition synchronization object.
84
+  void SignalCondition() const;
85
+
86
+  // Bounded wait on the signal of a condition synchronization object.
87
+  void TimedWaitCondition(const HMutex& MutexHandle, Hlong Timeout) const;
88
+
89
+  // wait on the signal of a condition synchronization object.
90
+  void WaitCondition(const HMutex& MutexHandle) const;
91
+
92
+  // Create a condition variable synchronization object.
93
+  void CreateCondition(const HTuple& AttribName, const HTuple& AttribValue);
94
+
95
+  // Create a condition variable synchronization object.
96
+  void CreateCondition(const HString& AttribName, const HString& AttribValue);
97
+
98
+  // Create a condition variable synchronization object.
99
+  void CreateCondition(const char* AttribName, const char* AttribValue);
100
+
101
+#ifdef _WIN32
102
+  // Create a condition variable synchronization object.
103
+  void CreateCondition(const wchar_t* AttribName, const wchar_t* AttribValue);
104
+#endif
105
+
106
+};
107
+
108
+// forward declarations and types for internal array implementation
109
+
110
+template<class T> class HSmartPtr;
111
+template<class T> class HHandleBaseArrayRef;
112
+
113
+typedef HHandleBaseArrayRef<HCondition> HConditionArrayRef;
114
+typedef HSmartPtr< HConditionArrayRef > HConditionArrayPtr;
115
+
116
+
117
+// Represents multiple tool instances
118
+class LIntExport HConditionArray : public HHandleBaseArray
119
+{
120
+
121
+public:
122
+
123
+  // Create empty array
124
+  HConditionArray();
125
+
126
+  // Create array from native array of tool instances
127
+  HConditionArray(HCondition* classes, Hlong length);
128
+
129
+  // Copy constructor
130
+  HConditionArray(const HConditionArray &tool_array);
131
+
132
+  // Destructor
133
+  virtual ~HConditionArray();
134
+
135
+  // Assignment operator
136
+  HConditionArray &operator=(const HConditionArray &tool_array);
137
+
138
+  // Clears array and all tool instances
139
+  virtual void Clear();
140
+
141
+  // Get array of native tool instances
142
+  const HCondition* Tools() const;
143
+
144
+  // Get number of tools
145
+  virtual Hlong Length() const;
146
+
147
+  // Create tool array from tuple of handles
148
+  virtual void SetFromTuple(const HTuple& handles);
149
+
150
+  // Get tuple of handles for tool array
151
+  virtual HTuple ConvertToTuple() const;
152
+
153
+protected:
154
+
155
+// Smart pointer to internal data container
156
+   HConditionArrayPtr *mArrayPtr;
157
+};
158
+
159
+}
160
+
161
+#endif

+ 102 - 0
3rdparty/include22/halcon/halconcpp/HDataBase.h

@@ -0,0 +1,102 @@
1
+/*****************************************************************************
2
+ * HDataBase.h
3
+ ***************************************************************************** 
4
+ *
5
+ * Project:     HALCON/C++
6
+ * Description: Base class for all iconic objects
7
+ *
8
+ * (c) 2010-2020 by MVTec Software GmbH
9
+ *                  www.mvtec.com
10
+ * 
11
+ *****************************************************************************
12
+ *
13
+ *
14
+ *****************************************************************************/
15
+
16
+
17
+#ifndef HCPP_DATA_BASE_H
18
+#define HCPP_DATA_BASE_H
19
+
20
+
21
+namespace HalconCpp
22
+{
23
+
24
+class LIntExport HDataBase
25
+{
26
+
27
+public:
28
+
29
+  // Create an uninitialized data object
30
+  HDataBase();
31
+
32
+  // Create data object from tuple data
33
+  HDataBase(const HTuple& data);
34
+
35
+  // Copy constructor
36
+  HDataBase(const HDataBase& data);
37
+
38
+  // Assignment
39
+  HDataBase& operator = (const HDataBase& data);
40
+  HDataBase& operator = (const HTuple& data);
41
+
42
+  // Cast
43
+  operator HTuple() const;
44
+
45
+  // Set data from tuple
46
+  void SetFromTuple(const HTuple& data);
47
+
48
+  // Get data as tuple
49
+  HTuple ConvertToTuple() const;
50
+
51
+  void Clear();
52
+
53
+protected:
54
+
55
+  HTuple mData;
56
+};
57
+
58
+
59
+
60
+class LIntExport HDataArray
61
+{
62
+
63
+public:
64
+
65
+  // Create empty tool array for use as output parameter
66
+  HDataArray();
67
+
68
+  virtual ~HDataArray();
69
+
70
+  // Assignment
71
+  HDataArray& operator = (const HDataArray& data_array);
72
+
73
+  HDataBase* Data();
74
+  const HDataBase* Data() const;
75
+
76
+  Hlong Length() const;
77
+
78
+  void Clear();
79
+
80
+  // Create data class array from splittable tuple
81
+  void SetFromTuple(const HTuple& concatenated);
82
+
83
+  // Get concatenated data tuple for data array
84
+  HTuple ConvertToTuple() const;
85
+
86
+protected:
87
+
88
+  void InitFromArray(HDataBase* data, Hlong length);
89
+
90
+  virtual void CreateArray(Hlong length) = 0;
91
+
92
+  virtual int GetFixedSize() const = 0;
93
+
94
+  HDataBase* mArray;
95
+  Hlong      mLength;
96
+};
97
+
98
+
99
+
100
+}
101
+
102
+#endif

+ 272 - 0
3rdparty/include22/halcon/halconcpp/HDataCode2D.h

@@ -0,0 +1,272 @@
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
+
8
+
9
+#ifndef HCPP_HDATACODE2D
10
+#define HCPP_HDATACODE2D
11
+
12
+namespace HalconCpp
13
+{
14
+
15
+// Represents an instance of a 2D data code reader.
16
+class LIntExport HDataCode2D : public HHandle
17
+{
18
+
19
+public:
20
+
21
+  // Create an uninitialized instance
22
+  HDataCode2D():HHandle() {}
23
+
24
+  // Copy constructor
25
+  HDataCode2D(const HDataCode2D& source) : HHandle(source) {}
26
+
27
+  // Copy constructor
28
+  HDataCode2D(const HHandle& handle);
29
+
30
+  // Create HDataCode2D from handle, taking ownership
31
+  explicit HDataCode2D(Hlong handle);
32
+
33
+  bool operator==(const HHandle& obj) const
34
+  {
35
+    return HHandleBase::operator==(obj);
36
+  }
37
+
38
+  bool operator!=(const HHandle& obj) const
39
+  {
40
+    return HHandleBase::operator!=(obj);
41
+  }
42
+
43
+protected:
44
+
45
+  // Verify matching semantic type ('datacode_2d')!
46
+  virtual void AssertType(Hphandle handle) const;
47
+
48
+public:
49
+
50
+  // Deep copy of all data represented by this object instance
51
+  HDataCode2D Clone() const;
52
+
53
+
54
+
55
+/*****************************************************************************
56
+ * Operator-based class constructors
57
+ *****************************************************************************/
58
+
59
+  // read_data_code_2d_model: Read a 2D data code model from a file and create a new model.
60
+  explicit HDataCode2D(const HString& FileName);
61
+
62
+  // read_data_code_2d_model: Read a 2D data code model from a file and create a new model.
63
+  explicit HDataCode2D(const char* FileName);
64
+
65
+#ifdef _WIN32
66
+  // read_data_code_2d_model: Read a 2D data code model from a file and create a new model.
67
+  explicit HDataCode2D(const wchar_t* FileName);
68
+#endif
69
+
70
+  // create_data_code_2d_model: Create a model of a 2D data code class.
71
+  explicit HDataCode2D(const HString& SymbolType, const HTuple& GenParamName, const HTuple& GenParamValue);
72
+
73
+  // create_data_code_2d_model: Create a model of a 2D data code class.
74
+  explicit HDataCode2D(const HString& SymbolType, const HString& GenParamName, const HString& GenParamValue);
75
+
76
+  // create_data_code_2d_model: Create a model of a 2D data code class.
77
+  explicit HDataCode2D(const char* SymbolType, const char* GenParamName, const char* GenParamValue);
78
+
79
+#ifdef _WIN32
80
+  // create_data_code_2d_model: Create a model of a 2D data code class.
81
+  explicit HDataCode2D(const wchar_t* SymbolType, const wchar_t* GenParamName, const wchar_t* GenParamValue);
82
+#endif
83
+
84
+
85
+
86
+
87
+  /***************************************************************************
88
+   * Operators                                                               *
89
+   ***************************************************************************/
90
+
91
+  // Access iconic objects that were created during the search for 2D data code symbols.
92
+  HObject GetDataCode2dObjects(const HTuple& CandidateHandle, const HString& ObjectName) const;
93
+
94
+  // Access iconic objects that were created during the search for 2D data code symbols.
95
+  HObject GetDataCode2dObjects(Hlong CandidateHandle, const HString& ObjectName) const;
96
+
97
+  // Access iconic objects that were created during the search for 2D data code symbols.
98
+  HObject GetDataCode2dObjects(Hlong CandidateHandle, const char* ObjectName) const;
99
+
100
+#ifdef _WIN32
101
+  // Access iconic objects that were created during the search for 2D data code symbols.
102
+  HObject GetDataCode2dObjects(Hlong CandidateHandle, const wchar_t* ObjectName) const;
103
+#endif
104
+
105
+  // Get the alphanumerical results that were accumulated during the search for 2D data code symbols.
106
+  HTuple GetDataCode2dResults(const HTuple& CandidateHandle, const HTuple& ResultNames) const;
107
+
108
+  // Get the alphanumerical results that were accumulated during the search for 2D data code symbols.
109
+  HTuple GetDataCode2dResults(const HString& CandidateHandle, const HString& ResultNames) const;
110
+
111
+  // Get the alphanumerical results that were accumulated during the search for 2D data code symbols.
112
+  HTuple GetDataCode2dResults(const char* CandidateHandle, const char* ResultNames) const;
113
+
114
+#ifdef _WIN32
115
+  // Get the alphanumerical results that were accumulated during the search for 2D data code symbols.
116
+  HTuple GetDataCode2dResults(const wchar_t* CandidateHandle, const wchar_t* ResultNames) const;
117
+#endif
118
+
119
+  // Detect and read 2D data code symbols in an image or train the 2D data code model.
120
+  HXLDCont FindDataCode2d(const HImage& Image, const HTuple& GenParamName, const HTuple& GenParamValue, HTuple* ResultHandles, HTuple* DecodedDataStrings) const;
121
+
122
+  // Detect and read 2D data code symbols in an image or train the 2D data code model.
123
+  HXLDCont FindDataCode2d(const HImage& Image, const HString& GenParamName, Hlong GenParamValue, Hlong* ResultHandles, HString* DecodedDataStrings) const;
124
+
125
+  // Detect and read 2D data code symbols in an image or train the 2D data code model.
126
+  HXLDCont FindDataCode2d(const HImage& Image, const char* GenParamName, Hlong GenParamValue, Hlong* ResultHandles, HString* DecodedDataStrings) const;
127
+
128
+#ifdef _WIN32
129
+  // Detect and read 2D data code symbols in an image or train the 2D data code model.
130
+  HXLDCont FindDataCode2d(const HImage& Image, const wchar_t* GenParamName, Hlong GenParamValue, Hlong* ResultHandles, HString* DecodedDataStrings) const;
131
+#endif
132
+
133
+  // Set selected parameters of the 2D data code model.
134
+  void SetDataCode2dParam(const HTuple& GenParamName, const HTuple& GenParamValue) const;
135
+
136
+  // Set selected parameters of the 2D data code model.
137
+  void SetDataCode2dParam(const HString& GenParamName, const HString& GenParamValue) const;
138
+
139
+  // Set selected parameters of the 2D data code model.
140
+  void SetDataCode2dParam(const char* GenParamName, const char* GenParamValue) const;
141
+
142
+#ifdef _WIN32
143
+  // Set selected parameters of the 2D data code model.
144
+  void SetDataCode2dParam(const wchar_t* GenParamName, const wchar_t* GenParamValue) const;
145
+#endif
146
+
147
+  // Get one or several parameters that describe the 2D data code model.
148
+  HTuple GetDataCode2dParam(const HTuple& GenParamName) const;
149
+
150
+  // Get one or several parameters that describe the 2D data code model.
151
+  HTuple GetDataCode2dParam(const HString& GenParamName) const;
152
+
153
+  // Get one or several parameters that describe the 2D data code model.
154
+  HTuple GetDataCode2dParam(const char* GenParamName) const;
155
+
156
+#ifdef _WIN32
157
+  // Get one or several parameters that describe the 2D data code model.
158
+  HTuple GetDataCode2dParam(const wchar_t* GenParamName) const;
159
+#endif
160
+
161
+  // Get for a given 2D data code model the names of the generic parameters or objects that can be used in the other 2D data code operators.
162
+  HTuple QueryDataCode2dParams(const HString& QueryName) const;
163
+
164
+  // Get for a given 2D data code model the names of the generic parameters or objects that can be used in the other 2D data code operators.
165
+  HTuple QueryDataCode2dParams(const char* QueryName) const;
166
+
167
+#ifdef _WIN32
168
+  // Get for a given 2D data code model the names of the generic parameters or objects that can be used in the other 2D data code operators.
169
+  HTuple QueryDataCode2dParams(const wchar_t* QueryName) const;
170
+#endif
171
+
172
+  // Deserialize a serialized 2D data code model.
173
+  void DeserializeDataCode2dModel(const HSerializedItem& SerializedItemHandle);
174
+
175
+  // Serialize a 2D data code model.
176
+  HSerializedItem SerializeDataCode2dModel() const;
177
+
178
+  // Read a 2D data code model from a file and create a new model.
179
+  void ReadDataCode2dModel(const HString& FileName);
180
+
181
+  // Read a 2D data code model from a file and create a new model.
182
+  void ReadDataCode2dModel(const char* FileName);
183
+
184
+#ifdef _WIN32
185
+  // Read a 2D data code model from a file and create a new model.
186
+  void ReadDataCode2dModel(const wchar_t* FileName);
187
+#endif
188
+
189
+  // Writes a 2D data code model into a file.
190
+  void WriteDataCode2dModel(const HString& FileName) const;
191
+
192
+  // Writes a 2D data code model into a file.
193
+  void WriteDataCode2dModel(const char* FileName) const;
194
+
195
+#ifdef _WIN32
196
+  // Writes a 2D data code model into a file.
197
+  void WriteDataCode2dModel(const wchar_t* FileName) const;
198
+#endif
199
+
200
+  // Delete a 2D data code model and free the allocated memory.
201
+  void ClearDataCode2dModel() const;
202
+
203
+  // Create a model of a 2D data code class.
204
+  void CreateDataCode2dModel(const HString& SymbolType, const HTuple& GenParamName, const HTuple& GenParamValue);
205
+
206
+  // Create a model of a 2D data code class.
207
+  void CreateDataCode2dModel(const HString& SymbolType, const HString& GenParamName, const HString& GenParamValue);
208
+
209
+  // Create a model of a 2D data code class.
210
+  void CreateDataCode2dModel(const char* SymbolType, const char* GenParamName, const char* GenParamValue);
211
+
212
+#ifdef _WIN32
213
+  // Create a model of a 2D data code class.
214
+  void CreateDataCode2dModel(const wchar_t* SymbolType, const wchar_t* GenParamName, const wchar_t* GenParamValue);
215
+#endif
216
+
217
+};
218
+
219
+// forward declarations and types for internal array implementation
220
+
221
+template<class T> class HSmartPtr;
222
+template<class T> class HHandleBaseArrayRef;
223
+
224
+typedef HHandleBaseArrayRef<HDataCode2D> HDataCode2DArrayRef;
225
+typedef HSmartPtr< HDataCode2DArrayRef > HDataCode2DArrayPtr;
226
+
227
+
228
+// Represents multiple tool instances
229
+class LIntExport HDataCode2DArray : public HHandleBaseArray
230
+{
231
+
232
+public:
233
+
234
+  // Create empty array
235
+  HDataCode2DArray();
236
+
237
+  // Create array from native array of tool instances
238
+  HDataCode2DArray(HDataCode2D* classes, Hlong length);
239
+
240
+  // Copy constructor
241
+  HDataCode2DArray(const HDataCode2DArray &tool_array);
242
+
243
+  // Destructor
244
+  virtual ~HDataCode2DArray();
245
+
246
+  // Assignment operator
247
+  HDataCode2DArray &operator=(const HDataCode2DArray &tool_array);
248
+
249
+  // Clears array and all tool instances
250
+  virtual void Clear();
251
+
252
+  // Get array of native tool instances
253
+  const HDataCode2D* Tools() const;
254
+
255
+  // Get number of tools
256
+  virtual Hlong Length() const;
257
+
258
+  // Create tool array from tuple of handles
259
+  virtual void SetFromTuple(const HTuple& handles);
260
+
261
+  // Get tuple of handles for tool array
262
+  virtual HTuple ConvertToTuple() const;
263
+
264
+protected:
265
+
266
+// Smart pointer to internal data container
267
+   HDataCode2DArrayPtr *mArrayPtr;
268
+};
269
+
270
+}
271
+
272
+#endif

文件差异内容过多而无法显示
+ 380 - 0
3rdparty/include22/halcon/halconcpp/HDeformableModel.h


+ 152 - 0
3rdparty/include22/halcon/halconcpp/HDeformableSurfaceMatchingResult.h

@@ -0,0 +1,152 @@
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
+
8
+
9
+#ifndef HCPP_HDEFORMABLESURFACEMATCHINGRESULT
10
+#define HCPP_HDEFORMABLESURFACEMATCHINGRESULT
11
+
12
+namespace HalconCpp
13
+{
14
+
15
+// Represents an instance of a deformable surface matching result.
16
+class LIntExport HDeformableSurfaceMatchingResult : public HHandle
17
+{
18
+
19
+public:
20
+
21
+  // Create an uninitialized instance
22
+  HDeformableSurfaceMatchingResult():HHandle() {}
23
+
24
+  // Copy constructor
25
+  HDeformableSurfaceMatchingResult(const HDeformableSurfaceMatchingResult& source) : HHandle(source) {}
26
+
27
+  // Copy constructor
28
+  HDeformableSurfaceMatchingResult(const HHandle& handle);
29
+
30
+  // Create HDeformableSurfaceMatchingResult from handle, taking ownership
31
+  explicit HDeformableSurfaceMatchingResult(Hlong handle);
32
+
33
+  bool operator==(const HHandle& obj) const
34
+  {
35
+    return HHandleBase::operator==(obj);
36
+  }
37
+
38
+  bool operator!=(const HHandle& obj) const
39
+  {
40
+    return HHandleBase::operator!=(obj);
41
+  }
42
+
43
+protected:
44
+
45
+  // Verify matching semantic type ('deformable_surface_matching_result')!
46
+  virtual void AssertType(Hphandle handle) const;
47
+
48
+public:
49
+
50
+
51
+
52
+
53
+  /***************************************************************************
54
+   * Operators                                                               *
55
+   ***************************************************************************/
56
+
57
+  // Get details of a result from deformable surface based matching.
58
+  HTuple GetDeformableSurfaceMatchingResult(const HTuple& ResultName, const HTuple& ResultIndex) const;
59
+
60
+  // Get details of a result from deformable surface based matching.
61
+  HTuple GetDeformableSurfaceMatchingResult(const HString& ResultName, Hlong ResultIndex) const;
62
+
63
+  // Get details of a result from deformable surface based matching.
64
+  HTuple GetDeformableSurfaceMatchingResult(const char* ResultName, Hlong ResultIndex) const;
65
+
66
+#ifdef _WIN32
67
+  // Get details of a result from deformable surface based matching.
68
+  HTuple GetDeformableSurfaceMatchingResult(const wchar_t* ResultName, Hlong ResultIndex) const;
69
+#endif
70
+
71
+  // Free the memory of a deformable surface matching result.
72
+  static void ClearDeformableSurfaceMatchingResult(const HDeformableSurfaceMatchingResultArray& DeformableSurfaceMatchingResult);
73
+
74
+  // Free the memory of a deformable surface matching result.
75
+  void ClearDeformableSurfaceMatchingResult() const;
76
+
77
+  // Refine the position and deformation of a deformable surface model in a 3D scene.
78
+  static HTuple RefineDeformableSurfaceModel(const HDeformableSurfaceModel& DeformableSurfaceModel, const HObjectModel3D& ObjectModel3D, double RelSamplingDistance, const HObjectModel3D& InitialDeformationObjectModel3D, const HTuple& GenParamName, const HTuple& GenParamValue, HDeformableSurfaceMatchingResultArray* DeformableSurfaceMatchingResult);
79
+
80
+  // Refine the position and deformation of a deformable surface model in a 3D scene.
81
+  double RefineDeformableSurfaceModel(const HDeformableSurfaceModel& DeformableSurfaceModel, const HObjectModel3D& ObjectModel3D, double RelSamplingDistance, const HObjectModel3D& InitialDeformationObjectModel3D, const HString& GenParamName, const HString& GenParamValue);
82
+
83
+  // Refine the position and deformation of a deformable surface model in a 3D scene.
84
+  double RefineDeformableSurfaceModel(const HDeformableSurfaceModel& DeformableSurfaceModel, const HObjectModel3D& ObjectModel3D, double RelSamplingDistance, const HObjectModel3D& InitialDeformationObjectModel3D, const char* GenParamName, const char* GenParamValue);
85
+
86
+#ifdef _WIN32
87
+  // Refine the position and deformation of a deformable surface model in a 3D scene.
88
+  double RefineDeformableSurfaceModel(const HDeformableSurfaceModel& DeformableSurfaceModel, const HObjectModel3D& ObjectModel3D, double RelSamplingDistance, const HObjectModel3D& InitialDeformationObjectModel3D, const wchar_t* GenParamName, const wchar_t* GenParamValue);
89
+#endif
90
+
91
+  // Find the best match of a deformable surface model in a 3D scene.
92
+  static HTuple FindDeformableSurfaceModel(const HDeformableSurfaceModel& DeformableSurfaceModel, const HObjectModel3D& ObjectModel3D, double RelSamplingDistance, const HTuple& MinScore, const HTuple& GenParamName, const HTuple& GenParamValue, HDeformableSurfaceMatchingResultArray* DeformableSurfaceMatchingResult);
93
+
94
+  // Find the best match of a deformable surface model in a 3D scene.
95
+  double FindDeformableSurfaceModel(const HDeformableSurfaceModel& DeformableSurfaceModel, const HObjectModel3D& ObjectModel3D, double RelSamplingDistance, double MinScore, const HTuple& GenParamName, const HTuple& GenParamValue);
96
+
97
+};
98
+
99
+// forward declarations and types for internal array implementation
100
+
101
+template<class T> class HSmartPtr;
102
+template<class T> class HHandleBaseArrayRef;
103
+
104
+typedef HHandleBaseArrayRef<HDeformableSurfaceMatchingResult> HDeformableSurfaceMatchingResultArrayRef;
105
+typedef HSmartPtr< HDeformableSurfaceMatchingResultArrayRef > HDeformableSurfaceMatchingResultArrayPtr;
106
+
107
+
108
+// Represents multiple tool instances
109
+class LIntExport HDeformableSurfaceMatchingResultArray : public HHandleBaseArray
110
+{
111
+
112
+public:
113
+
114
+  // Create empty array
115
+  HDeformableSurfaceMatchingResultArray();
116
+
117
+  // Create array from native array of tool instances
118
+  HDeformableSurfaceMatchingResultArray(HDeformableSurfaceMatchingResult* classes, Hlong length);
119
+
120
+  // Copy constructor
121
+  HDeformableSurfaceMatchingResultArray(const HDeformableSurfaceMatchingResultArray &tool_array);
122
+
123
+  // Destructor
124
+  virtual ~HDeformableSurfaceMatchingResultArray();
125
+
126
+  // Assignment operator
127
+  HDeformableSurfaceMatchingResultArray &operator=(const HDeformableSurfaceMatchingResultArray &tool_array);
128
+
129
+  // Clears array and all tool instances
130
+  virtual void Clear();
131
+
132
+  // Get array of native tool instances
133
+  const HDeformableSurfaceMatchingResult* Tools() const;
134
+
135
+  // Get number of tools
136
+  virtual Hlong Length() const;
137
+
138
+  // Create tool array from tuple of handles
139
+  virtual void SetFromTuple(const HTuple& handles);
140
+
141
+  // Get tuple of handles for tool array
142
+  virtual HTuple ConvertToTuple() const;
143
+
144
+protected:
145
+
146
+// Smart pointer to internal data container
147
+   HDeformableSurfaceMatchingResultArrayPtr *mArrayPtr;
148
+};
149
+
150
+}
151
+
152
+#endif

+ 240 - 0
3rdparty/include22/halcon/halconcpp/HDeformableSurfaceModel.h

@@ -0,0 +1,240 @@
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
+
8
+
9
+#ifndef HCPP_HDEFORMABLESURFACEMODEL
10
+#define HCPP_HDEFORMABLESURFACEMODEL
11
+
12
+namespace HalconCpp
13
+{
14
+
15
+// Represents an instance of a deformable surface model.
16
+class LIntExport HDeformableSurfaceModel : public HHandle
17
+{
18
+
19
+public:
20
+
21
+  // Create an uninitialized instance
22
+  HDeformableSurfaceModel():HHandle() {}
23
+
24
+  // Copy constructor
25
+  HDeformableSurfaceModel(const HDeformableSurfaceModel& source) : HHandle(source) {}
26
+
27
+  // Copy constructor
28
+  HDeformableSurfaceModel(const HHandle& handle);
29
+
30
+  // Create HDeformableSurfaceModel from handle, taking ownership
31
+  explicit HDeformableSurfaceModel(Hlong handle);
32
+
33
+  bool operator==(const HHandle& obj) const
34
+  {
35
+    return HHandleBase::operator==(obj);
36
+  }
37
+
38
+  bool operator!=(const HHandle& obj) const
39
+  {
40
+    return HHandleBase::operator!=(obj);
41
+  }
42
+
43
+protected:
44
+
45
+  // Verify matching semantic type ('deformable_surface_model')!
46
+  virtual void AssertType(Hphandle handle) const;
47
+
48
+public:
49
+
50
+  // Deep copy of all data represented by this object instance
51
+  HDeformableSurfaceModel Clone() const;
52
+
53
+
54
+
55
+/*****************************************************************************
56
+ * Operator-based class constructors
57
+ *****************************************************************************/
58
+
59
+  // read_deformable_surface_model: Read a deformable surface model from a file.
60
+  explicit HDeformableSurfaceModel(const HString& FileName);
61
+
62
+  // read_deformable_surface_model: Read a deformable surface model from a file.
63
+  explicit HDeformableSurfaceModel(const char* FileName);
64
+
65
+#ifdef _WIN32
66
+  // read_deformable_surface_model: Read a deformable surface model from a file.
67
+  explicit HDeformableSurfaceModel(const wchar_t* FileName);
68
+#endif
69
+
70
+  // create_deformable_surface_model: Create the data structure needed to perform deformable surface-based matching.
71
+  explicit HDeformableSurfaceModel(const HObjectModel3D& ObjectModel3D, double RelSamplingDistance, const HTuple& GenParamName, const HTuple& GenParamValue);
72
+
73
+  // create_deformable_surface_model: Create the data structure needed to perform deformable surface-based matching.
74
+  explicit HDeformableSurfaceModel(const HObjectModel3D& ObjectModel3D, double RelSamplingDistance, const HString& GenParamName, const HString& GenParamValue);
75
+
76
+  // create_deformable_surface_model: Create the data structure needed to perform deformable surface-based matching.
77
+  explicit HDeformableSurfaceModel(const HObjectModel3D& ObjectModel3D, double RelSamplingDistance, const char* GenParamName, const char* GenParamValue);
78
+
79
+#ifdef _WIN32
80
+  // create_deformable_surface_model: Create the data structure needed to perform deformable surface-based matching.
81
+  explicit HDeformableSurfaceModel(const HObjectModel3D& ObjectModel3D, double RelSamplingDistance, const wchar_t* GenParamName, const wchar_t* GenParamValue);
82
+#endif
83
+
84
+
85
+
86
+
87
+  /***************************************************************************
88
+   * Operators                                                               *
89
+   ***************************************************************************/
90
+
91
+  // Free the memory of a deformable surface model.
92
+  static void ClearDeformableSurfaceModel(const HDeformableSurfaceModelArray& DeformableSurfaceModel);
93
+
94
+  // Free the memory of a deformable surface model.
95
+  void ClearDeformableSurfaceModel() const;
96
+
97
+  // Deserialize a deformable surface model.
98
+  void DeserializeDeformableSurfaceModel(const HSerializedItem& SerializedItemHandle);
99
+
100
+  // Serialize a deformable surface_model.
101
+  HSerializedItem SerializeDeformableSurfaceModel() const;
102
+
103
+  // Read a deformable surface model from a file.
104
+  void ReadDeformableSurfaceModel(const HString& FileName);
105
+
106
+  // Read a deformable surface model from a file.
107
+  void ReadDeformableSurfaceModel(const char* FileName);
108
+
109
+#ifdef _WIN32
110
+  // Read a deformable surface model from a file.
111
+  void ReadDeformableSurfaceModel(const wchar_t* FileName);
112
+#endif
113
+
114
+  // Write a deformable surface model to a file.
115
+  void WriteDeformableSurfaceModel(const HString& FileName) const;
116
+
117
+  // Write a deformable surface model to a file.
118
+  void WriteDeformableSurfaceModel(const char* FileName) const;
119
+
120
+#ifdef _WIN32
121
+  // Write a deformable surface model to a file.
122
+  void WriteDeformableSurfaceModel(const wchar_t* FileName) const;
123
+#endif
124
+
125
+  // Refine the position and deformation of a deformable surface model in a 3D scene.
126
+  HTuple RefineDeformableSurfaceModel(const HObjectModel3D& ObjectModel3D, double RelSamplingDistance, const HObjectModel3D& InitialDeformationObjectModel3D, const HTuple& GenParamName, const HTuple& GenParamValue, HDeformableSurfaceMatchingResultArray* DeformableSurfaceMatchingResult) const;
127
+
128
+  // Refine the position and deformation of a deformable surface model in a 3D scene.
129
+  double RefineDeformableSurfaceModel(const HObjectModel3D& ObjectModel3D, double RelSamplingDistance, const HObjectModel3D& InitialDeformationObjectModel3D, const HString& GenParamName, const HString& GenParamValue, HDeformableSurfaceMatchingResult* DeformableSurfaceMatchingResult) const;
130
+
131
+  // Refine the position and deformation of a deformable surface model in a 3D scene.
132
+  double RefineDeformableSurfaceModel(const HObjectModel3D& ObjectModel3D, double RelSamplingDistance, const HObjectModel3D& InitialDeformationObjectModel3D, const char* GenParamName, const char* GenParamValue, HDeformableSurfaceMatchingResult* DeformableSurfaceMatchingResult) const;
133
+
134
+#ifdef _WIN32
135
+  // Refine the position and deformation of a deformable surface model in a 3D scene.
136
+  double RefineDeformableSurfaceModel(const HObjectModel3D& ObjectModel3D, double RelSamplingDistance, const HObjectModel3D& InitialDeformationObjectModel3D, const wchar_t* GenParamName, const wchar_t* GenParamValue, HDeformableSurfaceMatchingResult* DeformableSurfaceMatchingResult) const;
137
+#endif
138
+
139
+  // Find the best match of a deformable surface model in a 3D scene.
140
+  HTuple FindDeformableSurfaceModel(const HObjectModel3D& ObjectModel3D, double RelSamplingDistance, const HTuple& MinScore, const HTuple& GenParamName, const HTuple& GenParamValue, HDeformableSurfaceMatchingResultArray* DeformableSurfaceMatchingResult) const;
141
+
142
+  // Find the best match of a deformable surface model in a 3D scene.
143
+  double FindDeformableSurfaceModel(const HObjectModel3D& ObjectModel3D, double RelSamplingDistance, double MinScore, const HTuple& GenParamName, const HTuple& GenParamValue, HDeformableSurfaceMatchingResult* DeformableSurfaceMatchingResult) const;
144
+
145
+  // Return the parameters and properties of a deformable surface model.
146
+  HTuple GetDeformableSurfaceModelParam(const HTuple& GenParamName) const;
147
+
148
+  // Return the parameters and properties of a deformable surface model.
149
+  HTuple GetDeformableSurfaceModelParam(const HString& GenParamName) const;
150
+
151
+  // Return the parameters and properties of a deformable surface model.
152
+  HTuple GetDeformableSurfaceModelParam(const char* GenParamName) const;
153
+
154
+#ifdef _WIN32
155
+  // Return the parameters and properties of a deformable surface model.
156
+  HTuple GetDeformableSurfaceModelParam(const wchar_t* GenParamName) const;
157
+#endif
158
+
159
+  // Add a reference point to a deformable surface model.
160
+  HTuple AddDeformableSurfaceModelReferencePoint(const HTuple& ReferencePointX, const HTuple& ReferencePointY, const HTuple& ReferencePointZ) const;
161
+
162
+  // Add a reference point to a deformable surface model.
163
+  Hlong AddDeformableSurfaceModelReferencePoint(double ReferencePointX, double ReferencePointY, double ReferencePointZ) const;
164
+
165
+  // Add a sample deformation to a deformable surface model
166
+  void AddDeformableSurfaceModelSample(const HObjectModel3DArray& ObjectModel3D) const;
167
+
168
+  // Add a sample deformation to a deformable surface model
169
+  void AddDeformableSurfaceModelSample(const HObjectModel3D& ObjectModel3D) const;
170
+
171
+  // Create the data structure needed to perform deformable surface-based matching.
172
+  void CreateDeformableSurfaceModel(const HObjectModel3D& ObjectModel3D, double RelSamplingDistance, const HTuple& GenParamName, const HTuple& GenParamValue);
173
+
174
+  // Create the data structure needed to perform deformable surface-based matching.
175
+  void CreateDeformableSurfaceModel(const HObjectModel3D& ObjectModel3D, double RelSamplingDistance, const HString& GenParamName, const HString& GenParamValue);
176
+
177
+  // Create the data structure needed to perform deformable surface-based matching.
178
+  void CreateDeformableSurfaceModel(const HObjectModel3D& ObjectModel3D, double RelSamplingDistance, const char* GenParamName, const char* GenParamValue);
179
+
180
+#ifdef _WIN32
181
+  // Create the data structure needed to perform deformable surface-based matching.
182
+  void CreateDeformableSurfaceModel(const HObjectModel3D& ObjectModel3D, double RelSamplingDistance, const wchar_t* GenParamName, const wchar_t* GenParamValue);
183
+#endif
184
+
185
+};
186
+
187
+// forward declarations and types for internal array implementation
188
+
189
+template<class T> class HSmartPtr;
190
+template<class T> class HHandleBaseArrayRef;
191
+
192
+typedef HHandleBaseArrayRef<HDeformableSurfaceModel> HDeformableSurfaceModelArrayRef;
193
+typedef HSmartPtr< HDeformableSurfaceModelArrayRef > HDeformableSurfaceModelArrayPtr;
194
+
195
+
196
+// Represents multiple tool instances
197
+class LIntExport HDeformableSurfaceModelArray : public HHandleBaseArray
198
+{
199
+
200
+public:
201
+
202
+  // Create empty array
203
+  HDeformableSurfaceModelArray();
204
+
205
+  // Create array from native array of tool instances
206
+  HDeformableSurfaceModelArray(HDeformableSurfaceModel* classes, Hlong length);
207
+
208
+  // Copy constructor
209
+  HDeformableSurfaceModelArray(const HDeformableSurfaceModelArray &tool_array);
210
+
211
+  // Destructor
212
+  virtual ~HDeformableSurfaceModelArray();
213
+
214
+  // Assignment operator
215
+  HDeformableSurfaceModelArray &operator=(const HDeformableSurfaceModelArray &tool_array);
216
+
217
+  // Clears array and all tool instances
218
+  virtual void Clear();
219
+
220
+  // Get array of native tool instances
221
+  const HDeformableSurfaceModel* Tools() const;
222
+
223
+  // Get number of tools
224
+  virtual Hlong Length() const;
225
+
226
+  // Create tool array from tuple of handles
227
+  virtual void SetFromTuple(const HTuple& handles);
228
+
229
+  // Get tuple of handles for tool array
230
+  virtual HTuple ConvertToTuple() const;
231
+
232
+protected:
233
+
234
+// Smart pointer to internal data container
235
+   HDeformableSurfaceModelArrayPtr *mArrayPtr;
236
+};
237
+
238
+}
239
+
240
+#endif

+ 281 - 0
3rdparty/include22/halcon/halconcpp/HDescriptorModel.h

@@ -0,0 +1,281 @@
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
+
8
+
9
+#ifndef HCPP_HDESCRIPTORMODEL
10
+#define HCPP_HDESCRIPTORMODEL
11
+
12
+namespace HalconCpp
13
+{
14
+
15
+// Represents an instance of a descriptor model.
16
+class LIntExport HDescriptorModel : public HHandle
17
+{
18
+
19
+public:
20
+
21
+  // Create an uninitialized instance
22
+  HDescriptorModel():HHandle() {}
23
+
24
+  // Copy constructor
25
+  HDescriptorModel(const HDescriptorModel& source) : HHandle(source) {}
26
+
27
+  // Copy constructor
28
+  HDescriptorModel(const HHandle& handle);
29
+
30
+  // Create HDescriptorModel from handle, taking ownership
31
+  explicit HDescriptorModel(Hlong handle);
32
+
33
+  bool operator==(const HHandle& obj) const
34
+  {
35
+    return HHandleBase::operator==(obj);
36
+  }
37
+
38
+  bool operator!=(const HHandle& obj) const
39
+  {
40
+    return HHandleBase::operator!=(obj);
41
+  }
42
+
43
+protected:
44
+
45
+  // Verify matching semantic type ('descriptor_model')!
46
+  virtual void AssertType(Hphandle handle) const;
47
+
48
+public:
49
+
50
+  // Deep copy of all data represented by this object instance
51
+  HDescriptorModel Clone() const;
52
+
53
+
54
+
55
+/*****************************************************************************
56
+ * Operator-based class constructors
57
+ *****************************************************************************/
58
+
59
+  // read_descriptor_model: Read a descriptor model from a file.
60
+  explicit HDescriptorModel(const HString& FileName);
61
+
62
+  // read_descriptor_model: Read a descriptor model from a file.
63
+  explicit HDescriptorModel(const char* FileName);
64
+
65
+#ifdef _WIN32
66
+  // read_descriptor_model: Read a descriptor model from a file.
67
+  explicit HDescriptorModel(const wchar_t* FileName);
68
+#endif
69
+
70
+  // create_calib_descriptor_model: Create a descriptor model for calibrated perspective matching.
71
+  explicit HDescriptorModel(const HImage& Template, const HCamPar& CamParam, const HPose& ReferencePose, const HString& DetectorType, const HTuple& DetectorParamName, const HTuple& DetectorParamValue, const HTuple& DescriptorParamName, const HTuple& DescriptorParamValue, Hlong Seed);
72
+
73
+  // create_calib_descriptor_model: Create a descriptor model for calibrated perspective matching.
74
+  explicit HDescriptorModel(const HImage& Template, const HCamPar& CamParam, const HPose& ReferencePose, const char* DetectorType, const HTuple& DetectorParamName, const HTuple& DetectorParamValue, const HTuple& DescriptorParamName, const HTuple& DescriptorParamValue, Hlong Seed);
75
+
76
+#ifdef _WIN32
77
+  // create_calib_descriptor_model: Create a descriptor model for calibrated perspective matching.
78
+  explicit HDescriptorModel(const HImage& Template, const HCamPar& CamParam, const HPose& ReferencePose, const wchar_t* DetectorType, const HTuple& DetectorParamName, const HTuple& DetectorParamValue, const HTuple& DescriptorParamName, const HTuple& DescriptorParamValue, Hlong Seed);
79
+#endif
80
+
81
+  // create_uncalib_descriptor_model: Prepare a descriptor model for interest point matching.
82
+  explicit HDescriptorModel(const HImage& Template, const HString& DetectorType, const HTuple& DetectorParamName, const HTuple& DetectorParamValue, const HTuple& DescriptorParamName, const HTuple& DescriptorParamValue, Hlong Seed);
83
+
84
+  // create_uncalib_descriptor_model: Prepare a descriptor model for interest point matching.
85
+  explicit HDescriptorModel(const HImage& Template, const char* DetectorType, const HTuple& DetectorParamName, const HTuple& DetectorParamValue, const HTuple& DescriptorParamName, const HTuple& DescriptorParamValue, Hlong Seed);
86
+
87
+#ifdef _WIN32
88
+  // create_uncalib_descriptor_model: Prepare a descriptor model for interest point matching.
89
+  explicit HDescriptorModel(const HImage& Template, const wchar_t* DetectorType, const HTuple& DetectorParamName, const HTuple& DetectorParamValue, const HTuple& DescriptorParamName, const HTuple& DescriptorParamValue, Hlong Seed);
90
+#endif
91
+
92
+
93
+
94
+
95
+  /***************************************************************************
96
+   * Operators                                                               *
97
+   ***************************************************************************/
98
+
99
+  // Free the memory of a descriptor model.
100
+  static void ClearDescriptorModel(const HDescriptorModelArray& ModelID);
101
+
102
+  // Free the memory of a descriptor model.
103
+  void ClearDescriptorModel() const;
104
+
105
+  // Deserialize a descriptor model.
106
+  void DeserializeDescriptorModel(const HSerializedItem& SerializedItemHandle);
107
+
108
+  // Serialize a descriptor model.
109
+  HSerializedItem SerializeDescriptorModel() const;
110
+
111
+  // Read a descriptor model from a file.
112
+  void ReadDescriptorModel(const HString& FileName);
113
+
114
+  // Read a descriptor model from a file.
115
+  void ReadDescriptorModel(const char* FileName);
116
+
117
+#ifdef _WIN32
118
+  // Read a descriptor model from a file.
119
+  void ReadDescriptorModel(const wchar_t* FileName);
120
+#endif
121
+
122
+  // Write a descriptor model to a file.
123
+  void WriteDescriptorModel(const HString& FileName) const;
124
+
125
+  // Write a descriptor model to a file.
126
+  void WriteDescriptorModel(const char* FileName) const;
127
+
128
+#ifdef _WIN32
129
+  // Write a descriptor model to a file.
130
+  void WriteDescriptorModel(const wchar_t* FileName) const;
131
+#endif
132
+
133
+  // Find the best matches of a calibrated descriptor model in an image and return their 3D pose.
134
+  HPoseArray FindCalibDescriptorModel(const HImage& Image, const HTuple& DetectorParamName, const HTuple& DetectorParamValue, const HTuple& DescriptorParamName, const HTuple& DescriptorParamValue, const HTuple& MinScore, Hlong NumMatches, const HCamPar& CamParam, const HTuple& ScoreType, HTuple* Score) const;
135
+
136
+  // Find the best matches of a calibrated descriptor model in an image and return their 3D pose.
137
+  HPose FindCalibDescriptorModel(const HImage& Image, const HTuple& DetectorParamName, const HTuple& DetectorParamValue, const HTuple& DescriptorParamName, const HTuple& DescriptorParamValue, double MinScore, Hlong NumMatches, const HCamPar& CamParam, const HString& ScoreType, double* Score) const;
138
+
139
+  // Find the best matches of a calibrated descriptor model in an image and return their 3D pose.
140
+  HPose FindCalibDescriptorModel(const HImage& Image, const HTuple& DetectorParamName, const HTuple& DetectorParamValue, const HTuple& DescriptorParamName, const HTuple& DescriptorParamValue, double MinScore, Hlong NumMatches, const HCamPar& CamParam, const char* ScoreType, double* Score) const;
141
+
142
+#ifdef _WIN32
143
+  // Find the best matches of a calibrated descriptor model in an image and return their 3D pose.
144
+  HPose FindCalibDescriptorModel(const HImage& Image, const HTuple& DetectorParamName, const HTuple& DetectorParamValue, const HTuple& DescriptorParamName, const HTuple& DescriptorParamValue, double MinScore, Hlong NumMatches, const HCamPar& CamParam, const wchar_t* ScoreType, double* Score) const;
145
+#endif
146
+
147
+  // Find the best matches of a descriptor model in an image.
148
+  HHomMat2DArray FindUncalibDescriptorModel(const HImage& Image, const HTuple& DetectorParamName, const HTuple& DetectorParamValue, const HTuple& DescriptorParamName, const HTuple& DescriptorParamValue, const HTuple& MinScore, Hlong NumMatches, const HTuple& ScoreType, HTuple* Score) const;
149
+
150
+  // Find the best matches of a descriptor model in an image.
151
+  HHomMat2D FindUncalibDescriptorModel(const HImage& Image, const HTuple& DetectorParamName, const HTuple& DetectorParamValue, const HTuple& DescriptorParamName, const HTuple& DescriptorParamValue, double MinScore, Hlong NumMatches, const HString& ScoreType, double* Score) const;
152
+
153
+  // Find the best matches of a descriptor model in an image.
154
+  HHomMat2D FindUncalibDescriptorModel(const HImage& Image, const HTuple& DetectorParamName, const HTuple& DetectorParamValue, const HTuple& DescriptorParamName, const HTuple& DescriptorParamValue, double MinScore, Hlong NumMatches, const char* ScoreType, double* Score) const;
155
+
156
+#ifdef _WIN32
157
+  // Find the best matches of a descriptor model in an image.
158
+  HHomMat2D FindUncalibDescriptorModel(const HImage& Image, const HTuple& DetectorParamName, const HTuple& DetectorParamValue, const HTuple& DescriptorParamName, const HTuple& DescriptorParamValue, double MinScore, Hlong NumMatches, const wchar_t* ScoreType, double* Score) const;
159
+#endif
160
+
161
+  // Query the interest points of the descriptor model or the last processed search image.
162
+  void GetDescriptorModelPoints(const HString& Set, const HTuple& Subset, HTuple* Row, HTuple* Column) const;
163
+
164
+  // Query the interest points of the descriptor model or the last processed search image.
165
+  void GetDescriptorModelPoints(const HString& Set, Hlong Subset, HTuple* Row, HTuple* Column) const;
166
+
167
+  // Query the interest points of the descriptor model or the last processed search image.
168
+  void GetDescriptorModelPoints(const char* Set, Hlong Subset, HTuple* Row, HTuple* Column) const;
169
+
170
+#ifdef _WIN32
171
+  // Query the interest points of the descriptor model or the last processed search image.
172
+  void GetDescriptorModelPoints(const wchar_t* Set, Hlong Subset, HTuple* Row, HTuple* Column) const;
173
+#endif
174
+
175
+  // Return the parameters of a descriptor model.
176
+  HString GetDescriptorModelParams(HTuple* DetectorParamName, HTuple* DetectorParamValue, HTuple* DescriptorParamName, HTuple* DescriptorParamValue) const;
177
+
178
+  // Create a descriptor model for calibrated perspective matching.
179
+  void CreateCalibDescriptorModel(const HImage& Template, const HCamPar& CamParam, const HPose& ReferencePose, const HString& DetectorType, const HTuple& DetectorParamName, const HTuple& DetectorParamValue, const HTuple& DescriptorParamName, const HTuple& DescriptorParamValue, Hlong Seed);
180
+
181
+  // Create a descriptor model for calibrated perspective matching.
182
+  void CreateCalibDescriptorModel(const HImage& Template, const HCamPar& CamParam, const HPose& ReferencePose, const char* DetectorType, const HTuple& DetectorParamName, const HTuple& DetectorParamValue, const HTuple& DescriptorParamName, const HTuple& DescriptorParamValue, Hlong Seed);
183
+
184
+#ifdef _WIN32
185
+  // Create a descriptor model for calibrated perspective matching.
186
+  void CreateCalibDescriptorModel(const HImage& Template, const HCamPar& CamParam, const HPose& ReferencePose, const wchar_t* DetectorType, const HTuple& DetectorParamName, const HTuple& DetectorParamValue, const HTuple& DescriptorParamName, const HTuple& DescriptorParamValue, Hlong Seed);
187
+#endif
188
+
189
+  // Prepare a descriptor model for interest point matching.
190
+  void CreateUncalibDescriptorModel(const HImage& Template, const HString& DetectorType, const HTuple& DetectorParamName, const HTuple& DetectorParamValue, const HTuple& DescriptorParamName, const HTuple& DescriptorParamValue, Hlong Seed);
191
+
192
+  // Prepare a descriptor model for interest point matching.
193
+  void CreateUncalibDescriptorModel(const HImage& Template, const char* DetectorType, const HTuple& DetectorParamName, const HTuple& DetectorParamValue, const HTuple& DescriptorParamName, const HTuple& DescriptorParamValue, Hlong Seed);
194
+
195
+#ifdef _WIN32
196
+  // Prepare a descriptor model for interest point matching.
197
+  void CreateUncalibDescriptorModel(const HImage& Template, const wchar_t* DetectorType, const HTuple& DetectorParamName, const HTuple& DetectorParamValue, const HTuple& DescriptorParamName, const HTuple& DescriptorParamValue, Hlong Seed);
198
+#endif
199
+
200
+  // Query alphanumerical results that were accumulated during descriptor-based matching.
201
+  HTuple GetDescriptorModelResults(const HTuple& ObjectID, const HString& ResultNames) const;
202
+
203
+  // Query alphanumerical results that were accumulated during descriptor-based matching.
204
+  HTuple GetDescriptorModelResults(Hlong ObjectID, const HString& ResultNames) const;
205
+
206
+  // Query alphanumerical results that were accumulated during descriptor-based matching.
207
+  HTuple GetDescriptorModelResults(Hlong ObjectID, const char* ResultNames) const;
208
+
209
+#ifdef _WIN32
210
+  // Query alphanumerical results that were accumulated during descriptor-based matching.
211
+  HTuple GetDescriptorModelResults(Hlong ObjectID, const wchar_t* ResultNames) const;
212
+#endif
213
+
214
+  // Return the origin of a descriptor model.
215
+  void GetDescriptorModelOrigin(HTuple* Row, HTuple* Column) const;
216
+
217
+  // Return the origin of a descriptor model.
218
+  void GetDescriptorModelOrigin(double* Row, double* Column) const;
219
+
220
+  // Sets the origin of a descriptor model.
221
+  void SetDescriptorModelOrigin(const HTuple& Row, const HTuple& Column) const;
222
+
223
+  // Sets the origin of a descriptor model.
224
+  void SetDescriptorModelOrigin(double Row, double Column) const;
225
+
226
+};
227
+
228
+// forward declarations and types for internal array implementation
229
+
230
+template<class T> class HSmartPtr;
231
+template<class T> class HHandleBaseArrayRef;
232
+
233
+typedef HHandleBaseArrayRef<HDescriptorModel> HDescriptorModelArrayRef;
234
+typedef HSmartPtr< HDescriptorModelArrayRef > HDescriptorModelArrayPtr;
235
+
236
+
237
+// Represents multiple tool instances
238
+class LIntExport HDescriptorModelArray : public HHandleBaseArray
239
+{
240
+
241
+public:
242
+
243
+  // Create empty array
244
+  HDescriptorModelArray();
245
+
246
+  // Create array from native array of tool instances
247
+  HDescriptorModelArray(HDescriptorModel* classes, Hlong length);
248
+
249
+  // Copy constructor
250
+  HDescriptorModelArray(const HDescriptorModelArray &tool_array);
251
+
252
+  // Destructor
253
+  virtual ~HDescriptorModelArray();
254
+
255
+  // Assignment operator
256
+  HDescriptorModelArray &operator=(const HDescriptorModelArray &tool_array);
257
+
258
+  // Clears array and all tool instances
259
+  virtual void Clear();
260
+
261
+  // Get array of native tool instances
262
+  const HDescriptorModel* Tools() const;
263
+
264
+  // Get number of tools
265
+  virtual Hlong Length() const;
266
+
267
+  // Create tool array from tuple of handles
268
+  virtual void SetFromTuple(const HTuple& handles);
269
+
270
+  // Get tuple of handles for tool array
271
+  virtual HTuple ConvertToTuple() const;
272
+
273
+protected:
274
+
275
+// Smart pointer to internal data container
276
+   HDescriptorModelArrayPtr *mArrayPtr;
277
+};
278
+
279
+}
280
+
281
+#endif

+ 134 - 0
3rdparty/include22/halcon/halconcpp/HDevThread.h

@@ -0,0 +1,134 @@
1
+/*****************************************************************************
2
+ * HDevThread.h
3
+ *****************************************************************************
4
+ *
5
+ * Project:     Halcon/C++
6
+ * Description: Helper class for export of HDevelop's parallel 
7
+ *              language extensions.
8
+ *
9
+ * (c) 2014-2020 by MVTec Software GmbH
10
+ *               www.mvtec.com
11
+ *
12
+ *****************************************************************************
13
+ *
14
+ *
15
+ *****************************************************************************/
16
+
17
+
18
+#ifndef HCPP_DEV_THREAD_H
19
+#define HCPP_DEV_THREAD_H
20
+
21
+
22
+namespace HalconCpp
23
+{
24
+
25
+class LIntExport HDevThreadContext
26
+{
27
+
28
+public:
29
+
30
+  HDevThreadContext();
31
+  ~HDevThreadContext();
32
+
33
+  void* GetHandle() const 
34
+  {
35
+    return mContextHandle;
36
+  }
37
+
38
+private:
39
+
40
+  void* mContextHandle;
41
+};
42
+
43
+
44
+class HDevInputParam;
45
+class HDevOutputParam;
46
+
47
+
48
+class LIntExport HDevThread
49
+{
50
+
51
+public:
52
+
53
+  // Manage threads and procedure calls
54
+
55
+  explicit HDevThread(const HDevThreadContext& context, 
56
+                      const void* proc, Hlong num_in, Hlong num_out);
57
+  ~HDevThread();
58
+
59
+
60
+  void Start();
61
+
62
+  void ParStart(HTuple *par_handle);
63
+
64
+  static void ParJoin(const HTuple& par_handles);
65
+
66
+  void Exit(void);
67
+
68
+  void CallProc();
69
+
70
+  bool IsDirectCall() const {return mDirectCall;}
71
+
72
+
73
+
74
+  // Store copy of input parameter value in thread-specific context
75
+
76
+  void SetInputIconicParamObject(Hlong par_index, const HObject& obj);
77
+  void SetInputIconicParamVector(Hlong par_index,
78
+                                 const HObjectVector& vector);
79
+  void SetInputCtrlParamTuple(Hlong par_index, const HTuple& tuple);
80
+  void SetInputCtrlParamVector(Hlong par_index,
81
+                               const HTupleVector& vector);
82
+
83
+
84
+  // Access thread-specific copy of input value
85
+
86
+  const HObject& GetInputIconicParamObject(Hlong par_index) const;
87
+  const HObjectVector& GetInputIconicParamVector(Hlong par_index) const;
88
+  const HTuple& GetInputCtrlParamTuple(Hlong par_index) const;
89
+  const HTupleVector& GetInputCtrlParamVector(Hlong par_index) const;
90
+
91
+
92
+  // Bind variable reference to output parameter
93
+
94
+  void BindOutputIconicParamObject(Hlong par_index, bool global,
95
+                                   HObject* obj);
96
+  void BindOutputIconicParamVector(Hlong par_index, bool global,
97
+                                   HObjectVector* vector,
98
+                                   HTuple index = HTuple());
99
+  void BindOutputCtrlParamTuple(Hlong par_index, bool global, HTuple* obj);
100
+  void BindOutputCtrlParamVector(Hlong par_index, bool global,
101
+                                 HTupleVector* vector,
102
+                                 HTuple index = HTuple());
103
+
104
+
105
+  // Store result of procedure call into bound output variables
106
+
107
+  void StoreOutputIconicParamObject(Hlong par_index, const HObject& obj);
108
+  void StoreOutputIconicParamVector(Hlong par_index,
109
+                                    const HObjectVector& vector);
110
+  void StoreOutputCtrlParamTuple(Hlong par_index, const HTuple& tuple);
111
+  void StoreOutputCtrlParamVector(Hlong par_index,
112
+                                  const HTupleVector& vector);
113
+
114
+
115
+
116
+protected:
117
+
118
+  void* mThreadHandle;
119
+
120
+  const void* mProc;
121
+
122
+  bool mDirectCall;
123
+
124
+  Hlong mNumParamsInput;
125
+  Hlong mNumParamsOutput;
126
+
127
+  HDevInputParam**  mParamsInput;
128
+  HDevOutputParam** mParamsOutput;
129
+
130
+};
131
+
132
+} // namespace HalconCpp
133
+
134
+#endif

+ 58 - 0
3rdparty/include22/halcon/halconcpp/HDevWindowStack.h

@@ -0,0 +1,58 @@
1
+/*****************************************************************************
2
+ * HDevWindowStack.h
3
+ ***************************************************************************** 
4
+ *
5
+ * Project:     HALCON/C++
6
+ * Description: Window management for exported HDevelop code
7
+ *
8
+ * (c) 2010-2020 by MVTec Software GmbH
9
+ *                  www.mvtec.com
10
+ * 
11
+ *****************************************************************************
12
+ *
13
+ *
14
+ *****************************************************************************/
15
+
16
+
17
+#ifndef HCPP_DEV_WINDOW_STACK_H
18
+#define HCPP_DEV_WINDOW_STACK_H
19
+
20
+
21
+#include "halconcpp/HTuple.h"
22
+
23
+
24
+namespace HalconCpp
25
+{
26
+
27
+// The class HDevWindowStack can be used to emulate the behavior of HDevelop
28
+// graphics windows for HALCON graphics windows. It is primarily intended for
29
+// usage in C++ programs exported from HDevelop programs containing HDevelop
30
+// window operators (e.g. dev_set_window, dev_open_window, dev_close_window...)
31
+class LIntExport HDevWindowStack
32
+{
33
+
34
+public:  
35
+
36
+  // Push handle for new window (dev_open_window)
37
+  static void   Push(const HTuple &win_handle);
38
+  
39
+  // Pop handle for closed window (dev_close_window)
40
+  static HTuple Pop();
41
+  
42
+  // Get handle for active window
43
+  static HTuple GetActive();
44
+  
45
+  // Set active window (dev_set_window)
46
+  static void   SetActive(const HTuple &win_handle);
47
+  
48
+  // Test if any open window is available
49
+  static bool   IsOpen();
50
+  
51
+  // Close all open windows
52
+  static void   CloseAll();
53
+  
54
+};
55
+
56
+}
57
+
58
+#endif

+ 261 - 0
3rdparty/include22/halcon/halconcpp/HDict.h

@@ -0,0 +1,261 @@
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
+
8
+
9
+#ifndef HCPP_HDICT
10
+#define HCPP_HDICT
11
+
12
+namespace HalconCpp
13
+{
14
+
15
+// Represents an instance of a Dictionary.
16
+class LIntExport HDict : public HHandle
17
+{
18
+
19
+public:
20
+
21
+  // Copy constructor
22
+  HDict(const HDict& source) : HHandle(source) {}
23
+
24
+  // Copy constructor
25
+  HDict(const HHandle& handle);
26
+
27
+  // Create HDict from handle, taking ownership
28
+  explicit HDict(Hlong handle);
29
+
30
+  bool operator==(const HHandle& obj) const
31
+  {
32
+    return HHandleBase::operator==(obj);
33
+  }
34
+
35
+  bool operator!=(const HHandle& obj) const
36
+  {
37
+    return HHandleBase::operator!=(obj);
38
+  }
39
+
40
+protected:
41
+
42
+  // Verify matching semantic type ('dict')!
43
+  virtual void AssertType(Hphandle handle) const;
44
+
45
+public:
46
+
47
+
48
+
49
+/*****************************************************************************
50
+ * Operator-based class constructors
51
+ *****************************************************************************/
52
+
53
+  // create_dict: Create a new empty dictionary.
54
+  explicit HDict();
55
+
56
+  // read_dict: Read a dictionary from a file.
57
+  explicit HDict(const HString& FileName, const HTuple& GenParamName, const HTuple& GenParamValue);
58
+
59
+  // read_dict: Read a dictionary from a file.
60
+  explicit HDict(const HString& FileName, const HString& GenParamName, const HString& GenParamValue);
61
+
62
+  // read_dict: Read a dictionary from a file.
63
+  explicit HDict(const char* FileName, const char* GenParamName, const char* GenParamValue);
64
+
65
+#ifdef _WIN32
66
+  // read_dict: Read a dictionary from a file.
67
+  explicit HDict(const wchar_t* FileName, const wchar_t* GenParamName, const wchar_t* GenParamValue);
68
+#endif
69
+
70
+
71
+
72
+
73
+  /***************************************************************************
74
+   * Operators                                                               *
75
+   ***************************************************************************/
76
+
77
+  // Copy a dictionary.
78
+  HDict CopyDict(const HTuple& GenParamName, const HTuple& GenParamValue) const;
79
+
80
+  // Copy a dictionary.
81
+  HDict CopyDict(const HString& GenParamName, const HString& GenParamValue) const;
82
+
83
+  // Copy a dictionary.
84
+  HDict CopyDict(const char* GenParamName, const char* GenParamValue) const;
85
+
86
+#ifdef _WIN32
87
+  // Copy a dictionary.
88
+  HDict CopyDict(const wchar_t* GenParamName, const wchar_t* GenParamValue) const;
89
+#endif
90
+
91
+  // Create a new empty dictionary.
92
+  void CreateDict();
93
+
94
+  // Retrieve an object associated with the key from the dictionary.
95
+  HObject GetDictObject(const HTuple& Key) const;
96
+
97
+  // Retrieve an object associated with the key from the dictionary.
98
+  HObject GetDictObject(const HString& Key) const;
99
+
100
+  // Retrieve an object associated with the key from the dictionary.
101
+  HObject GetDictObject(const char* Key) const;
102
+
103
+#ifdef _WIN32
104
+  // Retrieve an object associated with the key from the dictionary.
105
+  HObject GetDictObject(const wchar_t* Key) const;
106
+#endif
107
+
108
+  // Query dictionary parameters or information about a dictionary.
109
+  HTuple GetDictParam(const HString& GenParamName, const HTuple& Key) const;
110
+
111
+  // Query dictionary parameters or information about a dictionary.
112
+  HTuple GetDictParam(const HString& GenParamName, const HString& Key) const;
113
+
114
+  // Query dictionary parameters or information about a dictionary.
115
+  HTuple GetDictParam(const char* GenParamName, const char* Key) const;
116
+
117
+#ifdef _WIN32
118
+  // Query dictionary parameters or information about a dictionary.
119
+  HTuple GetDictParam(const wchar_t* GenParamName, const wchar_t* Key) const;
120
+#endif
121
+
122
+  // Retrieve a tuple associated with the key from the dictionary.
123
+  HTuple GetDictTuple(const HTuple& Key) const;
124
+
125
+  // Retrieve a tuple associated with the key from the dictionary.
126
+  HTuple GetDictTuple(const HString& Key) const;
127
+
128
+  // Retrieve a tuple associated with the key from the dictionary.
129
+  HTuple GetDictTuple(const char* Key) const;
130
+
131
+#ifdef _WIN32
132
+  // Retrieve a tuple associated with the key from the dictionary.
133
+  HTuple GetDictTuple(const wchar_t* Key) const;
134
+#endif
135
+
136
+  // Read a dictionary from a file.
137
+  void ReadDict(const HString& FileName, const HTuple& GenParamName, const HTuple& GenParamValue);
138
+
139
+  // Read a dictionary from a file.
140
+  void ReadDict(const HString& FileName, const HString& GenParamName, const HString& GenParamValue);
141
+
142
+  // Read a dictionary from a file.
143
+  void ReadDict(const char* FileName, const char* GenParamName, const char* GenParamValue);
144
+
145
+#ifdef _WIN32
146
+  // Read a dictionary from a file.
147
+  void ReadDict(const wchar_t* FileName, const wchar_t* GenParamName, const wchar_t* GenParamValue);
148
+#endif
149
+
150
+  // Remove keys from a dictionary.
151
+  void RemoveDictKey(const HTuple& Key) const;
152
+
153
+  // Remove keys from a dictionary.
154
+  void RemoveDictKey(const HString& Key) const;
155
+
156
+  // Remove keys from a dictionary.
157
+  void RemoveDictKey(const char* Key) const;
158
+
159
+#ifdef _WIN32
160
+  // Remove keys from a dictionary.
161
+  void RemoveDictKey(const wchar_t* Key) const;
162
+#endif
163
+
164
+  // Add a key/object pair to the dictionary.
165
+  void SetDictObject(const HObject& Object, const HTuple& Key) const;
166
+
167
+  // Add a key/object pair to the dictionary.
168
+  void SetDictObject(const HObject& Object, const HString& Key) const;
169
+
170
+  // Add a key/object pair to the dictionary.
171
+  void SetDictObject(const HObject& Object, const char* Key) const;
172
+
173
+#ifdef _WIN32
174
+  // Add a key/object pair to the dictionary.
175
+  void SetDictObject(const HObject& Object, const wchar_t* Key) const;
176
+#endif
177
+
178
+  // Add a key/tuple pair to the dictionary.
179
+  void SetDictTuple(const HTuple& Key, const HTuple& Tuple) const;
180
+
181
+  // Add a key/tuple pair to the dictionary.
182
+  void SetDictTuple(const HString& Key, const HTuple& Tuple) const;
183
+
184
+  // Add a key/tuple pair to the dictionary.
185
+  void SetDictTuple(const char* Key, const HTuple& Tuple) const;
186
+
187
+#ifdef _WIN32
188
+  // Add a key/tuple pair to the dictionary.
189
+  void SetDictTuple(const wchar_t* Key, const HTuple& Tuple) const;
190
+#endif
191
+
192
+  // Write a dictionary to a file.
193
+  void WriteDict(const HString& FileName, const HTuple& GenParamName, const HTuple& GenParamValue) const;
194
+
195
+  // Write a dictionary to a file.
196
+  void WriteDict(const HString& FileName, const HString& GenParamName, const HString& GenParamValue) const;
197
+
198
+  // Write a dictionary to a file.
199
+  void WriteDict(const char* FileName, const char* GenParamName, const char* GenParamValue) const;
200
+
201
+#ifdef _WIN32
202
+  // Write a dictionary to a file.
203
+  void WriteDict(const wchar_t* FileName, const wchar_t* GenParamName, const wchar_t* GenParamValue) const;
204
+#endif
205
+
206
+};
207
+
208
+// forward declarations and types for internal array implementation
209
+
210
+template<class T> class HSmartPtr;
211
+template<class T> class HHandleBaseArrayRef;
212
+
213
+typedef HHandleBaseArrayRef<HDict> HDictArrayRef;
214
+typedef HSmartPtr< HDictArrayRef > HDictArrayPtr;
215
+
216
+
217
+// Represents multiple tool instances
218
+class LIntExport HDictArray : public HHandleBaseArray
219
+{
220
+
221
+public:
222
+
223
+  // Create empty array
224
+  HDictArray();
225
+
226
+  // Create array from native array of tool instances
227
+  HDictArray(HDict* classes, Hlong length);
228
+
229
+  // Copy constructor
230
+  HDictArray(const HDictArray &tool_array);
231
+
232
+  // Destructor
233
+  virtual ~HDictArray();
234
+
235
+  // Assignment operator
236
+  HDictArray &operator=(const HDictArray &tool_array);
237
+
238
+  // Clears array and all tool instances
239
+  virtual void Clear();
240
+
241
+  // Get array of native tool instances
242
+  const HDict* Tools() const;
243
+
244
+  // Get number of tools
245
+  virtual Hlong Length() const;
246
+
247
+  // Create tool array from tuple of handles
248
+  virtual void SetFromTuple(const HTuple& handles);
249
+
250
+  // Get tuple of handles for tool array
251
+  virtual HTuple ConvertToTuple() const;
252
+
253
+protected:
254
+
255
+// Smart pointer to internal data container
256
+   HDictArrayPtr *mArrayPtr;
257
+};
258
+
259
+}
260
+
261
+#endif

+ 197 - 0
3rdparty/include22/halcon/halconcpp/HDlClassifier.h

@@ -0,0 +1,197 @@
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
+
8
+
9
+#ifndef HCPP_HDLCLASSIFIER
10
+#define HCPP_HDLCLASSIFIER
11
+
12
+namespace HalconCpp
13
+{
14
+
15
+// Represents an instance of a Deep Neural Network.
16
+class LIntExport HDlClassifier : public HHandle
17
+{
18
+
19
+public:
20
+
21
+  // Create an uninitialized instance
22
+  HDlClassifier():HHandle() {}
23
+
24
+  // Copy constructor
25
+  HDlClassifier(const HDlClassifier& source) : HHandle(source) {}
26
+
27
+  // Copy constructor
28
+  HDlClassifier(const HHandle& handle);
29
+
30
+  // Create HDlClassifier from handle, taking ownership
31
+  explicit HDlClassifier(Hlong handle);
32
+
33
+  bool operator==(const HHandle& obj) const
34
+  {
35
+    return HHandleBase::operator==(obj);
36
+  }
37
+
38
+  bool operator!=(const HHandle& obj) const
39
+  {
40
+    return HHandleBase::operator!=(obj);
41
+  }
42
+
43
+protected:
44
+
45
+  // Verify matching semantic type ('dl_classifier')!
46
+  virtual void AssertType(Hphandle handle) const;
47
+
48
+public:
49
+
50
+  // Deep copy of all data represented by this object instance
51
+  HDlClassifier Clone() const;
52
+
53
+
54
+
55
+/*****************************************************************************
56
+ * Operator-based class constructors
57
+ *****************************************************************************/
58
+
59
+  // read_dl_classifier: Read a deep-learning-based classifier from a file.
60
+  explicit HDlClassifier(const HString& FileName);
61
+
62
+  // read_dl_classifier: Read a deep-learning-based classifier from a file.
63
+  explicit HDlClassifier(const char* FileName);
64
+
65
+#ifdef _WIN32
66
+  // read_dl_classifier: Read a deep-learning-based classifier from a file.
67
+  explicit HDlClassifier(const wchar_t* FileName);
68
+#endif
69
+
70
+
71
+
72
+
73
+  /***************************************************************************
74
+   * Operators                                                               *
75
+   ***************************************************************************/
76
+
77
+  // Infer the class affiliations for a set of images using a  deep-learning-based classifier.
78
+  HDlClassifierResult ApplyDlClassifier(const HImage& Images) const;
79
+
80
+  // Clear a deep-learning-based classifier.
81
+  static void ClearDlClassifier(const HDlClassifierArray& DLClassifierHandle);
82
+
83
+  // Clear a deep-learning-based classifier.
84
+  void ClearDlClassifier() const;
85
+
86
+  // Deserialize a deep-learning-based classifier.
87
+  void DeserializeDlClassifier(const HSerializedItem& SerializedItemHandle);
88
+
89
+  // Return the parameters of a deep-learning-based classifier.
90
+  HTuple GetDlClassifierParam(const HTuple& GenParamName) const;
91
+
92
+  // Return the parameters of a deep-learning-based classifier.
93
+  HTuple GetDlClassifierParam(const HString& GenParamName) const;
94
+
95
+  // Return the parameters of a deep-learning-based classifier.
96
+  HTuple GetDlClassifierParam(const char* GenParamName) const;
97
+
98
+#ifdef _WIN32
99
+  // Return the parameters of a deep-learning-based classifier.
100
+  HTuple GetDlClassifierParam(const wchar_t* GenParamName) const;
101
+#endif
102
+
103
+  // Read a deep-learning-based classifier from a file.
104
+  void ReadDlClassifier(const HString& FileName);
105
+
106
+  // Read a deep-learning-based classifier from a file.
107
+  void ReadDlClassifier(const char* FileName);
108
+
109
+#ifdef _WIN32
110
+  // Read a deep-learning-based classifier from a file.
111
+  void ReadDlClassifier(const wchar_t* FileName);
112
+#endif
113
+
114
+  // Serialize a deep-learning-based classifier.
115
+  HSerializedItem SerializeDlClassifier() const;
116
+
117
+  // Set the parameters of a deep-learning-based classifier.
118
+  void SetDlClassifierParam(const HTuple& GenParamName, const HTuple& GenParamValue) const;
119
+
120
+  // Set the parameters of a deep-learning-based classifier.
121
+  void SetDlClassifierParam(const HString& GenParamName, const HString& GenParamValue) const;
122
+
123
+  // Set the parameters of a deep-learning-based classifier.
124
+  void SetDlClassifierParam(const char* GenParamName, const char* GenParamValue) const;
125
+
126
+#ifdef _WIN32
127
+  // Set the parameters of a deep-learning-based classifier.
128
+  void SetDlClassifierParam(const wchar_t* GenParamName, const wchar_t* GenParamValue) const;
129
+#endif
130
+
131
+  // Write a deep-learning-based classifier in a file.
132
+  void WriteDlClassifier(const HString& FileName) const;
133
+
134
+  // Write a deep-learning-based classifier in a file.
135
+  void WriteDlClassifier(const char* FileName) const;
136
+
137
+#ifdef _WIN32
138
+  // Write a deep-learning-based classifier in a file.
139
+  void WriteDlClassifier(const wchar_t* FileName) const;
140
+#endif
141
+
142
+};
143
+
144
+// forward declarations and types for internal array implementation
145
+
146
+template<class T> class HSmartPtr;
147
+template<class T> class HHandleBaseArrayRef;
148
+
149
+typedef HHandleBaseArrayRef<HDlClassifier> HDlClassifierArrayRef;
150
+typedef HSmartPtr< HDlClassifierArrayRef > HDlClassifierArrayPtr;
151
+
152
+
153
+// Represents multiple tool instances
154
+class LIntExport HDlClassifierArray : public HHandleBaseArray
155
+{
156
+
157
+public:
158
+
159
+  // Create empty array
160
+  HDlClassifierArray();
161
+
162
+  // Create array from native array of tool instances
163
+  HDlClassifierArray(HDlClassifier* classes, Hlong length);
164
+
165
+  // Copy constructor
166
+  HDlClassifierArray(const HDlClassifierArray &tool_array);
167
+
168
+  // Destructor
169
+  virtual ~HDlClassifierArray();
170
+
171
+  // Assignment operator
172
+  HDlClassifierArray &operator=(const HDlClassifierArray &tool_array);
173
+
174
+  // Clears array and all tool instances
175
+  virtual void Clear();
176
+
177
+  // Get array of native tool instances
178
+  const HDlClassifier* Tools() const;
179
+
180
+  // Get number of tools
181
+  virtual Hlong Length() const;
182
+
183
+  // Create tool array from tuple of handles
184
+  virtual void SetFromTuple(const HTuple& handles);
185
+
186
+  // Get tuple of handles for tool array
187
+  virtual HTuple ConvertToTuple() const;
188
+
189
+protected:
190
+
191
+// Smart pointer to internal data container
192
+   HDlClassifierArrayPtr *mArrayPtr;
193
+};
194
+
195
+}
196
+
197
+#endif

+ 141 - 0
3rdparty/include22/halcon/halconcpp/HDlClassifierResult.h

@@ -0,0 +1,141 @@
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
+
8
+
9
+#ifndef HCPP_HDLCLASSIFIERRESULT
10
+#define HCPP_HDLCLASSIFIERRESULT
11
+
12
+namespace HalconCpp
13
+{
14
+
15
+// Represents an instance of a Deep Neural Network inference step result.
16
+class LIntExport HDlClassifierResult : public HHandle
17
+{
18
+
19
+public:
20
+
21
+  // Create an uninitialized instance
22
+  HDlClassifierResult():HHandle() {}
23
+
24
+  // Copy constructor
25
+  HDlClassifierResult(const HDlClassifierResult& source) : HHandle(source) {}
26
+
27
+  // Copy constructor
28
+  HDlClassifierResult(const HHandle& handle);
29
+
30
+  // Create HDlClassifierResult from handle, taking ownership
31
+  explicit HDlClassifierResult(Hlong handle);
32
+
33
+  bool operator==(const HHandle& obj) const
34
+  {
35
+    return HHandleBase::operator==(obj);
36
+  }
37
+
38
+  bool operator!=(const HHandle& obj) const
39
+  {
40
+    return HHandleBase::operator!=(obj);
41
+  }
42
+
43
+protected:
44
+
45
+  // Verify matching semantic type ('dl_classifier_result')!
46
+  virtual void AssertType(Hphandle handle) const;
47
+
48
+public:
49
+
50
+
51
+
52
+/*****************************************************************************
53
+ * Operator-based class constructors
54
+ *****************************************************************************/
55
+
56
+  // apply_dl_classifier: Infer the class affiliations for a set of images using a  deep-learning-based classifier.
57
+  explicit HDlClassifierResult(const HImage& Images, const HDlClassifier& DLClassifierHandle);
58
+
59
+
60
+
61
+
62
+  /***************************************************************************
63
+   * Operators                                                               *
64
+   ***************************************************************************/
65
+
66
+  // Clear a handle containing the results of the deep-learning-based classification.
67
+  static void ClearDlClassifierResult(const HDlClassifierResultArray& DLClassifierResultHandle);
68
+
69
+  // Clear a handle containing the results of the deep-learning-based classification.
70
+  void ClearDlClassifierResult() const;
71
+
72
+  // Retrieve classification results inferred by a deep-learning-based  classifier.
73
+  HTuple GetDlClassifierResult(const HTuple& Index, const HTuple& GenResultName) const;
74
+
75
+  // Retrieve classification results inferred by a deep-learning-based  classifier.
76
+  HTuple GetDlClassifierResult(const HString& Index, const HString& GenResultName) const;
77
+
78
+  // Retrieve classification results inferred by a deep-learning-based  classifier.
79
+  HTuple GetDlClassifierResult(const char* Index, const char* GenResultName) const;
80
+
81
+#ifdef _WIN32
82
+  // Retrieve classification results inferred by a deep-learning-based  classifier.
83
+  HTuple GetDlClassifierResult(const wchar_t* Index, const wchar_t* GenResultName) const;
84
+#endif
85
+
86
+};
87
+
88
+// forward declarations and types for internal array implementation
89
+
90
+template<class T> class HSmartPtr;
91
+template<class T> class HHandleBaseArrayRef;
92
+
93
+typedef HHandleBaseArrayRef<HDlClassifierResult> HDlClassifierResultArrayRef;
94
+typedef HSmartPtr< HDlClassifierResultArrayRef > HDlClassifierResultArrayPtr;
95
+
96
+
97
+// Represents multiple tool instances
98
+class LIntExport HDlClassifierResultArray : public HHandleBaseArray
99
+{
100
+
101
+public:
102
+
103
+  // Create empty array
104
+  HDlClassifierResultArray();
105
+
106
+  // Create array from native array of tool instances
107
+  HDlClassifierResultArray(HDlClassifierResult* classes, Hlong length);
108
+
109
+  // Copy constructor
110
+  HDlClassifierResultArray(const HDlClassifierResultArray &tool_array);
111
+
112
+  // Destructor
113
+  virtual ~HDlClassifierResultArray();
114
+
115
+  // Assignment operator
116
+  HDlClassifierResultArray &operator=(const HDlClassifierResultArray &tool_array);
117
+
118
+  // Clears array and all tool instances
119
+  virtual void Clear();
120
+
121
+  // Get array of native tool instances
122
+  const HDlClassifierResult* Tools() const;
123
+
124
+  // Get number of tools
125
+  virtual Hlong Length() const;
126
+
127
+  // Create tool array from tuple of handles
128
+  virtual void SetFromTuple(const HTuple& handles);
129
+
130
+  // Get tuple of handles for tool array
131
+  virtual HTuple ConvertToTuple() const;
132
+
133
+protected:
134
+
135
+// Smart pointer to internal data container
136
+   HDlClassifierResultArrayPtr *mArrayPtr;
137
+};
138
+
139
+}
140
+
141
+#endif

+ 144 - 0
3rdparty/include22/halcon/halconcpp/HDlClassifierTrainResult.h

@@ -0,0 +1,144 @@
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
+
8
+
9
+#ifndef HCPP_HDLCLASSIFIERTRAINRESULT
10
+#define HCPP_HDLCLASSIFIERTRAINRESULT
11
+
12
+namespace HalconCpp
13
+{
14
+
15
+// Represents an instance of a Deep Neural Network training step result.
16
+class LIntExport HDlClassifierTrainResult : public HHandle
17
+{
18
+
19
+public:
20
+
21
+  // Create an uninitialized instance
22
+  HDlClassifierTrainResult():HHandle() {}
23
+
24
+  // Copy constructor
25
+  HDlClassifierTrainResult(const HDlClassifierTrainResult& source) : HHandle(source) {}
26
+
27
+  // Copy constructor
28
+  HDlClassifierTrainResult(const HHandle& handle);
29
+
30
+  // Create HDlClassifierTrainResult from handle, taking ownership
31
+  explicit HDlClassifierTrainResult(Hlong handle);
32
+
33
+  bool operator==(const HHandle& obj) const
34
+  {
35
+    return HHandleBase::operator==(obj);
36
+  }
37
+
38
+  bool operator!=(const HHandle& obj) const
39
+  {
40
+    return HHandleBase::operator!=(obj);
41
+  }
42
+
43
+protected:
44
+
45
+  // Verify matching semantic type ('dl_classifier_train_result')!
46
+  virtual void AssertType(Hphandle handle) const;
47
+
48
+public:
49
+
50
+
51
+
52
+/*****************************************************************************
53
+ * Operator-based class constructors
54
+ *****************************************************************************/
55
+
56
+  // train_dl_classifier_batch: Perform a training step of a deep-learning-based classifier on a batch of  images.
57
+  explicit HDlClassifierTrainResult(const HImage& BatchImages, const HDlClassifier& DLClassifierHandle, const HTuple& BatchLabels);
58
+
59
+
60
+
61
+
62
+  /***************************************************************************
63
+   * Operators                                                               *
64
+   ***************************************************************************/
65
+
66
+  // Clear the handle of a deep-learning-based classifier training result.
67
+  static void ClearDlClassifierTrainResult(const HDlClassifierTrainResultArray& DLClassifierTrainResultHandle);
68
+
69
+  // Clear the handle of a deep-learning-based classifier training result.
70
+  void ClearDlClassifierTrainResult() const;
71
+
72
+  // Return the results for the single training step of a deep-learning-based  classifier.
73
+  HTuple GetDlClassifierTrainResult(const HTuple& GenParamName) const;
74
+
75
+  // Return the results for the single training step of a deep-learning-based  classifier.
76
+  HTuple GetDlClassifierTrainResult(const HString& GenParamName) const;
77
+
78
+  // Return the results for the single training step of a deep-learning-based  classifier.
79
+  HTuple GetDlClassifierTrainResult(const char* GenParamName) const;
80
+
81
+#ifdef _WIN32
82
+  // Return the results for the single training step of a deep-learning-based  classifier.
83
+  HTuple GetDlClassifierTrainResult(const wchar_t* GenParamName) const;
84
+#endif
85
+
86
+  // Perform a training step of a deep-learning-based classifier on a batch of  images.
87
+  void TrainDlClassifierBatch(const HImage& BatchImages, const HDlClassifier& DLClassifierHandle, const HTuple& BatchLabels);
88
+
89
+};
90
+
91
+// forward declarations and types for internal array implementation
92
+
93
+template<class T> class HSmartPtr;
94
+template<class T> class HHandleBaseArrayRef;
95
+
96
+typedef HHandleBaseArrayRef<HDlClassifierTrainResult> HDlClassifierTrainResultArrayRef;
97
+typedef HSmartPtr< HDlClassifierTrainResultArrayRef > HDlClassifierTrainResultArrayPtr;
98
+
99
+
100
+// Represents multiple tool instances
101
+class LIntExport HDlClassifierTrainResultArray : public HHandleBaseArray
102
+{
103
+
104
+public:
105
+
106
+  // Create empty array
107
+  HDlClassifierTrainResultArray();
108
+
109
+  // Create array from native array of tool instances
110
+  HDlClassifierTrainResultArray(HDlClassifierTrainResult* classes, Hlong length);
111
+
112
+  // Copy constructor
113
+  HDlClassifierTrainResultArray(const HDlClassifierTrainResultArray &tool_array);
114
+
115
+  // Destructor
116
+  virtual ~HDlClassifierTrainResultArray();
117
+
118
+  // Assignment operator
119
+  HDlClassifierTrainResultArray &operator=(const HDlClassifierTrainResultArray &tool_array);
120
+
121
+  // Clears array and all tool instances
122
+  virtual void Clear();
123
+
124
+  // Get array of native tool instances
125
+  const HDlClassifierTrainResult* Tools() const;
126
+
127
+  // Get number of tools
128
+  virtual Hlong Length() const;
129
+
130
+  // Create tool array from tuple of handles
131
+  virtual void SetFromTuple(const HTuple& handles);
132
+
133
+  // Get tuple of handles for tool array
134
+  virtual HTuple ConvertToTuple() const;
135
+
136
+protected:
137
+
138
+// Smart pointer to internal data container
139
+   HDlClassifierTrainResultArrayPtr *mArrayPtr;
140
+};
141
+
142
+}
143
+
144
+#endif

+ 137 - 0
3rdparty/include22/halcon/halconcpp/HDlDevice.h

@@ -0,0 +1,137 @@
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
+
8
+
9
+#ifndef HCPP_HDLDEVICE
10
+#define HCPP_HDLDEVICE
11
+
12
+namespace HalconCpp
13
+{
14
+
15
+// Represents an instance of a Deep Learning capable compute device.
16
+class LIntExport HDlDevice : public HHandle
17
+{
18
+
19
+public:
20
+
21
+  // Create an uninitialized instance
22
+  HDlDevice():HHandle() {}
23
+
24
+  // Copy constructor
25
+  HDlDevice(const HDlDevice& source) : HHandle(source) {}
26
+
27
+  // Copy constructor
28
+  HDlDevice(const HHandle& handle);
29
+
30
+  // Create HDlDevice from handle, taking ownership
31
+  explicit HDlDevice(Hlong handle);
32
+
33
+  bool operator==(const HHandle& obj) const
34
+  {
35
+    return HHandleBase::operator==(obj);
36
+  }
37
+
38
+  bool operator!=(const HHandle& obj) const
39
+  {
40
+    return HHandleBase::operator!=(obj);
41
+  }
42
+
43
+protected:
44
+
45
+  // Verify matching semantic type ('dl_device')!
46
+  virtual void AssertType(Hphandle handle) const;
47
+
48
+public:
49
+
50
+
51
+
52
+
53
+  /***************************************************************************
54
+   * Operators                                                               *
55
+   ***************************************************************************/
56
+
57
+  // Return the parameters of a deep-learning-capable hardware device.
58
+  HTuple GetDlDeviceParam(const HString& GenParamName) const;
59
+
60
+  // Return the parameters of a deep-learning-capable hardware device.
61
+  HTuple GetDlDeviceParam(const char* GenParamName) const;
62
+
63
+#ifdef _WIN32
64
+  // Return the parameters of a deep-learning-capable hardware device.
65
+  HTuple GetDlDeviceParam(const wchar_t* GenParamName) const;
66
+#endif
67
+
68
+  // Get list of deep-learning-capable hardware devices.
69
+  static HDlDeviceArray QueryAvailableDlDevices(const HTuple& GenParamName, const HTuple& GenParamValue);
70
+
71
+  // Get list of deep-learning-capable hardware devices.
72
+  void QueryAvailableDlDevices(const HString& GenParamName, const HString& GenParamValue);
73
+
74
+  // Get list of deep-learning-capable hardware devices.
75
+  void QueryAvailableDlDevices(const char* GenParamName, const char* GenParamValue);
76
+
77
+#ifdef _WIN32
78
+  // Get list of deep-learning-capable hardware devices.
79
+  void QueryAvailableDlDevices(const wchar_t* GenParamName, const wchar_t* GenParamValue);
80
+#endif
81
+
82
+};
83
+
84
+// forward declarations and types for internal array implementation
85
+
86
+template<class T> class HSmartPtr;
87
+template<class T> class HHandleBaseArrayRef;
88
+
89
+typedef HHandleBaseArrayRef<HDlDevice> HDlDeviceArrayRef;
90
+typedef HSmartPtr< HDlDeviceArrayRef > HDlDeviceArrayPtr;
91
+
92
+
93
+// Represents multiple tool instances
94
+class LIntExport HDlDeviceArray : public HHandleBaseArray
95
+{
96
+
97
+public:
98
+
99
+  // Create empty array
100
+  HDlDeviceArray();
101
+
102
+  // Create array from native array of tool instances
103
+  HDlDeviceArray(HDlDevice* classes, Hlong length);
104
+
105
+  // Copy constructor
106
+  HDlDeviceArray(const HDlDeviceArray &tool_array);
107
+
108
+  // Destructor
109
+  virtual ~HDlDeviceArray();
110
+
111
+  // Assignment operator
112
+  HDlDeviceArray &operator=(const HDlDeviceArray &tool_array);
113
+
114
+  // Clears array and all tool instances
115
+  virtual void Clear();
116
+
117
+  // Get array of native tool instances
118
+  const HDlDevice* Tools() const;
119
+
120
+  // Get number of tools
121
+  virtual Hlong Length() const;
122
+
123
+  // Create tool array from tuple of handles
124
+  virtual void SetFromTuple(const HTuple& handles);
125
+
126
+  // Get tuple of handles for tool array
127
+  virtual HTuple ConvertToTuple() const;
128
+
129
+protected:
130
+
131
+// Smart pointer to internal data container
132
+   HDlDeviceArrayPtr *mArrayPtr;
133
+};
134
+
135
+}
136
+
137
+#endif

+ 250 - 0
3rdparty/include22/halcon/halconcpp/HDlModel.h

@@ -0,0 +1,250 @@
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
+
8
+
9
+#ifndef HCPP_HDLMODEL
10
+#define HCPP_HDLMODEL
11
+
12
+namespace HalconCpp
13
+{
14
+
15
+// Represents an instance of a Deep Neural Network.
16
+class LIntExport HDlModel : public HHandle
17
+{
18
+
19
+public:
20
+
21
+  // Create an uninitialized instance
22
+  HDlModel():HHandle() {}
23
+
24
+  // Copy constructor
25
+  HDlModel(const HDlModel& source) : HHandle(source) {}
26
+
27
+  // Copy constructor
28
+  HDlModel(const HHandle& handle);
29
+
30
+  // Create HDlModel from handle, taking ownership
31
+  explicit HDlModel(Hlong handle);
32
+
33
+  bool operator==(const HHandle& obj) const
34
+  {
35
+    return HHandleBase::operator==(obj);
36
+  }
37
+
38
+  bool operator!=(const HHandle& obj) const
39
+  {
40
+    return HHandleBase::operator!=(obj);
41
+  }
42
+
43
+protected:
44
+
45
+  // Verify matching semantic type ('dl_model')!
46
+  virtual void AssertType(Hphandle handle) const;
47
+
48
+public:
49
+
50
+  // Deep copy of all data represented by this object instance
51
+  HDlModel Clone() const;
52
+
53
+
54
+
55
+/*****************************************************************************
56
+ * Operator-based class constructors
57
+ *****************************************************************************/
58
+
59
+  // create_dl_model_detection: Create a deep learning network for object detection.
60
+  explicit HDlModel(const HString& Backbone, Hlong NumClasses, const HDict& DLModelDetectionParam);
61
+
62
+  // create_dl_model_detection: Create a deep learning network for object detection.
63
+  explicit HDlModel(const char* Backbone, Hlong NumClasses, const HDict& DLModelDetectionParam);
64
+
65
+#ifdef _WIN32
66
+  // create_dl_model_detection: Create a deep learning network for object detection.
67
+  explicit HDlModel(const wchar_t* Backbone, Hlong NumClasses, const HDict& DLModelDetectionParam);
68
+#endif
69
+
70
+  // read_dl_model: Read a deep learning model from a file.
71
+  explicit HDlModel(const HString& FileName);
72
+
73
+  // read_dl_model: Read a deep learning model from a file.
74
+  explicit HDlModel(const char* FileName);
75
+
76
+#ifdef _WIN32
77
+  // read_dl_model: Read a deep learning model from a file.
78
+  explicit HDlModel(const wchar_t* FileName);
79
+#endif
80
+
81
+
82
+
83
+
84
+  /***************************************************************************
85
+   * Operators                                                               *
86
+   ***************************************************************************/
87
+
88
+  // Apply a deep-learning-based network on a set of images for inference.
89
+  HDictArray ApplyDlModel(const HDictArray& DLSampleBatch, const HTuple& Outputs) const;
90
+
91
+  // Clear a deep learning model.
92
+  static void ClearDlModel(const HDlModelArray& DLModelHandle);
93
+
94
+  // Clear a deep learning model.
95
+  void ClearDlModel() const;
96
+
97
+  // Create a deep learning network for object detection.
98
+  void CreateDlModelDetection(const HString& Backbone, Hlong NumClasses, const HDict& DLModelDetectionParam);
99
+
100
+  // Create a deep learning network for object detection.
101
+  void CreateDlModelDetection(const char* Backbone, Hlong NumClasses, const HDict& DLModelDetectionParam);
102
+
103
+#ifdef _WIN32
104
+  // Create a deep learning network for object detection.
105
+  void CreateDlModelDetection(const wchar_t* Backbone, Hlong NumClasses, const HDict& DLModelDetectionParam);
106
+#endif
107
+
108
+  // Deserialize a deep learning model.
109
+  void DeserializeDlModel(const HSerializedItem& SerializedItemHandle);
110
+
111
+  // Return the parameters of a deep learning model.
112
+  HTuple GetDlModelParam(const HString& GenParamName) const;
113
+
114
+  // Return the parameters of a deep learning model.
115
+  HTuple GetDlModelParam(const char* GenParamName) const;
116
+
117
+#ifdef _WIN32
118
+  // Return the parameters of a deep learning model.
119
+  HTuple GetDlModelParam(const wchar_t* GenParamName) const;
120
+#endif
121
+
122
+  // Read a deep learning model from a file.
123
+  void ReadDlModel(const HString& FileName);
124
+
125
+  // Read a deep learning model from a file.
126
+  void ReadDlModel(const char* FileName);
127
+
128
+#ifdef _WIN32
129
+  // Read a deep learning model from a file.
130
+  void ReadDlModel(const wchar_t* FileName);
131
+#endif
132
+
133
+  // Serialize a deep learning model.
134
+  HSerializedItem SerializeDlModel() const;
135
+
136
+  // Set the parameters of a deep learning model.
137
+  void SetDlModelParam(const HString& GenParamName, const HTuple& GenParamValue) const;
138
+
139
+  // Set the parameters of a deep learning model.
140
+  void SetDlModelParam(const HString& GenParamName, double GenParamValue) const;
141
+
142
+  // Set the parameters of a deep learning model.
143
+  void SetDlModelParam(const char* GenParamName, double GenParamValue) const;
144
+
145
+#ifdef _WIN32
146
+  // Set the parameters of a deep learning model.
147
+  void SetDlModelParam(const wchar_t* GenParamName, double GenParamValue) const;
148
+#endif
149
+
150
+  // Train a deep learning model.
151
+  HDict TrainDlModelBatch(const HDictArray& DLSampleBatch) const;
152
+
153
+  // Write a deep learning model in a file.
154
+  void WriteDlModel(const HString& FileName) const;
155
+
156
+  // Write a deep learning model in a file.
157
+  void WriteDlModel(const char* FileName) const;
158
+
159
+#ifdef _WIN32
160
+  // Write a deep learning model in a file.
161
+  void WriteDlModel(const wchar_t* FileName) const;
162
+#endif
163
+
164
+  // Infer the sample and generate a heatmap.
165
+  HDictArray GenDlModelHeatmap(const HDictArray& DLSample, const HString& HeatmapMethod, const HTuple& TargetClasses, const HDict& GenParam) const;
166
+
167
+  // Infer the sample and generate a heatmap.
168
+  HDictArray GenDlModelHeatmap(const HDictArray& DLSample, const char* HeatmapMethod, const HTuple& TargetClasses, const HDict& GenParam) const;
169
+
170
+#ifdef _WIN32
171
+  // Infer the sample and generate a heatmap.
172
+  HDictArray GenDlModelHeatmap(const HDictArray& DLSample, const wchar_t* HeatmapMethod, const HTuple& TargetClasses, const HDict& GenParam) const;
173
+#endif
174
+
175
+  // Train a deep learning model for anomaly detection.
176
+  HDict TrainDlModelAnomalyDataset(const HDictArray& DLSamples, const HDict& DLTrainParam) const;
177
+
178
+  // Calculate scores to prune a deep learning model.
179
+  void AddDlPruningBatch(const HDlPrune& DLPruningHandle, const HDictArray& DLSampleBatch) const;
180
+
181
+  // Create a pruning data handle.
182
+  HDlPrune CreateDlPruning(const HString& Mode, const HDict& GenParam) const;
183
+
184
+  // Create a pruning data handle.
185
+  HDlPrune CreateDlPruning(const char* Mode, const HDict& GenParam) const;
186
+
187
+#ifdef _WIN32
188
+  // Create a pruning data handle.
189
+  HDlPrune CreateDlPruning(const wchar_t* Mode, const HDict& GenParam) const;
190
+#endif
191
+
192
+  // Prune a deep learning model.
193
+  HDlModel GenDlPrunedModel(const HDlPrune& DLPruningHandle) const;
194
+
195
+};
196
+
197
+// forward declarations and types for internal array implementation
198
+
199
+template<class T> class HSmartPtr;
200
+template<class T> class HHandleBaseArrayRef;
201
+
202
+typedef HHandleBaseArrayRef<HDlModel> HDlModelArrayRef;
203
+typedef HSmartPtr< HDlModelArrayRef > HDlModelArrayPtr;
204
+
205
+
206
+// Represents multiple tool instances
207
+class LIntExport HDlModelArray : public HHandleBaseArray
208
+{
209
+
210
+public:
211
+
212
+  // Create empty array
213
+  HDlModelArray();
214
+
215
+  // Create array from native array of tool instances
216
+  HDlModelArray(HDlModel* classes, Hlong length);
217
+
218
+  // Copy constructor
219
+  HDlModelArray(const HDlModelArray &tool_array);
220
+
221
+  // Destructor
222
+  virtual ~HDlModelArray();
223
+
224
+  // Assignment operator
225
+  HDlModelArray &operator=(const HDlModelArray &tool_array);
226
+
227
+  // Clears array and all tool instances
228
+  virtual void Clear();
229
+
230
+  // Get array of native tool instances
231
+  const HDlModel* Tools() const;
232
+
233
+  // Get number of tools
234
+  virtual Hlong Length() const;
235
+
236
+  // Create tool array from tuple of handles
237
+  virtual void SetFromTuple(const HTuple& handles);
238
+
239
+  // Get tuple of handles for tool array
240
+  virtual HTuple ConvertToTuple() const;
241
+
242
+protected:
243
+
244
+// Smart pointer to internal data container
245
+   HDlModelArrayPtr *mArrayPtr;
246
+};
247
+
248
+}
249
+
250
+#endif

+ 215 - 0
3rdparty/include22/halcon/halconcpp/HDlModelOcr.h

@@ -0,0 +1,215 @@
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
+
8
+
9
+#ifndef HCPP_HDLMODELOCR
10
+#define HCPP_HDLMODELOCR
11
+
12
+namespace HalconCpp
13
+{
14
+
15
+// Represents an instance of a Deep Neural Network based OCR model.
16
+class LIntExport HDlModelOcr : public HHandle
17
+{
18
+
19
+public:
20
+
21
+  // Create an uninitialized instance
22
+  HDlModelOcr():HHandle() {}
23
+
24
+  // Copy constructor
25
+  HDlModelOcr(const HDlModelOcr& source) : HHandle(source) {}
26
+
27
+  // Copy constructor
28
+  HDlModelOcr(const HHandle& handle);
29
+
30
+  // Create HDlModelOcr from handle, taking ownership
31
+  explicit HDlModelOcr(Hlong handle);
32
+
33
+  bool operator==(const HHandle& obj) const
34
+  {
35
+    return HHandleBase::operator==(obj);
36
+  }
37
+
38
+  bool operator!=(const HHandle& obj) const
39
+  {
40
+    return HHandleBase::operator!=(obj);
41
+  }
42
+
43
+protected:
44
+
45
+  // Verify matching semantic type ('deep_ocr')!
46
+  virtual void AssertType(Hphandle handle) const;
47
+
48
+public:
49
+
50
+
51
+
52
+/*****************************************************************************
53
+ * Operator-based class constructors
54
+ *****************************************************************************/
55
+
56
+  // create_deep_ocr: Create a Deep OCR model.
57
+  explicit HDlModelOcr(const HTuple& GenParamName, const HTuple& GenParamValue);
58
+
59
+  // create_deep_ocr: Create a Deep OCR model.
60
+  explicit HDlModelOcr(const HString& GenParamName, const HString& GenParamValue);
61
+
62
+  // create_deep_ocr: Create a Deep OCR model.
63
+  explicit HDlModelOcr(const char* GenParamName, const char* GenParamValue);
64
+
65
+#ifdef _WIN32
66
+  // create_deep_ocr: Create a Deep OCR model.
67
+  explicit HDlModelOcr(const wchar_t* GenParamName, const wchar_t* GenParamValue);
68
+#endif
69
+
70
+  // read_deep_ocr: Read a Deep OCR model from a file.
71
+  explicit HDlModelOcr(const HString& FileName);
72
+
73
+  // read_deep_ocr: Read a Deep OCR model from a file.
74
+  explicit HDlModelOcr(const char* FileName);
75
+
76
+#ifdef _WIN32
77
+  // read_deep_ocr: Read a Deep OCR model from a file.
78
+  explicit HDlModelOcr(const wchar_t* FileName);
79
+#endif
80
+
81
+
82
+
83
+
84
+  /***************************************************************************
85
+   * Operators                                                               *
86
+   ***************************************************************************/
87
+
88
+  // Apply a Deep OCR model on a set of images for inference.
89
+  HDictArray ApplyDeepOcr(const HImage& Image, const HString& Mode) const;
90
+
91
+  // Apply a Deep OCR model on a set of images for inference.
92
+  HDictArray ApplyDeepOcr(const HImage& Image, const char* Mode) const;
93
+
94
+#ifdef _WIN32
95
+  // Apply a Deep OCR model on a set of images for inference.
96
+  HDictArray ApplyDeepOcr(const HImage& Image, const wchar_t* Mode) const;
97
+#endif
98
+
99
+  // Create a Deep OCR model.
100
+  void CreateDeepOcr(const HTuple& GenParamName, const HTuple& GenParamValue);
101
+
102
+  // Create a Deep OCR model.
103
+  void CreateDeepOcr(const HString& GenParamName, const HString& GenParamValue);
104
+
105
+  // Create a Deep OCR model.
106
+  void CreateDeepOcr(const char* GenParamName, const char* GenParamValue);
107
+
108
+#ifdef _WIN32
109
+  // Create a Deep OCR model.
110
+  void CreateDeepOcr(const wchar_t* GenParamName, const wchar_t* GenParamValue);
111
+#endif
112
+
113
+  // Return the parameters of a Deep OCR model.
114
+  HTuple GetDeepOcrParam(const HString& GenParamName) const;
115
+
116
+  // Return the parameters of a Deep OCR model.
117
+  HTuple GetDeepOcrParam(const char* GenParamName) const;
118
+
119
+#ifdef _WIN32
120
+  // Return the parameters of a Deep OCR model.
121
+  HTuple GetDeepOcrParam(const wchar_t* GenParamName) const;
122
+#endif
123
+
124
+  // Read a Deep OCR model from a file.
125
+  void ReadDeepOcr(const HString& FileName);
126
+
127
+  // Read a Deep OCR model from a file.
128
+  void ReadDeepOcr(const char* FileName);
129
+
130
+#ifdef _WIN32
131
+  // Read a Deep OCR model from a file.
132
+  void ReadDeepOcr(const wchar_t* FileName);
133
+#endif
134
+
135
+  // Set the parameters of a Deep OCR model.
136
+  void SetDeepOcrParam(const HString& GenParamName, const HTuple& GenParamValue) const;
137
+
138
+  // Set the parameters of a Deep OCR model.
139
+  void SetDeepOcrParam(const HString& GenParamName, double GenParamValue) const;
140
+
141
+  // Set the parameters of a Deep OCR model.
142
+  void SetDeepOcrParam(const char* GenParamName, double GenParamValue) const;
143
+
144
+#ifdef _WIN32
145
+  // Set the parameters of a Deep OCR model.
146
+  void SetDeepOcrParam(const wchar_t* GenParamName, double GenParamValue) const;
147
+#endif
148
+
149
+  // Write a Deep OCR model in a file.
150
+  void WriteDeepOcr(const HString& FileName) const;
151
+
152
+  // Write a Deep OCR model in a file.
153
+  void WriteDeepOcr(const char* FileName) const;
154
+
155
+#ifdef _WIN32
156
+  // Write a Deep OCR model in a file.
157
+  void WriteDeepOcr(const wchar_t* FileName) const;
158
+#endif
159
+
160
+};
161
+
162
+// forward declarations and types for internal array implementation
163
+
164
+template<class T> class HSmartPtr;
165
+template<class T> class HHandleBaseArrayRef;
166
+
167
+typedef HHandleBaseArrayRef<HDlModelOcr> HDlModelOcrArrayRef;
168
+typedef HSmartPtr< HDlModelOcrArrayRef > HDlModelOcrArrayPtr;
169
+
170
+
171
+// Represents multiple tool instances
172
+class LIntExport HDlModelOcrArray : public HHandleBaseArray
173
+{
174
+
175
+public:
176
+
177
+  // Create empty array
178
+  HDlModelOcrArray();
179
+
180
+  // Create array from native array of tool instances
181
+  HDlModelOcrArray(HDlModelOcr* classes, Hlong length);
182
+
183
+  // Copy constructor
184
+  HDlModelOcrArray(const HDlModelOcrArray &tool_array);
185
+
186
+  // Destructor
187
+  virtual ~HDlModelOcrArray();
188
+
189
+  // Assignment operator
190
+  HDlModelOcrArray &operator=(const HDlModelOcrArray &tool_array);
191
+
192
+  // Clears array and all tool instances
193
+  virtual void Clear();
194
+
195
+  // Get array of native tool instances
196
+  const HDlModelOcr* Tools() const;
197
+
198
+  // Get number of tools
199
+  virtual Hlong Length() const;
200
+
201
+  // Create tool array from tuple of handles
202
+  virtual void SetFromTuple(const HTuple& handles);
203
+
204
+  // Get tuple of handles for tool array
205
+  virtual HTuple ConvertToTuple() const;
206
+
207
+protected:
208
+
209
+// Smart pointer to internal data container
210
+   HDlModelOcrArrayPtr *mArrayPtr;
211
+};
212
+
213
+}
214
+
215
+#endif

+ 168 - 0
3rdparty/include22/halcon/halconcpp/HDlPrune.h

@@ -0,0 +1,168 @@
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
+
8
+
9
+#ifndef HCPP_HDLPRUNE
10
+#define HCPP_HDLPRUNE
11
+
12
+namespace HalconCpp
13
+{
14
+
15
+// Represents an instance of the parameter information for pruning a Deep Neural Network model.
16
+class LIntExport HDlPrune : public HHandle
17
+{
18
+
19
+public:
20
+
21
+  // Create an uninitialized instance
22
+  HDlPrune():HHandle() {}
23
+
24
+  // Copy constructor
25
+  HDlPrune(const HDlPrune& source) : HHandle(source) {}
26
+
27
+  // Copy constructor
28
+  HDlPrune(const HHandle& handle);
29
+
30
+  // Create HDlPrune from handle, taking ownership
31
+  explicit HDlPrune(Hlong handle);
32
+
33
+  bool operator==(const HHandle& obj) const
34
+  {
35
+    return HHandleBase::operator==(obj);
36
+  }
37
+
38
+  bool operator!=(const HHandle& obj) const
39
+  {
40
+    return HHandleBase::operator!=(obj);
41
+  }
42
+
43
+protected:
44
+
45
+  // Verify matching semantic type ('dl_pruning')!
46
+  virtual void AssertType(Hphandle handle) const;
47
+
48
+public:
49
+
50
+
51
+
52
+/*****************************************************************************
53
+ * Operator-based class constructors
54
+ *****************************************************************************/
55
+
56
+  // create_dl_pruning: Create a pruning data handle.
57
+  explicit HDlPrune(const HDlModel& DLModelHandle, const HString& Mode, const HDict& GenParam);
58
+
59
+  // create_dl_pruning: Create a pruning data handle.
60
+  explicit HDlPrune(const HDlModel& DLModelHandle, const char* Mode, const HDict& GenParam);
61
+
62
+#ifdef _WIN32
63
+  // create_dl_pruning: Create a pruning data handle.
64
+  explicit HDlPrune(const HDlModel& DLModelHandle, const wchar_t* Mode, const HDict& GenParam);
65
+#endif
66
+
67
+
68
+
69
+
70
+  /***************************************************************************
71
+   * Operators                                                               *
72
+   ***************************************************************************/
73
+
74
+  // Calculate scores to prune a deep learning model.
75
+  void AddDlPruningBatch(const HDlModel& DLModelHandleToPrune, const HDictArray& DLSampleBatch) const;
76
+
77
+  // Create a pruning data handle.
78
+  void CreateDlPruning(const HDlModel& DLModelHandle, const HString& Mode, const HDict& GenParam);
79
+
80
+  // Create a pruning data handle.
81
+  void CreateDlPruning(const HDlModel& DLModelHandle, const char* Mode, const HDict& GenParam);
82
+
83
+#ifdef _WIN32
84
+  // Create a pruning data handle.
85
+  void CreateDlPruning(const HDlModel& DLModelHandle, const wchar_t* Mode, const HDict& GenParam);
86
+#endif
87
+
88
+  // Get information from a pruning data handle.
89
+  HTuple GetDlPruningParam(const HString& GenParamName) const;
90
+
91
+  // Get information from a pruning data handle.
92
+  HTuple GetDlPruningParam(const char* GenParamName) const;
93
+
94
+#ifdef _WIN32
95
+  // Get information from a pruning data handle.
96
+  HTuple GetDlPruningParam(const wchar_t* GenParamName) const;
97
+#endif
98
+
99
+  // Set parameter in a pruning data handle.
100
+  void SetDlPruningParam(const HString& GenParamName, const HTuple& GenParamValue) const;
101
+
102
+  // Set parameter in a pruning data handle.
103
+  void SetDlPruningParam(const HString& GenParamName, double GenParamValue) const;
104
+
105
+  // Set parameter in a pruning data handle.
106
+  void SetDlPruningParam(const char* GenParamName, double GenParamValue) const;
107
+
108
+#ifdef _WIN32
109
+  // Set parameter in a pruning data handle.
110
+  void SetDlPruningParam(const wchar_t* GenParamName, double GenParamValue) const;
111
+#endif
112
+
113
+};
114
+
115
+// forward declarations and types for internal array implementation
116
+
117
+template<class T> class HSmartPtr;
118
+template<class T> class HHandleBaseArrayRef;
119
+
120
+typedef HHandleBaseArrayRef<HDlPrune> HDlPruneArrayRef;
121
+typedef HSmartPtr< HDlPruneArrayRef > HDlPruneArrayPtr;
122
+
123
+
124
+// Represents multiple tool instances
125
+class LIntExport HDlPruneArray : public HHandleBaseArray
126
+{
127
+
128
+public:
129
+
130
+  // Create empty array
131
+  HDlPruneArray();
132
+
133
+  // Create array from native array of tool instances
134
+  HDlPruneArray(HDlPrune* classes, Hlong length);
135
+
136
+  // Copy constructor
137
+  HDlPruneArray(const HDlPruneArray &tool_array);
138
+
139
+  // Destructor
140
+  virtual ~HDlPruneArray();
141
+
142
+  // Assignment operator
143
+  HDlPruneArray &operator=(const HDlPruneArray &tool_array);
144
+
145
+  // Clears array and all tool instances
146
+  virtual void Clear();
147
+
148
+  // Get array of native tool instances
149
+  const HDlPrune* Tools() const;
150
+
151
+  // Get number of tools
152
+  virtual Hlong Length() const;
153
+
154
+  // Create tool array from tuple of handles
155
+  virtual void SetFromTuple(const HTuple& handles);
156
+
157
+  // Get tuple of handles for tool array
158
+  virtual HTuple ConvertToTuple() const;
159
+
160
+protected:
161
+
162
+// Smart pointer to internal data container
163
+   HDlPruneArrayPtr *mArrayPtr;
164
+};
165
+
166
+}
167
+
168
+#endif

+ 243 - 0
3rdparty/include22/halcon/halconcpp/HDrawingObject.h

@@ -0,0 +1,243 @@
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
+
8
+
9
+#ifndef HCPP_HDRAWINGOBJECT
10
+#define HCPP_HDRAWINGOBJECT
11
+
12
+namespace HalconCpp
13
+{
14
+
15
+// Represents an instance of a drawing object.
16
+class LIntExport HDrawingObject : public HHandle
17
+{
18
+
19
+public:
20
+
21
+  // Create an uninitialized instance
22
+  HDrawingObject():HHandle() {}
23
+
24
+  // Copy constructor
25
+  HDrawingObject(const HDrawingObject& source) : HHandle(source) {}
26
+
27
+  // Copy constructor
28
+  HDrawingObject(const HHandle& handle);
29
+
30
+  // Create HDrawingObject from handle, taking ownership
31
+  explicit HDrawingObject(Hlong handle);
32
+
33
+  bool operator==(const HHandle& obj) const
34
+  {
35
+    return HHandleBase::operator==(obj);
36
+  }
37
+
38
+  bool operator!=(const HHandle& obj) const
39
+  {
40
+    return HHandleBase::operator!=(obj);
41
+  }
42
+
43
+protected:
44
+
45
+  // Verify matching semantic type ('drawing_object')!
46
+  virtual void AssertType(Hphandle handle) const;
47
+
48
+public:
49
+
50
+
51
+
52
+/*****************************************************************************
53
+ * Operator-based class constructors
54
+ *****************************************************************************/
55
+
56
+  // create_drawing_object_circle: Create a circle which can be modified interactively.
57
+  explicit HDrawingObject(double Row, double Column, double Radius);
58
+
59
+  // create_drawing_object_rectangle2: Create a rectangle of any orientation which can be modified interactively.
60
+  explicit HDrawingObject(double Row, double Column, double Phi, double Length1, double Length2);
61
+
62
+  // create_drawing_object_rectangle1: Create a rectangle parallel to the coordinate axis which can be modified interactively.
63
+  explicit HDrawingObject(double Row1, double Column1, double Row2, double Column2);
64
+
65
+
66
+
67
+
68
+  /***************************************************************************
69
+   * Operators                                                               *
70
+   ***************************************************************************/
71
+
72
+  // Add a callback function to a drawing object.
73
+  void SetDrawingObjectCallback(const HTuple& DrawObjectEvent, const HTuple& CallbackFunction) const;
74
+
75
+  // Add a callback function to a drawing object.
76
+  void SetDrawingObjectCallback(const HString& DrawObjectEvent, void* CallbackFunction) const;
77
+
78
+  // Add a callback function to a drawing object.
79
+  void SetDrawingObjectCallback(const char* DrawObjectEvent, void* CallbackFunction) const;
80
+
81
+#ifdef _WIN32
82
+  // Add a callback function to a drawing object.
83
+  void SetDrawingObjectCallback(const wchar_t* DrawObjectEvent, void* CallbackFunction) const;
84
+#endif
85
+
86
+  // Detach the background image from a HALCON window.
87
+  static void DetachBackgroundFromWindow(const HWindow& WindowHandle);
88
+
89
+  // Attach a background image to a HALCON window.
90
+  static void AttachBackgroundToWindow(const HImage& Image, const HWindow& WindowHandle);
91
+
92
+  // Create a text object which can be moved interactively.
93
+  void CreateDrawingObjectText(Hlong Row, Hlong Column, const HString& String);
94
+
95
+  // Create a text object which can be moved interactively.
96
+  void CreateDrawingObjectText(Hlong Row, Hlong Column, const char* String);
97
+
98
+#ifdef _WIN32
99
+  // Create a text object which can be moved interactively.
100
+  void CreateDrawingObjectText(Hlong Row, Hlong Column, const wchar_t* String);
101
+#endif
102
+
103
+  // Return the iconic object of a drawing object.
104
+  HObject GetDrawingObjectIconic() const;
105
+
106
+  // Delete drawing object.
107
+  void ClearDrawingObject() const;
108
+
109
+  // Set the parameters of a drawing object.
110
+  void SetDrawingObjectParams(const HTuple& GenParamName, const HTuple& GenParamValue) const;
111
+
112
+  // Set the parameters of a drawing object.
113
+  void SetDrawingObjectParams(const HString& GenParamName, double GenParamValue) const;
114
+
115
+  // Set the parameters of a drawing object.
116
+  void SetDrawingObjectParams(const char* GenParamName, double GenParamValue) const;
117
+
118
+#ifdef _WIN32
119
+  // Set the parameters of a drawing object.
120
+  void SetDrawingObjectParams(const wchar_t* GenParamName, double GenParamValue) const;
121
+#endif
122
+
123
+  // Get the parameters of a drawing object.
124
+  HTuple GetDrawingObjectParams(const HTuple& GenParamName) const;
125
+
126
+  // Get the parameters of a drawing object.
127
+  HTuple GetDrawingObjectParams(const HString& GenParamName) const;
128
+
129
+  // Get the parameters of a drawing object.
130
+  HTuple GetDrawingObjectParams(const char* GenParamName) const;
131
+
132
+#ifdef _WIN32
133
+  // Get the parameters of a drawing object.
134
+  HTuple GetDrawingObjectParams(const wchar_t* GenParamName) const;
135
+#endif
136
+
137
+  // Set the contour of an interactive draw XLD.
138
+  void SetDrawingObjectXld(const HXLDCont& Contour) const;
139
+
140
+  // Create a XLD contour which can be modified interactively.
141
+  void CreateDrawingObjectXld(const HTuple& Row, const HTuple& Column);
142
+
143
+  // Create a circle sector which can be modified interactively.
144
+  void CreateDrawingObjectCircleSector(double Row, double Column, double Radius, double StartAngle, double EndAngle);
145
+
146
+  // Create an elliptic sector which can be modified interactively.
147
+  void CreateDrawingObjectEllipseSector(double Row, double Column, double Phi, double Radius1, double Radius2, double StartAngle, double EndAngle);
148
+
149
+  // Create a line which can be modified interactively.
150
+  void CreateDrawingObjectLine(double Row1, double Column1, double Row2, double Column2);
151
+
152
+  // Create a circle which can be modified interactively.
153
+  void CreateDrawingObjectCircle(double Row, double Column, double Radius);
154
+
155
+  // Create an ellipse which can be modified interactively.
156
+  void CreateDrawingObjectEllipse(double Row, double Column, double Phi, double Radius1, double Radius2);
157
+
158
+  // Create a rectangle of any orientation which can be modified interactively.
159
+  void CreateDrawingObjectRectangle2(double Row, double Column, double Phi, double Length1, double Length2);
160
+
161
+  // Create a rectangle parallel to the coordinate axis which can be modified interactively.
162
+  void CreateDrawingObjectRectangle1(double Row1, double Column1, double Row2, double Column2);
163
+
164
+  // Send an event to a buffer window signaling a mouse double click event.
165
+  static HString SendMouseDoubleClickEvent(const HWindow& WindowHandle, const HTuple& Row, const HTuple& Column, Hlong Button);
166
+
167
+  // Send an event to a buffer window signaling a mouse double click event.
168
+  static HString SendMouseDoubleClickEvent(const HWindow& WindowHandle, Hlong Row, Hlong Column, Hlong Button);
169
+
170
+  // Send an event to a window buffer signaling a mouse down event.
171
+  static HString SendMouseDownEvent(const HWindow& WindowHandle, const HTuple& Row, const HTuple& Column, Hlong Button);
172
+
173
+  // Send an event to a window buffer signaling a mouse down event.
174
+  static HString SendMouseDownEvent(const HWindow& WindowHandle, Hlong Row, Hlong Column, Hlong Button);
175
+
176
+  // Send an event to a buffer window signaling a mouse drag event.
177
+  static HString SendMouseDragEvent(const HWindow& WindowHandle, const HTuple& Row, const HTuple& Column, Hlong Button);
178
+
179
+  // Send an event to a buffer window signaling a mouse drag event.
180
+  static HString SendMouseDragEvent(const HWindow& WindowHandle, Hlong Row, Hlong Column, Hlong Button);
181
+
182
+  // Send an event to a buffer window signaling a mouse up event.
183
+  static HString SendMouseUpEvent(const HWindow& WindowHandle, const HTuple& Row, const HTuple& Column, Hlong Button);
184
+
185
+  // Send an event to a buffer window signaling a mouse up event.
186
+  static HString SendMouseUpEvent(const HWindow& WindowHandle, Hlong Row, Hlong Column, Hlong Button);
187
+
188
+};
189
+
190
+// forward declarations and types for internal array implementation
191
+
192
+template<class T> class HSmartPtr;
193
+template<class T> class HHandleBaseArrayRef;
194
+
195
+typedef HHandleBaseArrayRef<HDrawingObject> HDrawingObjectArrayRef;
196
+typedef HSmartPtr< HDrawingObjectArrayRef > HDrawingObjectArrayPtr;
197
+
198
+
199
+// Represents multiple tool instances
200
+class LIntExport HDrawingObjectArray : public HHandleBaseArray
201
+{
202
+
203
+public:
204
+
205
+  // Create empty array
206
+  HDrawingObjectArray();
207
+
208
+  // Create array from native array of tool instances
209
+  HDrawingObjectArray(HDrawingObject* classes, Hlong length);
210
+
211
+  // Copy constructor
212
+  HDrawingObjectArray(const HDrawingObjectArray &tool_array);
213
+
214
+  // Destructor
215
+  virtual ~HDrawingObjectArray();
216
+
217
+  // Assignment operator
218
+  HDrawingObjectArray &operator=(const HDrawingObjectArray &tool_array);
219
+
220
+  // Clears array and all tool instances
221
+  virtual void Clear();
222
+
223
+  // Get array of native tool instances
224
+  const HDrawingObject* Tools() const;
225
+
226
+  // Get number of tools
227
+  virtual Hlong Length() const;
228
+
229
+  // Create tool array from tuple of handles
230
+  virtual void SetFromTuple(const HTuple& handles);
231
+
232
+  // Get tuple of handles for tool array
233
+  virtual HTuple ConvertToTuple() const;
234
+
235
+protected:
236
+
237
+// Smart pointer to internal data container
238
+   HDrawingObjectArrayPtr *mArrayPtr;
239
+};
240
+
241
+}
242
+
243
+#endif

+ 189 - 0
3rdparty/include22/halcon/halconcpp/HDualQuaternion.h

@@ -0,0 +1,189 @@
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
+
8
+
9
+#ifndef HCPP_HDUALQUATERNION
10
+#define HCPP_HDUALQUATERNION
11
+
12
+namespace HalconCpp
13
+{
14
+
15
+// Represents a dual quaternion.
16
+class LIntExport HDualQuaternion : public HDataBase
17
+{
18
+
19
+public:
20
+
21
+  // Create an uninitialized instance
22
+  HDualQuaternion():HDataBase() {}
23
+
24
+  // Copy constructor
25
+  HDualQuaternion(const HDualQuaternion& source) : HDataBase(source) {}
26
+
27
+  // Constructor from HTuple
28
+  explicit HDualQuaternion(const HTuple& tuple) : HDataBase(tuple) {}
29
+
30
+  // Deep copy of all data represented by this object instance
31
+  HDualQuaternion Clone() const;
32
+
33
+
34
+
35
+/*****************************************************************************
36
+ * Operator-based class constructors
37
+ *****************************************************************************/
38
+
39
+  // pose_to_dual_quat: Convert a 3D pose to a unit dual quaternion.
40
+  explicit HDualQuaternion(const HPose& Pose);
41
+
42
+  // screw_to_dual_quat: Convert a screw into a dual quaternion.
43
+  explicit HDualQuaternion(const HString& ScrewFormat, const HTuple& AxisDirectionX, const HTuple& AxisDirectionY, const HTuple& AxisDirectionZ, const HTuple& AxisMomentOrPointX, const HTuple& AxisMomentOrPointY, const HTuple& AxisMomentOrPointZ, const HTuple& Rotation, const HTuple& Translation);
44
+
45
+  // screw_to_dual_quat: Convert a screw into a dual quaternion.
46
+  explicit HDualQuaternion(const HString& ScrewFormat, double AxisDirectionX, double AxisDirectionY, double AxisDirectionZ, double AxisMomentOrPointX, double AxisMomentOrPointY, double AxisMomentOrPointZ, double Rotation, double Translation);
47
+
48
+  // screw_to_dual_quat: Convert a screw into a dual quaternion.
49
+  explicit HDualQuaternion(const char* ScrewFormat, double AxisDirectionX, double AxisDirectionY, double AxisDirectionZ, double AxisMomentOrPointX, double AxisMomentOrPointY, double AxisMomentOrPointZ, double Rotation, double Translation);
50
+
51
+#ifdef _WIN32
52
+  // screw_to_dual_quat: Convert a screw into a dual quaternion.
53
+  explicit HDualQuaternion(const wchar_t* ScrewFormat, double AxisDirectionX, double AxisDirectionY, double AxisDirectionZ, double AxisMomentOrPointX, double AxisMomentOrPointY, double AxisMomentOrPointZ, double Rotation, double Translation);
54
+#endif
55
+
56
+
57
+/*****************************************************************************
58
+ * Operator overloads (non-member overloads reside in HOperatorOverloads.h)
59
+ *****************************************************************************/
60
+
61
+  // Convert to matrix
62
+  operator HHomMat3D() const;
63
+
64
+  // Convert to pose
65
+  operator HPose() const;
66
+
67
+  // Conjugate dual quaternion
68
+  HDualQuaternion operator ~ () const;
69
+
70
+  // Create a dual quaternion from eight double values, where 
71
+  // (RealW, RealX, RealY, RealZ) are the elements of the real part and
72
+  // (DualW, DualX, DualY, DualZ) are the elements of the dual part.
73
+  explicit HDualQuaternion(double RealW, double RealX,
74
+                           double RealY, double RealZ,
75
+                           double DualW, double DualX,
76
+                           double DualY, double DualZ);
77
+
78
+  // Create a dual quaternion from two quaternions for the real and the 
79
+  // dual part.
80
+  explicit HDualQuaternion(HQuaternion QuatReal, HQuaternion QuatDual);
81
+
82
+
83
+  /***************************************************************************
84
+   * Operators                                                               *
85
+   ***************************************************************************/
86
+
87
+  // Deserialize a serialized dual quaternion.
88
+  void DeserializeDualQuat(const HSerializedItem& SerializedItemHandle);
89
+
90
+  // Multiply two dual quaternions.
91
+  static HDualQuaternionArray DualQuatCompose(const HDualQuaternionArray& DualQuaternionLeft, const HDualQuaternionArray& DualQuaternionRight);
92
+
93
+  // Multiply two dual quaternions.
94
+  HDualQuaternion DualQuatCompose(const HDualQuaternion& DualQuaternionRight) const;
95
+
96
+  // Conjugate a dual quaternion.
97
+  static HDualQuaternionArray DualQuatConjugate(const HDualQuaternionArray& DualQuaternion);
98
+
99
+  // Conjugate a dual quaternion.
100
+  HDualQuaternion DualQuatConjugate() const;
101
+
102
+  // Interpolate two dual quaternions.
103
+  HDualQuaternionArray DualQuatInterpolate(const HDualQuaternion& DualQuaternionEnd, const HTuple& InterpPos) const;
104
+
105
+  // Interpolate two dual quaternions.
106
+  HDualQuaternion DualQuatInterpolate(const HDualQuaternion& DualQuaternionEnd, double InterpPos) const;
107
+
108
+  // Normalize a dual quaternion.
109
+  static HDualQuaternionArray DualQuatNormalize(const HDualQuaternionArray& DualQuaternion);
110
+
111
+  // Normalize a dual quaternion.
112
+  HDualQuaternion DualQuatNormalize() const;
113
+
114
+  // Convert a unit dual quaternion into a homogeneous transformation matrix.
115
+  HHomMat3D DualQuatToHomMat3d() const;
116
+
117
+  // Convert a dual quaternion to a 3D pose.
118
+  static HPoseArray DualQuatToPose(const HDualQuaternionArray& DualQuaternion);
119
+
120
+  // Convert a dual quaternion to a 3D pose.
121
+  HPose DualQuatToPose() const;
122
+
123
+  // Convert a unit dual quaternion into a screw.
124
+  void DualQuatToScrew(const HString& ScrewFormat, double* AxisDirectionX, double* AxisDirectionY, double* AxisDirectionZ, double* AxisMomentOrPointX, double* AxisMomentOrPointY, double* AxisMomentOrPointZ, double* Rotation, double* Translation) const;
125
+
126
+  // Convert a unit dual quaternion into a screw.
127
+  void DualQuatToScrew(const char* ScrewFormat, double* AxisDirectionX, double* AxisDirectionY, double* AxisDirectionZ, double* AxisMomentOrPointX, double* AxisMomentOrPointY, double* AxisMomentOrPointZ, double* Rotation, double* Translation) const;
128
+
129
+#ifdef _WIN32
130
+  // Convert a unit dual quaternion into a screw.
131
+  void DualQuatToScrew(const wchar_t* ScrewFormat, double* AxisDirectionX, double* AxisDirectionY, double* AxisDirectionZ, double* AxisMomentOrPointX, double* AxisMomentOrPointY, double* AxisMomentOrPointZ, double* Rotation, double* Translation) const;
132
+#endif
133
+
134
+  // Transform a 3D line with a unit dual quaternion.
135
+  void DualQuatTransLine3d(const HString& LineFormat, const HTuple& LineDirectionX, const HTuple& LineDirectionY, const HTuple& LineDirectionZ, const HTuple& LineMomentOrPointX, const HTuple& LineMomentOrPointY, const HTuple& LineMomentOrPointZ, HTuple* TransLineDirectionX, HTuple* TransLineDirectionY, HTuple* TransLineDirectionZ, HTuple* TransLineMomentOrPointX, HTuple* TransLineMomentOrPointY, HTuple* TransLineMomentOrPointZ) const;
136
+
137
+  // Transform a 3D line with a unit dual quaternion.
138
+  void DualQuatTransLine3d(const HString& LineFormat, double LineDirectionX, double LineDirectionY, double LineDirectionZ, double LineMomentOrPointX, double LineMomentOrPointY, double LineMomentOrPointZ, double* TransLineDirectionX, double* TransLineDirectionY, double* TransLineDirectionZ, double* TransLineMomentOrPointX, double* TransLineMomentOrPointY, double* TransLineMomentOrPointZ) const;
139
+
140
+  // Transform a 3D line with a unit dual quaternion.
141
+  void DualQuatTransLine3d(const char* LineFormat, double LineDirectionX, double LineDirectionY, double LineDirectionZ, double LineMomentOrPointX, double LineMomentOrPointY, double LineMomentOrPointZ, double* TransLineDirectionX, double* TransLineDirectionY, double* TransLineDirectionZ, double* TransLineMomentOrPointX, double* TransLineMomentOrPointY, double* TransLineMomentOrPointZ) const;
142
+
143
+#ifdef _WIN32
144
+  // Transform a 3D line with a unit dual quaternion.
145
+  void DualQuatTransLine3d(const wchar_t* LineFormat, double LineDirectionX, double LineDirectionY, double LineDirectionZ, double LineMomentOrPointX, double LineMomentOrPointY, double LineMomentOrPointZ, double* TransLineDirectionX, double* TransLineDirectionY, double* TransLineDirectionZ, double* TransLineMomentOrPointX, double* TransLineMomentOrPointY, double* TransLineMomentOrPointZ) const;
146
+#endif
147
+
148
+  // Convert a 3D pose to a unit dual quaternion.
149
+  static HDualQuaternionArray PoseToDualQuat(const HPoseArray& Pose);
150
+
151
+  // Convert a 3D pose to a unit dual quaternion.
152
+  void PoseToDualQuat(const HPose& Pose);
153
+
154
+  // Convert a screw into a dual quaternion.
155
+  void ScrewToDualQuat(const HString& ScrewFormat, const HTuple& AxisDirectionX, const HTuple& AxisDirectionY, const HTuple& AxisDirectionZ, const HTuple& AxisMomentOrPointX, const HTuple& AxisMomentOrPointY, const HTuple& AxisMomentOrPointZ, const HTuple& Rotation, const HTuple& Translation);
156
+
157
+  // Convert a screw into a dual quaternion.
158
+  void ScrewToDualQuat(const HString& ScrewFormat, double AxisDirectionX, double AxisDirectionY, double AxisDirectionZ, double AxisMomentOrPointX, double AxisMomentOrPointY, double AxisMomentOrPointZ, double Rotation, double Translation);
159
+
160
+  // Convert a screw into a dual quaternion.
161
+  void ScrewToDualQuat(const char* ScrewFormat, double AxisDirectionX, double AxisDirectionY, double AxisDirectionZ, double AxisMomentOrPointX, double AxisMomentOrPointY, double AxisMomentOrPointZ, double Rotation, double Translation);
162
+
163
+#ifdef _WIN32
164
+  // Convert a screw into a dual quaternion.
165
+  void ScrewToDualQuat(const wchar_t* ScrewFormat, double AxisDirectionX, double AxisDirectionY, double AxisDirectionZ, double AxisMomentOrPointX, double AxisMomentOrPointY, double AxisMomentOrPointZ, double Rotation, double Translation);
166
+#endif
167
+
168
+  // Serialize a dual quaternion.
169
+  HSerializedItem SerializeDualQuat() const;
170
+
171
+};
172
+
173
+class LIntExport HDualQuaternionArray : public HDataArray
174
+{
175
+public:
176
+  HDualQuaternionArray();
177
+  HDualQuaternionArray(HDualQuaternion* classes, Hlong length);
178
+  /* Define a default constructor to prevent compilers that support
179
+   * C++11 R-Value References v3.0 declaring an implicite move
180
+   * assignment/constructor. */
181
+  ~HDualQuaternionArray() {}
182
+protected:
183
+  virtual void CreateArray(Hlong length);
184
+  virtual int GetFixedSize() const;
185
+};
186
+
187
+}
188
+
189
+#endif

+ 158 - 0
3rdparty/include22/halcon/halconcpp/HEvent.h

@@ -0,0 +1,158 @@
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
+
8
+
9
+#ifndef HCPP_HEVENT
10
+#define HCPP_HEVENT
11
+
12
+namespace HalconCpp
13
+{
14
+
15
+// Represents an instance of an event synchronization object.
16
+class LIntExport HEvent : public HHandle
17
+{
18
+
19
+public:
20
+
21
+  // Create an uninitialized instance
22
+  HEvent():HHandle() {}
23
+
24
+  // Copy constructor
25
+  HEvent(const HEvent& source) : HHandle(source) {}
26
+
27
+  // Copy constructor
28
+  HEvent(const HHandle& handle);
29
+
30
+  // Create HEvent from handle, taking ownership
31
+  explicit HEvent(Hlong handle);
32
+
33
+  bool operator==(const HHandle& obj) const
34
+  {
35
+    return HHandleBase::operator==(obj);
36
+  }
37
+
38
+  bool operator!=(const HHandle& obj) const
39
+  {
40
+    return HHandleBase::operator!=(obj);
41
+  }
42
+
43
+protected:
44
+
45
+  // Verify matching semantic type ('event')!
46
+  virtual void AssertType(Hphandle handle) const;
47
+
48
+public:
49
+
50
+
51
+
52
+/*****************************************************************************
53
+ * Operator-based class constructors
54
+ *****************************************************************************/
55
+
56
+  // create_event: Create an event synchronization object.
57
+  explicit HEvent(const HTuple& AttribName, const HTuple& AttribValue);
58
+
59
+  // create_event: Create an event synchronization object.
60
+  explicit HEvent(const HString& AttribName, const HString& AttribValue);
61
+
62
+  // create_event: Create an event synchronization object.
63
+  explicit HEvent(const char* AttribName, const char* AttribValue);
64
+
65
+#ifdef _WIN32
66
+  // create_event: Create an event synchronization object.
67
+  explicit HEvent(const wchar_t* AttribName, const wchar_t* AttribValue);
68
+#endif
69
+
70
+
71
+
72
+
73
+  /***************************************************************************
74
+   * Operators                                                               *
75
+   ***************************************************************************/
76
+
77
+  // Clear the event synchronization object.
78
+  void ClearEvent() const;
79
+
80
+  // Unlock an event synchronization object. 
81
+  void SignalEvent() const;
82
+
83
+  // Lock an event synchronization object only if it is unlocked.
84
+  Hlong TryWaitEvent() const;
85
+
86
+  // Lock an event synchronization object.
87
+  void WaitEvent() const;
88
+
89
+  // Create an event synchronization object.
90
+  void CreateEvent(const HTuple& AttribName, const HTuple& AttribValue);
91
+
92
+  // Create an event synchronization object.
93
+  void CreateEvent(const HString& AttribName, const HString& AttribValue);
94
+
95
+  // Create an event synchronization object.
96
+  void CreateEvent(const char* AttribName, const char* AttribValue);
97
+
98
+#ifdef _WIN32
99
+  // Create an event synchronization object.
100
+  void CreateEvent(const wchar_t* AttribName, const wchar_t* AttribValue);
101
+#endif
102
+
103
+};
104
+
105
+// forward declarations and types for internal array implementation
106
+
107
+template<class T> class HSmartPtr;
108
+template<class T> class HHandleBaseArrayRef;
109
+
110
+typedef HHandleBaseArrayRef<HEvent> HEventArrayRef;
111
+typedef HSmartPtr< HEventArrayRef > HEventArrayPtr;
112
+
113
+
114
+// Represents multiple tool instances
115
+class LIntExport HEventArray : public HHandleBaseArray
116
+{
117
+
118
+public:
119
+
120
+  // Create empty array
121
+  HEventArray();
122
+
123
+  // Create array from native array of tool instances
124
+  HEventArray(HEvent* classes, Hlong length);
125
+
126
+  // Copy constructor
127
+  HEventArray(const HEventArray &tool_array);
128
+
129
+  // Destructor
130
+  virtual ~HEventArray();
131
+
132
+  // Assignment operator
133
+  HEventArray &operator=(const HEventArray &tool_array);
134
+
135
+  // Clears array and all tool instances
136
+  virtual void Clear();
137
+
138
+  // Get array of native tool instances
139
+  const HEvent* Tools() const;
140
+
141
+  // Get number of tools
142
+  virtual Hlong Length() const;
143
+
144
+  // Create tool array from tuple of handles
145
+  virtual void SetFromTuple(const HTuple& handles);
146
+
147
+  // Get tuple of handles for tool array
148
+  virtual HTuple ConvertToTuple() const;
149
+
150
+protected:
151
+
152
+// Smart pointer to internal data container
153
+   HEventArrayPtr *mArrayPtr;
154
+};
155
+
156
+}
157
+
158
+#endif

+ 198 - 0
3rdparty/include22/halcon/halconcpp/HException.h

@@ -0,0 +1,198 @@
1
+/*****************************************************************************
2
+ * HException.h
3
+ ***************************************************************************** 
4
+ *
5
+ * Project:     HALCON/C++
6
+ * Description: Error handling
7
+ *
8
+ * (c) 2010-2020 by MVTec Software GmbH
9
+ *                  www.mvtec.com
10
+ *
11
+ *****************************************************************************
12
+ *
13
+ *
14
+ *****************************************************************************/
15
+
16
+
17
+#ifndef HCPP_EXCEPTION_H
18
+#define HCPP_EXCEPTION_H
19
+
20
+
21
+#include "halconcpp/HString.h"
22
+#include "halconcpp/HTuple.h"
23
+
24
+
25
+namespace HalconCpp
26
+{
27
+
28
+
29
+// Base class for all exception that is raised for generic
30
+// errors within the HALCON/C++ interface
31
+
32
+class LIntExport HException 
33
+{
34
+
35
+public:
36
+
37
+  // Constructors / Destructor
38
+
39
+  HException(const char *proc_name, Herror err);
40
+
41
+  HException(const char *proc_name, const char *msg, Herror err = H_MSG_OK);
42
+
43
+  HException(const HException &except);
44
+
45
+  HException(const HTuple &tuple);
46
+
47
+  virtual ~HException();
48
+
49
+
50
+  // Raising exceptions (synchronization-aware)
51
+
52
+  virtual void ThrowInstance() const;
53
+
54
+  static void Throw(const char *proc_name, const char *msg, Herror err = H_MSG_OK);
55
+
56
+  static void Throw(const char *proc_name, Herror err);
57
+
58
+
59
+  // Conversion and copying
60
+
61
+  static void    GetExceptionData(const HTuple &exception,
62
+                                  const HTuple &name, HTuple *value);
63
+
64
+  void           ToHTuple(HTuple *exception) const;
65
+
66
+  HException&    operator = (const HException &except);
67
+
68
+
69
+  // Accessors
70
+
71
+  const HString& ProcName()    const {return mProcName;}
72
+  const HString& ErrorMessage()   const {return mErrorMessage;}
73
+  Herror         ErrorCode() const {return mErrorCode;}
74
+  HDEPRECATED(const HString& ErrorText() const ,
75
+              "deprecated, please use ErrorMessage instead.")
76
+              {return mErrorMessage;}
77
+  HDEPRECATED(Herror ErrorNumber() const ,
78
+             "deprecated, please use ErrorCode instead.")
79
+             {return mErrorCode;}
80
+  const HTuple&  UserData()    const {return mUserData;}
81
+
82
+  // Legacy
83
+#ifdef HCPP_LEGACY_EXCEPTION
84
+  // Handler for user defined exception handling.
85
+  // Used with InstallHHandler()
86
+  typedef void (*Handler)(const HException &exception);
87
+
88
+  void           React(Hproc_handle proc_handle) const;
89
+
90
+  static Handler InstallHHandler(Handler proc);
91
+  // default exception handler
92
+  void           PrintException(void) const;
93
+  static Handler handler;   /* handler in use */
94
+#endif
95
+
96
+protected:
97
+
98
+  HString        mProcName;     // Name of procedure/operator
99
+  HString        mErrorMessage; // Error message
100
+  Herror         mErrorCode;    // Error code
101
+
102
+  HTuple         mUserData;    // User defined error data
103
+
104
+private:
105
+
106
+  void InitException(const HString& proc_name, const HString& msg,
107
+                     Herror err, const HTuple& user_data);
108
+
109
+};
110
+
111
+
112
+// Exception that is raised if operator call in HALCON library fails 
113
+
114
+class LIntExport HOperatorException : public HException
115
+{
116
+public:
117
+
118
+  // Failure during operator call
119
+  HOperatorException(Hproc_handle proc, Herror err);
120
+
121
+  // Precall failure before procedure handle is available
122
+  HOperatorException(HINT proc_index, Herror err);
123
+
124
+  // Failure during operator-like call, e.g. emulated dev_* operators
125
+  HOperatorException(const char* name, Herror err);
126
+
127
+  HOperatorException(const HOperatorException &except);
128
+
129
+  static void Throw(Hproc_handle proc, Herror err);
130
+
131
+  static void Throw(HINT proc_index, Herror err);
132
+
133
+  static void Throw(const char* name, Herror err);
134
+
135
+  void ThrowInstance() const;
136
+
137
+  // Extended Error Info
138
+  HString  ExtendedErrorMessage() const;
139
+  INT4_8   ExtendedErrorCode() const;
140
+
141
+};
142
+
143
+
144
+// Exception that is raised from user code (code export)
145
+
146
+class LIntExport HUserException : public HException
147
+{
148
+public:
149
+
150
+  HUserException(Herror err, const char *msg);
151
+
152
+  HUserException(const HUserException &except);
153
+
154
+  HUserException(const HTuple &tuple);
155
+
156
+};
157
+
158
+
159
+// Exception that is raised for tuple-related errors
160
+
161
+class LIntExport HTupleAccessException: public HException
162
+{
163
+public:
164
+
165
+  HTupleAccessException(void) : HException("","Illegal operation on tuple") {}
166
+  HTupleAccessException(const char *m) : HException("",m) {}
167
+  HTupleAccessException(Herror err) : HException("",err) {}
168
+  static void Throw(void);
169
+  static void Throw(const char* m);
170
+  static void Throw(Herror err);
171
+  void ThrowInstance() const;
172
+  ~HTupleAccessException();
173
+};
174
+
175
+
176
+
177
+// Exception that is raised for vector-related errors
178
+
179
+class LIntExport HVectorAccessException: public HException
180
+{
181
+public:
182
+
183
+  HVectorAccessException(void) : HException("",
184
+                                   "Illegal operation on vector") {}
185
+  HVectorAccessException(const char *m) : HException("",m) {}
186
+  HVectorAccessException(Herror err) : HException("",err) {}
187
+  HVectorAccessException(const char *m, Herror err) : HException("",m,err) {}
188
+  static void Throw(void);
189
+  static void Throw(const char* m);
190
+  static void Throw(Herror err);
191
+  void ThrowInstance() const;
192
+  ~HVectorAccessException();
193
+};
194
+
195
+
196
+}
197
+
198
+#endif

+ 157 - 0
3rdparty/include22/halcon/halconcpp/HFeatureSet.h

@@ -0,0 +1,157 @@
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
+
8
+
9
+#ifndef HCPP_HFEATURESET
10
+#define HCPP_HFEATURESET
11
+
12
+namespace HalconCpp
13
+{
14
+
15
+// Represents an instance of a training used for the classifier.
16
+class LIntExport HFeatureSet : public HHandle
17
+{
18
+
19
+public:
20
+
21
+  // Create an uninitialized instance
22
+  HFeatureSet():HHandle() {}
23
+
24
+  // Copy constructor
25
+  HFeatureSet(const HFeatureSet& source) : HHandle(source) {}
26
+
27
+  // Copy constructor
28
+  HFeatureSet(const HHandle& handle);
29
+
30
+  // Create HFeatureSet from handle, taking ownership
31
+  explicit HFeatureSet(Hlong handle);
32
+
33
+  bool operator==(const HHandle& obj) const
34
+  {
35
+    return HHandleBase::operator==(obj);
36
+  }
37
+
38
+  bool operator!=(const HHandle& obj) const
39
+  {
40
+    return HHandleBase::operator!=(obj);
41
+  }
42
+
43
+protected:
44
+
45
+  // Verify matching semantic type ('feature_set')!
46
+  virtual void AssertType(Hphandle handle) const;
47
+
48
+public:
49
+
50
+
51
+
52
+/*****************************************************************************
53
+ * Operator-based class constructors
54
+ *****************************************************************************/
55
+
56
+  // read_sampset: Read a training data set from a file.
57
+  explicit HFeatureSet(const HString& FileName);
58
+
59
+  // read_sampset: Read a training data set from a file.
60
+  explicit HFeatureSet(const char* FileName);
61
+
62
+#ifdef _WIN32
63
+  // read_sampset: Read a training data set from a file.
64
+  explicit HFeatureSet(const wchar_t* FileName);
65
+#endif
66
+
67
+
68
+
69
+
70
+  /***************************************************************************
71
+   * Operators                                                               *
72
+   ***************************************************************************/
73
+
74
+  // Read a training data set from a file.
75
+  void ReadSampset(const HString& FileName);
76
+
77
+  // Read a training data set from a file.
78
+  void ReadSampset(const char* FileName);
79
+
80
+#ifdef _WIN32
81
+  // Read a training data set from a file.
82
+  void ReadSampset(const wchar_t* FileName);
83
+#endif
84
+
85
+  // Train the classifier with one data set.
86
+  void LearnSampsetBox(const HClassBox& ClassifHandle, const HString& Outfile, Hlong NSamples, double StopError, Hlong ErrorN) const;
87
+
88
+  // Train the classifier with one data set.
89
+  void LearnSampsetBox(const HClassBox& ClassifHandle, const char* Outfile, Hlong NSamples, double StopError, Hlong ErrorN) const;
90
+
91
+#ifdef _WIN32
92
+  // Train the classifier with one data set.
93
+  void LearnSampsetBox(const HClassBox& ClassifHandle, const wchar_t* Outfile, Hlong NSamples, double StopError, Hlong ErrorN) const;
94
+#endif
95
+
96
+  // Free memory of a data set.
97
+  void ClearSampset() const;
98
+
99
+  // Classify a set of arrays.
100
+  double TestSampsetBox(const HClassBox& ClassifHandle) const;
101
+
102
+};
103
+
104
+// forward declarations and types for internal array implementation
105
+
106
+template<class T> class HSmartPtr;
107
+template<class T> class HHandleBaseArrayRef;
108
+
109
+typedef HHandleBaseArrayRef<HFeatureSet> HFeatureSetArrayRef;
110
+typedef HSmartPtr< HFeatureSetArrayRef > HFeatureSetArrayPtr;
111
+
112
+
113
+// Represents multiple tool instances
114
+class LIntExport HFeatureSetArray : public HHandleBaseArray
115
+{
116
+
117
+public:
118
+
119
+  // Create empty array
120
+  HFeatureSetArray();
121
+
122
+  // Create array from native array of tool instances
123
+  HFeatureSetArray(HFeatureSet* classes, Hlong length);
124
+
125
+  // Copy constructor
126
+  HFeatureSetArray(const HFeatureSetArray &tool_array);
127
+
128
+  // Destructor
129
+  virtual ~HFeatureSetArray();
130
+
131
+  // Assignment operator
132
+  HFeatureSetArray &operator=(const HFeatureSetArray &tool_array);
133
+
134
+  // Clears array and all tool instances
135
+  virtual void Clear();
136
+
137
+  // Get array of native tool instances
138
+  const HFeatureSet* Tools() const;
139
+
140
+  // Get number of tools
141
+  virtual Hlong Length() const;
142
+
143
+  // Create tool array from tuple of handles
144
+  virtual void SetFromTuple(const HTuple& handles);
145
+
146
+  // Get tuple of handles for tool array
147
+  virtual HTuple ConvertToTuple() const;
148
+
149
+protected:
150
+
151
+// Smart pointer to internal data container
152
+   HFeatureSetArrayPtr *mArrayPtr;
153
+};
154
+
155
+}
156
+
157
+#endif

+ 184 - 0
3rdparty/include22/halcon/halconcpp/HFile.h

@@ -0,0 +1,184 @@
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
+
8
+
9
+#ifndef HCPP_HFILE
10
+#define HCPP_HFILE
11
+
12
+namespace HalconCpp
13
+{
14
+
15
+// Represents an instance of a file.
16
+class LIntExport HFile : public HHandle
17
+{
18
+
19
+public:
20
+
21
+  // Create an uninitialized instance
22
+  HFile():HHandle() {}
23
+
24
+  // Copy constructor
25
+  HFile(const HFile& source) : HHandle(source) {}
26
+
27
+  // Copy constructor
28
+  HFile(const HHandle& handle);
29
+
30
+  // Create HFile from handle, taking ownership
31
+  explicit HFile(Hlong handle);
32
+
33
+  bool operator==(const HHandle& obj) const
34
+  {
35
+    return HHandleBase::operator==(obj);
36
+  }
37
+
38
+  bool operator!=(const HHandle& obj) const
39
+  {
40
+    return HHandleBase::operator!=(obj);
41
+  }
42
+
43
+protected:
44
+
45
+  // Verify matching semantic type ('file')!
46
+  virtual void AssertType(Hphandle handle) const;
47
+
48
+public:
49
+
50
+
51
+
52
+/*****************************************************************************
53
+ * Operator-based class constructors
54
+ *****************************************************************************/
55
+
56
+  // open_file: Open a file in text or binary format.
57
+  explicit HFile(const HString& FileName, const HTuple& FileType);
58
+
59
+  // open_file: Open a file in text or binary format.
60
+  explicit HFile(const HString& FileName, const HString& FileType);
61
+
62
+  // open_file: Open a file in text or binary format.
63
+  explicit HFile(const char* FileName, const char* FileType);
64
+
65
+#ifdef _WIN32
66
+  // open_file: Open a file in text or binary format.
67
+  explicit HFile(const wchar_t* FileName, const wchar_t* FileType);
68
+#endif
69
+
70
+
71
+
72
+
73
+  /***************************************************************************
74
+   * Operators                                                               *
75
+   ***************************************************************************/
76
+
77
+  // Open a file in text or binary format.
78
+  void OpenFile(const HString& FileName, const HTuple& FileType);
79
+
80
+  // Open a file in text or binary format.
81
+  void OpenFile(const HString& FileName, const HString& FileType);
82
+
83
+  // Open a file in text or binary format.
84
+  void OpenFile(const char* FileName, const char* FileType);
85
+
86
+#ifdef _WIN32
87
+  // Open a file in text or binary format.
88
+  void OpenFile(const wchar_t* FileName, const wchar_t* FileType);
89
+#endif
90
+
91
+  // Write strings and numbers into a text file.
92
+  void FwriteString(const HTuple& String) const;
93
+
94
+  // Write strings and numbers into a text file.
95
+  void FwriteString(const HString& String) const;
96
+
97
+  // Write strings and numbers into a text file.
98
+  void FwriteString(const char* String) const;
99
+
100
+#ifdef _WIN32
101
+  // Write strings and numbers into a text file.
102
+  void FwriteString(const wchar_t* String) const;
103
+#endif
104
+
105
+  // Read a character line from a text file.
106
+  HString FreadLine(Hlong* IsEOF) const;
107
+
108
+  // Read a string from a text file.
109
+  HString FreadString(Hlong* IsEOF) const;
110
+
111
+  // Read one character from a text file.
112
+  HString FreadChar() const;
113
+
114
+  // Write a line break and clear the output buffer.
115
+  void FnewLine() const;
116
+
117
+  // Closing a text file.
118
+  static void CloseFile(const HFileArray& FileHandle);
119
+
120
+  // Closing a text file.
121
+  void CloseFile() const;
122
+
123
+  // Read bytes from a binary file.
124
+  HTuple FreadBytes(Hlong NumberOfBytes, Hlong* IsEOF) const;
125
+
126
+  // Write bytes to a binary file.
127
+  Hlong FwriteBytes(const HTuple& DataToWrite) const;
128
+
129
+};
130
+
131
+// forward declarations and types for internal array implementation
132
+
133
+template<class T> class HSmartPtr;
134
+template<class T> class HHandleBaseArrayRef;
135
+
136
+typedef HHandleBaseArrayRef<HFile> HFileArrayRef;
137
+typedef HSmartPtr< HFileArrayRef > HFileArrayPtr;
138
+
139
+
140
+// Represents multiple tool instances
141
+class LIntExport HFileArray : public HHandleBaseArray
142
+{
143
+
144
+public:
145
+
146
+  // Create empty array
147
+  HFileArray();
148
+
149
+  // Create array from native array of tool instances
150
+  HFileArray(HFile* classes, Hlong length);
151
+
152
+  // Copy constructor
153
+  HFileArray(const HFileArray &tool_array);
154
+
155
+  // Destructor
156
+  virtual ~HFileArray();
157
+
158
+  // Assignment operator
159
+  HFileArray &operator=(const HFileArray &tool_array);
160
+
161
+  // Clears array and all tool instances
162
+  virtual void Clear();
163
+
164
+  // Get array of native tool instances
165
+  const HFile* Tools() const;
166
+
167
+  // Get number of tools
168
+  virtual Hlong Length() const;
169
+
170
+  // Create tool array from tuple of handles
171
+  virtual void SetFromTuple(const HTuple& handles);
172
+
173
+  // Get tuple of handles for tool array
174
+  virtual HTuple ConvertToTuple() const;
175
+
176
+protected:
177
+
178
+// Smart pointer to internal data container
179
+   HFileArrayPtr *mArrayPtr;
180
+};
181
+
182
+}
183
+
184
+#endif

+ 226 - 0
3rdparty/include22/halcon/halconcpp/HFramegrabber.h

@@ -0,0 +1,226 @@
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
+
8
+
9
+#ifndef HCPP_HFRAMEGRABBER
10
+#define HCPP_HFRAMEGRABBER
11
+
12
+namespace HalconCpp
13
+{
14
+
15
+// Represents an instance of an image acquisition device.
16
+class LIntExport HFramegrabber : public HHandle
17
+{
18
+
19
+public:
20
+
21
+  // Create an uninitialized instance
22
+  HFramegrabber():HHandle() {}
23
+
24
+  // Copy constructor
25
+  HFramegrabber(const HFramegrabber& source) : HHandle(source) {}
26
+
27
+  // Copy constructor
28
+  HFramegrabber(const HHandle& handle);
29
+
30
+  // Create HFramegrabber from handle, taking ownership
31
+  explicit HFramegrabber(Hlong handle);
32
+
33
+  bool operator==(const HHandle& obj) const
34
+  {
35
+    return HHandleBase::operator==(obj);
36
+  }
37
+
38
+  bool operator!=(const HHandle& obj) const
39
+  {
40
+    return HHandleBase::operator!=(obj);
41
+  }
42
+
43
+protected:
44
+
45
+  // Verify matching semantic type ('framegrabber')!
46
+  virtual void AssertType(Hphandle handle) const;
47
+
48
+public:
49
+
50
+
51
+
52
+/*****************************************************************************
53
+ * Operator-based class constructors
54
+ *****************************************************************************/
55
+
56
+  // open_framegrabber: Open and configure an image acquisition device.
57
+  explicit HFramegrabber(const HString& Name, Hlong HorizontalResolution, Hlong VerticalResolution, Hlong ImageWidth, Hlong ImageHeight, Hlong StartRow, Hlong StartColumn, const HString& Field, const HTuple& BitsPerChannel, const HTuple& ColorSpace, const HTuple& Generic, const HString& ExternalTrigger, const HTuple& CameraType, const HTuple& Device, const HTuple& Port, const HTuple& LineIn);
58
+
59
+  // open_framegrabber: Open and configure an image acquisition device.
60
+  explicit HFramegrabber(const HString& Name, Hlong HorizontalResolution, Hlong VerticalResolution, Hlong ImageWidth, Hlong ImageHeight, Hlong StartRow, Hlong StartColumn, const HString& Field, Hlong BitsPerChannel, const HString& ColorSpace, double Generic, const HString& ExternalTrigger, const HString& CameraType, const HString& Device, Hlong Port, Hlong LineIn);
61
+
62
+  // open_framegrabber: Open and configure an image acquisition device.
63
+  explicit HFramegrabber(const char* Name, Hlong HorizontalResolution, Hlong VerticalResolution, Hlong ImageWidth, Hlong ImageHeight, Hlong StartRow, Hlong StartColumn, const char* Field, Hlong BitsPerChannel, const char* ColorSpace, double Generic, const char* ExternalTrigger, const char* CameraType, const char* Device, Hlong Port, Hlong LineIn);
64
+
65
+#ifdef _WIN32
66
+  // open_framegrabber: Open and configure an image acquisition device.
67
+  explicit HFramegrabber(const wchar_t* Name, Hlong HorizontalResolution, Hlong VerticalResolution, Hlong ImageWidth, Hlong ImageHeight, Hlong StartRow, Hlong StartColumn, const wchar_t* Field, Hlong BitsPerChannel, const wchar_t* ColorSpace, double Generic, const wchar_t* ExternalTrigger, const wchar_t* CameraType, const wchar_t* Device, Hlong Port, Hlong LineIn);
68
+#endif
69
+
70
+
71
+
72
+
73
+  /***************************************************************************
74
+   * Operators                                                               *
75
+   ***************************************************************************/
76
+
77
+  // Query specific parameters of an image acquisition device.
78
+  HTuple GetFramegrabberParam(const HTuple& Param) const;
79
+
80
+  // Query specific parameters of an image acquisition device.
81
+  HTuple GetFramegrabberParam(const HString& Param) const;
82
+
83
+  // Query specific parameters of an image acquisition device.
84
+  HTuple GetFramegrabberParam(const char* Param) const;
85
+
86
+#ifdef _WIN32
87
+  // Query specific parameters of an image acquisition device.
88
+  HTuple GetFramegrabberParam(const wchar_t* Param) const;
89
+#endif
90
+
91
+  // Set specific parameters of an image acquisition device.
92
+  void SetFramegrabberParam(const HTuple& Param, const HTuple& Value) const;
93
+
94
+  // Set specific parameters of an image acquisition device.
95
+  void SetFramegrabberParam(const HString& Param, const HString& Value) const;
96
+
97
+  // Set specific parameters of an image acquisition device.
98
+  void SetFramegrabberParam(const char* Param, const char* Value) const;
99
+
100
+#ifdef _WIN32
101
+  // Set specific parameters of an image acquisition device.
102
+  void SetFramegrabberParam(const wchar_t* Param, const wchar_t* Value) const;
103
+#endif
104
+
105
+  // Query callback function of an image acquisition device.
106
+  void* GetFramegrabberCallback(const HString& CallbackType, void** UserContext) const;
107
+
108
+  // Query callback function of an image acquisition device.
109
+  void* GetFramegrabberCallback(const char* CallbackType, void** UserContext) const;
110
+
111
+#ifdef _WIN32
112
+  // Query callback function of an image acquisition device.
113
+  void* GetFramegrabberCallback(const wchar_t* CallbackType, void** UserContext) const;
114
+#endif
115
+
116
+  // Register a callback function for an image acquisition device.
117
+  void SetFramegrabberCallback(const HString& CallbackType, void* CallbackFunction, void* UserContext) const;
118
+
119
+  // Register a callback function for an image acquisition device.
120
+  void SetFramegrabberCallback(const char* CallbackType, void* CallbackFunction, void* UserContext) const;
121
+
122
+#ifdef _WIN32
123
+  // Register a callback function for an image acquisition device.
124
+  void SetFramegrabberCallback(const wchar_t* CallbackType, void* CallbackFunction, void* UserContext) const;
125
+#endif
126
+
127
+  // Asynchronous grab of images and preprocessed image data from the specified image acquisition device.
128
+  HImage GrabDataAsync(HRegion* Region, HXLDCont* Contours, double MaxDelay, HTuple* Data) const;
129
+
130
+  // Asynchronous grab of images and preprocessed image data from the specified image acquisition device.
131
+  HImage GrabDataAsync(HRegion* Region, HXLDCont* Contours, double MaxDelay, HString* Data) const;
132
+
133
+  // Synchronous grab of images and preprocessed image data from the specified image acquisition device.
134
+  HImage GrabData(HRegion* Region, HXLDCont* Contours, HTuple* Data) const;
135
+
136
+  // Synchronous grab of images and preprocessed image data from the specified image acquisition device.
137
+  HImage GrabData(HRegion* Region, HXLDCont* Contours, HString* Data) const;
138
+
139
+  // Asynchronous grab of an image from the specified image acquisition device.
140
+  HImage GrabImageAsync(double MaxDelay) const;
141
+
142
+  // Start an asynchronous grab from the specified image acquisition device.
143
+  void GrabImageStart(double MaxDelay) const;
144
+
145
+  // Synchronous grab of an image from the specified image acquisition device.
146
+  HImage GrabImage() const;
147
+
148
+  // Close specified image acquisition device.
149
+  void CloseFramegrabber() const;
150
+
151
+  // Open and configure an image acquisition device.
152
+  void OpenFramegrabber(const HString& Name, Hlong HorizontalResolution, Hlong VerticalResolution, Hlong ImageWidth, Hlong ImageHeight, Hlong StartRow, Hlong StartColumn, const HString& Field, const HTuple& BitsPerChannel, const HTuple& ColorSpace, const HTuple& Generic, const HString& ExternalTrigger, const HTuple& CameraType, const HTuple& Device, const HTuple& Port, const HTuple& LineIn);
153
+
154
+  // Open and configure an image acquisition device.
155
+  void OpenFramegrabber(const HString& Name, Hlong HorizontalResolution, Hlong VerticalResolution, Hlong ImageWidth, Hlong ImageHeight, Hlong StartRow, Hlong StartColumn, const HString& Field, Hlong BitsPerChannel, const HString& ColorSpace, double Generic, const HString& ExternalTrigger, const HString& CameraType, const HString& Device, Hlong Port, Hlong LineIn);
156
+
157
+  // Open and configure an image acquisition device.
158
+  void OpenFramegrabber(const char* Name, Hlong HorizontalResolution, Hlong VerticalResolution, Hlong ImageWidth, Hlong ImageHeight, Hlong StartRow, Hlong StartColumn, const char* Field, Hlong BitsPerChannel, const char* ColorSpace, double Generic, const char* ExternalTrigger, const char* CameraType, const char* Device, Hlong Port, Hlong LineIn);
159
+
160
+#ifdef _WIN32
161
+  // Open and configure an image acquisition device.
162
+  void OpenFramegrabber(const wchar_t* Name, Hlong HorizontalResolution, Hlong VerticalResolution, Hlong ImageWidth, Hlong ImageHeight, Hlong StartRow, Hlong StartColumn, const wchar_t* Field, Hlong BitsPerChannel, const wchar_t* ColorSpace, double Generic, const wchar_t* ExternalTrigger, const wchar_t* CameraType, const wchar_t* Device, Hlong Port, Hlong LineIn);
163
+#endif
164
+
165
+  // Query look-up table of the image acquisition device.
166
+  void GetFramegrabberLut(HTuple* ImageRed, HTuple* ImageGreen, HTuple* ImageBlue) const;
167
+
168
+  // Set look-up table of the image acquisition device.
169
+  void SetFramegrabberLut(const HTuple& ImageRed, const HTuple& ImageGreen, const HTuple& ImageBlue) const;
170
+
171
+};
172
+
173
+// forward declarations and types for internal array implementation
174
+
175
+template<class T> class HSmartPtr;
176
+template<class T> class HHandleBaseArrayRef;
177
+
178
+typedef HHandleBaseArrayRef<HFramegrabber> HFramegrabberArrayRef;
179
+typedef HSmartPtr< HFramegrabberArrayRef > HFramegrabberArrayPtr;
180
+
181
+
182
+// Represents multiple tool instances
183
+class LIntExport HFramegrabberArray : public HHandleBaseArray
184
+{
185
+
186
+public:
187
+
188
+  // Create empty array
189
+  HFramegrabberArray();
190
+
191
+  // Create array from native array of tool instances
192
+  HFramegrabberArray(HFramegrabber* classes, Hlong length);
193
+
194
+  // Copy constructor
195
+  HFramegrabberArray(const HFramegrabberArray &tool_array);
196
+
197
+  // Destructor
198
+  virtual ~HFramegrabberArray();
199
+
200
+  // Assignment operator
201
+  HFramegrabberArray &operator=(const HFramegrabberArray &tool_array);
202
+
203
+  // Clears array and all tool instances
204
+  virtual void Clear();
205
+
206
+  // Get array of native tool instances
207
+  const HFramegrabber* Tools() const;
208
+
209
+  // Get number of tools
210
+  virtual Hlong Length() const;
211
+
212
+  // Create tool array from tuple of handles
213
+  virtual void SetFromTuple(const HTuple& handles);
214
+
215
+  // Get tuple of handles for tool array
216
+  virtual HTuple ConvertToTuple() const;
217
+
218
+protected:
219
+
220
+// Smart pointer to internal data container
221
+   HFramegrabberArrayPtr *mArrayPtr;
222
+};
223
+
224
+}
225
+
226
+#endif

+ 233 - 0
3rdparty/include22/halcon/halconcpp/HFunction1D.h

@@ -0,0 +1,233 @@
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
+
8
+
9
+#ifndef HCPP_HFUNCTION1D
10
+#define HCPP_HFUNCTION1D
11
+
12
+namespace HalconCpp
13
+{
14
+
15
+// Represents an instance of a 1d function.
16
+class LIntExport HFunction1D : public HDataBase
17
+{
18
+
19
+public:
20
+
21
+  // Create an uninitialized instance
22
+  HFunction1D():HDataBase() {}
23
+
24
+  // Copy constructor
25
+  HFunction1D(const HFunction1D& source) : HDataBase(source) {}
26
+
27
+
28
+
29
+/*****************************************************************************
30
+ * Operator-based class constructors
31
+ *****************************************************************************/
32
+
33
+  // create_funct_1d_array: Create a function from a sequence of y values.
34
+  explicit HFunction1D(const HTuple& YValues);
35
+
36
+  // create_funct_1d_array: Create a function from a sequence of y values.
37
+  explicit HFunction1D(double YValues);
38
+
39
+  // create_funct_1d_pairs: Create a function from a set of (x,y) pairs.
40
+  explicit HFunction1D(const HTuple& XValues, const HTuple& YValues);
41
+
42
+  // create_funct_1d_pairs: Create a function from a set of (x,y) pairs.
43
+  explicit HFunction1D(double XValues, double YValues);
44
+
45
+
46
+/*****************************************************************************
47
+ * Operator overloads (non-member overloads reside in HOperatorOverloads.h)  *
48
+ *****************************************************************************/
49
+
50
+  // Negate function
51
+  HFunction1D operator - () const;
52
+
53
+  // Invert function
54
+  HFunction1D operator ! () const;
55
+
56
+
57
+  /***************************************************************************
58
+   * Operators                                                               *
59
+   ***************************************************************************/
60
+
61
+  // Plot a function using gnuplot.
62
+  void GnuplotPlotFunct1d(const HGnuplot& GnuplotFileID) const;
63
+
64
+  // Compose two functions.
65
+  HFunction1D ComposeFunct1d(const HFunction1D& Function2, const HString& Border) const;
66
+
67
+  // Compose two functions.
68
+  HFunction1D ComposeFunct1d(const HFunction1D& Function2, const char* Border) const;
69
+
70
+#ifdef _WIN32
71
+  // Compose two functions.
72
+  HFunction1D ComposeFunct1d(const HFunction1D& Function2, const wchar_t* Border) const;
73
+#endif
74
+
75
+  // Calculate the inverse of a function.
76
+  HFunction1D InvertFunct1d() const;
77
+
78
+  // Calculate the derivatives of a function.
79
+  HFunction1D DerivateFunct1d(const HString& Mode) const;
80
+
81
+  // Calculate the derivatives of a function.
82
+  HFunction1D DerivateFunct1d(const char* Mode) const;
83
+
84
+#ifdef _WIN32
85
+  // Calculate the derivatives of a function.
86
+  HFunction1D DerivateFunct1d(const wchar_t* Mode) const;
87
+#endif
88
+
89
+  // Calculate the local minimum and maximum points of a function.
90
+  void LocalMinMaxFunct1d(const HString& Mode, const HString& Interpolation, HTuple* Min, HTuple* Max) const;
91
+
92
+  // Calculate the local minimum and maximum points of a function.
93
+  void LocalMinMaxFunct1d(const char* Mode, const char* Interpolation, HTuple* Min, HTuple* Max) const;
94
+
95
+#ifdef _WIN32
96
+  // Calculate the local minimum and maximum points of a function.
97
+  void LocalMinMaxFunct1d(const wchar_t* Mode, const wchar_t* Interpolation, HTuple* Min, HTuple* Max) const;
98
+#endif
99
+
100
+  // Calculate the zero crossings of a function.
101
+  HTuple ZeroCrossingsFunct1d() const;
102
+
103
+  // Multiplication and addition of the y values.
104
+  HFunction1D ScaleYFunct1d(double Mult, double Add) const;
105
+
106
+  // Negation of the y values.
107
+  HFunction1D NegateFunct1d() const;
108
+
109
+  // Absolute value of the y values.
110
+  HFunction1D AbsFunct1d() const;
111
+
112
+  // Return the value of a function at an arbitrary position.
113
+  HTuple GetYValueFunct1d(const HTuple& X, const HString& Border) const;
114
+
115
+  // Return the value of a function at an arbitrary position.
116
+  double GetYValueFunct1d(double X, const HString& Border) const;
117
+
118
+  // Return the value of a function at an arbitrary position.
119
+  double GetYValueFunct1d(double X, const char* Border) const;
120
+
121
+#ifdef _WIN32
122
+  // Return the value of a function at an arbitrary position.
123
+  double GetYValueFunct1d(double X, const wchar_t* Border) const;
124
+#endif
125
+
126
+  // Access a function value using the index of the control points.
127
+  void GetPairFunct1d(const HTuple& Index, HTuple* X, HTuple* Y) const;
128
+
129
+  // Access a function value using the index of the control points.
130
+  void GetPairFunct1d(Hlong Index, double* X, double* Y) const;
131
+
132
+  // Number of control points of the function.
133
+  Hlong NumPointsFunct1d() const;
134
+
135
+  // Smallest and largest y value of the function.
136
+  void YRangeFunct1d(double* YMin, double* YMax) const;
137
+
138
+  // Smallest and largest x value of the function.
139
+  void XRangeFunct1d(double* XMin, double* XMax) const;
140
+
141
+  // Access to the x/y values of a function.
142
+  void Funct1dToPairs(HTuple* XValues, HTuple* YValues) const;
143
+
144
+  // Sample a function equidistantly in an interval.
145
+  HFunction1D SampleFunct1d(const HTuple& XMin, const HTuple& XMax, const HTuple& XDist, const HString& Border) const;
146
+
147
+  // Sample a function equidistantly in an interval.
148
+  HFunction1D SampleFunct1d(double XMin, double XMax, double XDist, const HString& Border) const;
149
+
150
+  // Sample a function equidistantly in an interval.
151
+  HFunction1D SampleFunct1d(double XMin, double XMax, double XDist, const char* Border) const;
152
+
153
+#ifdef _WIN32
154
+  // Sample a function equidistantly in an interval.
155
+  HFunction1D SampleFunct1d(double XMin, double XMax, double XDist, const wchar_t* Border) const;
156
+#endif
157
+
158
+  // Transform a function using given transformation parameters.
159
+  HFunction1D TransformFunct1d(const HTuple& Params) const;
160
+
161
+  // Calculate transformation parameters between two functions.
162
+  HTuple MatchFunct1dTrans(const HFunction1D& Function2, const HString& Border, const HTuple& ParamsConst, const HTuple& UseParams, double* ChiSquare, HTuple* Covar) const;
163
+
164
+  // Calculate transformation parameters between two functions.
165
+  HTuple MatchFunct1dTrans(const HFunction1D& Function2, const char* Border, const HTuple& ParamsConst, const HTuple& UseParams, double* ChiSquare, HTuple* Covar) const;
166
+
167
+#ifdef _WIN32
168
+  // Calculate transformation parameters between two functions.
169
+  HTuple MatchFunct1dTrans(const HFunction1D& Function2, const wchar_t* Border, const HTuple& ParamsConst, const HTuple& UseParams, double* ChiSquare, HTuple* Covar) const;
170
+#endif
171
+
172
+  // Compute the distance of two functions.
173
+  HTuple DistanceFunct1d(const HFunction1D& Function2, const HTuple& Mode, const HTuple& Sigma) const;
174
+
175
+  // Compute the distance of two functions.
176
+  HTuple DistanceFunct1d(const HFunction1D& Function2, const HString& Mode, double Sigma) const;
177
+
178
+  // Compute the distance of two functions.
179
+  HTuple DistanceFunct1d(const HFunction1D& Function2, const char* Mode, double Sigma) const;
180
+
181
+#ifdef _WIN32
182
+  // Compute the distance of two functions.
183
+  HTuple DistanceFunct1d(const HFunction1D& Function2, const wchar_t* Mode, double Sigma) const;
184
+#endif
185
+
186
+  // Smooth an equidistant 1D function with a Gaussian function.
187
+  HFunction1D SmoothFunct1dGauss(double Sigma) const;
188
+
189
+  // Compute the positive and negative areas of a function.
190
+  double IntegrateFunct1d(HTuple* Negative) const;
191
+
192
+  // Read a function from a file.
193
+  void ReadFunct1d(const HString& FileName);
194
+
195
+  // Read a function from a file.
196
+  void ReadFunct1d(const char* FileName);
197
+
198
+#ifdef _WIN32
199
+  // Read a function from a file.
200
+  void ReadFunct1d(const wchar_t* FileName);
201
+#endif
202
+
203
+  // Write a function to a file.
204
+  void WriteFunct1d(const HString& FileName) const;
205
+
206
+  // Write a function to a file.
207
+  void WriteFunct1d(const char* FileName) const;
208
+
209
+#ifdef _WIN32
210
+  // Write a function to a file.
211
+  void WriteFunct1d(const wchar_t* FileName) const;
212
+#endif
213
+
214
+  // Create a function from a sequence of y values.
215
+  void CreateFunct1dArray(const HTuple& YValues);
216
+
217
+  // Create a function from a sequence of y values.
218
+  void CreateFunct1dArray(double YValues);
219
+
220
+  // Create a function from a set of (x,y) pairs.
221
+  void CreateFunct1dPairs(const HTuple& XValues, const HTuple& YValues);
222
+
223
+  // Create a function from a set of (x,y) pairs.
224
+  void CreateFunct1dPairs(double XValues, double YValues);
225
+
226
+  // Smooth an equidistant 1D function by averaging its values.
227
+  HFunction1D SmoothFunct1dMean(Hlong SmoothSize, Hlong Iterations) const;
228
+
229
+};
230
+
231
+}
232
+
233
+#endif

+ 149 - 0
3rdparty/include22/halcon/halconcpp/HGnuplot.h

@@ -0,0 +1,149 @@
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
+
8
+
9
+#ifndef HCPP_HGNUPLOT
10
+#define HCPP_HGNUPLOT
11
+
12
+namespace HalconCpp
13
+{
14
+
15
+// Represents an instance of a connection to a gnuplot process.
16
+class LIntExport HGnuplot : public HHandle
17
+{
18
+
19
+public:
20
+
21
+  // Create an uninitialized instance
22
+  HGnuplot():HHandle() {}
23
+
24
+  // Copy constructor
25
+  HGnuplot(const HGnuplot& source) : HHandle(source) {}
26
+
27
+  // Copy constructor
28
+  HGnuplot(const HHandle& handle);
29
+
30
+  // Create HGnuplot from handle, taking ownership
31
+  explicit HGnuplot(Hlong handle);
32
+
33
+  bool operator==(const HHandle& obj) const
34
+  {
35
+    return HHandleBase::operator==(obj);
36
+  }
37
+
38
+  bool operator!=(const HHandle& obj) const
39
+  {
40
+    return HHandleBase::operator!=(obj);
41
+  }
42
+
43
+protected:
44
+
45
+  // Verify matching semantic type ('gnuplot')!
46
+  virtual void AssertType(Hphandle handle) const;
47
+
48
+public:
49
+
50
+
51
+
52
+
53
+  /***************************************************************************
54
+   * Operators                                                               *
55
+   ***************************************************************************/
56
+
57
+  // Plot a function using gnuplot.
58
+  void GnuplotPlotFunct1d(const HFunction1D& Function) const;
59
+
60
+  // Plot control values using gnuplot.
61
+  void GnuplotPlotCtrl(const HTuple& Values) const;
62
+
63
+  // Visualize images using gnuplot.
64
+  void GnuplotPlotImage(const HImage& Image, Hlong SamplesX, Hlong SamplesY, const HTuple& ViewRotX, const HTuple& ViewRotZ, const HString& Hidden3D) const;
65
+
66
+  // Visualize images using gnuplot.
67
+  void GnuplotPlotImage(const HImage& Image, Hlong SamplesX, Hlong SamplesY, double ViewRotX, double ViewRotZ, const HString& Hidden3D) const;
68
+
69
+  // Visualize images using gnuplot.
70
+  void GnuplotPlotImage(const HImage& Image, Hlong SamplesX, Hlong SamplesY, double ViewRotX, double ViewRotZ, const char* Hidden3D) const;
71
+
72
+#ifdef _WIN32
73
+  // Visualize images using gnuplot.
74
+  void GnuplotPlotImage(const HImage& Image, Hlong SamplesX, Hlong SamplesY, double ViewRotX, double ViewRotZ, const wchar_t* Hidden3D) const;
75
+#endif
76
+
77
+  // Close all open gnuplot files or terminate an active gnuplot sub-process.
78
+  void GnuplotClose() const;
79
+
80
+  // Open a gnuplot file for visualization of images and control values.
81
+  void GnuplotOpenFile(const HString& FileName);
82
+
83
+  // Open a gnuplot file for visualization of images and control values.
84
+  void GnuplotOpenFile(const char* FileName);
85
+
86
+#ifdef _WIN32
87
+  // Open a gnuplot file for visualization of images and control values.
88
+  void GnuplotOpenFile(const wchar_t* FileName);
89
+#endif
90
+
91
+  // Open a pipe to a gnuplot process for visualization of images and control values.
92
+  void GnuplotOpenPipe();
93
+
94
+};
95
+
96
+// forward declarations and types for internal array implementation
97
+
98
+template<class T> class HSmartPtr;
99
+template<class T> class HHandleBaseArrayRef;
100
+
101
+typedef HHandleBaseArrayRef<HGnuplot> HGnuplotArrayRef;
102
+typedef HSmartPtr< HGnuplotArrayRef > HGnuplotArrayPtr;
103
+
104
+
105
+// Represents multiple tool instances
106
+class LIntExport HGnuplotArray : public HHandleBaseArray
107
+{
108
+
109
+public:
110
+
111
+  // Create empty array
112
+  HGnuplotArray();
113
+
114
+  // Create array from native array of tool instances
115
+  HGnuplotArray(HGnuplot* classes, Hlong length);
116
+
117
+  // Copy constructor
118
+  HGnuplotArray(const HGnuplotArray &tool_array);
119
+
120
+  // Destructor
121
+  virtual ~HGnuplotArray();
122
+
123
+  // Assignment operator
124
+  HGnuplotArray &operator=(const HGnuplotArray &tool_array);
125
+
126
+  // Clears array and all tool instances
127
+  virtual void Clear();
128
+
129
+  // Get array of native tool instances
130
+  const HGnuplot* Tools() const;
131
+
132
+  // Get number of tools
133
+  virtual Hlong Length() const;
134
+
135
+  // Create tool array from tuple of handles
136
+  virtual void SetFromTuple(const HTuple& handles);
137
+
138
+  // Get tuple of handles for tool array
139
+  virtual HTuple ConvertToTuple() const;
140
+
141
+protected:
142
+
143
+// Smart pointer to internal data container
144
+   HGnuplotArrayPtr *mArrayPtr;
145
+};
146
+
147
+}
148
+
149
+#endif

+ 138 - 0
3rdparty/include22/halcon/halconcpp/HHandle.h

@@ -0,0 +1,138 @@
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
+
8
+
9
+#ifndef HCPP_HHANDLE
10
+#define HCPP_HHANDLE
11
+
12
+namespace HalconCpp
13
+{
14
+
15
+// Represents a generic instance of a handle.
16
+class LIntExport HHandle : public HHandleBase
17
+{
18
+
19
+public:
20
+
21
+  // Create an uninitialized instance
22
+  HHandle():HHandleBase() {}
23
+
24
+  // Copy constructor
25
+  HHandle(const HHandle& source) : HHandleBase(source) {}
26
+
27
+  friend class HTupleElement;
28
+  // Create HHandle from handle, taking ownership
29
+  explicit HHandle(Hlong handle);
30
+
31
+  bool operator==(const HHandle& obj) const
32
+  {
33
+    return HHandleBase::operator==(obj);
34
+  }
35
+
36
+  bool operator!=(const HHandle& obj) const
37
+  {
38
+    return HHandleBase::operator!=(obj);
39
+  }
40
+
41
+protected:
42
+
43
+  // Internal Hphandle constructor
44
+  HHandle(const Hphandle handle, bool copy): HHandleBase(handle,copy) {}
45
+
46
+  // Verify matching semantic type ('handle')!
47
+  virtual void AssertType(Hphandle handle) const;
48
+
49
+public:
50
+
51
+  // Deep copy of all data represented by this object instance
52
+  HHandle Clone() const;
53
+
54
+
55
+
56
+
57
+  /***************************************************************************
58
+   * Operators                                                               *
59
+   ***************************************************************************/
60
+
61
+  // Clear the content of a handle. 
62
+  void ClearHandle() const;
63
+
64
+  // Deserialize a serialized item. 
65
+  void DeserializeHandle(const HSerializedItem& SerializedItem);
66
+
67
+  // Serialize the content of a handle. 
68
+  HSerializedItem SerializeHandle() const;
69
+
70
+  // Test if a tuple is serializable.
71
+  Hlong TupleIsSerializable() const;
72
+
73
+  // Check if a handle is valid. 
74
+  HTuple TupleIsValidHandle() const;
75
+
76
+  // Return the semantic type of a tuple.
77
+  HString TupleSemType() const;
78
+
79
+};
80
+
81
+#if defined(HCPP_LEGACY_HANDLE_API)
82
+  typedef HHandle HToolBase;
83
+#endif
84
+
85
+// forward declarations and types for internal array implementation
86
+
87
+template<class T> class HSmartPtr;
88
+template<class T> class HHandleBaseArrayRef;
89
+
90
+typedef HHandleBaseArrayRef<HHandle> HHandleArrayRef;
91
+typedef HSmartPtr< HHandleArrayRef > HHandleArrayPtr;
92
+
93
+
94
+// Represents multiple tool instances
95
+class LIntExport HHandleArray : public HHandleBaseArray
96
+{
97
+
98
+public:
99
+
100
+  // Create empty array
101
+  HHandleArray();
102
+
103
+  // Create array from native array of tool instances
104
+  HHandleArray(HHandle* classes, Hlong length);
105
+
106
+  // Copy constructor
107
+  HHandleArray(const HHandleArray &tool_array);
108
+
109
+  // Destructor
110
+  virtual ~HHandleArray();
111
+
112
+  // Assignment operator
113
+  HHandleArray &operator=(const HHandleArray &tool_array);
114
+
115
+  // Clears array and all tool instances
116
+  virtual void Clear();
117
+
118
+  // Get array of native tool instances
119
+  const HHandle* Tools() const;
120
+
121
+  // Get number of tools
122
+  virtual Hlong Length() const;
123
+
124
+  // Create tool array from tuple of handles
125
+  virtual void SetFromTuple(const HTuple& handles);
126
+
127
+  // Get tuple of handles for tool array
128
+  virtual HTuple ConvertToTuple() const;
129
+
130
+protected:
131
+
132
+// Smart pointer to internal data container
133
+   HHandleArrayPtr *mArrayPtr;
134
+};
135
+
136
+}
137
+
138
+#endif

+ 183 - 0
3rdparty/include22/halcon/halconcpp/HHandleBase.h

@@ -0,0 +1,183 @@
1
+/*****************************************************************************
2
+ * HHandleBase.h
3
+ *****************************************************************************
4
+ *
5
+ * Project:     HALCON/C++
6
+ * Description: Base class for wrapping all handle types
7
+ *
8
+ * (c) 2017-2020 by MVTec Software GmbH
9
+ *                  www.mvtec.com
10
+ *
11
+ *****************************************************************************
12
+ *
13
+ *
14
+ *****************************************************************************/
15
+
16
+#ifndef HCPP_HANDLE_BASE_H
17
+#define HCPP_HANDLE_BASE_H
18
+
19
+#include "Halcon.h"
20
+
21
+#include "halconcpp/HString.h"
22
+
23
+namespace HalconCpp
24
+{
25
+
26
+class LIntExport HHandleBase
27
+{
28
+
29
+friend class HTuple;
30
+friend class HTupleElement;
31
+friend class HalconAPI;
32
+friend class HalconAPIInternal;
33
+
34
+public:
35
+
36
+  // Create an uninitialized handle
37
+  HHandleBase();
38
+
39
+  // Creation from numeric handle, for interacting with legacy code
40
+  // or for transferring handle across language interface boundaries
41
+  explicit HHandleBase(Hlong handle);
42
+
43
+  // Copy constructor
44
+  HHandleBase(const HHandleBase &handle);
45
+
46
+  // Destructor
47
+  virtual ~HHandleBase();
48
+
49
+  // Set from numeric handle, for interacting with legacy code or
50
+  // for transferring handle across language interface boundaries
51
+  void SetHandle(Hlong handle);
52
+
53
+  // Return the managed handle
54
+  Hlong GetHandle() const;
55
+
56
+  // Return true if this handle instance manages a valid handle. Returns
57
+  // false if the managed handle has already been destroyed or when this
58
+  // instance manages no handle (uninitialized or cleared). Equivalent to
59
+  // new HALCON operator HandleIsValid but kept for convenience of having
60
+  // boolean signature and backwards compatible name.
61
+  bool IsInitialized() const;
62
+
63
+  // Return a textual representation of the handle. This is mainly for
64
+  // logging and debugging purposes, result should not be parsed and text
65
+  // format may change in the future.
66
+  HString ToString() const;
67
+
68
+  // Release the managed handle (decreases reference count of handle)
69
+  void Clear();
70
+
71
+
72
+  /******************************************************************/
73
+  /* Operator overloads                                             */
74
+  /******************************************************************/
75
+
76
+  // Assignment
77
+  HHandleBase& operator = (const HHandleBase& obj);
78
+
79
+  // Comparison
80
+  bool operator==(const HHandleBase& obj) const;
81
+  bool operator!=(const HHandleBase& obj) const;
82
+
83
+#if defined(HCPP_LEGACY_HANDLE_API)
84
+
85
+  // Extraction to long is now rare use case and should be done explicitely
86
+  operator Hlong() const;
87
+
88
+  // For all practical purposes now handled by HHandle constructor of HTuple
89
+  operator HTuple() const;
90
+
91
+#endif
92
+
93
+
94
+  /******************************************************************/
95
+  /* Internal operations, exposed for use by extension package only */
96
+  /******************************************************************/
97
+
98
+  // Load output handle from HALCON operator call
99
+  void   Load(Hproc_handle proc, HINT par_index, Herror err) const;
100
+
101
+  // Store as input handle for HALCON operator call
102
+  Herror Store(Hproc_handle proc, HINT par_index) const;
103
+
104
+
105
+  /******************************************************************/
106
+  /* Legacy handle management                                       */
107
+  /******************************************************************/
108
+
109
+#if defined(HCPP_LEGACY_HANDLE_API)
110
+
111
+  // Not useful with new reference counting mechanism
112
+  void Detach();
113
+
114
+  // Not useful with new reference counting mechanism
115
+  void InvalidateHandle();
116
+
117
+  // Deprecated, replaced by IsInitialized
118
+  bool IsToolValid() const { return IsInitialized(); };
119
+
120
+#endif
121
+
122
+
123
+protected:
124
+
125
+  // Over management of input handle
126
+  HHandleBase(Hphandle handle, bool copy);
127
+
128
+  // Return the managed handle
129
+  Hphandle GetHandleInternal() const;
130
+
131
+  // For copy=false takes over management of input handle
132
+  void SetHandleInternal(Hphandle handle, bool copy);
133
+
134
+  // Verify type of external handle, raise exception on mismatch
135
+  virtual void AssertType(Hphandle handle) const;
136
+
137
+  // Verify type of wrapped handle, raise exception on mismatch
138
+  void AssertType() const;
139
+
140
+
141
+protected:
142
+
143
+  static const Hphandle HANDLE_INVALID;
144
+
145
+  Hphandle mHandle;
146
+
147
+};
148
+
149
+
150
+
151
+// Base class for actual tool array classes
152
+
153
+class LIntExport HHandleBaseArray
154
+{
155
+
156
+public:
157
+
158
+  // Destructor
159
+  virtual ~HHandleBaseArray() {};
160
+
161
+  // Clears array and all tool instances
162
+  virtual void Clear() = 0;
163
+
164
+  // Get number of tools
165
+  virtual Hlong Length() const = 0;
166
+
167
+  // Create tool array from tuple of handles
168
+  virtual void SetFromTuple(const HTuple& handles) = 0;
169
+
170
+  // Get tuple of handles for tool array
171
+  virtual HTuple ConvertToTuple() const = 0;
172
+
173
+};
174
+
175
+// Forward declaration
176
+class HHandle;
177
+
178
+// Constant for supporting export of HNULL literal from HDevelop
179
+extern const LIntExport HHandle HNULL;
180
+
181
+}
182
+
183
+#endif

文件差异内容过多而无法显示
+ 533 - 0
3rdparty/include22/halcon/halconcpp/HHomMat2D.h


+ 187 - 0
3rdparty/include22/halcon/halconcpp/HHomMat3D.h

@@ -0,0 +1,187 @@
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
+
8
+
9
+#ifndef HCPP_HHOMMAT3D
10
+#define HCPP_HHOMMAT3D
11
+
12
+namespace HalconCpp
13
+{
14
+
15
+// Represents a homogeneous 3D transformation matrix.
16
+class LIntExport HHomMat3D : public HDataBase
17
+{
18
+
19
+public:
20
+
21
+  // Copy constructor
22
+  HHomMat3D(const HHomMat3D& source) : HDataBase(source) {}
23
+
24
+  // Constructor from HTuple
25
+  explicit HHomMat3D(const HTuple& tuple) : HDataBase(tuple) {}
26
+
27
+  // Deep copy of all data represented by this object instance
28
+  HHomMat3D Clone() const;
29
+
30
+
31
+
32
+/*****************************************************************************
33
+ * Operator-based class constructors
34
+ *****************************************************************************/
35
+
36
+  // hom_mat3d_identity: Generate the homogeneous transformation matrix of the identical 3D transformation.
37
+  explicit HHomMat3D();
38
+
39
+
40
+
41
+
42
+  /***************************************************************************
43
+   * Operators                                                               *
44
+   ***************************************************************************/
45
+
46
+  // Deserialize a serialized homogeneous 3D transformation matrix.
47
+  void DeserializeHomMat3d(const HSerializedItem& SerializedItemHandle);
48
+
49
+  // Serialize a homogeneous 3D transformation matrix.
50
+  HSerializedItem SerializeHomMat3d() const;
51
+
52
+  // Project a homogeneous 3D point using a projective transformation matrix.
53
+  HTuple ProjectiveTransHomPoint3d(const HTuple& Px, const HTuple& Py, const HTuple& Pz, const HTuple& Pw, HTuple* Qy, HTuple* Qz, HTuple* Qw) const;
54
+
55
+  // Project a homogeneous 3D point using a projective transformation matrix.
56
+  double ProjectiveTransHomPoint3d(double Px, double Py, double Pz, double Pw, double* Qy, double* Qz, double* Qw) const;
57
+
58
+  // Project a 3D point using a projective transformation matrix.
59
+  HTuple ProjectiveTransPoint3d(const HTuple& Px, const HTuple& Py, const HTuple& Pz, HTuple* Qy, HTuple* Qz) const;
60
+
61
+  // Project a 3D point using a projective transformation matrix.
62
+  double ProjectiveTransPoint3d(double Px, double Py, double Pz, double* Qy, double* Qz) const;
63
+
64
+  // Apply an arbitrary affine 3D transformation to points.
65
+  HTuple AffineTransPoint3d(const HTuple& Px, const HTuple& Py, const HTuple& Pz, HTuple* Qy, HTuple* Qz) const;
66
+
67
+  // Apply an arbitrary affine 3D transformation to points.
68
+  double AffineTransPoint3d(double Px, double Py, double Pz, double* Qy, double* Qz) const;
69
+
70
+  // Approximate a 3D transformation from point correspondences.
71
+  void VectorToHomMat3d(const HString& TransformationType, const HTuple& Px, const HTuple& Py, const HTuple& Pz, const HTuple& Qx, const HTuple& Qy, const HTuple& Qz);
72
+
73
+  // Approximate a 3D transformation from point correspondences.
74
+  void VectorToHomMat3d(const char* TransformationType, const HTuple& Px, const HTuple& Py, const HTuple& Pz, const HTuple& Qx, const HTuple& Qy, const HTuple& Qz);
75
+
76
+#ifdef _WIN32
77
+  // Approximate a 3D transformation from point correspondences.
78
+  void VectorToHomMat3d(const wchar_t* TransformationType, const HTuple& Px, const HTuple& Py, const HTuple& Pz, const HTuple& Qx, const HTuple& Qy, const HTuple& Qz);
79
+#endif
80
+
81
+  // Compute the determinant of a homogeneous 3D transformation matrix.
82
+  double HomMat3dDeterminant() const;
83
+
84
+  // Transpose a homogeneous 3D transformation matrix.
85
+  HHomMat3D HomMat3dTranspose() const;
86
+
87
+  // Invert a homogeneous 3D transformation matrix.
88
+  HHomMat3D HomMat3dInvert() const;
89
+
90
+  // Multiply two homogeneous 3D transformation matrices.
91
+  HHomMat3D HomMat3dCompose(const HHomMat3D& HomMat3DRight) const;
92
+
93
+  // Add a rotation to a homogeneous 3D transformation matrix.
94
+  HHomMat3D HomMat3dRotateLocal(const HTuple& Phi, const HTuple& Axis) const;
95
+
96
+  // Add a rotation to a homogeneous 3D transformation matrix.
97
+  HHomMat3D HomMat3dRotateLocal(double Phi, const HString& Axis) const;
98
+
99
+  // Add a rotation to a homogeneous 3D transformation matrix.
100
+  HHomMat3D HomMat3dRotateLocal(double Phi, const char* Axis) const;
101
+
102
+#ifdef _WIN32
103
+  // Add a rotation to a homogeneous 3D transformation matrix.
104
+  HHomMat3D HomMat3dRotateLocal(double Phi, const wchar_t* Axis) const;
105
+#endif
106
+
107
+  // Add a rotation to a homogeneous 3D transformation matrix.
108
+  HHomMat3D HomMat3dRotate(const HTuple& Phi, const HTuple& Axis, const HTuple& Px, const HTuple& Py, const HTuple& Pz) const;
109
+
110
+  // Add a rotation to a homogeneous 3D transformation matrix.
111
+  HHomMat3D HomMat3dRotate(double Phi, const HString& Axis, double Px, double Py, double Pz) const;
112
+
113
+  // Add a rotation to a homogeneous 3D transformation matrix.
114
+  HHomMat3D HomMat3dRotate(double Phi, const char* Axis, double Px, double Py, double Pz) const;
115
+
116
+#ifdef _WIN32
117
+  // Add a rotation to a homogeneous 3D transformation matrix.
118
+  HHomMat3D HomMat3dRotate(double Phi, const wchar_t* Axis, double Px, double Py, double Pz) const;
119
+#endif
120
+
121
+  // Add a scaling to a homogeneous 3D transformation matrix.
122
+  HHomMat3D HomMat3dScaleLocal(const HTuple& Sx, const HTuple& Sy, const HTuple& Sz) const;
123
+
124
+  // Add a scaling to a homogeneous 3D transformation matrix.
125
+  HHomMat3D HomMat3dScaleLocal(double Sx, double Sy, double Sz) const;
126
+
127
+  // Add a scaling to a homogeneous 3D transformation matrix.
128
+  HHomMat3D HomMat3dScale(const HTuple& Sx, const HTuple& Sy, const HTuple& Sz, const HTuple& Px, const HTuple& Py, const HTuple& Pz) const;
129
+
130
+  // Add a scaling to a homogeneous 3D transformation matrix.
131
+  HHomMat3D HomMat3dScale(double Sx, double Sy, double Sz, double Px, double Py, double Pz) const;
132
+
133
+  // Add a translation to a homogeneous 3D transformation matrix.
134
+  HHomMat3D HomMat3dTranslateLocal(const HTuple& Tx, const HTuple& Ty, const HTuple& Tz) const;
135
+
136
+  // Add a translation to a homogeneous 3D transformation matrix.
137
+  HHomMat3D HomMat3dTranslateLocal(double Tx, double Ty, double Tz) const;
138
+
139
+  // Add a translation to a homogeneous 3D transformation matrix.
140
+  HHomMat3D HomMat3dTranslate(const HTuple& Tx, const HTuple& Ty, const HTuple& Tz) const;
141
+
142
+  // Add a translation to a homogeneous 3D transformation matrix.
143
+  HHomMat3D HomMat3dTranslate(double Tx, double Ty, double Tz) const;
144
+
145
+  // Generate the homogeneous transformation matrix of the identical 3D transformation.
146
+  void HomMat3dIdentity();
147
+
148
+  // Project an affine 3D transformation matrix to a 2D projective transformation matrix.
149
+  HHomMat2D HomMat3dProject(const HTuple& PrincipalPointRow, const HTuple& PrincipalPointCol, const HTuple& Focus) const;
150
+
151
+  // Project an affine 3D transformation matrix to a 2D projective transformation matrix.
152
+  HHomMat2D HomMat3dProject(double PrincipalPointRow, double PrincipalPointCol, double Focus) const;
153
+
154
+  // Project a homogeneous 3D point using a 3x4 projection matrix.
155
+  HTuple ProjectHomPointHomMat3d(const HTuple& Px, const HTuple& Py, const HTuple& Pz, const HTuple& Pw, HTuple* Qy, HTuple* Qw) const;
156
+
157
+  // Project a homogeneous 3D point using a 3x4 projection matrix.
158
+  double ProjectHomPointHomMat3d(double Px, double Py, double Pz, double Pw, double* Qy, double* Qw) const;
159
+
160
+  // Project a 3D point using a 3x4 projection matrix.
161
+  HTuple ProjectPointHomMat3d(const HTuple& Px, const HTuple& Py, const HTuple& Pz, HTuple* Qy) const;
162
+
163
+  // Project a 3D point using a 3x4 projection matrix.
164
+  double ProjectPointHomMat3d(double Px, double Py, double Pz, double* Qy) const;
165
+
166
+  // Convert a homogeneous transformation matrix into a 3D pose.
167
+  HPose HomMat3dToPose() const;
168
+
169
+};
170
+
171
+class LIntExport HHomMat3DArray : public HDataArray
172
+{
173
+public:
174
+  HHomMat3DArray();
175
+  HHomMat3DArray(HHomMat3D* classes, Hlong length);
176
+  /* Define a default constructor to prevent compilers that support
177
+   * C++11 R-Value References v3.0 declaring an implicite move
178
+   * assignment/constructor. */
179
+  ~HHomMat3DArray() {}
180
+protected:
181
+  virtual void CreateArray(Hlong length);
182
+  virtual int GetFixedSize() const;
183
+};
184
+
185
+}
186
+
187
+#endif

+ 195 - 0
3rdparty/include22/halcon/halconcpp/HIOChannel.h

@@ -0,0 +1,195 @@
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
+
8
+
9
+#ifndef HCPP_HIOCHANNEL
10
+#define HCPP_HIOCHANNEL
11
+
12
+namespace HalconCpp
13
+{
14
+
15
+// Represents an instance of a channel of an I/O device.
16
+class LIntExport HIOChannel : public HHandle
17
+{
18
+
19
+public:
20
+
21
+  // Create an uninitialized instance
22
+  HIOChannel():HHandle() {}
23
+
24
+  // Copy constructor
25
+  HIOChannel(const HIOChannel& source) : HHandle(source) {}
26
+
27
+  // Copy constructor
28
+  HIOChannel(const HHandle& handle);
29
+
30
+  // Create HIOChannel from handle, taking ownership
31
+  explicit HIOChannel(Hlong handle);
32
+
33
+  bool operator==(const HHandle& obj) const
34
+  {
35
+    return HHandleBase::operator==(obj);
36
+  }
37
+
38
+  bool operator!=(const HHandle& obj) const
39
+  {
40
+    return HHandleBase::operator!=(obj);
41
+  }
42
+
43
+protected:
44
+
45
+  // Verify matching semantic type ('io_channel')!
46
+  virtual void AssertType(Hphandle handle) const;
47
+
48
+public:
49
+
50
+
51
+
52
+/*****************************************************************************
53
+ * Operator-based class constructors
54
+ *****************************************************************************/
55
+
56
+  // open_io_channel: Open and configure I/O channels.
57
+  explicit HIOChannel(const HIODevice& IODeviceHandle, const HString& IOChannelName, const HTuple& GenParamName, const HTuple& GenParamValue);
58
+
59
+  // open_io_channel: Open and configure I/O channels.
60
+  explicit HIOChannel(const HIODevice& IODeviceHandle, const char* IOChannelName, const HTuple& GenParamName, const HTuple& GenParamValue);
61
+
62
+#ifdef _WIN32
63
+  // open_io_channel: Open and configure I/O channels.
64
+  explicit HIOChannel(const HIODevice& IODeviceHandle, const wchar_t* IOChannelName, const HTuple& GenParamName, const HTuple& GenParamValue);
65
+#endif
66
+
67
+
68
+
69
+
70
+  /***************************************************************************
71
+   * Operators                                                               *
72
+   ***************************************************************************/
73
+
74
+  // Perform an action on I/O channels.
75
+  static HTuple ControlIoChannel(const HIOChannelArray& IOChannelHandle, const HString& ParamAction, const HTuple& ParamArgument);
76
+
77
+  // Perform an action on I/O channels.
78
+  HTuple ControlIoChannel(const HString& ParamAction, const HTuple& ParamArgument) const;
79
+
80
+  // Perform an action on I/O channels.
81
+  HTuple ControlIoChannel(const char* ParamAction, const HTuple& ParamArgument) const;
82
+
83
+#ifdef _WIN32
84
+  // Perform an action on I/O channels.
85
+  HTuple ControlIoChannel(const wchar_t* ParamAction, const HTuple& ParamArgument) const;
86
+#endif
87
+
88
+  // Write a value to the specified I/O channels.
89
+  static HTuple WriteIoChannel(const HIOChannelArray& IOChannelHandle, const HTuple& Value);
90
+
91
+  // Write a value to the specified I/O channels.
92
+  HTuple WriteIoChannel(const HTuple& Value) const;
93
+
94
+  // Read a value from the specified I/O channels.
95
+  static HTuple ReadIoChannel(const HIOChannelArray& IOChannelHandle, HTuple* Status);
96
+
97
+  // Read a value from the specified I/O channels.
98
+  HTuple ReadIoChannel(HTuple* Status) const;
99
+
100
+  // Set specific parameters of I/O channels.
101
+  static void SetIoChannelParam(const HIOChannelArray& IOChannelHandle, const HTuple& GenParamName, const HTuple& GenParamValue);
102
+
103
+  // Set specific parameters of I/O channels.
104
+  void SetIoChannelParam(const HTuple& GenParamName, const HTuple& GenParamValue) const;
105
+
106
+  // Query specific parameters of I/O channels.
107
+  static HTuple GetIoChannelParam(const HIOChannelArray& IOChannelHandle, const HTuple& GenParamName);
108
+
109
+  // Query specific parameters of I/O channels.
110
+  HTuple GetIoChannelParam(const HString& GenParamName) const;
111
+
112
+  // Query specific parameters of I/O channels.
113
+  HTuple GetIoChannelParam(const char* GenParamName) const;
114
+
115
+#ifdef _WIN32
116
+  // Query specific parameters of I/O channels.
117
+  HTuple GetIoChannelParam(const wchar_t* GenParamName) const;
118
+#endif
119
+
120
+  // Close I/O channels.
121
+  static void CloseIoChannel(const HIOChannelArray& IOChannelHandle);
122
+
123
+  // Close I/O channels.
124
+  void CloseIoChannel() const;
125
+
126
+  // Open and configure I/O channels.
127
+  static HIOChannelArray OpenIoChannel(const HIODevice& IODeviceHandle, const HTuple& IOChannelName, const HTuple& GenParamName, const HTuple& GenParamValue);
128
+
129
+  // Open and configure I/O channels.
130
+  void OpenIoChannel(const HIODevice& IODeviceHandle, const HString& IOChannelName, const HTuple& GenParamName, const HTuple& GenParamValue);
131
+
132
+  // Open and configure I/O channels.
133
+  void OpenIoChannel(const HIODevice& IODeviceHandle, const char* IOChannelName, const HTuple& GenParamName, const HTuple& GenParamValue);
134
+
135
+#ifdef _WIN32
136
+  // Open and configure I/O channels.
137
+  void OpenIoChannel(const HIODevice& IODeviceHandle, const wchar_t* IOChannelName, const HTuple& GenParamName, const HTuple& GenParamValue);
138
+#endif
139
+
140
+};
141
+
142
+// forward declarations and types for internal array implementation
143
+
144
+template<class T> class HSmartPtr;
145
+template<class T> class HHandleBaseArrayRef;
146
+
147
+typedef HHandleBaseArrayRef<HIOChannel> HIOChannelArrayRef;
148
+typedef HSmartPtr< HIOChannelArrayRef > HIOChannelArrayPtr;
149
+
150
+
151
+// Represents multiple tool instances
152
+class LIntExport HIOChannelArray : public HHandleBaseArray
153
+{
154
+
155
+public:
156
+
157
+  // Create empty array
158
+  HIOChannelArray();
159
+
160
+  // Create array from native array of tool instances
161
+  HIOChannelArray(HIOChannel* classes, Hlong length);
162
+
163
+  // Copy constructor
164
+  HIOChannelArray(const HIOChannelArray &tool_array);
165
+
166
+  // Destructor
167
+  virtual ~HIOChannelArray();
168
+
169
+  // Assignment operator
170
+  HIOChannelArray &operator=(const HIOChannelArray &tool_array);
171
+
172
+  // Clears array and all tool instances
173
+  virtual void Clear();
174
+
175
+  // Get array of native tool instances
176
+  const HIOChannel* Tools() const;
177
+
178
+  // Get number of tools
179
+  virtual Hlong Length() const;
180
+
181
+  // Create tool array from tuple of handles
182
+  virtual void SetFromTuple(const HTuple& handles);
183
+
184
+  // Get tuple of handles for tool array
185
+  virtual HTuple ConvertToTuple() const;
186
+
187
+protected:
188
+
189
+// Smart pointer to internal data container
190
+   HIOChannelArrayPtr *mArrayPtr;
191
+};
192
+
193
+}
194
+
195
+#endif

+ 241 - 0
3rdparty/include22/halcon/halconcpp/HIODevice.h

@@ -0,0 +1,241 @@
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
+
8
+
9
+#ifndef HCPP_HIODEVICE
10
+#define HCPP_HIODEVICE
11
+
12
+namespace HalconCpp
13
+{
14
+
15
+// Represents an instance of an I/O device.
16
+class LIntExport HIODevice : public HHandle
17
+{
18
+
19
+public:
20
+
21
+  // Create an uninitialized instance
22
+  HIODevice():HHandle() {}
23
+
24
+  // Copy constructor
25
+  HIODevice(const HIODevice& source) : HHandle(source) {}
26
+
27
+  // Copy constructor
28
+  HIODevice(const HHandle& handle);
29
+
30
+  // Create HIODevice from handle, taking ownership
31
+  explicit HIODevice(Hlong handle);
32
+
33
+  bool operator==(const HHandle& obj) const
34
+  {
35
+    return HHandleBase::operator==(obj);
36
+  }
37
+
38
+  bool operator!=(const HHandle& obj) const
39
+  {
40
+    return HHandleBase::operator!=(obj);
41
+  }
42
+
43
+protected:
44
+
45
+  // Verify matching semantic type ('io_device')!
46
+  virtual void AssertType(Hphandle handle) const;
47
+
48
+public:
49
+
50
+
51
+
52
+/*****************************************************************************
53
+ * Operator-based class constructors
54
+ *****************************************************************************/
55
+
56
+  // open_io_device: Open and configure an I/O device. 
57
+  explicit HIODevice(const HString& IOInterfaceName, const HTuple& IODeviceName, const HTuple& GenParamName, const HTuple& GenParamValue);
58
+
59
+  // open_io_device: Open and configure an I/O device. 
60
+  explicit HIODevice(const char* IOInterfaceName, const HTuple& IODeviceName, const HTuple& GenParamName, const HTuple& GenParamValue);
61
+
62
+#ifdef _WIN32
63
+  // open_io_device: Open and configure an I/O device. 
64
+  explicit HIODevice(const wchar_t* IOInterfaceName, const HTuple& IODeviceName, const HTuple& GenParamName, const HTuple& GenParamValue);
65
+#endif
66
+
67
+
68
+
69
+
70
+  /***************************************************************************
71
+   * Operators                                                               *
72
+   ***************************************************************************/
73
+
74
+  // Open and configure I/O channels.
75
+  HIOChannelArray OpenIoChannel(const HTuple& IOChannelName, const HTuple& GenParamName, const HTuple& GenParamValue) const;
76
+
77
+  // Open and configure I/O channels.
78
+  HIOChannel OpenIoChannel(const HString& IOChannelName, const HTuple& GenParamName, const HTuple& GenParamValue) const;
79
+
80
+  // Open and configure I/O channels.
81
+  HIOChannel OpenIoChannel(const char* IOChannelName, const HTuple& GenParamName, const HTuple& GenParamValue) const;
82
+
83
+#ifdef _WIN32
84
+  // Open and configure I/O channels.
85
+  HIOChannel OpenIoChannel(const wchar_t* IOChannelName, const HTuple& GenParamName, const HTuple& GenParamValue) const;
86
+#endif
87
+
88
+  // Query information about channels of the specified I/O device. 
89
+  HTuple QueryIoDevice(const HTuple& IOChannelName, const HTuple& Query) const;
90
+
91
+  // Query information about channels of the specified I/O device. 
92
+  HTuple QueryIoDevice(const HString& IOChannelName, const HTuple& Query) const;
93
+
94
+  // Query information about channels of the specified I/O device. 
95
+  HTuple QueryIoDevice(const char* IOChannelName, const HTuple& Query) const;
96
+
97
+#ifdef _WIN32
98
+  // Query information about channels of the specified I/O device. 
99
+  HTuple QueryIoDevice(const wchar_t* IOChannelName, const HTuple& Query) const;
100
+#endif
101
+
102
+  // Perform an action on the I/O device.
103
+  HTuple ControlIoDevice(const HString& Action, const HTuple& Argument) const;
104
+
105
+  // Perform an action on the I/O device.
106
+  HTuple ControlIoDevice(const HString& Action, const HString& Argument) const;
107
+
108
+  // Perform an action on the I/O device.
109
+  HTuple ControlIoDevice(const char* Action, const char* Argument) const;
110
+
111
+#ifdef _WIN32
112
+  // Perform an action on the I/O device.
113
+  HTuple ControlIoDevice(const wchar_t* Action, const wchar_t* Argument) const;
114
+#endif
115
+
116
+  // Configure a specific I/O device instance.
117
+  void SetIoDeviceParam(const HTuple& GenParamName, const HTuple& GenParamValue) const;
118
+
119
+  // Configure a specific I/O device instance.
120
+  void SetIoDeviceParam(const HString& GenParamName, const HString& GenParamValue) const;
121
+
122
+  // Configure a specific I/O device instance.
123
+  void SetIoDeviceParam(const char* GenParamName, const char* GenParamValue) const;
124
+
125
+#ifdef _WIN32
126
+  // Configure a specific I/O device instance.
127
+  void SetIoDeviceParam(const wchar_t* GenParamName, const wchar_t* GenParamValue) const;
128
+#endif
129
+
130
+  // Query settings of an I/O device instance. 
131
+  HTuple GetIoDeviceParam(const HTuple& GenParamName) const;
132
+
133
+  // Query settings of an I/O device instance. 
134
+  HTuple GetIoDeviceParam(const HString& GenParamName) const;
135
+
136
+  // Query settings of an I/O device instance. 
137
+  HTuple GetIoDeviceParam(const char* GenParamName) const;
138
+
139
+#ifdef _WIN32
140
+  // Query settings of an I/O device instance. 
141
+  HTuple GetIoDeviceParam(const wchar_t* GenParamName) const;
142
+#endif
143
+
144
+  // Close the specified I/O device. 
145
+  void CloseIoDevice() const;
146
+
147
+  // Open and configure an I/O device. 
148
+  void OpenIoDevice(const HString& IOInterfaceName, const HTuple& IODeviceName, const HTuple& GenParamName, const HTuple& GenParamValue);
149
+
150
+  // Open and configure an I/O device. 
151
+  void OpenIoDevice(const char* IOInterfaceName, const HTuple& IODeviceName, const HTuple& GenParamName, const HTuple& GenParamValue);
152
+
153
+#ifdef _WIN32
154
+  // Open and configure an I/O device. 
155
+  void OpenIoDevice(const wchar_t* IOInterfaceName, const HTuple& IODeviceName, const HTuple& GenParamName, const HTuple& GenParamValue);
156
+#endif
157
+
158
+  // Perform an action on the I/O interface.
159
+  static HTuple ControlIoInterface(const HString& IOInterfaceName, const HString& Action, const HTuple& Argument);
160
+
161
+  // Perform an action on the I/O interface.
162
+  static HTuple ControlIoInterface(const HString& IOInterfaceName, const HString& Action, const HString& Argument);
163
+
164
+  // Perform an action on the I/O interface.
165
+  static HTuple ControlIoInterface(const char* IOInterfaceName, const char* Action, const char* Argument);
166
+
167
+#ifdef _WIN32
168
+  // Perform an action on the I/O interface.
169
+  static HTuple ControlIoInterface(const wchar_t* IOInterfaceName, const wchar_t* Action, const wchar_t* Argument);
170
+#endif
171
+
172
+  // Query information about the specified I/O device interface.
173
+  static HTuple QueryIoInterface(const HString& IOInterfaceName, const HTuple& Query);
174
+
175
+  // Query information about the specified I/O device interface.
176
+  static HTuple QueryIoInterface(const HString& IOInterfaceName, const HString& Query);
177
+
178
+  // Query information about the specified I/O device interface.
179
+  static HTuple QueryIoInterface(const char* IOInterfaceName, const char* Query);
180
+
181
+#ifdef _WIN32
182
+  // Query information about the specified I/O device interface.
183
+  static HTuple QueryIoInterface(const wchar_t* IOInterfaceName, const wchar_t* Query);
184
+#endif
185
+
186
+};
187
+
188
+// forward declarations and types for internal array implementation
189
+
190
+template<class T> class HSmartPtr;
191
+template<class T> class HHandleBaseArrayRef;
192
+
193
+typedef HHandleBaseArrayRef<HIODevice> HIODeviceArrayRef;
194
+typedef HSmartPtr< HIODeviceArrayRef > HIODeviceArrayPtr;
195
+
196
+
197
+// Represents multiple tool instances
198
+class LIntExport HIODeviceArray : public HHandleBaseArray
199
+{
200
+
201
+public:
202
+
203
+  // Create empty array
204
+  HIODeviceArray();
205
+
206
+  // Create array from native array of tool instances
207
+  HIODeviceArray(HIODevice* classes, Hlong length);
208
+
209
+  // Copy constructor
210
+  HIODeviceArray(const HIODeviceArray &tool_array);
211
+
212
+  // Destructor
213
+  virtual ~HIODeviceArray();
214
+
215
+  // Assignment operator
216
+  HIODeviceArray &operator=(const HIODeviceArray &tool_array);
217
+
218
+  // Clears array and all tool instances
219
+  virtual void Clear();
220
+
221
+  // Get array of native tool instances
222
+  const HIODevice* Tools() const;
223
+
224
+  // Get number of tools
225
+  virtual Hlong Length() const;
226
+
227
+  // Create tool array from tuple of handles
228
+  virtual void SetFromTuple(const HTuple& handles);
229
+
230
+  // Get tuple of handles for tool array
231
+  virtual HTuple ConvertToTuple() const;
232
+
233
+protected:
234
+
235
+// Smart pointer to internal data container
236
+   HIODeviceArrayPtr *mArrayPtr;
237
+};
238
+
239
+}
240
+
241
+#endif

+ 0 - 0
3rdparty/include22/halcon/halconcpp/HIOStream.h


部分文件因为文件数量过多而无法显示