Removed macros for generation Python wrapper to overcome build error, caused nested ximgproc namespace.

pull/52/head
vludv 10 years ago
parent 9e577c5f31
commit f3bfb60f18
  1. 28
      modules/ximgproc/include/opencv2/ximgproc/edge_filter.hpp
  2. 2
      modules/ximgproc/test/test_adaptive_manifold.cpp
  3. 2
      modules/ximgproc/test/test_guided_filter.cpp

@ -56,44 +56,44 @@ enum EdgeAwareFiltersList
/*Interface for DT filters*/
class CV_EXPORTS_W DTFilter : public Algorithm
class CV_EXPORTS DTFilter : public Algorithm
{
public:
CV_WRAP virtual void filter(InputArray src, OutputArray dst, int dDepth = -1) = 0;
virtual void filter(InputArray src, OutputArray dst, int dDepth = -1) = 0;
};
typedef Ptr<DTFilter> DTFilterPtr;
/*Fabric function for DT filters*/
CV_EXPORTS_W
CV_EXPORTS
Ptr<DTFilter> createDTFilter(InputArray guide, double sigmaSpatial, double sigmaColor, int mode = DTF_NC, int numIters = 3);
/*One-line DT filter call*/
CV_EXPORTS_W
CV_EXPORTS
void dtFilter(InputArray guide, InputArray src, OutputArray dst, double sigmaSpatial, double sigmaColor, int mode = DTF_NC, int numIters = 3);
//////////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////////
/*Interface for Guided Filter*/
class CV_EXPORTS_W GuidedFilter : public Algorithm
class CV_EXPORTS GuidedFilter : public Algorithm
{
public:
CV_WRAP virtual void filter(InputArray src, OutputArray dst, int dDepth = -1) = 0;
virtual void filter(InputArray src, OutputArray dst, int dDepth = -1) = 0;
};
/*Fabric function for Guided Filter*/
CV_EXPORTS_W Ptr<GuidedFilter> createGuidedFilter(InputArray guide, int radius, double eps);
CV_EXPORTS Ptr<GuidedFilter> createGuidedFilter(InputArray guide, int radius, double eps);
/*One-line Guided Filter call*/
CV_EXPORTS_W void guidedFilter(InputArray guide, InputArray src, OutputArray dst, int radius, double eps, int dDepth = -1);
CV_EXPORTS void guidedFilter(InputArray guide, InputArray src, OutputArray dst, int radius, double eps, int dDepth = -1);
//////////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////////
class CV_EXPORTS_W AdaptiveManifoldFilter : public Algorithm
class CV_EXPORTS AdaptiveManifoldFilter : public Algorithm
{
public:
/**
@ -102,23 +102,23 @@ public:
* @param dst Adaptive-manifold filter response.
* @param src_joint Image for joint filtering (optional).
*/
CV_WRAP virtual void filter(InputArray src, OutputArray dst, InputArray joint = noArray()) = 0;
virtual void filter(InputArray src, OutputArray dst, InputArray joint = noArray()) = 0;
CV_WRAP virtual void collectGarbage() = 0;
virtual void collectGarbage() = 0;
static Ptr<AdaptiveManifoldFilter> create();
};
//Fabric function for AM filter algorithm
CV_EXPORTS_W Ptr<AdaptiveManifoldFilter> createAMFilter(double sigma_s, double sigma_r, bool adjust_outliers = false);
CV_EXPORTS Ptr<AdaptiveManifoldFilter> createAMFilter(double sigma_s, double sigma_r, bool adjust_outliers = false);
//One-line Adaptive Manifold filter call
CV_EXPORTS_W void amFilter(InputArray joint, InputArray src, OutputArray dst, double sigma_s, double sigma_r, bool adjust_outliers = false);
CV_EXPORTS void amFilter(InputArray joint, InputArray src, OutputArray dst, double sigma_s, double sigma_r, bool adjust_outliers = false);
//////////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////////
CV_EXPORTS_W
CV_EXPORTS
void jointBilateralFilter(InputArray joint, InputArray src, OutputArray dst, int d, double sigmaColor, double sigmaSpace, int borderType = BORDER_DEFAULT);
}

@ -139,7 +139,7 @@ TEST_P(AdaptiveManifoldRefImplTest, RefImplAccuracy)
Mat src = imread(getOpenCVExtraDir() + srcFileName);
ASSERT_TRUE(!guide.empty() && !src.empty());
int seed = 10 * guideFileName.length() + srcFileName.length();
int seed = 10 * (int)guideFileName.length() + (int)srcFileName.length();
RNG rnd(seed);
//inconsistent downsample/upsample operations in reference implementation

@ -316,7 +316,7 @@ TEST_P(GuidedFilterTest, accuracy)
string guideFileName = get<2>(params);
string srcFileName = get<3>(params);
int seed = 100 * guideCnNum + 50 * srcCnNum + 5*guideFileName.length() + srcFileName.length();
int seed = 100 * guideCnNum + 50 * srcCnNum + 5*(int)guideFileName.length() + (int)srcFileName.length();
RNG rng(seed);
Mat guide = imread(getOpenCVExtraDir() + guideFileName);

Loading…
Cancel
Save