mirror of
https://github.com/introlab/rtabmap.git
synced 2026-10-04 00:57:46 +08:00
OpenCV 5 support
This commit is contained in:
@@ -27,9 +27,13 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
#include <rtabmap/core/stereo/StereoSGBM.h>
|
||||
#include <rtabmap/utilite/ULogger.h>
|
||||
#if CV_MAJOR_VERSION < 5
|
||||
#include <opencv2/calib3d/calib3d.hpp>
|
||||
#else
|
||||
#include <opencv2/stereo.hpp>
|
||||
#include <opencv2/geometry.hpp>
|
||||
#endif
|
||||
#include <opencv2/imgproc/imgproc.hpp>
|
||||
#include <opencv2/imgproc/types_c.h>
|
||||
|
||||
namespace rtabmap {
|
||||
|
||||
@@ -77,7 +81,7 @@ cv::Mat StereoSGBM::computeDisparity(
|
||||
cv::Mat leftMono;
|
||||
if(leftImage.channels() == 3)
|
||||
{
|
||||
cv::cvtColor(leftImage, leftMono, CV_BGR2GRAY);
|
||||
cv::cvtColor(leftImage, leftMono, cv::COLOR_BGR2GRAY);
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -87,7 +91,7 @@ cv::Mat StereoSGBM::computeDisparity(
|
||||
cv::Mat rightMono;
|
||||
if(rightImage.channels() == 3)
|
||||
{
|
||||
cv::cvtColor(rightImage, rightMono, CV_BGR2GRAY);
|
||||
cv::cvtColor(rightImage, rightMono, cv::COLOR_BGR2GRAY);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user