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
d105264b
Commit
d105264b
authored
Sep 20, 2011
by
Ilya Lysenkov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added tests of findCirclesGrid() with the asymmetric pattern.
parent
d263fe2b
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
16 additions
and
3 deletions
+16
-3
test_chesscorners.cpp
modules/calib3d/test/test_chesscorners.cpp
+16
-3
No files found.
modules/calib3d/test/test_chesscorners.cpp
View file @
d105264b
...
...
@@ -74,23 +74,25 @@ void show_points( const Mat& gray, const Mat& u, const vector<Point2f>& v, Size
}
enum
Pattern
{
CHESSBOARD
,
CIRCLES_GRID
};
enum
Pattern
{
CHESSBOARD
,
CIRCLES_GRID
,
ASYMMETRIC_CIRCLES_GRID
};
class
CV_ChessboardDetectorTest
:
public
cvtest
::
BaseTest
{
public
:
CV_ChessboardDetectorTest
(
Pattern
pattern
);
CV_ChessboardDetectorTest
(
Pattern
pattern
,
int
algorithmFlags
=
0
);
protected
:
void
run
(
int
);
void
run_batch
(
const
string
&
filename
);
bool
checkByGenerator
();
Pattern
pattern
;
int
algorithmFlags
;
};
CV_ChessboardDetectorTest
::
CV_ChessboardDetectorTest
(
Pattern
_pattern
)
CV_ChessboardDetectorTest
::
CV_ChessboardDetectorTest
(
Pattern
_pattern
,
int
_algorithmFlags
)
{
pattern
=
_pattern
;
algorithmFlags
=
_algorithmFlags
;
}
double
calcError
(
const
vector
<
Point2f
>&
v
,
const
Mat
&
u
)
...
...
@@ -147,6 +149,9 @@ void CV_ChessboardDetectorTest::run( int /*start_from */)
case
CIRCLES_GRID
:
run_batch
(
"circles_list.dat"
);
break
;
case
ASYMMETRIC_CIRCLES_GRID
:
run_batch
(
"acircles_list.dat"
);
break
;
}
}
...
...
@@ -169,6 +174,9 @@ void CV_ChessboardDetectorTest::run_batch( const string& filename )
case
CIRCLES_GRID
:
folder
=
string
(
ts
.
get_data_path
())
+
"cameracalibration/circles/"
;
break
;
case
ASYMMETRIC_CIRCLES_GRID
:
folder
=
string
(
ts
.
get_data_path
())
+
"cameracalibration/asymmetric_circles/"
;
break
;
}
FileStorage
fs
(
folder
+
filename
,
FileStorage
::
READ
);
...
...
@@ -229,6 +237,9 @@ void CV_ChessboardDetectorTest::run_batch( const string& filename )
case
CIRCLES_GRID
:
result
=
findCirclesGrid
(
gray
,
pattern_size
,
v
);
break
;
case
ASYMMETRIC_CIRCLES_GRID
:
result
=
findCirclesGrid
(
gray
,
pattern_size
,
v
,
CALIB_CB_ASYMMETRIC_GRID
|
algorithmFlags
);
break
;
}
show_points
(
gray
,
Mat
(),
v
,
pattern_size
,
result
);
if
(
!
result
||
v
.
size
()
!=
count_exp
)
...
...
@@ -439,5 +450,7 @@ bool CV_ChessboardDetectorTest::checkByGenerator()
TEST
(
Calib3d_ChessboardDetector
,
accuracy
)
{
CV_ChessboardDetectorTest
test
(
CHESSBOARD
);
test
.
safe_run
();
}
TEST
(
Calib3d_CirclesPatternDetector
,
accuracy
)
{
CV_ChessboardDetectorTest
test
(
CIRCLES_GRID
);
test
.
safe_run
();
}
TEST
(
Calib3d_AsymmetricCirclesPatternDetector
,
accuracy
)
{
CV_ChessboardDetectorTest
test
(
ASYMMETRIC_CIRCLES_GRID
);
test
.
safe_run
();
}
TEST
(
Calib3d_AsymmetricCirclesPatternDetectorWithClustering
,
accuracy
)
{
CV_ChessboardDetectorTest
test
(
ASYMMETRIC_CIRCLES_GRID
,
CALIB_CB_CLUSTERING
);
test
.
safe_run
();
}
/* End of file. */
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