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
f7c1d16b
Commit
f7c1d16b
authored
Jun 18, 2012
by
Marina Kolpakova
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
resize area with block scan
parent
81c6adb9
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
9 additions
and
9 deletions
+9
-9
resize.cu
modules/gpu/src/cuda/resize.cu
+2
-3
resize.cpp
modules/gpu/src/resize.cpp
+1
-0
test_resize.cpp
modules/gpu/test/test_resize.cpp
+6
-6
No files found.
modules/gpu/src/cuda/resize.cu
View file @
f7c1d16b
...
...
@@ -620,7 +620,6 @@ namespace cv { namespace gpu { namespace device
{
(void)interpolation;
//TODO: add assert to picture size
int iscale_x = round(fx);
int iscale_y = round(fy);
...
...
@@ -641,8 +640,8 @@ namespace cv { namespace gpu { namespace device
thred_lines = divUp(src.rows, threads);
blocks = dst.cols * thred_lines;
printf("device code executed for Y coordinate with:\nwarps %d, threads %d, thred_lines %d, blocks %d\n",
warps, threads, thred_lines, blocks);
printf("device code executed for Y coordinate with:\n
size %d
warps %d, threads %d, thred_lines %d, blocks %d\n",
dst.rows,
warps, threads, thred_lines, blocks);
resise_scan_fast_y<T, smem_type><<<blocks, threads, warps * 32 * sizeof(smem_type)>>>
(buffer, dst, iscale_x, iscale_y, thred_lines);
...
...
modules/gpu/src/resize.cpp
View file @
f7c1d16b
...
...
@@ -94,6 +94,7 @@ void cv::gpu::resize(const GpuMat& src, GpuMat& dst, GpuMat& buffer, Size dsize,
CV_Assert
(
interpolation
==
INTER_AREA
);
CV_Assert
(
(
fx
<
1.0
)
&&
(
fy
<
1.0
));
CV_Assert
(
!
(
dsize
==
Size
())
||
(
fx
>
0
&&
fy
>
0
));
CV_Assert
(
src
.
cols
>=
128
&&
src
.
rows
>=
128
);
if
(
dsize
==
Size
())
dsize
=
Size
(
saturate_cast
<
int
>
(
src
.
cols
*
fx
),
saturate_cast
<
int
>
(
src
.
rows
*
fy
));
...
...
modules/gpu/test/test_resize.cpp
View file @
f7c1d16b
...
...
@@ -201,13 +201,13 @@ TEST_P(ResizeArea, Accuracy)
cv
::
Mat
gpu
;
dst
.
download
(
gpu
);
// std::cout
<< src
std
::
cout
//
<< src
// << std::endl << std::endl
// << gpu_buff
// << std::endl << std::endl
//
<< gpu
//
<< std::endl << std::endl
//
<< dst_cpu<< std::endl;
<<
gpu
<<
std
::
endl
<<
std
::
endl
<<
dst_cpu
<<
std
::
endl
;
EXPECT_MAT_NEAR
(
dst_cpu
,
dst
,
src
.
depth
()
==
CV_32F
?
1e-2
:
1.0
);
...
...
@@ -215,9 +215,9 @@ TEST_P(ResizeArea, Accuracy)
INSTANTIATE_TEST_CASE_P
(
GPU_ImgProc
,
ResizeArea
,
testing
::
Combine
(
ALL_DEVICES
,
testing
::
Values
(
cv
::
Size
(
512
,
256
)),
//DIFFERENT_SIZES,
testing
::
Values
(
cv
::
Size
(
640
,
10
*
128
)),
//DIFFERENT_SIZES,
testing
::
Values
(
MatType
(
CV_8UC1
)
/*MatType(CV_8UC3), MatType(CV_16UC1), MatType(CV_16UC3), MatType(CV_16UC4), MatType(CV_32FC1), MatType(CV_32FC3), MatType(CV_32FC4)*/
),
testing
::
Values
(
0.
5
),
testing
::
Values
(
0.
1
),
testing
::
Values
(
Interpolation
(
cv
::
INTER_AREA
)),
WHOLE_SUBMAT
));
...
...
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