mirror of
https://github.com/introlab/rtabmap.git
synced 2026-09-03 01:50:24 +08:00
Fixed build with OpenCV4 (#322)
This commit is contained in:
@@ -948,6 +948,8 @@ void ORB::parseParameters(const ParametersMap & parameters)
|
|||||||
{
|
{
|
||||||
#if CV_MAJOR_VERSION < 3
|
#if CV_MAJOR_VERSION < 3
|
||||||
_orb = cv::Ptr<CV_ORB>(new CV_ORB(this->getMaxFeatures(), scaleFactor_, nLevels_, edgeThreshold_, firstLevel_, WTA_K_, scoreType_, patchSize_, parameters));
|
_orb = cv::Ptr<CV_ORB>(new CV_ORB(this->getMaxFeatures(), scaleFactor_, nLevels_, edgeThreshold_, firstLevel_, WTA_K_, scoreType_, patchSize_, parameters));
|
||||||
|
#elif CV_MAJOR_VERSION > 3
|
||||||
|
_orb = CV_ORB::create(this->getMaxFeatures(), scaleFactor_, nLevels_, edgeThreshold_, firstLevel_, WTA_K_, (cv::ORB::ScoreType)scoreType_, patchSize_, fastThreshold_);
|
||||||
#else
|
#else
|
||||||
_orb = CV_ORB::create(this->getMaxFeatures(), scaleFactor_, nLevels_, edgeThreshold_, firstLevel_, WTA_K_, scoreType_, patchSize_, fastThreshold_);
|
_orb = CV_ORB::create(this->getMaxFeatures(), scaleFactor_, nLevels_, edgeThreshold_, firstLevel_, WTA_K_, scoreType_, patchSize_, fastThreshold_);
|
||||||
#endif
|
#endif
|
||||||
@@ -1548,7 +1550,9 @@ void KAZE::parseParameters(const ParametersMap & parameters)
|
|||||||
Parameters::parse(parameters, Parameters::kKAZENOctaveLayers(), nOctaveLayers_);
|
Parameters::parse(parameters, Parameters::kKAZENOctaveLayers(), nOctaveLayers_);
|
||||||
Parameters::parse(parameters, Parameters::kKAZEDiffusivity(), diffusivity_);
|
Parameters::parse(parameters, Parameters::kKAZEDiffusivity(), diffusivity_);
|
||||||
|
|
||||||
#if CV_MAJOR_VERSION > 2
|
#if CV_MAJOR_VERSION > 3
|
||||||
|
kaze_ = cv::KAZE::create(extended_, upright_, threshold_, nOctaves_, nOctaveLayers_, (cv::KAZE::DiffusivityType)diffusivity_);
|
||||||
|
#elif CV_MAJOR_VERSION > 2
|
||||||
kaze_ = cv::KAZE::create(extended_, upright_, threshold_, nOctaves_, nOctaveLayers_, diffusivity_);
|
kaze_ = cv::KAZE::create(extended_, upright_, threshold_, nOctaves_, nOctaveLayers_, diffusivity_);
|
||||||
#else
|
#else
|
||||||
UWARN("RTAB-Map is not built with OpenCV3 so Kaze feature cannot be used!");
|
UWARN("RTAB-Map is not built with OpenCV3 so Kaze feature cannot be used!");
|
||||||
|
|||||||
@@ -28,6 +28,7 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|||||||
#include <rtabmap/utilite/UThread.h>
|
#include <rtabmap/utilite/UThread.h>
|
||||||
#include <rtabmap/utilite/UTimer.h>
|
#include <rtabmap/utilite/UTimer.h>
|
||||||
#include <rtabmap/core/util2d.h>
|
#include <rtabmap/core/util2d.h>
|
||||||
|
#include <opencv2/imgproc/types_c.h>
|
||||||
|
|
||||||
#ifdef RTABMAP_FREENECT
|
#ifdef RTABMAP_FREENECT
|
||||||
#include <libfreenect.h>
|
#include <libfreenect.h>
|
||||||
|
|||||||
@@ -29,6 +29,7 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|||||||
#include <rtabmap/utilite/UMath.h>
|
#include <rtabmap/utilite/UMath.h>
|
||||||
#include <rtabmap/utilite/UTimer.h>
|
#include <rtabmap/utilite/UTimer.h>
|
||||||
#include <rtabmap/core/util2d.h>
|
#include <rtabmap/core/util2d.h>
|
||||||
|
#include <opencv2/imgproc/types_c.h>
|
||||||
|
|
||||||
#ifdef RTABMAP_FREENECT2
|
#ifdef RTABMAP_FREENECT2
|
||||||
#include <libfreenect2/libfreenect2.hpp>
|
#include <libfreenect2/libfreenect2.hpp>
|
||||||
|
|||||||
@@ -33,6 +33,7 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|||||||
#include <rtabmap/core/util3d.h>
|
#include <rtabmap/core/util3d.h>
|
||||||
#include <rtabmap/core/util3d_filtering.h>
|
#include <rtabmap/core/util3d_filtering.h>
|
||||||
#include <rtabmap/core/Graph.h>
|
#include <rtabmap/core/Graph.h>
|
||||||
|
#include <opencv2/imgproc/types_c.h>
|
||||||
#include <fstream>
|
#include <fstream>
|
||||||
|
|
||||||
namespace rtabmap
|
namespace rtabmap
|
||||||
|
|||||||
@@ -28,6 +28,7 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|||||||
#include <rtabmap/utilite/UTimer.h>
|
#include <rtabmap/utilite/UTimer.h>
|
||||||
#include <rtabmap/utilite/UThreadC.h>
|
#include <rtabmap/utilite/UThreadC.h>
|
||||||
#include <rtabmap/core/util2d.h>
|
#include <rtabmap/core/util2d.h>
|
||||||
|
#include <opencv2/imgproc/types_c.h>
|
||||||
|
|
||||||
#ifdef RTABMAP_K4W2
|
#ifdef RTABMAP_K4W2
|
||||||
#include <Kinect.h>
|
#include <Kinect.h>
|
||||||
|
|||||||
@@ -29,6 +29,7 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|||||||
#include <rtabmap/utilite/UFile.h>
|
#include <rtabmap/utilite/UFile.h>
|
||||||
#include <rtabmap/utilite/UThreadC.h>
|
#include <rtabmap/utilite/UThreadC.h>
|
||||||
#include <rtabmap/core/util2d.h>
|
#include <rtabmap/core/util2d.h>
|
||||||
|
#include <opencv2/imgproc/types_c.h>
|
||||||
|
|
||||||
#ifdef RTABMAP_OPENNI2
|
#ifdef RTABMAP_OPENNI2
|
||||||
#include <OniVersion.h>
|
#include <OniVersion.h>
|
||||||
|
|||||||
@@ -26,6 +26,7 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|||||||
|
|
||||||
#include <rtabmap/core/camera/CameraOpenNICV.h>
|
#include <rtabmap/core/camera/CameraOpenNICV.h>
|
||||||
#include <rtabmap/utilite/UTimer.h>
|
#include <rtabmap/utilite/UTimer.h>
|
||||||
|
#include <opencv2/videoio/videoio_c.h>
|
||||||
|
|
||||||
namespace rtabmap
|
namespace rtabmap
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -28,6 +28,7 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|||||||
#include <rtabmap/utilite/UFile.h>
|
#include <rtabmap/utilite/UFile.h>
|
||||||
#include <rtabmap/utilite/UThreadC.h>
|
#include <rtabmap/utilite/UThreadC.h>
|
||||||
#include <rtabmap/utilite/UTimer.h>
|
#include <rtabmap/utilite/UTimer.h>
|
||||||
|
#include <opencv2/imgproc/types_c.h>
|
||||||
|
|
||||||
#ifdef RTABMAP_OPENNI
|
#ifdef RTABMAP_OPENNI
|
||||||
#include <pcl/io/openni_grabber.h>
|
#include <pcl/io/openni_grabber.h>
|
||||||
|
|||||||
@@ -29,6 +29,7 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|||||||
#include <rtabmap/utilite/UMath.h>
|
#include <rtabmap/utilite/UMath.h>
|
||||||
#include <rtabmap/utilite/UThreadC.h>
|
#include <rtabmap/utilite/UThreadC.h>
|
||||||
#include <rtabmap/core/util2d.h>
|
#include <rtabmap/core/util2d.h>
|
||||||
|
#include <opencv2/imgproc/types_c.h>
|
||||||
|
|
||||||
#ifdef RTABMAP_REALSENSE
|
#ifdef RTABMAP_REALSENSE
|
||||||
#include <librealsense/rs.hpp>
|
#include <librealsense/rs.hpp>
|
||||||
|
|||||||
@@ -28,6 +28,7 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|||||||
#include <rtabmap/utilite/UTimer.h>
|
#include <rtabmap/utilite/UTimer.h>
|
||||||
#include <rtabmap/utilite/UThreadC.h>
|
#include <rtabmap/utilite/UThreadC.h>
|
||||||
#include <rtabmap/utilite/UConversion.h>
|
#include <rtabmap/utilite/UConversion.h>
|
||||||
|
#include <opencv2/imgproc/types_c.h>
|
||||||
|
|
||||||
#ifdef RTABMAP_REALSENSE2
|
#ifdef RTABMAP_REALSENSE2
|
||||||
#include <librealsense2/rs.hpp>
|
#include <librealsense2/rs.hpp>
|
||||||
|
|||||||
@@ -28,6 +28,7 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|||||||
#include <rtabmap/core/camera/CameraStereoDC1394.h>
|
#include <rtabmap/core/camera/CameraStereoDC1394.h>
|
||||||
#include <rtabmap/utilite/UTimer.h>
|
#include <rtabmap/utilite/UTimer.h>
|
||||||
#include <rtabmap/utilite/UConversion.h>
|
#include <rtabmap/utilite/UConversion.h>
|
||||||
|
#include <opencv2/imgproc/types_c.h>
|
||||||
|
|
||||||
#ifdef RTABMAP_DC1394
|
#ifdef RTABMAP_DC1394
|
||||||
#include <dc1394/dc1394.h>
|
#include <dc1394/dc1394.h>
|
||||||
|
|||||||
@@ -27,6 +27,7 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|||||||
|
|
||||||
#include <rtabmap/core/camera/CameraStereoImages.h>
|
#include <rtabmap/core/camera/CameraStereoImages.h>
|
||||||
#include <rtabmap/utilite/UStl.h>
|
#include <rtabmap/utilite/UStl.h>
|
||||||
|
#include <opencv2/imgproc/types_c.h>
|
||||||
|
|
||||||
namespace rtabmap
|
namespace rtabmap
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -28,6 +28,8 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|||||||
#include <rtabmap/core/camera/CameraStereoVideo.h>
|
#include <rtabmap/core/camera/CameraStereoVideo.h>
|
||||||
#include <rtabmap/utilite/UTimer.h>
|
#include <rtabmap/utilite/UTimer.h>
|
||||||
#include <rtabmap/utilite/UConversion.h>
|
#include <rtabmap/utilite/UConversion.h>
|
||||||
|
#include <opencv2/videoio/videoio_c.h>
|
||||||
|
#include <opencv2/imgproc/types_c.h>
|
||||||
|
|
||||||
namespace rtabmap
|
namespace rtabmap
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -28,6 +28,7 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|||||||
#include <rtabmap/core/camera/CameraVideo.h>
|
#include <rtabmap/core/camera/CameraVideo.h>
|
||||||
#include <rtabmap/utilite/UTimer.h>
|
#include <rtabmap/utilite/UTimer.h>
|
||||||
#include <rtabmap/utilite/UConversion.h>
|
#include <rtabmap/utilite/UConversion.h>
|
||||||
|
#include <opencv2/videoio/videoio_c.h>
|
||||||
|
|
||||||
namespace rtabmap
|
namespace rtabmap
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -31,6 +31,7 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|||||||
#include "rtabmap/utilite/ULogger.h"
|
#include "rtabmap/utilite/ULogger.h"
|
||||||
#include "rtabmap/utilite/UTimer.h"
|
#include "rtabmap/utilite/UTimer.h"
|
||||||
#include "rtabmap/utilite/UStl.h"
|
#include "rtabmap/utilite/UStl.h"
|
||||||
|
#include <opencv2/imgproc/types_c.h>
|
||||||
|
|
||||||
#ifdef RTABMAP_DVO
|
#ifdef RTABMAP_DVO
|
||||||
#include <dvo/dense_tracking.h>
|
#include <dvo/dense_tracking.h>
|
||||||
|
|||||||
@@ -31,6 +31,7 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|||||||
#include "rtabmap/utilite/ULogger.h"
|
#include "rtabmap/utilite/ULogger.h"
|
||||||
#include "rtabmap/utilite/UTimer.h"
|
#include "rtabmap/utilite/UTimer.h"
|
||||||
#include "rtabmap/utilite/UStl.h"
|
#include "rtabmap/utilite/UStl.h"
|
||||||
|
#include <opencv2/imgproc/types_c.h>
|
||||||
|
|
||||||
#ifdef RTABMAP_FOVIS
|
#ifdef RTABMAP_FOVIS
|
||||||
#include <libfovis/fovis.hpp>
|
#include <libfovis/fovis.hpp>
|
||||||
|
|||||||
@@ -32,6 +32,7 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|||||||
#include "rtabmap/utilite/UTimer.h"
|
#include "rtabmap/utilite/UTimer.h"
|
||||||
#include "rtabmap/utilite/UStl.h"
|
#include "rtabmap/utilite/UStl.h"
|
||||||
#include "rtabmap/utilite/UThread.h"
|
#include "rtabmap/utilite/UThread.h"
|
||||||
|
#include <opencv2/imgproc/types_c.h>
|
||||||
|
|
||||||
#ifdef RTABMAP_MSCKF_VIO
|
#ifdef RTABMAP_MSCKF_VIO
|
||||||
#include <msckf_vio/image_processor.h>
|
#include <msckf_vio/image_processor.h>
|
||||||
|
|||||||
@@ -34,6 +34,7 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|||||||
#include "rtabmap/utilite/UStl.h"
|
#include "rtabmap/utilite/UStl.h"
|
||||||
#include "rtabmap/utilite/UDirectory.h"
|
#include "rtabmap/utilite/UDirectory.h"
|
||||||
#include <pcl/common/transforms.h>
|
#include <pcl/common/transforms.h>
|
||||||
|
#include <opencv2/imgproc/types_c.h>
|
||||||
|
|
||||||
#ifdef RTABMAP_ORB_SLAM2
|
#ifdef RTABMAP_ORB_SLAM2
|
||||||
#include <System.h>
|
#include <System.h>
|
||||||
|
|||||||
@@ -32,6 +32,7 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|||||||
#include "rtabmap/utilite/UTimer.h"
|
#include "rtabmap/utilite/UTimer.h"
|
||||||
#include "rtabmap/utilite/UStl.h"
|
#include "rtabmap/utilite/UStl.h"
|
||||||
#include "rtabmap/utilite/UThread.h"
|
#include "rtabmap/utilite/UThread.h"
|
||||||
|
#include <opencv2/imgproc/types_c.h>
|
||||||
|
|
||||||
#ifdef RTABMAP_OKVIS
|
#ifdef RTABMAP_OKVIS
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
|
|||||||
@@ -31,6 +31,7 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|||||||
#include "rtabmap/utilite/ULogger.h"
|
#include "rtabmap/utilite/ULogger.h"
|
||||||
#include "rtabmap/utilite/UTimer.h"
|
#include "rtabmap/utilite/UTimer.h"
|
||||||
#include "rtabmap/utilite/UStl.h"
|
#include "rtabmap/utilite/UStl.h"
|
||||||
|
#include <opencv2/imgproc/types_c.h>
|
||||||
|
|
||||||
#ifdef RTABMAP_VISO2
|
#ifdef RTABMAP_VISO2
|
||||||
#include <viso_stereo.h>
|
#include <viso_stereo.h>
|
||||||
|
|||||||
Reference in New Issue
Block a user