Commit 320e633f authored by Alexander Alekhin's avatar Alexander Alekhin

Merge pull request #1981 from paroj:linemodpy

parents 3575a714 f515f0ff
......@@ -200,7 +200,7 @@ protected:
/**
* \brief Modality that computes quantized gradient orientations from a color image.
*/
class CV_EXPORTS ColorGradient : public Modality
class CV_EXPORTS_W ColorGradient : public Modality
{
public:
/**
......@@ -218,14 +218,16 @@ public:
*/
ColorGradient(float weak_threshold, size_t num_features, float strong_threshold);
CV_WRAP static Ptr<ColorGradient> create(float weak_threshold, size_t num_features, float strong_threshold);
virtual String name() const CV_OVERRIDE;
virtual void read(const FileNode& fn) CV_OVERRIDE;
virtual void write(FileStorage& fs) const CV_OVERRIDE;
float weak_threshold;
size_t num_features;
float strong_threshold;
CV_PROP float weak_threshold;
CV_PROP size_t num_features;
CV_PROP float strong_threshold;
protected:
virtual Ptr<QuantizedPyramid> processImpl(const Mat& src,
......@@ -235,7 +237,7 @@ protected:
/**
* \brief Modality that computes quantized surface normals from a dense depth map.
*/
class CV_EXPORTS DepthNormal : public Modality
class CV_EXPORTS_W DepthNormal : public Modality
{
public:
/**
......@@ -256,15 +258,18 @@ public:
DepthNormal(int distance_threshold, int difference_threshold, size_t num_features,
int extract_threshold);
CV_WRAP static Ptr<DepthNormal> create(int distance_threshold, int difference_threshold,
size_t num_features, int extract_threshold);
virtual String name() const CV_OVERRIDE;
virtual void read(const FileNode& fn) CV_OVERRIDE;
virtual void write(FileStorage& fs) const CV_OVERRIDE;
int distance_threshold;
int difference_threshold;
size_t num_features;
int extract_threshold;
CV_PROP int distance_threshold;
CV_PROP int difference_threshold;
CV_PROP size_t num_features;
CV_PROP int extract_threshold;
protected:
virtual Ptr<QuantizedPyramid> processImpl(const Mat& src,
......
......@@ -562,6 +562,11 @@ ColorGradient::ColorGradient(float _weak_threshold, size_t _num_features, float
{
}
Ptr<ColorGradient> ColorGradient::create(float weak_threshold, size_t num_features, float strong_threshold)
{
return makePtr<ColorGradient>(weak_threshold, num_features, strong_threshold);
}
static const char CG_NAME[] = "ColorGradient";
String ColorGradient::name() const
......@@ -877,6 +882,12 @@ DepthNormal::DepthNormal(int _distance_threshold, int _difference_threshold, siz
{
}
Ptr<DepthNormal> DepthNormal::create(int distance_threshold, int difference_threshold, size_t num_features,
int extract_threshold)
{
return makePtr<DepthNormal>(distance_threshold, difference_threshold, num_features, extract_threshold);
}
static const char DN_NAME[] = "DepthNormal";
String DepthNormal::name() const
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment