From ada87a99757b50d4d986fcbb616f78fb077ac3ad Mon Sep 17 00:00:00 2001 From: Amro Date: Thu, 4 Feb 2016 08:31:22 +0200 Subject: [PATCH] fix ddepth to match output matrices otherwise we get a failed assertion from OutputArray::create --- modules/ximgproc/src/niblack_thresholding.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/ximgproc/src/niblack_thresholding.cpp b/modules/ximgproc/src/niblack_thresholding.cpp index 7167e6d94..292a8faee 100644 --- a/modules/ximgproc/src/niblack_thresholding.cpp +++ b/modules/ximgproc/src/niblack_thresholding.cpp @@ -70,9 +70,9 @@ void niBlackThreshold( InputArray _src, OutputArray _dst, double maxValue, if( src.data != dst.data ) mean = dst; - boxFilter( src, mean, CV_64F, Size(blockSize, blockSize), + boxFilter( src, mean, CV_32F, Size(blockSize, blockSize), Point(-1,-1), true, BORDER_REPLICATE ); - sqrBoxFilter( src, sqmean, CV_64F, Size(blockSize, blockSize), + sqrBoxFilter( src, sqmean, CV_32F, Size(blockSize, blockSize), Point(-1,-1), true, BORDER_REPLICATE ); // Compute (k * standard deviation) in the neighborhood of each pixel