Skip to content

Commit

Permalink
fix compilation on Indigo
Browse files Browse the repository at this point in the history
  • Loading branch information
vrabaud committed Apr 10, 2016
1 parent f316dde commit 6b3a8a1
Show file tree
Hide file tree
Showing 6 changed files with 7 additions and 8 deletions.
2 changes: 1 addition & 1 deletion cells/opencv/features2d/DescriptorExtractor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ struct EctoDescriptorExtractor
#else
descriptor_extractor_ = cv::DescriptorExtractor::create(descriptor_extractor_type_names[T]);
#endif
read_tendrils_as_file_node(params, *descriptor_extractor_);
read_tendrils_as_file_node(params, descriptor_extractor_);
}

int
Expand Down
3 changes: 1 addition & 2 deletions cells/opencv/features2d/FeatureDetector.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -102,8 +102,7 @@ struct EctoFeatureDetector
#else
feature_detector_ = cv::FeatureDetector::create(feature_detector_type_names[T]);
#endif

read_tendrils_as_file_node(params, *feature_detector_);
read_tendrils_as_file_node(params, feature_detector_);
}

int
Expand Down
2 changes: 1 addition & 1 deletion cells/opencv/features2d/ORB.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ struct ORB
#if CV_MAJOR_VERSION ==3
orb_ = cv::ORB::create(*n_features_, *scale_factor_, *n_levels_);
#elif (CV_MAJOR_VERSION == 2) && (CV_MINOR_VERSION >= 4)
orb = cv::Ptr<cv::ORB>(new cv::ORB(*n_features_, *scale_factor_, *n_levels_));
orb_ = cv::Ptr<cv::ORB>(new cv::ORB(*n_features_, *scale_factor_, *n_levels_));
#else
cv::ORB::CommonParams orb_params;
orb_params.first_level_ = 0;
Expand Down
4 changes: 2 additions & 2 deletions cells/opencv/features2d/interfaces.h
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ using ecto::tendrils;

template <typename T>
void
read_tendrils_as_file_node(const ecto::tendrils & tendrils, T obj) {
read_tendrils_as_file_node(const ecto::tendrils & tendrils, cv::Ptr<T> obj) {
// Get the file
std::string file_name;
{
Expand Down Expand Up @@ -90,7 +90,7 @@ read_tendrils_as_file_node(const ecto::tendrils & tendrils, T obj) {

{
cv::FileStorage fs(file_name, cv::FileStorage::READ);
obj.read(fs.root());
obj->read(fs.root());
}

// Remove the temporary file
Expand Down
2 changes: 1 addition & 1 deletion cells/opencv/rgbd/Odometry.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ using namespace std;

if (odometry_.empty())
{
odometry_.reset(new RgbdOdometry());
odometry_ = cv::Ptr<RgbdOdometry>(new RgbdOdometry());
#if CV_VERSION_MAJOR == 3
odometry_->setCameraMatrix(cameraMatrix);
#else
Expand Down
2 changes: 1 addition & 1 deletion test/cells/ImageGen.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
#include <opencv2/highgui/highgui.hpp>
#include <iostream>
#define SHOW() std::cout << __PRETTY_FUNCTION__ << std::endl;
#if CV_MAJOR_VERSION
#if CV_MAJOR_VERSION == 3
#define REFCOUNT(X) std::cout << "ref count:" << ((X->u) ? (X->u->refcount) : 0) << std::endl;
#else
#define REFCOUNT(X) std::cout << "ref count:" << ((X->refcount) ? *(X->refcount) : 0) << std::endl;
Expand Down

0 comments on commit 6b3a8a1

Please sign in to comment.