OpenCV 5 support

This commit is contained in:
matlabbe
2026-07-08 20:40:40 -07:00
parent e321999b15
commit 0c0fd3b9ec
69 changed files with 374 additions and 224 deletions
+4 -3
View File
@@ -40,8 +40,9 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#include "rtabmap/utilite/UEventsManager.h"
#include <opencv2/highgui/highgui.hpp>
#include <opencv2/imgproc/imgproc.hpp>
#include <opencv2/imgproc/types_c.h>
#if CV_MAJOR_VERSION >= 3
#if CV_MAJOR_VERSION >= 5
#include <opencv2/videoio.hpp>
#elif CV_MAJOR_VERSION >= 3
#include <opencv2/videoio/videoio_c.h>
#endif
#include <pcl/visualization/cloud_viewer.h>
@@ -470,7 +471,7 @@ int main(int argc, char * argv[])
{
if(right.channels() == 3)
{
cv::cvtColor(right, right, CV_BGR2GRAY);
cv::cvtColor(right, right, cv::COLOR_BGR2GRAY);
}
pcl::PointCloud<pcl::PointXYZRGB>::Ptr cloud = rtabmap::util3d::cloudFromStereoImages(
rgb, right,