You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
gentoo-overlay/dev-ros/laser_cb_detector/files/ocv4-2.patch

35 lines
1.1 KiB

Index: laser_cb_detector/test/laser_cb_detector_unittest.cpp
===================================================================
--- laser_cb_detector.orig/test/laser_cb_detector_unittest.cpp
+++ laser_cb_detector/test/laser_cb_detector_unittest.cpp
@@ -37,7 +37,7 @@
#include <laser_cb_detector/ConfigGoal.h>
#include <laser_cb_detector/laser_cb_detector.h>
-#include <opencv/highgui.h>
+#include <opencv2/highgui.hpp>
using namespace laser_cb_detector;
using namespace std;
@@ -55,8 +55,9 @@ static const string test_path = xstr(TES
calibration_msgs::DenseLaserSnapshot getSnapshot(const string& filename)
{
- IplImage* image;
- image = cvLoadImage(filename.c_str(), 0); // 0 -> Force image to grayscale
+ cv::Mat mat = cv::imread(filename.c_str(), 0);
+ IplImage image_v = cvIplImage(mat);
+ IplImage* image = &image_v;
EXPECT_TRUE(image) << "could not open image file [" << filename << "]" << endl;
@@ -92,7 +93,7 @@ calibration_msgs::DenseLaserSnapshot get
}
cvReleaseImage(&float_image);
- cvReleaseImage(&image);
+ //cvReleaseImage(&image);
return snapshot;
}