opencv 4.0.1, build error if enabled openvx,skipSmallImagfes is not a member of cv::{anonymous}::ovx
opencv version, opencv4.0.1 platform, arm64 cmake, 3.10
if Enabled OpenVX, build error as following,
/home/b55880/work/opencv_pro/opencv/modules/imgproc/src/median_blur.cpp:994:44: error: expected initializer before ‘<’ token
template <> inline bool skipSmallImages<VX_KERNEL_MEDIAN_3x3>(int w, int h) { return w*h < 1280 * 720; }
^
/home/b55880/work/opencv_pro/opencv/modules/imgproc/src/median_blur.cpp: In function ‘bool cv::{anonymous}::openvx_medianFilter(cv::InputArray, cv::OutputArray, int)’:
/home/b55880/work/opencv_pro/opencv/modules/imgproc/src/median_blur.cpp:1010:28: error: ‘skipSmallImages’ is not a member of ‘cv::{anonymous}::ovx’
ksize != 3 ? ovx::skipSmallImages<VX_KERNEL_NON_LINEAR_FILTER>(src.cols, src.rows) :
^~~~~~~~~~~~~~~
/home/b55880/work/opencv_pro/opencv/modules/imgproc/src/median_blur.cpp:1010:28: note: suggested alternative:
In file included from /home/b55880/work/opencv_pro/opencv/modules/imgproc/src/median_blur.cpp:51:0:
/home/b55880/work/opencv_pro/opencv/modules/core/include/opencv2/core/openvx/ovx_defs.hpp:28:38: note: ‘cv::ovx::skipSmallImages’
template <int kernel_id> inline bool skipSmallImages(int w, int h) { return w*h < 3840 * 2160; }
^~~~~~~~~~~~~~~
/home/b55880/work/opencv_pro/opencv/modules/imgproc/src/median_blur.cpp:1010:77: warning: left operand of comma operator has no effect [-Wunused-value]
ksize != 3 ? ovx::skipSmallImages<VX_KERNEL_NON_LINEAR_FILTER>(src.cols, src.rows) :
~~~~^~~~
/home/b55880/work/opencv_pro/opencv/modules/imgproc/src/median_blur.cpp:1012:15: error: ‘skipSmallImages’ is not a member of ‘cv::{anonymous}::ovx’
ovx::skipSmallImages<VX_KERNEL_MEDIAN_3x3>(src.cols, src.rows)
^~~~~~~~~~~~~~~
/home/b55880/work/opencv_pro/opencv/modules/imgproc/src/median_blur.cpp:1012:15: note: suggested alternative:
In file included from /home/b55880/work/opencv_pro/opencv/modules/imgproc/src/median_blur.cpp:51:0:
/home/b55880/work/opencv_pro/opencv/modules/core/include/opencv2/core/openvx/ovx_defs.hpp:28:38: note: ‘cv::ovx::skipSmallImages’
template <int kernel_id> inline bool skipSmallImages(int w, int h) { return w*h < 3840 * 2160; }
^~~~~~~~~~~~~~~
/home/b55880/work/opencv_pro/opencv/modules/imgproc/src/median_blur.cpp:1012:57: warning: left operand of comma operator has no effect [-Wunused-value]
ovx::skipSmallImages<VX_KERNEL_MEDIAN_3x3>(src.cols, src.rows)
~~~~^~~~
/home/b55880/work/opencv_pro/opencv/modules/imgproc/src/median_blur.cpp:1018:33: error: ‘getOpenVXContext’ is not a member of ‘cv::{anonymous}::ovx’
ivx::Context ctx = ovx::getOpenVXContext();
^~~~~~~~~~~~~~~~
/home/b55880/work/opencv_pro/opencv/modules/imgproc/src/median_blur.cpp:1018:33: note: suggested alternative:
In file included from /home/b55880/work/opencv_pro/opencv/modules/imgproc/src/median_blur.cpp:51:0:
/home/b55880/work/opencv_pro/opencv/modules/core/include/opencv2/core/openvx/ovx_defs.hpp:26:28: note: ‘cv::ovx::getOpenVXContext’
CV_EXPORTS_W ivx::Context& getOpenVXContext();
^~~~~~~~~~~~~~~~
modules/imgproc/CMakeFiles/opencv_imgproc.dir/build.make:1072: recipe for target 'modules/imgproc/CMakeFiles/opencv_imgproc.dir/src/median_blur.cpp.o' failed
make[2]: *** [modules/imgproc/CMakeFiles/opencv_imgproc.dir/src/median_blur.cpp.o] Error 1
CMakeFiles/Makefile2:1661: recipe for target 'modules/imgproc/CMakeFiles/opencv_imgproc.dir/all' failed
make[1]: *** [modules/imgproc/CMakeFiles/opencv_imgproc.dir/all] Error 2
After a long time debugging, I found that the OpenVX code in median_blur.cpp is actually in namespace cv {namespace {}} scope, this will cause build error on my platform. I don't think the second namespace scope is necessary for openvx code