Skip to content

Commit 73ac532

Browse files
author
elenagvo
committed
fix threshold HAL
1 parent 762138e commit 73ac532

File tree

2 files changed

+8
-5
lines changed

2 files changed

+8
-5
lines changed

modules/imgproc/src/hal_replacement.hpp

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -652,14 +652,16 @@ inline int hal_ni_adaptiveThreshold(const uchar* src_data, size_t src_step, ucha
652652
@param src_data,src_step Source image
653653
@param dst_data,dst_step Destination image
654654
@param width,height Source image dimensions
655+
@param depth Depths of source and destination image
656+
@param cn Number of channels
655657
@param thresh Threshold value
656658
@param maxValue Value assigned to the pixels for which the condition is satisfied
657659
@param thresholdType Thresholding type
658660
*/
659-
inline int hal_ni_thresholdBin8u(const uchar* src_data, size_t src_step, uchar* dst_data, size_t dst_step, int width, int height, double thresh, double maxValue, int thresholdType) { return CV_HAL_ERROR_NOT_IMPLEMENTED; }
661+
inline int hal_ni_threshold(const uchar* src_data, size_t src_step, uchar* dst_data, size_t dst_step, int width, int height, int depth, int cn, double thresh, double maxValue, int thresholdType) { return CV_HAL_ERROR_NOT_IMPLEMENTED; }
660662

661663
//! @cond IGNORED
662-
#define cv_hal_thresholdBin8u hal_ni_thresholdBin8u
664+
#define cv_hal_threshold hal_ni_threshold
663665
//! @endcond
664666

665667
//! @}

modules/imgproc/src/thresh.cpp

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -141,9 +141,6 @@ thresh_8u( const Mat& _src, Mat& _dst, uchar thresh, uchar maxval, int type )
141141
return;
142142
#endif
143143

144-
CALL_HAL(thresholdBin, cv_hal_thresholdBin8u, _src.data, src_step, _dst.data, dst_step, roi.width, roi.height,
145-
thresh, maxval, type);
146-
147144
#if defined(HAVE_IPP)
148145
CV_IPP_CHECK()
149146
{
@@ -1217,6 +1214,10 @@ class ThresholdRunner : public ParallelLoopBody
12171214
Mat srcStripe = src.rowRange(row0, row1);
12181215
Mat dstStripe = dst.rowRange(row0, row1);
12191216

1217+
CALL_HAL(threshold, cv_hal_threshold, srcStripe.data, srcStripe.step, dstStripe.data, dstStripe.step,
1218+
srcStripe.cols, srcStripe.rows, srcStripe.depth(), srcStripe.channels(),
1219+
thresh, maxval, thresholdType);
1220+
12201221
if (srcStripe.depth() == CV_8U)
12211222
{
12221223
thresh_8u( srcStripe, dstStripe, (uchar)thresh, (uchar)maxval, thresholdType );

0 commit comments

Comments
 (0)