Projekt Luna  1.0.1
Der humanoide Roboter
LunaOpenCVInterface.h
gehe zur Dokumentation dieser Datei
1 #if !defined(LUNA_OPEN_CV_INTERFACE_H)
2 #define LUNA_OPEN_CV_INTERFACE_H
3 
4 #define OPEN_CV_SMOOTH(name) void name(const CvArr* src, CvArr* dst, int smoothtype, int size1, int size2, double sigma1, double sigma2)
5 typedef OPEN_CV_SMOOTH(ExternOpenCvSmooth);
6 OPEN_CV_SMOOTH(OpenCvSmoothStub)
7 { }
8 ExternOpenCvSmooth *OpenCvSmooth_ = OpenCvSmoothStub;
9 #define OpenCvSmooth OpenCvSmooth_
10 
11 #define OPEN_CV_NAMED_WINDOW(name) void name(const char *winName, int32 flags)
12 typedef OPEN_CV_NAMED_WINDOW(ExternOpenCvNamedWindow);
13 OPEN_CV_NAMED_WINDOW(OpenCvNamedWindowStub)
14 { }
15 ExternOpenCvNamedWindow *OpenCvNamedWindow_ = OpenCvNamedWindowStub;
16 #define OpenCvNamedWindow OpenCvNamedWindow_
17 
18 // ----------------------------------------------------------------------------
19 // OpenCv imreadM
20 //
21 #define OPEN_CV_IMREADM(name) CvMat* name(const char *filename, int32 isColor)
22 typedef OPEN_CV_IMREADM(ExternOpenCvImreadM);
23 OPEN_CV_IMREADM(OpenCvImreadMStub)
24 {
25  return(0);
26 }
27 ExternOpenCvImreadM *OpenCvImreadM_ = OpenCvImreadMStub;
28 #define OpenCvImreadM OpenCvImreadM_
29 
30 #define OPEN_CV_PUT_TEXT(name) void name(CvArr *img, const char *text, CvPoint org, const CvFont *font, CvScalar color)
31 typedef OPEN_CV_PUT_TEXT(ExternOpenCvPutText);
32 OPEN_CV_PUT_TEXT(OpenCvPutTextStub)
33 { }
34 ExternOpenCvPutText *OpenCvPutText_ = OpenCvPutTextStub;
35 #define OpenCvPutText OpenCvPutText_
36 
37 #define OPEN_CV_SET_ZERO(name) void name(CvArr *arr)
38 typedef OPEN_CV_SET_ZERO(ExternOpenCvSetZero);
39 OPEN_CV_SET_ZERO(OpenCvSetZeroStub)
40 { }
41 ExternOpenCvSetZero *OpenCvSetZero_ = OpenCvSetZeroStub;
42 #define OpenCvSetZero OpenCvSetZero_
43 
44 #define OPEN_CV_SHOW_IMAGE(name) void name(const char *name, const CvArr *image)
45 typedef OPEN_CV_SHOW_IMAGE(ExternOpenCvShowImage);
46 OPEN_CV_SHOW_IMAGE(OpenCvShowImageStub)
47 { }
48 ExternOpenCvShowImage *OpenCvShowImage_ = OpenCvShowImageStub;
49 #define OpenCvShowImage OpenCvShowImage_
50 
51 #define OPEN_CV_INIT_FONT(name) void name(CvFont* font, int fontFace, double hScale, double vScale, double shear, int thickness, int lineType)
52 typedef OPEN_CV_INIT_FONT(ExternOpenCvInitFont);
53 OPEN_CV_INIT_FONT(OpenCvInitFontStub)
54 { }
55 ExternOpenCvInitFont *OpenCvInitFont_ = OpenCvInitFontStub;
56 #define OpenCvInitFont OpenCvInitFont_
57 
58 #define OPEN_CV_CLONE_MAT(name) CvMat *name(const CvMat* mat)
59 typedef OPEN_CV_CLONE_MAT(ExternOpenCvCloneMat);
60 OPEN_CV_CLONE_MAT(OpenCvCloneMatStub)
61 {
62  CvMat *matrix = {};
63  return(matrix);
64 }
65 ExternOpenCvCloneMat *OpenCvCloneMat_ = OpenCvCloneMatStub;
66 #define OpenCvCloneMat OpenCvCloneMat_
67 
68 // ----------------------------------------------------------------------------
69 // OpenCv Canny edge detection
70 //
71 #define OPEN_CV_CANNY(name) void name(const CvArr* image, CvArr* edges, double threshold1, double threshold2, int aperture_size)
72 typedef OPEN_CV_CANNY(ExternOpenCvCanny);
73 OPEN_CV_CANNY(OpenCvCannyStub)
74 { }
75 ExternOpenCvCanny *OpenCvCanny_ = OpenCvCannyStub;
76 #define OpenCvCanny OpenCvCanny_
77 
78 //-----------------------------------------------------------------------------
79 // Opencv convert color
80 //
81 #define OPEN_CV_CVT_COLOR(name) void name(const CvArr* src, CvArr* dst, int code)
82 typedef OPEN_CV_CVT_COLOR(ExternOpenCvCvtColor);
83 OPEN_CV_CVT_COLOR(OpenCvCvtColorStub)
84 { }
85 ExternOpenCvCvtColor *OpenCvCvtColor_ = OpenCvCvtColorStub;
86 #define OpenCvCvtColor OpenCvCvtColor_
87 
88 //-----------------------------------------------------------------------------
89 // cvCreateTrackbar
90 //
91 #define OPEN_CV_CREATE_TRACKBAR(name) int name(const char* trackbar_name, \
92  const char* window_name, int* value, int count, CvTrackbarCallback on_change)
93 typedef OPEN_CV_CREATE_TRACKBAR(ExternOpenCvCreateTrackbar);
94 OPEN_CV_CREATE_TRACKBAR(OpenCvCreateTrackbarStub)
95 {
96  return(0);
97 }
98 ExternOpenCvCreateTrackbar *OpenCvCreateTrackbar_ = OpenCvCreateTrackbarStub;
99 #define OpenCvCreateTrackbar OpenCvCreateTrackbar_
100 
101 //-----------------------------------------------------------------------------
102 // cvCreateTrackbar2
103 //
104 #define OPEN_CV_CREATE_TRACKBAR2(name) int name(const char* trackbar_name, \
105  const char* window_name, int* value, int count, CvTrackbarCallback on_change, \
106  void *userdata)
107 typedef OPEN_CV_CREATE_TRACKBAR2(ExternOpenCvCreateTrackbar2);
108 OPEN_CV_CREATE_TRACKBAR2(OpenCvCreateTrackbar2Stub)
109 {
110  return(0);
111 }
112 ExternOpenCvCreateTrackbar2 *OpenCvCreateTrackbar2_ = OpenCvCreateTrackbar2Stub;
113 #define OpenCvCreateTrackbar2 OpenCvCreateTrackbar2_
114 
115 //-----------------------------------------------------------------------------
116 // Opencv wait key
117 //
118 #define OPEN_CV_WAIT_KEY(name) int name(int delay)
119 typedef OPEN_CV_WAIT_KEY(ExternOpenCvWaitKey);
120 OPEN_CV_WAIT_KEY(OpenCvWaitKeyStub)
121 {
122  return(0);
123 }
124 ExternOpenCvWaitKey *OpenCvWaitKey_ = OpenCvWaitKeyStub;
125 #define OpenCvWaitKey OpenCvWaitKey_
126 
127 //-----------------------------------------------------------------------------
128 // Opencv cvCreateMat
129 //
130 #define OPEN_CV_CREATE_MAT(name) CvMat *name(int rows, int cols, int type)
131 typedef OPEN_CV_CREATE_MAT(ExternOpenCvCreateMat);
132 OPEN_CV_CREATE_MAT(OpenCvCreateMatStub)
133 {
134  CvMat *mat = {0};
135  return(mat);
136 }
137 ExternOpenCvCreateMat *OpenCvCreateMat_ = OpenCvCreateMatStub;
138 #define OpenCvCreateMat OpenCvCreateMat_
139 
140 //-----------------------------------------------------------------------------
141 // Opencv cvCreateStereoBMState
142 //
143 #define OPEN_CV_CREATE_STEREO_BMS_STATE(name) CvStereoBMState *name(int preset, int numberOfDisparities)
144 typedef OPEN_CV_CREATE_STEREO_BMS_STATE(ExternOpenCvCreateStereoBMState);
145 OPEN_CV_CREATE_STEREO_BMS_STATE(OpenCvCreateStereoBMStateStub)
146 {
147  CvStereoBMState *stereoBMState = {0};
148  return(stereoBMState);
149 }
150 ExternOpenCvCreateStereoBMState *OpenCvCreateStereoBMState_ = OpenCvCreateStereoBMStateStub;
151 #define OpenCvCreateStereoBMState OpenCvCreateStereoBMState_
152 
153 //-----------------------------------------------------------------------------
154 // Opencv cvFindStereoCorrespondenceBM
155 //
156 #define OPEN_CV_FIND_STEREO_CORRESPONDENCE_BM(name) void name(const CvArr* left, \
157  const CvArr* right, CvArr* disparity, CvStereoBMState* state)
158 typedef OPEN_CV_FIND_STEREO_CORRESPONDENCE_BM(ExternOpenCvFindStereoCorrespondenceBM);
159 OPEN_CV_FIND_STEREO_CORRESPONDENCE_BM(OpenCvFindStereoCorrespondenceBMStub)
160 {
161  // TODO (joshua): Logging
162 }
163 ExternOpenCvFindStereoCorrespondenceBM *OpenCvFindStereoCorrespondenceBM_ = OpenCvFindStereoCorrespondenceBMStub;
164 #define OpenCvFindStereoCorrespondenceBM OpenCvFindStereoCorrespondenceBM_
165 
166 //-----------------------------------------------------------------------------
167 // Opencv cvReleaseStereoBMState
168 //
169 #define OPEN_CV_RELEASE_STEREO_BM_STATE(name) void name(CvStereoBMState **state)
170 typedef OPEN_CV_RELEASE_STEREO_BM_STATE(ExternOpenCvReleaseStereoBMState);
171 OPEN_CV_RELEASE_STEREO_BM_STATE(OpenCvReleaseStereoBMStateStub)
172 {
173  // TODO (joshua): Logging
174 }
175 ExternOpenCvReleaseStereoBMState *OpenCvReleaseStereoBMState_ = OpenCvReleaseStereoBMStateStub;
176 #define OpenCvReleaseStereoBMState OpenCvReleaseStereoBMState_
177 
178 //-----------------------------------------------------------------------------
179 // Opencv cvMinMaxLoc
180 //
181 #define OPEN_CV_MIN_MAX_LOC(name) void name(const CvArr* arr, double* min_val, \
182  double* max_val, CvPoint* min_loc, CvPoint* max_loc, const CvArr* mask)
183 typedef OPEN_CV_MIN_MAX_LOC(ExternOpenCvMinMaxLoc);
184 OPEN_CV_MIN_MAX_LOC(OpenCvMinMaxLocStub)
185 {
186  // TODO (joshua): Logging
187 }
188 ExternOpenCvMinMaxLoc *OpenCvMinMaxLoc_ = OpenCvMinMaxLocStub;
189 #define OpenCvMinMaxLoc OpenCvMinMaxLoc_
190 
191 //-----------------------------------------------------------------------------
192 // Opencv cvConvertScale
193 //
194 #define OPEN_CV_CONVERT_SCALE(name) void name(const CvArr* src, CvArr* dst, \
195  double scale, double shift)
196 typedef OPEN_CV_CONVERT_SCALE(ExternOpenCvConvertScale);
197 OPEN_CV_CONVERT_SCALE(OpenCvConvertScaleStub)
198 {
199  // TODO (joshua): Logging
200 }
201 ExternOpenCvConvertScale *OpenCvConvertScale_ = OpenCvConvertScaleStub;
202 #define OpenCvConvertScale OpenCvConvertScale_
203 
204 //-----------------------------------------------------------------------------
205 // Opencv cvSaveImage
206 //
207 #define OPEN_CV_SAVE_IMAGE(name) void name(const char* filename, const CvArr* image, \
208  const int* params)
209 typedef OPEN_CV_SAVE_IMAGE(ExternOpenCvSaveImage);
210 OPEN_CV_SAVE_IMAGE(OpenCvSaveImageStub)
211 {
212  bool32 implemented = false;
213  Assert(implemented);
214  // TODO (joshua): Logging
215 }
216 ExternOpenCvSaveImage *OpenCvSaveImage_ = OpenCvSaveImageStub;
217 #define OpenCvSaveImage OpenCvSaveImage_
218 
219 #endif // LUNA_OPEN_CV_INTERFACE_H
ExternOpenCvFindStereoCorrespondenceBM * OpenCvFindStereoCorrespondenceBM_
Definition: LunaOpenCVInterface.h:163
ExternOpenCvSaveImage * OpenCvSaveImage_
Definition: LunaOpenCVInterface.h:216
ExternOpenCvConvertScale * OpenCvConvertScale_
Definition: LunaOpenCVInterface.h:201
#define OPEN_CV_CLONE_MAT(name)
Definition: LunaOpenCVInterface.h:58
ExternOpenCvSmooth * OpenCvSmooth_
Definition: LunaOpenCVInterface.h:8
#define OPEN_CV_INIT_FONT(name)
Definition: LunaOpenCVInterface.h:51
#define OPEN_CV_FIND_STEREO_CORRESPONDENCE_BM(name)
Definition: LunaOpenCVInterface.h:156
CvStereoBMState * stereoBMState
Definition: luna.cpp:65
#define OPEN_CV_RELEASE_STEREO_BM_STATE(name)
Definition: LunaOpenCVInterface.h:169
#define OPEN_CV_SET_ZERO(name)
Definition: LunaOpenCVInterface.h:37
#define OPEN_CV_CONVERT_SCALE(name)
Definition: LunaOpenCVInterface.h:194
ExternOpenCvShowImage * OpenCvShowImage_
Definition: LunaOpenCVInterface.h:48
#define OPEN_CV_SHOW_IMAGE(name)
Definition: LunaOpenCVInterface.h:44
ExternOpenCvCreateTrackbar * OpenCvCreateTrackbar_
Definition: LunaOpenCVInterface.h:98
ExternOpenCvCreateMat * OpenCvCreateMat_
Definition: LunaOpenCVInterface.h:137
ExternOpenCvCanny * OpenCvCanny_
Definition: LunaOpenCVInterface.h:75
ExternOpenCvReleaseStereoBMState * OpenCvReleaseStereoBMState_
Definition: LunaOpenCVInterface.h:175
ExternOpenCvMinMaxLoc * OpenCvMinMaxLoc_
Definition: LunaOpenCVInterface.h:188
ExternOpenCvImreadM * OpenCvImreadM_
Definition: LunaOpenCVInterface.h:27
#define Assert(condition)
Definition: luna.cpp:166
ExternOpenCvCreateTrackbar2 * OpenCvCreateTrackbar2_
Definition: LunaOpenCVInterface.h:112
ExternOpenCvCreateStereoBMState * OpenCvCreateStereoBMState_
Definition: LunaOpenCVInterface.h:150
#define OPEN_CV_IMREADM(name)
Definition: LunaOpenCVInterface.h:21
#define OPEN_CV_SAVE_IMAGE(name)
Definition: LunaOpenCVInterface.h:207
ExternOpenCvCvtColor * OpenCvCvtColor_
Definition: LunaOpenCVInterface.h:85
#define OPEN_CV_CREATE_TRACKBAR(name)
Definition: LunaOpenCVInterface.h:91
int32_t bool32
Definition: luna.h:37
#define OPEN_CV_PUT_TEXT(name)
Definition: LunaOpenCVInterface.h:30
#define OPEN_CV_WAIT_KEY(name)
Definition: LunaOpenCVInterface.h:118
#define OPEN_CV_CREATE_MAT(name)
Definition: LunaOpenCVInterface.h:130
#define OPEN_CV_CREATE_STEREO_BMS_STATE(name)
Definition: LunaOpenCVInterface.h:143
#define OPEN_CV_CANNY(name)
Definition: LunaOpenCVInterface.h:71
ExternOpenCvNamedWindow * OpenCvNamedWindow_
Definition: LunaOpenCVInterface.h:15
#define OPEN_CV_MIN_MAX_LOC(name)
Definition: LunaOpenCVInterface.h:181
#define OPEN_CV_CVT_COLOR(name)
Definition: LunaOpenCVInterface.h:81
ExternOpenCvSetZero * OpenCvSetZero_
Definition: LunaOpenCVInterface.h:41
ExternOpenCvPutText * OpenCvPutText_
Definition: LunaOpenCVInterface.h:34
ExternOpenCvInitFont * OpenCvInitFont_
Definition: LunaOpenCVInterface.h:55
#define OPEN_CV_CREATE_TRACKBAR2(name)
Definition: LunaOpenCVInterface.h:104
#define OPEN_CV_SMOOTH(name)
Definition: LunaOpenCVInterface.h:4
ExternOpenCvWaitKey * OpenCvWaitKey_
Definition: LunaOpenCVInterface.h:124
#define OPEN_CV_NAMED_WINDOW(name)
Definition: LunaOpenCVInterface.h:11
ExternOpenCvCloneMat * OpenCvCloneMat_
Definition: LunaOpenCVInterface.h:65