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
5261fbe2
Commit
5261fbe2
authored
Mar 11, 2014
by
Andrey Pavlenko
Committed by
OpenCV Buildbot
Mar 11, 2014
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #2387 from alalek:ocl_remap_3cn
parents
90c5dde8
e7475bff
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
11 additions
and
5 deletions
+11
-5
perf_imgwarp.cpp
modules/imgproc/perf/opencl/perf_imgwarp.cpp
+1
-1
imgwarp.cpp
modules/imgproc/src/imgwarp.cpp
+8
-2
remap.cl
modules/imgproc/src/opencl/remap.cl
+0
-0
test_warp.cpp
modules/imgproc/test/ocl/test_warp.cpp
+2
-2
No files found.
modules/imgproc/perf/opencl/perf_imgwarp.cpp
View file @
5261fbe2
...
@@ -172,7 +172,7 @@ typedef tuple<Size, MatType, InterType> RemapParams;
...
@@ -172,7 +172,7 @@ typedef tuple<Size, MatType, InterType> RemapParams;
typedef
TestBaseWithParam
<
RemapParams
>
RemapFixture
;
typedef
TestBaseWithParam
<
RemapParams
>
RemapFixture
;
OCL_PERF_TEST_P
(
RemapFixture
,
Remap
,
OCL_PERF_TEST_P
(
RemapFixture
,
Remap
,
::
testing
::
Combine
(
OCL_TEST_SIZES
,
OCL_TEST_TYPES
,
InterType
::
all
()))
::
testing
::
Combine
(
OCL_TEST_SIZES
,
OCL_TEST_TYPES
_134
,
InterType
::
all
()))
{
{
const
RemapParams
params
=
GetParam
();
const
RemapParams
params
=
GetParam
();
const
Size
srcSize
=
get
<
0
>
(
params
);
const
Size
srcSize
=
get
<
0
>
(
params
);
...
...
modules/imgproc/src/imgwarp.cpp
View file @
5261fbe2
...
@@ -3503,7 +3503,7 @@ static bool ocl_remap(InputArray _src, OutputArray _dst, InputArray _map1, Input
...
@@ -3503,7 +3503,7 @@ static bool ocl_remap(InputArray _src, OutputArray _dst, InputArray _map1, Input
{
{
int
cn
=
_src
.
channels
(),
type
=
_src
.
type
(),
depth
=
_src
.
depth
();
int
cn
=
_src
.
channels
(),
type
=
_src
.
type
(),
depth
=
_src
.
depth
();
if
(
borderType
==
BORDER_TRANSPARENT
||
cn
==
3
||
!
(
interpolation
==
INTER_LINEAR
||
interpolation
==
INTER_NEAREST
)
if
(
borderType
==
BORDER_TRANSPARENT
||
!
(
interpolation
==
INTER_LINEAR
||
interpolation
==
INTER_NEAREST
)
||
_map1
.
type
()
==
CV_16SC1
||
_map2
.
type
()
==
CV_16SC1
)
||
_map1
.
type
()
==
CV_16SC1
||
_map2
.
type
()
==
CV_16SC1
)
return
false
;
return
false
;
...
@@ -3553,10 +3553,16 @@ static bool ocl_remap(InputArray _src, OutputArray _dst, InputArray _map1, Input
...
@@ -3553,10 +3553,16 @@ static bool ocl_remap(InputArray _src, OutputArray _dst, InputArray _map1, Input
ocl
::
convertTypeStr
(
CV_32S
,
wdepth
,
2
,
cvt
[
2
]),
ocl
::
convertTypeStr
(
CV_32S
,
wdepth
,
2
,
cvt
[
2
]),
ocl
::
typeToStr
(
CV_MAKE_TYPE
(
wdepth
,
2
)));
ocl
::
typeToStr
(
CV_MAKE_TYPE
(
wdepth
,
2
)));
}
}
int
scalarcn
=
cn
==
3
?
4
:
cn
;
int
sctype
=
CV_MAKETYPE
(
depth
,
scalarcn
);
buildOptions
+=
format
(
" -D T=%s -D T1=%s"
" -D cn=%d -D ST=%s"
,
ocl
::
typeToStr
(
type
),
ocl
::
typeToStr
(
depth
),
cn
,
ocl
::
typeToStr
(
sctype
));
ocl
::
Kernel
k
(
kernelName
.
c_str
(),
ocl
::
imgproc
::
remap_oclsrc
,
buildOptions
);
ocl
::
Kernel
k
(
kernelName
.
c_str
(),
ocl
::
imgproc
::
remap_oclsrc
,
buildOptions
);
Mat
scalar
(
1
,
1
,
type
,
borderValue
);
Mat
scalar
(
1
,
1
,
sc
type
,
borderValue
);
ocl
::
KernelArg
srcarg
=
ocl
::
KernelArg
::
ReadOnly
(
src
),
dstarg
=
ocl
::
KernelArg
::
WriteOnly
(
dst
),
ocl
::
KernelArg
srcarg
=
ocl
::
KernelArg
::
ReadOnly
(
src
),
dstarg
=
ocl
::
KernelArg
::
WriteOnly
(
dst
),
map1arg
=
ocl
::
KernelArg
::
ReadOnlyNoSize
(
map1
),
map1arg
=
ocl
::
KernelArg
::
ReadOnlyNoSize
(
map1
),
scalararg
=
ocl
::
KernelArg
::
Constant
((
void
*
)
scalar
.
data
,
scalar
.
elemSize
());
scalararg
=
ocl
::
KernelArg
::
Constant
((
void
*
)
scalar
.
data
,
scalar
.
elemSize
());
...
...
modules/imgproc/src/opencl/remap.cl
View file @
5261fbe2
This diff is collapsed.
Click to expand it.
modules/imgproc/test/ocl/test_warp.cpp
View file @
5261fbe2
...
@@ -342,7 +342,7 @@ OCL_INSTANTIATE_TEST_CASE_P(ImgprocWarpResizeArea, Resize, Combine(
...
@@ -342,7 +342,7 @@ OCL_INSTANTIATE_TEST_CASE_P(ImgprocWarpResizeArea, Resize, Combine(
OCL_INSTANTIATE_TEST_CASE_P
(
ImgprocWarp
,
Remap_INTER_LINEAR
,
Combine
(
OCL_INSTANTIATE_TEST_CASE_P
(
ImgprocWarp
,
Remap_INTER_LINEAR
,
Combine
(
Values
(
CV_8U
,
CV_16U
,
CV_32F
),
Values
(
CV_8U
,
CV_16U
,
CV_32F
),
Values
(
1
,
4
),
Values
(
1
,
3
,
4
),
Values
(
std
::
pair
<
MatType
,
MatType
>
((
MatType
)
CV_32FC1
,
(
MatType
)
CV_32FC1
),
Values
(
std
::
pair
<
MatType
,
MatType
>
((
MatType
)
CV_32FC1
,
(
MatType
)
CV_32FC1
),
std
::
pair
<
MatType
,
MatType
>
((
MatType
)
CV_16SC2
,
(
MatType
)
CV_16UC1
),
std
::
pair
<
MatType
,
MatType
>
((
MatType
)
CV_16SC2
,
(
MatType
)
CV_16UC1
),
std
::
pair
<
MatType
,
MatType
>
((
MatType
)
CV_32FC2
,
noType
)),
std
::
pair
<
MatType
,
MatType
>
((
MatType
)
CV_32FC2
,
noType
)),
...
@@ -355,7 +355,7 @@ OCL_INSTANTIATE_TEST_CASE_P(ImgprocWarp, Remap_INTER_LINEAR, Combine(
...
@@ -355,7 +355,7 @@ OCL_INSTANTIATE_TEST_CASE_P(ImgprocWarp, Remap_INTER_LINEAR, Combine(
OCL_INSTANTIATE_TEST_CASE_P
(
ImgprocWarp
,
Remap_INTER_NEAREST
,
Combine
(
OCL_INSTANTIATE_TEST_CASE_P
(
ImgprocWarp
,
Remap_INTER_NEAREST
,
Combine
(
Values
(
CV_8U
,
CV_16U
,
CV_32F
),
Values
(
CV_8U
,
CV_16U
,
CV_32F
),
Values
(
1
,
4
),
Values
(
1
,
3
,
4
),
Values
(
std
::
pair
<
MatType
,
MatType
>
((
MatType
)
CV_32FC1
,
(
MatType
)
CV_32FC1
),
Values
(
std
::
pair
<
MatType
,
MatType
>
((
MatType
)
CV_32FC1
,
(
MatType
)
CV_32FC1
),
std
::
pair
<
MatType
,
MatType
>
((
MatType
)
CV_32FC2
,
noType
),
std
::
pair
<
MatType
,
MatType
>
((
MatType
)
CV_32FC2
,
noType
),
std
::
pair
<
MatType
,
MatType
>
((
MatType
)
CV_16SC2
,
(
MatType
)
CV_16UC1
),
std
::
pair
<
MatType
,
MatType
>
((
MatType
)
CV_16SC2
,
(
MatType
)
CV_16UC1
),
...
...
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