dso icon indicating copy to clipboard operation
dso copied to clipboard

Error while building " dso "

Open Shivani1796 opened this issue 5 years ago • 4 comments

/home/shivani/dso/src/IOWrapper/OpenCV/ImageRW_OpenCV.cpp: In function ‘dso::MinimalImageB* dso::IOWrap::readImageBW_8U(std::__cxx11::string)’: /home/shivani/dso/src/IOWrapper/OpenCV/ImageRW_OpenCV.cpp:37:35: error: ‘CV_LOAD_IMAGE_GRAYSCALE’ was not declared in this scope cv::Mat m = cv::imread(filename, CV_LOAD_IMAGE_GRAYSCALE);

unable to understand can anyone help . thanks

Shivani1796 avatar Sep 03 '19 12:09 Shivani1796

@Shivani1796 have you solved this issue? I have the same problem

K-M-Ibrahim-Khalilullah avatar May 27 '20 07:05 K-M-Ibrahim-Khalilullah

You need to edit the file to have #include <opencv2/imgcodecs.hpp> and replace all of the CV_LOAD_IMAGE_[x] with cv::IMREAD_[x] e.g. CV_LOAD_IMAGE_GRAYSCALE -> cv::IMREAD_GRAYSCALE CV_LOAD_IMAGE_[x] is from an older version of openCV and has been deprecated

jdriscoll319 avatar Oct 07 '20 22:10 jdriscoll319

I have both opencv versions installed, is there a way to point to opencv4?

aswinpajayan avatar Mar 15 '21 09:03 aswinpajayan

I have both opencv versions installed, is there a way to point to opencv4?

Please ignore, It seems like DSO is using opencv3. If you have multiple versions of opencv installed in your system just point to the right version in the CMakeLists.txt file .

for me it was in line 23 ; find_package(OpenCV 3 QUIET)

aswinpajayan avatar Mar 15 '21 09:03 aswinpajayan