removed redundant code
This commit is contained in:
parent
3085fc6345
commit
35c17f35be
@ -740,10 +740,8 @@ void cv::distanceTransform( InputArray _src, OutputArray _dst, OutputArray _labe
|
|||||||
if( maskSize != CV_DIST_MASK_3 && maskSize != CV_DIST_MASK_5 && maskSize != CV_DIST_MASK_PRECISE )
|
if( maskSize != CV_DIST_MASK_3 && maskSize != CV_DIST_MASK_5 && maskSize != CV_DIST_MASK_PRECISE )
|
||||||
CV_Error( CV_StsBadSize, "Mask size should be 3 or 5 or 0 (precise)" );
|
CV_Error( CV_StsBadSize, "Mask size should be 3 or 5 or 0 (precise)" );
|
||||||
|
|
||||||
if( distType == CV_DIST_C || distType == CV_DIST_L1 )
|
if ((distType == CV_DIST_C || distType == CV_DIST_L1) && !need_labels)
|
||||||
maskSize = !need_labels ? CV_DIST_MASK_3 : CV_DIST_MASK_5;
|
maskSize = CV_DIST_MASK_3;
|
||||||
else if( distType == CV_DIST_L2 && need_labels )
|
|
||||||
maskSize = CV_DIST_MASK_5;
|
|
||||||
|
|
||||||
if( maskSize == CV_DIST_MASK_PRECISE )
|
if( maskSize == CV_DIST_MASK_PRECISE )
|
||||||
{
|
{
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user