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
83390ea4
Commit
83390ea4
authored
Jun 06, 2012
by
Marina Kolpakova
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
performance test for INTER_AREA resize has been added.
parent
aa8fbc26
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
13 additions
and
9 deletions
+13
-9
perf_imgproc.cpp
modules/gpu/perf/perf_imgproc.cpp
+3
-2
perf_utility.hpp
modules/gpu/perf/perf_utility.hpp
+1
-1
perf_imgproc.cpp
modules/gpu/perf_cpu/perf_imgproc.cpp
+3
-2
perf_utility.hpp
modules/gpu/perf_cpu/perf_utility.hpp
+1
-1
resize.cu
modules/gpu/src/cuda/resize.cu
+4
-0
test_resize.cpp
modules/gpu/test/test_resize.cpp
+1
-1
test_imgwarp.cpp
modules/imgproc/test/test_imgwarp.cpp
+0
-2
No files found.
modules/gpu/perf/perf_imgproc.cpp
View file @
83390ea4
...
...
@@ -86,8 +86,9 @@ INSTANTIATE_TEST_CASE_P(ImgProc, Resize, testing::Combine(
testing
::
Values
(
MatType
(
CV_8UC1
),
MatType
(
CV_8UC3
),
MatType
(
CV_8UC4
),
MatType
(
CV_16UC1
),
MatType
(
CV_16UC3
),
MatType
(
CV_16UC4
),
MatType
(
CV_32FC1
),
MatType
(
CV_32FC3
),
MatType
(
CV_32FC4
)),
testing
::
Values
(
Interpolation
(
cv
::
INTER_NEAREST
),
Interpolation
(
cv
::
INTER_LINEAR
),
Interpolation
(
cv
::
INTER_CUBIC
)),
testing
::
Values
(
Scale
(
0.5
),
Scale
(
2.0
))));
testing
::
Values
(
Interpolation
(
cv
::
INTER_NEAREST
),
Interpolation
(
cv
::
INTER_LINEAR
),
Interpolation
(
cv
::
INTER_CUBIC
),
Interpolation
(
cv
::
INTER_AREA
)),
testing
::
Values
(
Scale
(
0.5
),
Scale
(
0.3
)
/*, Scale(2.0)*/
)));
//////////////////////////////////////////////////////////////////////
// WarpAffine
...
...
modules/gpu/perf/perf_utility.hpp
View file @
83390ea4
...
...
@@ -7,7 +7,7 @@ using perf::MatType;
using
perf
::
MatDepth
;
CV_ENUM
(
BorderMode
,
cv
::
BORDER_REFLECT101
,
cv
::
BORDER_REPLICATE
,
cv
::
BORDER_CONSTANT
,
cv
::
BORDER_REFLECT
,
cv
::
BORDER_WRAP
)
CV_ENUM
(
Interpolation
,
cv
::
INTER_NEAREST
,
cv
::
INTER_LINEAR
,
cv
::
INTER_CUBIC
)
CV_ENUM
(
Interpolation
,
cv
::
INTER_NEAREST
,
cv
::
INTER_LINEAR
,
cv
::
INTER_CUBIC
,
cv
::
INTER_AREA
)
CV_ENUM
(
NormType
,
cv
::
NORM_INF
,
cv
::
NORM_L1
,
cv
::
NORM_L2
,
cv
::
NORM_HAMMING
)
struct
CvtColorInfo
...
...
modules/gpu/perf_cpu/perf_imgproc.cpp
View file @
83390ea4
...
...
@@ -76,8 +76,9 @@ INSTANTIATE_TEST_CASE_P(ImgProc, Resize, testing::Combine(
testing
::
Values
(
MatType
(
CV_8UC1
),
MatType
(
CV_8UC3
),
MatType
(
CV_8UC4
),
MatType
(
CV_16UC1
),
MatType
(
CV_16UC3
),
MatType
(
CV_16UC4
),
MatType
(
CV_32FC1
),
MatType
(
CV_32FC3
),
MatType
(
CV_32FC4
)),
testing
::
Values
(
Interpolation
(
cv
::
INTER_NEAREST
),
Interpolation
(
cv
::
INTER_LINEAR
),
Interpolation
(
cv
::
INTER_CUBIC
)),
testing
::
Values
(
Scale
(
0.5
),
Scale
(
2.0
))));
testing
::
Values
(
Interpolation
(
cv
::
INTER_NEAREST
),
Interpolation
(
cv
::
INTER_LINEAR
),
Interpolation
(
cv
::
INTER_CUBIC
),
Interpolation
(
cv
::
INTER_AREA
)),
testing
::
Values
(
Scale
(
0.5
),
Scale
(
0.3
)
/*, Scale(2.0)*/
)));
//////////////////////////////////////////////////////////////////////
// WarpAffine
...
...
modules/gpu/perf_cpu/perf_utility.hpp
View file @
83390ea4
...
...
@@ -7,7 +7,7 @@ using perf::MatType;
using
perf
::
MatDepth
;
CV_ENUM
(
BorderMode
,
cv
::
BORDER_REFLECT101
,
cv
::
BORDER_REPLICATE
,
cv
::
BORDER_CONSTANT
,
cv
::
BORDER_REFLECT
,
cv
::
BORDER_WRAP
)
CV_ENUM
(
Interpolation
,
cv
::
INTER_NEAREST
,
cv
::
INTER_LINEAR
,
cv
::
INTER_CUBIC
)
CV_ENUM
(
Interpolation
,
cv
::
INTER_NEAREST
,
cv
::
INTER_LINEAR
,
cv
::
INTER_CUBIC
,
cv
::
INTER_AREA
)
CV_ENUM
(
NormType
,
cv
::
NORM_INF
,
cv
::
NORM_L1
,
cv
::
NORM_L2
,
cv
::
NORM_HAMMING
)
struct
CvtColorInfo
...
...
modules/gpu/src/cuda/resize.cu
View file @
83390ea4
...
...
@@ -105,6 +105,8 @@ namespace cv { namespace gpu { namespace device
AreaFilter< BorderReader< PtrStep<T>, BrdConstant<T> > > filteredSrc(brdSrc, fx, fy);
resize_area<<<grid, block, 0, stream>>>(filteredSrc, fx, fy, dst);
cudaSafeCall( cudaGetLastError() );
if (stream == 0)
cudaSafeCall( cudaDeviceSynchronize() );
}
};
...
...
@@ -120,6 +122,8 @@ namespace cv { namespace gpu { namespace device
IntegerAreaFilter< BorderReader< PtrStep<T>, BrdConstant<T> > > filteredSrc(brdSrc, fx, fy);
resize_area<<<grid, block, 0, stream>>>(filteredSrc, fx, fy, dst);
cudaSafeCall( cudaGetLastError() );
if (stream == 0)
cudaSafeCall( cudaDeviceSynchronize() );
}
};
...
...
modules/gpu/test/test_resize.cpp
View file @
83390ea4
...
...
@@ -198,7 +198,7 @@ INSTANTIATE_TEST_CASE_P(GPU_ImgProc, ResizeArea, testing::Combine(
ALL_DEVICES
,
DIFFERENT_SIZES
,
testing
::
Values
(
MatType
(
CV_8UC3
),
MatType
(
CV_16UC1
),
MatType
(
CV_16UC3
),
MatType
(
CV_16UC4
),
MatType
(
CV_32FC1
),
MatType
(
CV_32FC3
),
MatType
(
CV_32FC4
)),
testing
::
Values
(
/*0.3,*/
0.5
),
testing
::
Values
(
0.3
,
0.5
),
testing
::
Values
(
Interpolation
(
cv
::
INTER_AREA
)),
WHOLE_SUBMAT
));
...
...
modules/imgproc/test/test_imgwarp.cpp
View file @
83390ea4
...
...
@@ -1495,8 +1495,6 @@ TEST(Imgproc_resize_area, regression)
cv
::
Mat
expected
(
5
,
5
,
CV_16UC1
,
expected_data
);
cv
::
resize
(
src
,
actual
,
cv
::
Size
(),
0.3
,
0.3
,
INTER_AREA
);
std
::
cout
<<
actual
<<
std
::
endl
;
std
::
cout
<<
expected
<<
std
::
endl
;
ASSERT_EQ
(
actual
.
type
(),
expected
.
type
());
ASSERT_EQ
(
actual
.
size
(),
expected
.
size
());
...
...
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