mirror of
https://github.com/introlab/rtabmap.git
synced 2026-10-07 10:37:47 +08:00
OpenCV 5 support (#1732)
* OpenCV 5 support * RTABMapConfig.cmake, guard from including stereoRectifyFisheye.h * unified opencv components at the same place * fixing android build * Confirmed stereo calibration with fisheye works. Fix camera start/top progress dialog not drawn. Opencv >=4.7 using new opencv's ArucoDetector class. * pinning opencv for downstream apps * Avoid changing object/image points between fisheye calibration * Fixed stereo calib diverging when recalibrating same data * removed not needed opencv c api * fixing depthai build on opencv5 * bumped version * Adding ci opencv5 with homebrew * fixed ci script * Fixed OptimizerCeres build with opencv5
This commit is contained in:
@@ -29,7 +29,6 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
#include <rtabmap/utilite/UMath.h>
|
||||
#include <rtabmap/utilite/UTimer.h>
|
||||
#include <rtabmap/core/util2d.h>
|
||||
#include <opencv2/imgproc/types_c.h>
|
||||
|
||||
#ifdef RTABMAP_FREENECT2
|
||||
#include <libfreenect2/libfreenect2.hpp>
|
||||
@@ -430,11 +429,11 @@ SensorData CameraFreenect2::captureImage(SensorCaptureInfo * info)
|
||||
cv::Mat rgbMat; // rtabmap uses 3 channels RGB
|
||||
#ifdef LIBFREENECT2_WITH_TEGRAJPEG_SUPPORT
|
||||
|
||||
cv::cvtColor(rgbMatC4, rgbMat, CV_RGBA2BGR);
|
||||
cv::cvtColor(rgbMatC4, rgbMat, cv::COLOR_RGBA2BGR);
|
||||
|
||||
#else
|
||||
|
||||
cv::cvtColor(rgbMatC4, rgbMat, CV_BGRA2BGR);
|
||||
cv::cvtColor(rgbMatC4, rgbMat, cv::COLOR_BGRA2BGR);
|
||||
|
||||
#endif
|
||||
cv::flip(rgbMat, rgb, 1);
|
||||
@@ -490,11 +489,11 @@ SensorData CameraFreenect2::captureImage(SensorCaptureInfo * info)
|
||||
cv::Mat rgbMat; // rtabmap uses 3 channels RGB
|
||||
#ifdef LIBFREENECT2_WITH_TEGRAJPEG_SUPPORT
|
||||
|
||||
cv::cvtColor(rgbMatC4, rgbMat, CV_RGB2BGR);
|
||||
cv::cvtColor(rgbMatC4, rgbMat, cv::COLOR_RGB2BGR);
|
||||
|
||||
#else
|
||||
|
||||
cv::cvtColor(rgbMatC4, rgbMat, CV_BGRA2BGR);
|
||||
cv::cvtColor(rgbMatC4, rgbMat, cv::COLOR_BGRA2BGR);
|
||||
|
||||
#endif
|
||||
cv::flip(rgbMat, rgb, 1);
|
||||
@@ -607,11 +606,11 @@ SensorData CameraFreenect2::captureImage(SensorCaptureInfo * info)
|
||||
// rtabmap uses 3 channels RGB
|
||||
#ifdef LIBFREENECT2_WITH_TEGRAJPEG_SUPPORT
|
||||
|
||||
cv::cvtColor(rgbMatBGRA, rgb, CV_RGBA2BGR);
|
||||
cv::cvtColor(rgbMatBGRA, rgb, cv::COLOR_RGBA2BGR);
|
||||
|
||||
#else
|
||||
|
||||
cv::cvtColor(rgbMatBGRA, rgb, CV_BGRA2BGR);
|
||||
cv::cvtColor(rgbMatBGRA, rgb, cv::COLOR_BGRA2BGR);
|
||||
|
||||
#endif
|
||||
cv::flip(rgb, rgb, 1);
|
||||
@@ -629,11 +628,11 @@ SensorData CameraFreenect2::captureImage(SensorCaptureInfo * info)
|
||||
// rtabmap uses 3 channels RGB
|
||||
#ifdef LIBFREENECT2_WITH_TEGRAJPEG_SUPPORT
|
||||
|
||||
cv::cvtColor(rgbMatBGRA, rgb, CV_RGBA2BGR);
|
||||
cv::cvtColor(rgbMatBGRA, rgb, cv::COLOR_RGBA2BGR);
|
||||
|
||||
#else
|
||||
|
||||
cv::cvtColor(rgbMatBGRA, rgb, CV_BGRA2BGR);
|
||||
cv::cvtColor(rgbMatBGRA, rgb, cv::COLOR_BGRA2BGR);
|
||||
|
||||
#endif
|
||||
cv::flip(rgb, rgb, 1);
|
||||
|
||||
Reference in New Issue
Block a user