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
9b09f09b
Commit
9b09f09b
authored
Dec 14, 2012
by
Vadim Pisarevsky
Committed by
OpenCV Buildbot
Dec 14, 2012
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #222 from taka-no-me:perf_verify_sanity
parents
64cf113d
5a407153
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
29 additions
and
29 deletions
+29
-29
system.cpp
modules/core/src/system.cpp
+17
-20
perf_filter2d.cpp
modules/imgproc/perf/perf_filter2d.cpp
+1
-1
perf_surf.cpp
modules/nonfree/perf/perf_surf.cpp
+2
-2
perf_stich.cpp
modules/stitching/perf/perf_stich.cpp
+1
-5
run.py
modules/ts/misc/run.py
+0
-0
ts_perf.cpp
modules/ts/src/ts_perf.cpp
+8
-1
No files found.
modules/core/src/system.cpp
View file @
9b09f09b
...
...
@@ -359,26 +359,24 @@ string format( const char* fmt, ... )
string
tempfile
(
const
char
*
suffix
)
{
const
char
*
temp_dir
=
getenv
(
"OPENCV_TEMP_PATH"
);
string
fname
;
#if defined WIN32 || defined _WIN32
char
temp_dir
[
MAX_PATH
+
1
]
=
{
0
};
char
temp_dir
2
[
MAX_PATH
+
1
]
=
{
0
};
char
temp_file
[
MAX_PATH
+
1
]
=
{
0
};
::
GetTempPathA
(
sizeof
(
temp_dir
),
temp_dir
);
if
(
temp_dir
==
0
||
temp_dir
[
0
]
==
0
)
{
::
GetTempPathA
(
sizeof
(
temp_dir2
),
temp_dir2
);
temp_dir
=
temp_dir2
;
}
if
(
0
==
::
GetTempFileNameA
(
temp_dir
,
"ocv"
,
0
,
temp_file
))
return
string
();
DeleteFileA
(
temp_file
);
string
name
=
temp_file
;
if
(
suffix
)
{
if
(
suffix
[
0
]
!=
'.'
)
return
name
+
"."
+
suffix
;
else
return
name
+
suffix
;
}
else
return
name
;
fname
=
temp_file
;
# else
# ifdef ANDROID
//char defaultTemplate[] = "/mnt/sdcard/__opencv_temp.XXXXXX";
...
...
@@ -387,9 +385,7 @@ string tempfile( const char* suffix )
char
defaultTemplate
[]
=
"/tmp/__opencv_temp.XXXXXX"
;
# endif
string
fname
;
const
char
*
temp_dir
=
getenv
(
"OPENCV_TEMP_PATH"
);
if
(
temp_dir
==
0
||
temp_dir
[
0
]
==
0
)
if
(
temp_dir
==
0
||
temp_dir
[
0
]
==
0
)
fname
=
defaultTemplate
;
else
{
...
...
@@ -401,19 +397,20 @@ string tempfile( const char* suffix )
}
const
int
fd
=
mkstemp
((
char
*
)
fname
.
c_str
());
if
(
fd
==
-
1
)
return
""
;
if
(
fd
==
-
1
)
return
string
();
close
(
fd
);
remove
(
fname
.
c_str
());
# endif
if
(
suffix
)
if
(
suffix
)
{
if
(
suffix
[
0
]
!=
'.'
)
fname
=
fname
+
"."
+
suffix
;
return
fname
+
"."
+
suffix
;
else
fname
+=
suffix
;
return
fname
+
suffix
;
}
return
fname
;
# endif
}
static
CvErrorCallback
customErrorCallback
=
0
;
...
...
modules/imgproc/perf/perf_filter2d.cpp
View file @
9b09f09b
...
...
@@ -70,7 +70,7 @@ PERF_TEST_P( Image_KernelSize, GaborFilter2d,
filter2D
(
sourceImage
,
filteredImage
,
CV_32F
,
gaborKernel
);
}
SANITY_CHECK
(
filteredImage
);
SANITY_CHECK
(
filteredImage
,
1e-3
);
}
modules/nonfree/perf/perf_surf.cpp
View file @
9b09f09b
...
...
@@ -27,7 +27,7 @@ PERF_TEST_P(surf, detect, testing::Values(SURF_IMAGES))
TEST_CYCLE
()
detector
(
frame
,
mask
,
points
);
SANITY_CHECK_KEYPOINTS
(
points
);
SANITY_CHECK_KEYPOINTS
(
points
,
1e-3
);
}
PERF_TEST_P
(
surf
,
extract
,
testing
::
Values
(
SURF_IMAGES
))
...
...
@@ -67,6 +67,6 @@ PERF_TEST_P(surf, full, testing::Values(SURF_IMAGES))
TEST_CYCLE
()
detector
(
frame
,
mask
,
points
,
descriptors
,
false
);
SANITY_CHECK_KEYPOINTS
(
points
);
SANITY_CHECK_KEYPOINTS
(
points
,
1e-3
);
SANITY_CHECK
(
descriptors
,
1e-4
);
}
modules/stitching/perf/perf_stich.cpp
View file @
9b09f09b
...
...
@@ -19,7 +19,7 @@ typedef TestBaseWithParam<String> match;
typedef
std
::
tr1
::
tuple
<
String
,
int
>
matchVector_t
;
typedef
TestBaseWithParam
<
matchVector_t
>
matchVector
;
#ifdef HAVE_OPENCV_NONFREE
#ifdef HAVE_OPENCV_NONFREE
_TODO_FIND_WHY_SURF_IS_NOT_ABLE_TO_STITCH_PANOS
#define TEST_DETECTORS testing::Values("surf", "orb")
#else
#define TEST_DETECTORS testing::Values<String>("orb")
...
...
@@ -60,8 +60,6 @@ PERF_TEST_P(stitch, a123, TEST_DETECTORS)
Mat
pano_small
;
if
(
!
pano
.
empty
())
resize
(
pano
,
pano_small
,
Size
(
320
,
240
),
0
,
0
,
INTER_AREA
);
else
pano_small
=
pano
;
SANITY_CHECK
(
pano_small
,
5
);
}
...
...
@@ -100,8 +98,6 @@ PERF_TEST_P(stitch, b12, TEST_DETECTORS)
Mat
pano_small
;
if
(
!
pano
.
empty
())
resize
(
pano
,
pano_small
,
Size
(
320
,
240
),
0
,
0
,
INTER_AREA
);
else
pano_small
=
pano
;
SANITY_CHECK
(
pano_small
,
5
);
}
...
...
modules/ts/misc/run.py
View file @
9b09f09b
This diff is collapsed.
Click to expand it.
modules/ts/src/ts_perf.cpp
View file @
9b09f09b
...
...
@@ -16,7 +16,8 @@ const std::string command_line_keys =
"{ |perf_force_samples |100 |force set maximum number of samples for all tests}"
"{ |perf_seed |809564 |seed for random numbers generator}"
"{ |perf_threads |-1 |the number of worker threads, if parallel execution is enabled}"
"{ |perf_write_sanity |false |allow to create new records for sanity checks}"
"{ |perf_write_sanity |false |create new records for sanity checks}"
"{ |perf_verify_sanity |false |fail tests having no regression data for sanity checks}"
#ifdef ANDROID
"{ |perf_time_limit |6.0 |default time limit for a single test (in seconds)}"
"{ |perf_affinity_mask |0 |set affinity mask for the main thread}"
...
...
@@ -41,6 +42,7 @@ static uint64 param_seed;
static
double
param_time_limit
;
static
int
param_threads
;
static
bool
param_write_sanity
;
static
bool
param_verify_sanity
;
#ifdef HAVE_CUDA
static
bool
param_run_cpu
;
static
int
param_cuda_device
;
...
...
@@ -600,6 +602,10 @@ Regression& Regression::operator() (const std::string& name, cv::InputArray arra
write
(
array
);
write
()
<<
"}"
;
}
else
if
(
param_verify_sanity
)
{
ADD_FAILURE
()
<<
" No regression data for "
<<
name
<<
" argument"
;
}
}
else
{
...
...
@@ -658,6 +664,7 @@ void TestBase::Init(int argc, const char* const argv[])
param_time_limit
=
std
::
max
(
0.
,
args
.
get
<
double
>
(
"perf_time_limit"
));
param_force_samples
=
args
.
get
<
unsigned
int
>
(
"perf_force_samples"
);
param_write_sanity
=
args
.
get
<
bool
>
(
"perf_write_sanity"
);
param_verify_sanity
=
args
.
get
<
bool
>
(
"perf_verify_sanity"
);
param_threads
=
args
.
get
<
int
>
(
"perf_threads"
);
#ifdef ANDROID
param_affinity_mask
=
args
.
get
<
int
>
(
"perf_affinity_mask"
);
...
...
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