Extended set of OpenVX HAL calls disabled for small images

pull/8455/head
Vitaly Tuzov 8 years ago
parent 62fab57c3e
commit bf5b7843e8
  1. 54
      3rdparty/openvx/hal/openvx_hal.cpp
  2. 10
      modules/core/include/opencv2/core/openvx/ovx_defs.hpp
  3. 5
      modules/core/src/convert.cpp
  4. 4
      modules/core/src/stat.cpp
  5. 3
      modules/features2d/src/fast.cpp
  6. 2
      modules/imgproc/src/accum.cpp
  7. 3
      modules/imgproc/src/canny.cpp
  8. 12
      modules/imgproc/src/deriv.cpp
  9. 3
      modules/imgproc/src/featureselect.cpp
  10. 5
      modules/imgproc/src/histogram.cpp
  11. 1
      modules/imgproc/src/imgwarp.cpp
  12. 3
      modules/imgproc/src/pyramids.cpp
  13. 29
      modules/imgproc/src/smooth.cpp
  14. 2
      modules/imgproc/src/thresh.cpp
  15. 3
      modules/video/src/lkpyramid.cpp

@ -81,26 +81,10 @@ inline bool dimTooBig(int size)
return false;
}
inline bool skipSmallImages(int w, int h, int kernel_id)
{
//OpenVX calls have essential overhead so it make sense to skip them for small images
switch (kernel_id)
{
case VX_KERNEL_MULTIPLY:
if (w*h < 640 * 480)
return true;
break;
case VX_KERNEL_COLOR_CONVERT:
if (w*h < 2048 * 1536)
return true;
break;
default:
if (w*h < 3840 * 2160)
return true;
break;
}
return false;
}
template <int kernel_id> inline bool skipSmallImages(int w, int h) { return w*h < 3840 * 2160; }
template <> inline bool skipSmallImages<VX_KERNEL_MULTIPLY>(int w, int h) { return w*h < 640 * 480; }
template <> inline bool skipSmallImages<VX_KERNEL_COLOR_CONVERT>(int w, int h) { return w*h < 2048 * 1536; }
inline void setConstantBorder(ivx::border_t &border, vx_uint8 val)
{
@ -147,7 +131,7 @@ public:
template <typename T> \
int ovx_hal_##hal_func(const T *a, size_t astep, const T *b, size_t bstep, T *c, size_t cstep, int w, int h) \
{ \
if(skipSmallImages(w, h, kernel_id)) \
if(skipSmallImages<kernel_id>(w, h)) \
return CV_HAL_ERROR_NOT_IMPLEMENTED; \
if(dimTooBig(w) || dimTooBig(h)) \
return CV_HAL_ERROR_NOT_IMPLEMENTED; \
@ -191,7 +175,7 @@ OVX_BINARY_OP(xor, { ivx::IVX_CHECK_STATUS(vxuXor(ctx, ia, ib, ic)); }, VX_KERNE
template <typename T>
int ovx_hal_mul(const T *a, size_t astep, const T *b, size_t bstep, T *c, size_t cstep, int w, int h, double scale)
{
if(skipSmallImages(w, h, VX_KERNEL_MULTIPLY))
if(skipSmallImages<VX_KERNEL_MULTIPLY>(w, h))
return CV_HAL_ERROR_NOT_IMPLEMENTED;
if (dimTooBig(w) || dimTooBig(h))
return CV_HAL_ERROR_NOT_IMPLEMENTED;
@ -259,7 +243,7 @@ template int ovx_hal_mul<short>(const short *a, size_t astep, const short *b, si
int ovx_hal_not(const uchar *a, size_t astep, uchar *c, size_t cstep, int w, int h)
{
if (skipSmallImages(w, h, VX_KERNEL_NOT))
if (skipSmallImages<VX_KERNEL_NOT>(w, h))
return CV_HAL_ERROR_NOT_IMPLEMENTED;
if (dimTooBig(w) || dimTooBig(h))
return CV_HAL_ERROR_NOT_IMPLEMENTED;
@ -290,7 +274,7 @@ int ovx_hal_not(const uchar *a, size_t astep, uchar *c, size_t cstep, int w, int
int ovx_hal_merge8u(const uchar **src_data, uchar *dst_data, int len, int cn)
{
if (skipSmallImages(len, 1, VX_KERNEL_CHANNEL_COMBINE))
if (skipSmallImages<VX_KERNEL_CHANNEL_COMBINE>(len, 1))
return CV_HAL_ERROR_NOT_IMPLEMENTED;
if (dimTooBig(len))
return CV_HAL_ERROR_NOT_IMPLEMENTED;
@ -328,7 +312,7 @@ int ovx_hal_merge8u(const uchar **src_data, uchar *dst_data, int len, int cn)
int ovx_hal_resize(int atype, const uchar *a, size_t astep, int aw, int ah, uchar *b, size_t bstep, int bw, int bh, double inv_scale_x, double inv_scale_y, int interpolation)
{
if (skipSmallImages(aw, ah, VX_KERNEL_SCALE_IMAGE))
if (skipSmallImages<VX_KERNEL_SCALE_IMAGE>(aw, ah))
return CV_HAL_ERROR_NOT_IMPLEMENTED;
if (dimTooBig(aw) || dimTooBig(ah) || dimTooBig(bw) || dimTooBig(bh))
return CV_HAL_ERROR_NOT_IMPLEMENTED;
@ -381,7 +365,7 @@ int ovx_hal_resize(int atype, const uchar *a, size_t astep, int aw, int ah, ucha
int ovx_hal_warpAffine(int atype, const uchar *a, size_t astep, int aw, int ah, uchar *b, size_t bstep, int bw, int bh, const double M[6], int interpolation, int borderType, const double borderValue[4])
{
if (skipSmallImages(aw, ah, VX_KERNEL_WARP_AFFINE))
if (skipSmallImages<VX_KERNEL_WARP_AFFINE>(aw, ah))
return CV_HAL_ERROR_NOT_IMPLEMENTED;
if (dimTooBig(aw) || dimTooBig(ah) || dimTooBig(bw) || dimTooBig(bh))
return CV_HAL_ERROR_NOT_IMPLEMENTED;
@ -443,7 +427,7 @@ int ovx_hal_warpAffine(int atype, const uchar *a, size_t astep, int aw, int ah,
int ovx_hal_warpPerspectve(int atype, const uchar *a, size_t astep, int aw, int ah, uchar *b, size_t bstep, int bw, int bh, const double M[9], int interpolation, int borderType, const double borderValue[4])
{
if (skipSmallImages(aw, ah, VX_KERNEL_WARP_PERSPECTIVE))
if (skipSmallImages<VX_KERNEL_WARP_PERSPECTIVE>(aw, ah))
return CV_HAL_ERROR_NOT_IMPLEMENTED;
if (dimTooBig(aw) || dimTooBig(ah) || dimTooBig(bw) || dimTooBig(bh))
return CV_HAL_ERROR_NOT_IMPLEMENTED;
@ -593,7 +577,7 @@ int ovx_hal_filterFree(cvhalFilter2D *filter_context)
int ovx_hal_filter(cvhalFilter2D *filter_context, uchar *a, size_t astep, uchar *b, size_t bstep, int w, int h, int, int, int, int)
{
if (skipSmallImages(w, h, VX_KERNEL_CUSTOM_CONVOLUTION))
if (skipSmallImages<VX_KERNEL_CUSTOM_CONVOLUTION>(w, h))
return CV_HAL_ERROR_NOT_IMPLEMENTED;
if (dimTooBig(w) || dimTooBig(h))
return CV_HAL_ERROR_NOT_IMPLEMENTED;
@ -819,7 +803,7 @@ int ovx_hal_morphFree(cvhalFilter2D *filter_context)
int ovx_hal_morph(cvhalFilter2D *filter_context, uchar *a, size_t astep, uchar *b, size_t bstep, int w, int h, int, int, int, int, int, int, int, int)
{
if (skipSmallImages(w, h, VX_KERNEL_DILATE_3x3))//Actually it make sense to separate checks if implementations of dilation and erosion have different performance gain
if (skipSmallImages<VX_KERNEL_DILATE_3x3>(w, h))//Actually it make sense to separate checks if implementations of dilation and erosion have different performance gain
return CV_HAL_ERROR_NOT_IMPLEMENTED;
if (dimTooBig(w) || dimTooBig(h))
return CV_HAL_ERROR_NOT_IMPLEMENTED;
@ -862,7 +846,7 @@ int ovx_hal_morph(cvhalFilter2D *filter_context, uchar *a, size_t astep, uchar *
int ovx_hal_cvtBGRtoBGR(const uchar * a, size_t astep, uchar * b, size_t bstep, int w, int h, int depth, int acn, int bcn, bool swapBlue)
{
if (skipSmallImages(w, h, VX_KERNEL_COLOR_CONVERT))
if (skipSmallImages<VX_KERNEL_COLOR_CONVERT>(w, h))
return CV_HAL_ERROR_NOT_IMPLEMENTED;
if (dimTooBig(w) || dimTooBig(h))
return CV_HAL_ERROR_NOT_IMPLEMENTED;
@ -898,7 +882,7 @@ int ovx_hal_cvtBGRtoBGR(const uchar * a, size_t astep, uchar * b, size_t bstep,
int ovx_hal_cvtGraytoBGR(const uchar * a, size_t astep, uchar * b, size_t bstep, int w, int h, int depth, int bcn)
{
if (skipSmallImages(w, h, VX_KERNEL_CHANNEL_COMBINE))
if (skipSmallImages<VX_KERNEL_CHANNEL_COMBINE>(w, h))
return CV_HAL_ERROR_NOT_IMPLEMENTED;
if (dimTooBig(w) || dimTooBig(h))
return CV_HAL_ERROR_NOT_IMPLEMENTED;
@ -933,7 +917,7 @@ int ovx_hal_cvtGraytoBGR(const uchar * a, size_t astep, uchar * b, size_t bstep,
int ovx_hal_cvtTwoPlaneYUVtoBGR(const uchar * a, size_t astep, uchar * b, size_t bstep, int w, int h, int bcn, bool swapBlue, int uIdx)
{
if (skipSmallImages(w, h, VX_KERNEL_COLOR_CONVERT))
if (skipSmallImages<VX_KERNEL_COLOR_CONVERT>(w, h))
return CV_HAL_ERROR_NOT_IMPLEMENTED;
if (dimTooBig(w) || dimTooBig(h))
return CV_HAL_ERROR_NOT_IMPLEMENTED;
@ -979,7 +963,7 @@ int ovx_hal_cvtTwoPlaneYUVtoBGR(const uchar * a, size_t astep, uchar * b, size_t
int ovx_hal_cvtThreePlaneYUVtoBGR(const uchar * a, size_t astep, uchar * b, size_t bstep, int w, int h, int bcn, bool swapBlue, int uIdx)
{
if (skipSmallImages(w, h, VX_KERNEL_COLOR_CONVERT))
if (skipSmallImages<VX_KERNEL_COLOR_CONVERT>(w, h))
return CV_HAL_ERROR_NOT_IMPLEMENTED;
if (dimTooBig(w) || dimTooBig(h))
return CV_HAL_ERROR_NOT_IMPLEMENTED;
@ -1029,7 +1013,7 @@ int ovx_hal_cvtThreePlaneYUVtoBGR(const uchar * a, size_t astep, uchar * b, size
int ovx_hal_cvtBGRtoThreePlaneYUV(const uchar * a, size_t astep, uchar * b, size_t bstep, int w, int h, int acn, bool swapBlue, int uIdx)
{
if (skipSmallImages(w, h, VX_KERNEL_COLOR_CONVERT))
if (skipSmallImages<VX_KERNEL_COLOR_CONVERT>(w, h))
return CV_HAL_ERROR_NOT_IMPLEMENTED;
if (dimTooBig(w) || dimTooBig(h))
return CV_HAL_ERROR_NOT_IMPLEMENTED;
@ -1077,7 +1061,7 @@ int ovx_hal_cvtBGRtoThreePlaneYUV(const uchar * a, size_t astep, uchar * b, size
int ovx_hal_cvtOnePlaneYUVtoBGR(const uchar * a, size_t astep, uchar * b, size_t bstep, int w, int h, int bcn, bool swapBlue, int uIdx, int ycn)
{
if (skipSmallImages(w, h, VX_KERNEL_COLOR_CONVERT))
if (skipSmallImages<VX_KERNEL_COLOR_CONVERT>(w, h))
return CV_HAL_ERROR_NOT_IMPLEMENTED;
if (dimTooBig(w) || dimTooBig(h))
return CV_HAL_ERROR_NOT_IMPLEMENTED;
@ -1116,7 +1100,7 @@ int ovx_hal_cvtOnePlaneYUVtoBGR(const uchar * a, size_t astep, uchar * b, size_t
int ovx_hal_integral(int depth, int sdepth, int, const uchar * a, size_t astep, uchar * b, size_t bstep, uchar * c, size_t, uchar * d, size_t, int w, int h, int cn)
{
if (skipSmallImages(w, h, VX_KERNEL_INTEGRAL_IMAGE))
if (skipSmallImages<VX_KERNEL_INTEGRAL_IMAGE>(w, h))
return CV_HAL_ERROR_NOT_IMPLEMENTED;
if (depth != CV_8U || sdepth != CV_32S || c != NULL || d != NULL || cn != 1)
return CV_HAL_ERROR_NOT_IMPLEMENTED;

@ -24,6 +24,16 @@ namespace cv{
namespace ovx{
// Get common thread local OpenVX context
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 < 1280*720; }
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 < 1280 * 720; }
template <> inline bool skipSmallImages<VX_KERNEL_BOX_3x3>(int w, int h) { return w*h < 1280 * 720; }
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 < 640 * 480; }
template <> inline bool skipSmallImages<VX_KERNEL_CUSTOM_CONVOLUTION>(int w, int h) { return w*h < 1280 * 720; }
}}
#define CV_OVX_RUN(condition, func, ...) \

@ -4671,6 +4671,9 @@ static bool _openvx_cvt(const T* src, size_t sstep,
int srcType = DataType<T>::type, dstType = DataType<DT>::type;
if (ovx::skipSmallImages<VX_KERNEL_CONVERTDEPTH>(imgSize.width, imgSize.height))
return false;
try
{
Context context = ovx::getOpenVXContext();
@ -5696,7 +5699,7 @@ void cv::LUT( InputArray _src, InputArray _lut, OutputArray _dst )
_dst.create(src.dims, src.size, CV_MAKETYPE(_lut.depth(), cn));
Mat dst = _dst.getMat();
CV_OVX_RUN(true,
CV_OVX_RUN(!ovx::skipSmallImages<VX_KERNEL_TABLE_LOOKUP>(src.cols, src.rows),
openvx_LUT(src, dst, lut))
CV_IPP_RUN(_src.dims() <= 2, ipp_lut(src, lut, dst));

@ -1843,7 +1843,7 @@ void cv::meanStdDev( InputArray _src, OutputArray _mean, OutputArray _sdv, Input
Mat src = _src.getMat(), mask = _mask.getMat();
CV_Assert( mask.empty() || mask.type() == CV_8UC1 );
CV_OVX_RUN(true,
CV_OVX_RUN(!ovx::skipSmallImages<VX_KERNEL_MEAN_STDDEV>(src.cols, src.rows),
openvx_meanStdDev(src, _mean, _sdv, mask))
CV_IPP_RUN(IPP_VERSION_X100 >= 700, ipp_meanStdDev(src, _mean, _sdv, mask));
@ -2496,7 +2496,7 @@ void cv::minMaxIdx(InputArray _src, double* minVal,
Mat src = _src.getMat(), mask = _mask.getMat();
CV_OVX_RUN(true,
CV_OVX_RUN(!ovx::skipSmallImages<VX_KERNEL_MINMAXLOC>(src.cols, src.rows),
openvx_minMaxIdx(src, minVal, maxVal, minIdx, maxIdx, mask))
CV_IPP_RUN(IPP_VERSION_X100 >= 700, ipp_minMaxIdx(src, minVal, maxVal, minIdx, maxIdx, mask))

@ -352,6 +352,9 @@ static bool openvx_FAST(InputArray _img, std::vector<KeyPoint>& keypoints,
if(imgMat.empty() || imgMat.type() != CV_8UC1)
return false;
if (ovx::skipSmallImages<VX_KERNEL_FAST_CORNERS>(imgMat.cols, imgMat.rows))
return false;
try
{
Context context = ovx::getOpenVXContext();

@ -1945,6 +1945,8 @@ enum
static bool openvx_accumulate(InputArray _src, InputOutputArray _dst, InputArray _mask, double _weight, int opType)
{
Mat srcMat = _src.getMat(), dstMat = _dst.getMat();
if (ovx::skipSmallImages<VX_KERNEL_ACCUMULATE>(srcMat.cols, srcMat.rows))
return false;
if(!_mask.empty() ||
(opType == VX_ACCUMULATE_WEIGHTED_OP && dstMat.type() != CV_8UC1 ) ||
(opType != VX_ACCUMULATE_WEIGHTED_OP && dstMat.type() != CV_16SC1 ) ||

@ -868,7 +868,8 @@ void Canny( InputArray _src, OutputArray _dst,
src.type() == CV_8UC1 &&
!src.isSubmatrix() &&
src.cols >= aperture_size &&
src.rows >= aperture_size,
src.rows >= aperture_size &&
!ovx::skipSmallImages<VX_KERNEL_CANNY_EDGE_DETECTOR>(src.cols, src.rows),
openvx_canny(
src,
dst,

@ -191,7 +191,7 @@ namespace cv
int stype = _src.type();
int dtype = _dst.type();
if (stype != CV_8UC1 || (dtype != CV_16SC1 && dtype != CV_8UC1) ||
ksize < 3 || ksize % 2 != 1 || delta != 0.0)
ksize != 3 || delta != 0.0)//Restrict to 3x3 kernels since otherwise convolution would be slower than separable filter
return false;
Mat src = _src.getMat();
@ -200,6 +200,12 @@ namespace cv
if (src.cols < ksize || src.rows < ksize)
return false;
if (dtype == CV_16SC1 && ksize == 3 && ((dx | dy) == 1) && (dx + dy) == 1 ?
ovx::skipSmallImages<VX_KERNEL_SOBEL_3x3>(src.cols, src.rows) :
ovx::skipSmallImages<VX_KERNEL_CUSTOM_CONVOLUTION>(src.cols, src.rows)
)
return false;
int iscale = 1;
vx_uint32 cscale = 1;
if(scale != 1.0)
@ -237,8 +243,8 @@ namespace cv
try
{
ivx::Context ctx = ovx::getOpenVXContext();
if ((vx_size)ksize > ctx.convolutionMaxDimension())
return false;
//if ((vx_size)ksize > ctx.convolutionMaxDimension())
// return false;
Mat a;
if (dst.data != src.data)

@ -377,7 +377,8 @@ void cv::goodFeaturesToTrack( InputArray _image, OutputArray _corners,
}
// Disabled due to bad accuracy
CV_OVX_RUN(false && useHarrisDetector && _mask.empty(),
CV_OVX_RUN(false && useHarrisDetector && _mask.empty() &&
!ovx::skipSmallImages<VX_KERNEL_HARRIS_CORNERS>(image.cols, image.rows),
openvx_harris(image, _corners, maxCorners, qualityLevel, minDistance, blockSize, harrisK))
if( useHarrisDetector )

@ -1376,7 +1376,8 @@ void cv::calcHist( const Mat* images, int nimages, const int* channels,
images && histSize &&
nimages == 1 && images[0].type() == CV_8UC1 && dims == 1 && _mask.getMat().empty() &&
(!channels || channels[0] == 0) && !accumulate && uniform &&
ranges && ranges[0],
ranges && ranges[0] &&
!ovx::skipSmallImages<VX_KERNEL_HISTOGRAM>(images[0].cols, images[0].rows),
openvx_calchist(images[0], _hist, histSize[0], ranges[0]))
CV_IPP_RUN(nimages == 1 && images[0].type() == CV_8UC1 && dims == 1 && channels &&
@ -3817,7 +3818,7 @@ void cv::equalizeHist( InputArray _src, OutputArray _dst )
_dst.create( src.size(), src.type() );
Mat dst = _dst.getMat();
CV_OVX_RUN(true,
CV_OVX_RUN(!ovx::skipSmallImages<VX_KERNEL_EQUALIZE_HISTOGRAM>(src.cols, src.rows),
openvx_equalize_hist(src, dst))
Mutex histogramLockInstance;

@ -4935,6 +4935,7 @@ void cv::remap( InputArray _src, OutputArray _dst,
CV_OVX_RUN(
src.type() == CV_8UC1 && dst.type() == CV_8UC1 &&
!ovx::skipSmallImages<VX_KERNEL_REMAP>(src.cols, src.rows) &&
(borderType& ~BORDER_ISOLATED) == BORDER_CONSTANT &&
((map1.type() == CV_32FC2 && map2.empty() && map1.size == dst.size) ||
(map1.type() == CV_32FC1 && map2.type() == CV_32FC1 && map1.size == dst.size && map2.size == dst.size) ||

@ -1265,6 +1265,9 @@ static bool openvx_pyrDown( InputArray _src, OutputArray _dst, const Size& _dsz,
Mat srcMat = _src.getMat();
if (ovx::skipSmallImages<VX_KERNEL_HALFSCALE_GAUSSIAN>(srcMat.cols, srcMat.rows))
return false;
CV_Assert(!srcMat.empty());
Size ssize = _src.size();

@ -1649,11 +1649,17 @@ namespace cv
if (stype != CV_8UC1 || (ddepth != CV_8U && ddepth != CV_16S) ||
(anchor.x >= 0 && anchor.x != ksize.width / 2) ||
(anchor.y >= 0 && anchor.y != ksize.height / 2) ||
ksize.width % 2 != 1 || ksize.height % 2 != 1 ||
ksize.width < 3 || ksize.height < 3)
ksize.width != 3 || ksize.height != 3)
return false;
Mat src = _src.getMat();
if (ddepth == CV_8U && ksize.width == 3 && ksize.height == 3 && normalize ?
ovx::skipSmallImages<VX_KERNEL_BOX_3x3>(src.cols, src.rows) :
ovx::skipSmallImages<VX_KERNEL_CUSTOM_CONVOLUTION>(src.cols, src.rows)
)
return false;
_dst.create(src.size(), CV_MAKETYPE(ddepth, 1));
Mat dst = _dst.getMat();
@ -1678,8 +1684,8 @@ namespace cv
try
{
ivx::Context ctx = ovx::getOpenVXContext();
if ((vx_size)(ksize.width) > ctx.convolutionMaxDimension() || (vx_size)(ksize.height) > ctx.convolutionMaxDimension())
return false;
//if ((vx_size)(ksize.width) > ctx.convolutionMaxDimension() || (vx_size)(ksize.height) > ctx.convolutionMaxDimension())
// return false;
Mat a;
if (dst.data != src.data)
@ -2210,6 +2216,7 @@ static bool openvx_gaussianBlur(InputArray _src, OutputArray _dst, Size ksize,
if (stype != CV_8UC1 ||
ksize.width < 3 || ksize.height < 3 ||
ksize.width > 5 || ksize.height > 5 ||
ksize.width % 2 != 1 || ksize.height % 2 != 1)
return false;
@ -2219,6 +2226,12 @@ static bool openvx_gaussianBlur(InputArray _src, OutputArray _dst, Size ksize,
Mat src = _src.getMat();
Mat dst = _dst.getMat();
if (ksize.width == 3 && ksize.height == 3 && (sigma1 == 0.0 || (sigma1 - 0.8) < DBL_EPSILON) && (sigma2 == 0.0 || (sigma2 - 0.8) < DBL_EPSILON) ?
ovx::skipSmallImages<VX_KERNEL_GAUSSIAN_3x3>(src.cols, src.rows) :
ovx::skipSmallImages<VX_KERNEL_CUSTOM_CONVOLUTION>(src.cols, src.rows)
)
return false;
if (src.cols < ksize.width || src.rows < ksize.height)
return false;
@ -3359,6 +3372,14 @@ namespace cv
Mat src = _src.getMat();
Mat dst = _dst.getMat();
if (
#ifdef VX_VERSION_1_1
ksize != 3 ? ovx::skipSmallImages<VX_KERNEL_NON_LINEAR_FILTER>(src.cols, src.rows) :
#endif
ovx::skipSmallImages<VX_KERNEL_MEDIAN_3x3>(src.cols, src.rows)
)
return false;
try
{
ivx::Context ctx = ovx::getOpenVXContext();

@ -1390,7 +1390,7 @@ double cv::threshold( InputArray _src, OutputArray _dst, double thresh, double m
return thresh;
}
CV_OVX_RUN(true,
CV_OVX_RUN(!ovx::skipSmallImages<VX_KERNEL_THRESHOLD>(src.cols, src.rows),
openvx_threshold(src, dst, ithresh, imaxval, type), (double)ithresh)
thresh = ithresh;

@ -1074,6 +1074,9 @@ namespace
if(prevImgMat.type() != CV_8UC1 || nextImgMat.type() != CV_8UC1)
return false;
if (ovx::skipSmallImages<VX_KERNEL_OPTICAL_FLOW_PYR_LK>(prevImgMat.cols, prevImgMat.rows))
return false;
CV_Assert(prevImgMat.size() == nextImgMat.size());
Mat prevPtsMat = _prevPts.getMat();
int checkPrev = prevPtsMat.checkVector(2, CV_32F, false);

Loading…
Cancel
Save