Skip to content

Commit c95bc0c

Browse files
author
elenagvo
committed
add HAL for threshold
1 parent 11ddb93 commit c95bc0c

File tree

2 files changed

+18
-0
lines changed

2 files changed

+18
-0
lines changed

modules/imgproc/src/hal_replacement.hpp

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -647,6 +647,21 @@ inline int hal_ni_adaptiveThreshold(const uchar* src_data, size_t src_step, ucha
647647
#define cv_hal_adaptiveThreshold hal_ni_adaptiveThreshold
648648
//! @endcond
649649

650+
/**
651+
@brief Calculates fixed-level threshold to each array element
652+
@param src_data,src_step Source image
653+
@param dst_data,dst_step Destination image
654+
@param width,height Source image dimensions
655+
@param thresh Threshold value
656+
@param maxValue Value assigned to the pixels for which the condition is satisfied
657+
@param thresholdType Thresholding type
658+
*/
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; }
660+
661+
//! @cond IGNORED
662+
#define cv_hal_thresholdBin8u hal_ni_thresholdBin8u
663+
//! @endcond
664+
650665
//! @}
651666

652667
#if defined __GNUC__

modules/imgproc/src/thresh.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -141,6 +141,9 @@ 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+
144147
#if defined(HAVE_IPP)
145148
CV_IPP_CHECK()
146149
{

0 commit comments

Comments
 (0)