Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

OpenCV Matlab Code Generator module make error #3781

Open
jeremvv opened this issue Aug 19, 2024 · 0 comments
Open

OpenCV Matlab Code Generator module make error #3781

jeremvv opened this issue Aug 19, 2024 · 0 comments

Comments

@jeremvv
Copy link

jeremvv commented Aug 19, 2024

System information (version)
  • OpenCV => 4.10.0
  • Operating System / Platform => Ubuntu 22.04
  • Compiler => g++ 11.4.0
Detailed description

Hi all,
I'm trying to compile the last OpenCV with the OpenCV Matlab Code Generator module enable in order to call OpenCV methods in Matlab. I was previously using https://github.com/kyamagu/mexopencv when on OpenCV 3. After a new install on my machine and a try with OpenCV 4, I can't make it work.

After successfully running cmake, running make leads to the following errors:

 CMake Error at /home/jeremy/work/opencv_build/opencv_contrib/modules/matlab/compile.cmake:65 (message):
  Failed to compile CamShift: In file included from
  /home/jeremy/work/opencv_build/opencv/modules/core/include/opencv2/core.hpp:3415,


                   from /home/jeremy/work/opencv_build/opencv_contrib/modules/matlab/include/opencv2/matlab/bridge.hpp:52,
                   from /home/jeremy/work/opencv_build/opencv/build/modules/matlab/src/CamShift.cpp:13:

  
  /home/jeremy/work/opencv_build/opencv/modules/core/include/opencv2/core/operations.hpp:58:118:
  warning: â is an unrecognized format function type
  [-Wformat=]

     58 | #    define CV_FORMAT_PRINTF(string_idx, first_to_check) __attribute__ ((format (printf, string_idx, first_to_check)))
        |                                                                                                                      ^

  
  /home/jeremy/work/opencv_build/opencv/modules/core/include/opencv2/core/operations.hpp:499:48:
  note: in expansion of macro â

    499 | CV_EXPORTS String format(const char* fmt, ...) CV_FORMAT_PRINTF(1, 2);
        |                                                ^~~~~~~~~~~~~~~~

  In file included from
  /home/jeremy/work/opencv_build/opencv/build/modules/matlab/src/CamShift.cpp:13:


  
  /home/jeremy/work/opencv_build/opencv_contrib/modules/matlab/include/opencv2/matlab/bridge.hpp:88:17:
  error: â was not declared in this scope; did
  you mean â?

     88 | typedef cv::Ptr<DualTVL1OpticalFlow> Ptr_DualTVL1OpticalFlow;
        |                 ^~~~~~~~~~~~~~~~~~~
        |                 readOpticalFlow

  
  /home/jeremy/work/opencv_build/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/jeremy/work/opencv_build/opencv_contrib/modules/matlab/include/opencv2/matlab/bridge.hpp:95:17:
  error: â was not declared in this scope; did you
  mean â?

     95 | typedef cv::Ptr<TonemapDurand> Ptr_TonemapDurand;
        |                 ^~~~~~~~~~~~~
        |                 TonemapDrago

  
  /home/jeremy/work/opencv_build/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/jeremy/work/opencv_build/opencv_contrib/modules/matlab/include/opencv2/matlab/bridge.hpp:477:11:
  error: â cannot be overloaded with
  â

    477 |   Bridge& operator=(const Ptr_DualTVL1OpticalFlow& ) { return *this; }
        |           ^~~~~~~~

  
  /home/jeremy/work/opencv_build/opencv_contrib/modules/matlab/include/opencv2/matlab/bridge.hpp:292:11:
  note: previous declaration â

    292 |   Bridge& operator=(const int& ) { return *this; }
        |           ^~~~~~~~

  
  /home/jeremy/work/opencv_build/opencv_contrib/modules/matlab/include/opencv2/matlab/bridge.hpp:479:3:
  error: â cannot be overloaded with
  â

    479 |   operator Ptr_DualTVL1OpticalFlow() { return toPtrDualTVL1OpticalFlow(); }
        |   ^~~~~~~~

  
  /home/jeremy/work/opencv_build/opencv_contrib/modules/matlab/include/opencv2/matlab/bridge.hpp:294:3:
  note: previous declaration â

    294 |   operator int() { return toInt(); }
        |   ^~~~~~~~

  
  /home/jeremy/work/opencv_build/opencv_contrib/modules/matlab/include/opencv2/matlab/bridge.hpp:512:11:
  error: â cannot be overloaded with
  â

    512 |   Bridge& operator=(const Ptr_TonemapDurand& ) { return *this; }
        |           ^~~~~~~~

  
  /home/jeremy/work/opencv_build/opencv_contrib/modules/matlab/include/opencv2/matlab/bridge.hpp:292:11:
  note: previous declaration â

    292 |   Bridge& operator=(const int& ) { return *this; }
        |           ^~~~~~~~

  
  /home/jeremy/work/opencv_build/opencv_contrib/modules/matlab/include/opencv2/matlab/bridge.hpp:514:3:
  error: â cannot be overloaded with
  â

    514 |   operator Ptr_TonemapDurand() { return toPtrTonemapDurand(); }
        |   ^~~~~~~~

  
  /home/jeremy/work/opencv_build/opencv_contrib/modules/matlab/include/opencv2/matlab/bridge.hpp:294:3:
  note: previous declaration â

    294 |   operator int() { return toInt(); }

Could anyone assist me or help me on this ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant