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

Ubuntu 22.04 Build not Recognizing Viz Module #239

Open
CharlieRusso001 opened this issue Aug 28, 2024 · 1 comment
Open

Ubuntu 22.04 Build not Recognizing Viz Module #239

CharlieRusso001 opened this issue Aug 28, 2024 · 1 comment

Comments

@CharlieRusso001
Copy link

Description:
When compiling the viz module from OpenCV is not recognized.

Command:

# replace this line with the command(s) you used

make -j$(nproc)

Console output:


/home/charl/scald/mapping/Kimera-VIO/src/frontend/RgbdCamera.cpp: In function ‘void VIO::convertToPcl(const cv::Mat&, const cv::Mat&, const Intrinsics&, const T&, cv::Mat*, cv::Mat*)’:
/home/charl/scald/mapping/Kimera-VIO/src/frontend/RgbdCamera.cpp:53:48: error: ‘viz’ is not a member of ‘cv’
   53 |       cv::Mat(img_rows, img_cols, CV_8UC3, cv::viz::Color::red());

Please give also the following information:

  • Kimera-Vio branch, tag or commit used: The most recent
  • GTSAM version used:
  • OpenGV version used:
  • OpenCV version used: type opencv_version 4.6.0
  • Operating system and version (e.g. Ubuntu 16.04 or Windows 10): Ubuntu 22.04
  • Did you change the source code? (yes / no): no

Is there any way to fix this build issue

@limshoonkit
Copy link

limshoonkit commented Sep 9, 2024

Did you build your opencv from source?

  1. If so you may need to enable the -DWITH_VTK=On option when building it.
    You can check your opencv version and lib by adding the following lines in CMakeLists.txt
message(STATUS "OpenCV Include: ${OpenCV_INCLUDE_DIRS}")
message(STATUS "OpenCV Libs: ${OpenCV_LIBRARIES}")
  1. Following are the options I used to compile it.
find_package(OpenCV 4.10 REQUIRED 
            COMPONENTS 
            viz core imgproc highgui features2d calib3d rgbd video)
  1. In some include folder, camera.h for instance, you may have to add the following header file
#include <opencv2/viz.hpp>

Happy debugging!

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

2 participants