Replaced CV_PURE_PROPERTY macros with the code

pull/189/head
Maksim Shabunin 10 years ago
parent 63a86ac44e
commit 05405e3dca
  1. 49
      modules/face/include/opencv2/face/facerec.hpp
  2. 30
      modules/rgbd/include/opencv2/rgbd.hpp
  3. 44
      modules/ximgproc/include/opencv2/ximgproc/edge_filter.hpp

@ -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
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;
}; };
/** /**

@ -47,7 +47,7 @@
namespace cv namespace cv
{ {
namespace rgbd namespace rgbd
{ {
//! @addtogroup rgbd //! @addtogroup rgbd
//! @{ //! @{
@ -431,7 +431,7 @@ namespace rgbd
/** Method to compute a transformation from the source frame to the destination one. /** Method to compute a transformation from the source frame to the destination one.
* Some odometry algorithms do not used some data of frames (eg. ICP does not use images). * Some odometry algorithms do not used some data of frames (eg. ICP does not use images).
* In such case corresponding arguments can be set as empty Mat. * In such case corresponding arguments can be set as empty Mat.
* The method returns true if all internal computions were possible (e.g. there were enough correspondences, * The method returns true if all internal computions were possible (e.g. there were enough correspondences,
* system of equations has a solution, etc) and resulting transformation satisfies some test if it's provided * system of equations has a solution, etc) and resulting transformation satisfies some test if it's provided
* by the Odometry inheritor implementation (e.g. thresholds for maximum translation and rotation). * by the Odometry inheritor implementation (e.g. thresholds for maximum translation and rotation).
* @param srcImage Image data of the source frame (CV_8UC1) * @param srcImage Image data of the source frame (CV_8UC1)
@ -466,16 +466,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
@ -486,7 +484,7 @@ namespace rgbd
const Mat& initRt) const = 0; const Mat& initRt) const = 0;
}; };
/** Odometry based on the paper "Real-Time Visual Odometry from Dense RGB-D Images", /** Odometry based on the paper "Real-Time Visual Odometry from Dense RGB-D Images",
* F. Steinbucker, J. Strum, D. Cremers, ICCV, 2011. * F. Steinbucker, J. Strum, D. Cremers, ICCV, 2011.
*/ */
class CV_EXPORTS RgbdOdometry: public Odometry class CV_EXPORTS RgbdOdometry: public Odometry
@ -546,7 +544,7 @@ namespace rgbd
double maxTranslation, maxRotation; double maxTranslation, maxRotation;
}; };
/** Odometry based on the paper "KinectFusion: Real-Time Dense Surface Mapping and Tracking", /** Odometry based on the paper "KinectFusion: Real-Time Dense Surface Mapping and Tracking",
* Richard A. Newcombe, Andrew Fitzgibbon, at al, SIGGRAPH, 2011. * Richard A. Newcombe, Andrew Fitzgibbon, at al, SIGGRAPH, 2011.
*/ */
class ICPOdometry: public Odometry class ICPOdometry: public Odometry
@ -669,8 +667,8 @@ namespace rgbd
mutable Ptr<RgbdNormals> normalsComputer; mutable Ptr<RgbdNormals> normalsComputer;
}; };
/** Warp the image: compute 3d points from the depth, transform them using given transformation, /** Warp the image: compute 3d points from the depth, transform them using given transformation,
* then project color point cloud to an image plane. * then project color point cloud to an image plane.
* This function can be used to visualize results of the Odometry algorithm. * This function can be used to visualize results of the Odometry algorithm.
* @param image The image (of CV_8UC1 or CV_8UC3 type) * @param image The image (of CV_8UC1 or CV_8UC3 type)
* @param depth The depth (of type used in depthTo3d fuction) * @param depth The depth (of type used in depthTo3d fuction)

@ -2,26 +2,26 @@
* By downloading, copying, installing or using the software you agree to this license. * By downloading, copying, installing or using the software you agree to this license.
* If you do not agree to this license, do not download, install, * If you do not agree to this license, do not download, install,
* copy or use the software. * copy or use the software.
* *
* *
* License Agreement * License Agreement
* For Open Source Computer Vision Library * For Open Source Computer Vision Library
* (3 - clause BSD License) * (3 - clause BSD License)
* *
* Redistribution and use in source and binary forms, with or without modification, * Redistribution and use in source and binary forms, with or without modification,
* are permitted provided that the following conditions are met : * are permitted provided that the following conditions are met :
* *
* *Redistributions of source code must retain the above copyright notice, * *Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer. * this list of conditions and the following disclaimer.
* *
* * Redistributions in binary form must reproduce the above copyright notice, * * Redistributions in binary form must reproduce the above copyright notice,
* this list of conditions and the following disclaimer in the documentation * this list of conditions and the following disclaimer in the documentation
* and / or other materials provided with the distribution. * and / or other materials provided with the distribution.
* *
* * Neither the names of the copyright holders nor the names of the contributors * * Neither the names of the copyright holders nor the names of the contributors
* may be used to endorse or promote products derived from this software * may be used to endorse or promote products derived from this software
* without specific prior written permission. * without specific prior written permission.
* *
* This software is provided by the copyright holders and contributors "as is" and * This software is provided by the copyright holders and contributors "as is" and
* any express or implied warranties, including, but not limited to, the implied * any express or implied warranties, including, but not limited to, the implied
* warranties of merchantability and fitness for a particular purpose are disclaimed. * warranties of merchantability and fitness for a particular purpose are disclaimed.
@ -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.

Loading…
Cancel
Save