Skip to content

Commit ee257ff

Browse files
committed
Merge pull request opencv#8455 from terfendail:ovxhal_skipsmall
2 parents d962b3f + 1d62a02 commit ee257ff

File tree

16 files changed

+155
-144
lines changed

16 files changed

+155
-144
lines changed

3rdparty/openvx/hal/openvx_hal.cpp

Lines changed: 51 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,15 @@ inline bool dimTooBig(int size)
8181
return false;
8282
}
8383

84+
//OpenVX calls have essential overhead so it make sense to skip them for small images
85+
template <int kernel_id> inline bool skipSmallImages(int w, int h) { return w*h < 7680 * 4320; }
86+
template <> inline bool skipSmallImages<VX_KERNEL_MULTIPLY>(int w, int h) { return w*h < 640 * 480; }
87+
template <> inline bool skipSmallImages<VX_KERNEL_COLOR_CONVERT>(int w, int h) { return w*h < 2048 * 1536; }
88+
template <> inline bool skipSmallImages<VX_KERNEL_INTEGRAL_IMAGE>(int w, int h) { return w*h < 640 * 480; }
89+
template <> inline bool skipSmallImages<VX_KERNEL_WARP_AFFINE>(int w, int h) { return w*h < 1280 * 720; }
90+
template <> inline bool skipSmallImages<VX_KERNEL_WARP_PERSPECTIVE>(int w, int h) { return w*h < 320 * 240; }
91+
template <> inline bool skipSmallImages<VX_KERNEL_CUSTOM_CONVOLUTION>(int w, int h) { return w*h < 320 * 240; }
92+
8493
inline void setConstantBorder(ivx::border_t &border, vx_uint8 val)
8594
{
8695
border.mode = VX_BORDER_CONSTANT;
@@ -122,10 +131,12 @@ class vxImage: public ivx::Image
122131
// real code starts here
123132
// ...
124133

125-
#define OVX_BINARY_OP(hal_func, ovx_call) \
134+
#define OVX_BINARY_OP(hal_func, ovx_call, kernel_id) \
126135
template <typename T> \
127136
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) \
128137
{ \
138+
if(skipSmallImages<kernel_id>(w, h)) \
139+
return CV_HAL_ERROR_NOT_IMPLEMENTED; \
129140
if(dimTooBig(w) || dimTooBig(h)) \
130141
return CV_HAL_ERROR_NOT_IMPLEMENTED; \
131142
refineStep(w, h, ivx::TypeToEnum<T>::imgType, astep); \
@@ -156,18 +167,22 @@ int ovx_hal_##hal_func(const T *a, size_t astep, const T *b, size_t bstep, T *c,
156167
return CV_HAL_ERROR_OK; \
157168
}
158169

159-
OVX_BINARY_OP(add, { ivx::IVX_CHECK_STATUS(vxuAdd(ctx, ia, ib, VX_CONVERT_POLICY_SATURATE, ic)); })
160-
OVX_BINARY_OP(sub, { ivx::IVX_CHECK_STATUS(vxuSubtract(ctx, ia, ib, VX_CONVERT_POLICY_SATURATE, ic)); })
170+
OVX_BINARY_OP(add, { ivx::IVX_CHECK_STATUS(vxuAdd(ctx, ia, ib, VX_CONVERT_POLICY_SATURATE, ic)); }, VX_KERNEL_ADD)
171+
OVX_BINARY_OP(sub, { ivx::IVX_CHECK_STATUS(vxuSubtract(ctx, ia, ib, VX_CONVERT_POLICY_SATURATE, ic)); }, VX_KERNEL_SUBTRACT)
161172

162-
OVX_BINARY_OP(absdiff, { ivx::IVX_CHECK_STATUS(vxuAbsDiff(ctx, ia, ib, ic)); })
173+
OVX_BINARY_OP(absdiff, { ivx::IVX_CHECK_STATUS(vxuAbsDiff(ctx, ia, ib, ic)); }, VX_KERNEL_ABSDIFF)
163174

164-
OVX_BINARY_OP(and, { ivx::IVX_CHECK_STATUS(vxuAnd(ctx, ia, ib, ic)); })
165-
OVX_BINARY_OP(or , { ivx::IVX_CHECK_STATUS(vxuOr(ctx, ia, ib, ic)); })
166-
OVX_BINARY_OP(xor, { ivx::IVX_CHECK_STATUS(vxuXor(ctx, ia, ib, ic)); })
175+
OVX_BINARY_OP(and, { ivx::IVX_CHECK_STATUS(vxuAnd(ctx, ia, ib, ic)); }, VX_KERNEL_AND)
176+
OVX_BINARY_OP(or , { ivx::IVX_CHECK_STATUS(vxuOr(ctx, ia, ib, ic)); }, VX_KERNEL_OR)
177+
OVX_BINARY_OP(xor, { ivx::IVX_CHECK_STATUS(vxuXor(ctx, ia, ib, ic)); }, VX_KERNEL_XOR)
167178

168179
template <typename T>
169180
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)
170181
{
182+
if(scale == 1.0 || sizeof(T) > 1 ?
183+
skipSmallImages<VX_KERNEL_ADD>(w, h) : /*actually it could be any kernel with generic minimum size*/
184+
skipSmallImages<VX_KERNEL_MULTIPLY>(w, h) )
185+
return CV_HAL_ERROR_NOT_IMPLEMENTED;
171186
if (dimTooBig(w) || dimTooBig(h))
172187
return CV_HAL_ERROR_NOT_IMPLEMENTED;
173188
refineStep(w, h, ivx::TypeToEnum<T>::imgType, astep);
@@ -234,6 +249,8 @@ template int ovx_hal_mul<short>(const short *a, size_t astep, const short *b, si
234249

235250
int ovx_hal_not(const uchar *a, size_t astep, uchar *c, size_t cstep, int w, int h)
236251
{
252+
if (skipSmallImages<VX_KERNEL_NOT>(w, h))
253+
return CV_HAL_ERROR_NOT_IMPLEMENTED;
237254
if (dimTooBig(w) || dimTooBig(h))
238255
return CV_HAL_ERROR_NOT_IMPLEMENTED;
239256
refineStep(w, h, VX_DF_IMAGE_U8, astep);
@@ -263,6 +280,8 @@ int ovx_hal_not(const uchar *a, size_t astep, uchar *c, size_t cstep, int w, int
263280

264281
int ovx_hal_merge8u(const uchar **src_data, uchar *dst_data, int len, int cn)
265282
{
283+
if (skipSmallImages<VX_KERNEL_CHANNEL_COMBINE>(len, 1))
284+
return CV_HAL_ERROR_NOT_IMPLEMENTED;
266285
if (dimTooBig(len))
267286
return CV_HAL_ERROR_NOT_IMPLEMENTED;
268287
if (cn != 3 && cn != 4)
@@ -299,6 +318,8 @@ int ovx_hal_merge8u(const uchar **src_data, uchar *dst_data, int len, int cn)
299318

300319
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)
301320
{
321+
if (skipSmallImages<VX_KERNEL_SCALE_IMAGE>(aw, ah))
322+
return CV_HAL_ERROR_NOT_IMPLEMENTED;
302323
if (dimTooBig(aw) || dimTooBig(ah) || dimTooBig(bw) || dimTooBig(bh))
303324
return CV_HAL_ERROR_NOT_IMPLEMENTED;
304325
refineStep(aw, ah, VX_DF_IMAGE_U8, astep);
@@ -350,6 +371,8 @@ int ovx_hal_resize(int atype, const uchar *a, size_t astep, int aw, int ah, ucha
350371

351372
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])
352373
{
374+
if (skipSmallImages<VX_KERNEL_WARP_AFFINE>(aw, ah))
375+
return CV_HAL_ERROR_NOT_IMPLEMENTED;
353376
if (dimTooBig(aw) || dimTooBig(ah) || dimTooBig(bw) || dimTooBig(bh))
354377
return CV_HAL_ERROR_NOT_IMPLEMENTED;
355378
refineStep(aw, ah, VX_DF_IMAGE_U8, astep);
@@ -410,6 +433,8 @@ int ovx_hal_warpAffine(int atype, const uchar *a, size_t astep, int aw, int ah,
410433

411434
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])
412435
{
436+
if (skipSmallImages<VX_KERNEL_WARP_PERSPECTIVE>(aw, ah))
437+
return CV_HAL_ERROR_NOT_IMPLEMENTED;
413438
if (dimTooBig(aw) || dimTooBig(ah) || dimTooBig(bw) || dimTooBig(bh))
414439
return CV_HAL_ERROR_NOT_IMPLEMENTED;
415440
refineStep(aw, ah, VX_DF_IMAGE_U8, astep);
@@ -531,6 +556,7 @@ int ovx_hal_filterInit(cvhalFilter2D **filter_context, uchar *kernel_data, size_
531556
for (int i = 0; i < kernel_width; ++i)
532557
data.push_back(row[i]);
533558
}
559+
break;
534560
default:
535561
return CV_HAL_ERROR_NOT_IMPLEMENTED;
536562
}
@@ -558,6 +584,8 @@ int ovx_hal_filterFree(cvhalFilter2D *filter_context)
558584

559585
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)
560586
{
587+
if (skipSmallImages<VX_KERNEL_CUSTOM_CONVOLUTION>(w, h))
588+
return CV_HAL_ERROR_NOT_IMPLEMENTED;
561589
if (dimTooBig(w) || dimTooBig(h))
562590
return CV_HAL_ERROR_NOT_IMPLEMENTED;
563591
try
@@ -782,6 +810,8 @@ int ovx_hal_morphFree(cvhalFilter2D *filter_context)
782810

783811
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)
784812
{
813+
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
814+
return CV_HAL_ERROR_NOT_IMPLEMENTED;
785815
if (dimTooBig(w) || dimTooBig(h))
786816
return CV_HAL_ERROR_NOT_IMPLEMENTED;
787817
refineStep(w, h, VX_DF_IMAGE_U8, astep);
@@ -823,6 +853,8 @@ int ovx_hal_morph(cvhalFilter2D *filter_context, uchar *a, size_t astep, uchar *
823853

824854
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)
825855
{
856+
if (skipSmallImages<VX_KERNEL_COLOR_CONVERT>(w, h))
857+
return CV_HAL_ERROR_NOT_IMPLEMENTED;
826858
if (dimTooBig(w) || dimTooBig(h))
827859
return CV_HAL_ERROR_NOT_IMPLEMENTED;
828860
if (depth != CV_8U || swapBlue || acn == bcn || (acn != 3 && acn != 4) || (bcn != 3 && bcn != 4))
@@ -857,6 +889,8 @@ int ovx_hal_cvtBGRtoBGR(const uchar * a, size_t astep, uchar * b, size_t bstep,
857889

858890
int ovx_hal_cvtGraytoBGR(const uchar * a, size_t astep, uchar * b, size_t bstep, int w, int h, int depth, int bcn)
859891
{
892+
if (skipSmallImages<VX_KERNEL_CHANNEL_COMBINE>(w, h))
893+
return CV_HAL_ERROR_NOT_IMPLEMENTED;
860894
if (dimTooBig(w) || dimTooBig(h))
861895
return CV_HAL_ERROR_NOT_IMPLEMENTED;
862896
if (depth != CV_8U || (bcn != 3 && bcn != 4))
@@ -890,6 +924,8 @@ int ovx_hal_cvtGraytoBGR(const uchar * a, size_t astep, uchar * b, size_t bstep,
890924

891925
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)
892926
{
927+
if (skipSmallImages<VX_KERNEL_COLOR_CONVERT>(w, h))
928+
return CV_HAL_ERROR_NOT_IMPLEMENTED;
893929
if (dimTooBig(w) || dimTooBig(h))
894930
return CV_HAL_ERROR_NOT_IMPLEMENTED;
895931
if (!swapBlue || (bcn != 3 && bcn != 4))
@@ -934,6 +970,8 @@ int ovx_hal_cvtTwoPlaneYUVtoBGR(const uchar * a, size_t astep, uchar * b, size_t
934970

935971
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)
936972
{
973+
if (skipSmallImages<VX_KERNEL_COLOR_CONVERT>(w, h))
974+
return CV_HAL_ERROR_NOT_IMPLEMENTED;
937975
if (dimTooBig(w) || dimTooBig(h))
938976
return CV_HAL_ERROR_NOT_IMPLEMENTED;
939977
if (!swapBlue || (bcn != 3 && bcn != 4) || uIdx || (size_t)w / 2 != astep - (size_t)w / 2)
@@ -982,6 +1020,8 @@ int ovx_hal_cvtThreePlaneYUVtoBGR(const uchar * a, size_t astep, uchar * b, size
9821020

9831021
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)
9841022
{
1023+
if (skipSmallImages<VX_KERNEL_COLOR_CONVERT>(w, h))
1024+
return CV_HAL_ERROR_NOT_IMPLEMENTED;
9851025
if (dimTooBig(w) || dimTooBig(h))
9861026
return CV_HAL_ERROR_NOT_IMPLEMENTED;
9871027
if (!swapBlue || (acn != 3 && acn != 4) || uIdx || (size_t)w / 2 != bstep - (size_t)w / 2)
@@ -1028,6 +1068,8 @@ int ovx_hal_cvtBGRtoThreePlaneYUV(const uchar * a, size_t astep, uchar * b, size
10281068

10291069
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)
10301070
{
1071+
if (skipSmallImages<VX_KERNEL_COLOR_CONVERT>(w, h))
1072+
return CV_HAL_ERROR_NOT_IMPLEMENTED;
10311073
if (dimTooBig(w) || dimTooBig(h))
10321074
return CV_HAL_ERROR_NOT_IMPLEMENTED;
10331075
if (!swapBlue || (bcn != 3 && bcn != 4) || uIdx)
@@ -1065,6 +1107,8 @@ int ovx_hal_cvtOnePlaneYUVtoBGR(const uchar * a, size_t astep, uchar * b, size_t
10651107

10661108
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)
10671109
{
1110+
if (skipSmallImages<VX_KERNEL_INTEGRAL_IMAGE>(w, h))
1111+
return CV_HAL_ERROR_NOT_IMPLEMENTED;
10681112
if (depth != CV_8U || sdepth != CV_32S || c != NULL || d != NULL || cn != 1)
10691113
return CV_HAL_ERROR_NOT_IMPLEMENTED;
10701114
refineStep(w, h, VX_DF_IMAGE_U8, astep);

3rdparty/openvx/hal/openvx_hal.hpp

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -106,12 +106,12 @@ int ovx_hal_integral(int depth, int sdepth, int, const uchar * a, size_t astep,
106106
#undef cv_hal_filterFree
107107
#define cv_hal_filterFree ovx_hal_filterFree
108108

109-
#undef cv_hal_sepFilterInit
110-
#define cv_hal_sepFilterInit ovx_hal_sepFilterInit
111-
#undef cv_hal_sepFilter
112-
#define cv_hal_sepFilter ovx_hal_filter
113-
#undef cv_hal_sepFilterFree
114-
#define cv_hal_sepFilterFree ovx_hal_filterFree
109+
//#undef cv_hal_sepFilterInit
110+
//#define cv_hal_sepFilterInit ovx_hal_sepFilterInit
111+
//#undef cv_hal_sepFilter
112+
//#define cv_hal_sepFilter ovx_hal_filter
113+
//#undef cv_hal_sepFilterFree
114+
//#define cv_hal_sepFilterFree ovx_hal_filterFree
115115

116116
#if VX_VERSION > VX_VERSION_1_0
117117

modules/core/include/opencv2/core/openvx/ovx_defs.hpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,8 @@ namespace cv{
2424
namespace ovx{
2525
// Get common thread local OpenVX context
2626
CV_EXPORTS_W ivx::Context& getOpenVXContext();
27+
28+
template <int kernel_id> inline bool skipSmallImages(int w, int h) { return w*h < 3840 * 2160; }
2729
}}
2830

2931
#define CV_OVX_RUN(condition, func, ...) \

modules/core/src/convert.cpp

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4862,6 +4862,9 @@ static bool _openvx_cvt(const T* src, size_t sstep,
48624862

48634863
int srcType = DataType<T>::type, dstType = DataType<DT>::type;
48644864

4865+
if (ovx::skipSmallImages<VX_KERNEL_CONVERTDEPTH>(imgSize.width, imgSize.height))
4866+
return false;
4867+
48654868
try
48664869
{
48674870
Context context = ovx::getOpenVXContext();
@@ -5964,7 +5967,7 @@ void cv::LUT( InputArray _src, InputArray _lut, OutputArray _dst )
59645967
_dst.create(src.dims, src.size, CV_MAKETYPE(_lut.depth(), cn));
59655968
Mat dst = _dst.getMat();
59665969

5967-
CV_OVX_RUN(true,
5970+
CV_OVX_RUN(!ovx::skipSmallImages<VX_KERNEL_TABLE_LOOKUP>(src.cols, src.rows),
59685971
openvx_LUT(src, dst, lut))
59695972

59705973
#if !IPP_DISABLE_PERF_LUT

modules/core/src/stat.cpp

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1865,7 +1865,7 @@ void cv::meanStdDev( InputArray _src, OutputArray _mean, OutputArray _sdv, Input
18651865
Mat src = _src.getMat(), mask = _mask.getMat();
18661866
CV_Assert( mask.empty() || mask.type() == CV_8UC1 );
18671867

1868-
CV_OVX_RUN(true,
1868+
CV_OVX_RUN(!ovx::skipSmallImages<VX_KERNEL_MEAN_STDDEV>(src.cols, src.rows),
18691869
openvx_meanStdDev(src, _mean, _sdv, mask))
18701870

18711871
CV_IPP_RUN(IPP_VERSION_X100 >= 700, ipp_meanStdDev(src, _mean, _sdv, mask));
@@ -2322,6 +2322,9 @@ static bool ocl_minMaxIdx( InputArray _src, double* minVal, double* maxVal, int*
23222322
#endif
23232323

23242324
#ifdef HAVE_OPENVX
2325+
namespace ovx {
2326+
template <> inline bool skipSmallImages<VX_KERNEL_MINMAXLOC>(int w, int h) { return w*h < 3840 * 2160; }
2327+
}
23252328
static bool openvx_minMaxIdx(Mat &src, double* minVal, double* maxVal, int* minIdx, int* maxIdx, Mat &mask)
23262329
{
23272330
int stype = src.type();
@@ -2682,7 +2685,7 @@ void cv::minMaxIdx(InputArray _src, double* minVal,
26822685

26832686
Mat src = _src.getMat(), mask = _mask.getMat();
26842687

2685-
CV_OVX_RUN(true,
2688+
CV_OVX_RUN(!ovx::skipSmallImages<VX_KERNEL_MINMAXLOC>(src.cols, src.rows),
26862689
openvx_minMaxIdx(src, minVal, maxVal, minIdx, maxIdx, mask))
26872690

26882691
CV_IPP_RUN_FAST(ipp_minMaxIdx(src, minVal, maxVal, minIdx, maxIdx, mask))

modules/features2d/src/fast.cpp

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -338,6 +338,9 @@ static bool ocl_FAST( InputArray _img, std::vector<KeyPoint>& keypoints,
338338

339339

340340
#ifdef HAVE_OPENVX
341+
namespace ovx {
342+
template <> inline bool skipSmallImages<VX_KERNEL_FAST_CORNERS>(int w, int h) { return w*h < 800 * 600; }
343+
}
341344
static bool openvx_FAST(InputArray _img, std::vector<KeyPoint>& keypoints,
342345
int _threshold, bool nonmaxSuppression, int type)
343346
{
@@ -352,6 +355,9 @@ static bool openvx_FAST(InputArray _img, std::vector<KeyPoint>& keypoints,
352355
if(imgMat.empty() || imgMat.type() != CV_8UC1)
353356
return false;
354357

358+
if (ovx::skipSmallImages<VX_KERNEL_FAST_CORNERS>(imgMat.cols, imgMat.rows))
359+
return false;
360+
355361
try
356362
{
357363
Context context = ovx::getOpenVXContext();

modules/imgproc/src/accum.cpp

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1942,9 +1942,14 @@ enum
19421942
VX_ACCUMULATE_WEIGHTED_OP = 2
19431943
};
19441944

1945+
namespace ovx {
1946+
template <> inline bool skipSmallImages<VX_KERNEL_ACCUMULATE>(int w, int h) { return w*h < 120 * 60; }
1947+
}
19451948
static bool openvx_accumulate(InputArray _src, InputOutputArray _dst, InputArray _mask, double _weight, int opType)
19461949
{
19471950
Mat srcMat = _src.getMat(), dstMat = _dst.getMat();
1951+
if (ovx::skipSmallImages<VX_KERNEL_ACCUMULATE>(srcMat.cols, srcMat.rows))
1952+
return false;
19481953
if(!_mask.empty() ||
19491954
(opType == VX_ACCUMULATE_WEIGHTED_OP && dstMat.type() != CV_8UC1 ) ||
19501955
(opType != VX_ACCUMULATE_WEIGHTED_OP && dstMat.type() != CV_16SC1 ) ||

modules/imgproc/src/canny.cpp

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -899,6 +899,9 @@ class finalPass : public ParallelLoopBody
899899
};
900900

901901
#ifdef HAVE_OPENVX
902+
namespace ovx {
903+
template <> inline bool skipSmallImages<VX_KERNEL_CANNY_EDGE_DETECTOR>(int w, int h) { return w*h < 640 * 480; }
904+
}
902905
static bool openvx_canny(const Mat& src, Mat& dst, int loVal, int hiVal, int kSize, bool useL2)
903906
{
904907
using namespace ivx;
@@ -989,7 +992,8 @@ void Canny( InputArray _src, OutputArray _dst,
989992
src.type() == CV_8UC1 &&
990993
!src.isSubmatrix() &&
991994
src.cols >= aperture_size &&
992-
src.rows >= aperture_size,
995+
src.rows >= aperture_size &&
996+
!ovx::skipSmallImages<VX_KERNEL_CANNY_EDGE_DETECTOR>(src.cols, src.rows),
993997
openvx_canny(
994998
src,
995999
dst,

0 commit comments

Comments
 (0)