Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
Tetragramm
GitHub Repository: Tetragramm/opencv
Path: blob/master/modules/imgproc/misc/java/gen_dict.json
16358 views
1
{
2
"const_ignore_list": [
3
"CV_TM_.+",
4
"CV_COLORCVT_MAX",
5
"CV_.*Bayer.*",
6
"CV_YUV420(i|sp|p)2.+",
7
"CV_L?(BGRA?|RGBA?|GRAY|XYZ|YCrCb|Luv|Lab|HLS|YUV|HSV)\\d*2L?(BGRA?|RGBA?|GRAY|XYZ|YCrCb|Luv|Lab|HLS|YUV|HSV).*",
8
"CV_FLOODFILL_.+",
9
"CV_ADAPTIVE_THRESH_.+"
10
],
11
"const_private_list" : [
12
"CV_MOP_.+",
13
"CV_INTER_.+",
14
"CV_THRESH_.+",
15
"CV_INPAINT_.+",
16
"CV_RETR_.+",
17
"CV_CHAIN_APPROX_.+"
18
],
19
"missing_consts" : {
20
"Imgproc" : {
21
"private" : [
22
["IPL_BORDER_CONSTANT", 0 ],
23
["IPL_BORDER_REPLICATE", 1 ],
24
["IPL_BORDER_REFLECT", 2 ],
25
["IPL_BORDER_WRAP", 3 ],
26
["IPL_BORDER_REFLECT_101", 4 ],
27
["IPL_BORDER_TRANSPARENT", 5 ]
28
]
29
}
30
},
31
"ManualFuncs" : {
32
"Imgproc" : {
33
"getTextSize" : {
34
"j_code" : [
35
"\n",
36
"// C++: Size getTextSize(const String& text, int fontFace, double fontScale, int thickness, int* baseLine);",
37
"//javadoc:getTextSize(text, fontFace, fontScale, thickness, baseLine)",
38
"public static Size getTextSize(String text, int fontFace, double fontScale, int thickness, int[] baseLine) {",
39
" if(baseLine != null && baseLine.length != 1)",
40
" throw new java.lang.IllegalArgumentException(\"'baseLine' must be 'int[1]' or 'null'.\");",
41
" Size retVal = new Size(n_getTextSize(text, fontFace, fontScale, thickness, baseLine));",
42
" return retVal;",
43
"}",
44
"\n"
45
],
46
"jn_code" : [
47
"private static native double[] n_getTextSize(String text, int fontFace, double fontScale, int thickness, int[] baseLine);\n"
48
],
49
"cpp_code" : [
50
"\n",
51
" // C++: Size getTextSize(const String& text, int fontFace, double fontScale, int thickness, int* baseLine);",
52
" JNIEXPORT jdoubleArray JNICALL Java_org_opencv_imgproc_Imgproc_n_1getTextSize (JNIEnv*, jclass, jstring, jint, jdouble, jint, jintArray);",
53
"\n",
54
" JNIEXPORT jdoubleArray JNICALL Java_org_opencv_imgproc_Imgproc_n_1getTextSize",
55
" (JNIEnv* env, jclass, jstring text, jint fontFace, jdouble fontScale, jint thickness, jintArray baseLine)",
56
" {",
57
" try {",
58
" LOGD(\"Core::n_1getTextSize()\");",
59
" jdoubleArray result;",
60
" result = env->NewDoubleArray(2);",
61
" if (result == NULL) {",
62
" return NULL; /* out of memory error thrown */",
63
" }",
64
"\n",
65
" const char* utf_text = env->GetStringUTFChars(text, 0);",
66
" String n_text( utf_text ? utf_text : \"\" );",
67
" env->ReleaseStringUTFChars(text, utf_text);",
68
"\n",
69
" int _baseLine;",
70
" int* pbaseLine = 0;",
71
"\n",
72
" if (baseLine != NULL)",
73
" pbaseLine = &_baseLine;",
74
"\n",
75
" cv::Size rsize = cv::getTextSize(n_text, (int)fontFace, (double)fontScale, (int)thickness, pbaseLine);",
76
"\n",
77
" jdouble fill[2];",
78
" fill[0]=rsize.width;",
79
" fill[1]=rsize.height;",
80
"\n",
81
" env->SetDoubleArrayRegion(result, 0, 2, fill);",
82
"\n",
83
" if (baseLine != NULL) {",
84
" jint jbaseLine = (jint)(*pbaseLine);",
85
" env->SetIntArrayRegion(baseLine, 0, 1, &jbaseLine);",
86
" }",
87
"\n",
88
" return result;",
89
"\n",
90
" } catch(const cv::Exception& e) {",
91
" LOGD(\"Imgproc::n_1getTextSize() caught cv::Exception: %s\", e.what());",
92
" jclass je = env->FindClass(\"org/opencv/core/CvException\");",
93
" if(!je) je = env->FindClass(\"java/lang/Exception\");",
94
" env->ThrowNew(je, e.what());",
95
" return NULL;",
96
" } catch (...) {",
97
" LOGD(\"Imgproc::n_1getTextSize() caught unknown exception (...)\");",
98
" jclass je = env->FindClass(\"java/lang/Exception\");",
99
" env->ThrowNew(je, \"Unknown exception in JNI code {core::getTextSize()}\");",
100
" return NULL;",
101
" }",
102
" }"
103
]
104
}
105
}
106
},
107
"func_arg_fix" : {
108
"goodFeaturesToTrack" : { "corners" : {"ctype" : "vector_Point"} },
109
"minEnclosingCircle" : { "points" : {"ctype" : "vector_Point2f"} },
110
"fitEllipse" : { "points" : {"ctype" : "vector_Point2f"} },
111
"fillPoly" : { "pts" : {"ctype" : "vector_vector_Point"} },
112
"polylines" : { "pts" : {"ctype" : "vector_vector_Point"} },
113
"fillConvexPoly" : { "points" : {"ctype" : "vector_Point"} },
114
"approxPolyDP" : { "curve" : {"ctype" : "vector_Point2f"},
115
"approxCurve" : {"ctype" : "vector_Point2f"} },
116
"arcLength" : { "curve" : {"ctype" : "vector_Point2f"} },
117
"pointPolygonTest" : { "contour" : {"ctype" : "vector_Point2f"} },
118
"minAreaRect" : { "points" : {"ctype" : "vector_Point2f"} },
119
"getAffineTransform" : { "src" : {"ctype" : "vector_Point2f"},
120
"dst" : {"ctype" : "vector_Point2f"} },
121
"drawContours" : {"contours" : {"ctype" : "vector_vector_Point"} },
122
"findContours" : {"contours" : {"ctype" : "vector_vector_Point"} },
123
"convexityDefects" : { "contour" : {"ctype" : "vector_Point"},
124
"convexhull" : {"ctype" : "vector_int"},
125
"convexityDefects" : {"ctype" : "vector_Vec4i"} },
126
"isContourConvex" : { "contour" : {"ctype" : "vector_Point"} },
127
"convexHull" : { "points" : {"ctype" : "vector_Point"},
128
"hull" : {"ctype" : "vector_int"},
129
"returnPoints" : {"ctype" : ""} }
130
}
131
}
132
133