void* user_data;
};
- CV_EXPORTS int chamerMatching( Mat& img, Mat& templ,
- vector<vector<Point> >& results, vector<float>& cost,
+ CV_EXPORTS_W int chamerMatching( Mat& img, Mat& templ,
+ CV_OUT vector<vector<Point> >& results, CV_OUT vector<float>& cost,
double templScale=1, int maxMatches = 20,
double minMatchDistance = 1.0, int padX = 3,
int padY = 3, int scales = 5, double minScale = 0.6, double maxScale = 1.6,
double orientationWeight = 0.5, double truncate = 20);
- class CV_EXPORTS StereoVar
+ class CV_EXPORTS_W StereoVar
{
public:
// Flags
void lda(InputArray src, InputArray labels);
};
- class CV_EXPORTS FaceRecognizer : public Algorithm
+ class CV_EXPORTS_W FaceRecognizer : public Algorithm
{
public:
//! virtual destructor
virtual ~FaceRecognizer() {}
// Trains a FaceRecognizer.
- virtual void train(InputArray src, InputArray labels) = 0;
+ CV_WRAP virtual void train(InputArray src, InputArray labels) = 0;
// Gets a prediction from a FaceRecognizer.
virtual int predict(InputArray src) const = 0;
// Predicts the label and confidence for a given sample.
- virtual void predict(InputArray src, int &label, double &dist) const = 0;
+ CV_WRAP virtual void predict(InputArray src, CV_OUT int &label, CV_OUT double &dist) const = 0;
// Serializes this object to a given filename.
- virtual void save(const string& filename) const;
+ CV_WRAP virtual void save(const string& filename) const;
// Deserializes this object from a given filename.
- virtual void load(const string& filename);
+ CV_WRAP virtual void load(const string& filename);
// Serializes this object to a given cv::FileStorage.
virtual void save(FileStorage& fs) const = 0;
};
- CV_EXPORTS Ptr<FaceRecognizer> createEigenFaceRecognizer(int num_components = 0, double threshold = DBL_MAX);
- CV_EXPORTS Ptr<FaceRecognizer> createFisherFaceRecognizer(int num_components = 0, double threshold = DBL_MAX);
- CV_EXPORTS Ptr<FaceRecognizer> createLBPHFaceRecognizer(int radius=1, int neighbors=8,
+ CV_EXPORTS_W Ptr<FaceRecognizer> createEigenFaceRecognizer(int num_components = 0, double threshold = DBL_MAX);
+ CV_EXPORTS_W Ptr<FaceRecognizer> createFisherFaceRecognizer(int num_components = 0, double threshold = DBL_MAX);
+ CV_EXPORTS_W Ptr<FaceRecognizer> createLBPHFaceRecognizer(int radius=1, int neighbors=8,
int grid_x=8, int grid_y=8, double threshold = DBL_MAX);
enum
COLORMAP_HOT = 11
};
- CV_EXPORTS void applyColorMap(InputArray src, OutputArray dst, int colormap);
+ CV_EXPORTS_W void applyColorMap(InputArray src, OutputArray dst, int colormap);
- CV_EXPORTS bool initModule_contrib();
+ CV_EXPORTS_W bool initModule_contrib();
}
-
#include "opencv2/contrib/retina.hpp"
#endif
endif()
set(the_description "The python bindings")
-ocv_add_module(python BINDINGS opencv_core opencv_flann opencv_imgproc opencv_video opencv_ml opencv_features2d opencv_highgui opencv_calib3d opencv_photo opencv_objdetect opencv_legacy OPTIONAL opencv_nonfree)
+ocv_add_module(python BINDINGS opencv_core opencv_flann opencv_imgproc opencv_video opencv_ml opencv_features2d opencv_highgui opencv_calib3d opencv_photo opencv_objdetect opencv_contrib opencv_legacy OPTIONAL opencv_nonfree)
add_definitions(-DPYTHON_USE_NUMPY=1)
"${CMAKE_CURRENT_SOURCE_DIR}/src2"
)
+
+
set(opencv_hdrs
"${OPENCV_MODULE_opencv_core_LOCATION}/include/opencv2/core/core.hpp"
"${OPENCV_MODULE_opencv_flann_LOCATION}/include/opencv2/flann/miniflann.hpp"
"${OPENCV_MODULE_opencv_ml_LOCATION}/include/opencv2/ml/ml.hpp"
"${OPENCV_MODULE_opencv_features2d_LOCATION}/include/opencv2/features2d/features2d.hpp"
"${OPENCV_MODULE_opencv_calib3d_LOCATION}/include/opencv2/calib3d/calib3d.hpp"
- "${OPENCV_MODULE_opencv_objdetect_LOCATION}/include/opencv2/objdetect/objdetect.hpp")
+ "${OPENCV_MODULE_opencv_objdetect_LOCATION}/include/opencv2/objdetect/objdetect.hpp"
+ "${OPENCV_MODULE_opencv_contrib_LOCATION}/include/opencv2/contrib/contrib.hpp")
if(HAVE_opencv_nonfree)
list(APPEND opencv_hdrs "${OPENCV_MODULE_opencv_nonfree_LOCATION}/include/opencv2/nonfree/features2d.hpp"
#include "numpy/ndarrayobject.h"
#include "opencv2/core/core.hpp"
+#include "opencv2/contrib/contrib.hpp"
#include "opencv2/flann/miniflann.hpp"
#include "opencv2/imgproc/imgproc.hpp"
#include "opencv2/calib3d/calib3d.hpp"
typedef Ptr<flann::IndexParams> Ptr_flann_IndexParams;
typedef Ptr<flann::SearchParams> Ptr_flann_SearchParams;
+typedef Ptr<FaceRecognizer> Ptr_FaceRecognizer;
+typedef vector<Scalar> vector_Scalar;
+
static PyObject* failmsgp(const char *fmt, ...)
{
char str[1000];