mirror of
https://github.com/opencv/opencv.git
synced 2024-11-29 13:47:32 +08:00
define adaptiveMethod and thresholdType for HAL
This commit is contained in:
parent
c95bc0c7fd
commit
762138e77e
@ -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
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user