Visual Servoing Platform version 3.6.0
Loading...
Searching...
No Matches
gen_dict.json
1{
2 "ManualFuncs" : {
3 "VpDetectorAprilTag" : {
4 "detect" : {
5 "j_code" : [
6 "//",
7 "// manual port",
8 "// C++: bool detect(vpImage_char I, double tagSize, vpCameraParameters cam, vector_vpHomogeneousMatrix cMo_vec)",
9 "//\n",
10 "//javadoc: VpDetectorAprilTag::detect(I, tagSize, cam, cMo_vec_list_arr)\n",
11 "public java.util.List<org.visp.core.VpHomogeneousMatrix> detect(org.visp.core.VpImageUChar I, double tagSize, org.visp.core.VpCameraParameters cam)",
12 "{",
13 " long[] arr = detect_0(nativeObj, I.nativeObj, tagSize, cam.nativeObj);",
14 " return org.visp.utils.Converters.Array_to_vector_vpHomogeneousMatrix(arr);",
15 "}\n\n",
16 "//",
17 "// manual port",
18 "// C++: bool detect(vpImage_char I)",
19 "//\n",
20 "//javadoc: VpDetectorAprilTag::detect(I)\n",
21 "public boolean detect(org.visp.core.VpImageUChar I)",
22 "{",
23 " boolean retVal = detect_1(nativeObj, I.nativeObj);",
24 " return retVal;",
25 "}"
26 ],
27 "cpp_code" : [
28 "//",
29 "// bool detect(vpImage_char I, double tagSize, vpCameraParameters cam, vector_vpHomogeneousMatrix cMo_vec)",
30 "//\n\n",
31 "JNIEXPORT jlongArray JNICALL Java_org_visp_detection_VpDetectorAprilTag_detect_10 (JNIEnv*, jclass, jlong, jlong, jdouble, jlong);\n",
32 "JNIEXPORT jlongArray JNICALL Java_org_visp_detection_VpDetectorAprilTag_detect_10",
33 " (JNIEnv* env, jclass , jlong self, jlong I_nativeObj, jdouble tagSize, jlong cam_nativeObj)",
34 "{",
35 " static const char method_name[] = \"detection::detect_10()\";",
36 " try {",
37 " LOGD(\"%s\", method_name);",
38 " std::vector<vpHomogeneousMatrix> cMo_vec_list_arr;",
39 " vpDetectorAprilTag* me = (vpDetectorAprilTag*) self; //TODO: check for NULL",
40 " vpImage<unsigned char>& I = *((vpImage<unsigned char>*)I_nativeObj);",
41 " vpCameraParameters& cam = *((vpCameraParameters*)cam_nativeObj);",
42 " /* bool _retval_ = */ me->detect( I, (double)tagSize, cam, cMo_vec_list_arr );",
43 " return vector_vpHomogeneousMatrix_to_List(env,cMo_vec_list_arr);",
44 " } catch(const std::exception &e) {",
45 " throwJavaException(env, &e, method_name);",
46 " } catch (...) {",
47 " throwJavaException(env, 0, method_name);",
48 " }",
49 " return NULL;",
50 "}\n\n",
51 "//",
52 "// manual port",
53 "// bool detect(vpImage_char I)",
54 "//\n\n",
55 "JNIEXPORT jboolean JNICALL Java_org_visp_detection_VpDetectorAprilTag_detect_11 (JNIEnv*, jclass, jlong, jlong);\n",
56 "JNIEXPORT jboolean JNICALL Java_org_visp_detection_VpDetectorAprilTag_detect_11",
57 " (JNIEnv* env, jclass , jlong self, jlong I_nativeObj)",
58 "{",
59 " static const char method_name[] = \"detection::detect_11()\";",
60 " try {",
61 " LOGD(\"%s\", method_name);",
62 " vpDetectorAprilTag* me = (vpDetectorAprilTag*) self; //TODO: check for NULL",
63 " vpImage<unsigned char>& I = *((vpImage<unsigned char>*)I_nativeObj);",
64 " bool _retval_ = me->detect( I );",
65 " return _retval_;",
66 " } catch(const std::exception &e) {",
67 " throwJavaException(env, &e, method_name);",
68 " } catch (...) {",
69 " throwJavaException(env, 0, method_name);",
70 " }",
71 " return 0;",
72 "}"
73 ],
74 "jn_code" : [
75 "// C++: bool detect(vpImage_char I, double tagSize, vpCameraParameters cam, vector_vpHomogeneousMatrix cMo_vec)",
76 "private static native long[] detect_0(long nativeObj, long I_nativeObj, double tagSize, long cam_nativeObj);\n",
77 "// C++: bool detect(vpImage_char I)",
78 "private static native boolean detect_1(long nativeObj, long I_nativeObj);"
79 ]
80 },
81 "getPoseEstimationMethod" : {
82 "j_code" : [
83 "//",
84 "// manual port",
85 "// C++: vpPoseEstimationMethod getPoseEstimationMethod()",
86 "//",
87 "//javadoc: VpDetectorAprilTag::getPoseEstimationMethod()\n",
88 "public int getPoseEstimationMethod()",
89 "{",
90 " return getPoseEstimationMethod(nativeObj);",
91 "}"
92 ],
93 "jn_code" : [
94 "// C++: vpPoseEstimationMethod getPoseEstimationMethod()",
95 "private static native int getPoseEstimationMethod(long address);"
96 ],
97 "cpp_code" : [
98 "//",
99 "// manual port",
100 "// int getPoseEstimationMethod()",
101 "//\n",
102 "JNIEXPORT jint JNICALL Java_org_visp_detection_VpDetectorAprilTag_getPoseEstimationMethod (JNIEnv*, jclass, jlong);\n",
103 "JNIEXPORT jint JNICALL Java_org_visp_detection_VpDetectorAprilTag_getPoseEstimationMethod",
104 " (JNIEnv* env, jclass , jlong address)",
105 "{",
106 " static const char method_name[] = \"detection::getPoseEstimationMethod()\";",
107 " try {",
108 " LOGD(\"%s\", method_name);",
109 " vpDetectorAprilTag *tag = (vpDetectorAprilTag*) address;",
110 " return (int) tag->getPoseEstimationMethod();",
111 " } catch(const std::exception &e) {",
112 " throwJavaException(env, &e, method_name);",
113 " } catch (...) {",
114 " throwJavaException(env, 0, method_name);",
115 " }",
116 " return 0;",
117 "}"
118 ]
119 },
120 "setAprilTagPoseEstimationMethod" : {
121 "j_code" : [
122 "//",
123 "// manual port",
124 "// C++: void setAprilTagPoseEstimationMethod(const vpPoseEstimationMethod &poseEstimationMethod)",
125 "//",
126 "//javadoc: VpDetectorAprilTag::setAprilTagPoseEstimationMethod(int vpPoseEstimationMethod)\n",
127 "public void setAprilTagPoseEstimationMethod(int vpPoseEstimationMethod)",
128 "{",
129 " setAprilTagPoseEstimationMethod(nativeObj,vpPoseEstimationMethod);",
130 "}"
131 ],
132 "jn_code" : [
133 "// C++: void setAprilTagPoseEstimationMethod(const vpPoseEstimationMethod &poseEstimationMethod)",
134 "private static native void setAprilTagPoseEstimationMethod(long address, int value);"
135 ],
136 "cpp_code" : [
137 "//",
138 "// manual port",
139 "// void setAprilTagPoseEstimationMethod(int vpPoseEstimationMethod)",
140 "//\n",
141 "JNIEXPORT void JNICALL Java_org_visp_detection_VpDetectorAprilTag_setAprilTagPoseEstimationMethod (JNIEnv*, jclass, jlong, jint);\n",
142 "JNIEXPORT void JNICALL Java_org_visp_detection_VpDetectorAprilTag_setAprilTagPoseEstimationMethod",
143 " (JNIEnv* env, jclass , jlong address, jint value)",
144 "{",
145 " static const char method_name[] = \"detection::setAprilTagPoseEstimationMethod()\";",
146 " try {",
147 " LOGD(\"%s\", method_name);",
148 " vpDetectorAprilTag *tag = (vpDetectorAprilTag*) address;",
149 " tag->setAprilTagPoseEstimationMethod(vpDetectorAprilTag::vpPoseEstimationMethod(value));",
150 " } catch(const std::exception &e) {",
151 " throwJavaException(env, &e, method_name);",
152 " } catch (...) {",
153 " throwJavaException(env, 0, method_name);",
154 " }",
155 " return;",
156 "}"
157 ]
158 },
159 "setAprilTagFamily" : {
160 "j_code" : [
161 "//",
162 "// manual port",
163 "// C++: void setAprilTagFamily(const vpAprilTagFamily &tagFamily)",
164 "//",
165 "//javadoc: VpDetectorAprilTag::setAprilTagFamily(int tagFamily)\n",
166 "public void setAprilTagFamily(int tagFamily)",
167 "{",
168 " setAprilTagFamily(nativeObj,tagFamily);",
169 "}"
170 ],
171 "jn_code" : [
172 "// C++: void setAprilTagFamily(const vpAprilTagFamily &tagFamily)",
173 "private static native void setAprilTagFamily(long address, int value);"
174 ],
175 "cpp_code" : [
176 "//",
177 "// manual port",
178 "// void setAprilTagFamily(int tagFamily)",
179 "//\n",
180 "JNIEXPORT void JNICALL Java_org_visp_detection_VpDetectorAprilTag_setAprilTagFamily (JNIEnv*, jclass, jlong, jint);\n",
181 "JNIEXPORT void JNICALL Java_org_visp_detection_VpDetectorAprilTag_setAprilTagFamily",
182 " (JNIEnv* env, jclass , jlong address, jint value)",
183 "{",
184 " static const char method_name[] = \"detection::setAprilTagFamily()\";",
185 " try {",
186 " LOGD(\"%s\", method_name);",
187 " vpDetectorAprilTag *tag = (vpDetectorAprilTag*) address;",
188 " tag->setAprilTagFamily(vpDetectorAprilTag::vpAprilTagFamily(value));",
189 " } catch(const std::exception &e) {",
190 " throwJavaException(env, &e, method_name);",
191 " } catch (...) {",
192 " throwJavaException(env, 0, method_name);",
193 " }",
194 " return;",
195 "}"
196 ]
197 },
198 "getTagsCorners" : {
199 "j_code" : [
200 "//",
201 "// manual port",
202 "// C++: std::vector<std::vector<vpImagePoint> > getTagsCorners()",
203 "//",
204 "//javadoc: VpDetectorAprilTag::getTagsCorners()\n",
205 "public java.util.List<java.util.List<org.visp.core.VpImagePoint>> getTagsCorners()",
206 "{",
207 " long[][] matrix = getTagsCorners(nativeObj);",
208 " return org.visp.utils.Converters.Array_Array_to_vector_vector_vpImagePoint(matrix);",
209 "}"
210 ],
211 "jn_code" : [
212 "// C++: std::vector<std::vector<vpImagePoint> > getTagsCorners()",
213 "private static native long[][] getTagsCorners(long address);"
214 ],
215 "cpp_code" : [
216 "//",
217 "// manual port",
218 "// std::vector<std::vector<vpImagePoint> > getTagsCorners()",
219 "//\n",
220 "JNIEXPORT jobjectArray JNICALL Java_org_visp_detection_VpDetectorAprilTag_getTagsCorners (JNIEnv*, jclass, jlong);\n",
221 "JNIEXPORT jobjectArray JNICALL Java_org_visp_detection_VpDetectorAprilTag_getTagsCorners",
222 " (JNIEnv* env, jclass , jlong address)",
223 "{",
224 " static const char method_name[] = \"detection::getTagsCorners()\";",
225 " try {",
226 " LOGD(\"%s\", method_name);",
227 " vpDetectorAprilTag *tag = (vpDetectorAprilTag*) address;",
228 " std::vector<std::vector<vpImagePoint> > tags_corners = tag->getTagsCorners();",
229 " return vector_vector_vpImagePoint_to_List(env, tags_corners);",
230 " } catch(const std::exception &e) {",
231 " throwJavaException(env, &e, method_name);",
232 " } catch (...) {",
233 " throwJavaException(env, 0, method_name);",
234 " }",
235 " return 0;",
236 "}"
237 ]
238 },
239 "getTagsId" : {
240 "j_code" : [
241 "//",
242 "// manual port",
243 "// C++: std::vector<int> getTagsId()",
244 "//",
245 "//javadoc: VpDetectorAprilTag::getTagsId()\n",
246 "public int[] getTagsId()",
247 "{",
248 " return getTagsId(nativeObj);",
249 "}"
250 ],
251 "jn_code" : [
252 "// C++: std::vector<int> getTagsId()",
253 "private static native int[] getTagsId(long address);"
254 ],
255 "cpp_code" : [
256 "//",
257 "// manual port",
258 "// std::vector<int> getTagsId()",
259 "//\n",
260 "JNIEXPORT jintArray JNICALL Java_org_visp_detection_VpDetectorAprilTag_getTagsId (JNIEnv*, jclass, jlong);\n",
261 "JNIEXPORT jintArray JNICALL Java_org_visp_detection_VpDetectorAprilTag_getTagsId",
262 " (JNIEnv* env, jclass, jlong self)",
263 "{",
264 " static const char method_name[] = \"detection::getTagsId()\";",
265 " try {",
266 " LOGD(\"%s\", method_name);",
267 " vpDetectorAprilTag *tag = (vpDetectorAprilTag*) self;",
268 " std::vector<int> tag_ids = tag->getTagsId();",
269 " jintArray jIds = env->NewIntArray(tag_ids.size());",
270 " jint *ptr_ids = NULL;",
271 " ptr_ids = env->GetIntArrayElements(jIds, 0);",
272 " for (size_t i = 0; i < tag_ids.size(); i++) {",
273 " ptr_ids[i] = tag_ids[i];",
274 " }",
275 " env->ReleaseIntArrayElements(jIds, ptr_ids, 0);",
276 " return jIds;",
277 " } catch(const std::exception &e) {",
278 " throwJavaException(env, &e, method_name);",
279 " } catch (...) {",
280 " throwJavaException(env, 0, method_name);",
281 " }",
282 " return 0;",
283 "}"
284 ]
285 },
286 "VpDetectorAprilTag" : {
287 "j_code" : [
288 "//",
289 "// C++: vpDetectorAprilTag(vpAprilTagFamily tagFamily = TAG_36h11, vpPoseEstimationMethod poseEstimationMethod = HOMOGRAPHY_VIRTUAL_VS)",
290 "//\n",
291 "//javadoc: VpDetectorAprilTag::VpDetectorAprilTag()\n",
292 "public VpDetectorAprilTag()",
293 "{\n",
294 " nativeObj = VpDetectorAprilTag_0();\n",
295 " return;",
296 "}"
297 ],
298 "jn_code" : [
299 "// C++: vpDetectorAprilTag(vpAprilTagFamily tagFamily = TAG_36h11, vpPoseEstimationMethod poseEstimationMethod = HOMOGRAPHY_VIRTUAL_VS)",
300 "private static native long VpDetectorAprilTag_0();"
301 ],
302 "cpp_code" : [
303 "//",
304 "// vpDetectorAprilTag(vpAprilTagFamily tagFamily = TAG_36h11, vpPoseEstimationMethod poseEstimationMethod = HOMOGRAPHY_VIRTUAL_VS)",
305 "//\n\n",
306 "JNIEXPORT jlong JNICALL Java_org_visp_detection_VpDetectorAprilTag_VpDetectorAprilTag_10 (JNIEnv*, jclass);\n",
307 "JNIEXPORT jlong JNICALL Java_org_visp_detection_VpDetectorAprilTag_VpDetectorAprilTag_10",
308 " (JNIEnv* env, jclass )",
309 "{",
310 " static const char method_name[] = \"detection::VpDetectorAprilTag_10()\";",
311 " try {",
312 " LOGD(\"%s\", method_name);\n",
313 " #if __cplusplus > 199711L ",
314 " vpDetectorAprilTag* _retval_ = new vpDetectorAprilTag(vpDetectorAprilTag::vpAprilTagFamily::TAG_36h11, vpDetectorAprilTag::vpPoseEstimationMethod::HOMOGRAPHY_VIRTUAL_VS );",
315 " #else",
316 " vpDetectorAprilTag *_retval_ = new vpDetectorAprilTag(vpDetectorAprilTag::TAG_36h11,vpDetectorAprilTag::HOMOGRAPHY_VIRTUAL_VS);",
317 " #endif",
318 " return (jlong) _retval_;",
319 " } catch(const std::exception &e) {",
320 " throwJavaException(env, &e, method_name);",
321 " } catch (...) {",
322 " throwJavaException(env, 0, method_name);",
323 " }",
324 " return 0;",
325 "}"
326 ]
327 }
328 }
329 }
330}