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
1d62a025
Commit
1d62a025
authored
May 25, 2017
by
Vitaly Tuzov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Moved size restrictions for OpenVX processed images to corresponding cpp files
parent
9dc36a1e
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
27 additions
and
9 deletions
+27
-9
ovx_defs.hpp
modules/core/include/opencv2/core/openvx/ovx_defs.hpp
+0
-9
stat.cpp
modules/core/src/stat.cpp
+3
-0
fast.cpp
modules/features2d/src/fast.cpp
+3
-0
accum.cpp
modules/imgproc/src/accum.cpp
+3
-0
canny.cpp
modules/imgproc/src/canny.cpp
+3
-0
deriv.cpp
modules/imgproc/src/deriv.cpp
+3
-0
histogram.cpp
modules/imgproc/src/histogram.cpp
+3
-0
smooth.cpp
modules/imgproc/src/smooth.cpp
+9
-0
No files found.
modules/core/include/opencv2/core/openvx/ovx_defs.hpp
View file @
1d62a025
...
...
@@ -26,15 +26,6 @@ namespace ovx{
CV_EXPORTS_W
ivx
::
Context
&
getOpenVXContext
();
template
<
int
kernel_id
>
inline
bool
skipSmallImages
(
int
w
,
int
h
)
{
return
w
*
h
<
3840
*
2160
;
}
template
<>
inline
bool
skipSmallImages
<
VX_KERNEL_MINMAXLOC
>
(
int
w
,
int
h
)
{
return
w
*
h
<
3840
*
2160
;
}
template
<>
inline
bool
skipSmallImages
<
VX_KERNEL_MEDIAN_3x3
>
(
int
w
,
int
h
)
{
return
w
*
h
<
1280
*
720
;
}
template
<>
inline
bool
skipSmallImages
<
VX_KERNEL_GAUSSIAN_3x3
>
(
int
w
,
int
h
)
{
return
w
*
h
<
320
*
240
;
}
template
<>
inline
bool
skipSmallImages
<
VX_KERNEL_BOX_3x3
>
(
int
w
,
int
h
)
{
return
w
*
h
<
640
*
480
;
}
template
<>
inline
bool
skipSmallImages
<
VX_KERNEL_HISTOGRAM
>
(
int
w
,
int
h
)
{
return
w
*
h
<
2048
*
1536
;
}
template
<>
inline
bool
skipSmallImages
<
VX_KERNEL_SOBEL_3x3
>
(
int
w
,
int
h
)
{
return
w
*
h
<
320
*
240
;
}
template
<>
inline
bool
skipSmallImages
<
VX_KERNEL_CANNY_EDGE_DETECTOR
>
(
int
w
,
int
h
)
{
return
w
*
h
<
640
*
480
;
}
template
<>
inline
bool
skipSmallImages
<
VX_KERNEL_ACCUMULATE
>
(
int
w
,
int
h
)
{
return
w
*
h
<
120
*
60
;
}
template
<>
inline
bool
skipSmallImages
<
VX_KERNEL_FAST_CORNERS
>
(
int
w
,
int
h
)
{
return
w
*
h
<
800
*
600
;
}
}}
#define CV_OVX_RUN(condition, func, ...) \
...
...
modules/core/src/stat.cpp
View file @
1d62a025
...
...
@@ -2300,6 +2300,9 @@ static bool ocl_minMaxIdx( InputArray _src, double* minVal, double* maxVal, int*
#endif
#ifdef HAVE_OPENVX
namespace
ovx
{
template
<>
inline
bool
skipSmallImages
<
VX_KERNEL_MINMAXLOC
>
(
int
w
,
int
h
)
{
return
w
*
h
<
3840
*
2160
;
}
}
static
bool
openvx_minMaxIdx
(
Mat
&
src
,
double
*
minVal
,
double
*
maxVal
,
int
*
minIdx
,
int
*
maxIdx
,
Mat
&
mask
)
{
int
stype
=
src
.
type
();
...
...
modules/features2d/src/fast.cpp
View file @
1d62a025
...
...
@@ -338,6 +338,9 @@ static bool ocl_FAST( InputArray _img, std::vector<KeyPoint>& keypoints,
#ifdef HAVE_OPENVX
namespace
ovx
{
template
<>
inline
bool
skipSmallImages
<
VX_KERNEL_FAST_CORNERS
>
(
int
w
,
int
h
)
{
return
w
*
h
<
800
*
600
;
}
}
static
bool
openvx_FAST
(
InputArray
_img
,
std
::
vector
<
KeyPoint
>&
keypoints
,
int
_threshold
,
bool
nonmaxSuppression
,
int
type
)
{
...
...
modules/imgproc/src/accum.cpp
View file @
1d62a025
...
...
@@ -1942,6 +1942,9 @@ enum
VX_ACCUMULATE_WEIGHTED_OP
=
2
};
namespace
ovx
{
template
<>
inline
bool
skipSmallImages
<
VX_KERNEL_ACCUMULATE
>
(
int
w
,
int
h
)
{
return
w
*
h
<
120
*
60
;
}
}
static
bool
openvx_accumulate
(
InputArray
_src
,
InputOutputArray
_dst
,
InputArray
_mask
,
double
_weight
,
int
opType
)
{
Mat
srcMat
=
_src
.
getMat
(),
dstMat
=
_dst
.
getMat
();
...
...
modules/imgproc/src/canny.cpp
View file @
1d62a025
...
...
@@ -778,6 +778,9 @@ private:
};
#ifdef HAVE_OPENVX
namespace
ovx
{
template
<>
inline
bool
skipSmallImages
<
VX_KERNEL_CANNY_EDGE_DETECTOR
>
(
int
w
,
int
h
)
{
return
w
*
h
<
640
*
480
;
}
}
static
bool
openvx_canny
(
const
Mat
&
src
,
Mat
&
dst
,
int
loVal
,
int
hiVal
,
int
kSize
,
bool
useL2
)
{
using
namespace
ivx
;
...
...
modules/imgproc/src/deriv.cpp
View file @
1d62a025
...
...
@@ -184,6 +184,9 @@ cv::Ptr<cv::FilterEngine> cv::createDerivFilter(int srcType, int dstType,
#ifdef HAVE_OPENVX
namespace
cv
{
namespace
ovx
{
template
<>
inline
bool
skipSmallImages
<
VX_KERNEL_SOBEL_3x3
>
(
int
w
,
int
h
)
{
return
w
*
h
<
320
*
240
;
}
}
static
bool
openvx_sobel
(
InputArray
_src
,
OutputArray
_dst
,
int
dx
,
int
dy
,
int
ksize
,
double
scale
,
double
delta
,
int
borderType
)
...
...
modules/imgproc/src/histogram.cpp
View file @
1d62a025
...
...
@@ -1267,6 +1267,9 @@ private:
#ifdef HAVE_OPENVX
namespace
cv
{
namespace
ovx
{
template
<>
inline
bool
skipSmallImages
<
VX_KERNEL_HISTOGRAM
>
(
int
w
,
int
h
)
{
return
w
*
h
<
2048
*
1536
;
}
}
static
bool
openvx_calchist
(
const
Mat
&
image
,
OutputArray
_hist
,
const
int
histSize
,
const
float
*
_range
)
{
...
...
modules/imgproc/src/smooth.cpp
View file @
1d62a025
...
...
@@ -1639,6 +1639,9 @@ cv::Ptr<cv::FilterEngine> cv::createBoxFilter( int srcType, int dstType, Size ks
#ifdef HAVE_OPENVX
namespace
cv
{
namespace
ovx
{
template
<>
inline
bool
skipSmallImages
<
VX_KERNEL_BOX_3x3
>
(
int
w
,
int
h
)
{
return
w
*
h
<
640
*
480
;
}
}
static
bool
openvx_boxfilter
(
InputArray
_src
,
OutputArray
_dst
,
int
ddepth
,
Size
ksize
,
Point
anchor
,
bool
normalize
,
int
borderType
)
...
...
@@ -2172,6 +2175,9 @@ static bool ocl_GaussianBlur_8UC1(InputArray _src, OutputArray _dst, Size ksize,
#ifdef HAVE_OPENVX
namespace
ovx
{
template
<>
inline
bool
skipSmallImages
<
VX_KERNEL_GAUSSIAN_3x3
>
(
int
w
,
int
h
)
{
return
w
*
h
<
320
*
240
;
}
}
static
bool
openvx_gaussianBlur
(
InputArray
_src
,
OutputArray
_dst
,
Size
ksize
,
double
sigma1
,
double
sigma2
,
int
borderType
)
{
...
...
@@ -3302,6 +3308,9 @@ static bool ocl_medianFilter(InputArray _src, OutputArray _dst, int m)
#ifdef HAVE_OPENVX
namespace
cv
{
namespace
ovx
{
template
<>
inline
bool
skipSmallImages
<
VX_KERNEL_MEDIAN_3x3
>
(
int
w
,
int
h
)
{
return
w
*
h
<
1280
*
720
;
}
}
static
bool
openvx_medianFilter
(
InputArray
_src
,
OutputArray
_dst
,
int
ksize
)
{
if
(
_src
.
type
()
!=
CV_8UC1
||
_dst
.
type
()
!=
CV_8U
...
...
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