removed redundant code

This commit is contained in:
Labib Asari 2023-01-21 00:16:48 +05:30
parent 3085fc6345
commit 35c17f35be

View File

@ -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 )
CV_Error( CV_StsBadSize, "Mask size should be 3 or 5 or 0 (precise)" );
if( distType == CV_DIST_C || distType == CV_DIST_L1 )
maskSize = !need_labels ? CV_DIST_MASK_3 : CV_DIST_MASK_5;
else if( distType == CV_DIST_L2 && need_labels )
maskSize = CV_DIST_MASK_5;
if ((distType == CV_DIST_C || distType == CV_DIST_L1) && !need_labels)
maskSize = CV_DIST_MASK_3;
if( maskSize == CV_DIST_MASK_PRECISE )
{