fix threshold HAL

pull/10171/head
elenagvo 7 years ago
parent 762138e77e
commit 73ac5321f5
  1. 6
      modules/imgproc/src/hal_replacement.hpp
  2. 7
      modules/imgproc/src/thresh.cpp

@ -652,14 +652,16 @@ inline int hal_ni_adaptiveThreshold(const uchar* src_data, size_t src_step, ucha
@param src_data,src_step Source image
@param dst_data,dst_step Destination image
@param width,height Source image dimensions
@param depth Depths of source and destination image
@param cn Number of channels
@param thresh Threshold value
@param maxValue Value assigned to the pixels for which the condition is satisfied
@param thresholdType Thresholding type
*/
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; }
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; }
//! @cond IGNORED
#define cv_hal_thresholdBin8u hal_ni_thresholdBin8u
#define cv_hal_threshold hal_ni_threshold
//! @endcond
//! @}

@ -141,9 +141,6 @@ thresh_8u( const Mat& _src, Mat& _dst, uchar thresh, uchar maxval, int type )
return;
#endif
CALL_HAL(thresholdBin, cv_hal_thresholdBin8u, _src.data, src_step, _dst.data, dst_step, roi.width, roi.height,
thresh, maxval, type);
#if defined(HAVE_IPP)
CV_IPP_CHECK()
{
@ -1217,6 +1214,10 @@ public:
Mat srcStripe = src.rowRange(row0, row1);
Mat dstStripe = dst.rowRange(row0, row1);
CALL_HAL(threshold, cv_hal_threshold, srcStripe.data, srcStripe.step, dstStripe.data, dstStripe.step,
srcStripe.cols, srcStripe.rows, srcStripe.depth(), srcStripe.channels(),
thresh, maxval, thresholdType);
if (srcStripe.depth() == CV_8U)
{
thresh_8u( srcStripe, dstStripe, (uchar)thresh, (uchar)maxval, thresholdType );

Loading…
Cancel
Save