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
b7899c3d
Commit
b7899c3d
authored
Aug 08, 2014
by
Elena Gvozdeva
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
small fix for ocl_resize
parent
d0f789dc
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
4 deletions
+5
-4
imgwarp.cpp
modules/imgproc/src/imgwarp.cpp
+3
-2
test_warp.cpp
modules/imgproc/test/ocl/test_warp.cpp
+2
-2
No files found.
modules/imgproc/src/imgwarp.cpp
View file @
b7899c3d
...
...
@@ -2074,7 +2074,8 @@ static bool ocl_resize( InputArray _src, OutputArray _dst, Size dsize,
// datatypes because the observed error is low.
bool
useSampler
=
(
interpolation
==
INTER_LINEAR
&&
ocl
::
Device
::
getDefault
().
imageSupport
()
&&
ocl
::
Image2D
::
canCreateAlias
(
src
)
&&
depth
<=
4
&&
ocl
::
Image2D
::
isFormatSupported
(
depth
,
cn
,
true
));
ocl
::
Image2D
::
isFormatSupported
(
depth
,
cn
,
true
)
&&
src
.
offset
==
0
);
if
(
useSampler
)
{
int
wdepth
=
std
::
max
(
depth
,
CV_32S
);
...
...
@@ -2380,7 +2381,7 @@ void cv::resize( InputArray _src, OutputArray _dst, Size dsize,
inv_scale_y
=
(
double
)
dsize
.
height
/
ssize
.
height
;
}
CV_OCL_RUN
(
_src
.
dims
()
<=
2
&&
_dst
.
isUMat
(),
CV_OCL_RUN
(
_src
.
dims
()
<=
2
&&
_dst
.
isUMat
()
&&
_src
.
cols
()
>
10
&&
_src
.
rows
()
>
10
,
ocl_resize
(
_src
,
_dst
,
dsize
,
inv_scale_x
,
inv_scale_y
,
interpolation
))
Mat
src
=
_src
.
getMat
();
...
...
modules/imgproc/test/ocl/test_warp.cpp
View file @
b7899c3d
...
...
@@ -182,7 +182,7 @@ PARAM_TEST_CASE(Resize, MatType, double, double, Interpolation, bool, int)
{
CV_Assert
(
fx
>
0
&&
fy
>
0
);
Size
srcRoiSize
=
randomSize
(
1
,
MAX_VALUE
),
dstRoiSize
;
Size
srcRoiSize
=
randomSize
(
1
0
,
MAX_VALUE
),
dstRoiSize
;
// Make sure the width is a multiple of the requested value, and no more
srcRoiSize
.
width
+=
widthMultiple
-
1
-
(
srcRoiSize
.
width
-
1
)
%
widthMultiple
;
dstRoiSize
.
width
=
cvRound
(
srcRoiSize
.
width
*
fx
);
...
...
@@ -215,7 +215,7 @@ OCL_TEST_P(Resize, Mat)
for
(
int
j
=
0
;
j
<
test_loop_times
;
j
++
)
{
int
depth
=
CV_MAT_DEPTH
(
type
);
double
eps
=
depth
<=
CV_32S
?
1
:
1
e-2
;
double
eps
=
depth
<=
CV_32S
?
1
:
5
e-2
;
random_roi
();
...
...
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