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

Installing on ubuntu 20.10 #57

Open
kevkid opened this issue Nov 20, 2020 · 1 comment
Open

Installing on ubuntu 20.10 #57

kevkid opened this issue Nov 20, 2020 · 1 comment

Comments

@kevkid
Copy link

kevkid commented Nov 20, 2020

Hi I am trying to compile and install on ubuntu 20.10 and I am recieving the following error:

[ 10%] Building CXX object CMakeFiles/gslamDB_tummono.dir/GSLAM/plugins/datasets/DatasetTUMMono.cpp.o
/home/kevin/slam/GSLAM/GSLAM/plugins/datasets/DatasetTUMMono.cpp: In member function ‘bool DatasetTUMMono::loadVignette(const string&)’:
/home/kevin/slam/GSLAM/GSLAM/plugins/datasets/DatasetTUMMono.cpp:274:44: error: ‘CV_LOAD_IMAGE_GRAYSCALE’ was not declared in this scope
  274 |         cv::Mat vigMat=cv::imread(vigFile, CV_LOAD_IMAGE_GRAYSCALE);
      |                                            ^~~~~~~~~~~~~~~~~~~~~~~
/home/kevin/slam/GSLAM/GSLAM/plugins/datasets/DatasetTUMMono.cpp:277:23: error: no match for ‘operator=’ (operand types are ‘GSLAM::GImage’ and ‘cv::Mat’)
  277 |             _vignette=vigMat;
      |                       ^~~~~~
In file included from /home/kevin/slam/GSLAM/./GSLAM/core/GSLAM.h:66,
                 from /home/kevin/slam/GSLAM/GSLAM/plugins/datasets/DatasetTUMMono.cpp:5:
/home/kevin/slam/GSLAM/./GSLAM/core/GImage.h:215:13: note: candidate: ‘GSLAM::GImage& GSLAM::GImage::operator=(const GSLAM::GImage&)’
  215 |     GImage& operator=(const GImage& rhs)
      |             ^~~~~~~~
/home/kevin/slam/GSLAM/./GSLAM/core/GImage.h:215:37: note:   no known conversion for argument 1 from ‘cv::Mat’ to ‘const GSLAM::GImage&’
  215 |     GImage& operator=(const GImage& rhs)
      |                       ~~~~~~~~~~~~~~^~~
make[2]: *** [CMakeFiles/gslamDB_tummono.dir/build.make:63: CMakeFiles/gslamDB_tummono.dir/GSLAM/plugins/datasets/DatasetTUMMono.cpp.o] Error 1
make[2]: Leaving directory '/home/kevin/slam/GSLAM/build'
make[1]: *** [CMakeFiles/Makefile2:196: CMakeFiles/gslamDB_tummono.dir/all] Error 2
make[1]: Leaving directory '/home/kevin/slam/GSLAM/build'
make: *** [Makefile:130: all] Error 2

Any idea how I can fix this?

@harshalkataria
Copy link

harshalkataria commented May 31, 2021

I got the same error ,
first we can change "CV_LOAD_IMAGE_GRAYSCALE" to "cv::IMREAD_GRAYSCALE" to solve the error with line 274,
NOTE: as far as i know this change is visible since opencv 3.1

Further I am trying to solve the error on Ubuntu 21.04, let me know if you have already found the solution

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