Commit 36fbabf2 authored by Vadim Pisarevsky's avatar Vadim Pisarevsky

Merge pull request #189 from mshabunin/fix-headers

Replaced property macros in headers
parents 63a86ac4 da7ff82d
...@@ -20,13 +20,19 @@ namespace cv { namespace face { ...@@ -20,13 +20,19 @@ namespace cv { namespace face {
class CV_EXPORTS_W BasicFaceRecognizer : public FaceRecognizer class CV_EXPORTS_W BasicFaceRecognizer : public FaceRecognizer
{ {
public: public:
CV_PURE_PROPERTY(int, NumComponents) /** @see setNumComponents */
CV_PURE_PROPERTY(double, Threshold) virtual int getNumComponents() const = 0;
CV_PURE_PROPERTY_RO(std::vector<cv::Mat>, Projections) /** @copybrief getNumComponents @see getNumComponents */
CV_PURE_PROPERTY_RO(cv::Mat, Labels) virtual void setNumComponents(int val) = 0;
CV_PURE_PROPERTY_RO(cv::Mat, EigenValues) /** @see setThreshold */
CV_PURE_PROPERTY_RO(cv::Mat, EigenVectors) virtual double getThreshold() const = 0;
CV_PURE_PROPERTY_RO(cv::Mat, Mean) /** @copybrief getThreshold @see getThreshold */
virtual void setThreshold(double val) = 0;
virtual std::vector<cv::Mat> getProjections() const = 0;
virtual cv::Mat getLabels() const = 0;
virtual cv::Mat getEigenValues() const = 0;
virtual cv::Mat getEigenVectors() const = 0;
virtual cv::Mat getMean() const = 0;
}; };
/** /**
...@@ -95,13 +101,28 @@ CV_EXPORTS_W Ptr<BasicFaceRecognizer> createFisherFaceRecognizer(int num_compone ...@@ -95,13 +101,28 @@ CV_EXPORTS_W Ptr<BasicFaceRecognizer> createFisherFaceRecognizer(int num_compone
class CV_EXPORTS_W LBPHFaceRecognizer : public FaceRecognizer class CV_EXPORTS_W LBPHFaceRecognizer : public FaceRecognizer
{ {
public: public:
CV_PURE_PROPERTY(int, GridX) /** @see setGridX */
CV_PURE_PROPERTY(int, GridY) virtual int getGridX() const = 0;
CV_PURE_PROPERTY(int, Radius) /** @copybrief getGridX @see getGridX */
CV_PURE_PROPERTY(int, Neighbors) virtual void setGridX(int val) = 0;
CV_PURE_PROPERTY(double, Threshold) /** @see setGridY */
CV_PURE_PROPERTY_RO(std::vector<cv::Mat>, Histograms) virtual int getGridY() const = 0;
CV_PURE_PROPERTY_RO(cv::Mat, Labels) /** @copybrief getGridY @see getGridY */
virtual void setGridY(int val) = 0;
/** @see setRadius */
virtual int getRadius() const = 0;
/** @copybrief getRadius @see getRadius */
virtual void setRadius(int val) = 0;
/** @see setNeighbors */
virtual int getNeighbors() const = 0;
/** @copybrief getNeighbors @see getNeighbors */
virtual void setNeighbors(int val) = 0;
/** @see setThreshold */
virtual double getThreshold() const = 0;
/** @copybrief getThreshold @see getThreshold */
virtual void setThreshold(double val) = 0;
virtual std::vector<cv::Mat> getHistograms() const = 0;
virtual cv::Mat getLabels() const = 0;
}; };
/** /**
......
...@@ -150,12 +150,54 @@ namespace rgbd ...@@ -150,12 +150,54 @@ namespace rgbd
void void
initialize() const; initialize() const;
CV_IMPL_PROPERTY(int, Rows, rows_) int getRows() const
CV_IMPL_PROPERTY(int, Cols, cols_) {
CV_IMPL_PROPERTY(int, WindowSize, window_size_) return rows_;
CV_IMPL_PROPERTY(int, Depth, depth_) }
CV_IMPL_PROPERTY_S(cv::Mat, K, K_) void setRows(int val)
CV_IMPL_PROPERTY(int, Method, method_) {
rows_ = val;
}
int getCols() const
{
return cols_;
}
void setCols(int val)
{
cols_ = val;
}
int getWindowSize() const
{
return window_size_;
}
void setWindowSize(int val)
{
window_size_ = val;
}
int getDepth() const
{
return depth_;
}
void setDepth(int val)
{
depth_ = val;
}
cv::Mat getK() const
{
return K_;
}
void setK(const cv::Mat &val)
{
K_ = val;
}
int getMethod() const
{
return method_;
}
void setMethod(int val)
{
method_ = val;
}
protected: protected:
void void
...@@ -213,9 +255,30 @@ namespace rgbd ...@@ -213,9 +255,30 @@ namespace rgbd
void void
initialize() const; initialize() const;
CV_IMPL_PROPERTY(int, WindowSize, window_size_) int getWindowSize() const
CV_IMPL_PROPERTY(int, Depth, depth_) {
CV_IMPL_PROPERTY(int, Method, method_) return window_size_;
}
void setWindowSize(int val)
{
window_size_ = val;
}
int getDepth() const
{
return depth_;
}
void setDepth(int val)
{
depth_ = val;
}
int getMethod() const
{
return method_;
}
void setMethod(int val)
{
method_ = val;
}
protected: protected:
void void
...@@ -305,13 +368,62 @@ namespace rgbd ...@@ -305,13 +368,62 @@ namespace rgbd
void void
operator()(InputArray points3d, OutputArray mask, OutputArray plane_coefficients); operator()(InputArray points3d, OutputArray mask, OutputArray plane_coefficients);
CV_IMPL_PROPERTY(int, BlockSize, block_size_) int getBlockSize() const
CV_IMPL_PROPERTY(int, MinSize, min_size_) {
CV_IMPL_PROPERTY(int, Method, method_) return block_size_;
CV_IMPL_PROPERTY(double, Threshold, threshold_) }
CV_IMPL_PROPERTY(double, SensorErrorA, sensor_error_a_) void setBlockSize(int val)
CV_IMPL_PROPERTY(double, SensorErrorB, sensor_error_b_) {
CV_IMPL_PROPERTY(double, SensorErrorC, sensor_error_c_) block_size_ = val;
}
int getMinSize() const
{
return min_size_;
}
void setMinSize(int val)
{
min_size_ = val;
}
int getMethod() const
{
return method_;
}
void setMethod(int val)
{
method_ = val;
}
double getThreshold() const
{
return threshold_;
}
void setThreshold(double val)
{
threshold_ = val;
}
double getSensorErrorA() const
{
return sensor_error_a_;
}
void setSensorErrorA(double val)
{
sensor_error_a_ = val;
}
double getSensorErrorB() const
{
return sensor_error_b_;
}
void setSensorErrorB(double val)
{
sensor_error_b_ = val;
}
double getSensorErrorC() const
{
return sensor_error_c_;
}
void setSensorErrorC(double val)
{
sensor_error_c_ = val;
}
private: private:
/** The method to use to compute the planes */ /** The method to use to compute the planes */
...@@ -466,16 +578,14 @@ namespace rgbd ...@@ -466,16 +578,14 @@ namespace rgbd
static Ptr<Odometry> create(const String & odometryType); static Ptr<Odometry> create(const String & odometryType);
//TODO: which properties are common for all Odometry successors? /** @see setCameraMatrix */
CV_PURE_PROPERTY_S(cv::Mat, CameraMatrix) virtual cv::Mat getCameraMatrix() const = 0;
// CV_PURE_PROPERTY(double, MinDepth) /** @copybrief getCameraMatrix @see getCameraMatrix */
// CV_PURE_PROPERTY(double, MaxDepth) virtual void setCameraMatrix(const cv::Mat &val) = 0;
// CV_PURE_PROPERTY(double, MaxDepthDiff) /** @see setTransformType */
// CV_PURE_PROPERTY_S(cv::Mat, IterationCounts) virtual int getTransformType() const = 0;
// CV_PURE_PROPERTY(double, MaxPointsPart) /** @copybrief getTransformType @see getTransformType */
CV_PURE_PROPERTY(int, TransformType) virtual void setTransformType(int val) = 0;
// CV_PURE_PROPERTY(double, MaxTranslation)
// CV_PURE_PROPERTY(double, MaxRotation)
protected: protected:
virtual void virtual void
...@@ -512,16 +622,86 @@ namespace rgbd ...@@ -512,16 +622,86 @@ namespace rgbd
virtual Size prepareFrameCache(Ptr<OdometryFrame>& frame, int cacheType) const; virtual Size prepareFrameCache(Ptr<OdometryFrame>& frame, int cacheType) const;
CV_IMPL_PROPERTY_S(cv::Mat, CameraMatrix, cameraMatrix) cv::Mat getCameraMatrix() const
CV_IMPL_PROPERTY(double, MinDepth, minDepth) {
CV_IMPL_PROPERTY(double, MaxDepth, maxDepth) return cameraMatrix;
CV_IMPL_PROPERTY(double, MaxDepthDiff, maxDepthDiff) }
CV_IMPL_PROPERTY_S(cv::Mat, IterationCounts, iterCounts) void setCameraMatrix(const cv::Mat &val)
CV_IMPL_PROPERTY_S(cv::Mat, MinGradientMagnitudes, minGradientMagnitudes) {
CV_IMPL_PROPERTY(double, MaxPointsPart, maxPointsPart) cameraMatrix = val;
CV_IMPL_PROPERTY(int, TransformType, transformType) }
CV_IMPL_PROPERTY(double, MaxTranslation, maxTranslation) double getMinDepth() const
CV_IMPL_PROPERTY(double, MaxRotation, maxRotation) {
return minDepth;
}
void setMinDepth(double val)
{
minDepth = val;
}
double getMaxDepth() const
{
return maxDepth;
}
void setMaxDepth(double val)
{
maxDepth = val;
}
double getMaxDepthDiff() const
{
return maxDepthDiff;
}
void setMaxDepthDiff(double val)
{
maxDepthDiff = val;
}
cv::Mat getIterationCounts() const
{
return iterCounts;
}
void setIterationCounts(const cv::Mat &val)
{
iterCounts = val;
}
cv::Mat getMinGradientMagnitudes() const
{
return minGradientMagnitudes;
}
void setMinGradientMagnitudes(const cv::Mat &val)
{
minGradientMagnitudes = val;
}
double getMaxPointsPart() const
{
return maxPointsPart;
}
void setMaxPointsPart(double val)
{
maxPointsPart = val;
}
int getTransformType() const
{
return transformType;
}
void setTransformType(int val)
{
transformType = val;
}
double getMaxTranslation() const
{
return maxTranslation;
}
void setMaxTranslation(double val)
{
maxTranslation = val;
}
double getMaxRotation() const
{
return maxRotation;
}
void setMaxRotation(double val)
{
maxRotation = val;
}
protected: protected:
virtual void virtual void
...@@ -569,16 +749,82 @@ namespace rgbd ...@@ -569,16 +749,82 @@ namespace rgbd
virtual Size prepareFrameCache(Ptr<OdometryFrame>& frame, int cacheType) const; virtual Size prepareFrameCache(Ptr<OdometryFrame>& frame, int cacheType) const;
CV_IMPL_PROPERTY_S(cv::Mat, CameraMatrix, cameraMatrix) cv::Mat getCameraMatrix() const
CV_IMPL_PROPERTY(double, MinDepth, minDepth) {
CV_IMPL_PROPERTY(double, MaxDepth, maxDepth) return cameraMatrix;
CV_IMPL_PROPERTY(double, MaxDepthDiff, maxDepthDiff) }
CV_IMPL_PROPERTY_S(cv::Mat, IterationCounts, iterCounts) void setCameraMatrix(const cv::Mat &val)
CV_IMPL_PROPERTY(double, MaxPointsPart, maxPointsPart) {
CV_IMPL_PROPERTY(int, TransformType, transformType) cameraMatrix = val;
CV_IMPL_PROPERTY(double, MaxTranslation, maxTranslation) }
CV_IMPL_PROPERTY(double, MaxRotation, maxRotation) double getMinDepth() const
CV_IMPL_PROPERTY_RO(Ptr<RgbdNormals>, NormalsComputer, normalsComputer) {
return minDepth;
}
void setMinDepth(double val)
{
minDepth = val;
}
double getMaxDepth() const
{
return maxDepth;
}
void setMaxDepth(double val)
{
maxDepth = val;
}
double getMaxDepthDiff() const
{
return maxDepthDiff;
}
void setMaxDepthDiff(double val)
{
maxDepthDiff = val;
}
cv::Mat getIterationCounts() const
{
return iterCounts;
}
void setIterationCounts(const cv::Mat &val)
{
iterCounts = val;
}
double getMaxPointsPart() const
{
return maxPointsPart;
}
void setMaxPointsPart(double val)
{
maxPointsPart = val;
}
int getTransformType() const
{
return transformType;
}
void setTransformType(int val)
{
transformType = val;
}
double getMaxTranslation() const
{
return maxTranslation;
}
void setMaxTranslation(double val)
{
maxTranslation = val;
}
double getMaxRotation() const
{
return maxRotation;
}
void setMaxRotation(double val)
{
maxRotation = val;
}
Ptr<RgbdNormals> getNormalsComputer() const
{
return normalsComputer;
}
protected: protected:
virtual void virtual void
...@@ -631,17 +877,90 @@ namespace rgbd ...@@ -631,17 +877,90 @@ namespace rgbd
virtual Size prepareFrameCache(Ptr<OdometryFrame>& frame, int cacheType) const; virtual Size prepareFrameCache(Ptr<OdometryFrame>& frame, int cacheType) const;
CV_IMPL_PROPERTY_S(cv::Mat, CameraMatrix, cameraMatrix) cv::Mat getCameraMatrix() const
CV_IMPL_PROPERTY(double, MinDepth, minDepth) {
CV_IMPL_PROPERTY(double, MaxDepth, maxDepth) return cameraMatrix;
CV_IMPL_PROPERTY(double, MaxDepthDiff, maxDepthDiff) }
CV_IMPL_PROPERTY(double, MaxPointsPart, maxPointsPart) void setCameraMatrix(const cv::Mat &val)
CV_IMPL_PROPERTY_S(cv::Mat, IterationCounts, iterCounts) {
CV_IMPL_PROPERTY_S(cv::Mat, MinGradientMagnitudes, minGradientMagnitudes) cameraMatrix = val;
CV_IMPL_PROPERTY(int, TransformType, transformType) }
CV_IMPL_PROPERTY(double, MaxTranslation, maxTranslation) double getMinDepth() const
CV_IMPL_PROPERTY(double, MaxRotation, maxRotation) {
CV_IMPL_PROPERTY_RO(Ptr<RgbdNormals>, NormalsComputer, normalsComputer) return minDepth;
}
void setMinDepth(double val)
{
minDepth = val;
}
double getMaxDepth() const
{
return maxDepth;
}
void setMaxDepth(double val)
{
maxDepth = val;
}
double getMaxDepthDiff() const
{
return maxDepthDiff;
}
void setMaxDepthDiff(double val)
{
maxDepthDiff = val;
}
double getMaxPointsPart() const
{
return maxPointsPart;
}
void setMaxPointsPart(double val)
{
maxPointsPart = val;
}
cv::Mat getIterationCounts() const
{
return iterCounts;
}
void setIterationCounts(const cv::Mat &val)
{
iterCounts = val;
}
cv::Mat getMinGradientMagnitudes() const
{
return minGradientMagnitudes;
}
void setMinGradientMagnitudes(const cv::Mat &val)
{
minGradientMagnitudes = val;
}
int getTransformType() const
{
return transformType;
}
void setTransformType(int val)
{
transformType = val;
}
double getMaxTranslation() const
{
return maxTranslation;
}
void setMaxTranslation(double val)
{
maxTranslation = val;
}
double getMaxRotation() const
{
return maxRotation;
}
void setMaxRotation(double val)
{
maxRotation = val;
}
Ptr<RgbdNormals> getNormalsComputer() const
{
return normalsComputer;
}
protected: protected:
virtual void virtual void
......
...@@ -76,8 +76,22 @@ public: ...@@ -76,8 +76,22 @@ public:
void read( const FileNode& fn ); void read( const FileNode& fn );
void write( FileStorage& fs ) const; void write( FileStorage& fs ) const;
CV_IMPL_PROPERTY(int, ImageWidth, resImWidth) int getImageWidth() const
CV_IMPL_PROPERTY(int, ImageHeight, resImHeight) {
return resImWidth;
}
inline void setImageWidth(int val)
{
resImWidth = val;
}
int getImageHeight() const
{
return resImHeight;
}
void setImageHeight(int val)
{
resImHeight = val;
}
protected: protected:
bool computeSaliencyImpl( const InputArray image, OutputArray saliencyMap ); bool computeSaliencyImpl( const InputArray image, OutputArray saliencyMap );
...@@ -114,8 +128,22 @@ public: ...@@ -114,8 +128,22 @@ public:
*/ */
bool init(); bool init();
CV_IMPL_PROPERTY(int, ImageWidth, imageWidth) int getImageWidth() const
CV_IMPL_PROPERTY(int, ImageHeight, imageHeight) {
return imageWidth;
}
inline void setImageWidth(int val)
{
imageWidth = val;
}
int getImageHeight() const
{
return imageHeight;
}
void setImageHeight(int val)
{
imageHeight = val;
}
protected: protected:
/** @brief Performs all the operations and calls all internal functions necessary for the accomplishment of the /** @brief Performs all the operations and calls all internal functions necessary for the accomplishment of the
...@@ -205,9 +233,30 @@ public: ...@@ -205,9 +233,30 @@ public:
*/ */
void setBBResDir( std::string resultsDir ); void setBBResDir( std::string resultsDir );
CV_IMPL_PROPERTY(double, Base, _base) double getBase() const
CV_IMPL_PROPERTY(int, NSS, _NSS) {
CV_IMPL_PROPERTY(int, W, _W) return _base;
}
inline void setBase(double val)
{
_base = val;
}
int getNSS() const
{
return _NSS;
}
void setNSS(int val)
{
_NSS = val;
}
int getW() const
{
return _W;
}
void setW(int val)
{
_W = val;
}
protected: protected:
/** @brief Performs all the operations and calls all internal functions necessary for the /** @brief Performs all the operations and calls all internal functions necessary for the
......
...@@ -217,12 +217,30 @@ public: ...@@ -217,12 +217,30 @@ public:
CV_WRAP static Ptr<AdaptiveManifoldFilter> create(); CV_WRAP static Ptr<AdaptiveManifoldFilter> create();
CV_PURE_PROPERTY(double, SigmaS) /** @see setSigmaS */
CV_PURE_PROPERTY(double, SigmaR) virtual double getSigmaS() const = 0;
CV_PURE_PROPERTY(int, TreeHeight) /** @copybrief getSigmaS @see getSigmaS */
CV_PURE_PROPERTY(int, PCAIterations) virtual void setSigmaS(double val) = 0;
CV_PURE_PROPERTY(bool, AdjustOutliers) /** @see setSigmaR */
CV_PURE_PROPERTY(bool, UseRNG) virtual double getSigmaR() const = 0;
/** @copybrief getSigmaR @see getSigmaR */
virtual void setSigmaR(double val) = 0;
/** @see setTreeHeight */
virtual int getTreeHeight() const = 0;
/** @copybrief getTreeHeight @see getTreeHeight */
virtual void setTreeHeight(int val) = 0;
/** @see setPCAIterations */
virtual int getPCAIterations() const = 0;
/** @copybrief getPCAIterations @see getPCAIterations */
virtual void setPCAIterations(int val) = 0;
/** @see setAdjustOutliers */
virtual bool getAdjustOutliers() const = 0;
/** @copybrief getAdjustOutliers @see getAdjustOutliers */
virtual void setAdjustOutliers(bool val) = 0;
/** @see setUseRNG */
virtual bool getUseRNG() const = 0;
/** @copybrief getUseRNG @see getUseRNG */
virtual void setUseRNG(bool val) = 0;
}; };
/** @brief Factory method, create instance of AdaptiveManifoldFilter and produce some initialization routines. /** @brief Factory method, create instance of AdaptiveManifoldFilter and produce some initialization routines.
......
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