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
df6a95ed
Commit
df6a95ed
authored
Mar 12, 2012
by
Ilya Lysenkov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Wraped SimpleBlobDetector for Python
parent
3df41c1d
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
34 additions
and
19 deletions
+34
-19
features2d.hpp
modules/features2d/include/opencv2/features2d/features2d.hpp
+19
-19
cv2.cpp
modules/python/src2/cv2.cpp
+15
-0
No files found.
modules/features2d/include/opencv2/features2d/features2d.hpp
View file @
df6a95ed
...
...
@@ -1552,38 +1552,38 @@ private:
mutable
ORB
orb_
;
};
class
CV_EXPORTS
SimpleBlobDetector
:
public
cv
::
FeatureDetector
class
CV_EXPORTS
_W
SimpleBlobDetector
:
public
FeatureDetector
{
public
:
struct
CV_EXPORTS
Params
struct
CV_EXPORTS
_W_SIMPLE
Params
{
Params
();
float
thresholdStep
;
float
minThreshold
;
float
maxThreshold
;
size_t
minRepeatability
;
float
minDistBetweenBlobs
;
CV_WRAP
Params
();
CV_PROP_RW
float
thresholdStep
;
CV_PROP_RW
float
minThreshold
;
CV_PROP_RW
float
maxThreshold
;
CV_PROP_RW
size_t
minRepeatability
;
CV_PROP_RW
float
minDistBetweenBlobs
;
bool
filterByColor
;
uchar
blobColor
;
CV_PROP_RW
bool
filterByColor
;
CV_PROP_RW
uchar
blobColor
;
bool
filterByArea
;
float
minArea
,
maxArea
;
CV_PROP_RW
bool
filterByArea
;
CV_PROP_RW
float
minArea
,
maxArea
;
bool
filterByCircularity
;
float
minCircularity
,
maxCircularity
;
CV_PROP_RW
bool
filterByCircularity
;
CV_PROP_RW
float
minCircularity
,
maxCircularity
;
bool
filterByInertia
;
float
minInertiaRatio
,
maxInertiaRatio
;
CV_PROP_RW
bool
filterByInertia
;
CV_PROP_RW
float
minInertiaRatio
,
maxInertiaRatio
;
bool
filterByConvexity
;
float
minConvexity
,
maxConvexity
;
CV_PROP_RW
bool
filterByConvexity
;
CV_PROP_RW
float
minConvexity
,
maxConvexity
;
void
read
(
const
FileNode
&
fn
);
void
write
(
FileStorage
&
fs
)
const
;
};
SimpleBlobDetector
(
const
SimpleBlobDetector
::
Params
&
parameters
=
SimpleBlobDetector
::
Params
());
CV_WRAP
SimpleBlobDetector
(
const
SimpleBlobDetector
::
Params
&
parameters
=
SimpleBlobDetector
::
Params
());
virtual
void
read
(
const
FileNode
&
fn
);
virtual
void
write
(
FileStorage
&
fs
)
const
;
...
...
modules/python/src2/cv2.cpp
View file @
df6a95ed
...
...
@@ -87,6 +87,8 @@ typedef Ptr<FeatureDetector> Ptr_FeatureDetector;
typedef
Ptr
<
DescriptorExtractor
>
Ptr_DescriptorExtractor
;
typedef
Ptr
<
DescriptorMatcher
>
Ptr_DescriptorMatcher
;
typedef
SimpleBlobDetector
::
Params
SimpleBlobDetector_Params
;
typedef
cvflann
::
flann_distance_t
cvflann_flann_distance_t
;
typedef
cvflann
::
flann_algorithm_t
cvflann_flann_algorithm_t
;
typedef
Ptr
<
flann
::
IndexParams
>
Ptr_flann_IndexParams
;
...
...
@@ -357,6 +359,19 @@ static bool pyopencv_to(PyObject* obj, int& value, const char* name = "<unknown>
return
value
!=
-
1
||
!
PyErr_Occurred
();
}
static
PyObject
*
pyopencv_from
(
uchar
value
)
{
return
PyInt_FromLong
(
value
);
}
static
bool
pyopencv_to
(
PyObject
*
obj
,
uchar
&
value
,
const
char
*
name
=
"<unknown>"
)
{
if
(
!
obj
||
obj
==
Py_None
)
return
true
;
value
=
(
int
)
PyInt_AsLong
(
obj
);
return
value
!=
-
1
||
!
PyErr_Occurred
();
}
static
PyObject
*
pyopencv_from
(
double
value
)
{
return
PyFloat_FromDouble
(
value
);
...
...
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