Browse Source

Fixed compilation without RGBD module.

pull/703/head
Canming Huang 4 years ago
parent
commit
2d4cf5ccd4
  1. 32
      Emgu.CV.Extern/rgbd/rgbd_c.cpp
  2. 7
      Emgu.CV.Extern/rgbd/rgbd_c.h

32
Emgu.CV.Extern/rgbd/rgbd_c.cpp

@ -7,9 +7,9 @@
#include "rgbd_c.h" #include "rgbd_c.h"
cv::rgbd::Odometry* cveOdometryCreate( cv::rgbd::Odometry* cveOdometryCreate(
cv::String* odometryType,
cv::Algorithm** algorithm,
cv::Ptr<cv::rgbd::Odometry>** sharedPtr
cv::String* odometryType,
cv::Algorithm** algorithm,
cv::Ptr<cv::rgbd::Odometry>** sharedPtr
) )
{ {
#ifdef HAVE_OPENCV_RGBD #ifdef HAVE_OPENCV_RGBD
@ -72,9 +72,9 @@ cv::rgbd::RgbdNormals* cveRgbdNormalsCreate(
cv::Ptr<cv::rgbd::RgbdNormals> odometry = cv::rgbd::RgbdNormals::create( cv::Ptr<cv::rgbd::RgbdNormals> odometry = cv::rgbd::RgbdNormals::create(
rows, rows,
cols, cols,
depth,
*K,
window_size,
depth,
*K,
window_size,
method); method);
*sharedPtr = new cv::Ptr<cv::rgbd::RgbdNormals>(odometry); *sharedPtr = new cv::Ptr<cv::rgbd::RgbdNormals>(odometry);
*algorithm = dynamic_cast<cv::Algorithm*>((*sharedPtr)->get()); *algorithm = dynamic_cast<cv::Algorithm*>((*sharedPtr)->get());
@ -256,4 +256,24 @@ void cveLinemodMatchRelease(cv::linemod::Match** match)
throw_no_rgbd(); throw_no_rgbd();
#endif #endif
}
cv::linemod::Modality* cveLinemodModalityCreate(cv::String* modalityType, cv::Ptr<cv::linemod::Modality>** sharedPtr)
{
#ifdef HAVE_OPENCV_RGBD
//TODO: Implement this.
#else
throw_no_rgbd();
#endif
}
void cveLinemodModalityRelease(cv::Ptr<cv::linemod::Modality>** sharedPtr)
{
#ifdef HAVE_OPENCV_RGBD
delete* sharedPtr;
*sharedPtr = 0;
#else
throw_no_rgbd();
#endif
} }

7
Emgu.CV.Extern/rgbd/rgbd_c.h

@ -21,6 +21,13 @@ namespace cv
class Odometry {}; class Odometry {};
class RgbdNormals {}; class RgbdNormals {};
} }
namespace linemod
{
class Detector {};
class Modality {};
struct Match {};
}
} }
#endif #endif

Loading…
Cancel
Save