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
b58b04a3
Commit
b58b04a3
authored
Sep 07, 2011
by
Andrey Pavlenko
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Perf Tests: updates to cvtColor() & integral() perf tests
parent
cbb6ac0c
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
110 additions
and
40 deletions
+110
-40
perf_cvt_color.cpp
modules/imgproc/perf/perf_cvt_color.cpp
+23
-2
perf_integral.cpp
modules/imgproc/perf/perf_integral.cpp
+87
-38
No files found.
modules/imgproc/perf/perf_cvt_color.cpp
View file @
b58b04a3
...
...
@@ -7,8 +7,9 @@ using namespace perf;
CV_ENUM
(
CvtMode
,
CV_YUV2BGR
,
CV_YUV2RGB
,
//YUV
CV_YUV420i2BGR
,
CV_YUV420i2RGB
,
CV_YUV420sp2BGR
,
CV_YUV420sp2RGB
,
//YUV420
CV_RGB2GRAY
,
CV_RGBA2GRAY
,
CV_BGR2GRAY
,
CV_BGRA2GRAY
,
//Gray
CV_GRAY2RGB
,
CV_GRAY2RGBA
/*, CV_GRAY2BGR, CV_GRAY2BGRA*/
//Gray2
)
CV_GRAY2RGB
,
CV_GRAY2RGBA
,
/*CV_GRAY2BGR, CV_GRAY2BGRA*/
//Gray2
CV_BGR2HSV
,
CV_RGB2HSV
,
CV_BGR2HLS
,
CV_RGB2HLS
//H
)
typedef
std
::
tr1
::
tuple
<
Size
,
CvtMode
>
Size_CvtMode_t
;
typedef
perf
::
TestBaseWithParam
<
Size_CvtMode_t
>
Size_CvtMode
;
...
...
@@ -109,3 +110,23 @@ PERF_TEST_P( Size_CvtMode, cvtColorGray2,
SANITY_CHECK
(
dst
);
}
PERF_TEST_P
(
Size_CvtMode
,
cvtColorH
,
testing
::
Combine
(
testing
::
Values
(
TYPICAL_MAT_SIZES
),
testing
::
Values
(
(
int
)
CV_BGR2HSV
,
(
int
)
CV_RGB2HSV
,
(
int
)
CV_BGR2HLS
,
(
int
)
CV_RGB2HLS
)
)
)
{
Size
sz
=
std
::
tr1
::
get
<
0
>
(
GetParam
());
int
mode
=
std
::
tr1
::
get
<
1
>
(
GetParam
());
Mat
src
(
sz
,
CV_8UC3
);
Mat
dst
(
sz
,
CV_8UC3
);
declare
.
in
(
src
,
WARMUP_RNG
).
out
(
dst
);
TEST_CYCLE
(
100
)
{
cvtColor
(
src
,
dst
,
mode
);
}
SANITY_CHECK
(
dst
);
}
modules/imgproc/perf/perf_integral.cpp
View file @
b58b04a3
#include "perf_precomp.hpp"
using
namespace
std
;
using
namespace
cv
;
using
namespace
perf
;
typedef
std
::
tr1
::
tuple
<
Size
,
MatType
,
MatDepth
>
Size_MatType_OutMatDepth_t
;
typedef
perf
::
TestBaseWithParam
<
Size_MatType_OutMatDepth_t
>
Size_MatType_OutMatDepth
;
/*
#include "perf_precomp.hpp"
using
namespace
std
;
using
namespace
cv
;
using
namespace
perf
;
typedef
std
::
tr1
::
tuple
<
Size
,
MatType
,
MatDepth
>
Size_MatType_OutMatDepth_t
;
typedef
perf
::
TestBaseWithParam
<
Size_MatType_OutMatDepth_t
>
Size_MatType_OutMatDepth
;
/*
// void integral(InputArray image, OutputArray sum, int sdepth=-1 )
*/
PERF_TEST_P
(
Size_MatType_OutMatDepth
,
integral1
,
testing
::
Combine
(
testing
::
Values
(
TYPICAL_MAT_SIZES
),
testing
::
Values
(
CV_8UC1
,
CV_8UC4
),
testing
::
Values
(
CV_32S
,
CV_32F
,
CV_64F
)
)
)
{
Size
sz
=
std
::
tr1
::
get
<
0
>
(
GetParam
());
int
matType
=
std
::
tr1
::
get
<
1
>
(
GetParam
());
int
sdepth
=
std
::
tr1
::
get
<
2
>
(
GetParam
());
Mat
src
(
sz
,
matType
);
Mat
sum
(
sz
,
sdepth
);
declare
.
in
(
src
,
WARMUP_RNG
)
;
TEST_CYCLE
(
100
)
{
integral
(
src
,
sum
,
sdepth
);
}
SANITY_CHECK
(
sum
);
}
/*
PERF_TEST_P
(
Size_MatType_OutMatDepth
,
integral1
,
testing
::
Combine
(
testing
::
Values
(
TYPICAL_MAT_SIZES
),
testing
::
Values
(
CV_8UC1
,
CV_8UC4
),
testing
::
Values
(
CV_32S
,
CV_32F
,
CV_64F
)
)
)
{
Size
sz
=
std
::
tr1
::
get
<
0
>
(
GetParam
());
int
matType
=
std
::
tr1
::
get
<
1
>
(
GetParam
());
int
sdepth
=
std
::
tr1
::
get
<
2
>
(
GetParam
());
Mat
src
(
sz
,
matType
);
Mat
sum
(
sz
,
sdepth
);
declare
.
in
(
src
,
WARMUP_RNG
)
.
out
(
sum
);
TEST_CYCLE
(
100
)
{
integral
(
src
,
sum
,
sdepth
);
}
SANITY_CHECK
(
sum
);
}
/*
// void integral(InputArray image, OutputArray sum, OutputArray sqsum, int sdepth=-1 )
*/
PERF_TEST_P
(
Size_MatType_OutMatDepth
,
integral2
,
testing
::
Combine
(
testing
::
Values
(
TYPICAL_MAT_SIZES
),
testing
::
Values
(
CV_8UC1
,
CV_8UC4
),
testing
::
Values
(
CV_32S
,
CV_32F
,
CV_64F
)
)
)
{
Size
sz
=
std
::
tr1
::
get
<
0
>
(
GetParam
());
int
matType
=
std
::
tr1
::
get
<
1
>
(
GetParam
());
int
sdepth
=
std
::
tr1
::
get
<
2
>
(
GetParam
());
Mat
src
(
sz
,
matType
);
Mat
sum
(
sz
,
sdepth
);
Mat
sqsum
(
sz
,
sdepth
);
/*
declare
.
in
(
src
,
WARMUP_RNG
).
out
(
sum
,
sqsum
);
TEST_CYCLE
(
100
)
{
integral
(
src
,
sum
,
sqsum
,
sdepth
);
}
SANITY_CHECK
(
sum
);
SANITY_CHECK
(
sqsum
);
}
/*
// void integral(InputArray image, OutputArray sum, OutputArray sqsum, OutputArray tilted, int sdepth=-1 )
*/
\ No newline at end of file
*/
PERF_TEST_P
(
Size_MatType_OutMatDepth
,
integral3
,
testing
::
Combine
(
testing
::
Values
(
TYPICAL_MAT_SIZES
),
testing
::
Values
(
CV_8UC1
,
CV_8UC4
),
testing
::
Values
(
CV_32S
,
CV_32F
,
CV_64F
)
)
)
{
Size
sz
=
std
::
tr1
::
get
<
0
>
(
GetParam
());
int
matType
=
std
::
tr1
::
get
<
1
>
(
GetParam
());
int
sdepth
=
std
::
tr1
::
get
<
2
>
(
GetParam
());
Mat
src
(
sz
,
matType
);
Mat
sum
(
sz
,
sdepth
);
Mat
sqsum
(
sz
,
sdepth
);
Mat
tilted
(
sz
,
sdepth
);
declare
.
in
(
src
,
WARMUP_RNG
).
out
(
sum
,
sqsum
,
tilted
);
TEST_CYCLE
(
100
)
{
integral
(
src
,
sum
,
sqsum
,
sdepth
);
}
SANITY_CHECK
(
sum
);
SANITY_CHECK
(
sqsum
);
SANITY_CHECK
(
tilted
);
}
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