From 90e191211e20f6f35cc71b8cc5a413328084466e Mon Sep 17 00:00:00 2001 From: Vadim Pisarevsky Date: Wed, 5 Jan 2011 20:18:52 +0000 Subject: [PATCH] increased "inf" constant in the true distance transform algorithm to handle high-resolution images --- modules/imgproc/src/distransform.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/imgproc/src/distransform.cpp b/modules/imgproc/src/distransform.cpp index 0441721f58..a4e0f9da8d 100644 --- a/modules/imgproc/src/distransform.cpp +++ b/modules/imgproc/src/distransform.cpp @@ -501,7 +501,7 @@ struct DTRowInvoker void operator()( const BlockedRange& range ) const { - const float inf = 1e6f; + const float inf = 1e15f; int i, i1 = range.begin(), i2 = range.end(); int n = dst->cols; AutoBuffer _buf((n+2)*2*sizeof(float) + (n+2)*sizeof(int)); @@ -559,7 +559,7 @@ struct DTRowInvoker static void icvTrueDistTrans( const CvMat* src, CvMat* dst ) { - const float inf = 1e6f; + const float inf = 1e15f; if( !CV_ARE_SIZES_EQ( src, dst )) CV_Error( CV_StsUnmatchedSizes, "" );