You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Warning: this may be duplicate with Issue #3781. However, since #3781 has not been addressed by anyone and little info was provided on that post, I repost the issue in hopes that it would be addressed.
Problem: When compiling with -DWITH_MATLAB=ON, following error happens
[ 87%] Built target opencv_perf_superres
[ 88%] Building CXX object modules/videostab/CMakeFiles/example_videostab_videostab.dir/samples/videostab.cpp.o
[ 88%] Building CXX object modules/videostab/CMakeFiles/opencv_test_videostab.dir/test/test_main.cpp.o
[ 88%] Built target example_gpu_morphology
[ 88%] Compiling Matlab source files. This could take a while...
Matlab: compiling 333 files
[1/333] Compiling: CamShift
[ 88%] Built target example_gpu_hog
[ 88%] Building CXX object modules/python3/CMakeFiles/opencv_python3.dir/__/src2/cv2.cpp.o
[ 88%] Built target example_gpu_surf_keypoint_matcher
[ 88%] Building CXX object modules/videostab/CMakeFiles/opencv_test_videostab.dir/test/test_motion_estimation.cpp.o
[ 88%] Linking CXX executable ../../bin/example_gpu_generalized_hough
[ 88%] Built target example_gpu_generalized_hough
[ 88%] Building CXX object samples/cpp/CMakeFiles/example_tutorial_pnp_registration.dir/tutorial_code/calib3d/real_time_pose_estimation/src/main_registration.cpp.o
[ 88%] Linking CXX executable ../../bin/example_gpu_stereo_match
[ 88%] Built target example_gpu_stereo_match
[ 88%] Building CXX object samples/cpp/CMakeFiles/example_cpp_watershed.dir/watershed.cpp.o
[ 88%] Building CXX object modules/videostab/CMakeFiles/opencv_test_videostab.dir/test/test_stabilizer.cpp.o
CMake Error at /home/codehotel/rhel_init/cv_cuda/opencv_contrib/modules/matlab/compile.cmake:54 (message):
Failed to compile CamShift: In file included from
/home/codehotel/rhel_init/cv_cuda/release_general/modules/matlab/src/CamShift.cpp:13:
/home/codehotel/rhel_init/cv_cuda/opencv_contrib/modules/matlab/include/opencv2/matlab/bridge.hpp:88:17:
error: âDualTVL1OpticalFlowâ was not declared in this scope; did
you mean âreadOpticalFlowâ?
88 | typedef cv::Ptr<DualTVL1OpticalFlow> Ptr_DualTVL1OpticalFlow;
| ^~~~~~~~~~~~~~~~~~~
| readOpticalFlow
/home/codehotel/rhel_init/cv_cuda/opencv_contrib/modules/matlab/include/opencv2/matlab/bridge.hpp:88:36:
error: template argument 1 is invalid
88 | typedef cv::Ptr<DualTVL1OpticalFlow> Ptr_DualTVL1OpticalFlow;
| ^
/home/codehotel/rhel_init/cv_cuda/opencv_contrib/modules/matlab/include/opencv2/matlab/bridge.hpp:95:17:
error: âTonemapDurandâ was not declared in this scope; did you
mean âTonemapDragoâ?
95 | typedef cv::Ptr<TonemapDurand> Ptr_TonemapDurand;
| ^~~~~~~~~~~~~
| TonemapDrago
/home/codehotel/rhel_init/cv_cuda/opencv_contrib/modules/matlab/include/opencv2/matlab/bridge.hpp:95:30:
error: template argument 1 is invalid
95 | typedef cv::Ptr<TonemapDurand> Ptr_TonemapDurand;
| ^
/home/codehotel/rhel_init/cv_cuda/opencv_contrib/modules/matlab/include/opencv2/matlab/bridge.hpp:477:11:
error: âcv::bridge::Bridge& cv::bridge::Bridge::operator=(const
Ptr_DualTVL1OpticalFlow&)â cannot be overloaded with
âcv::bridge::Bridge& cv::bridge::Bridge::operator=(const int&)â
477 | Bridge& operator=(const Ptr_DualTVL1OpticalFlow& ) { return *this; }
| ^~~~~~~~
/home/codehotel/rhel_init/cv_cuda/opencv_contrib/modules/matlab/include/opencv2/matlab/bridge.hpp:292:11:
note: previous declaration âcv::bridge::Bridge&
cv::bridge::Bridge::operator=(const int&)â
292 | Bridge& operator=(const int& ) { return *this; }
| ^~~~~~~~
/home/codehotel/rhel_init/cv_cuda/opencv_contrib/modules/matlab/include/opencv2/matlab/bridge.hpp:479:3:
error: âcv::bridge::Bridge::operator
cv::bridge::Ptr_DualTVL1OpticalFlow()â cannot be overloaded with
âcv::bridge::Bridge::operator int()â
479 | operator Ptr_DualTVL1OpticalFlow() { return toPtrDualTVL1OpticalFlow(); }
| ^~~~~~~~
/home/codehotel/rhel_init/cv_cuda/opencv_contrib/modules/matlab/include/opencv2/matlab/bridge.hpp:294:3:
note: previous declaration âcv::bridge::Bridge::operator int()â
294 | operator int() { return toInt(); }
| ^~~~~~~~
/home/codehotel/rhel_init/cv_cuda/opencv_contrib/modules/matlab/include/opencv2/matlab/bridge.hpp:512:11:
error: âcv::bridge::Bridge& cv::bridge::Bridge::operator=(const
Ptr_TonemapDurand&)â cannot be overloaded with
âcv::bridge::Bridge& cv::bridge::Bridge::operator=(const int&)â
512 | Bridge& operator=(const Ptr_TonemapDurand& ) { return *this; }
| ^~~~~~~~
/home/codehotel/rhel_init/cv_cuda/opencv_contrib/modules/matlab/include/opencv2/matlab/bridge.hpp:292:11:
note: previous declaration âcv::bridge::Bridge&
cv::bridge::Bridge::operator=(const int&)â
292 | Bridge& operator=(const int& ) { return *this; }
| ^~~~~~~~
/home/codehotel/rhel_init/cv_cuda/opencv_contrib/modules/matlab/include/opencv2/matlab/bridge.hpp:514:3:
error: âcv::bridge::Bridge::operator
cv::bridge::Ptr_TonemapDurand()â cannot be overloaded with
âcv::bridge::Bridge::operator int()â
514 | operator Ptr_TonemapDurand() { return toPtrTonemapDurand(); }
| ^~~~~~~~
/home/codehotel/rhel_init/cv_cuda/opencv_contrib/modules/matlab/include/opencv2/matlab/bridge.hpp:294:3:
note: previous declaration âcv::bridge::Bridge::operator int()â
294 | operator int() { return toInt(); }
| ^~~~~~~~
make[2]: *** [modules/matlab/CMakeFiles/opencv_matlab.dir/build.make:73: modules/matlab/compile.proxy] Error 1
make[1]: *** [CMakeFiles/Makefile2:21438: modules/matlab/CMakeFiles/opencv_matlab.dir/all] Error 2
make[1]: *** Waiting for unfinished jobs....
Then in bridge.hpp, fix typedef cv::Ptr<DualTVL1OpticalFlow> Ptr_DualTVL1OpticalFlow; to typedef cv::Ptr<cv::optflow::DualTVL1OpticalFlow> Ptr_DualTVL1OpticalFlow;
This did not resolve the issue. There are multiple other errors regarding operator =, and some seem to originate from cpp files generated during build by modules/matlab/generator/gen_matlab.py
I have failed to fix the errors that were generated one after another when trying to mod the matlab module code and its generator scripts myself.
Is the matlab module of opencv_contrib deprecated or currently unsupported?
The text was updated successfully, but these errors were encountered:
Warning: this may be duplicate with Issue #3781. However, since #3781 has not been addressed by anyone and little info was provided on that post, I repost the issue in hopes that it would be addressed.
Environment
OS: RHEL 9.1 x86_64
GCC: gcc (GCC) 11.3.1 20220421 (Red Hat 11.3.1-2)
cmake: 3.20.2
nvcc: 12.4, V12.4.131
CuDNN: 8.9.7.29-1
MATLAB: R2024b Update 4 (24.2.0.2833386) 64-bit (glnxa64)
OpenCV repository: Release 4.11.0 (0e5254e)
Build Settings
Cmake prefixes and flags are set up using following commands
Note, OpenCV and its contrib modules compile without errors when MATLAB module is disabled.
Conversely, I have tested with as much modules disabled to isolate the issue (shown below), but it also fails
to
opencv_contrib/modules/matlab/CMakeLists.txt
, addopencv_optflow
Then in bridge.hpp, fix
typedef cv::Ptr<DualTVL1OpticalFlow> Ptr_DualTVL1OpticalFlow;
totypedef cv::Ptr<cv::optflow::DualTVL1OpticalFlow> Ptr_DualTVL1OpticalFlow;
This did not resolve the issue. There are multiple other errors regarding operator
=
, and some seem to originate from cpp files generated during build bymodules/matlab/generator/gen_matlab.py
I have failed to fix the errors that were generated one after another when trying to mod the matlab module code and its generator scripts myself.
Is the matlab module of opencv_contrib deprecated or currently unsupported?
The text was updated successfully, but these errors were encountered: