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
cf4c79eb
Commit
cf4c79eb
authored
Mar 04, 2015
by
Ilya Lavrenov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
disabled some kernels for Android && NVidia
parent
4bb49640
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
54 additions
and
5 deletions
+54
-5
stat.cpp
modules/core/src/stat.cpp
+17
-0
test_arithm.cpp
modules/core/test/ocl/test_arithm.cpp
+4
-0
perf_orb.cpp
modules/features2d/perf/opencl/perf_orb.cpp
+7
-1
morph.cpp
modules/imgproc/src/morph.cpp
+6
-1
smooth.cpp
modules/imgproc/src/smooth.cpp
+5
-0
test_canny.cpp
modules/imgproc/test/ocl/test_canny.cpp
+7
-2
test_warp.cpp
modules/imgproc/test/ocl/test_warp.cpp
+8
-1
No files found.
modules/core/src/stat.cpp
View file @
cf4c79eb
...
...
@@ -2114,6 +2114,12 @@ static bool ocl_minMaxIdx( InputArray _src, double* minVal, double* maxVal, int*
int
ddepth
=
-
1
,
bool
absValues
=
false
,
InputArray
_src2
=
noArray
(),
double
*
maxVal2
=
NULL
)
{
const
ocl
::
Device
&
dev
=
ocl
::
Device
::
getDefault
();
#ifdef ANDROID
if
(
dev
.
isNVidia
())
return
false
;
#endif
bool
doubleSupport
=
dev
.
doubleFPConfig
()
>
0
,
haveMask
=
!
_mask
.
empty
(),
haveSrc2
=
_src2
.
kind
()
!=
_InputArray
::
NONE
;
int
type
=
_src
.
type
(),
depth
=
CV_MAT_DEPTH
(
type
),
cn
=
CV_MAT_CN
(
type
),
...
...
@@ -2885,6 +2891,12 @@ static NormDiffFunc getNormDiffFunc(int normType, int depth)
static
bool
ocl_norm
(
InputArray
_src
,
int
normType
,
InputArray
_mask
,
double
&
result
)
{
const
ocl
::
Device
&
d
=
ocl
::
Device
::
getDefault
();
#ifdef ANDROID
if
(
d
.
isNVidia
())
return
false
;
#endif
int
type
=
_src
.
type
(),
depth
=
CV_MAT_DEPTH
(
type
),
cn
=
CV_MAT_CN
(
type
);
bool
doubleSupport
=
d
.
doubleFPConfig
()
>
0
,
haveMask
=
_mask
.
kind
()
!=
_InputArray
::
NONE
;
...
...
@@ -3250,6 +3262,11 @@ namespace cv {
static
bool
ocl_norm
(
InputArray
_src1
,
InputArray
_src2
,
int
normType
,
InputArray
_mask
,
double
&
result
)
{
#ifdef ANDROID
if
(
ocl
::
Device
::
getDefault
().
isNVidia
())
return
false
;
#endif
Scalar
sc1
,
sc2
;
int
type
=
_src1
.
type
(),
depth
=
CV_MAT_DEPTH
(
type
),
cn
=
CV_MAT_CN
(
type
);
bool
relative
=
(
normType
&
NORM_RELATIVE
)
!=
0
;
...
...
modules/core/test/ocl/test_arithm.cpp
View file @
cf4c79eb
...
...
@@ -331,7 +331,11 @@ OCL_TEST_P(Mul, Mat_Scale)
OCL_OFF
(
cv
::
multiply
(
src1_roi
,
src2_roi
,
dst1_roi
,
val
[
0
]));
OCL_ON
(
cv
::
multiply
(
usrc1_roi
,
usrc2_roi
,
udst1_roi
,
val
[
0
]));
#ifdef ANDROID
Near
(
udst1_roi
.
depth
()
>=
CV_32F
?
2e-1
:
1
);
#else
Near
(
udst1_roi
.
depth
()
>=
CV_32F
?
1e-3
:
1
);
#endif
}
}
...
...
modules/features2d/perf/opencl/perf_orb.cpp
View file @
cf4c79eb
...
...
@@ -61,6 +61,12 @@ OCL_PERF_TEST_P(ORBFixture, ORB_Full, ORB_IMAGES)
string
filename
=
getDataPath
(
GetParam
());
Mat
mframe
=
imread
(
filename
,
IMREAD_GRAYSCALE
);
double
desc_eps
=
1e-6
;
#ifdef ANDROID
if
(
cv
::
ocl
::
Device
::
getDefault
().
isNVidia
())
desc_eps
=
2
;
#endif
if
(
mframe
.
empty
())
FAIL
()
<<
"Unable to load source image "
<<
filename
;
...
...
@@ -77,7 +83,7 @@ OCL_PERF_TEST_P(ORBFixture, ORB_Full, ORB_IMAGES)
::
perf
::
sort
(
points
,
descriptors
);
SANITY_CHECK_KEYPOINTS
(
points
,
1e-5
);
SANITY_CHECK
(
descriptors
);
SANITY_CHECK
(
descriptors
,
desc_eps
);
}
}
// ocl
...
...
modules/imgproc/src/morph.cpp
View file @
cf4c79eb
...
...
@@ -1548,7 +1548,7 @@ static bool ocl_morphOp(InputArray _src, OutputArray _dst, InputArray _kernel,
return
true
;
}
#if
defined
ANDROID
#if
def
ANDROID
size_t
localThreads
[
2
]
=
{
16
,
8
};
#else
size_t
localThreads
[
2
]
=
{
16
,
16
};
...
...
@@ -1563,6 +1563,11 @@ static bool ocl_morphOp(InputArray _src, OutputArray _dst, InputArray _kernel,
if
(
localThreads
[
0
]
*
localThreads
[
1
]
*
2
<
(
localThreads
[
0
]
+
ksize
.
width
-
1
)
*
(
localThreads
[
1
]
+
ksize
.
height
-
1
))
return
false
;
#ifdef ANDROID
if
(
dev
.
isNVidia
())
return
false
;
#endif
// build processing
String
processing
;
Mat
kernel8u
;
...
...
modules/imgproc/src/smooth.cpp
View file @
cf4c79eb
...
...
@@ -2966,6 +2966,11 @@ static bool ocl_bilateralFilter_8u(InputArray _src, OutputArray _dst, int d,
double
sigma_color
,
double
sigma_space
,
int
borderType
)
{
#ifdef ANDROID
if
(
ocl
::
Device
::
getDefault
().
isNVidia
())
return
false
;
#endif
int
type
=
_src
.
type
(),
depth
=
CV_MAT_DEPTH
(
type
),
cn
=
CV_MAT_CN
(
type
);
int
i
,
j
,
maxk
,
radius
;
...
...
modules/imgproc/test/ocl/test_canny.cpp
View file @
cf4c79eb
...
...
@@ -99,12 +99,17 @@ OCL_TEST_P(Canny, Accuracy)
generateTestData
();
const
double
low_thresh
=
50.0
,
high_thresh
=
100.0
;
double
eps
=
1e-2
;
#ifdef ANDROID
if
(
cv
::
ocl
::
Device
::
getDefault
().
isNVidia
())
eps
=
12e-3
;
#endif
OCL_OFF
(
cv
::
Canny
(
src_roi
,
dst_roi
,
low_thresh
,
high_thresh
,
apperture_size
,
useL2gradient
));
OCL_ON
(
cv
::
Canny
(
usrc_roi
,
udst_roi
,
low_thresh
,
high_thresh
,
apperture_size
,
useL2gradient
));
EXPECT_MAT_SIMILAR
(
dst_roi
,
udst_roi
,
1e-2
);
EXPECT_MAT_SIMILAR
(
dst
,
udst
,
1e-2
);
EXPECT_MAT_SIMILAR
(
dst_roi
,
udst_roi
,
eps
);
EXPECT_MAT_SIMILAR
(
dst
,
udst
,
eps
);
}
OCL_INSTANTIATE_TEST_CASE_P
(
ImgProc
,
Canny
,
testing
::
Combine
(
...
...
modules/imgproc/test/ocl/test_warp.cpp
View file @
cf4c79eb
...
...
@@ -319,10 +319,17 @@ OCL_TEST_P(Remap_INTER_LINEAR, Mat)
{
random_roi
();
double
eps
=
2.0
;
#ifdef ANDROID
// TODO investigate accuracy
if
(
cv
::
ocl
::
Device
::
getDefault
().
isNVidia
())
eps
=
8.0
;
#endif
OCL_OFF
(
cv
::
remap
(
src_roi
,
dst_roi
,
map1_roi
,
map2_roi
,
INTER_LINEAR
,
borderType
,
val
));
OCL_ON
(
cv
::
remap
(
usrc_roi
,
udst_roi
,
umap1_roi
,
umap2_roi
,
INTER_LINEAR
,
borderType
,
val
));
Near
(
2.0
);
Near
(
eps
);
}
}
...
...
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