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
2c2d7d7b
Commit
2c2d7d7b
authored
Jul 13, 2011
by
Ilya Lysenkov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed findCirclesGrid for the case of working with 'square' asymmetric patterns.
parent
d60349b1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
13 additions
and
3 deletions
+13
-3
calibinit.cpp
modules/calib3d/src/calibinit.cpp
+2
-2
circlesgrid.cpp
modules/calib3d/src/circlesgrid.cpp
+11
-1
No files found.
modules/calib3d/src/calibinit.cpp
View file @
2c2d7d7b
...
...
@@ -1939,8 +1939,8 @@ void cv::drawChessboardCorners( InputOutputArray _image, Size patternSize,
bool
cv
::
findCirclesGrid
(
InputArray
_image
,
Size
patternSize
,
OutputArray
_centers
,
int
flags
,
const
Ptr
<
FeatureDetector
>
&
blobDetector
)
{
bool
isAsymmetricGrid
=
(
flags
&
CALIB_CB_ASYMMETRIC_GRID
)
?
true
:
false
;
bool
isSymmetricGrid
=
(
flags
&
CALIB_CB_SYMMETRIC_GRID
)
?
true
:
false
;
bool
isAsymmetricGrid
=
(
flags
&
CALIB_CB_ASYMMETRIC_GRID
)
?
true
:
false
;
bool
isSymmetricGrid
=
(
flags
&
CALIB_CB_SYMMETRIC_GRID
)
?
true
:
false
;
CV_Assert
(
isAsymmetricGrid
^
isSymmetricGrid
);
Mat
image
=
_image
.
getMat
();
...
...
modules/calib3d/src/circlesgrid.cpp
View file @
2c2d7d7b
...
...
@@ -748,7 +748,13 @@ Mat CirclesGridFinder::rectifyGrid(Size detectedGridSize, const vector<Point2f>&
const
Point2f
offset
(
150
,
150
);
vector
<
Point2f
>
dstPoints
;
for
(
int
i
=
0
;
i
<
detectedGridSize
.
height
;
i
++
)
bool
isClockwiseBefore
=
getDirection
(
centers
[
0
],
centers
[
detectedGridSize
.
width
-
1
],
centers
[
centers
.
size
()
-
1
])
<
0
;
int
iStart
=
isClockwiseBefore
?
0
:
detectedGridSize
.
height
-
1
;
int
iEnd
=
isClockwiseBefore
?
detectedGridSize
.
height
:
-
1
;
int
iStep
=
isClockwiseBefore
?
1
:
-
1
;
for
(
int
i
=
iStart
;
i
!=
iEnd
;
i
+=
iStep
)
{
for
(
int
j
=
0
;
j
<
detectedGridSize
.
width
;
j
++
)
{
...
...
@@ -1453,6 +1459,10 @@ void CirclesGridFinder::getCornerSegments(const vector<vector<size_t> > &points,
cout
<<
"Corners are counterclockwise"
<<
endl
;
#endif
std
::
reverse
(
segments
.
begin
(),
segments
.
end
());
std
::
reverse
(
cornerIndices
.
begin
(),
cornerIndices
.
end
());
std
::
reverse
(
firstSteps
.
begin
(),
firstSteps
.
end
());
std
::
reverse
(
secondSteps
.
begin
(),
secondSteps
.
end
());
std
::
swap
(
firstSteps
,
secondSteps
);
}
}
...
...
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