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
ddfd1854
Commit
ddfd1854
authored
Jan 16, 2014
by
Roman Donchenko
Committed by
OpenCV Buildbot
Jan 16, 2014
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #2151 from KonstantinMatskevich:testdata_path_calib3d
parents
b0af6a2b
b83eff7e
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
22 additions
and
22 deletions
+22
-22
test_cameracalibration.cpp
modules/calib3d/test/test_cameracalibration.cpp
+11
-11
test_chesscorners.cpp
modules/calib3d/test/test_chesscorners.cpp
+3
-3
test_chesscorners_timing.cpp
modules/calib3d/test/test_chesscorners_timing.cpp
+6
-6
test_main.cpp
modules/calib3d/test/test_main.cpp
+1
-1
test_stereomatching.cpp
modules/calib3d/test/test_stereomatching.cpp
+1
-1
No files found.
modules/calib3d/test/test_cameracalibration.cpp
View file @
ddfd1854
...
...
@@ -290,8 +290,8 @@ int CV_CameraCalibrationTest::compare(double* val, double* ref_val, int len,
void
CV_CameraCalibrationTest
::
run
(
int
start_from
)
{
int
code
=
cvtest
::
TS
::
OK
;
c
har
filepath
[
200
]
;
c
har
filename
[
200
]
;
c
v
::
String
filepath
;
c
v
::
String
filename
;
CvSize
imageSize
;
CvSize
etalonSize
;
...
...
@@ -337,9 +337,9 @@ void CV_CameraCalibrationTest::run( int start_from )
int
progress
=
0
;
int
values_read
=
-
1
;
sprintf
(
filepath
,
"%s
cameracalibration/"
,
ts
->
get_data_path
().
c_str
()
);
sprintf
(
filename
,
"%sdatafiles.txt"
,
filepath
);
datafile
=
fopen
(
filename
,
"r"
);
filepath
=
cv
::
format
(
"%scv/
cameracalibration/"
,
ts
->
get_data_path
().
c_str
()
);
filename
=
cv
::
format
(
"%sdatafiles.txt"
,
filepath
.
c_str
()
);
datafile
=
fopen
(
filename
.
c_str
()
,
"r"
);
if
(
datafile
==
0
)
{
ts
->
printf
(
cvtest
::
TS
::
LOG
,
"Could not open file with list of test files: %s
\n
"
,
filename
);
...
...
@@ -354,8 +354,8 @@ void CV_CameraCalibrationTest::run( int start_from )
{
values_read
=
fscanf
(
datafile
,
"%s"
,
i_dat_file
);
CV_Assert
(
values_read
==
1
);
sprintf
(
filename
,
"%s%s"
,
filepath
,
i_dat_file
);
file
=
fopen
(
filename
,
"r"
);
filename
=
cv
::
format
(
"%s%s"
,
filepath
.
c_str
()
,
i_dat_file
);
file
=
fopen
(
filename
.
c_str
()
,
"r"
);
ts
->
update_context
(
this
,
currTest
,
true
);
...
...
@@ -1382,10 +1382,10 @@ void CV_StereoCalibrationTest::run( int )
for
(
int
testcase
=
1
;
testcase
<=
ntests
;
testcase
++
)
{
c
har
filepath
[
1000
]
;
c
v
::
String
filepath
;
char
buf
[
1000
];
sprintf
(
filepath
,
"%s
stereo/case%d/stereo_calib.txt"
,
ts
->
get_data_path
().
c_str
(),
testcase
);
f
=
fopen
(
filepath
,
"rt"
);
filepath
=
cv
::
format
(
"%scv/
stereo/case%d/stereo_calib.txt"
,
ts
->
get_data_path
().
c_str
(),
testcase
);
f
=
fopen
(
filepath
.
c_str
()
,
"rt"
);
Size
patternSize
;
vector
<
string
>
imglist
;
...
...
@@ -1405,7 +1405,7 @@ void CV_StereoCalibrationTest::run( int )
buf
[
--
len
]
=
'\0'
;
if
(
buf
[
0
]
==
'#'
)
continue
;
sprintf
(
filepath
,
"%s
stereo/case%d/%s"
,
ts
->
get_data_path
().
c_str
(),
testcase
,
buf
);
filepath
=
cv
::
format
(
"%scv/
stereo/case%d/%s"
,
ts
->
get_data_path
().
c_str
(),
testcase
,
buf
);
imglist
.
push_back
(
string
(
filepath
));
}
fclose
(
f
);
...
...
modules/calib3d/test/test_chesscorners.cpp
View file @
ddfd1854
...
...
@@ -185,13 +185,13 @@ void CV_ChessboardDetectorTest::run_batch( const string& filename )
switch
(
pattern
)
{
case
CHESSBOARD
:
folder
=
string
(
ts
->
get_data_path
())
+
"cameracalibration/"
;
folder
=
string
(
ts
->
get_data_path
())
+
"c
v/c
ameracalibration/"
;
break
;
case
CIRCLES_GRID
:
folder
=
string
(
ts
->
get_data_path
())
+
"cameracalibration/circles/"
;
folder
=
string
(
ts
->
get_data_path
())
+
"c
v/c
ameracalibration/circles/"
;
break
;
case
ASYMMETRIC_CIRCLES_GRID
:
folder
=
string
(
ts
->
get_data_path
())
+
"cameracalibration/asymmetric_circles/"
;
folder
=
string
(
ts
->
get_data_path
())
+
"c
v/c
ameracalibration/asymmetric_circles/"
;
break
;
}
...
...
modules/calib3d/test/test_chesscorners_timing.cpp
View file @
ddfd1854
...
...
@@ -62,8 +62,8 @@ void CV_ChessboardDetectorTimingTest::run( int start_from )
int
code
=
cvtest
::
TS
::
OK
;
/* test parameters */
char
filepath
[
1000
]
;
char
filename
[
1000
]
;
std
::
string
filepath
;
std
::
string
filename
;
CvMat
*
_v
=
0
;
CvPoint2D32f
*
v
;
...
...
@@ -75,9 +75,9 @@ void CV_ChessboardDetectorTimingTest::run( int start_from )
int
idx
,
max_idx
;
int
progress
=
0
;
sprintf
(
filepath
,
"%s
cameracalibration/"
,
ts
->
get_data_path
().
c_str
()
);
sprintf
(
filename
,
"%schessboard_timing_list.dat"
,
filepath
);
CvFileStorage
*
fs
=
cvOpenFileStorage
(
filename
,
0
,
CV_STORAGE_READ
);
filepath
=
cv
::
format
(
"%scv/
cameracalibration/"
,
ts
->
get_data_path
().
c_str
()
);
filename
=
cv
::
format
(
"%schessboard_timing_list.dat"
,
filepath
.
c_str
()
);
CvFileStorage
*
fs
=
cvOpenFileStorage
(
filename
.
c_str
()
,
0
,
CV_STORAGE_READ
);
CvFileNode
*
board_list
=
fs
?
cvGetFileNodeByName
(
fs
,
0
,
"boards"
)
:
0
;
if
(
!
fs
||
!
board_list
||
!
CV_NODE_IS_SEQ
(
board_list
->
tag
)
||
...
...
@@ -105,7 +105,7 @@ void CV_ChessboardDetectorTimingTest::run( int start_from )
ts
->
update_context
(
this
,
idx
-
1
,
true
);
/* read the image */
sprintf
(
filename
,
"%s%s"
,
filepath
,
imgname
);
filename
=
cv
::
format
(
"%s%s"
,
filepath
.
c_str
()
,
imgname
);
cv
::
Mat
img2
=
cv
::
imread
(
filename
);
img
=
img2
;
...
...
modules/calib3d/test/test_main.cpp
View file @
ddfd1854
#include "test_precomp.hpp"
CV_TEST_MAIN
(
"
cv
"
)
CV_TEST_MAIN
(
""
)
modules/calib3d/test/test_stereomatching.cpp
View file @
ddfd1854
...
...
@@ -398,7 +398,7 @@ protected:
void
CV_StereoMatchingTest
::
run
(
int
)
{
string
dataPath
=
ts
->
get_data_path
();
string
dataPath
=
ts
->
get_data_path
()
+
"cv/"
;
string
algorithmName
=
name
;
assert
(
!
algorithmName
.
empty
()
);
if
(
dataPath
.
empty
()
)
...
...
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