JakobEngel / dso

Direct Sparse Odometry
GNU General Public License v3.0
2.27k stars 906 forks source link

Error occur when make ImageRW_OpenCV.cpp #255

Closed IldarGreat closed 1 year ago

IldarGreat commented 1 year ago

When I try to build the project, on 90% I get an errors in ImageRW_OpenCV.cpp file.

Sorry for the screenshot, I forgot to enable the shared clipboard for the guest and host OS

Снимок экрана (391)

As you can see, the error is something like this: CV_LOADIMAGE... was not declared in the scope. I'm new at this :) how can I fix this errors?

IldarGreat commented 1 year ago

The problem is solved, I have a new version of opencv, the code is written in the older version, all I need it swap this constants:

CV_LOAD_IMAGE_GRAYSCALE with cv::IMREAD_GRAYSCALE CV_LOAD_IMAGE_COLOR with cv::IMREAD_COLOR CV_LOAD_IMAGE_UNCHANGED cv::IMREAD_UNCHANGED

in dso/src/IOWrapper/OpenCV/ImageRW_OpenCV.cpp: