define adaptiveMethod and thresholdType for HAL

This commit is contained in:
elenagvo 2017-11-28 15:55:58 +03:00
parent c95bc0c7fd
commit 762138e77e
2 changed files with 21 additions and 1 deletions

View File

@ -21,6 +21,26 @@
#define CV_HAL_MORPH_DILATE 1
//! @}
//! @name Threshold types
//! @sa cv::ThresholdTypes
//! @{
#define CV_HAL_THRESH_BINARY 0
#define CV_HAL_THRESH_BINARY_INV 1
#define CV_HAL_THRESH_TRUNC 2
#define CV_HAL_THRESH_TOZERO 3
#define CV_HAL_THRESH_TOZERO_INV 4
#define CV_HAL_THRESH_MASK 7
#define CV_HAL_THRESH_OTSU 8
#define CV_HAL_THRESH_TRIANGLE 16
//! @}
//! @name Adaptive threshold algorithm
//! @sa cv::AdaptiveThresholdTypes
//! @{
#define CV_HAL_ADAPTIVE_THRESH_MEAN_C 0
#define CV_HAL_ADAPTIVE_THRESH_GAUSSIAN_C 1
//! @}
//! @}
#endif

View File

@ -1549,7 +1549,7 @@ void cv::adaptiveThreshold( InputArray _src, OutputArray _dst, double maxValue,
Mat srcfloat,meanfloat;
src.convertTo(srcfloat,CV_32F);
meanfloat=srcfloat;
GaussianBlur(srcfloat, meanfloat, Size(blockSize, blockSize), 0, 0, BORDER_REPLICATE);
GaussianBlur(srcfloat, meanfloat, Size(blockSize, blockSize), 0, 0, BORDER_REPLICATE|BORDER_ISOLATED);
meanfloat.convertTo(mean, src.type());
}
else