1
0
mirror of https://github.com/opencv/opencv.git synced 2026-07-26 13:53:03 +04:00
Files
Alexander Smorkalov 40ddc700aa Merge pull request #29230 from asmorkalov:as/move_undistort
Inverted imgproc-geometry dependency and moved more functions to geometry #29230

Fixes: https://github.com/opencv/opencv/issues/20267
Continues: https://github.com/opencv/opencv/pull/29175

OpenCV Contrib: https://github.com/opencv/opencv_contrib/pull/4137
OpenCV Extra: https://github.com/opencv/opencv_extra/pull/1377

Summary:
- LSD returned back to imgproc
- drawing functions moved to imgproc
- undistort image and related perf-pixel functions moved to imgproc
- moments moved to geometry
- estimateXXXtransform moved to geometry

After the patch the geometry module depends on code and Flann and may be used everywhere without potential circular dependencies

### Pull Request Readiness Checklist

See details at https://github.com/opencv/opencv/wiki/How_to_contribute#making-a-good-pull-request

- [x] I agree to contribute to the project under Apache 2 License.
- [x] To the best of my knowledge, the proposed patch is not based on a code under GPL or another license that is incompatible with OpenCV
- [ ] The PR is proposed to the proper branch
- [ ] There is a reference to the original bug report and related work
- [ ] There is accuracy test, performance test and test data in opencv_extra repository, if applicable
      Patch to opencv_extra has the same branch name.
- [ ] The feature is well documented and sample code can be built with the project CMake
2026-06-05 10:13:45 +03:00

112 lines
5.3 KiB
JSON

{
"const_ignore_list": [
"CV_TM_.+",
"CV_COLORCVT_MAX",
"CV_.*Bayer.*",
"CV_YUV420(i|sp|p)2.+",
"CV_L?(BGRA?|RGBA?|GRAY|XYZ|YCrCb|Luv|Lab|HLS|YUV|HSV)\\d*2L?(BGRA?|RGBA?|GRAY|XYZ|YCrCb|Luv|Lab|HLS|YUV|HSV).*",
"CV_FLOODFILL_.+",
"CV_ADAPTIVE_THRESH_.+"
],
"const_private_list" : [
"CV_MOP_.+",
"CV_INTER_.+",
"CV_THRESH_.+",
"CV_INPAINT_.+",
"CV_RETR_.+",
"CV_CHAIN_APPROX_.+"
],
"missing_consts" : {
"Imgproc" : {
"private" : [
["IPL_BORDER_CONSTANT", 0 ],
["IPL_BORDER_REPLICATE", 1 ],
["IPL_BORDER_REFLECT", 2 ],
["IPL_BORDER_WRAP", 3 ],
["IPL_BORDER_REFLECT_101", 4 ],
["IPL_BORDER_TRANSPARENT", 5 ]
]
}
},
"ManualFuncs" : {
"Imgproc" : {
"getTextSize" : {
"j_code" : [
"\n",
"// C++: Size getTextSize(const String& text, int fontFace, double fontScale, int thickness, int* baseLine);",
"//javadoc:getTextSize(text, fontFace, fontScale, thickness, baseLine)",
"public static Size getTextSize(String text, int fontFace, double fontScale, int thickness, int[] baseLine) {",
" if(baseLine != null && baseLine.length != 1)",
" throw new java.lang.IllegalArgumentException(\"'baseLine' must be 'int[1]' or 'null'.\");",
" Size retVal = new Size(n_getTextSize(text, fontFace, fontScale, thickness, baseLine));",
" return retVal;",
"}",
"\n"
],
"jn_code" : [
"private static native double[] n_getTextSize(String text, int fontFace, double fontScale, int thickness, int[] baseLine);\n"
],
"cpp_code" : [
"\n",
" // C++: Size getTextSize(const String& text, int fontFace, double fontScale, int thickness, int* baseLine);",
" JNIEXPORT jdoubleArray JNICALL Java_org_opencv_imgproc_Imgproc_n_1getTextSize (JNIEnv*, jclass, jstring, jint, jdouble, jint, jintArray);",
"\n",
" JNIEXPORT jdoubleArray JNICALL Java_org_opencv_imgproc_Imgproc_n_1getTextSize",
" (JNIEnv* env, jclass, jstring text, jint fontFace, jdouble fontScale, jint thickness, jintArray baseLine)",
" {",
" try {",
" LOGD(\"Core::n_1getTextSize()\");",
" jdoubleArray result;",
" result = env->NewDoubleArray(2);",
" if (result == NULL) {",
" return NULL; /* out of memory error thrown */",
" }",
"\n",
" const char* utf_text = env->GetStringUTFChars(text, 0);",
" String n_text( utf_text ? utf_text : \"\" );",
" env->ReleaseStringUTFChars(text, utf_text);",
"\n",
" int _baseLine;",
" int* pbaseLine = 0;",
"\n",
" if (baseLine != NULL)",
" pbaseLine = &_baseLine;",
"\n",
" cv::Size rsize = cv::getTextSize(n_text, (int)fontFace, (double)fontScale, (int)thickness, pbaseLine);",
"\n",
" jdouble fill[2];",
" fill[0]=rsize.width;",
" fill[1]=rsize.height;",
"\n",
" env->SetDoubleArrayRegion(result, 0, 2, fill);",
"\n",
" if (baseLine != NULL) {",
" jint jbaseLine = (jint)(*pbaseLine);",
" env->SetIntArrayRegion(baseLine, 0, 1, &jbaseLine);",
" }",
"\n",
" return result;",
"\n",
" } catch(const cv::Exception& e) {",
" LOGD(\"Imgproc::n_1getTextSize() caught cv::Exception: %s\", e.what());",
" jclass je = env->FindClass(\"org/opencv/core/CvException\");",
" if(!je) je = env->FindClass(\"java/lang/Exception\");",
" env->ThrowNew(je, e.what());",
" return NULL;",
" } catch (...) {",
" LOGD(\"Imgproc::n_1getTextSize() caught unknown exception (...)\");",
" jclass je = env->FindClass(\"java/lang/Exception\");",
" env->ThrowNew(je, \"Unknown exception in JNI code {core::getTextSize()}\");",
" return NULL;",
" }",
" }"
]
}
}
},
"func_arg_fix" : {
"drawContours" : {"contours" : {"ctype" : "vector_vector_Point"} },
"findContours" : {"contours" : {"ctype" : "vector_vector_Point"} }
}
}