Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
O
opencv
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Packages
Packages
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
submodule
opencv
Commits
acf356b0
Commit
acf356b0
authored
Jul 04, 2012
by
Vadim Pisarevsky
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
added contrib module support in Python wrappers (thanks to Eric Christiansen)
parent
bc830117
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
23 additions
and
16 deletions
+23
-16
contrib.hpp
modules/contrib/include/opencv2/contrib/contrib.hpp
+13
-14
CMakeLists.txt
modules/python/CMakeLists.txt
+5
-2
cv2.cpp
modules/python/src2/cv2.cpp
+4
-0
hdr_parser.py
modules/python/src2/hdr_parser.py
+1
-0
No files found.
modules/contrib/include/opencv2/contrib/contrib.hpp
View file @
acf356b0
...
...
@@ -557,15 +557,15 @@ namespace cv
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
...
...
@@ -918,26 +918,26 @@ namespace cv
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
;
...
...
@@ -947,9 +947,9 @@ namespace cv
};
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
...
...
@@ -968,12 +968,11 @@ namespace cv
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
...
...
modules/python/CMakeLists.txt
View file @
acf356b0
...
...
@@ -10,7 +10,7 @@ if(ANDROID OR IOS OR NOT PYTHONLIBS_FOUND OR NOT PYTHON_USE_NUMPY)
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
)
...
...
@@ -20,6 +20,8 @@ ocv_module_include_directories(
"
${
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"
...
...
@@ -31,7 +33,8 @@ set(opencv_hdrs
"
${
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"
...
...
modules/python/src2/cv2.cpp
View file @
acf356b0
...
...
@@ -9,6 +9,7 @@
#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"
...
...
@@ -116,6 +117,9 @@ typedef cvflann::flann_algorithm_t cvflann_flann_algorithm_t;
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
];
...
...
modules/python/src2/hdr_parser.py
View file @
acf356b0
...
...
@@ -11,6 +11,7 @@ opencv_hdr_list = [
"../../video/include/opencv2/video/tracking.hpp"
,
"../../video/include/opencv2/video/background_segm.hpp"
,
"../../objdetect/include/opencv2/objdetect/objdetect.hpp"
,
"../../contrib/include/opencv2/contrib/contrib.hpp"
,
"../../highgui/include/opencv2/highgui/highgui.hpp"
]
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment