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
a685be3e
Commit
a685be3e
authored
May 06, 2011
by
Ilya Lysenkov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added extra argument for BlobDetector in findCirclesGrid
parent
9f29506d
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
16 additions
and
13 deletions
+16
-13
calib3d.hpp
modules/calib3d/include/opencv2/calib3d/calib3d.hpp
+5
-3
calibinit.cpp
modules/calib3d/src/calibinit.cpp
+3
-10
opencv_extra_api.hpp
modules/python/src2/opencv_extra_api.hpp
+8
-0
No files found.
modules/calib3d/include/opencv2/calib3d/calib3d.hpp
View file @
a685be3e
...
...
@@ -44,6 +44,7 @@
#define __OPENCV_CALIB3D_HPP__
#include "opencv2/core/core.hpp"
#include "opencv2/features2d/features2d.hpp"
#ifdef __cplusplus
extern
"C"
{
...
...
@@ -527,11 +528,12 @@ CV_EXPORTS_W void drawChessboardCorners( InputOutputArray image, Size patternSiz
const
InputArray
&
corners
,
bool
patternWasFound
);
enum
{
CALIB_CB_SYMMETRIC_GRID
=
1
,
CALIB_CB_ASYMMETRIC_GRID
=
2
,
CALIB_CB_CLUSTERING
=
4
,
CALIB_CB_WHITE_CIRCLES
=
8
};
CALIB_CB_CLUSTERING
=
4
};
//! finds circles' grid pattern of the specified size in the image
CV_EXPORTS_W
bool
findCirclesGrid
(
const
InputArray
&
image
,
Size
patternSize
,
OutputArray
centers
,
int
flags
=
CALIB_CB_SYMMETRIC_GRID
);
CV_EXPORTS
bool
findCirclesGrid
(
const
InputArray
&
image
,
Size
patternSize
,
OutputArray
centers
,
int
flags
=
CALIB_CB_SYMMETRIC_GRID
,
const
Ptr
<
FeatureDetector
>
&
blobDetector
=
new
SimpleBlobDetector
());
enum
{
...
...
modules/calib3d/src/calibinit.cpp
View file @
a685be3e
...
...
@@ -1927,7 +1927,7 @@ void cv::drawChessboardCorners( InputOutputArray _image, Size patternSize,
}
bool
cv
::
findCirclesGrid
(
const
InputArray
&
_image
,
Size
patternSize
,
OutputArray
_centers
,
int
flags
)
OutputArray
_centers
,
int
flags
,
const
Ptr
<
FeatureDetector
>
&
blobDetector
)
{
bool
isAsymmetricGrid
=
(
flags
&
CALIB_CB_ASYMMETRIC_GRID
);
bool
isSymmetricGrid
=
(
flags
&
CALIB_CB_SYMMETRIC_GRID
);
...
...
@@ -1935,16 +1935,9 @@ bool cv::findCirclesGrid( const InputArray& _image, Size patternSize,
Mat
image
=
_image
.
getMat
();
vector
<
Point2f
>
centers
;
SimpleBlobDetector
::
Params
params
;
if
(
flags
&
CALIB_CB_WHITE_CIRCLES
)
{
params
.
filterByColor
=
true
;
params
.
blobColor
=
255
;
}
Ptr
<
SimpleBlobDetector
>
detector
=
new
SimpleBlobDetector
(
params
);
//Ptr<FeatureDetector> detector = new MserFeatureDetector();
vector
<
KeyPoint
>
keypoints
;
d
etector
->
detect
(
image
,
keypoints
);
blobD
etector
->
detect
(
image
,
keypoints
);
vector
<
Point2f
>
points
;
for
(
size_t
i
=
0
;
i
<
keypoints
.
size
();
i
++
)
{
...
...
modules/python/src2/opencv_extra_api.hpp
View file @
a685be3e
...
...
@@ -406,6 +406,14 @@ CV_WRAP static inline void convertPointsHomogeneous( const Mat& src, CV_OUT Mat&
cvConvertPointsHomogeneous
(
&
_src
,
&
_dst
);
}
//! finds circles' grid pattern of the specified size in the image
CV_WRAP
static
inline
void
findCirclesGridDefault
(
const
InputArray
&
image
,
Size
patternSize
,
OutputArray
centers
,
int
flags
=
CALIB_CB_SYMMETRIC_GRID
)
{
findCirclesGrid
(
image
,
patternSize
,
centers
,
flags
);
}
/*
//! initializes camera matrix from a few 3D points and the corresponding projections.
CV_WRAP static inline Mat initCameraMatrix2D( const vector<Mat>& objectPoints,
...
...
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