Skip to content

Commit 762138e

Browse files
author
elenagvo
committed
define adaptiveMethod and thresholdType for HAL
1 parent c95bc0c commit 762138e

File tree

2 files changed

+21
-1
lines changed

2 files changed

+21
-1
lines changed

modules/imgproc/include/opencv2/imgproc/hal/interface.h

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,26 @@
2121
#define CV_HAL_MORPH_DILATE 1
2222
//! @}
2323

24+
//! @name Threshold types
25+
//! @sa cv::ThresholdTypes
26+
//! @{
27+
#define CV_HAL_THRESH_BINARY 0
28+
#define CV_HAL_THRESH_BINARY_INV 1
29+
#define CV_HAL_THRESH_TRUNC 2
30+
#define CV_HAL_THRESH_TOZERO 3
31+
#define CV_HAL_THRESH_TOZERO_INV 4
32+
#define CV_HAL_THRESH_MASK 7
33+
#define CV_HAL_THRESH_OTSU 8
34+
#define CV_HAL_THRESH_TRIANGLE 16
35+
//! @}
36+
37+
//! @name Adaptive threshold algorithm
38+
//! @sa cv::AdaptiveThresholdTypes
39+
//! @{
40+
#define CV_HAL_ADAPTIVE_THRESH_MEAN_C 0
41+
#define CV_HAL_ADAPTIVE_THRESH_GAUSSIAN_C 1
42+
//! @}
43+
2444
//! @}
2545

2646
#endif

modules/imgproc/src/thresh.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1549,7 +1549,7 @@ void cv::adaptiveThreshold( InputArray _src, OutputArray _dst, double maxValue,
15491549
Mat srcfloat,meanfloat;
15501550
src.convertTo(srcfloat,CV_32F);
15511551
meanfloat=srcfloat;
1552-
GaussianBlur(srcfloat, meanfloat, Size(blockSize, blockSize), 0, 0, BORDER_REPLICATE);
1552+
GaussianBlur(srcfloat, meanfloat, Size(blockSize, blockSize), 0, 0, BORDER_REPLICATE|BORDER_ISOLATED);
15531553
meanfloat.convertTo(mean, src.type());
15541554
}
15551555
else

0 commit comments

Comments
 (0)